看板 Network 關於我們 聯絡資訊
※ 引述《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