导航

RPCMethod perodic Download des_WKS0AB1

Posted on 2017-06-21 17:09  Young哥哥  阅读(196)  评论(0)    收藏  举报

PS: 关于inform信息概述

 

INFORM参数

参数

类型

描述

DeviceID

DeviceIdStruct

Manufactucer,OUI,ProductClass(用于标识产品或者产品类型),SerialNumber

Event

EventStruct

说明引发会话建立的一个或者多个事件

MaxEnvelope

Unsignedint

CPE能够从ACS接受的一个HTTP回复中的最大SOAP信包数目。若为0则说明没有限制

CurrentTime

dateTime

CPE当前日期时间

RetryCount

Unsignedint

在完成对inform方法的调用前,进行进行了多少次调用尝试,在每次非成功的尝试后增加1。非成功的尝试包括发送Inform报文以及与ACS建立连接,或每次对Inform的报文的不成功调用,如:接收到错误应答或没有接收应答。在已经发送了Inform报文并成功得到应答后该值被重置为0

ParameterList

ParameterValueStruct

CPE在Inform请求中包含的参数信息表,每次上报必须包含一些参数:硬件版本、软件版本、ManagementServer.ConnectionRequestURL、CommandKey等

 

 

 

 

 

1、Inform信息:由CPE传送到网管,CPE事件通过绑定Inform信息进行上报;事件的EVENT_CODE有       

         (1)"0 BOOTSTRAP",表示会话发起的原因是CPE首次安装或者是ACS的URL发生变化。网管接收到后要执行注册流程

         (2)"1 BOOT",表示会话发起的原因是CPE通电启动或者是重置,包括系统首次启动,以及任何原因引起的重启,或者是事件"M Reboot"引起的;

         (3)"2 PERIODIC",表示会话发起的原因是因为定时Inform策略引起的。

         (4)"3 SCHEDULED", 表示会话发起的原因是因为CPE定时调用了ScheduleInform方法引起的。该EVENT_CODE必须位于"M ScheduleInform"中。

         (5)"4 VALUE CHANGE",表示会话发起的原因是CPE的一个或者多个参数值发生变化。

         (6)"5 KICKED",表示会话发起的原因是为了Web标识管理(?)

         (7)"6 CONNECTION REQUEST",表示会话发起的原因是源自ACS的Connection Request Notification

          (8)"7 TRANSFER COMPLETE",表示会话发起的原因是上传或者下载成功(不管是否真的成功)

          (9)"8 DIAGNOSTICS COMPLETE",当完成由ACS要求的诊断测试后,重新与ACS建立连接时用

         (10)"9 REQUEST DOWNLOAD",表示会话发起的原因是CPE要求调用RequestDownload方法

         (11) "10 AUTONOMOUS TRANSFER COMPLETE",表示会话发起的原因是由CPE主动的上传或者下载成功,而不是ACS的请求

        (11)"M Reboot", "M ScheduleInform", "M Download","M Upload", 带有“M“字符说明这个是执行ACS请求方法的结果,里面一般含有其它的EVENT_CODE;如:"M Reboot"含有"1 BOOT","M ScheduleInform"含有"3 SCHEDULED"

         (12)"X_CU_ALARM","X_DISCOVER"厂商自定以规范前者表示告警信息,后者表示发现信息

 

协议基本内容参考如下:


Author :Jeffrey

引言                                        

HTTP是一个属于应用层的面向对象的协议,由于其简捷、快速的方式,适用于分布式超媒体信息系统。它于1990年提出,经过几年的使用与发展,得到不断地完善和扩展。目前在WWW中使用的是HTTP/1.0的第六版,HTTP/1.1的规范化工作正在进行之中,而且HTTP-NG(Next Generation of HTTP)的建议已经提出。
HTTP协议的主要特点可概括如下:
1.支持客户/服务器模式。
2.简单快速:客户向服务器请求服务时,只需传送请求方法和路径。请求方法常用的有GET、HEAD、POST。每种方法规定了客户与服务器联系的类型不同。由于HTTP协议简单,使得HTTP服务器的程序规模小,因而通信速度很快。
3.灵活:HTTP允许传输任意类型的数据对象。正在传输的类型由Content-Type加以标记。
4.无连接:无连接的含义是限制每次连接只处理一个请求。服务器处理完客户的请求,并收到客户的应答后,即断开连接。采用这种方式可以节省传输时间。
5.无状态:HTTP协议是无状态协议。无状态是指协议对于事务处理没有记忆能力。缺少状态意味着如果后续处理需要前面的信息,则它必须重传,这样可能导致每次连接传送的数据量增大。另一方面,在服务器不需要先前信息时它的应答就较快。

 

一、HTTP协议详解之URL

    http(超文本传输协议)是一个基于请求与响应模式的、无状态的、应用层的协议,常基于TCP的连接方式,HTTP1.1版本中给出一种持续连接的机制,绝大多数的Web开发,都是构建在HTTP协议之上的Web应用。

HTTP URL (URL是一种特殊类型的URI,包含了用于查找某个资源的足够的信息)的格式如下:
http://host[":"port][abs_path]
http表示要通过HTTP协议来定位网络资源;host表示合法的Internet主机域名或者IP地址;port指定一个端口号,为空则使用缺省端口80;abs_path指定请求资源的URI;如果URL中没有给出abs_path,那么当它作为请求URI时,必须以“/”的形式给出,通常这个工作浏览器自动帮我们完成。
eg:
1、输入:www.guet.edu.cn
浏览器自动转换成:http://www.guet.edu.cn/
2、http:192.168.0.116:8080/index.jsp 

 

二、HTTP协议详解之请求篇

    http请求由三部分组成,分别是:请求行、消息报头、请求正文

1、请求行以一个方法符号开头,以空格分开,后面跟着请求的URI和协议的版本,格式如下:Method Request-URI HTTP-Version CRLF  
其中 Method表示请求方法;Request-URI是一个统一资源标识符;HTTP-Version表示请求的HTTP协议版本;CRLF表示回车和换行(除了作为结尾的CRLF外,不允许出现单独的CR或LF字符)。

请求方法(所有方法全为大写)有多种,各个方法的解释如下:
GET     请求获取Request-URI所标识的资源
POST    在Request-URI所标识的资源后附加新的数据
HEAD    请求获取由Request-URI所标识的资源的响应消息报头
PUT     请求服务器存储一个资源,并用Request-URI作为其标识
DELETE  请求服务器删除Request-URI所标识的资源
TRACE   请求服务器回送收到的请求信息,主要用于测试或诊断
CONNECT 保留将来使用
OPTIONS 请求查询服务器的性能,或者查询与资源相关的选项和需求
应用举例:
GET方法:在浏览器的地址栏中输入网址的方式访问网页时,浏览器采用GET方法向服务器获取资源,eg:GET /form.html HTTP/1.1 (CRLF)

POST方法要求被请求服务器接受附在请求后面的数据,常用于提交表单。
eg:POST /reg.jsp HTTP/ (CRLF)
Accept:image/gif,image/x-xbit,... (CRLF)
...
HOST:www.guet.edu.cn (CRLF)
Content-Length:22 (CRLF)
Connection:Keep-Alive (CRLF)
Cache-Control:no-cache (CRLF)
(CRLF)         //该CRLF表示消息报头已经结束,在此之前为消息报头
user=jeffrey&pwd=1234  //此行以下为提交的数据

HEAD方法与GET方法几乎是一样的,对于HEAD请求的回应部分来说,它的HTTP头部中包含的信息与通过GET请求所得到的信息是相同的。利用这个方法,不必传输整个资源内容,就可以得到Request-URI所标识的资源的信息。该方法常用于测试超链接的有效性,是否可以访问,以及最近是否更新。
2、请求报头后述
3、请求正文(略) 

 

三、HTTP协议详解之响应篇

    在接收和解释请求消息后,服务器返回一个HTTP响应消息。

HTTP响应也是由三个部分组成,分别是:状态行、消息报头、响应正文
1、状态行格式如下:
HTTP-Version Status-Code Reason-Phrase CRLF
其中,HTTP-Version表示服务器HTTP协议的版本;Status-Code表示服务器发回的响应状态代码;Reason-Phrase表示状态代码的文本描述。
状态代码有三位数字组成,第一个数字定义了响应的类别,且有五种可能取值:
1xx:指示信息--表示请求已接收,继续处理
2xx:成功--表示请求已被成功接收、理解、接受
3xx:重定向--要完成请求必须进行更进一步的操作
4xx:客户端错误--请求有语法错误或请求无法实现
5xx:服务器端错误--服务器未能实现合法的请求
常见状态代码、状态描述、说明:
200 OK      //客户端请求成功
400 Bad Request  //客户端请求有语法错误,不能被服务器所理解
401 Unauthorized //请求未经授权,这个状态代码必须和WWW-Authenticate报头域一起使用 
403 Forbidden  //服务器收到请求,但是拒绝提供服务
404 Not Found  //请求资源不存在,eg:输入了错误的URL
500 Internal Server Error //服务器发生不可预期的错误
503 Server Unavailable  //服务器当前不能处理客户端的请求,一段时间后可能恢复正常
eg:HTTP/1.1 200 OK (CRLF)

2、响应报头后述

3、响应正文就是服务器返回的资源的内容 

 

四、HTTP协议详解之消息报头篇

    HTTP消息由客户端到服务器的请求和服务器到客户端的响应组成。请求消息和响应消息都是由开始行(对于请求消息,开始行就是请求行,对于响应消息,开始行就是状态行),消息报头(可选),空行(只有CRLF的行),消息正文(可选)组成。

HTTP消息报头包括普通报头、请求报头、响应报头、实体报头。
每一个报头域都是由名字+“:”+空格+值 组成,消息报头域的名字是大小写无关的。

1、普通报头
在普通报头中,有少数报头域用于所有的请求和响应消息,但并不用于被传输的实体,只用于传输的消息。
eg:
Cache-Control   用于指定缓存指令,缓存指令是单向的(响应中出现的缓存指令在请求中未必会出现),且是独立的(一个消息的缓存指令不会影响另一个消息处理的缓存机制),HTTP1.0使用的类似的报头域为Pragma。
请求时的缓存指令包括:no-cache(用于指示请求或响应消息不能缓存)、no-store、max-age、max-stale、min-fresh、only-if-cached;
响应时的缓存指令包括:public、private、no-cache、no-store、no-transform、must-revalidate、proxy-revalidate、max-age、s-maxage.
eg:为了指示IE浏览器(客户端)不要缓存页面,服务器端的JSP程序可以编写如下:response.sehHeader("Cache-Control","no-cache");
//response.setHeader("Pragma","no-cache");作用相当于上述代码,通常两者//合用
这句代码将在发送的响应消息中设置普通报头域:Cache-Control:no-cache


Date普通报头域表示消息产生的日期和时间

Connection普通报头域允许发送指定连接的选项。例如指定连接是连续,或者指定“close”选项,通知服务器,在响应完成后,关闭连接

2、请求报头
请求报头允许客户端向服务器端传递请求的附加信息以及客户端自身的信息。
常用的请求报头
Accept
Accept请求报头域用于指定客户端接受哪些类型的信息。eg:Accept:image/gif,表明客户端希望接受GIF图象格式的资源;Accept:text/html,表明客户端希望接受html文本。
Accept-Charset
Accept-Charset请求报头域用于指定客户端接受的字符集。eg:Accept-Charset:iso-8859-1,gb2312.如果在请求消息中没有设置这个域,缺省是任何字符集都可以接受。
Accept-Encoding
Accept-Encoding请求报头域类似于Accept,但是它是用于指定可接受的内容编码。eg:Accept-Encoding:gzip.deflate.如果请求消息中没有设置这个域服务器假定客户端对各种内容编码都可以接受。
Accept-Language
Accept-Language请求报头域类似于Accept,但是它是用于指定一种自然语言。eg:Accept-Language:zh-cn.如果请求消息中没有设置这个报头域,服务器假定客户端对各种语言都可以接受。
Authorization
Authorization请求报头域主要用于证明客户端有权查看某个资源。当浏览器访问一个页面时,如果收到服务器的响应代码为401(未授权),可以发送一个包含Authorization请求报头域的请求,要求服务器对其进行验证。
Host(发送请求时,该报头域是必需的)
Host请求报头域主要用于指定被请求资源的Internet主机和端口号,它通常从HTTP URL中提取出来的,eg:
我们在浏览器中输入:http://www.guet.edu.cn/index.html
浏览器发送的请求消息中,就会包含Host请求报头域,如下:
Host:www.guet.edu.cn
此处使用缺省端口号80,若指定了端口号,则变成:Host:www.guet.edu.cn:指定端口号
User-Agent
我们上网登陆论坛的时候,往往会看到一些欢迎信息,其中列出了你的操作系统的名称和版本,你所使用的浏览器的名称和版本,这往往让很多人感到很神奇,实际上,服务器应用程序就是从User-Agent这个请求报头域中获取到这些信息。User-Agent请求报头域允许客户端将它的操作系统、浏览器和其它属性告诉服务器。不过,这个报头域不是必需的,如果我们自己编写一个浏览器,不使用User-Agent请求报头域,那么服务器端就无法得知我们的信息了。
请求报头举例:
GET /form.html HTTP/1.1 (CRLF)
Accept:image/gif,image/x-xbitmap,image/jpeg,application/x-shockwave-flash,application/vnd.ms-excel,application/vnd.ms-powerpoint,application/msword,*/* (CRLF)
Accept-Language:zh-cn (CRLF)
Accept-Encoding:gzip,deflate (CRLF)
If-Modified-Since:Wed,05 Jan 2007 11:21:25 GMT (CRLF)
If-None-Match:W/"80b1a4c018f3c41:8317" (CRLF)
User-Agent:Mozilla/4.0(compatible;MSIE6.0;Windows NT 5.0) (CRLF)
Host:www.guet.edu.cn (CRLF)
Connection:Keep-Alive (CRLF)
(CRLF)

3、响应报头
响应报头允许服务器传递不能放在状态行中的附加响应信息,以及关于服务器的信息和对Request-URI所标识的资源进行下一步访问的信息。
常用的响应报头
Location
Location响应报头域用于重定向接受者到一个新的位置。Location响应报头域常用在更换域名的时候。
Server
Server响应报头域包含了服务器用来处理请求的软件信息。与User-Agent请求报头域是相对应的。下面是
Server响应报头域的一个例子:
Server:Apache-Coyote/1.1
WWW-Authenticate
WWW-Authenticate响应报头域必须被包含在401(未授权的)响应消息中,客户端收到401响应消息时候,并发送Authorization报头域请求服务器对其进行验证时,服务端响应报头就包含该报头域。
eg:WWW-Authenticate:Basic realm="Basic Auth Test!"  //可以看出服务器对请求资源采用的是基本验证机制。


4、实体报头
请求和响应消息都可以传送一个实体。一个实体由实体报头域和实体正文组成,但并不是说实体报头域和实体正文要在一起发送,可以只发送实体报头域。实体报头定义了关于实体正文(eg:有无实体正文)和请求所标识的资源的元信息。
常用的实体报头
Content-Encoding
Content-Encoding实体报头域被用作媒体类型的修饰符,它的值指示了已经被应用到实体正文的附加内容的编码,因而要获得Content-Type报头域中所引用的媒体类型,必须采用相应的解码机制。Content-Encoding这样用于记录文档的压缩方法,eg:Content-Encoding:gzip
Content-Language
Content-Language实体报头域描述了资源所用的自然语言。没有设置该域则认为实体内容将提供给所有的语言阅读
者。eg:Content-Language:da
Content-Length
Content-Length实体报头域用于指明实体正文的长度,以字节方式存储的十进制数字来表示。
Content-Type
Content-Type实体报头域用语指明发送给接收者的实体正文的媒体类型。eg:
Content-Type:text/html;charset=ISO-8859-1
Content-Type:text/html;charset=GB2312
Last-Modified
Last-Modified实体报头域用于指示资源的最后修改日期和时间。
Expires
Expires实体报头域给出响应过期的日期和时间。为了让代理服务器或浏览器在一段时间以后更新缓存中(再次访问曾访问过的页面时,直接从缓存中加载,缩短响应时间和降低服务器负载)的页面,我们可以使用Expires实体报头域指定页面过期的时间。eg:Expires:Thu,15 Sep 2006 16:23:12 GMT
HTTP1.1的客户端和缓存必须将其他非法的日期格式(包括0)看作已经过期。eg:为了让浏览器不要缓存页面,我们也可以利用Expires实体报头域,设置为0,jsp中程序如下:response.setDateHeader("Expires","0");

 

五、利用telnet观察http协议的通讯过程

    实验目的及原理:
    利用MS的telnet工具,通过手动输入http请求信息的方式,向服务器发出请求,服务器接收、解释和接受请求后,会返回一个响应,该响应会在telnet窗口上显示出来,从而从感性上加深对http协议的通讯过程的认识。

    实验步骤:

1、打开telnet
1.1 打开telnet
运行-->cmd-->telnet

1.2 打开telnet回显功能
set localecho

2、连接服务器并发送请求
2.1 open www.guet.edu.cn 80  //注意端口号不能省略

    HEAD /index.asp HTTP/1.0
    Host:www.guet.edu.cn
    
   /*我们可以变换请求方法,请求桂林电子主页内容,输入消息如下*/
    open www.guet.edu.cn 80 
   
    GET /index.asp HTTP/1.0  //请求资源的内容
    Host:www.guet.edu.cn  

2.2 open www.sina.com.cn 80  //在命令提示符号下直接输入telnet www.sina.com.cn 80
    HEAD /index.asp HTTP/1.0
    Host:www.sina.com.cn
 

3 实验结果:

3.1 请求信息2.1得到的响应是:

HTTP/1.1 200 OK                                              //请求成功
Server: Microsoft-IIS/5.0                                    //web服务器
Date: Thu,08 Mar 200707:17:51 GMT
Connection: Keep-Alive                                 
Content-Length: 23330
Content-Type: text/html
Expries: Thu,08 Mar 2007 07:16:51 GMT
Set-Cookie: ASPSESSIONIDQAQBQQQB=BEJCDGKADEDJKLKKAJEOIMMH; path=/
Cache-control: private

//资源内容省略

3.2 请求信息2.2得到的响应是:

HTTP/1.0 404 Not Found       //请求失败
Date: Thu, 08 Mar 2007 07:50:50 GMT
Server: Apache/2.0.54 <Unix>
Last-Modified: Thu, 30 Nov 2006 11:35:41 GMT
ETag: "6277a-415-e7c76980"
Accept-Ranges: bytes
X-Powered-By: mod_xlayout_jh/0.0.1vhs.markII.remix
Vary: Accept-Encoding
Content-Type: text/html
X-Cache: MISS from zjm152-78.sina.com.cn
Via: 1.0 zjm152-78.sina.com.cn:80<squid/2.6.STABLES-20061207>
X-Cache: MISS from th-143.sina.com.cn
Connection: close


失去了跟主机的连接

按任意键继续...

4 .注意事项:1、出现输入错误,则请求不会成功。
          2、报头域不分大小写。
          3、更深一步了解HTTP协议,可以查看RFC2616,在http://www.letf.org/rfc上找到该文件。
          4、开发后台程序必须掌握http协议

六、HTTP协议相关技术补充

    1、基础:
    高层协议有:文件传输协议FTP、电子邮件传输协议SMTP、域名系统服务DNS、网络新闻传输协议NNTP和HTTP协议等
中介由三种:代理(Proxy)、网关(Gateway)和通道(Tunnel),一个代理根据URI的绝对格式来接受请求,重写全部或部分消息,通过 URI的标识把已格式化过的请求发送到服务器。网关是一个接收代理,作为一些其它服务器的上层,并且如果必须的话,可以把请求翻译给下层的服务器协议。一 个通道作为不改变消息的两个连接之间的中继点。当通讯需要通过一个中介(例如:防火墙等)或者是中介不能识别消息的内容时,通道经常被使用。
     代理(Proxy):一个中间程序,它可以充当一个服务器,也可以充当一个客户机,为其它客户机建立请求。请求是通过可能的翻译在内部或经过传递到其它的 服务器中。一个代理在发送请求信息之前,必须解释并且如果可能重写它。代理经常作为通过防火墙的客户机端的门户,代理还可以作为一个帮助应用来通过协议处 理没有被用户代理完成的请求。
网关(Gateway):一个作为其它服务器中间媒介的服务器。与代理不同的是,网关接受请求就好象对被请求的资源来说它就是源服务器;发出请求的客户机并没有意识到它在同网关打交道。
网关经常作为通过防火墙的服务器端的门户,网关还可以作为一个协议翻译器以便存取那些存储在非HTTP系统中的资源。
    通道(Tunnel):是作为两个连接中继的中介程序。一旦激活,通道便被认为不属于HTTP通讯,尽管通道可能是被一个HTTP请求初始化的。当被中继 的连接两端关闭时,通道便消失。当一个门户(Portal)必须存在或中介(Intermediary)不能解释中继的通讯时通道被经常使用。

2、协议分析的优势—HTTP分析器检测网络攻击
以模块化的方式对高层协议进行分析处理,将是未来入侵检测的方向。
HTTP及其代理的常用端口80、3128和8080在network部分用port标签进行了规定

3、HTTP协议Content Lenth限制漏洞导致拒绝服务攻击
使用POST方法时,可以设置ContentLenth来定义需要传送的数据长度,例如ContentLenth:999999999,在传送完成前,内 存不会释放,攻击者可以利用这个缺陷,连续向WEB服务器发送垃圾数据直至WEB服务器内存耗尽。这种攻击方法基本不会留下痕迹。
http://www.cnpaf.net/Class/HTTP/0532918532667330.html

4、利用HTTP协议的特性进行拒绝服务攻击的一些构思
服务器端忙于处理攻击者伪造的TCP连接请求而无暇理睬客户的正常请求(毕竟客户端的正常请求比率非常之小),此时从正常客户的角度看来,服务器失去响应,这种情况我们称作:服务器端受到了SYNFlood攻击(SYN洪水攻击)。
而Smurf、TearDrop等是利用ICMP报文来Flood和IP碎片攻击的。本文用“正常连接”的方法来产生拒绝服务攻击。
19端口在早期已经有人用来做Chargen攻击了,即Chargen_Denial_of_Service,但是!他们用的方法是在两台Chargen 服务器之间产生UDP连接,让服务器处理过多信息而DOWN掉,那么,干掉一台WEB服务器的条件就必须有2个:1.有Chargen服务2.有HTTP 服务
方法:攻击者伪造源IP给N台Chargen发送连接请求(Connect),Chargen接收到连接后就会返回每秒72字节的字符流(实际上根据网络实际情况,这个速度更快)给服务器。

5、Http指纹识别技术
   Http指纹识别的原理大致上也是相同的:记录不同服务器对Http协议执行中的微小差别进行识别.Http指纹识别比TCP/IP堆栈指纹识别复杂许 多,理由是定制Http服务器的配置文件、增加插件或组件使得更改Http的响应信息变的很容易,这样使得识别变的困难;然而定制TCP/IP堆栈的行为 需要对核心层进行修改,所以就容易识别.
      要让服务器返回不同的Banner信息的设置是很简单的,象Apache这样的开放源代码的Http服务器,用户可以在源代码里修改Banner信息,然 后重起Http服务就生效了;对于没有公开源代码的Http服务器比如微软的IIS或者是Netscape,可以在存放Banner信息的Dll文件中修 改,相关的文章有讨论的,这里不再赘述,当然这样的修改的效果还是不错的.另外一种模糊Banner信息的方法是使用插件。
常用测试请求:
1:HEAD/Http/1.0发送基本的Http请求
2:DELETE/Http/1.0发送那些不被允许的请求,比如Delete请求
3:GET/Http/3.0发送一个非法版本的Http协议请求
4:GET/JUNK/1.0发送一个不正确规格的Http协议请求
Http指纹识别工具Httprint,它通过运用统计学原理,组合模糊的逻辑学技术,能很有效的确定Http服务器的类型.它可以被用来收集和分析不同Http服务器产生的签名。

6、其他:为了提高用户使用浏览器时的性能,现代浏览器还支持并发的访问方式,浏览一个网页时同时建立多个连接,以迅速获得一个网页上的多个图标,这样能更快速完成整个网页的传输。
HTTP1.1中提供了这种持续连接的方式,而下一代HTTP协议:HTTP-NG更增加了有关会话控制、丰富的内容协商等方式的支持,来提供
更高效率的连接。

 

感谢冯·诺依曼先生.是他整出了世界上的第一台计算机,才使得我们这些后人鸟枪换炮,由“剪刀加糨糊”的“学术土匪”晋级为“鼠标加剪贴板”的“学术海盗”.
感谢负责答辩的老师.在我也不明白所写为何物的情况下,他们只问了我两个问题——都知道写的什么吗?知道;参考文献都看了么?看了.之后便让我通过了答辩.他们是如此和蔼可亲的老师,他们是如此善解人意的老师,他们是如此平易近人而又伟大的老师.

 

设备第一次注册上线

POST /comserver/node1/tr069 HTTP/1.1

Host: 172.31.50.211:9000

User-Agent: TR069 Client 1.0

Content-Type: text/xml; charset=utf-8

SOAPAction: Inform

Transfer-Encoding: chunked

 

1b7

<?xml version='1.0' encoding='UTF-8'?>

<soap-env:Envelope xmlns:soap-env='http://schemas.xmlsoap.org/soap/envelope/' xmlns:soap-enc='http://schemas.xmlsoap.org/soap/encoding' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:cwmp='urn:dslforum-org:cwmp-1-0'>

<soap-env:Header>

<cwmp:ID soap-env:mustUnderstand='1'>1785452630</cwmp:ID>

</soap-env:Header>

<soap-env:Body>

<cwmp:Inform>

 

a4   携带DeviceID

<DeviceId>

<Manufacturer>Workssys</Manufacturer>

<OUI>09D021</OUI>

<ProductClass>IGD Simulator</ProductClass>

<SerialNumber>000000000012</SerialNumber>

</DeviceId>

 

  1. a9  "1 BOOT",表示会话发起的原因是CPE上电启动或者是重置,包括系统首次启动,以及任何原因引起的重启

 

<Event xsi:type='soap-enc:Array' soap-enc:arrayType='cwmp:EventStruct[1]'>

<EventStruct>

<EventCode>1 BOOT</EventCode>

<CommandKey></CommandKey>

</EventStruct>

</Event>

 

Cb  MaxEnvelopes, CurrentTime, RetryCount, ParameterList

<MaxEnvelopes>1</MaxEnvelopes>

<CurrentTime>2016-06-01T23:39:09-04:00</CurrentTime>

<RetryCount>0</RetryCount>

<ParameterList xsi:type='soap-enc:Array' soap-enc:arrayType='cwmp:ParameterValueStruct[7]'>

 

92

<ParameterValueStruct>

<Name>InternetGatewayDevice.DeviceInfo.SpecVersion</Name>

<Value xsi:type='xsd:string'>1.0</Value>

</ParameterValueStruct>

 

96

<ParameterValueStruct>

<Name>InternetGatewayDevice.DeviceInfo.HardwareVersion</Name>

<Value xsi:type='xsd:string'>3.0</Value>

</ParameterValueStruct>

 

a4

<ParameterValueStruct>

<Name>InternetGatewayDevice.DeviceInfo.SoftwareVersion</Name>

<Value xsi:type='xsd:string'>Rev 1.9.82.342.17</Value>

</ParameterValueStruct>

 

98

<ParameterValueStruct>

<Name>InternetGatewayDevice.DeviceInfo.ProvisioningCode</Name>

<Value xsi:type='xsd:string'>WKSS</Value>

</ParameterValueStruct>

 

ad

<ParameterValueStruct>

<Name>InternetGatewayDevice.ManagementServer.ConnectionRequestURL</Name>

<Value xsi:type='xsd:string'>http://A:10016/</Value>

</ParameterValueStruct>

 

96

<ParameterValueStruct>

<Name>InternetGatewayDevice.ManagementServer.ParameterKey</Name>

<Value xsi:type='xsd:string'></Value>

</ParameterValueStruct>

 

c9

<ParameterValueStruct>

<Name>InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.ExternalIPAddress</Name>

<Value xsi:type='xsd:string'>10.10.6.56</Value>

</ParameterValueStruct>

 

11

</ParameterList>

 

35

</cwmp:Inform>

</soap-env:Body>

</soap-env:Envelope>

 

0

 

2服务器收到客户端的请求后,发现这个资源需要认证信息,判断请求报文中是否带有Authorization头,如果没有,返回一个401(Unauthorized)给客户端。在这个401的回复中,同时服务器会加入一个WWW-Authenticate的头,

HTTP/1.1 401 Unauthorized

Server:

Set-Cookie: JSESSIONID=8CE5C5B7B2F7263AE16FA0F42BFC8F22; Path=/comserver/; HttpOnly

WWW-Authenticate: Digest realm="TR069 Authenticate",qop="auth",nonce="69534964424e4c337141626c746d3269436f796b544b6a696b2f386f45527543336577652b426f496d48593d0d0a",opaque="0a16f1a64d91730c0f38c5d74f7b29cc"

Content-Length: 0

Date: Thu, 02 Jun 2016 03:39:09 GMT

CPE

客户端收到服务器的401(Unauthorized)回复后,使用服务器回复报文中的nonce值,加上usernamepassword, http method, http uri利用MD5(或者服务器指定的其他算法)计算出request-digest,作为repsonse头域的值。并重新(携带inform固有的参数信息进行上报 )发送请求,请求报文中包含Authorization 头

POST /comserver/node1/tr069 HTTP/1.1

Host: 172.31.50.211:9000

User-Agent: TR069 Client 1.0

Content-Type: text/xml; charset=utf-8

Authorization: Digest username="testcpe", realm="TR069 Authenticate", algorithm="MD5", nonce="69534964424e4c337141626c746d3269436f796b544b6a696b2f386f45527543336577652b426f496d48593d0d0a", uri="/comserver/node1/tr069", cnonce="KmbUU0AkGGPOV0h+imrOEofMjXxW6irE", nc=00000001, qop="auth", opaque="0a16f1a64d91730c0f38c5d74f7b29cc", response="99734f7db5ab5110c57e545de096f3d6"

Cookie: $Version=0;JSESSIONID="8CE5C5B7B2F7263AE16FA0F42BFC8F22";$Path="/comserver/"

SOAPAction: Inform

Transfer-Encoding: chunked

 

1b7

<?xml version='1.0' encoding='UTF-8'?>

<soap-env:Envelope xmlns:soap-env='http://schemas.xmlsoap.org/soap/envelope/' xmlns:soap-enc='http://schemas.xmlsoap.org/soap/encoding' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:cwmp='urn:dslforum-org:cwmp-1-0'>

<soap-env:Header>

<cwmp:ID soap-env:mustUnderstand='1'>1785452630</cwmp:ID>

</soap-env:Header>

<soap-env:Body>

<cwmp:Inform>

 

<DeviceId>

<Manufacturer>Workssys</Manufacturer>

<OUI>09D021</OUI>

<ProductClass>IGD Simulator</ProductClass>

<SerialNumber>000000000012</SerialNumber>

</DeviceId>

 

a9

<Event xsi:type='soap-enc:Array' soap-enc:arrayType='cwmp:EventStruct[1]'>

<EventStruct>

<EventCode>1 BOOT</EventCode>

<CommandKey></CommandKey>

</EventStruct>

</Event>

 

cb

<MaxEnvelopes>1</MaxEnvelopes>

<CurrentTime>2016-06-01T23:39:11-04:00</CurrentTime>

<RetryCount>0</RetryCount>

<ParameterList xsi:type='soap-enc:Array' soap-enc:arrayType='cwmp:ParameterValueStruct[7]'>

 

92

<ParameterValueStruct>

<Name>InternetGatewayDevice.DeviceInfo.SpecVersion</Name>

<Value xsi:type='xsd:string'>1.0</Value>

</ParameterValueStruct>

 

96

<ParameterValueStruct>

<Name>InternetGatewayDevice.DeviceInfo.HardwareVersion</Name>

<Value xsi:type='xsd:string'>3.0</Value>

</ParameterValueStruct>

 

a4

<ParameterValueStruct>

<Name>InternetGatewayDevice.DeviceInfo.SoftwareVersion</Name>

<Value xsi:type='xsd:string'>Rev 1.9.82.342.17</Value>

</ParameterValueStruct>

 

98

<ParameterValueStruct>

<Name>InternetGatewayDevice.DeviceInfo.ProvisioningCode</Name>

<Value xsi:type='xsd:string'>WKSS</Value>

</ParameterValueStruct>

 

ad

<ParameterValueStruct>

<Name>InternetGatewayDevice.ManagementServer.ConnectionRequestURL</Name>

<Value xsi:type='xsd:string'>http://A:10016/</Value>

</ParameterValueStruct>

 

96

<ParameterValueStruct>

<Name>InternetGatewayDevice.ManagementServer.ParameterKey</Name>

<Value xsi:type='xsd:string'></Value>

</ParameterValueStruct>

 

c9

<ParameterValueStruct>

<Name>InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.ExternalIPAddress</Name>

<Value xsi:type='xsd:string'>10.10.6.56</Value>

</ParameterValueStruct>

 

11

</ParameterList>

 

35

</cwmp:Inform>

</soap-env:Body>

</soap-env:Envelope>

 

0

服务器收到客户端发来的请求后,根据username,查找出用户的password,用和客户端同样的方法计算出request-digest(response)。然后和收到的request-digest进行对比,如果一致,则验证成功,接受客户端的请求,成功返回结果。

HTTP/1.1 200 OK

Server:

Set-Cookie2: TR069SessionID=B14B23B3B6912A3C9814648387507201;Version=1;Discard

Content-Type: text/xml;charset=ISO-8859-1

Content-Length: 400

Date: Thu, 02 Jun 2016 03:39:10 GMT

 

 

InformResponse 含 响应参数< MaxEnvelopes >

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:cwmp="urn:dslforum-org:cwmp-1-0"><SOAP-ENV:Header><cwmp:ID SOAP-ENV:mustUnderstand="1">1785452630</cwmp:ID></SOAP-ENV:Header><SOAP-ENV:Body><cwmp:InformResponse><MaxEnvelopes>1</MaxEnvelopes></cwmp:InformResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>

 

设备 发送空的信息包到CPE(协议体为空)

POST /comserver/node1/tr069 HTTP/1.1

Host: 172.31.50.211:9000

User-Agent: TR069 Client 1.0

Authorization: Digest username="testcpe", realm="TR069 Authenticate", algorithm="MD5", nonce="69534964424e4c337141626c746d3269436f796b544b6a696b2f386f45527543336577652b426f496d48593d0d0a", uri="/comserver/node1/tr069", cnonce="KmbUU0AkGGPOV0h+imrOEofMjXxW6irE", nc=00000002, qop="auth", opaque="0a16f1a64d91730c0f38c5d74f7b29cc", response="86220186ebcfe86ed2adbf99298ea698"

Cookie: $Version="1";JSESSIONID="8CE5C5B7B2F7263AE16FA0F42BFC8F22";$Path="/comserver/";TR069SessionID="B14B23B3B6912A3C9814648387507201"

Transfer-Encoding: chunked

 

0

 

HTTP/1.1 200 OK

Server:

Set-Cookie2: TR069SessionID=B14B23B3B6912A3C9814648387507201;Version=1;Discard

Content-Type: text/xml;charset=ISO-8859-1

Content-Length: 949

Date: Thu, 02 Jun 2016 03:39:10 GMT

 

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:cwmp="urn:dslforum-org:cwmp-1-0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Header><cwmp:ID SOAP-ENV:mustUnderstand="1">1464838750881_48E4A23255A058F89C14648387508841</cwmp:ID></SOAP-ENV:Header><SOAP-ENV:Body><cwmp:SetParameterValues><ParameterList SOAP-ENV:arrayType="cwmp:ParameterValueStruct[2]"><ParameterValueStruct><Name>InternetGatewayDevice.ManagementServer.ConnectionRequestUsername</Name><Value xsi:type="xsd:string">test</Value></ParameterValueStruct><ParameterValueStruct><Name>InternetGatewayDevice.ManagementServer.ConnectionRequestPassword</Name><Value xsi:type="xsd:string">test</Value></ParameterValueStruct></ParameterList><ParameterKey></ParameterKey></cwmp:SetParameterValues></SOAP-ENV:Body></SOAP-ENV:Envelope>

 

 

POST /comserver/node1/tr069 HTTP/1.1

Host: 172.31.50.211:9000

User-Agent: TR069 Client 1.0

Content-Type: text/xml; charset=utf-8

Authorization: Digest username="testcpe", realm="TR069 Authenticate", algorithm="MD5", nonce="69534964424e4c337141626c746d3269436f796b544b6a696b2f386f45527543336577652b426f496d48593d0d0a", uri="/comserver/node1/tr069", cnonce="KmbUU0AkGGPOV0h+imrOEofMjXxW6irE", nc=00000003, qop="auth", opaque="0a16f1a64d91730c0f38c5d74f7b29cc", response="31e73f9140410269c7b9dfdf4767e03e"

Cookie: $Version="1";JSESSIONID="8CE5C5B7B2F7263AE16FA0F42BFC8F22";$Path="/comserver/";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201"

SOAPAction:

Transfer-Encoding: chunked

 

1ef

<?xml version='1.0' encoding='UTF-8'?>

<soap-env:Envelope xmlns:soap-env='http://schemas.xmlsoap.org/soap/envelope/' xmlns:soap-enc='http://schemas.xmlsoap.org/soap/encoding' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:cwmp='urn:dslforum-org:cwmp-1-0'>

<soap-env:Header>

<cwmp:ID soap-env:mustUnderstand='1'>1464838750881_48E4A23255A058F89C14648387508841</cwmp:ID>

</soap-env:Header>

<soap-env:Body>

<cwmp:SetParameterValuesResponse>

 

13

<Status>1</Status>

 

49

</cwmp:SetParameterValuesResponse>

</soap-env:Body>

</soap-env:Envelope>

 

0

 

HTTP/1.1 200 OK

Server:

Set-Cookie2: TR069SessionID=B14B23B3B6912A3C9814648387507201;Version=1;Discard

Content-Type: text/xml;charset=ISO-8859-1

Content-Length: 623

Date: Thu, 02 Jun 2016 03:39:10 GMT

 

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:cwmp="urn:dslforum-org:cwmp-1-0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Header><cwmp:ID SOAP-ENV:mustUnderstand="1">1464838751103_48E4A23255A058F89C14648387511032</cwmp:ID></SOAP-ENV:Header><SOAP-ENV:Body><cwmp:GetParameterNames><ParameterPath>InternetGatewayDevice.WANDevice.1.WANConnectionDevice.</ParameterPath><NextLevel>true</NextLevel></cwmp:GetParameterNames></SOAP-ENV:Body></SOAP-ENV:Envelope>POST /comserver/node1/tr069 HTTP/1.1

Host: 172.31.50.211:9000

User-Agent: TR069 Client 1.0

Content-Type: text/xml; charset=utf-8

Authorization: Digest username="testcpe", realm="TR069 Authenticate", algorithm="MD5", nonce="69534964424e4c337141626c746d3269436f796b544b6a696b2f386f45527543336577652b426f496d48593d0d0a", uri="/comserver/node1/tr069", cnonce="KmbUU0AkGGPOV0h+imrOEofMjXxW6irE", nc=00000004, qop="auth", opaque="0a16f1a64d91730c0f38c5d74f7b29cc", response="8c1d6eb321b5ee5a62060fe80bf20493"

Cookie: $Version="1";JSESSIONID="8CE5C5B7B2F7263AE16FA0F42BFC8F22";$Path="/comserver/";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201"

SOAPAction:

Transfer-Encoding: chunked

 

1ee

<?xml version='1.0' encoding='UTF-8'?>

<soap-env:Envelope xmlns:soap-env='http://schemas.xmlsoap.org/soap/envelope/' xmlns:soap-enc='http://schemas.xmlsoap.org/soap/encoding' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:cwmp='urn:dslforum-org:cwmp-1-0'>

<soap-env:Header>

<cwmp:ID soap-env:mustUnderstand='1'>1464838751103_48E4A23255A058F89C14648387511032</cwmp:ID>

</soap-env:Header>

<soap-env:Body>

<cwmp:GetParameterNamesResponse>

 

f6

<ParameterList xsi:type='soap-enc:Array' soap-enc:arrayType='cwmp:ParameterInfoStruct[1]'>

<ParameterInfoStruct>

<Name>InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.</Name>

<Writable>1</Writable>

</ParameterInfoStruct>

</ParameterList>

 

48

</cwmp:GetParameterNamesResponse>

</soap-env:Body>

</soap-env:Envelope>

 

0

 

HTTP/1.1 200 OK

Server:

Set-Cookie2: TR069SessionID=B14B23B3B6912A3C9814648387507201;Version=1;Discard

Content-Type: text/xml;charset=ISO-8859-1

Content-Length: 641

Date: Thu, 02 Jun 2016 03:39:10 GMT

 

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:cwmp="urn:dslforum-org:cwmp-1-0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Header><cwmp:ID SOAP-ENV:mustUnderstand="1">1464838751130_48E4A23255A058F89C14648387511303</cwmp:ID></SOAP-ENV:Header><SOAP-ENV:Body><cwmp:GetParameterNames><ParameterPath>InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.</ParameterPath><NextLevel>true</NextLevel></cwmp:GetParameterNames></SOAP-ENV:Body></SOAP-ENV:Envelope>POST /comserver/node1/tr069 HTTP/1.1

Host: 172.31.50.211:9000

User-Agent: TR069 Client 1.0

Content-Type: text/xml; charset=utf-8

Authorization: Digest username="testcpe", realm="TR069 Authenticate", algorithm="MD5", nonce="69534964424e4c337141626c746d3269436f796b544b6a696b2f386f45527543336577652b426f496d48593d0d0a", uri="/comserver/node1/tr069", cnonce="KmbUU0AkGGPOV0h+imrOEofMjXxW6irE", nc=00000005, qop="auth", opaque="0a16f1a64d91730c0f38c5d74f7b29cc", response="6d9888c262e2622e9ff5440f59a1c8c4"

Cookie: $Version="1";JSESSIONID="8CE5C5B7B2F7263AE16FA0F42BFC8F22";$Path="/comserver/";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201"

SOAPAction:

Transfer-Encoding: chunked

 

1ee

<?xml version='1.0' encoding='UTF-8'?>

<soap-env:Envelope xmlns:soap-env='http://schemas.xmlsoap.org/soap/envelope/' xmlns:soap-enc='http://schemas.xmlsoap.org/soap/encoding' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:cwmp='urn:dslforum-org:cwmp-1-0'>

<soap-env:Header>

<cwmp:ID soap-env:mustUnderstand='1'>1464838751130_48E4A23255A058F89C14648387511303</cwmp:ID>

</soap-env:Header>

<soap-env:Body>

<cwmp:GetParameterNamesResponse>

 

108

<ParameterList xsi:type='soap-enc:Array' soap-enc:arrayType='cwmp:ParameterInfoStruct[1]'>

<ParameterInfoStruct>

<Name>InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.1.</Name>

<Writable>1</Writable>

</ParameterInfoStruct>

</ParameterList>

 

48

</cwmp:GetParameterNamesResponse>

</soap-env:Body>

</soap-env:Envelope>

 

0

 

HTTP/1.1 200 OK

Server:

Set-Cookie2: TR069SessionID=B14B23B3B6912A3C9814648387507201;Version=1;Discard

Content-Type: text/xml;charset=ISO-8859-1

Content-Length: 676

Date: Thu, 02 Jun 2016 03:39:10 GMT

 

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:cwmp="urn:dslforum-org:cwmp-1-0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Header><cwmp:ID SOAP-ENV:mustUnderstand="1">1464838751185_48E4A23255A058F89C14648387511854</cwmp:ID></SOAP-ENV:Header><SOAP-ENV:Body><cwmp:GetParameterValues><ParameterNames SOAP-ENV:arrayType="xsd:string[1]"><string>InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.1.Name</string></ParameterNames></cwmp:GetParameterValues></SOAP-ENV:Body></SOAP-ENV:Envelope>POST /comserver/node1/tr069 HTTP/1.1

Host: 172.31.50.211:9000

User-Agent: TR069 Client 1.0

Content-Type: text/xml; charset=utf-8

Authorization: Digest username="testcpe", realm="TR069 Authenticate", algorithm="MD5", nonce="69534964424e4c337141626c746d3269436f796b544b6a696b2f386f45527543336577652b426f496d48593d0d0a", uri="/comserver/node1/tr069", cnonce="KmbUU0AkGGPOV0h+imrOEofMjXxW6irE", nc=00000006, qop="auth", opaque="0a16f1a64d91730c0f38c5d74f7b29cc", response="6572e2e52ddee957bf03c6d4906cc19c"

Cookie: $Version="1";JSESSIONID="8CE5C5B7B2F7263AE16FA0F42BFC8F22";$Path="/comserver/";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201"

SOAPAction:

Transfer-Encoding: chunked

 

1ef

<?xml version='1.0' encoding='UTF-8'?>

<soap-env:Envelope xmlns:soap-env='http://schemas.xmlsoap.org/soap/envelope/' xmlns:soap-enc='http://schemas.xmlsoap.org/soap/encoding' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:cwmp='urn:dslforum-org:cwmp-1-0'>

<soap-env:Header>

<cwmp:ID soap-env:mustUnderstand='1'>1464838751185_48E4A23255A058F89C14648387511854</cwmp:ID>

</soap-env:Header>

<soap-env:Body>

<cwmp:GetParameterValuesResponse>

 

121

<ParameterList xsi:type='soap-enc:Array' soap-enc:arrayType='cwmp:ParameterValueStruct[1]'>

<ParameterValueStruct>

<Name>InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.1.Name</Name>

<Value xsi:type='xsd:string'>123</Value>

</ParameterValueStruct>

</ParameterList>

 

49

</cwmp:GetParameterValuesResponse>

</soap-env:Body>

</soap-env:Envelope>

 

0

 

HTTP/1.1 200 OK

Server:

Set-Cookie2: TR069SessionID=B14B23B3B6912A3C9814648387507201;Version=1;Discard

Content-Type: text/xml;charset=ISO-8859-1

Content-Length: 642

Date: Thu, 02 Jun 2016 03:39:10 GMT

 

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:cwmp="urn:dslforum-org:cwmp-1-0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Header><cwmp:ID SOAP-ENV:mustUnderstand="1">1464838751243_48E4A23255A058F89C14648387512455</cwmp:ID></SOAP-ENV:Header><SOAP-ENV:Body><cwmp:GetParameterNames><ParameterPath>InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.</ParameterPath><NextLevel>true</NextLevel></cwmp:GetParameterNames></SOAP-ENV:Body></SOAP-ENV:Envelope>POST /comserver/node1/tr069 HTTP/1.1

Host: 172.31.50.211:9000

User-Agent: TR069 Client 1.0

Content-Type: text/xml; charset=utf-8

Authorization: Digest username="testcpe", realm="TR069 Authenticate", algorithm="MD5", nonce="69534964424e4c337141626c746d3269436f796b544b6a696b2f386f45527543336577652b426f496d48593d0d0a", uri="/comserver/node1/tr069", cnonce="KmbUU0AkGGPOV0h+imrOEofMjXxW6irE", nc=00000007, qop="auth", opaque="0a16f1a64d91730c0f38c5d74f7b29cc", response="2b0c1be3549f69fa17d976579459cbc8"

Cookie: $Version="1";JSESSIONID="8CE5C5B7B2F7263AE16FA0F42BFC8F22";$Path="/comserver/";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201"

SOAPAction:

Transfer-Encoding: chunked

 

1ee

<?xml version='1.0' encoding='UTF-8'?>

<soap-env:Envelope xmlns:soap-env='http://schemas.xmlsoap.org/soap/envelope/' xmlns:soap-enc='http://schemas.xmlsoap.org/soap/encoding' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:cwmp='urn:dslforum-org:cwmp-1-0'>

<soap-env:Header>

<cwmp:ID soap-env:mustUnderstand='1'>1464838751243_48E4A23255A058F89C14648387512455</cwmp:ID>

</soap-env:Header>

<soap-env:Body>

<cwmp:GetParameterNamesResponse>

 

109

<ParameterList xsi:type='soap-enc:Array' soap-enc:arrayType='cwmp:ParameterInfoStruct[1]'>

<ParameterInfoStruct>

<Name>InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.</Name>

<Writable>1</Writable>

</ParameterInfoStruct>

</ParameterList>

 

48

</cwmp:GetParameterNamesResponse>

</soap-env:Body>

</soap-env:Envelope>

 

0

 

HTTP/1.1 200 OK

Server:

Set-Cookie2: TR069SessionID=B14B23B3B6912A3C9814648387507201;Version=1;Discard

Content-Type: text/xml;charset=ISO-8859-1

Content-Length: 677

Date: Thu, 02 Jun 2016 03:39:10 GMT

 

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:cwmp="urn:dslforum-org:cwmp-1-0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Header><cwmp:ID SOAP-ENV:mustUnderstand="1">1464838751301_48E4A23255A058F89C14648387513016</cwmp:ID></SOAP-ENV:Header><SOAP-ENV:Body><cwmp:GetParameterValues><ParameterNames SOAP-ENV:arrayType="xsd:string[1]"><string>InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Name</string></ParameterNames></cwmp:GetParameterValues></SOAP-ENV:Body></SOAP-ENV:Envelope>POST /comserver/node1/tr069 HTTP/1.1

Host: 172.31.50.211:9000

User-Agent: TR069 Client 1.0

Content-Type: text/xml; charset=utf-8

Authorization: Digest username="testcpe", realm="TR069 Authenticate", algorithm="MD5", nonce="69534964424e4c337141626c746d3269436f796b544b6a696b2f386f45527543336577652b426f496d48593d0d0a", uri="/comserver/node1/tr069", cnonce="KmbUU0AkGGPOV0h+imrOEofMjXxW6irE", nc=00000008, qop="auth", opaque="0a16f1a64d91730c0f38c5d74f7b29cc", response="e8fde41fd8183c475c2186aeea8cf351"

Cookie: $Version="1";JSESSIONID="8CE5C5B7B2F7263AE16FA0F42BFC8F22";$Path="/comserver/";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201"

SOAPAction:

Transfer-Encoding: chunked

 

1ef

<?xml version='1.0' encoding='UTF-8'?>

<soap-env:Envelope xmlns:soap-env='http://schemas.xmlsoap.org/soap/envelope/' xmlns:soap-enc='http://schemas.xmlsoap.org/soap/encoding' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:cwmp='urn:dslforum-org:cwmp-1-0'>

<soap-env:Header>

<cwmp:ID soap-env:mustUnderstand='1'>1464838751301_48E4A23255A058F89C14648387513016</cwmp:ID>

</soap-env:Header>

<soap-env:Body>

<cwmp:GetParameterValuesResponse>

 

121

<ParameterList xsi:type='soap-enc:Array' soap-enc:arrayType='cwmp:ParameterValueStruct[1]'>

<ParameterValueStruct>

<Name>InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Name</Name>

<Value xsi:type='xsd:string'>aa</Value>

</ParameterValueStruct>

</ParameterList>

 

49

</cwmp:GetParameterValuesResponse>

</soap-env:Body>

</soap-env:Envelope>

 

0

 

HTTP/1.1 200 OK

Server:

Set-Cookie2: TR069SessionID=B14B23B3B6912A3C9814648387507201;Version=1;Discard

Content-Type: text/xml;charset=ISO-8859-1

Content-Length: 689

Date: Thu, 02 Jun 2016 03:39:10 GMT

 

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:cwmp="urn:dslforum-org:cwmp-1-0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Header><cwmp:ID SOAP-ENV:mustUnderstand="1">1464838751353_48E4A23255A058F89C14648387513537</cwmp:ID></SOAP-ENV:Header><SOAP-ENV:Body><cwmp:GetParameterValues><ParameterNames SOAP-ENV:arrayType="xsd:string[1]"><string>InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANDSLLinkConfig.DestinationAddress</string></ParameterNames></cwmp:GetParameterValues></SOAP-ENV:Body></SOAP-ENV:Envelope>POST /comserver/node1/tr069 HTTP/1.1

Host: 172.31.50.211:9000

User-Agent: TR069 Client 1.0

Content-Type: text/xml; charset=utf-8

Authorization: Digest username="testcpe", realm="TR069 Authenticate", algorithm="MD5", nonce="69534964424e4c337141626c746d3269436f796b544b6a696b2f386f45527543336577652b426f496d48593d0d0a", uri="/comserver/node1/tr069", cnonce="KmbUU0AkGGPOV0h+imrOEofMjXxW6irE", nc=00000009, qop="auth", opaque="0a16f1a64d91730c0f38c5d74f7b29cc", response="0fd8634505db3d2b905a41c2a39a908a"

Cookie: $Version="1";JSESSIONID="8CE5C5B7B2F7263AE16FA0F42BFC8F22";$Path="/comserver/";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201"

SOAPAction:

Transfer-Encoding: chunked

 

1ef

<?xml version='1.0' encoding='UTF-8'?>

<soap-env:Envelope xmlns:soap-env='http://schemas.xmlsoap.org/soap/envelope/' xmlns:soap-enc='http://schemas.xmlsoap.org/soap/encoding' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:cwmp='urn:dslforum-org:cwmp-1-0'>

<soap-env:Header>

<cwmp:ID soap-env:mustUnderstand='1'>1464838751353_48E4A23255A058F89C14648387513537</cwmp:ID>

</soap-env:Header>

<soap-env:Body>

<cwmp:GetParameterValuesResponse>

 

136

<ParameterList xsi:type='soap-enc:Array' soap-enc:arrayType='cwmp:ParameterValueStruct[1]'>

<ParameterValueStruct>

<Name>InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANDSLLinkConfig.DestinationAddress</Name>

<Value xsi:type='xsd:string'>172.31.0.77</Value>

</ParameterValueStruct>

</ParameterList>

 

49

</cwmp:GetParameterValuesResponse>

</soap-env:Body>

</soap-env:Envelope>

 

0

 

HTTP/1.1 200 OK

Server:

Set-Cookie2: TR069SessionID=B14B23B3B6912A3C9814648387507201;Version=1;Discard

Content-Type: text/xml;charset=ISO-8859-1

Content-Length: 789

Date: Thu, 02 Jun 2016 03:39:10 GMT

 

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:cwmp="urn:dslforum-org:cwmp-1-0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Header><cwmp:ID SOAP-ENV:mustUnderstand="1">1464838751410_48E4A23255A058F89C14648387514108</cwmp:ID></SOAP-ENV:Header><SOAP-ENV:Body><cwmp:GetParameterValues><ParameterNames SOAP-ENV:arrayType="xsd:string[2]"><string>InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.MACAddress</string><string>InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.DefaultGateway</string></ParameterNames></cwmp:GetParameterValues></SOAP-ENV:Body></SOAP-ENV:Envelope>POST /comserver/node1/tr069 HTTP/1.1

Host: 172.31.50.211:9000

User-Agent: TR069 Client 1.0

Content-Type: text/xml; charset=utf-8

Authorization: Digest username="testcpe", realm="TR069 Authenticate", algorithm="MD5", nonce="69534964424e4c337141626c746d3269436f796b544b6a696b2f386f45527543336577652b426f496d48593d0d0a", uri="/comserver/node1/tr069", cnonce="KmbUU0AkGGPOV0h+imrOEofMjXxW6irE", nc=0000000a, qop="auth", opaque="0a16f1a64d91730c0f38c5d74f7b29cc", response="99da0bb64cf29beb2a57b4de5f6ddb9a"

Cookie: $Version="1";JSESSIONID="8CE5C5B7B2F7263AE16FA0F42BFC8F22";$Path="/comserver/";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201"

SOAPAction:

Transfer-Encoding: chunked

 

1ef

<?xml version='1.0' encoding='UTF-8'?>

<soap-env:Envelope xmlns:soap-env='http://schemas.xmlsoap.org/soap/envelope/' xmlns:soap-enc='http://schemas.xmlsoap.org/soap/encoding' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:cwmp='urn:dslforum-org:cwmp-1-0'>

<soap-env:Header>

<cwmp:ID soap-env:mustUnderstand='1'>1464838751410_48E4A23255A058F89C14648387514108</cwmp:ID>

</soap-env:Header>

<soap-env:Body>

<cwmp:GetParameterValuesResponse>

 

121

<ParameterList xsi:type='soap-enc:Array' soap-enc:arrayType='cwmp:ParameterValueStruct[2]'>

<ParameterValueStruct>

<Name>InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.DefaultGateway</Name>

<Value xsi:type='xsd:string'>10.10.0.1</Value>

</ParameterValueStruct>

 

d5

<ParameterValueStruct>

<Name>InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.MACAddress</Name>

<Value xsi:type='xsd:string'>000000000009</Value>

</ParameterValueStruct>

</ParameterList>

 

49

</cwmp:GetParameterValuesResponse>

</soap-env:Body>

</soap-env:Envelope>

 

0

 

HTTP/1.1 200 OK

Server:

Set-Cookie2: TR069SessionID=B14B23B3B6912A3C9814648387507201;Version=1;Discard

Content-Type: text/xml;charset=ISO-8859-1

Content-Length: 771

Date: Thu, 02 Jun 2016 03:39:10 GMT

 

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:cwmp="urn:dslforum-org:cwmp-1-0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Header><cwmp:ID SOAP-ENV:mustUnderstand="1">1464838751472_48E4A23255A058F89C14648387514729</cwmp:ID></SOAP-ENV:Header><SOAP-ENV:Body><cwmp:SetParameterValues><ParameterList SOAP-ENV:arrayType="cwmp:ParameterValueStruct[1]"><ParameterValueStruct><Name>InternetGatewayDevice.DeviceInfo.ProvisioningCode</Name><Value xsi:type="xsd:string">WKSS</Value></ParameterValueStruct></ParameterList><ParameterKey></ParameterKey></cwmp:SetParameterValues></SOAP-ENV:Body></SOAP-ENV:Envelope>POST /comserver/node1/tr069 HTTP/1.1

Host: 172.31.50.211:9000

User-Agent: TR069 Client 1.0

Content-Type: text/xml; charset=utf-8

Authorization: Digest username="testcpe", realm="TR069 Authenticate", algorithm="MD5", nonce="69534964424e4c337141626c746d3269436f796b544b6a696b2f386f45527543336577652b426f496d48593d0d0a", uri="/comserver/node1/tr069", cnonce="KmbUU0AkGGPOV0h+imrOEofMjXxW6irE", nc=0000000b, qop="auth", opaque="0a16f1a64d91730c0f38c5d74f7b29cc", response="5286f054ade4781a32932fc8e5aae72c"

Cookie: $Version="1";JSESSIONID="8CE5C5B7B2F7263AE16FA0F42BFC8F22";$Path="/comserver/";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201"

SOAPAction:

Transfer-Encoding: chunked

 

1ef

<?xml version='1.0' encoding='UTF-8'?>

<soap-env:Envelope xmlns:soap-env='http://schemas.xmlsoap.org/soap/envelope/' xmlns:soap-enc='http://schemas.xmlsoap.org/soap/encoding' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:cwmp='urn:dslforum-org:cwmp-1-0'>

<soap-env:Header>

<cwmp:ID soap-env:mustUnderstand='1'>1464838751472_48E4A23255A058F89C14648387514729</cwmp:ID>

</soap-env:Header>

<soap-env:Body>

<cwmp:SetParameterValuesResponse>

 

13

<Status>1</Status>

 

49

</cwmp:SetParameterValuesResponse>

</soap-env:Body>

</soap-env:Envelope>

 

0

 

HTTP/1.1 200 OK

Server:

Set-Cookie2: TR069SessionID=B14B23B3B6912A3C9814648387507201;Version=1;Discard

Content-Type: text/xml;charset=ISO-8859-1

Content-Length: 495

Date: Thu, 02 Jun 2016 03:39:13 GMT

 

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:cwmp="urn:dslforum-org:cwmp-1-0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Header><cwmp:ID SOAP-ENV:mustUnderstand="1">1464838753081_48E4A23255A058F89C146483875308110</cwmp:ID></SOAP-ENV:Header><SOAP-ENV:Body><cwmp:GetRPCMethods></cwmp:GetRPCMethods></SOAP-ENV:Body></SOAP-ENV:Envelope>POST /comserver/node1/tr069 HTTP/1.1

Host: 172.31.50.211:9000

User-Agent: TR069 Client 1.0

Content-Type: text/xml; charset=utf-8

Authorization: Digest username="testcpe", realm="TR069 Authenticate", algorithm="MD5", nonce="69534964424e4c337141626c746d3269436f796b544b6a696b2f386f45527543336577652b426f496d48593d0d0a", uri="/comserver/node1/tr069", cnonce="KmbUU0AkGGPOV0h+imrOEofMjXxW6irE", nc=0000000c, qop="auth", opaque="0a16f1a64d91730c0f38c5d74f7b29cc", response="bdc908b929ab42da4797a1a87a006de0"

Cookie: $Version="1";JSESSIONID="8CE5C5B7B2F7263AE16FA0F42BFC8F22";$Path="/comserver/";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201";TR069SessionID="B14B23B3B6912A3C9814648387507201"

SOAPAction:

Transfer-Encoding: chunked

 

1eb

<?xml version='1.0' encoding='UTF-8'?>

<soap-env:Envelope xmlns:soap-env='http://schemas.xmlsoap.org/soap/envelope/' xmlns:soap-enc='http://schemas.xmlsoap.org/soap/encoding' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:cwmp='urn:dslforum-org:cwmp-1-0'>

<soap-env:Header>

<cwmp:ID soap-env:mustUnderstand='1'>1464838753081_48E4A23255A058F89C146483875308110</cwmp:ID>

</soap-env:Header>

<soap-env:Body>

<cwmp:GetRPCMethodsResponse>

 

29e

<MethodList xsi:type='soap-enc:Array' soap-enc:arrayType='cwmp:string[17]'>

<string>Upload</string>

<string>Download</string>

<string>GetQueuedTransfers</string>

<string>GetAllQueuedTransfers</string>

<string>DeleteObject</string>

<string>AddObject</string>

<string>X_WKS_SetParameterValuesCrypt</string>

<string>SetParameterValues</string>

<string>SetParameterAttributes</string>

<string>GetParameterAttributes</string>

<string>X_WKS_GetParameterValuesCrypt</string>

<string>GetParameterValues</string>

<string>GetParameterNames</string>

<string>FactoryReset</string>

<string>Reboot</string>

<string>ScheduleInform</string>

<string>GetRPCMethods</string>

</MethodList>

 

44

</cwmp:GetRPCMethodsResponse>

</soap-env:Body>

</soap-env:Envelope>

 

0

 

HTTP/1.1 204 No Content

Server:

Set-Cookie2: TR069SessionID=B14B23B3B6912A3C9814648387507201;Version=1;Discard

Content-Type: text/xml;charset=ISO-8859-1

Date: Thu, 02 Jun 2016 03:39:13 GMT

 

//

 

 

 

 Tr.xml中配置文件如下 

 

 

oneMS系统中创建的升级固件脚本

 

第一次创建启动设备:
状态显示:

 

修改创建的设备所属域

 

 

设别应用固件脚本

设备状态显示

接着执行设备重启:

任务历史中查看结果”

 

 

Wireshark







F/W Upgrade

Here shows the transactions of download between ACS and CPE:



 

解析包图解

 

 

请求认证,inform 上报参数配置

时序图序号1

Step 1                                          The Device sends inform, which includes EventCode CONNECTIONREQUST.

 

POST /comserver/node1/tr069 HTTP/1.1

Host: 172.31.50.211:9000

User-Agent: TR069 Client 1.0

Content-Type: text/xml; charset=utf-8

SOAPAction: Inform

Transfer-Encoding: chunked

 

1b6

<?xml version='1.0' encoding='UTF-8'?>

<soap-env:Envelope xmlns:soap-env='http://schemas.xmlsoap.org/soap/envelope/' xmlns:soap-enc='http://schemas.xmlsoap.org/soap/encoding' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:cwmp='urn:dslforum-org:cwmp-1-0'>

<soap-env:Header>

<cwmp:ID soap-env:mustUnderstand='1'>123405057</cwmp:ID>

</soap-env:Header>

<soap-env:Body>

<cwmp:Inform>

 

a4

<DeviceId>

<Manufacturer>Workssys</Manufacturer>

<OUI>09D021</OUI>

<ProductClass>IGD Simulator</ProductClass>

<SerialNumber>000000000012</SerialNumber>

</DeviceId>

 

a9

<Event xsi:type='soap-enc:Array' soap-enc:arrayType='cwmp:EventStruct[1]'>

<EventStruct>

<EventCode>1 BOOT</EventCode>

<CommandKey></CommandKey>

</EventStruct>

</Event>

               Ps: (事件代码是由于第一加电重置引起的链接3) 

 

cb

<MaxEnvelopes>1</MaxEnvelopes>

<CurrentTime>2016-06-02T21:35:05-04:00</CurrentTime>

<RetryCount>0</RetryCount>

<ParameterList xsi:type='soap-enc:Array' soap-enc:arrayType='cwmp:ParameterValueStruct[7]'>

 

92

<ParameterValueStruct>

<Name>InternetGatewayDevice.DeviceInfo.SpecVersion</Name>

<Value xsi:type='xsd:string'>1.0</Value>

</ParameterValueStruct>

 

96

<ParameterValueStruct>

<Name>InternetGatewayDevice.DeviceInfo.HardwareVersion</Name>

<Value xsi:type='xsd:string'>3.0</Value>

</ParameterValueStruct>

 

a4

<ParameterValueStruct>

<Name>InternetGatewayDevice.DeviceInfo.SoftwareVersion</Name>

<Value xsi:type='xsd:string'>Rev 1.9.82.342.17</Value>

</ParameterValueStruct>

 

98

<ParameterValueStruct>

<Name>InternetGatewayDevice.DeviceInfo.ProvisioningCode</Name>

<Value xsi:type='xsd:string'>WKSS</Value>

</ParameterValueStruct>

 

ad

<ParameterValueStruct>

<Name>InternetGatewayDevice.ManagementServer.ConnectionRequestURL</Name>

<Value xsi:type='xsd:string'>http://A:10016/</Value>

</ParameterValueStruct>

 

96

<ParameterValueStruct>

<Name>InternetGatewayDevice.ManagementServer.ParameterKey</Name>

<Value xsi:type='xsd:string'></Value>

</ParameterValueStruct>

 

c9

<ParameterValueStruct>

<Name>InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.ExternalIPAddress</Name>

<Value xsi:type='xsd:string'>10.10.6.56</Value>

</ParameterValueStruct>

 

11

</ParameterList>

 

35

</cwmp:Inform>

</soap-env:Body>

</soap-env:Envelope>

 

0    时序图  虚线2(认证部分)

 

HTTP/1.1 401 Unauthorized

Server:

Set-Cookie: JSESSIONID=9B1F727C08797E512AA3EE28B3DC44FC; Path=/comserver/; HttpOnly

WWW-Authenticate: Digest realm="TR069 Authenticate",qop="auth",nonce="69534964424e4c337141626c746d3269436f796b544b5a495536565635584d4b424541685a5749476f454d3d0d0a",opaque="103a07a6deb2a35dc4d7dd9483195db8"

Content-Length: 0

Date: Fri, 03 Jun 2016 01:35:04 GMT

  时序图 步骤实线二  (携带认证信息发起新一轮的链接)

POST /comserver/node1/tr069 HTTP/1.1

Host: 172.31.50.211:9000

User-Agent: TR069 Client 1.0

Content-Type: text/xml; charset=utf-8

Authorization: Digest username="testcpe", realm="TR069 Authenticate", algorithm="MD5", nonce="69534964424e4c337141626c746d3269436f796b544b5a495536565635584d4b424541685a5749476f454d3d0d0a", uri="/comserver/node1/tr069", cnonce="BEjM5tOFyTUdB6vLa6zg/PfEknCBCOKE", nc=00000001, qop="auth", opaque="103a07a6deb2a35dc4d7dd9483195db8", response="4890f43922fd40555226935a1ace13b5"

Cookie: $Version=0;JSESSIONID="9B1F727C08797E512AA3EE28B3DC44FC";$Path="/comserver/"

SOAPAction: Inform

Transfer-Encoding: chunked

 

1b6

<?xml version='1.0' encoding='UTF-8'?>

<soap-env:Envelope xmlns:soap-env='http://schemas.xmlsoap.org/soap/envelope/' xmlns:soap-enc='http://schemas.xmlsoap.org/soap/encoding' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:cwmp='urn:dslforum-org:cwmp-1-0'>

<soap-env:Header>

<cwmp:ID soap-env:mustUnderstand='1'>123405057</cwmp:ID>

</soap-env:Header>

<soap-env:Body>

<cwmp:Inform>

 

a4

<DeviceId>

<Manufacturer>Workssys</Manufacturer>

<OUI>09D021</OUI>

<ProductClass>IGD Simulator</ProductClass>

<SerialNumber>000000000012</SerialNumber>

</DeviceId>

 

a9

<Event xsi:type='soap-enc:Array' soap-enc:arrayType='cwmp:EventStruct[1]'>

<EventStruct>

<EventCode>1 BOOT</EventCode>

<CommandKey></CommandKey>

</EventStruct>

</Event>

    Ps(这次链接boot 重启)

cb

<MaxEnvelopes>1</MaxEnvelopes>

<CurrentTime>2016-06-02T21:35:05-04:00</CurrentTime>

<RetryCount>0</RetryCount>

<ParameterList xsi:type='soap-enc:Array' soap-enc:arrayType='cwmp:ParameterValueStruct[7]'>

 

92

<ParameterValueStruct>

<Name>InternetGatewayDevice.DeviceInfo.SpecVersion</Name>

<Value xsi:type='xsd:string'>1.0</Value>

</ParameterValueStruct>

 

96

<ParameterValueStruct>

<Name>InternetGatewayDevice.DeviceInfo.HardwareVersion</Name>

<Value xsi:type='xsd:string'>3.0</Value>

</ParameterValueStruct>

 

a4

<ParameterValueStruct>

<Name>InternetGatewayDevice.DeviceInfo.SoftwareVersion</Name>

<Value xsi:type='xsd:string'>Rev 1.9.82.342.17</Value>

</ParameterValueStruct>

 

98

<ParameterValueStruct>

<Name>InternetGatewayDevice.DeviceInfo.ProvisioningCode</Name>

<Value xsi:type='xsd:string'>WKSS</Value>

</ParameterValueStruct>

 

ad

<ParameterValueStruct>

<Name>InternetGatewayDevice.ManagementServer.ConnectionRequestURL</Name>

<Value xsi:type='xsd:string'>http://A:10016/</Value>

</ParameterValueStruct>

 

96

<ParameterValueStruct>

<Name>InternetGatewayDevice.ManagementServer.ParameterKey</Name>

<Value xsi:type='xsd:string'></Value>

</ParameterValueStruct>

 

c9

<ParameterValueStruct>

<Name>InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.ExternalIPAddress</Name>

<Value xsi:type='xsd:string'>10.10.6.56</Value>

</ParameterValueStruct>

 

11

</ParameterList>

 

35

</cwmp:Inform>

</soap-env:Body>

</soap-env:Envelope>

 

0

Step 2      ACS responses Inform.

 

HTTP/1.1 200 OK

Server:

Set-Cookie2: TR069SessionID=B14B23B3B6912A3C98146491770435339;Version=1;Discard

Content-Type: text/xml;charset=ISO-8859-1

Content-Length: 399

Date: Fri, 03 Jun 2016 01:35:04 GMT

 

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:cwmp="urn:dslforum-org:cwmp-1-0"><SOAP-ENV:Header><cwmp:ID SOAP-ENV:mustUnderstand="1">123405057</cwmp:ID></SOAP-ENV:Header><SOAP-ENV:Body><cwmp:InformResponse><MaxEnvelopes>1</MaxEnvelopes></cwmp:InformRespons

 

 

e></SOAP-ENV:Body></SOAP-ENV:Envelope>

时序图步骤三  第三步

Step  3     The Device sends an empty HTTP Post.

 

POST /comserver/node1/tr069 HTTP/1.1

Host: 172.31.50.211:9000

User-Agent: TR069 Client 1.0

Authorization: Digest username="testcpe", realm="TR069 Authenticate", algorithm="MD5", nonce="69534964424e4c337141626c746d3269436f796b544b5a495536565635584d4b424541685a5749476f454d3d0d0a", uri="/comserver/node1/tr069", cnonce="BEjM5tOFyTUdB6vLa6zg/PfEknCBCOKE", nc=00000002, qop="auth", opaque="103a07a6deb2a35dc4d7dd9483195db8", response="93240ced5c129b40e308ad82c728dffd"

Cookie: $Version="1";JSESSIONID="9B1F727C08797E512AA3EE28B3DC44FC";$Path="/comserver/";TR069SessionID="B14B23B3B6912A3C98146491770435339"

Transfer-Encoding: chunked

 

0    ACS回应 设备  调用了RPC 方法 GetRPCMethod

 

HTTP/1.1 200 OK

Server:

Set-Cookie2: TR069SessionID=B14B23B3B6912A3C98146491770435339;Version=1;Discard

Content-Type: text/xml;charset=ISO-8859-1

Content-Length: 495

Date: Fri, 03 Jun 2016 01:35:04 GMT

 

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:cwmp="urn:dslforum-org:cwmp-1-0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Header><cwmp:ID SOAP-ENV:mustUnderstand="1">1464917704545_48E4A23255A058F89C146491770454527</cwmp:ID></SOAP-ENV:Header><SOAP-ENV:Body><cwmp:GetRPCMethods></cwmp:GetRPCMethods></SOAP-ENV:Body></SOAP-ENV:Envelope>

 

RPC 方法响应

POST /comserver/node1/tr069 HTTP/1.1

Host: 172.31.50.211:9000

User-Agent: TR069 Client 1.0

Content-Type: text/xml; charset=utf-8

Authorization: Digest username="testcpe", realm="TR069 Authenticate", algorithm="MD5", nonce="69534964424e4c337141626c746d3269436f796b544b5a495536565635584d4b424541685a5749476f454d3d0d0a", uri="/comserver/node1/tr069", cnonce="BEjM5tOFyTUdB6vLa6zg/PfEknCBCOKE", nc=00000003, qop="auth", opaque="103a07a6deb2a35dc4d7dd9483195db8", response="12a8cdc7e7dd56cf9f5864f22058e029"

Cookie: $Version="1";JSESSIONID="9B1F727C08797E512AA3EE28B3DC44FC";$Path="/comserver/";TR069SessionID="B14B23B3B6912A3C98146491770435339";TR069SessionID="B14B23B3B6912A3C98146491770435339"

SOAPAction:

Transfer-Encoding: chunked

 

1eb

<?xml version='1.0' encoding='UTF-8'?>

<soap-env:Envelope xmlns:soap-env='http://schemas.xmlsoap.org/soap/envelope/' xmlns:soap-enc='http://schemas.xmlsoap.org/soap/encoding' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:cwmp='urn:dslforum-org:cwmp-1-0'>

<soap-env:Header>

<cwmp:ID soap-env:mustUnderstand='1'>1464917704545_48E4A23255A058F89C146491770454527</cwmp:ID>

</soap-env:Header>

<soap-env:Body>

<cwmp:GetRPCMethodsResponse>

 

29e

<MethodList xsi:type='soap-enc:Array' soap-enc:arrayType='cwmp:string[17]'>

<string>Upload</string>

<string>Download</string>

<string>GetQueuedTransfers</string>

<string>GetAllQueuedTransfers</string>

<string>DeleteObject</string>

<string>AddObject</string>

<string>X_WKS_SetParameterValuesCrypt</string>

<string>SetParameterValues</string>

<string>SetParameterAttributes</string>

<string>GetParameterAttributes</string>

<string>X_WKS_GetParameterValuesCrypt</string>

<string>GetParameterValues</string>

<string>GetParameterNames</string>

<string>FactoryReset</string>

<string>Reboot</string>

<string>ScheduleInform</string>

<string>GetRPCMethods</string>

</MethodList>

 

44

</cwmp:GetRPCMethodsResponse>

</soap-env:Body>

</soap-env:Envelope>

 

0  时序图第四步骤,(序列号4  )ACS 调用Download方法告知设备下载的文件类型,大小 下载地址等信息

 

HTTP/1.1 200 OK

Server:

Set-Cookie2: TR069SessionID=B14B23B3B6912A3C98146491770435339;Version=1;Discard

Content-Type: text/xml;charset=ISO-8859-1

Content-Length: 864

Date: Fri, 03 Jun 2016 01:35:04 GMT

 

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:cwmp="urn:dslforum-org:cwmp-1-0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Header><cwmp:ID SOAP-ENV:mustUnderstand="1">1464917704684_48E4A23255A058F89C146491770468428</cwmp:ID></SOAP-ENV:Header><SOAP-ENV:Body><cwmp:Download><CommandKey>1464917704684_48E4A23255A058F89C</CommandKey><FileType>1 Firmware Upgrade Image</FileType><URL>http://172.31.50.211:8080/tr/fwStore/1464848265799_param.xml</URL><Username>download</Username><Password>download</Password><FileSize>83687</FileSize><TargetFileName></TargetFileName><DelaySeconds>0</DelaySeconds><SuccessURL></SuccessURL><FailureURL></FailureURL></cwmp:Download></SOAP-ENV:Body></SOAP-ENV:Envelope>

 

时序图 5   (步骤5)

设备回应response方法, 其中回应对通知方法的应答,开始下载的时间,下载结束并已经应用时间(下图中用深色标出)

The Device responses DownloadResponse.

POST /comserver/node1/tr069 HTTP/1.1

Host: 172.31.50.211:9000

User-Agent: TR069 Client 1.0

Content-Type: text/xml; charset=utf-8

Authorization: Digest username="testcpe", realm="TR069 Authenticate", algorithm="MD5", nonce="69534964424e4c337141626c746d3269436f796b544b5a495536565635584d4b424541685a5749476f454d3d0d0a", uri="/comserver/node1/tr069", cnonce="BEjM5tOFyTUdB6vLa6zg/PfEknCBCOKE", nc=00000004, qop="auth", opaque="103a07a6deb2a35dc4d7dd9483195db8", response="0be9786d873cc28818ff8ff0985fbf7f"

Cookie: $Version="1";JSESSIONID="9B1F727C08797E512AA3EE28B3DC44FC";$Path="/comserver/";TR069SessionID="B14B23B3B6912A3C98146491770435339";TR069SessionID="B14B23B3B6912A3C98146491770435339";TR069SessionID="B14B23B3B6912A3C98146491770435339"

SOAPAction:

Transfer-Encoding: chunked

 

1e6

<?xml version='1.0' encoding='UTF-8'?>

<soap-env:Envelope xmlns:soap-env='http://schemas.xmlsoap.org/soap/envelope/' xmlns:soap-enc='http://schemas.xmlsoap.org/soap/encoding' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:cwmp='urn:dslforum-org:cwmp-1-0'>

<soap-env:Header>

<cwmp:ID soap-env:mustUnderstand='1'>1464917704684_48E4A23255A058F89C146491770468428</cwmp:ID>

</soap-env:Header>

<soap-env:Body>

<cwmp:DownloadResponse>

 

71

<Status>1</Status>

<StartTime>0001-01-01T00:00:00Z</StartTime>

<CompleteTime>0001-01-01T00:00:00Z</CompleteTime>

Ps:

 

 

3f

</cwmp:DownloadResponse>

</soap-env:Body>

</soap-env:Envelope>

 

0

时序图步骤六

Step 6    ACS sends an empty HTTP Post to end this session.

   ACS回应一个空的消息给设备,结束第一个session

HTTP/1.1 204 No Content

Server:

Set-Cookie2: TR069SessionID=B14B23B3B6912A3C98146491770435339;Version=1;Discard

Content-Type: text/xml;charset=ISO-8859-1

Date: Fri, 03 Jun 2016 01:35:04 GMT

 

\

第二段Session 开始

 

流程图   第七步骤(CPE开始去文件服务器下载文件)

  (下载文件已GET请求发起)

GET /tr/fwStore/1464931524149_codetemplates.xml HTTP/1.1

Host: 172.31.50.211:8080

User-Agent: TR069 Client 1.0

Cache-Control: no-cache

Connection: keep-alive

Content-Length: 0

    (和第一段Session一样都要进行认证)

HTTP/1.1 401 Authorization Required

Date: Fri, 03 Jun 2016 05:26:14 GMT

Server:

WWW-Authenticate: Digest realm="Digest Auth", nonce="2OUg9lg0BQA=45120cfc1356c9a7260473439f78f84d796b986e", algorithm=MD5, qop="auth"

Content-Length: 401

Keep-Alive: timeout=5, max=100

Connection: Keep-Alive

Content-Type: text/html; charset=iso-8859-1

 

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">

<html><head>

<title>401 Authorization Required</title>

</head><body>

<h1>Authorization Required</h1>

<p>This server could not verify that you

are authorized to access the document

requested.  Either you supplied the wrong

credentials (e.g., bad password), or your

browser doesn't understand how to supply

the credentials required.</p>

</body></html>

GET /tr/fwStore/1464931524149_codetemplates.xml HTTP/1.1

Host: 172.31.50.211:8080

User-Agent: TR069 Client 1.0

Cache-Control: no-cache

Connection: keep-alive

Content-Length: 0

Authorization: Digest username="download", realm="Digest Auth", algorithm="MD5", nonce="2OUg9lg0BQA=45120cfc1356c9a7260473439f78f84d796b986e", uri="/tr/fwStore/1464931524149_codetemplates.xml", cnonce="EmvQbRsDb42hi19OJWFTqxQ/PjoRylk2", nc=00000001, qop="auth", response="e919ac7efa43510f7e9492b5d41fcff8"

 

HTTP/1.1 200 OK

Date: Fri, 03 Jun 2016 05:26:14 GMT

Server:

Authentication-Info: rspauth="775c0d374e1b2f41c1dd62016a1582dc", cnonce="EmvQbRsDb42hi19OJWFTqxQ/PjoRylk2", nc=00000001, qop=auth

Last-Modified: Fri, 03 Jun 2016 05:25:24 GMT

ETag: "adf16-1654-53458f31bb900"

Accept-Ranges: bytes

Content-Length: 5716

Keep-Alive: timeout=5, max=99

Connection: Keep-Alive

Content-Type: application/xml

//一下是具体回应下载的内容,仔细对比 就是tr.xml文件的内容被解析获取

<templates>

<template autoinsert="false" context="gettercomment_context" deleted="false" description="Comment for getter method" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name="gettercomment">

/** * getter method * @return the ${bare_field_name} */

</template>

<template autoinsert="false" context="settercomment_context" deleted="false" description="Comment for setter method" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.settercomment" name="settercomment">

/** * setter method * @param ${param} the ${bare_field_name} to set */

</template>

<template autoinsert="false" context="constructorcomment_context" deleted="false" description="Comment for created constructors" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name="constructorcomment">

/** * ................ ${enclosing_type}. * <p>Title: </p> * <p>Description: </p> * ${tags} */

</template>

<template autoinsert="false" context="filecomment_context" deleted="false" description="Comment for created Java files" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.filecomment" name="filecomment">

/** * @Title: ${file_name} * @Package ${package_name} * @Description: ${todo} * Copyright: Copyright (c) 2011 * Company:.................................... * * @author Comsys-${user} * @date ${date} ${time} * @version V1.0 */

</template>

<template autoinsert="false" context="typecomment_context" deleted="false" description="Comment for created types" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.typecomment" name="typecomment">

/** * @ClassName: ${type_name} * @Description: ${todo} * @author Comsys-${user} * @date ${date} ${time} * * ${tags} */

</template>

<template autoinsert="false" context="fieldcomment_context" deleted="false" description="Comment for fields" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name="fieldcomment">

/** * @Fields ${field} : ${todo}................................ */

</template>

<template autoinsert="false" context="methodcomment_context" deleted="false" description="Comment for non-overriding methods" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name="methodcomment">

/** * ${enclosing_method}(..............................) * ${todo}(........................ .C ....) * ${todo}(.......................... .C ....) * ${todo}(.......................... .C ....) * ${todo}(.......................... .C ....) * * @Title: ${enclosing_method} * @Description: ${todo} * @param ${tags} ........ * @return ${return_type} ........ * @throws */

</template>

<template autoinsert="false" context="overridecomment_context" deleted="false" description="Comment for overriding methods" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name="overridecomment">

/* * <p>Title: ${enclosing_method}</p> * <p>Description: </p> * ${tags} * ${see_to_overridden} */

</template>

<template autoinsert="false" context="delegatecomment_context" deleted="false" description="Comment for delegate methods" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name="delegatecomment">/** * ${tags} * ${see_to_target} */</template>

<template autoinsert="true" context="newtype_context" deleted="false" description="Newly created files" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.newtype" name="newtype">

${filecomment} ${package_declaration} ${typecomment} ${type_declaration}

</template> 

<template autoinsert="true" context="classbody_context" deleted="false" description="Code in new class type bodies" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.classbody" name="classbody"></template>

<template autoinsert="true" context="interfacebody_context" deleted="false" description="Code in new interface type bodies" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name="interfacebody"></template>

<template autoinsert="true" context="enumbody_context" deleted="false" description="Code in new enum type bodies" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.enumbody" name="enumbody"></template>

<template autoinsert="true" context="annotationbody_context" deleted="false" description="Code in new annotation type bodies" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name="annotationbody"></template>

<template autoinsert="true" context="catchblock_context" deleted="false" description="Code in new catch blocks" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.catchblock" name="catchblock">

// ${todo} Auto-generated catch block ${exception_var}.printStackTrace();

</template>

<template autoinsert="true" context="methodbody_context" deleted="false" description="Code in created method stubs" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.methodbody" name="methodbody">

// ${todo} Auto-generated method stub ${body_statement}

</template>

<template autoinsert="true" context="constructorbody_context" deleted="false" description="Code in created constructor stubs" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name="constructorbody">

${body_statement} // ${todo} Auto-generated constructor stub

</template>

<template autoinsert="true" context="getterbody_context" deleted="false" description="Code in created getters" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.getterbody" name="getterbody">return ${field};</template>

<template autoinsert="true" context="setterbody_context" deleted="false" description="Code in created setters" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.setterbody" name="setterbody">${field} = ${param};</template>

</templates>

 

第三段Session 开始

看懂一下部分内容,请先知悉部分内容
PS:
TransferComplete arguments

理解概述:

本方法通知服务器由以前的Download或Upload方法调用而引起的文件传输已经结束(不管成功还是失败)。

当相关的Download或Upload应答表明指定的文件传输在当时还没有完成(应答中Status参数非零)时,必须调用本方法。在这种情况下,本方法可以在发起文件传输的会话中调用,也可以在后续的会话中调用。如果使用该方法,则只有在文件传输已经结束(或者已经失败)后才能调用。CPE用来判断何时传输可认作结束的标准由CPE的实现方法自行决定。

 

TransferCompleteResponse arguments:

 

 

 

 

 

23 CPE的错误码

参数

描述

9000

方法不支持

9001

拒绝请求(未说明原因)

9002

内部错误

9003

无效参数

9004

资源超限(当用于SetParameterValues的关联时,它不得用来指示参数错误)

9005

无效参数名(与Set/GetParameterValues,GetParameterNames,Set/GetParameterAttributes相关)

9006

无效参数类型(与SetParameterValues相关)

9007

无效参数值(与SetParameterValues相关)

9008

试图设置不可写的参数(与SetParameterValues相关)

9009

Notification请求被拒(与SetParameterAttributes方法相关)

9010

下载失败(与Download或TransferComplete方法相关)

9011

上载失败(与Upload或TransferComplete方法相关)

9012

文件传输服务器认证失败(与Upload,Download,或TransferComplete方法相关)

9013

文件传输的协议不支持(与Upload和Download方法相关)

9800 – 9899

厂商定义的错误代码

24 ACS错误码

参数

描述

8000

方法不支持

8001

拒绝请求(未指明原因)

8002

内部错误

8003

无效参数

8004

资源超限

8005

重试请求

8800 - 8899

厂商自定义错误代码

 

 Step  8:  In the next session, the device sends inform with EventCode TransferComplete at least

(流程图第八步骤,设备携带事件代码发起新一轮的链接请求)

 

POST /comserver/node1/tr069 HTTP/1.1

Host: 172.31.50.211:9000

User-Agent: TR069 Client 1.0

Content-Type: text/xml; charset=utf-8

SOAPAction: Inform

Transfer-Encoding: chunked

 

1b6

<?xml version='1.0' encoding='UTF-8'?>

<soap-env:Envelope xmlns:soap-env='http://schemas.xmlsoap.org/soap/envelope/' xmlns:soap-enc='http://schemas.xmlsoap.org/soap/encoding' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:cwmp='urn:dslforum-org:cwmp-1-0'>

<soap-env:Header>

<cwmp:ID soap-env:mustUnderstand='1'>128833757</cwmp:ID>

</soap-env:Header>

<soap-env:Body>

<cwmp:Inform>

 

a4

<DeviceId>

<Manufacturer>Workssys</Manufacturer>

<OUI>09D021</OUI>

<ProductClass>IGD Simulator</ProductClass>

<SerialNumber>000000000012</SerialNumber>

</DeviceId>

 

ad

<Event xsi:type='soap-enc:Array' soap-enc:arrayType='cwmp:EventStruct[1]'>

<EventStruct>

<EventCode>2 PERIODIC</EventCode>

<CommandKey></CommandKey>

</EventStruct>

</Event>

("2 PERIODIC",表示会话发起的原因是因为定时Inform策略引起的。)

 

cb

<MaxEnvelopes>1</MaxEnvelopes>

<CurrentTime>2016-06-02T22:49:10-04:00</CurrentTime>

<RetryCount>0</RetryCount>

<ParameterList xsi:type='soap-enc:Array' soap-enc:arrayType='cwmp:ParameterValueStruct[7]'>

 

92

<ParameterValueStruct>

<Name>InternetGatewayDevice.DeviceInfo.SpecVersion</Name>

<Value xsi:type='xsd:string'>1.0</Value>

</ParameterValueStruct>

 

96

<ParameterValueStruct>

<Name>InternetGatewayDevice.DeviceInfo.HardwareVersion</Name>

<Value xsi:type='xsd:string'>3.0</Value>

</ParameterValueStruct>

 

a4

<ParameterValueStruct>

<Name>InternetGatewayDevice.DeviceInfo.SoftwareVersion</Name>

<Value xsi:type='xsd:string'>Rev 1.9.82.342.17</Value>

</ParameterValueStruct>

 

98

<ParameterValueStruct>

<Name>InternetGatewayDevice.DeviceInfo.ProvisioningCode</Name>

<Value xsi:type='xsd:string'>WKSS</Value>

</ParameterValueStruct>

 

ad

<ParameterValueStruct>

<Name>InternetGatewayDevice.ManagementServer.ConnectionRequestURL</Name>

<Value xsi:type='xsd:string'>http://A:10016/</Value>

</ParameterValueStruct>

 

96

<ParameterValueStruct>

<Name>InternetGatewayDevice.ManagementServer.ParameterKey</Name>

<Value xsi:type='xsd:string'></Value>

</ParameterValueStruct>

 

c9

<ParameterValueStruct>

<Name>InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.ExternalIPAddress</Name>

<Value xsi:type='xsd:string'>10.10.6.56</Value>

</ParameterValueStruct>

 

11

</ParameterList>

 

35

</cwmp:Inform>

</soap-env:Body>

</soap-env:Envelope>

 

0

 

HTTP/1.1 401 Unauthorized

Server:

Set-Cookie: JSESSIONID=8E769DF179CFCE73CEED401FEBD71B7E; Path=/comserver/; HttpOnly

WWW-Authenticate: Digest realm="TR069 Authenticate",qop="auth",nonce="69534964424e4c337141626c746d3269436f796b54413261456b573959304f54375a326a7143495a3763493d0d0a",opaque="24f54d9f0bdd797bb2c1b9557368de2f"

Content-Length: 0

Date: Fri, 03 Jun 2016 02:49:09 GMT

  (携带TransferComplete事件代码 建立连接  )

POST /comserver/node1/tr069 HTTP/1.1

Host: 172.31.50.211:9000

User-Agent: TR069 Client 1.0

Content-Type: text/xml; charset=utf-8

Authorization: Digest username="testcpe", realm="TR069 Authenticate", algorithm="MD5", nonce="69534964424e4c337141626c746d3269436f796b54413261456b573959304f54375a326a7143495a3763493d0d0a", uri="/comserver/node1/tr069", cnonce="d6wtHHeDPdevLwEDe4WmpcyoPEroNNhr", nc=00000001, qop="auth", opaque="24f54d9f0bdd797bb2c1b9557368de2f", response="c6a18b4382ef1c1005ddf1a88b50b5a9"

Cookie: $Version=0;JSESSIONID="8E769DF179CFCE73CEED401FEBD71B7E";$Path="/comserver/"

SOAPAction: Inform

Transfer-Encoding: chunked

 

1b6

<?xml version='1.0' encoding='UTF-8'?>

<soap-env:Envelope xmlns:soap-env='http://schemas.xmlsoap.org/soap/envelope/' xmlns:soap-enc='http://schemas.xmlsoap.org/soap/encoding' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:cwmp='urn:dslforum-org:cwmp-1-0'>

<soap-env:Header>

<cwmp:ID soap-env:mustUnderstand='1'>128833757</cwmp:ID>

</soap-env:Header>

<soap-env:Body>

<cwmp:Inform>

 

a4

<DeviceId>

<Manufacturer>Workssys</Manufacturer>

<OUI>09D021</OUI>

<ProductClass>IGD Simulator</ProductClass>

<SerialNumber>000000000012</SerialNumber>

</DeviceId>

 

188

<Event xsi:type='soap-enc:Array' soap-enc:arrayType='cwmp:EventStruct[3]'>

<EventStruct>

<EventCode>2 PERIODIC</EventCode>

<CommandKey></CommandKey>

</EventStruct>

<EventStruct>

<EventCode>7 TRANSFER COMPLETE</EventCode>

<CommandKey></CommandKey>

</EventStruct>

<EventStruct>

<EventCode>M Download</EventCode>

<CommandKey>1464922149048_BF3C937DCE59AE812C</CommandKey>

</EventStruct>

</Event>

"2 PERIODIC",表示会话发起的原因是因为定时Inform策略引起的。

"7 TRANSFER COMPLETE",表示会话发起的原因是上传或者下载成功(不管是否真的成功)

"M Download","M Upload", 带有“M“字符说明这个是执行ACS请求方法的结果

<MaxEnvelopes>1</MaxEnvelopes>

<CurrentTime>2016-06-02T22:49:10-04:00</CurrentTime>

<RetryCount>0</RetryCount>

<ParameterList xsi:type='soap-enc:Array' soap-enc:arrayType='cwmp:ParameterValueStruct[7]'>

 

92

<ParameterValueStruct>

<Name>InternetGatewayDevice.DeviceInfo.SpecVersion</Name>

<Value xsi:type='xsd:string'>1.0</Value>

</ParameterValueStruct>

 

96

<ParameterValueStruct>

<Name>InternetGatewayDevice.DeviceInfo.HardwareVersion</Name>

<Value xsi:type='xsd:string'>3.0</Value>

</ParameterValueStruct>

 

a4

<ParameterValueStruct>

<Name>InternetGatewayDevice.DeviceInfo.SoftwareVersion</Name>

<Value xsi:type='xsd:string'>Rev 1.9.82.342.17</Value>

</ParameterValueStruct>

 

98

<ParameterValueStruct>

<Name>InternetGatewayDevice.DeviceInfo.ProvisioningCode</Name>

<Value xsi:type='xsd:string'>WKSS</Value>

</ParameterValueStruct>

 

ad

<ParameterValueStruct>

<Name>InternetGatewayDevice.ManagementServer.ConnectionRequestURL</Name>

<Value xsi:type='xsd:string'>http://A:10016/</Value>

</ParameterValueStruct>

 

96

<ParameterValueStruct>

<Name>InternetGatewayDevice.ManagementServer.ParameterKey</Name>

<Value xsi:type='xsd:string'></Value>

</ParameterValueStruct>

 

c9

<ParameterValueStruct>

<Name>InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.ExternalIPAddress</Name>

<Value xsi:type='xsd:string'>10.10.6.56</Value>

</ParameterValueStruct>

 

11

</ParameterList>

 

35

</cwmp:Inform>

</soap-env:Body>

</soap-env:Envelope>

 

0

Step 9  ACS sends inform response.

 

HTTP/1.1 200 OK

Server:

Set-Cookie2: TR069SessionID=B9ED99D1E8A4CA162C14649221492192;Version=1;Discard

Content-Type: text/xml;charset=ISO-8859-1

Content-Length: 399

Date: Fri, 03 Jun 2016 02:49:09 GMT

 

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:cwmp="urn:dslforum-org:cwmp-1-0"><SOAP-ENV:Header><cwmp:ID SOAP-ENV:mustUnderstand="1">128833757</cwmp:ID></SOAP-ENV:Header><SOAP-ENV:Body><cwmp:InformResponse><MaxEnvelopes>1</MaxEnvelopes></cwmp:InformResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>

时序图步骤 10

Step 10    Then device sends RPC method TransferComplete.

 

POST /comserver/node1/tr069 HTTP/1.1

Host: 172.31.50.211:9000

User-Agent: TR069 Client 1.0

Content-Type: text/xml; charset=utf-8

Authorization: Digest username="testcpe", realm="TR069 Authenticate", algorithm="MD5", nonce="69534964424e4c337141626c746d3269436f796b54413261456b573959304f54375a326a7143495a3763493d0d0a", uri="/comserver/node1/tr069", cnonce="d6wtHHeDPdevLwEDe4WmpcyoPEroNNhr", nc=00000002, qop="auth", opaque="24f54d9f0bdd797bb2c1b9557368de2f", response="c64bb5af599e29acd59fbd3a9ab3a3fe"

Cookie: $Version="1";JSESSIONID="8E769DF179CFCE73CEED401FEBD71B7E";$Path="/comserver/";TR069SessionID="B9ED99D1E8A4CA162C14649221492192"

SOAPAction: TransferComplete

Transfer-Encoding: chunked

 

1c0

<?xml version='1.0' encoding='UTF-8'?>

<soap-env:Envelope xmlns:soap-env='http://schemas.xmlsoap.org/soap/envelope/' xmlns:soap-enc='http://schemas.xmlsoap.org/soap/encoding' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:cwmp='urn:dslforum-org:cwmp-1-0'>

<soap-env:Header>

<cwmp:ID soap-env:mustUnderstand='1'>128833757</cwmp:ID>

</soap-env:Header>

<soap-env:Body>

<cwmp:TransferComplete>

 

f4

<CommandKey>1464922149048_BF3C937DCE59AE812C</CommandKey>

<FaultStruct>

<FaultCode>0</FaultCode>

<FaultString></FaultString>

</FaultStruct>

<StartTime>2016-06-02T22:49:10-04:00</StartTime>

<CompleteTime>2016-06-02T22:49:10-04:00</CompleteTime>

PS: ( 设别请求 ACS 方法必带字段 

)

 

3f

</cwmp:TransferComplete>

</soap-env:Body>

</soap-env:Envelope>

 

0

Step 11     ACS sends TransferCompleteResponse.

(ACS回应消息给设备,tr069协议我们知道,TransferComplete方法返回值为空,)

 

HTTP/1.1 200 OK

Server:

Set-Cookie2: TR069SessionID=B9ED99D1E8A4CA162C14649221492192;Version=1;Discard

Content-Type: text/xml;charset=ISO-8859-1

Content-Length: 389

Date: Fri, 03 Jun 2016 02:49:09 GMT

 

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:cwmp="urn:dslforum-org:cwmp-1-0"><SOAP-ENV:Header><cwmp:ID SOAP-ENV:mustUnderstand="1">128833757</cwmp:ID></SOAP-ENV:Header><SOAP-ENV:Body><cwmp:TransferCompleteResponse></cwmp:TransferCompleteResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>

 (协议报文为空)

Step12  Device sends an empty HTTP Post to end the session.

Step13  In the next session, the device send inform.

Step 14     ACS sends inform response

            PsL(12.13.14中报文时序图有出入,报文中没有捕获)

Step15      The Device sends an empty HTTP Post.

 (设备发送空的请求到 AC服务器,发现没有请求内容,故结束Session)

 

POST /comserver/node1/tr069 HTTP/1.1

Host: 172.31.50.211:9000

User-Agent: TR069 Client 1.0

Authorization: Digest username="testcpe", realm="TR069 Authenticate", algorithm="MD5", nonce="69534964424e4c337141626c746d3269436f796b54413261456b573959304f54375a326a7143495a3763493d0d0a", uri="/comserver/node1/tr069", cnonce="d6wtHHeDPdevLwEDe4WmpcyoPEroNNhr", nc=00000003, qop="auth", opaque="24f54d9f0bdd797bb2c1b9557368de2f", response="46e0db3c420d4ff8e879ff8e4f827222"

Cookie: $Version="1";JSESSIONID="8E769DF179CFCE73CEED401FEBD71B7E";$Path="/comserver/";TR069SessionID="B9ED99D1E8A4CA162C14649221492192";TR069SessionID="B9ED99D1E8A4CA162C14649221492192"

Transfer-Encoding: chunked

 

0

Step 16        ACS sends an empty HTTP Post to end this session.(至此整个会话结束)

HTTP的状态码有很多种,主要有1xx(临时响应)、2xx(成功)、3xx(已重定向)、4xx(请求错误)以及5xx(服务器错误)五个大类,每个大类还对应一些具体的分类。平时我们接触比较多的是200、400、500等。

Ps: “204” 意思等同于请求执行成功,但是没有数据,浏览器不用刷新页面.也不用导向新的页面。如何理解这段话呢。还是通过例子来说明吧,假设页面上有个form,提交的url为http-204.htm,提交form,正常情况下,页面会跳转到http-204.htm,但是如果http-204.htm的相应的状态码是204,此时页面就不会发生转跳,还是停留在当前页面。另外对于a标签,如果链接的页面响应码为204,页面也不会发生跳转。

所以对于一些提交到服务器处理的数据,只需要返回是否成功的情况下,可以考虑使用状态码204来作为返回信息,从而省掉多余的数据传输。

 

 

HTTP/1.1 204 No Content

Server:

Set-Cookie2: TR069SessionID=B9ED99D1E8A4CA162C14649221492192;Version=1;Discard

Content-Type: text/xml;charset=ISO-8859-1

Date: Fri, 03 Jun 2016 02:49:09 GMT