TR069服務器配置DHCP/IP/PING/Tracert/HTTP/PPPoE等仿真診斷模板及IPWAN和PPPoE WAN模板創建

1.IPOE WAN 連接配置
下發操作步驟:

創建DHCP WAN,
1.	建立InternetGatewayDevice.WANDevice.1.WANConnectionDevice.==1實例(若有預配置WAN,可忽略該步驟)
2.	再增加
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.=={i}實例==2
3.	設置WANIPConnection相關參數
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.2.X_CMCC_VLANMode =
VLAN啓用模式,以下值之一:
0表示不啓用
1表示保持原來的標誌位值
2表示重寫VLAN

InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.{i}.X_CMCC_VLANIDMark =
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.{i}.ConnectionType = IP_Routed
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.{i}.AddressingType = DHCP
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.{i}.X_CMCC_LanInterface = (和LAN側的綁定關係)InternetGatewayDevice.LANDevice.1.LANEthernetInterfaceConfig.2
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.{i}.X_CMCC_ ServiceList = (業務綁定)
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.{i}.Enable=true
實際操作實踐:

1. 先進入TR098數據模型樹中 創建Object對象通過AddObject方法去創建,創建後會自動生成一條新的WAN連接:
由於默認WAN連接存在一條預配置IPOE 的TR069 WAN連接,WANConnectionDevice.1該實例默認就已經創建好了,因此創建WANIPConnection.==2實例從2 開始;
如:
InternetGatewayDevice.WANDevice.1.WANConnectionDevice. == 2(實例值)
2.設置WANIPConnection相關參數

InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.2.X_CMCC_VLANMode     unsignedInt   2 (tag vlan)
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.2.X_CMCC_VLANIDMark   unsignedInt  200
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.2.X_CMCC_802-1pMark   unsignedInt   0(0--7)
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.2.ConnectionType      string      IP_Routed or IP_Bridged
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.2.AddressingType      string  DHCP 或 Static
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.2.X_CMCC_LanInterface    string  InternetGatewayDevice.LANDevice.1.LANEthernetInterfaceConfig.2 (綁定LAN2 端口)
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.2.X_CMCC_ ServiceList    string ("TR069","INTERNET","VOIP","OTHER")
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.2.Enable   boolean  TRUE 或 FALSE(默認)
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.2.NATEnabled    boolean  TRUE 或 FALSE(默認)

設置靜態WANIP,需要加上以下配置IPAddress,MASK,DNS,default gateway         
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.2.ExternalIPAddress   string   192.168.1.111
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.2.SubnetMask        string  255.255.255.0
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.2.DefaultGateway   string   192.168.1.254
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.2.DNSEnabled   boolean  TRUE
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.2.DNSServers  string   192.168.1.254
IP類型設置,默認IPv4
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.2.X_CMCC_IPMode       unsignedInt   默認爲1(IPv4;2:IPv6;3:IPv4/IPv6;3:IPv4/IPv6)
組播VLANID設置
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.2.X_CMCC_MulticastVlan   Int   1000(-1 表示不啓用)
是否啓用本WAN綁定的LAN側端口的DHCP分配IP功能
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.2.X_CMCC_LanInterface-DHCPEnable  boolean  TRUE 或 FALSE

1.1.DHCP診斷模板信息 (前提是 ONU通過password方式去註冊)

查看診斷結果,在TR-098數據模型樹中通過GetParameterValue方法查看:
設置路徑:InternetGatewayDevice.X_CMCC_IPoEDiagnostics.
可以看到以下所有參數信息,重點看InternetGatewayDevice.X_CMCC_IPoEDiagnostics.Result 這一參數;
仿真結果,如下值之一:
“SendDHCPMsgError” 發送DHCP報文失敗
“ServerNotFound” 找不到DHCP服務器
“ServerDeny” DHCP服務器拒絕請求
“GetIPAddressTimeout” 請求IP地址超時
“AllDestinationPingFail” 所有的ping都失敗
“SomeDestinationPingFail” 部分ping失敗
“Other” 其他錯誤

InternetGatewayDevice.X_CMCC_IPoEDiagnostics.FailureCount	                  0
InternetGatewayDevice.X_CMCC_IPoEDiagnostics.DefaultGateway	            默認網關IP
InternetGatewayDevice.X_CMCC_IPoEDiagnostics.AverageResponseTime              0
InternetGatewayDevice.X_CMCC_IPoEDiagnostics.MaximumResponseTime	          0
InternetGatewayDevice.X_CMCC_IPoEDiagnostics.PingNumberOfRepetitions	      5
InternetGatewayDevice.X_CMCC_IPoEDiagnostics.Timeout	                      800
InternetGatewayDevice.X_CMCC_IPoEDiagnostics.LocalAddress	             仿真獲取到的IP地址(默認會獲取WANIP)
InternetGatewayDevice.X_CMCC_IPoEDiagnostics.MinimumResponseTime	          0
InternetGatewayDevice.X_CMCC_IPoEDiagnostics.Result	
InternetGatewayDevice.X_CMCC_IPoEDiagnostics.WANInterface	
InternetGatewayDevice.X_CMCC_IPoEDiagnostics.SuccessCount	                  0
InternetGatewayDevice.X_CMCC_IPoEDiagnostics.UserMac	                 5c:c7:d7:00:a0:11
InternetGatewayDevice.X_CMCC_IPoEDiagnostics.PingDestIPAddress	        192.168.1.254(DHCP連接成功後需要Ping的目的IP)
InternetGatewayDevice.X_CMCC_IPoEDiagnostics.DiagnosticsState	             Complete

配置一下DHCP 診斷模板
InternetGatewayDevice.X_CMCC_IPoEDiagnostics.WANInterface 	    string 	InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.1
InternetGatewayDevice.X_CMCC_IPoEDiagnostics.PingDestIPAddress 	string 	192.168.1.254
InternetGatewayDevice.X_CMCC_IPoEDiagnostics.Timeout 	        unsignedInt 	800
InternetGatewayDevice.X_CMCC_IPoEDiagnostics.DiagnosticsState 	string 	Start
InternetGatewayDevice.X_CMCC_IPoEDiagnostics.UserMac 	        string 	5c:c7:d7:00:a0:11

DiagnosticsState:仿真狀態,如下值之一:
"None"  空
"Start"  開始
"Stop"  停止
"DHCPProceeding"  DHCP進行中
"Complete" 完成
其中Start和Stop爲可寫,其它狀態只讀。

DHCP 仿真成功,如下圖所示:
在這裏插入圖片描述
仿真失敗圖:在這裏插入圖片描述
1.2. Ping診斷 模板配置
查看診斷結果時路徑:InternetGatewayDevice.IPPingDiagnostics.
DiagnosticsState:診斷狀態,如下值之一:
None
Requested
Complete
Error_CannotResolveHostName
Error_Internal
Error_Other
當執行寫操作時,取值只能爲Requested。其他狀態只可讀
重點看ping 成功後返回的Ping包個數,看參數SuccessCount=5(由於設置了Ping包個數NumberOfRepetitions爲5個)

配置一下Ping 診斷模板參數
InternetGatewayDevice.IPPingDiagnostics.Interface 	string 	InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.1 (只針對路由WAN連接)
InternetGatewayDevice.IPPingDiagnostics.Host 	    string 	192.168.1.254(ping目標地址)
InternetGatewayDevice.IPPingDiagnostics.Timeout 	unsignedInt 	1000
InternetGatewayDevice.IPPingDiagnostics.DiagnosticsState 	string 	Requested 
InternetGatewayDevice.IPPingDiagnostics.NumberOfRepetitions 	unsignedInt  5	

1.3. Traceroute診斷
查看診斷結果時路徑:InternetGatewayDevice.TraceRouteDiagnostics.
DiagnosticsState:診斷狀態,如下值之一:
None
Requested
Complete
Error_CannotResolveHostName
Error_MaxHopCountExceeded
當執行寫操作時,取值只能爲Requested。

配置一下Traceroute診斷模板參數

InternetGatewayDevice.TraceRouteDiagnostics.Interface 	string 	InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.1 (只針對路由WAN連接)
InternetGatewayDevice.TraceRouteDiagnostics.Host 	    string 	192.168.1.254(ping目標地址)
InternetGatewayDevice.TraceRouteDiagnostics.DiagnosticsState 	string 	Requested 
InternetGatewayDevice.TraceRouteDiagnostics.Mode        string    UDP 或 ICMP(默認,默認值都可以不設置)
InternetGatewayDevice.TraceRouteDiagnostics.NumberOfTries unsignedInt  3 默認值
InternetGatewayDevice.TraceRouteDiagnostics.Timeout 	unsignedInt 	5000  默認值

查看Traceroute診斷記錄列表
InternetGatewayDevice.TraceRouteDiagnostics.RouteHops.{i}.

1.4. HTTP下載仿真
查看診斷結果時路徑:InternetGatewayDevice.DownloadDiagnostics.
DiagnosticsState:診斷狀態,如下值之一:
None
Requested
Completed
Error_InitConnectionFailed
Error_NoResponse
Error_PasswordRequestFailed
Error_LoginFailed
Error_NoTransferMode
Error_NoPASV
Error_NoCWD
Error_NoSTOR
Error_NoTransferComplete
當執行寫操作時,取值只能爲 Requested。

配置一下HTTP下載仿真模板參數
InternetGatewayDevice.DownloadDiagnostics.Interface 	        string 	InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.1 (只針對路由WAN連接)
InternetGatewayDevice.DownloadDiagnostics.DownloadURL  	    string 	192.168.1.254(用於下載的URL )
InternetGatewayDevice.DownloadDiagnostics.DiagnosticsState 	string 	Requested 
InternetGatewayDevice.DownloadDiagnostics.DSCP              unsignedInt    0(用來測試包的DSCP值)
InternetGatewayDevice.DownloadDiagnostics.EthernetPriority  unsignedInt  0 (用來測試包的優先級)

2. PPPOE WAN連接配置

1.上行路由連接PPPoE模式建立流程,若已經建立PPPoE_Bridge 橋連接,則創建PPPoE的WANID是2
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.==1 (若存在預配置,該WANConnectionDevice會自動生成1)
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.=={i}
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.{i}.X_CMCC_VLANMode = 2
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.{i}.X_CMCC_VLANIDMark= 100
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.{i}.ConnectionType=PPPoE_Routed  或PPPoE_Bridged
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.{i}.Username =(PPPoE賬號)2222
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.{i}.Password=(PPPoE密碼)2222
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.{i}.X_CMCC_LanInterface = (和LAN側的綁定關係)設置爲空或不下發
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.{i}.X_CMCC_ServiceList = (業務綁定)INTERNET or VOIP or TR069 or..
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.{i}.Enable=true
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.{i}.NATEnabled=true 默認FALSE

2.1 PPPoE 仿真

查看診斷結果時路徑:InternetGatewayDevice.X_CMCC_PPPOE_EMULATOR.

配置PPPoE診斷 模版信息
InternetGatewayDevice.X_CMCC_PPPOE_EMULATOR.WANInterface   String  InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.{i}     (針對橋接和路由WAN均適用)
InternetGatewayDevice.X_CMCC_PPPOE_EMULATOR.PPPAuthenticationProtocol  string   PAP或CHAP
InternetGatewayDevice.X_CMCC_PPPOE_EMULATOR.RetryTimes    unsignedInt  3 (3次以內可設置)
InternetGatewayDevice.X_CMCC_PPPOE_EMULATOR.Username   string  2222
InternetGatewayDevice.X_CMCC_PPPOE_EMULATOR.Password   string   2222
InternetGatewayDevice.X_CMCC_PPPOE_EMULATOR.DiagnosticsState  string   Start

診斷狀態,如下值之一:
“None” 空
“Start” 開始
“Stop” 停止
“Complete” 完成
“Running” 運行中
其中Start和Stop爲可寫,其它狀態只讀。

注意: 以上配置模版操作下發配置,需要在下一個inform上報時設置對應參數值;最後在WEB頁面通過手動上報Inform方式更容易看到結果值

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章