802.1x协议数据包

   
Packet Format---报文的格式
Exactly one Challenge-Handshake Authentication Protocol packet is
encapsulated in the Information field of a PPP Data Link Layer frame
where the protocol field indicates type hex c223 (Challenge-Handshake
Authentication Protocol). A summary of the CHAP packet format is
shown below. The fields are transmitted from left to right.
 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Code | Identifier | Length |Data ...|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
Code
The Code field is one octet and identifies the type of CHAP
packet. CHAP Codes are assigned as follows:
  代码字段至少一个字节,它定义了CHAP数据包的类型.
1 Challenge(request)
2 Response
3 Success
4 Failure
 
Identifier
The Identifier field is one octet and aids in matching challenges,
responses and replies.
Identifier字段也是一个字节,辅助进行request和response的匹配
 
Length
The Length field is two octets and indicates the length of the
CHAP packet including the Code, Identifier, Length and Data
fields. Octets outside the range of the Length field should be
treated as Data Link Layer padding and should be ignored on
reception.
 Length 域为两个字节,表明了EAP 数据包的长度,包括Code, Identifier, Length 以及Data等各域。超出Length 域范围的字节应该视为数据链路层填充(padding),在接收时应该被忽略掉。
The Data field is zero or more octets. The format of the Data
field is determined by the Code field.
  Data 域为0 个或者多个字节,Data 域的格式由Code 的值来决定。
Challenge and Response
  A summary of the Challenge and Response packet format is shown below.
The fields are transmitted from left to right.
 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Code | Identifier | Length |Value-Size | Value ...| Name ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Code
1 for Challenge;
2 for Response.
 
Identifier
The Identifier field is one octet. The Identifier field MUST be changed each time a Challenge is sent.
 
The Response Identifier MUST be copied from the Identifier field of the Challenge which caused the Response.
 
Value-Size
This field is one octet and indicates the length of the Value field.
 
Value
The Value field is one or more octets. The most significant octet is transmitted first.
The Challenge Value is a variable stream of octets. The importance of the uniqueness of the Challenge Value and its relationship to the secret is described above. The Challenge Value MUST be changed each time a Challenge is sent. The length of the Challenge Value depends upon the method used to generate the octets, and is independent of the hash algorithm used.
The Response Value is the one-way hash calculated over a stream of octets consisting of the Identifier, followed by (concatenated with) the "secret", followed by (concatenated with) the Challenge Value. The length of the Response Value depends upon the hash algorithm used (16 octets for MD5).
 
Name
The Name field is one or more octets representing the identification of the system transmitting the packet. There are no limitations on the content of this field. For example, it MAY contain ASCII character strings or globally unique identifiers in ASN.1 syntax. The Name should not be NUL or CR/LF terminated.
The size is determined from the Length field.
 
Success and Failure
  A summary of the Success and Failure packet format is shown below.
The fields are transmitted from left to right.
 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Code | Identifier | Length |Message ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
Code 
3 for Success;
4 for Failure.
 
Identifier
 
The Identifier field is one octet and aids in matching requests and replies. The Identifier field MUST be copied from the Identifier field of the Response which caused this reply.
 
Message
The Message field is zero or more octets, and its contents are implementation dependent. It is intended to be human readable, and MUST NOT affect operation of the protocol. It is recommended that the message contain displayable ASCII characters 32 through 126 decimal. Mechanisms for extension to other character sets are the topic of future research. The size is determined from the Length field.
详细内容见RFC1994....................
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值