ISIS
常用命令
dis isis peer查看鄰居
dis ip routing-table
dis isis lsdb 查看isis數據庫
dis isis lsdb verbose
重分佈路由實驗
拓撲圖
ip地址
設備名稱 | 接口 | IP地址 | 網關 |
---|---|---|---|
PCA | – | 192.168.0.1/24 | 192.168.0.254 |
PCB | – | 192.168.2.1/24 | 192.168.2.254 |
RTA | G0/0 | 192.168.0.254/24 | – |
S1/0 | 192.168.1.1/30 | – | |
RTB | G0/0 | 192.168.2.254/24 | – |
S1/0 | 192.168.1.2/30 | – |
30=252
255.255.255.252
24=0
255.255.255.0
配置命令
RTA
<H3C>sys
System View: return to User View with Ctrl+Z.
[H3C]hostname RTA
[RTA]int g0/0
[RTA-GigabitEthernet0/0]ip address 192.168.0.254 255.255.255.0
[RTA-GigabitEthernet0/0]no shutdown
[RTA-GigabitEthernet0/0]exit
[RTA]int s1/0
[RTA-Serial1/0]ip address 192.168.1.1 255.255.255.252
[RTA-Serial1/0]no shutdown
[RTA-Serial1/0]exit
[RTA]isis
[RTA-isis-1]network-entity 10.0000.0000.0001.00
[RTA-isis-1]is-level level-1
[RTA-isis-1]quit
[RTA]int s1/0
[RTA-Serial1/0] isis enable 1
[RTA-Serial1/0]quit
[RTA]int g0/0
[RTA-GigabitEthernet0/0]isis enable 1
[RTA-GigabitEthernet0/0]quit
[RTA]
RTB
<H3C>sys
System View: return to User View with Ctrl+Z.
[H3C]hostname RTB
[RTB]isis
[RTB-isis-1]network-entity 10.0000.0000.0002.00
[RTB-isis-1]is-level level-1
[RTB-isis-1]quit
[RTB]int s1/0
[RTB-Serial1/0]isis enable 1
[RTB-Serial1/0]quit
[RTB-Serial1/0]ip address 192.168.1.2 255.255.255.252
[RTB-Serial1/0]no shutdown
[RTB-Serial1/0]exit
[RTB]
[RTB]int g0/0
[RTB-GigabitEthernet0/0]isis enable 1
[RTB-GigabitEthernet0/0]quit
[RTB-GigabitEthernet0/0]ip address 192.168.2.254 255.255.255.0
[RTB-GigabitEthernet0/0]no shutdown
[RTB-GigabitEthernet0/0]exit
查看基本信息
rta
dis isis brief
rtb
dis isis brief
測試
pc3 ping pc4
ping 192.168.2.1
ISIS多區域實驗
拓撲圖
rta是2
rtb是1
IP地址
設備名稱 | 接口 | IP地址 | 網關 |
---|---|---|---|
PCA | – | 172.16.0.1/24 | 172.16.0.254 |
PCB | – | 192.168.2.1/24 | 192.168.2.254 |
RTA | G0/0 | 172.16.0.254 | – |
G0/1 | 172.16.1.1/24 | – | |
RTB | G0/0 | 172.16.2.1/24 | – |
RTC | G0/0 | 172.16.1.2/24 | – |
G0/1 | 172.16.2.2/24 | – | |
S1/0 | 192.168.1.1/30 | – | |
RTD | G0/0 | 192.168.2.254/24 | |
S1/0 | 192.168.1.2/30 |
配置命令
RTA
配置接口地址
<H3C>SYS
System View: return to User View with Ctrl+Z.
[H3C]hostname RTA
[RTA]int g0/0
[RTA-GigabitEthernet0/0]ip add 172.16.0.254 255.255.255.0
[RTA-GigabitEthernet0/0]no shutdown
[RTA-GigabitEthernet0/0]quit
[RTA]int g0/1
[RTA-GigabitEthernet0/1]ip add 172.16.1.1 255.255.255.0
[RTA-GigabitEthernet0/1]no shutdown
[RTA-GigabitEthernet0/1]quit
[RTA]
[RTA]isis
[RTA-isis-1]ne
[RTA-isis-1]network-entity 10.0000.0000.0001.00
[RTA-isis-1]is-level level-1
[RTA-isis-1]quit
[RTA]int g0/0
[RTA-GigabitEthernet0/0]isis enable 1
[RTA-GigabitEthernet0/0]quit
[RTA]int g0/1
[RTA-GigabitEthernet0/1]isis enable 1
[RTA-GigabitEthernet0/1]quit
修改鏈路值
[RTA]isis
[RTA-isis-1]cost-style wide
[RTA-isis-1]bandwidth-reference 1000
[RTA-isis-1]auto-cost enable
[RTA-isis-1]quit
查看ISIS路由表
[RTA]dis isis route
Route information for IS-IS(1)
------------------------------
Level-1 IPv4 Forwarding Table
-----------------------------
IPv4 Destination IntCost ExtCost ExitInterface NextHop Flags
-------------------------------------------------------------------------------
0.0.0.0/0 10 NULL GE0/1 172.16.1.2 R/-/-
172.16.2.0/24 20 NULL GE0/1 172.16.1.2 R/-/-
172.16.1.0/24 10 NULL GE0/1 Direct D/L/-
172.16.0.0/24 10 NULL GE0/0 Direct D/L/-
192.168.1.0/30 156260 NULL GE0/1 172.16.1.2 R/-/-
Flags: D-Direct, R-Added to Rib, L-Advertised in LSPs, U-Up/Down bit set
[RTA]
在RTA上,共產生了5條ISIS路由,其中3(路由的Flags爲“R”)條被放入到全局IP路由表中,其中有一條缺省路由,其下一跳是172.16.1.2,出接口是GE_0/1。
查看路由表
[RTA]dis ip routing-table
Destinations : 19 Routes : 19
Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/0 IS_L1 15 10 172.16.1.2 GE0/1
0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
127.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
172.16.0.0/24 Direct 0 0 172.16.0.254 GE0/0
172.16.0.0/32 Direct 0 0 172.16.0.254 GE0/0
172.16.0.254/32 Direct 0 0 127.0.0.1 InLoop0
172.16.0.255/32 Direct 0 0 172.16.0.254 GE0/0
172.16.1.0/24 Direct 0 0 172.16.1.1 GE0/1
172.16.1.0/32 Direct 0 0 172.16.1.1 GE0/1
172.16.1.1/32 Direct 0 0 127.0.0.1 InLoop0
172.16.1.255/32 Direct 0 0 172.16.1.1 GE0/1
172.16.2.0/24 IS_L1 15 20 172.16.1.2 GE0/1
192.168.1.0/30 IS_L1 15 156260 172.16.1.2 GE0/1
224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0
224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0
255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
[RTA]
在RTA上,路由192.168.1.0/30的開銷值是20.
原因是:
這是因爲IS-IS缺省的路由開銷類型爲narrow,所有的接口無論帶寬大小,都設定開銷值爲10。
配置完成後使用 display ip routing-table
命令來查看RTA的路由表,此時路由表192.168.1.0/30
的開銷值是156260
。
原因是:
當開銷值的類型爲wide時,協議所計算接口的鏈路度量值是“開銷= (參考值÷帶寬)x10”所以會計算出如上開銷值
在ISIS中,當開銷值的類型爲wide時,協議所計算接口的鏈路度量值的規則與開銷值類型爲narraw是不一樣的。
RTB
配置接口地址
<H3C>SYS
System View: return to User View with Ctrl+Z.
[H3C]hostname RTB
[RTB]int g0/0
[RTB-GigabitEthernet0/0]ip add 172.16.2.1 255.255.255.0
[RTB-GigabitEthernet0/0]no shutdown
[RTB-GigabitEthernet0/0]quit
[RTB]
[RTB]isis
[RTB-isis-1]network-entity 10.0000.0000.0002.00
[RTB-isis-1]is-level level-1
[RTB-isis-1]quit
[RTB]int g0/0
[RTB-GigabitEthernet0/0]isis enable 1
[RTB-GigabitEthernet0/0]quit
[RTB]
[RTB]isis
[RTB-isis-1]cost-style wide
[RTB-isis-1]bandwidth-reference 1000
[RTB-isis-1]auto-cost enable
[RTB-isis-1]qui
[RTB]
RTC
配置接口地址
<H3C>%May 20 10:03:10:067 2020 H3C SHELL/5/SHELL_LOGIN: Console logged in from con0.
sys
System View: return to User View with Ctrl+Z.
[H3C]hostname RTC
[RTC]int g0/0
[RTC-GigabitEthernet0/0]ip add 172.16.1.2 255.255.255.0
[RTC-GigabitEthernet0/0]no shutdown
[RTC-GigabitEthernet0/0]quit
[RTC]int g0/1
[RTC-GigabitEthernet0/1]ip add 172.16.2.2 255.255.255.0
[RTC-GigabitEthernet0/1]no shutdown
[RTC-GigabitEthernet0/1]quit
[RTC]int s1/0
[RTC-Serial1/0]ip add 192.168.1.1 255.255.255.252
[RTC-Serial1/0]no shutdown
[RTC-Serial1/0]quit
[RTC]
<RTC>
<RTC>sys
[RTC]isis
[RTC-isis-1]network-entity 10.0000.0000.0003.00
[RTC-isis-1]is-level level-1-2
[RTC-isis-1]quit
[RTC]int g0/0
[RTC-GigabitEthernet0/0]isis enable 1
[RTC-GigabitEthernet0/0]quit
[RTC]int g0/1
[RTC-GigabitEthernet0/1]isis enable 1
[RTC-GigabitEthernet0/1]quit
[RTC]int s1/0
[RTC-Serial1/0]isis enable 1
[RTC-Serial1/0]
[RTC]isis
[RTC-isis-1]cost-style wide
[RTC-isis-1]bandwidth-reference 1000
[RTC-isis-1]auto-cost enable
[RTC-isis-1]quit
[RTC]
查看ISIS路由表
[RTC]dis isis route
Route information for IS-IS(1)
------------------------------
Level-1 IPv4 Forwarding Table
-----------------------------
IPv4 Destination IntCost ExtCost ExitInterface NextHop Flags
-------------------------------------------------------------------------------
172.16.2.0/24 10 NULL GE0/1 Direct D/L/-
172.16.1.0/24 10 NULL GE0/0 Direct D/L/-
172.16.0.0/24 20 NULL GE0/0 172.16.1.1 R/L/-
192.168.1.0/30 156250 NULL Ser1/0 Direct D/L/-
Flags: D-Direct, R-Added to Rib, L-Advertised in LSPs, U-Up/Down bit set
Level-2 IPv4 Forwarding Table
-----------------------------
IPv4 Destination IntCost ExtCost ExitInterface NextHop Flags
-------------------------------------------------------------------------------
172.16.2.0/24 10 NULL D/L/-
172.16.1.0/24 10 NULL D/L/-
192.168.2.0/24 156260 NULL Ser1/0 192.168.1.2 R/-/-
192.168.1.0/30 156250 NULL D/L/-
Flags: D-Direct, R-Added to Rib, L-Advertised in LSPs, U-Up/Down bit set
在RTC上,共產生了8條ISIS路由,其中2條被放入到全局IP路由表中。
Flags爲“R”的路由表明會被系統作爲有效路由而放到IP路由表中。
查看路由表
[RTC]dis ip routing-table
Destinations : 23 Routes : 23
Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
127.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
172.16.0.0/24 IS_L1 15 20 172.16.1.1 GE0/0
172.16.1.0/24 Direct 0 0 172.16.1.2 GE0/0
172.16.1.0/32 Direct 0 0 172.16.1.2 GE0/0
172.16.1.2/32 Direct 0 0 127.0.0.1 InLoop0
172.16.1.255/32 Direct 0 0 172.16.1.2 GE0/0
172.16.2.0/24 Direct 0 0 172.16.2.2 GE0/1
172.16.2.0/32 Direct 0 0 172.16.2.2 GE0/1
172.16.2.2/32 Direct 0 0 127.0.0.1 InLoop0
172.16.2.255/32 Direct 0 0 172.16.2.2 GE0/1
192.168.1.0/30 Direct 0 0 192.168.1.1 Ser1/0
192.168.1.0/32 Direct 0 0 192.168.1.1 Ser1/0
192.168.1.1/32 Direct 0 0 127.0.0.1 InLoop0
192.168.1.2/32 Direct 0 0 192.168.1.2 Ser1/0
192.168.1.3/32 Direct 0 0 192.168.1.1 Ser1/0
192.168.2.0/24 IS_L2 15 156260 192.168.1.2 Ser1/0
224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0
224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0
255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
[RTC]
下
[RTC]isis
[RTC-isis-1]address-family ipv4
[RTC-isis-1-ipv4]quit
[RTC-isis-1]domain-authentication-mode simple plain test ip
[RTC-isis-1]quit
[RTC]int s1/0
[RTC-Serial1/0]isis authentication-mode simple plain test ip
[RTC-Serial1/0]quit
[RTC]quit
<RTC>reset isis peer 0000.0000.0004
RTD
配置接口地址
[H3C]hostname RTD
[RTD]int g0/0
[RTD-GigabitEthernet0/0]ip add 192.168.2.254 255.255.255.0
[RTD-GigabitEthernet0/0]no shutdown
[RTD-GigabitEthernet0/0]quit
[RTD]int s1/0
[RTD-Serial1/0]ip add 192.168.1.2 255.255.255.252
[RTD-Serial1/0]no shutdown
[RTD-Serial1/0]quit
[RTD]
[RTD]isis
[RTD-isis-1]network-entity 20.0000.0000.0004.00
[RTD-isis-1]is-level level-1-2
[RTD-isis-1]quit
[RTD]int g0/0
[RTD-GigabitEthernet0/0]isis enable 1
[RTD-GigabitEthernet0/0]quit
[RTD]int s1/0
[RTD-Serial1/0]isis enable 1
[RTD-Serial1/0]quit
[RTD]
<RTD>
<RTD>sys
System View: return to User View with Ctrl+Z.
[RTD]isis
[RTD-isis-1]cost-style wide
[RTD-isis-1]ban
[RTD-isis-1]bandwidth-reference 1000
[RTD-isis-1]auto-cost enable
[RTD-isis-1]quit
[RTD]
查看isis
[RTD]dis isis route
Route information for IS-IS(1)
------------------------------
Level-1 IPv4 Forwarding Table
-----------------------------
IPv4 Destination IntCost ExtCost ExitInterface NextHop Flags
-------------------------------------------------------------------------------
192.168.2.0/24 10 NULL GE0/0 Direct D/L/-
192.168.1.0/30 156250 NULL Ser1/0 Direct D/L/-
Flags: D-Direct, R-Added to Rib, L-Advertised in LSPs, U-Up/Down bit set
Level-2 IPv4 Forwarding Table
-----------------------------
IPv4 Destination IntCost ExtCost ExitInterface NextHop Flags
-------------------------------------------------------------------------------
172.16.2.0/24 156260 NULL Ser1/0 192.168.1.1 R/-/-
172.16.1.0/24 156260 NULL Ser1/0 192.168.1.1 R/-/-
172.16.0.0/24 156270 NULL Ser1/0 192.168.1.1 R/-/-
192.168.2.0/24 10 NULL D/L/-
192.168.1.0/30 156250 NULL D/L/-
Flags: D-Direct, R-Added to Rib, L-Advertised in LSPs, U-Up/Down bit set
[RTD]
下
<RTD>sys
System View: return to User View with Ctrl+Z.
[RTD]isis
[RTD-isis-1]domain-authentication-mode simple plain test ip
[RTD-isis-1]qui
[RTD-isis-1]quit
[RTD]int s1/0
[RTD-Serial1/0]isis authentication-mode simple plain test ip
[RTD-Serial1/0]quit
[RTD]quit
<RTD>reset isis peer
<RTD>reset isis peer 0000.0000.0003
對比之前rtd的isis路由表
[RTD]dis isis route
Route information for IS-IS(1)
------------------------------
Level-1 IPv4 Forwarding Table
-----------------------------
IPv4 Destination IntCost ExtCost ExitInterface NextHop Flags
-------------------------------------------------------------------------------
192.168.2.0/24 10 NULL GE0/0 Direct D/L/-
192.168.1.0/30 156250 NULL Ser1/0 Direct D/L/-
Flags: D-Direct, R-Added to Rib, L-Advertised in LSPs, U-Up/Down bit set
Level-2 IPv4 Forwarding Table
-----------------------------
IPv4 Destination IntCost ExtCost ExitInterface NextHop Flags
-------------------------------------------------------------------------------
172.16.2.0/24 156260 NULL Ser1/0 192.168.1.1 R/-/-
172.16.1.0/24 156260 NULL Ser1/0 192.168.1.1 R/-/-
172.16.0.0/24 156270 NULL Ser1/0 192.168.1.1 R/-/-
192.168.2.0/24 10 NULL D/L/-
192.168.1.0/30 156250 NULL D/L/-
Flags: D-Direct, R-Added to Rib, L-Advertised in LSPs, U-Up/Down bit set
[RTD]
PCA
ping 192.168.2.1
PCB
區別
RTC的路由表與RTA有什麼區別?
RTC是L1/2路由器,所以會維護2個轉發表,分別是Level-1和Level-2的轉發表。