Chinaunix首页 | 论坛 | 博客
  • 博客访问: 408295
  • 博文数量: 403
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: -70
  • 用 户 组: 普通用户
  • 注册时间: 2016-09-05 12:45
文章分类

全部博文(403)

文章存档

2014年(3)

2013年(1)

2012年(3)

2011年(21)

2010年(13)

2009年(64)

2008年(9)

2007年(36)

2006年(253)

分类: 系统运维

2006-08-02 20:53:27

其实很简单,就是将PPP格式的报文封装在802.3以太网格式中,802.3以太网的格式你应该知道吧,PPP的数据格式:  
   
  一、   PPP的首部:  
  PPP有四种格式的首部,分别用于不同的目的。  
  1、   标准格式:  
  PPP的标准格式为四个字节:  
            0                 1                     2                   3  
  ----------------------------------------  
  |   Address|   Control   |           Protocol             |    
  ----------------------------------------  
  Address   =   0xff  
  Control   =   0x03  
  Protocol=   0xc021   /   0x8021   /   0xc223   /   0xc023   /   0x0021   /   0x002d   /   0x002f   /   0x8207  
  其中Address和Control各占一个字节,Protocol占两个字节,该格式的PPP首部可用于LCP、NCP及认证的协商和传输IP包,压缩的TCP包及未压缩的TCP包,Protocol字段表示的含义见第二部分:PPP协议字段的取值。  
  2、   使用PFC(Protocol   Fields   Compress)的格式:  
  该格式是使用了协议字段压缩的格式,即把两个字节的协议字段压缩成一个字节,所以整个PPP首部只有三个字节:  
              0                         1                     2  
  Address Control Protocol  
  Address   =0xff  
  Control   =   0x03  
  Protocol=0x21   /   0x2d   /   0x2f  
  其中Address、Control和Protocol各占一个字节,该格式的PPP首部只用于传输IP包,压缩的TCP包及未压缩的TCP包。  
  3、   使用ACFC(Address   and   Control   Fields   Compress)的格式:  
  该格式是使用了地址和控制字段压缩的格式,只有协议字段的两个字节:  
            0                         1      
  Protocol  
  Protocol=0x0021   /   0x002d   /   0x002f   /   0x8021  
  该格式的PPP首部可用于传输IP包,压缩的TCP包,未压缩的TCP包和NCP协商报文。  
  4、   同时使用PFC和ACFC的格式:  
  该格式是使用了协议字段压缩及地址和控制字段压缩的格式,只有一个字节:  
              0    
  Protocol  
  Protocol=0x21   /   0x2d   /   0x2f  
  Protocol占一个字节,该格式的PPP首部分只用于传输IP包,压缩的TCP包及未压缩的TCP包。  
  二、   PPP的协议字段的取值(Reference   from   RFC1700):  
  Value   (in   hex)           Protocol   Name  
  0001                         Padding   Protocol  
  0003   to   001f             reserved   (transparency   inefficient)  
  0021                         Internet   Protocol  
  0023                         OSI   Network   Layer  
  0025                         Xerox   NS   IDP  
  0027                         DECnet   Phase   IV  
  0029                         Appletalk  
  002b                         Novell   IPX  
  002d                         Van   Jacobson   Compressed   TCP/IP  
  002f                         Van   Jacobson   Uncompressed   TCP/IP  
  0031                         Bridging   PDU  
  0033                         Stream   Protocol   (ST-II)  
  0035                         Banyan   Vines  
  0037                         reserved   (until   1993)  
  0039                         AppleTalk   EDDP  
  003b                         AppleTalk   SmartBuffered  
  003d                         Multi-Link  
  003f                         NETBIOS   Framing  
  0041                         Cisco   Systems  
  0043                         Ascom   Timeplex  
  0045                         Fujitsu   Link   Backup   and   Load   Balancing   (LBLB)  
  0047                         DCA   Remote   Lan  
  0049                         Serial   Data   Transport   Protocol   (PPP-SDTP)  
  004b                         SNA   over   802.2  
  004d                         SNA  
  004f                         IP6   Header   Compression  
  006f                         Stampede   Bridging  
  00fb                         compression   on   single   link   in   multilink   group  
  00fd                         1st   choice   compression  
  00ff                           reserved   (compression   inefficient)  
  0201                         802.1d   Hello   Packets  
  0203                         IBM   Source   Routing   BPDU  
  0205                         DEC   LANBridge100   Spanning   Tree  
  0231                         Luxcom  
  0233                         Sigma   Network   Systems  
  8021                         Internet   Protocol   Control   Protocol  
  8023                         OSI   Network   Layer   Control   Protocol  
  8025                         Xerox   NS   IDP   Control   Protocol  
  8027                         DECnet   Phase   IV   Control   Protocol  
  8029                         Appletalk   Control   Protocol  
  802b                         Novell   IPX   Control   Protocol  
  8031                         Bridging   NCP  
  8033                         Stream   Protocol   Control   Protocol  
  8035                         Banyan   Vines   Control   Protocol  
  8037                         reserved   till   1993  
  803d                         Multi-Link   Control   Protocol  
  803f                         NETBIOS   Framing   Control   Protocol  
  8041                         Cisco   Systems   Control   Protocol  
  8043                         Ascom   Timeplex  
  8045                         Fujitsu   LBLB   Control   Protocol  
  8047                         DCA   Remote   Lan   Network   Control   Protocol   (RLNCP)  
  8049                         Serial   Data   Control   Protocol   (PPP-SDCP)  
  804b                         SNA   over   802.2   Control   Protocol  
  804d                         SNA   Control   Protocol  
  804f                         IP6   Header   Compression   Control   Protocol  
  006f                         Stampede   Bridging   Control   Protocol  
  80fb                         compression   on   single   link   in   multilink   group   control  
  80fd                         Compression   Control   Protocol  
  c021                         Link   Control   Protocol  
  c023                         Password   Authentication   Protocol  
  c025                         Link   Quality   Report  
  c027                         Shiva   Password   Authentication   Protocol  
  c029                         CallBack   Control   Protocol   (CBCP)  
  c081                         Container   Control   Protocol                                     [KEN]  
  c223                         Challenge   Handshake   Authentication   Protocol  
  c281                         Proprietary   Authentication   Protocol                   [KEN]  
  c26f                         Stampede   Bridging   Authorization   Protocol  
  c481                         Proprietary   Node   ID   Authentication   Protocol   [KEN]  
  (注:保留的或未使用的没有列出)  
阅读(3235) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~