簡介
本文介紹收集蜂窩網關和可插拔介面模組(PIM)的DM診斷監視器(DM)日誌的過程。
什麼是DM日誌
DM — 診斷監視器 — 日誌用於捕獲通過RF介面在數據機和網路之間的資料事務,這有助於排除4G和5G資料連線或效能問題。
基本5G呼叫流程
在進入DM日誌收集和分析之前,瞭解基本呼叫流程非常重要。
基本5G呼叫流程
1.裝置初始化和單元格搜尋:
- 5G裝置通電並開始搜尋可用的5G單元。
- 掃描鄰近基站(gNB)廣播的同步訊號。
2.初始訪問:
- 一旦找到合適的小區,裝置就會嘗試與gNB定時和頻率同步。
- 它向gNB傳送消息(RRC連線請求),請求連線。
3. RRC連線建立:
- gNB接收該請求並與該裝置建立無線資源控制(RRC)連線。
- 此連線允許裝置與網路之間進行安全可靠的通訊。
4.登記:
- 裝置使用網路(使用SIM卡資訊)進行身份驗證。
- 它向網路註冊其存在,並請求訪問服務。
5.資料傳輸:
- 註冊後,裝置即可通過5G網路傳送和接收資料。
- 這可能包括語音呼叫、資料流量(瀏覽、流)或其他應用。
6.連線發佈:
- 當使用者結束呼叫或斷開與網路的連線時,裝置將釋放與gNB的連線。
重點:
- RRC連線:這是實現裝置與網路之間安全可靠通訊的關鍵步驟。
- 資料平面:一旦建立RRC連線,裝置就可以使用資料平面來傳送和接收資料。
- 控制平面:控制平面用於信令和控制功能,例如建立連線和管理資源。
蜂窩網關的DM日誌收集
首先,在啟用DM日誌之前關閉數據機,可以使用AT命令AT+CFUN=0完成此操作
CellularGateway# cellular 1 modem-at-commands
Value for '' (<string>): AT+CFUN=0
此命令需要幾秒鐘時間並凍結SSH會話,開啟另一個到蜂窩網關的SSH會話。
驗證是否已使用AT命令AT+CFUN應用該命令?
CellularGateway# cellular 1 modem-at-commands
Value for '' (<string>): AT+CFUN?
cellular_modem_at_cmd: modem-at-response AT+CFUN?
+CFUN: 0
OK
設定DM日誌大小、旋轉和自動停止。
CellularGateway# config terminal
Entering configuration mode terminal
CellularGateway(config)# controller cellular 1
CellularGateway(config-cellular-1)# dm-log rotation
CellularGateway(config-cellular-1)# dm-log max_dm_log_size 60
CellularGateway(config-cellular-1)# dm-log autostop-event MODEM_STATE_DNS_ACQUIRED
CellularGateway(config-cellular-1)# dm-log autostop-timer 2
可以基於日誌收集流調整這些設定,或者,如果問題與蜂窩網路效能相關,則可以應用過濾器。
啟用DM日誌
CellularGateway(config-cellular-1)# dm-log enable
CellularGateway(config-cellular-1)# commit
使用AT+CFUN=1 AT命令啟用數據機。
CellularGateway# cellular 1 modem-at-commands
Value for '' (<string>): AT+CFUN=1
cellular_modem_at_cmd: modem-at-response AT+CFUN=1
OK
CellularGateway#
CellularGateway# cellular 1 modem-at-commands
Value for '' (<string>): AT+CFUN?
cellular_modem_at_cmd: modem-at-response AT+CFUN?
+CFUN: 1
OK
檢查所建立的檔案。
CellularGateway# gw-action:request file list
-rw-r--r-- 97272745 Dec 11 09:05 dmlog-slot0-20241211-090453.tar.gz
-rw-r--r-- 10550241 Dec 25 10:58 dmlog-slot0-20241225-105827.tar.gz
drwx------ 16384 Sep 27 18:29 lost+found
drwxr-xr-x 4096 Dec 25 11:03 storage
drwxr-xr-x 4096 Sep 27 18:29 tmp
這些檔案可以通過從下一跳啟動複製來傳輸。
5GSwitch#copy tftp://192.168.1.1/dmlog-slot0-20241211-090453.tar.gz flash:
Destination filename [dmlog-slot0-20241211-090453.tar.gz]?
Accessing tftp://192.168.1.1/dmlog-slot0-20241211-090453.tar.gz...
Loading dmlog-slot0-20241211-090453.tar.gz from 192.168.1.1 (via GigabitEthernet1/0/3): !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
調試完成後,禁用DM日誌。
CellularGateway# config terminal
Entering configuration mode terminal
CellularGateway(config-cellular-1)# no dm-log enable
CellularGateway(config-cellular-1)# commit
PIM模組的DM日誌收集
首先,關閉蜂窩網介面和無線電。
ISR2#configure terminal
ISR2(config)#interface cellular 0/2/0
ISR2(config-if)#shutdown
ISR2(config-if)#exit
ISR2(config)#controller cellular 0/2/0
ISR2(config-controller)#lte radio off
設定DM日誌記錄引數,包括旋轉、檔案大小、自動停止以及是否需要過濾器。
ISR2(config)#controller cellular 0/2/0
ISR2(config-controller)#lte modem dm-log rotation
ISR2(config-controller)#lte modem dm-log filesize 20
ISR2(config-controller)#lte modem dm-log autostop timer 20
啟用DM日誌
ISR2(config-controller)#lte modem dm-log enable
啟用無線電和蜂窩介面。
ISR2(config)#controller cellular 0/2/0
ISR2(config-controller)#no lte radio off
ISR2(config)#interface cellular 0/2/0
ISR2(config-if)#no shutdown
驗證DM日誌統計資料和檔案。
ISR2#show cellular 0/2/0 logs dm-log
Integrated DM logging is on
Output path = bootflash:
Filter Type = MC73xx generic
Filter Name = Telit Default log mask.bin
Maximum log size = 64 MB
Maximum file size = 20 MB
Log rotation = Enabled
ISR2#dir bootflash: | inc dm
24 -rw- 4236574 Jan 3 2025 11:39:33 +00:00 dmlog-slot2-20250103-113930.tar.gz
調試完成後,禁用DM日誌。
ISR2(config)#controller cellular 0/2/0
ISR2(config-controller)#no lte modem dm-log enable
使用EEM指令碼禁用PIM模組上的DM日誌記錄
我們可以使用EEM指令碼根據特定日誌消息或事件禁用DM日誌記錄,最常見的使用案例是蜂窩介面或隧道介面翻動。
event manager applet Cellular-Capture authorization bypass
event syslog pattern "Syslog Messege Needed to stop logging" maxrun 600
action 100 cli command "enable"
action 101 cli command "terminal length 0"
action 102 cli command "term exec prompt timestamp"
action 103 cli command "show cellular 0/2/0 all | append flash:Out_info"
action 104 cli command "show controller cellular 0/2/0 | append flash:Out_info"
action 105 cli command "show dialer | append flash:Out_info"
action 106 cli command "show int cellular 0/2/0 | append flash:Out_info"
action 112 syslog msg "Information loaded"
action"113"wait"180
action 114 cli command "show log | append flash:Out_info"
action 115 cli command "enable"
action 116 cli command "conf t"
action 117 cli command "controller cellular 0 1"
action 118 cli command "no lte modem dm-log enable"
action 119 syslog msg "DM-logs disabled"
action 120 cli command "en
結論
DM日誌分析需要TAC幫助,因為收集的檔案需要解碼,請在需要DM日誌記錄的問題時開啟TAC案例。