---
title: /RRH/Enable RU M-Plane
tags: rrh
description: Enable RU M-Plane
---
# Enable RU M-Plane
You can follow steps to enable RU M-Plane Function.
# RU firmware upgrade
Upgrade RU firmware to v1.1.4q.432.
Upgrade step please reference QuickStartGuideOfRRHwithOAM.pdf
# Set RU to DHCP IP
```$ root@arria10:~/test#dhclient eth0```
# or set RU to Static IP
```$ root@arria10:~/test#./set_port.sh 100```
# activate OAM (Operations, Administration, and Maintenance , 營運管理與維護)
Activate OAM mode with flexible IP assigned by DHCP server
```$ root@arria10:~/test#./set_oam_mode -e```
If you want to set OAM to other mode , please check following description.
```
root@arria10:~/test# ./set_oam_mode -h
Usage: set_oam_mode [OPTION...] [IP ADDR] [NETMASK] [GATEWAY ADDR]
This command can change the RRH mode to OAM or NON-OAM mode.
Examples:
set_oam_mode -d #Disable OAM moe
set_oam_mode -e #Enable OAM modP
set_oam_mode -e 192.168.33.49 #Enable OAM mod0
set_oam_mode -e 192.168.33.49 255.255.0.0 #Enable OAM modk
set_oam_mode -e 192.168.33.49 255.255.0.0 192.168.33.150 #Enable OAM mods
Main options:
-d: Disable OAM mode
-e: Enable OAM mode
-h: Help
```
# ssh
You can ssh to RU by IP and port 830.
```ssh root@your-RRH-ip -p 830```
# set M-Plane call-home



> change "your-RU-ip" to your call-home ip
```$ root@arria10:~/test#mplane_ctl -c your-RU-ip```
# FHK Network Manage System
IP : 172.18.73.17
admin/admin
You will see RU online after you set call home ip on RU.

Example : Using NMS Ecplorer get-conf to check dhcp ip.

# NetConf Client Example - Atom
This section describes how to connect to netconf server and senf rpc yangfile by atom. The dhcp.xml yangfile xml can get dhcp information from RU.
Please follow following steps to setup.
1. install atom , download from https://atom.io/
2. after install atom , launch atom application
3. install package atom-netconf

4. config atom-netconf package from setting buttom

set
- Hostname - Your RU IP
- Password - Your RU password
- TCP port - 830
- Username - root
5. Click View Code Button

You can see the netconf xml from file lists.

6. Create a new file name dhcp.xml
Edit dhcp.xml by following content. This netconf xml file can let you get DHCP information from RU.
```
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get>
<filter>
<dhcp xmlns="urn:o-ran:dhcp:1.0">
<interfaces>
<dhcpv4/>
</interfaces>
</dhcp>
</filter>
</get>
</rpc>
```
7. Connect to Netconf Server & Send RPC
In atom-netconf setting , you can get the keybindings.

- ctrl-shift-N : connect to server that you have set before.
- ctrl-shift-space : send the current netconf xml to server.
Press ctrl-shift-N & ctrl-shift-space , you can get response from RU netconf server.
like this one:

# yangcli
## install yangcli in ubuntu system
```
sudo apt-get update -y
sudo apt-get install -y yangcli
```
## connect (連線)
```
$ yangcli
yangcli> connect
Enter string value for leaf <user>
yangcli:connect> root
Enter string value for leaf <server>
yangcli:connect> 172.18.73.135
Enter string value for leaf <password>
yangcli:connect> root
Checking Server Modules...
yangcli root@172.18.73.135>
```
## show modules (列出目前有的 modules)
RU yang module 實體放置位置 /usr/share/yuma/modules
```
yangcli root@172.18.73.135> show modules
nc:yuma123-netconf@2017-06-22
ianach:iana-crypt-hash@2014-08-06
ianahw:iana-hardware@2018-03-13
ianaift:iana-if-type@2017-01-19
ct:ietf-crypto-types@2019-07-02
dhcpv6-types:ietf-dhcpv6-types@2018-01-30
hw:ietf-hardware@2018-03-13
inet:ietf-inet-types@2013-07-15
if:ietf-interfaces@2018-02-20
ip:ietf-ip@2018-02-22
nacm:ietf-netconf-acm@2018-02-14
ncm:ietf-netconf-monitoring@2010-10-04
ncn:ietf-netconf-notifications@2012-02-06
pl:ietf-netconf-partial-lock@2009-10-19
ncwd:ietf-netconf-with-defaults@2011-06-01
sys:ietf-system@2014-08-06
yanglib:ietf-yang-library@2016-06-21
yang:ietf-yang-types@2013-07-15
manageEvent:nc-notifications@2008-07-14
ncEvent:notifications@2008-07-14
o-ran-alarms:o-ran-alarm-id@2019-02-04
o-ran-compression-factors:o-ran-compression-factors@2020-04-17
o-ran-dhcp:o-ran-dhcp@2019-07-03
o-ran-file-mgmt:o-ran-file-management@2019-07-03
o-ran-fm:o-ran-fm@2019-02-04
o-ran-hw:o-ran-hardware@2020-02-19
o-ran-int:o-ran-interfaces@2020-04-17
o-ran-module-cap:o-ran-module-cap@2020-04-17
o-ran-mplane-int:o-ran-mplane-int@2019-07-03
o-ran-ops:o-ran-operations@2019-07-03
o-ran-elements:o-ran-processing-element@2020-04-17
o-ran-swm:o-ran-software-management@2019-07-03
o-ran-supervision:o-ran-supervision@2020-01-24
o-ran-sync:o-ran-sync@2019-07-03
o-ran-uplane-conf:o-ran-uplane-conf@2020-04-17
o-ran-usermgmt:o-ran-usermgmt@2019-07-03
appcmn:yuma-app-common@2012-08-16
myses:yuma-mysession@2010-05-10
ncx:yuma-ncx@2012-01-13
proc:yuma-proc@2012-10-10
timefilter:yuma-time-filter@2012-11-15
yt:yuma-types@2012-06-01
ymyses-cache:yuma123-mysession-cache@2018-11-12
nct:yuma123-netconf-types@2017-06-23
yuma123-sys:yuma123-system@2017-03-26
```
## get-schema (得到 modules 結構)
透過 get-schema module-name 可以得到該 module 的結構
以下為範例
```
yangcli root@172.18.73.135> get-schema identifier=o-ran-sync
```
## xget (得到 modules value)
xget / <--- 按 Tab Key 可出現提示
```
yangcli root@172.18.73.135> xget /
active-alarm-list/ operational-info/
dhcp/ proc/
hardware/ processing-elements/
interfaces-state/ software-inventory/
interfaces/ supervision/
module-capability/ sync/
modules-state/ system-state/
mplane-info/ system/
nacm/ user-plane-configuration/
netconf-state/ users/
netconf/
```
取得 dhcpv4 目前設定
```
yangcli root@172.18.73.135> xget /dhcp/interfaces/dhcpv4
RPC Data Reply 25 for session 4:
rpc-reply {
data {
dhcp {
interfaces eth0 {
interface eth0
dhcpv4 {
client-id 172.18.73.135
dhcp-server-identifier 10.63.25.65
domain-name hc.cloudnsbg.efoxconn.com
domain-name-servers 10.63.25.34
domain-name-servers 10.63.25.36
interface-mtu 1500
}
}
}
}
}
```
取得 ptp 目前設定
```
yangcli root@172.18.73.135> xget /sync/ptp-config
RPC Data Reply 27 for session 4:
rpc-reply {
data {
sync {
ptp-config {
domain-number 44
accepted-clock-classes 248 {
clock-classes 248
}
ptp-profile G_8275_2
g-8275-2-config {
master-ip-configuration 128 {
local-priority 128
ip-address 192.168.3.100
}
}
}
}
}
}
```
# cisco-ie anx (推薦使用)
- https://github.com/cisco-ie/anx
Please follow installation guide to setup.
Screenshot
- login

- home

- check ptp GM ip-address

- show data - operational

- show data - operational result

- NETCONF Console

- get Send Request

- edit

輸入框
```
<edit-config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<target>
<running/>
</target>
<config>
<sync xmlns="urn:o-ran:sync:1.0">
<ptp-config>
<g-8275-2-config>
<master-ip-configuration>
<ip-address>192.168.100.151</ip-address>
<local-priority>128</local-priority>
</master-ip-configuration>
</g-8275-2-config>
</ptp-config>
</sync>
</config>
</edit-config>
```
注意 : candidate 需要修改為 running
```
<target>
<candidate/>
</target>
```
# CiscoDevNet yang-explorer (not recommand)
- https://github.com/CiscoDevNet/yang-explorer
- https://www.cisco.com/c/en/us/support/docs/storage-networking/management/200933-YANG-NETCONF-Configuration-Validation.html#anc14
not recommand by following reason
- [X] Need adobe flash player
- [X] Can't typing in text field
- [X] Some modules showes version error
- [X] Some invalid version of module will be caused RU netconfd crash.


# 其他 netconf client
- https://www.cisco.com/c/en/us/td/docs/net_mgmt/enhanced_device_interface/2-0-1/developer/guide/ntcfapp.html
- https://github.com/CiscoDevNet/yang-explorer
- https://www.cisco.com/c/en/us/support/docs/storage-networking/management/200933-YANG-NETCONF-Configuration-Validation.html
- https://github.com/CiscoDevNet/yang-explorer
# Issue
- Log Size (recommand import multilog)
- netconf need to be a systemd service (recommand netconfd as a systemd service)
- sometimes netconf crashes when send rpc (not sure the reason)
- ptp flow has been changed , ptp4l will auto run when boot (how to know the lock status ?)
- how to check core 1 log ? (recommand ptp4l redirect output log to file)
- 有些 config 尚未完成