LAB 05 · ADVANCED
NETCONF + YANG · query a YANG-enabled O-DU
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
- Linux or macOS — Docker available
netopeer2-cli— we'll install it- Standalone — does not require Lab 01-04
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
- You connected to netopeer2 over SSH/NETCONF (port 830)
- You can query
o-ran-uplane-confdata - You modified a config and saw the change reflect in
get-config - You're subscribed to the notification stream
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)
- VES streaming — O1 also defines VES (Virtual Event Streaming) over HTTPS for high-volume performance counters. See VES Collector docs.
- gNMI streaming — gRPC-based alternative to NETCONF telemetry. Same YANG models, faster wire format.
- Software management — O-RAN defines
o-ran-software-management.yangfor inventory + install procedures. - CSAR packages — software bundles per ONAP CSAR spec, deployed via O1.