? ? ? ?路由器:路由器是一種典型的網絡連接設備,用來進行路由選擇和報文轉發。
路由器與它直接相連的網絡的跳數為0,通過一臺路由器可達的網絡的跳數為1.
????? 路由協議:路由器之間維護路由表的規則,用以發現路由,生成路由表,并引導報文轉發。
路由器與它直接相連的網絡的跳數為0,通過一臺路由器可達的網絡的跳數為1.
????? 路由協議:路由器之間維護路由表的規則,用以發現路由,生成路由表,并引導報文轉發。
路由器決策路由關鍵是路由表,轉發報文關鍵是FIB表(Forwarding Information Base)表。每個路由器至少維護著一張路由表和一張FIB表。
????? 路由表中通常包含:
????? 路由表中通常包含:
鏈路層協議發現的路由(接口路由或直連路由)
網絡管理員人工配置的靜態路由
動態路由協議主動發現的路由
網絡管理員人工配置的靜態路由
動態路由協議主動發現的路由
FIB表指明分組到某網段或某主機應通過路由器的物理接口或邏輯接口發送,到達計劃路徑的下一個路由器,當然也可以不經過路由器直達直接相連網絡中的主機。
一臺路由器保存著一張本地核心(管理)路由表,路由協議也維護著自己的路由表。即
本地核心路由表
????? 用來保護協議路由和決策優選路由,負責把優選路由下發到FIB,由FIB負責指導轉發。具體通過display ip routing-table,查看?
各種路由協議的優先級和度量值選取路由。
協議路由表
???? 即協議主動發現的路由。路由協議可以引入并發布其它協議生成的路由。
例如:查看路由表
<quidway>dis ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
??????? Destinations : 20?????? Routes : 20
本地核心路由表
????? 用來保護協議路由和決策優選路由,負責把優選路由下發到FIB,由FIB負責指導轉發。具體通過display ip routing-table,查看?
各種路由協議的優先級和度量值選取路由。
協議路由表
???? 即協議主動發現的路由。路由協議可以引入并發布其它協議生成的路由。
例如:查看路由表
<quidway>dis ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
??????? Destinations : 20?????? Routes : 20
Destination/Mask??? Proto? Pre? Cost???? Flags NextHop???????? Interface
10.201.54.215/32? Static 60?? 0????????? RD? 10.201.81.19??? GigabitEthernet1/0/23
? 10.201.57.128/27? Static 60?? 0????????? RD? 10.201.81.19??? GigabitEthernet1/0/23
??? 10.201.62.0/26? Static 60?? 0????????? RD? 10.201.81.19??? GigabitEthernet1/0/23
??? 10.201.63.4/32? Static 60?? 0????????? RD? 10.201.81.19??? GigabitEthernet1/0/23
?? 10.201.81.16/29? Direct 0??? 0?????????? D? 10.201.81.20??? GigabitEthernet1/0/23
?? 10.201.81.20/32? Direct 0??? 0?????????? D? 127.0.0.1?????? InLoopBack0
?? 10.201.81.23/32? Direct 0??? 0?????????? D? 127.0.0.1?????? InLoopBack0
?? 10.201.81.24/30? Direct 0??? 0?????????? D? 10.201.81.25??? Vlanif30
?? 10.201.81.25/32? Direct 0??? 0?????????? D? 127.0.0.1?????? InLoopBack0
?? 10.201.81.26/32? Direct 0??? 0?????????? D? 10.201.81.26??? Vlanif30
?? 10.201.81.27/32? Direct 0??? 0?????????? D? 127.0.0.1?????? InLoopBack0
? 10.201.93.241/32? Direct 0??? 0?????????? D? 127.0.0.1?????? InLoopBack0
? 10.201.93.242/32? Static 60?? 0????????? RD? 10.201.81.26??? Vlanif30
????? 127.0.0.0/8?? Direct 0??? 0?????????? D? 127.0.0.1?????? InLoopBack0
????? 127.0.0.1/32? Direct 0??? 0?????????? D? 127.0.0.1?????? InLoopBack0
127.255.255.255/32? Direct 0??? 0?????????? D? 127.0.0.1?????? InLoopBack0
????? 138.1.1.1/32? Static 60?? 0????????? RD? 10.201.81.19??? GigabitEthernet1/0/23
????? 138.2.1.1/32? Static 60?? 0????????? RD? 10.201.81.19??? GigabitEthernet1/0/23
????? 138.7.1.1/32? Static 60?? 0????????? RD? 10.201.81.19??? GigabitEthernet1/0/23
255.255.255.255/32? Direct 0??? 0?????????? D? 127.0.0.1?????? InLoopBack0
解釋:
Route Flags:路由標記,R表示該路由是迭代路由,D表示該路由下發到FIB表。
Routing Tables:說明路由表是公網路由表還是私網路由表。
Destinations:目的網絡或者主機的總數。
Routes:路由總數。
Destination/Mask:目的地址和子網掩碼。
Proto:協議,說明是直連、靜態還是動態路由。
Pre:本條路由加入路由表的優先級。它包括前面所講的所有路由,加上優先級,優先級高(數值小)的便是當前的最佳路由。各協議的路由優先級如下表:
表1-1 路由協議及缺省時的路由優先級
路由協議或路由種類 相應路由的優先級
DIRECT????????????????????????????? 0
OSPF??????????????????????????????? 10
IS-IS???????????????????????????????? 15
STATIC???????????????????????????? 60
RIP????????????????????????????????? 100
OSPF ASE??????????????????????? 150
OSPF NSSA????????????????????? 150
IBGP???????????????????????????????? 255
EBGP??????????????????????????????? 255
注意:除直連路由(DIRECT)外,各種路由協議的優先級都可由用戶手工進行配置。
Cost:路由開銷。當到達同一目的地的多條路由具有相同的優先級時,它就派上用場了。路由開銷小的將成為當前的最佳路由。
提醒:Pre用于不同路由協議間路由優先級的比較,cost即用于同一種路由協議內部不同路由優先級的比較。
Flags:路由標記,即路由表頭的Route Flags,表示路由信息所處狀態。
NextHop:下一跳地址。說明IP包經過的下一個路由器。
Interface:下一跳可達的出接口。說明IP包將從下一個路由器哪一個接口轉發。
不過上面的路由表只是路由表簡表,它只顯示激活的路由,而完整的路由表還包括未激活的路由。可以通過命令display ip routing-table verbose查看。
例如:
<quidway>dis ip routing-table verbose
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Table : Public
??????? Destinations : 20?????? Routes : 27
? 10.201.57.128/27? Static 60?? 0????????? RD? 10.201.81.19??? GigabitEthernet1/0/23
??? 10.201.62.0/26? Static 60?? 0????????? RD? 10.201.81.19??? GigabitEthernet1/0/23
??? 10.201.63.4/32? Static 60?? 0????????? RD? 10.201.81.19??? GigabitEthernet1/0/23
?? 10.201.81.16/29? Direct 0??? 0?????????? D? 10.201.81.20??? GigabitEthernet1/0/23
?? 10.201.81.20/32? Direct 0??? 0?????????? D? 127.0.0.1?????? InLoopBack0
?? 10.201.81.23/32? Direct 0??? 0?????????? D? 127.0.0.1?????? InLoopBack0
?? 10.201.81.24/30? Direct 0??? 0?????????? D? 10.201.81.25??? Vlanif30
?? 10.201.81.25/32? Direct 0??? 0?????????? D? 127.0.0.1?????? InLoopBack0
?? 10.201.81.26/32? Direct 0??? 0?????????? D? 10.201.81.26??? Vlanif30
?? 10.201.81.27/32? Direct 0??? 0?????????? D? 127.0.0.1?????? InLoopBack0
? 10.201.93.241/32? Direct 0??? 0?????????? D? 127.0.0.1?????? InLoopBack0
? 10.201.93.242/32? Static 60?? 0????????? RD? 10.201.81.26??? Vlanif30
????? 127.0.0.0/8?? Direct 0??? 0?????????? D? 127.0.0.1?????? InLoopBack0
????? 127.0.0.1/32? Direct 0??? 0?????????? D? 127.0.0.1?????? InLoopBack0
127.255.255.255/32? Direct 0??? 0?????????? D? 127.0.0.1?????? InLoopBack0
????? 138.1.1.1/32? Static 60?? 0????????? RD? 10.201.81.19??? GigabitEthernet1/0/23
????? 138.2.1.1/32? Static 60?? 0????????? RD? 10.201.81.19??? GigabitEthernet1/0/23
????? 138.7.1.1/32? Static 60?? 0????????? RD? 10.201.81.19??? GigabitEthernet1/0/23
255.255.255.255/32? Direct 0??? 0?????????? D? 127.0.0.1?????? InLoopBack0
解釋:
Route Flags:路由標記,R表示該路由是迭代路由,D表示該路由下發到FIB表。
Routing Tables:說明路由表是公網路由表還是私網路由表。
Destinations:目的網絡或者主機的總數。
Routes:路由總數。
Destination/Mask:目的地址和子網掩碼。
Proto:協議,說明是直連、靜態還是動態路由。
Pre:本條路由加入路由表的優先級。它包括前面所講的所有路由,加上優先級,優先級高(數值小)的便是當前的最佳路由。各協議的路由優先級如下表:
表1-1 路由協議及缺省時的路由優先級
路由協議或路由種類 相應路由的優先級
DIRECT????????????????????????????? 0
OSPF??????????????????????????????? 10
IS-IS???????????????????????????????? 15
STATIC???????????????????????????? 60
RIP????????????????????????????????? 100
OSPF ASE??????????????????????? 150
OSPF NSSA????????????????????? 150
IBGP???????????????????????????????? 255
EBGP??????????????????????????????? 255
注意:除直連路由(DIRECT)外,各種路由協議的優先級都可由用戶手工進行配置。
Cost:路由開銷。當到達同一目的地的多條路由具有相同的優先級時,它就派上用場了。路由開銷小的將成為當前的最佳路由。
提醒:Pre用于不同路由協議間路由優先級的比較,cost即用于同一種路由協議內部不同路由優先級的比較。
Flags:路由標記,即路由表頭的Route Flags,表示路由信息所處狀態。
NextHop:下一跳地址。說明IP包經過的下一個路由器。
Interface:下一跳可達的出接口。說明IP包將從下一個路由器哪一個接口轉發。
不過上面的路由表只是路由表簡表,它只顯示激活的路由,而完整的路由表還包括未激活的路由。可以通過命令display ip routing-table verbose查看。
例如:
<quidway>dis ip routing-table verbose
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Table : Public
??????? Destinations : 20?????? Routes : 27
Destination: 10.201.54.215/32
???? Protocol: Static????????? Process ID: 0
?? Preference: 60??????????????????? Cost: 0
????? NextHop: 10.201.81.19???? Neighbour: 0.0.0.0
??????? State: Active Adv GotQ??????? Age: 8d05h16m34s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: GigabitEthernet1/0/23
???? TunnelID: 0x0????????????????? Flags: RD
Destination: 10.201.54.215/32
???? Protocol: Static????????? Process ID: 0
?? Preference: 100?????????????????? Cost: 0
????? NextHop: 10.201.81.26???? Neighbour: 0.0.0.0
??????? State: Inactive Adv GotQ????? Age: 8d05h16m34s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: Vlanif30
???? TunnelID: 0x0????????????????? Flags: R
???? Protocol: Static????????? Process ID: 0
?? Preference: 100?????????????????? Cost: 0
????? NextHop: 10.201.81.26???? Neighbour: 0.0.0.0
??????? State: Inactive Adv GotQ????? Age: 8d05h16m34s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: Vlanif30
???? TunnelID: 0x0????????????????? Flags: R
Destination: 10.201.57.128/27
???? Protocol: Static????????? Process ID: 0
?? Preference: 60??????????????????? Cost: 0
????? NextHop: 10.201.81.19???? Neighbour: 0.0.0.0
??????? State: Active Adv GotQ??????? Age: 138d23h14m06s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: GigabitEthernet1/0/23
???? TunnelID: 0x0????????????????? Flags: RD
???? Protocol: Static????????? Process ID: 0
?? Preference: 60??????????????????? Cost: 0
????? NextHop: 10.201.81.19???? Neighbour: 0.0.0.0
??????? State: Active Adv GotQ??????? Age: 138d23h14m06s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: GigabitEthernet1/0/23
???? TunnelID: 0x0????????????????? Flags: RD
Destination: 10.201.57.128/27
???? Protocol: Static????????? Process ID: 0
?? Preference: 100?????????????????? Cost: 0
????? NextHop: 10.201.81.26???? Neighbour: 0.0.0.0
??????? State: Inactive Adv GotQ????? Age: 138d23h14m06s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: Vlanif30
???? TunnelID: 0x0????????????????? Flags: R
???? Protocol: Static????????? Process ID: 0
?? Preference: 100?????????????????? Cost: 0
????? NextHop: 10.201.81.26???? Neighbour: 0.0.0.0
??????? State: Inactive Adv GotQ????? Age: 138d23h14m06s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: Vlanif30
???? TunnelID: 0x0????????????????? Flags: R
Destination: 10.201.62.0/26???????????????
???? Protocol: Static????????? Process ID: 0
?? Preference: 60??????????????????? Cost: 0
????? NextHop: 10.201.81.19???? Neighbour: 0.0.0.0
??????? State: Active Adv GotQ??????? Age: 138d23h14m05s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: GigabitEthernet1/0/23
???? TunnelID: 0x0????????????????? Flags: RD
???? Protocol: Static????????? Process ID: 0
?? Preference: 60??????????????????? Cost: 0
????? NextHop: 10.201.81.19???? Neighbour: 0.0.0.0
??????? State: Active Adv GotQ??????? Age: 138d23h14m05s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: GigabitEthernet1/0/23
???? TunnelID: 0x0????????????????? Flags: RD
Destination: 10.201.62.0/26
???? Protocol: Static????????? Process ID: 0
?? Preference: 100?????????????????? Cost: 0
????? NextHop: 10.201.81.26???? Neighbour: 0.0.0.0
??????? State: Inactive Adv GotQ????? Age: 138d23h14m08s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: Vlanif30
???? TunnelID: 0x0????????????????? Flags: R
???? Protocol: Static????????? Process ID: 0
?? Preference: 100?????????????????? Cost: 0
????? NextHop: 10.201.81.26???? Neighbour: 0.0.0.0
??????? State: Inactive Adv GotQ????? Age: 138d23h14m08s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: Vlanif30
???? TunnelID: 0x0????????????????? Flags: R
Destination: 10.201.63.4/32
???? Protocol: Static????????? Process ID: 0
?? Preference: 60??????????????????? Cost: 0
????? NextHop: 10.201.81.19???? Neighbour: 0.0.0.0
??????? State: Active Adv GotQ??????? Age: 140d23h35m45s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: GigabitEthernet1/0/23
???? TunnelID: 0x0????????????????? Flags: RD
???? Protocol: Static????????? Process ID: 0
?? Preference: 60??????????????????? Cost: 0
????? NextHop: 10.201.81.19???? Neighbour: 0.0.0.0
??????? State: Active Adv GotQ??????? Age: 140d23h35m45s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: GigabitEthernet1/0/23
???? TunnelID: 0x0????????????????? Flags: RD
Destination: 10.201.63.4/32
???? Protocol: Static????????? Process ID: 0
?? Preference: 100?????????????????? Cost: 0
????? NextHop: 10.201.81.26???? Neighbour: 0.0.0.0
??????? State: Inactive Adv GotQ????? Age: 140d23h28m08s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: Vlanif30
???? TunnelID: 0x0????????????????? Flags: R
???? Protocol: Static????????? Process ID: 0
?? Preference: 100?????????????????? Cost: 0
????? NextHop: 10.201.81.26???? Neighbour: 0.0.0.0
??????? State: Inactive Adv GotQ????? Age: 140d23h28m08s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: Vlanif30
???? TunnelID: 0x0????????????????? Flags: R
Destination: 10.201.81.16/29
???? Protocol: Direct????????? Process ID: 0
?? Preference: 0???????????????????? Cost: 0
????? NextHop: 10.201.81.20???? Neighbour: 0.0.0.0
??????? State: Active Adv???????????? Age: 140d23h35m45s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: GigabitEthernet1/0/23
???? TunnelID: 0x0????????????????? Flags:? D
???? Protocol: Direct????????? Process ID: 0
?? Preference: 0???????????????????? Cost: 0
????? NextHop: 10.201.81.20???? Neighbour: 0.0.0.0
??????? State: Active Adv???????????? Age: 140d23h35m45s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: GigabitEthernet1/0/23
???? TunnelID: 0x0????????????????? Flags:? D
Destination: 10.201.81.20/32
???? Protocol: Direct????????? Process ID: 0
?? Preference: 0???????????????????? Cost: 0
????? NextHop: 127.0.0.1??????? Neighbour: 0.0.0.0
??????? State: Active NoAdv?????????? Age: 140d23h35m46s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: InLoopBack0
???? TunnelID: 0x0????????????????? Flags:? D
???? Protocol: Direct????????? Process ID: 0
?? Preference: 0???????????????????? Cost: 0
????? NextHop: 127.0.0.1??????? Neighbour: 0.0.0.0
??????? State: Active NoAdv?????????? Age: 140d23h35m46s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: InLoopBack0
???? TunnelID: 0x0????????????????? Flags:? D
Destination: 10.201.81.23/32
???? Protocol: Direct????????? Process ID: 0
?? Preference: 0???????????????????? Cost: 0
????? NextHop: 127.0.0.1??????? Neighbour: 0.0.0.0
??????? State: Active NoAdv?????????? Age: 140d23h35m46s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: InLoopBack0
???? TunnelID: 0x0????????????????? Flags:? D
??????????????????????????????????????????
Destination: 10.201.81.24/30
???? Protocol: Direct????????? Process ID: 0
?? Preference: 0???????????????????? Cost: 0
????? NextHop: 10.201.81.25???? Neighbour: 0.0.0.0
??????? State: Active Adv???????????? Age: 140d23h28m09s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: Vlanif30
???? TunnelID: 0x0????????????????? Flags:? D
???? Protocol: Direct????????? Process ID: 0
?? Preference: 0???????????????????? Cost: 0
????? NextHop: 127.0.0.1??????? Neighbour: 0.0.0.0
??????? State: Active NoAdv?????????? Age: 140d23h35m46s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: InLoopBack0
???? TunnelID: 0x0????????????????? Flags:? D
??????????????????????????????????????????
Destination: 10.201.81.24/30
???? Protocol: Direct????????? Process ID: 0
?? Preference: 0???????????????????? Cost: 0
????? NextHop: 10.201.81.25???? Neighbour: 0.0.0.0
??????? State: Active Adv???????????? Age: 140d23h28m09s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: Vlanif30
???? TunnelID: 0x0????????????????? Flags:? D
Destination: 10.201.81.25/32
???? Protocol: Direct????????? Process ID: 0
?? Preference: 0???????????????????? Cost: 0
????? NextHop: 127.0.0.1??????? Neighbour: 0.0.0.0
??????? State: Active NoAdv?????????? Age: 140d23h28m09s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: InLoopBack0
???? TunnelID: 0x0????????????????? Flags:? D
???? Protocol: Direct????????? Process ID: 0
?? Preference: 0???????????????????? Cost: 0
????? NextHop: 127.0.0.1??????? Neighbour: 0.0.0.0
??????? State: Active NoAdv?????????? Age: 140d23h28m09s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: InLoopBack0
???? TunnelID: 0x0????????????????? Flags:? D
Destination: 10.201.81.26/32
???? Protocol: Direct????????? Process ID: 0
?? Preference: 0???????????????????? Cost: 0
????? NextHop: 10.201.81.26???? Neighbour: 0.0.0.0
??????? State: Active NoAdv?????????? Age: 140d23h28m05s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: Vlanif30
???? TunnelID: 0x0????????????????? Flags:? D
???? Protocol: Direct????????? Process ID: 0
?? Preference: 0???????????????????? Cost: 0
????? NextHop: 10.201.81.26???? Neighbour: 0.0.0.0
??????? State: Active NoAdv?????????? Age: 140d23h28m05s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: Vlanif30
???? TunnelID: 0x0????????????????? Flags:? D
Destination: 10.201.81.27/32
???? Protocol: Direct????????? Process ID: 0
?? Preference: 0???????????????????? Cost: 0
????? NextHop: 127.0.0.1??????? Neighbour: 0.0.0.0
??????? State: Active NoAdv?????????? Age: 140d23h28m54s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: InLoopBack0
???? TunnelID: 0x0????????????????? Flags:? D
???? Protocol: Direct????????? Process ID: 0
?? Preference: 0???????????????????? Cost: 0
????? NextHop: 127.0.0.1??????? Neighbour: 0.0.0.0
??????? State: Active NoAdv?????????? Age: 140d23h28m54s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: InLoopBack0
???? TunnelID: 0x0????????????????? Flags:? D
Destination: 10.201.93.241/32
???? Protocol: Direct????????? Process ID: 0
?? Preference: 0???????????????????? Cost: 0
????? NextHop: 127.0.0.1??????? Neighbour: 0.0.0.0
??????? State: Active Adv???????????? Age: 140d23h42m01s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: InLoopBack0
???? TunnelID: 0x0????????????????? Flags:? D
???? Protocol: Direct????????? Process ID: 0
?? Preference: 0???????????????????? Cost: 0
????? NextHop: 127.0.0.1??????? Neighbour: 0.0.0.0
??????? State: Active Adv???????????? Age: 140d23h42m01s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: InLoopBack0
???? TunnelID: 0x0????????????????? Flags:? D
Destination: 10.201.93.242/32
???? Protocol: Static????????? Process ID: 0
?? Preference: 60??????????????????? Cost: 0
????? NextHop: 10.201.81.26???? Neighbour: 0.0.0.0
??????? State: Active Adv GotQ??????? Age: 138d23h13m26s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: Vlanif30
???? TunnelID: 0x0????????????????? Flags: RD
???? Protocol: Static????????? Process ID: 0
?? Preference: 60??????????????????? Cost: 0
????? NextHop: 10.201.81.26???? Neighbour: 0.0.0.0
??????? State: Active Adv GotQ??????? Age: 138d23h13m26s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: Vlanif30
???? TunnelID: 0x0????????????????? Flags: RD
Destination: 127.0.0.0/8
???? Protocol: Direct????????? Process ID: 0
?? Preference: 0???????????????????? Cost: 0
????? NextHop: 127.0.0.1??????? Neighbour: 0.0.0.0
??????? State: Active NoAdv?????????? Age: 140d23h42m07s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: InLoopBack0
???? TunnelID: 0x0????????????????? Flags:? D
???? Protocol: Direct????????? Process ID: 0
?? Preference: 0???????????????????? Cost: 0
????? NextHop: 127.0.0.1??????? Neighbour: 0.0.0.0
??????? State: Active NoAdv?????????? Age: 140d23h42m07s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: InLoopBack0
???? TunnelID: 0x0????????????????? Flags:? D
Destination: 127.0.0.1/32
???? Protocol: Direct????????? Process ID: 0
?? Preference: 0???????????????????? Cost: 0
????? NextHop: 127.0.0.1??????? Neighbour: 0.0.0.0
??????? State: Active NoAdv?????????? Age: 140d23h42m10s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: InLoopBack0
???? TunnelID: 0x0????????????????? Flags:? D
???? Protocol: Direct????????? Process ID: 0
?? Preference: 0???????????????????? Cost: 0
????? NextHop: 127.0.0.1??????? Neighbour: 0.0.0.0
??????? State: Active NoAdv?????????? Age: 140d23h42m10s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: InLoopBack0
???? TunnelID: 0x0????????????????? Flags:? D
Destination: 127.255.255.255/32
???? Protocol: Direct????????? Process ID: 0
?? Preference: 0???????????????????? Cost: 0
????? NextHop: 127.0.0.1??????? Neighbour: 0.0.0.0
??????? State: Active NoAdv?????????? Age: 140d23h42m10s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: InLoopBack0
???? TunnelID: 0x0????????????????? Flags:? D
???? Protocol: Direct????????? Process ID: 0
?? Preference: 0???????????????????? Cost: 0
????? NextHop: 127.0.0.1??????? Neighbour: 0.0.0.0
??????? State: Active NoAdv?????????? Age: 140d23h42m10s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: InLoopBack0
???? TunnelID: 0x0????????????????? Flags:? D
Destination: 138.1.1.1/32
???? Protocol: Static????????? Process ID: 0
?? Preference: 60??????????????????? Cost: 0
????? NextHop: 10.201.81.19???? Neighbour: 0.0.0.0
??????? State: Active Adv GotQ??????? Age: 140d23h36m37s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: GigabitEthernet1/0/23
???? TunnelID: 0x0????????????????? Flags: RD
???? Protocol: Static????????? Process ID: 0
?? Preference: 60??????????????????? Cost: 0
????? NextHop: 10.201.81.19???? Neighbour: 0.0.0.0
??????? State: Active Adv GotQ??????? Age: 140d23h36m37s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: GigabitEthernet1/0/23
???? TunnelID: 0x0????????????????? Flags: RD
Destination: 138.1.1.1/32
???? Protocol: Static????????? Process ID: 0
?? Preference: 100?????????????????? Cost: 0
????? NextHop: 10.201.81.26???? Neighbour: 0.0.0.0
??????? State: Inactive Adv GotQ????? Age: 140d23h29m01s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: Vlanif30
???? TunnelID: 0x0????????????????? Flags: R
???? Protocol: Static????????? Process ID: 0
?? Preference: 100?????????????????? Cost: 0
????? NextHop: 10.201.81.26???? Neighbour: 0.0.0.0
??????? State: Inactive Adv GotQ????? Age: 140d23h29m01s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: Vlanif30
???? TunnelID: 0x0????????????????? Flags: R
Destination: 138.2.1.1/32
???? Protocol: Static????????? Process ID: 0
?? Preference: 60??????????????????? Cost: 0
????? NextHop: 10.201.81.19???? Neighbour: 0.0.0.0
??????? State: Active Adv GotQ??????? Age: 140d23h36m38s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: GigabitEthernet1/0/23
???? TunnelID: 0x0????????????????? Flags: RD
???? Protocol: Static????????? Process ID: 0
?? Preference: 60??????????????????? Cost: 0
????? NextHop: 10.201.81.19???? Neighbour: 0.0.0.0
??????? State: Active Adv GotQ??????? Age: 140d23h36m38s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: GigabitEthernet1/0/23
???? TunnelID: 0x0????????????????? Flags: RD
Destination: 138.2.1.1/32
???? Protocol: Static????????? Process ID: 0
?? Preference: 100?????????????????? Cost: 0
????? NextHop: 10.201.81.26???? Neighbour: 0.0.0.0
??????? State: Inactive Adv GotQ????? Age: 140d23h29m01s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: Vlanif30
???? TunnelID: 0x0????????????????? Flags: R
???? Protocol: Static????????? Process ID: 0
?? Preference: 100?????????????????? Cost: 0
????? NextHop: 10.201.81.26???? Neighbour: 0.0.0.0
??????? State: Inactive Adv GotQ????? Age: 140d23h29m01s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: Vlanif30
???? TunnelID: 0x0????????????????? Flags: R
Destination: 138.7.1.1/32
???? Protocol: Static????????? Process ID: 0
?? Preference: 60??????????????????? Cost: 0
????? NextHop: 10.201.81.19???? Neighbour: 0.0.0.0
??????? State: Active Adv GotQ??????? Age: 140d23h36m38s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: GigabitEthernet1/0/23
???? TunnelID: 0x0????????????????? Flags: RD
???? Protocol: Static????????? Process ID: 0
?? Preference: 60??????????????????? Cost: 0
????? NextHop: 10.201.81.19???? Neighbour: 0.0.0.0
??????? State: Active Adv GotQ??????? Age: 140d23h36m38s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: GigabitEthernet1/0/23
???? TunnelID: 0x0????????????????? Flags: RD
Destination: 138.7.1.1/32
???? Protocol: Static????????? Process ID: 0
?? Preference: 100?????????????????? Cost: 0
????? NextHop: 10.201.81.26???? Neighbour: 0.0.0.0
??????? State: Inactive Adv GotQ????? Age: 140d23h29m01s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: Vlanif30
???? TunnelID: 0x0????????????????? Flags: R
???? Protocol: Static????????? Process ID: 0
?? Preference: 100?????????????????? Cost: 0
????? NextHop: 10.201.81.26???? Neighbour: 0.0.0.0
??????? State: Inactive Adv GotQ????? Age: 140d23h29m01s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: Vlanif30
???? TunnelID: 0x0????????????????? Flags: R
Destination: 255.255.255.255/32
???? Protocol: Direct????????? Process ID: 0
?? Preference: 0???????????????????? Cost: 0
????? NextHop: 127.0.0.1??????? Neighbour: 0.0.0.0
??????? State: Active NoAdv?????????? Age: 140d23h42m11s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: InLoopBack0
???? TunnelID: 0x0????????????????? Flags:? D
解釋:
注意這里的Routes比剛才的多了,是因為將未激活的路由條數加進來了。此外,還多出其它一些項目:
Process ID:路由協議的進程號。
Neighbour:鄰居。
State:路由的狀態,包括有
Active:激活的路由
Invalid:無效的路由
Inactive:非激活的路由
NoAdv:不充許發布的路由
Adv:可以發布的路由
Del:即將要刪除的路由
GotQ:迭代到下一跳及出接口的路由,或者迭代到隧道的路由
WatiQ:沒有迭代到下一跳及出接口的路由,或者迭代到隧道的路由
Stale:帶Stale標記的路由,在GR中使用
Age:路由有存活時間。
Tag:路由管理標識。
Priority:優先級。
Label:MPLS分配的標簽。
QoSInfo:QoS信息。
RelayNextHop:迭代下一跳。
Interface:迭代出接口。
Tunnel ID:隧道ID。
SecTunnel ID:備份隧道ID。
BkNextHop:備份出接口。
Route of Packet Load-balance:顯示逐包軟轉發查詢時所使用的路由的信息
???? Protocol: Direct????????? Process ID: 0
?? Preference: 0???????????????????? Cost: 0
????? NextHop: 127.0.0.1??????? Neighbour: 0.0.0.0
??????? State: Active NoAdv?????????? Age: 140d23h42m11s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: InLoopBack0
???? TunnelID: 0x0????????????????? Flags:? D
解釋:
注意這里的Routes比剛才的多了,是因為將未激活的路由條數加進來了。此外,還多出其它一些項目:
Process ID:路由協議的進程號。
Neighbour:鄰居。
State:路由的狀態,包括有
Active:激活的路由
Invalid:無效的路由
Inactive:非激活的路由
NoAdv:不充許發布的路由
Adv:可以發布的路由
Del:即將要刪除的路由
GotQ:迭代到下一跳及出接口的路由,或者迭代到隧道的路由
WatiQ:沒有迭代到下一跳及出接口的路由,或者迭代到隧道的路由
Stale:帶Stale標記的路由,在GR中使用
Age:路由有存活時間。
Tag:路由管理標識。
Priority:優先級。
Label:MPLS分配的標簽。
QoSInfo:QoS信息。
RelayNextHop:迭代下一跳。
Interface:迭代出接口。
Tunnel ID:隧道ID。
SecTunnel ID:備份隧道ID。
BkNextHop:備份出接口。
Route of Packet Load-balance:顯示逐包軟轉發查詢時所使用的路由的信息
前面說過,華為路由器還有一個FIB負責指引報文轉發。路由表選擇出路由后,路由表就會將已經激活的路由下發到FIB中。由于FIB表進行轉發。
FIB表根據匹配最長匹配原則。即查找FIB表時,報文的目的地址和FIB中各表項的掩碼進行“邏輯與”運算,將得到的地址與FIB表項中的網絡地址匹配,并選擇最長匹配的FIB表項進行報文轉發。
FIB表根據匹配最長匹配原則。即查找FIB表時,報文的目的地址和FIB中各表項的掩碼進行“邏輯與”運算,將得到的地址與FIB表項中的網絡地址匹配,并選擇最長匹配的FIB表項進行報文轉發。
?
附注:關于迭代路由的解釋(摘抄網上的)
我對路由迭代的理解:
????? 通常路由的下一跳是路由器某個接口的同網段地址,但是存在這樣的情形:
我對路由迭代的理解:
????? 通常路由的下一跳是路由器某個接口的同網段地址,但是存在這樣的情形:
A ____B______D___E?
?????? \____C_____/
?????? \____C_____/
??? 路由器A、B、C、D間運行IGP路由協議,而路由器E不參與,為了使A能到達E,需要在A上配置靜態路由,A可以經由B或者C到達D再到達E,那么我們可以在A上配置到E的2條路由:
E??? 下一跳B???????
????? E??? 下一跳C? (備用)
?????
???? 當A到B的鏈路出現問題
????? E??? 下一跳C? (備用)
?????
???? 當A到B的鏈路出現問題
A __X_B______D___E?
?????? \____C_____/
????
??? 下一跳到C的路由起作用了,可以正常工作。
??? 但是如果是B-D的鏈路出問題怎么辦呢?看下圖:
???? A ____B__X___D___E?
?????? \____C_____/
?????? \____C_____/
????
??? 下一跳到C的路由起作用了,可以正常工作。
??? 但是如果是B-D的鏈路出問題怎么辦呢?看下圖:
???? A ____B__X___D___E?
?????? \____C_____/
A并不知道這一點,仍然將到E的報文向B轉發結果當然是不通了。
????? 解決的辦法就是在A上配置迭代路由
????? 解決的辦法就是在A上配置迭代路由
E??? 下一跳D?
??????
????? A到E具體走B還是走C取決于A到D是走B還是走C,
????? 而A到D具體是走B還是走C則由IGP路由協議動態算出,這樣無論是A-B的鏈路出現問題還是B-D的鏈路出現問題都不會影響A-E的轉發。
????? 有人要問為什么不讓E也參與IGP不使用靜態路由不就不會出類似問題么?
????? 1、在真實的組網環境中很可能A\B\C\D屬于同一個管理區域,E屬于另一個管理區域,互相之間不允許運行IGP路由協議。
????? 2、A-D間可能采用了某種隧道技術,可能B/C根本就不知道E的存在,使用IGP路由協議也不能解決。
??????
????? A到E具體走B還是走C取決于A到D是走B還是走C,
????? 而A到D具體是走B還是走C則由IGP路由協議動態算出,這樣無論是A-B的鏈路出現問題還是B-D的鏈路出現問題都不會影響A-E的轉發。
????? 有人要問為什么不讓E也參與IGP不使用靜態路由不就不會出類似問題么?
????? 1、在真實的組網環境中很可能A\B\C\D屬于同一個管理區域,E屬于另一個管理區域,互相之間不允許運行IGP路由協議。
????? 2、A-D間可能采用了某種隧道技術,可能B/C根本就不知道E的存在,使用IGP路由協議也不能解決。
本文轉自 獨鉤寒江雪 51CTO博客,原文鏈接:http://blog.51cto.com/bennie/265440,如需轉載請自行聯系原作者