簡介
本檔案介紹在虛擬機器器(VM)和XR路由器上驗證Cisco路由PON (被動光纖網路)解決方案。
必要條件
需求
思科建議瞭解以下主題。
- Cisco IOS® XR軟體
- Linux
- 虛擬機器器環境
採用元件
本檔案中的資訊是根據列出的軟體和硬體版本:
- NCS-540-28Z4C-SYS-A XR路由器
- 思科IOS® XR軟體24.1.2
- 路由PON版本24.1.2
- Ubuntu版本20.04.06 LTS
本文中的資訊是根據特定實驗室環境內的裝置所建立。文中使用到的所有裝置皆從已清除(預設)的組態來啟動。如果您的網路運作中,請確保您瞭解任何指令可能造成的影響。
驗證步驟- XR路由器
組態檢查
Linux網路
確保用於連線的VRF(虛擬路由和轉發)反映在linux網路配置中。在本示例中,已配置VRF Mgmt-intf。此外,請確保為正確的上行鏈路介面設定了source-hint default-route。所列示例中的連線使用介面MgmtEth0/RP0/CPU0/0。
組態範例:
linux networking
vrf Mgmt-intf
address-family ipv4
default-route software-forwarding
source-hint default-route interface MgmtEth0/RP0/CPU0/0
物理介面和子介面配置
確保插入OLT(光線路終端)插頭的介面正確且配置中並未關閉。此外,確認子介面使用dot1q標籤4090並應用於關聯的物理介面。
組態範例:
interface TenGigE0/0/0/0
description PON OLT
!
interface TenGigE0/0/0/0.4090
encapsulation dot1q 4090
命令驗證:
RP/0/RP0/CPU0:F340.16.19.N540-1#show ip interface brief
Tue Jul 16 15:08:28.786 UTC
Interface IP-Address Status Protocol Vrf-Name
TenGigE0/0/0/0 unassigned Up Up default
TenGigE0/0/0/0.4090 unassigned Up Up default
RP/0/RP0/CPU0:F340.16.19.N540-1#show interface TenGigE0/0/0/0.4090
Wed Jul 17 13:17:07.754 UTC
TenGigE0/0/0/0.4090 is up, line protocol is up
Interface state transitions: 5
Hardware is VLAN sub-interface(s), address is c47e.e0b3.9b04
Internet address is Unknown
MTU 1518 bytes, BW 10000000 Kbit (Max: 10000000 Kbit)
reliability 255/255, txload 0/255, rxload 0/255
Encapsulation 802.1Q Virtual LAN, VLAN Id 4090, loopback not set
確保在全局配置中啟用LLDP。
RP/0/RP0/CPU0:F340.16.19.N540-1#show run | include lldp
Thu Jul 18 20:16:12.073 UTC
lldp
PON控制器配置
確保已安裝xr-pon-ctrl RPM且處於活動狀態。如果不是,請確認NCS540l-iosxr-optional-RPMs-24.2.11.tar存在於硬碟上(在Linux shell中,路徑為/misc/disk1/),並且正確引用包含匹配RPM的軟體的local-repo。
範例:
RP/0/RP0/CPU0:F340.16.19.N540-2#show install active summary | include xr-pon
Tue Jul 16 14:59:16.082 UTC
xr-pon-ctlr 24.1.2v1.0.0-1
install
repository local-repo
url file:///harddisk:/optional-RPMs-2412
確保PON控制器配置了正確關聯的檔案、檔案路徑和VRF。
範例:
pon-ctlr
cfg-file harddisk:/PonCntlInit.json vrf Mgmt-intf
驗證
JSON檔案
註:PonCntlInit.json檔案示例隨附於VM上路由PON Manager軟體的安裝中。
注意:如果只安裝一個PON Manager虛擬機器,則MongoDB IP和虛擬機器IP是相同的。
注意:列出的示例不使用TLS。如果您使用的是TLS,請確保為您的安裝正確設定了使用者名稱和口令。
確保host:部分設定了MongoDB的IP,以便與PON控制器所連線的裝置匹配。此外,確認配置的埠與VM中mongod.conf檔案的埠匹配。
範例:
{
"CNTL": {
"Auth": false,
"CFG Version": "R4.0.0",
"DHCPv4": true, <- DHCP set to true for CPE devices, Default is false.
"DHCPv6": true, <- DHCP set to true for CPE devices, Default is false.
"PPPoE": false,
"UMT interface": "tibitvirt",
"Maximum CPEs Allowed": 0,
"Maximum CPE Time": 0
},
"DEBUG": {},
"JSON": {
"databaseDir": "/opt/tibit/poncntl/database/",
"defaultDir": "/opt/tibit/poncntl/database/"
},
"Local Copy": {
"CNTL-STATE": false,
"OLT-STATE": false,
"ONU-STATE": false
},
"Logging": {
"Directory": "/var/log/tibit",
"FileCount": 3,
"FileSize": 10240000,
"Tracebacks": false,
"Timestamp": false,
"Facility" : "user"
},
"MongoDB": {
"auth_db": "tibit_users",
"auth_enable": false,
"ca_cert_path": "/etc/cisco/ca.pem",
"compression": false,
"write_concern": "default",
"host": "10.122.140.232", <- MongoDB IP
"name": "tibit_pon_controller",
"password": "", <- Left Empty - Not using TLS
"port": "27017", <- MongoDB TCP Port
"tls_enable": false, <- Set to False to leave TLS disabled
"username": "", <- Left Empty - Not using TLS
"dns_srv": false,
"db_uri": "",
"replica_set_enable": false,
"validate_cfg": true
},
"databaseType": "MongoDB",
"interface": "veth_pon_glb"
}
連線檢查
從XR路由器,對MongoDB/VM託管路由PON管理器執行ping操作。如果您使用的是VRF,請從VRF獲取源。
範例:
RP/0/RP0/CPU0:F340.16.19.N540-1#ping vrf Mgmt-intf 10.122.140.232
Tue Jul 16 15:09:52.780 UTC
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.122.140.232 timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/3 ms
RP/0/RP0/CPU0:F340.16.19.N540-1#
容器狀態
PON控制器在XR路由器的塢站容器上運行。透過登入到XR路由器中的linux shell來檢查容器的狀態,然後運行命令docker ps。這會顯示目前使用中的容器(若有的話)。
範例:
RP/0/RP0/CPU0:F340.16.19.N540-1#run
Tue Jul 16 15:14:26.059 UTC
[node0_RP0_CPU0:~]$docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
2e700f202ee3 tibit-poncntl.xr:R4.0.0 "/usr/bin/supervisor…" 3 days ago Up 3 days pon_ctlr
如果docker容器未運行,請檢查JSON檔案的內容和檔案結構。檢查docker容器的日誌中是否有任何活動錯誤。日誌示例顯示一個ONU向控制器註冊。這也會列印容器與OLT相關的任何檔案層級錯誤。此外,可以透過運行簡單的show logging來檢查錯誤消息來獲得指導。
注意:的用法—follow顯示docker中的最新日誌內容。
範例:
[node0_RP0_CPU0:~]$docker logs pon_ctlr
2024-07-16 15:05:11.630 PonCntl System Status
{
"e0:9b:27:36:aa:76": {
"OLT State": "Primary",
"ONU Active Count": 1,
"ONUs": {
"CIGG2410503f": "Registered"
日期和時間
確保XR路由器和託管路由PON管理器的VM上的時間和日期匹配。如果可能,請使用相同的NTP伺服器以獲得最佳準確性。
注意:VM和XR路由器之間的NTP不同步直接影響路由PON管理器中的OLT可見性。
範例:
RP/0/RP0/CPU0:F340.16.19.N540-1#show clock
Tue Jul 16 15:25:03.781 UTC
15:25:03.827 UTC Tue Jul 16 2024
組態範例:
ntp
server vrf Mgmt-intf 172.18.108.14 source MgmtEth0/RP0/CPU0/0
server vrf Mgmt-intf 172.18.108.15 prefer source MgmtEth0/RP0/CPU0/0
追蹤訊息
PON進程透過ltrace生成附加的日誌記錄。檢查這些日誌,查詢與此進程相關的任何錯誤。
範例:
RP/0/RP0/CPU0:F340.16.19.N540-1#show pon-ctlr ltrace all reverse location all
Wed Jul 17 13:25:43.747 UTC
670 wrapping entries (4224 possible, 896 allocated, 0 filtered, 670 total)
Jul 10 19:17:55.066 pon_ctlr/event 0/RP0/CPU0 t6986 pon_ctlr_config_sysdb.c:117:Successfully connected to sysdb
Jul 10 19:17:55.039 pon_ctlr/event 0/RP0/CPU0 t6986 pon_ctlr_main.c:372:Succeessfully registered with install manager
Jul 10 19:17:55.006 pon_ctlr/event 0/RP0/CPU0 t7082 pon_ctlr_utls.c:353:IP LINK: ip link delete veth_pon_xrns
驗證步驟- Linux VM
驗證
status.sh命令檔
在Routed PON Manager安裝目錄中,有一個shell指令碼(status.sh)顯示每個關聯進程的當前狀態。以提升的許可權執行此命令檔,以確認列出的各項服務都已啟動並執行。如果其中一個服務未執行,請先檢查執行安裝時執行的安裝指令碼,並確保根據安裝指南設定適當的引數。
mongod.service
apache2.service
netconf.service
netopeer2-server.service
範例:
rpon@rpon-mgr:~/PON_MANAGER_SIGNED_CCO/R4.0.0-Cisco-UB2004-sign/R4.0.0-Cisco-UB2004$ sudo ./status.sh
[sudo] password for rpon:
MCMS Component Versions:
PON Manager: R4.0.0
PON NETCONF: R4.0.0
PON Controller: Not Installed
● mongod.service - MongoDB Database Server
Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2024-06-27 08:46:25 EDT; 2 weeks 5 days ago
Main PID: 52484 (mongod)
Memory: 1.5G
CGroup: /system.slice/mongod.service
└─52484 /usr/bin/mongod --config /etc/mongod.conf
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2024-07-12 06:33:30 EDT; 4 days ago
Process: 103015 ExecReload=/usr/sbin/apachectl graceful (code=exited, status=0/SUCCESS)
Main PID: 96525 (apache2)
Tasks: 123 (limit: 9403)
Memory: 27.0M
CGroup: /system.slice/apache2.service
├─ 96525 /usr/sbin/apache2 -k start
├─103029 /usr/sbin/apache2 -k start
├─103030 /usr/sbin/apache2 -k start
└─103031 /usr/sbin/apache2 -k start
● tibit-netconf.service - Tibit Communications, Inc. NetCONF Server
Loaded: loaded (/lib/systemd/system/tibit-netconf.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2024-06-27 08:47:44 EDT; 2 weeks 5 days ago
Main PID: 60768 (tibit-netconf)
Tasks: 17 (limit: 9403)
Memory: 60.7M
CGroup: /system.slice/tibit-netconf.service
├─60768 /opt/tibit/netconf/bin/tibit-netconf
└─60786 /opt/tibit/netconf/bin/tibit-netconf
● tibit-netopeer2-server.service - Tibit Communications, Inc. Netopeer2 Server
Loaded: loaded (/lib/systemd/system/tibit-netopeer2-server.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2024-06-27 08:47:44 EDT; 2 weeks 5 days ago
Main PID: 60772 (netopeer2-serve)
Tasks: 7 (limit: 9403)
Memory: 6.0M
CGroup: /system.slice/tibit-netopeer2-server.service
└─60772 /opt/tibit/netconf/bin/netopeer2-server -v 1 -t 55
Netplan
驗證Netplan並確保IP資訊有效、VM網路介面名稱正確、建立和分配了VLAN id 4090,並且它使用有效的Netplan YAML樹結構。
注意: netplan YAML檔案位於/etc/netplan/中。
範例:
rpon@rpon-mgr:~/PON_MANAGER_SIGNED_CCO/R4.0.0-Cisco-UB2004-sign/R4.0.0-Cisco-UB2004$ cat /etc/netplan/01-network-manager-all.yaml
network:
version: 2
Renderer: Network Manager
ethernets:
ens192: <- VM Network Adapter
dhcp4: no <- No DHCP as the IP is set statically
dhcp6: no
addresses: [10.122.140.232/28] <- IP of the VM Network adapter
gateway4: 10.122.140.225 <- GW of the IP Network
nameservers:
addresses: [172.18.108.43,172.18.108.34] <- Network DNS
vlans:
vlan.4090:
id: 4090
link: ens192 <- VM Network adapter
dhcp4: no
dhcp6: no
驗證VM的IP配置,以及配置的網路介面卡是否與netplan YAML檔案中列出的相匹配。
注意:sudo netplan —debug apply的使用在應用之前測試netplan時很有用。
範例:
rpon@rpon-mgr:~$ ifconfig
ens192: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.122.140.232 netmask 255.255.255.240 broadcast 10.122.140.239
inet6 fe80::df4d:8d4d:4836:82aa prefixlen 64 scopeid 0x20<link>
ether 00:50:56:84:3f:8f txqueuelen 1000 (Ethernet)
RX packets 68933231 bytes 21671670389 (21.6 GB)
RX errors 0 dropped 129 overruns 0 frame 0
TX packets 36820200 bytes 71545432788 (71.5 GB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
-- snipped for brevity --
vlan.4090: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::250:56ff:fe84:3f8f prefixlen 64 scopeid 0x20<link>
ether 00:50:56:84:3f:8f txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1044 bytes 140547 (140.5 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
IP連線能力
透過ping驗證與託管PON控制器的XR路由器的IP連線。
範例:
rpon@rpon-mgr:~/PON_MANAGER_SIGNED_CCO/R4.0.0-Cisco-UB2004-sign/R4.0.0-Cisco-UB2004$ ping 10.122.140.226
PING 10.122.140.226 (10.122.140.226) 56(84) bytes of data.
64 bytes from 10.122.140.226: icmp_seq=1 ttl=255 time=1.01 ms
64 bytes from 10.122.140.226: icmp_seq=2 ttl=255 time=1.03 ms
64 bytes from 10.122.140.226: icmp_seq=3 ttl=255 time=1.13 ms
^C
--- 10.122.140.226 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 1.009/1.054/1.128/0.052 ms
驗證MongoDB TCP埠27017是否已打開。如果為MongoDB使用非標準埠,請透過netstat -tunl驗證該埠是否打開/偵聽。
注意:步驟4中列出的配置檔案還設定了MongoDB要使用的TCP埠配置。
範例:
rpon@rpon-mgr:~/PON_MANAGER_SIGNED_CCO/R4.0.0-Cisco-UB2004-sign/R4.0.0-Cisco-UB2004$ netstat -tunl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:27017 0.0.0.0:* LISTEN
tcp 0 0 10.122.140.232:27017 0.0.0.0:* LISTEN
MongoDB配置檔案
驗證mongod.conf檔案是否準確,以及bindIP:下是否具有正確的IP。
注意:MongoDB配置檔案位於/etc/mongod.conf
範例:
rpon@rpon-mgr:~/PON_MANAGER_SIGNED_CCO/R4.0.0-Cisco-UB2004-sign/R4.0.0-Cisco-UB2004$ cat /etc/mongod.conf
# mongod.conf
storage:
dbPath: /var/lib/mongodb
journal:
enabled: true
systemLog:
destination: file
logAppend: true
path: /var/log/mongodb/mongod.log
logRotate: reopen
# network interfaces
net:
port: 27017
bindIp: 127.0.0.1,10.122.140.232
processManagement:
pidFilePath: /var/run/mongodb/mongod.pid
timeZoneInfo: /usr/share/zoneinfo
replication:
replSetName: "rs0"
-- snipped for brevity --
系統層級記錄位置
每個服務的系統級日誌在linux中管理。這些日誌儲存在/var/log目錄中,特別是這些樹下。
MongoDB日誌:/var/log/mongod/mongod.log
Apache日誌:/var/log/apache2/<filename>.log
虛擬機器系統日誌: /var/log/syslog
參考文檔