Hands-on labs are course-buyer only

These 5 hands-on labs are bonus content for students of the O-RAN Course. Enroll once (₹1,799 lifetime) to unlock all labs forever.

Get the course — ₹1,799 Already enrolled? Sign in
O
O-RAN Labs
All labs
LAB 05 · ADVANCED

NETCONF + YANG · query a YANG-enabled O-DU

~30 minutes NETCONF / YANG Standalone
What you'll do. Stand up a NETCONF server (netopeer2) loaded with O-RAN.WG4.MP.0 YANG models. Connect to it as a client. Query the device capabilities, traverse the YANG schema, and configure a cell parameter — all using the same O1 interface protocol an actual SMO uses to manage an O-DU.

0Prerequisites

1Run netopeer2-server with O-RAN YANG models

docker run -d --name oran-yang-server   -p 830:830   -e NETOPEER_PASSWORD=labpass   sysrepo/sysrepo-netopeer2:latest

# Wait 10s for the server to load YANG schemas
sleep 10
docker logs oran-yang-server | tail -20

2Load O-RAN.WG4.MP.0 YANG modules

Download the official O-RAN YANG models:

git clone https://github.com/o-ran-sc/o-yang
cd o-yang/oran-yang-models

Install into the running netopeer2:

for yang in o-ran-supervision.yang o-ran-uplane-conf.yang o-ran-performance-management.yang o-ran-fault-management.yang; do
  docker cp $yang oran-yang-server:/tmp/
  docker exec oran-yang-server sysrepoctl --install /tmp/$yang
done
docker restart oran-yang-server

3Install netopeer2-cli on your laptop

# Ubuntu
sudo apt install netopeer2

# macOS
brew install libnetconf2 netopeer2

# Verify
netopeer2-cli --version

4Connect to the YANG server

netopeer2-cli

Inside the CLI:

> connect --host localhost --port 830 --login root
Password: labpass

5List capabilities

Run inside netopeer2-cli:

> get-data --datastore=operational --filter-xpath /ietf-yang-library:yang-library

You'll see all loaded YANG modules including the O-RAN ones.

6Query the O-DU's "uplane configuration"

The O-RAN o-ran-uplane-conf YANG module defines how the user plane is configured. Fetch the entire tree:

> get-config --source running --filter-xpath /o-ran-uplane-conf:user-plane-configuration

You'll see (formatted) something like:

<user-plane-configuration xmlns="urn:o-ran:uplane-conf:1.0">
  <tx-array>...</tx-array>
  <rx-array>...</rx-array>
  <tx-array-carriers>...</tx-array-carriers>
  <rx-array-carriers>...</rx-array-carriers>
</user-plane-configuration>

7Edit a config — turn off a TX carrier

Create an XML edit-config payload:

cat > tx-off.xml <<'EOF'
<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
  <user-plane-configuration xmlns="urn:o-ran:uplane-conf:1.0">
    <tx-array-carriers>
      <name>TX0</name>
      <active>INACTIVE</active>
    </tx-array-carriers>
  </user-plane-configuration>
</config>
EOF

Push it via netopeer2-cli:

> edit-config --target=running --config=/path/to/tx-off.xml

Verify the change took:

> get-config --source running --filter-xpath "/o-ran-uplane-conf:user-plane-configuration/tx-array-carriers[name='TX0']"

8Subscribe to FCAPS notifications

Per O-RAN.WG4.MP.0, O-DUs emit notifications when a fault or performance threshold occurs. Subscribe:

> subscribe --stream=NETCONF

The CLI now blocks, waiting for the server to push notification messages.

Checkpoint

That's O1 in action.An actual SMO does exactly this dance — at scale, with hundreds of O-DUs and O-RUs — to configure cells, push software, collect performance counters, and react to faults.

!What we skipped (and where to go next)

You finished all 5 labs!

What's next?

Try building your own xApp + rApp combo. Tag us on LinkedIn @cafetele if you ship something cool.

All labs