天天看点

H3C ISIS重分布路由实验 和 ISIS多区域实验ISIS

ISIS

常用命令

dis isis peer查看邻居
dis ip routing-table	
dis isis lsdb 查看isis数据库
dis isis lsdb  verbose 
           

重分布路由实验

拓扑图

H3C ISIS重分布路由实验 和 ISIS多区域实验ISIS

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

H3C ISIS重分布路由实验 和 ISIS多区域实验ISIS

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

H3C ISIS重分布路由实验 和 ISIS多区域实验ISIS
ping 192.168.2.1
           

PCB

H3C ISIS重分布路由实验 和 ISIS多区域实验ISIS

区别

RTC的路由表与RTA有什么区别?

RTC是L1/2路由器,所以会维护2个转发表,分别是Level-1和Level-2的转发表。

继续阅读