何为TR069?
TR069, 全称“Technical Report 069”是由DSL Forum修订的一份技术规范,该规范是应用层的管理协议,命名为“CPE广域网管理协议”。
TR069定义了一套全新的网管体系结构,包括管理模型,交互接口及基本的管理参数,能够有效地实施对家庭网络设备的管理。
协议栈
CPE/ACS Management Applicantion |
用于CPE广域网管理协议的CPE和ACS |
RPC Methods |
协议定义的特定RPC方法 |
SOAP |
消息传输基于HTTP1.1,消息内容使用SOAP包进行封装,包含SOAP head和SOAP body两部分组成的XML数据 |
HTTP |
要求支持HTTP1.1 |
SSL/TSL |
标准的 internet 传输层安全协议 |
TCP/IP |
标准TCP/IP传输 |
SOAP报文实例解析
src:192.168.65.111:41917 dst:192.168.65.3:9090 time:2019/10/15 14:07:23
POST / HTTP/1.1
Host: 192.168.65.3:9090
Content-Type: text/xml; charset="utf-8"
Keep-Alive:
Connection: TE, Keep-Alive
TE: trailers
Content-Length: 2814
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:cwmp="urn:dslforum-org:cwmp-1-0">
<SOAP-ENV:Header>
<cwmp:ID SOAP-ENV:mustUnderstand="1">21299202</cwmp:ID>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<cwmp:Inform> //inform方法
<DeviceId> //设备信息
//设备厂商 及 厂商唯一标识
<Manufacturer>SKYW</Manufacturer>
<OUI>3C1835</OUI>
//设备类型 及 设备序列号
<ProductClass>DT741v231</ProductClass>
<SerialNumber>413433C1835B523F1</SerialNumber>
</DeviceId>
//引起会话的具体事件
<Event SOAP-ENC:arrayType="cwmp:EventStruct[3]">
<EventStruct>
<EventCode>4 VALUE CHANGE</EventCode>
<CommandKey></CommandKey>
</EventStruct>
<EventStruct>//CPE初次安装使用的时候. EventCode为 0 BOOTSTRAP
<EventCode>0 BOOTSTRAP</EventCode>
<CommandKey></CommandKey>
</EventStruct>
<EventStruct>
<EventCode>X CMCC BIND</EventCode>
<CommandKey></CommandKey>
</EventStruct>
</Event>
//接收响应的允许SOAP信包数目,0表示无限制
<MaxEnvelopes>1</MaxEnvelopes>
<CurrentTime>1970-01-01T13:10:02</CurrentTime>
//完成一次inform调用前,尝试次数每次加1
<RetryCount>0</RetryCount>
//CPE设备参数列表
<ParameterList SOAP-ENC:arrayType="cwmp:ParameterValueStruct[10]">
<ParameterValueStruct>
//设备描述信息
<Name>InternetGatewayDevice.DeviceInfo.SpecVersion</Name>
<Value xsi:type="xsd:string">1.0</Value>
</ParameterValueStruct>
<ParameterValueStruct>
//设备的硬件版本信息
<Name>InternetGatewayDevice.DeviceInfo.HardwareVersion</Name>
<Value xsi:type="xsd:string">V1.0</Value>
</ParameterValueStruct>
<ParameterValueStruct>
//设备的软件版本信息
<Name>InternetGatewayDevice.DeviceInfo.SoftwareVersion</Name>
<Value xsi:type="xsd:string">G231M299R1.0.0</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>InternetGatewayDevice.DeviceInfo.ProvisioningCode</Name>
<Value xsi:type="xsd:string">TLCO.GRP2</Value>
</ParameterValueStruct>
<ParameterValueStruct>
//请求连接的URL(设备联系地址)
<Name>InternetGatewayDevice.ManagementServer.ConnectionRequestURL</Name>
<Value xsi:type="xsd:string">http://192.168.65.111:58000</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>InternetGatewayDevice.ManagementServer.ParameterKey</Name>
<Value xsi:type="xsd:any"></Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.1.ExternalIPAddress</Name>
<Value xsi:type=