作者kaeluno1 (峰)
看板Network
标题Re: [问题] 有关PPPoE的问题
时间Wed Jul 15 15:13:37 2009
※ 引述《tw004619 (Victor-PLUS)》之铭言:
: 标题: [问题] 有关PPPoE的问题
: 时间: Tue Jul 14 23:39:30 2009
:
: 小的我要在51的板子上面实作PPPoE的功能
:
:
: 前四个步骤是
: 1.PADI
: 2.PADO
: 3.PADR
: 4.PADS
:
: 目前卡在收不到AC传回来的PADS Frame
: 觉得问题可能是在我PADR里面的栏位放错
: 我在里面的tag放的是
: host-uniq跟AC-Cookie
:
: 请问PADR这个Frame的tag到底应该要放什麽...谢谢.
:
: 还有host-uniq这个 tag的值是由host随机产生就好吗??
:
: 先感谢大大的回覆^^
: 不过我使用桌机的PPPoE连线,然後用wireshark去看,他的host-uniq值在PADI&O是
: 0x30005000
: 不过到PADR 时却递增到0x30006000...
: 我在RFC的规范中也没找到相关的资讯@@
: 大大知道这是怎样吗@@
不好意思,误导了你,在windows上host-uniq的确是会增加的,
先前我用linux测试时值是不变的,
那我查了一下RFC2516,关於host-uniq的描述如下,
0x0103 Host-Uniq
This TAG is used by a Host to uniquely associate an Access
Concentrator response (PADO or PADS) to a particular Host request
(PADI or PADR). The TAG_VALUE is binary data of any value and
length that the Host chooses. It is not interpreted by the Access
Concentrator. The Host MAY include a Host-Uniq TAG in a PADI or
PADR. If the Access Concentrator receives this TAG, it MUST
include the TAG unmodified in the associated PADO or PADS
简单来说它的意思应该是有Host-Uniq的话,PADI与PADO是一组就好了,
或是PADR与PADS是一组就好了,不必全部都是同一组值,
另外你现在是在实做client应该是不用太在意这个值.
至於你的问题,这些tag都是用TLV (Type, Length, and Value)的方式去填的,
不知道你是不是在哪边没填好导致连线不成功的.
ex.
Host-Uniq设1
tag : 01 03 00 04 00 00 00 01
type | len | value
或是
tag : 01 03 00 08 00 00 00 00 00 00 00 01
type | len | value
当然AC-Cookie也是利用相同的方式去填出来的.
ps. rp-pppoe 有open source, 如果真的一直有问题的话,可以参考看看.
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 61.230.75.158