07-鄰接表配置
本章節下載: 07-鄰接表配置 (179.51 KB)
鄰接表用於管理各種鏈路層協議(如PPP、ATM)的鄰居信息。此處的鄰居,是指IP層麵的鄰居,即對於三層轉發來說一跳可達,不需要經過中間設備進行三層轉發。
各種鏈路層協議通過協商(如PPP動態協商)或配置(如ATM靜態配置)生成鄰居信息後,將其下發給鄰接表,生成鄰接表表項。鄰接表中記錄了鄰居的網絡層地址(下一跳)、路由出接口、鏈路層協議類型、鏈路層地址(對ATM可以是PVC,PPP則沒有這個信息)等信息。鄰接表表項的更新、刪除也由各鏈路層協議模塊通知完成。
IP/IPv6轉發時,設備通過查找FIB(Forwarding Information Base,轉發信息庫)/IPv6 FIB表項得到報文的出接口和下一跳信息,再以此出接口和下一跳為索引查找鄰接表,獲取到該下一跳的鏈路層轉發信息,如鏈路層協議(PPP、HDLC等)及介質類型(P2P、NBMA)、封裝報文的鏈路層頭信息等,然後根據此信息對報文進行封裝後轉發。
以太網類型鄰居信息和非以太網類型鄰居信息統一存儲和管理,本文所描述的鄰接表特指管理非以太網類型的鄰居信息。
交換機僅支持查看P2P鏈路類型的Tunnel接口信息。
通過display adjacent-table和display ipv6 adjacent-table命令可以查看鄰接表的信息,例如:
# 顯示所有IPv4鄰接表項的詳細信息。
<Sysname> display adjacent-table all verbose
IP address : 0.0.0.0
Routing interface : Tunnel1
Physical interface : Tunnel1
Logical interface : N/A
Service type : Tunnel
Action type : Forwarding
Link media type : P2P
Slot : 0
Cpu : 0
VPN Index : 0
Virtual circuit information : N/A
Link head information(IP) : 4500000000000000ff2f000002020201020202020000
0800
Link head information(MPLS) : 4500000000000000ff2f000002020201020202020000
0800
# 顯示所有IPv6鄰接表項的詳細信息。
<Sysname> display ipv6 adjacent-table all verbose
IPv6 address : N/A
Routing interface : Tunnel2
Physical interface : Tunnel2
Logical interface : N/A
Service type : Tunnel
Action type : Forwarding
Link media type : P2P
Slot : 1
Cpu : 0
VPN index : 0
Virtual circuit information : N/A
Link head information(IPv6) : 60000000000000ff0002000000000000000000000000
000100020000000000000000000000000002000086dd
Link head information(MPLS) : 60000000000000ff0002000000000000000000000000
000100020000000000000000000000000002000086dd
鄰接表中部分字段的含義如下:
· IP address:查找FIB表項得到的報文轉發下一跳的IPv4地址,以此為索引來查找鄰接表。
· IPv6 address:查找FIB表項得到的報文轉發下一跳的IPv6地址,以此為索引來查找鄰接表。
· Routing interface:路由出接口。查找FIB表項得到的報文轉發的出接口,以此為索引來查找鄰接表。該接口可能是邏輯接口,也可能是物理接口。
· Physical interface:路由出接口對應的實際發送報文的物理接口。如果Routing interface為物理接口,則Routing interface、Physical interface二者相同;如果Routing interface為邏輯接口,則Routing interface、Physical interface二者會不同。
· Logical interface:發送報文的邏輯接口。如:ATM中的Virtual-Ethernet接口、MP中的Virtual-Template接口等。
· Service type:鏈路層協議類型。如:PPP、HDLC等。
· Action type:報文處理類型。表示匹配上此表項的報文應該做的動作。如:Forwarding表示轉發,Drop表示丟棄。
· Link media type:鏈路介質類型。與路由出接口當前封裝的鏈路層協議有關。如:P2P表示點到點鏈路,NBMA表示點對多點鏈路。
· Link head information (IP):IPv4協議對應的鏈路層頭信息,用於IP轉發時對報文進行封裝。
· Link head information(IPv6):IPv6協議對應的鏈路層頭信息,用於IPv6轉發時對報文進行封裝。
· Link head information(MPLS):MPLS協議對應的鏈路層頭信息,用於MPLS轉發時對報文進行封裝。
在任意視圖下執行display命令可以顯示鄰接表項的信息。
表1-1 鄰接表顯示和維護
操作 |
命令 |
顯示IPv4鄰接表項 |
display adjacent-table { all | physical-interface interface-type interface-number | routing-interface interface-type interface-number | slot slot-number } [ count | verbose ] |
顯示IPv6鄰接表項 |
display ipv6 adjacent-table { all | physical-interface interface-type interface-number | routing-interface interface-type interface-number | slot slot-number } [ count | verbose ] |
不同款型規格的資料略有差異, 詳細信息請向具體銷售和400谘詢。H3C保留在沒有任何通知或提示的情況下對資料內容進行修改的權利!