配置IS-IS的DIS选择示例
介绍IS-IS DIS选举的配置过程,包括在各设备上配置IS-IS的基本功能和DIS优先级。
组网需求
如图9-2所示:
路由器DeviceA、DeviceB、DeviceC和DeviceD都运行IS-IS路由协议以实现互连。
路由器DeviceA、DeviceB、DeviceC和DeviceD属于同一区域10,网络类型为广播网(以太网)。
DeviceA和DeviceB是Level-1-2设备,DeviceC是Level-1设备,DeviceD是Level-2设备。
DeviceA的DIS优先级为100。
要求通过改变接口的DIS优先级,将DeviceA配置为Level-1-2的DIS设备(DR)。
设备名称 |
接口 |
IP地址 |
---|---|---|
DeviceA |
GE0/1/0 |
10.1.1.1/24 |
DeviceB |
GE0/1/0 |
10.1.1.2/24 |
DeviceC |
GE0/1/0 |
10.1.1.3/24 |
DeviceD |
GE0/1/0 |
10.1.1.4/24 |
操作步骤
- 配置各接口的IPv4地址(略)
- 查看各路由器上GE接口的MAC地址。当各接口的DIS优先级相同时,拥有MAC地址大的接口的路由器将被选择为DIS
# 查看DeviceA上接口GigabitEthernet0/1/0的MAC地址。
[~DeviceA] display arp interface gigabitethernet 0/1/0
ARP timeout:1200s IP ADDRESS MAC ADDRESS EXPIRE(M) TYPE INTERFACE VPN-INSTANCE VLAN/CEVLAN PVC ------------------------------------------------------------------------------ 10.1.1.1 00e0-fc10-afec I GE0/1/0 ------------------------------------------------------------------------------ Total:1 Dynamic:0 Static:0 Interface:1 Remote:0
# 查看DeviceB上接口GigabitEthernet0/1/0的MAC地址。
[~DeviceB] display arp interface gigabitethernet 0/1/0
ARP timeout:1200s IP ADDRESS MAC ADDRESS EXPIRE(M) TYPE INTERFACE VPN-INSTANCE VLAN/CEVLAN PVC ------------------------------------------------------------------------------ 10.1.1.2 00e0-fccd-acdf I GE0/1/0 ------------------------------------------------------------------------------ Total:1 Dynamic:0 Static:0 Interface:1 Remote:0
# 查看DeviceC上接口GigabitEthernet0/1/0的MAC地址。
[~DeviceC] display arp interface gigabitethernet 0/1/0
ARP timeout:1200s IP ADDRESS MAC ADDRESS EXPIRE(M) TYPE INTERFACE VPN-INSTANCE VLAN/CEVLAN PVC ------------------------------------------------------------------------------ 10.1.1.3 00e0-fc50-25fe I GE0/1/0 ------------------------------------------------------------------------------ Total:1 Dynamic:0 Static:0 Interface:1 Remote:0
# 查看DeviceD上接口GigabitEthernet0/1/0的MAC地址。
[~DeviceD] display arp interface gigabitethernet 0/1/0
ARP timeout:1200s IP ADDRESS MAC ADDRESS EXPIRE(M) TYPE INTERFACE VPN-INSTANCE VLAN/CEVLAN PVC ------------------------------------------------------------------------------ 10.1.1.4 00e0-fc50-25fe I GE0/1/0 ------------------------------------------------------------------------------ Total:1 Dynamic:0 Static:0 Interface:1 Remote:0
- 启动IS-IS
# 配置DeviceA。
[~DeviceA] isis 1
[*DeviceA-isis-1] network-entity 10.0000.0000.0001.00
[*DeviceA-isis-1] quit
[*DeviceA] interface gigabitethernet 0/1/0
[*DeviceA-GigabitEthernet0/1/0] isis enable 1
[*DeviceA-GigabitEthernet0/1/0] commit
[~DeviceA-GigabitEthernet0/1/0] quit
# 配置DeviceB。
[~DeviceB] isis 1
[*DeviceB-isis-1] network-entity 10.0000.0000.0002.00
[*DeviceB-isis-1] quit
[*DeviceB] interface gigabitethernet 0/1/0
[*DeviceB-GigabitEthernet0/1/0] isis enable 1
[*DeviceB-GigabitEthernet0/1/0] commit
[~DeviceB-GigabitEthernet0/1/0] quit
# 配置DeviceC。
[~DeviceC] isis 1
[*DeviceC-isis-1] network-entity 10.0000.0000.0003.00
[*DeviceC-isis-1] is-level level-1
[*DeviceC-isis-1] quit
[*DeviceC] interface gigabitethernet 0/1/0
[*DeviceC-GigabitEthernet0/1/0] isis enable 1
[*DeviceC-GigabitEthernet0/1/0] commit
[~DeviceC-GigabitEthernet0/1/0] quit
# 配置DeviceD。
[~DeviceD] isis 1
[*DeviceD-isis-1] network-entity 10.0000.0000.0004.00
[*DeviceD-isis-1] is-level level-2
[*DeviceD-isis-1] quit
[*DeviceD] interface gigabitethernet 0/1/0
[*DeviceD-GigabitEthernet0/1/0] isis enable 1
[*DeviceD-GigabitEthernet0/1/0] commit
[~DeviceD-GigabitEthernet0/1/0] quit
# 查看DeviceA的IS-IS邻居信息。
[~DeviceA] display isis peer
Peer information for ISIS(1) System Id Interface Circuit Id State HoldTime Type PRI -------------------------------------------------------------------------------- 0000.0000.0002 GE0/1/0 0000.0000.0001.01 Up 30s L1(L1L2) 64 0000.0000.0003 GE0/1/0 0000.0000.0001.01 Up 30s L1 64 0000.0000.0002 GE0/1/0 0000.0000.0001.01 Up 30s L2(L1L2) 64 0000.0000.0004 GE0/1/0 0000.0000.0001.01 Up 30s L2 64 Total Peer(s): 4
# 显示DeviceA的IS-IS接口信息。
[~DeviceA] display isis interface
Interface information for ISIS(1) --------------------------------- Interface Id IPV4.State IPV6.State MTU Type DIS GE0/1/0 001 Up Mtu:Up/Lnk:Dn/IP:Dn 1497 L1/L2 No/No
# 显示DeviceB的IS-IS接口信息。
[~DeviceB] display isis interface
Interface information for ISIS(1) --------------------------------- Interface Id IPV4.State IPV6.State MTU Type DIS GE0/1/0 001 Up Mtu:Up/Lnk:Dn/IP:Dn 1497 L1/L2 Yes/No
# 显示DeviceD的IS-IS接口信息。
[~DeviceD] display isis interface
Interface information for ISIS(1) --------------------------------- Interface Id IPV4.State IPV6.State MTU Type DIS GE0/1/0 001 Up Mtu:Up/Lnk:Dn/IP:Dn 1497 L1/L2 No/Yes
从接口信息中可以看到,在使用缺省DIS优先级的情况下,在Level-1级别的设备中,DeviceB上接口的MAC地址最大,因此DeviceB为Level-1的DIS;在Level-2级别的设备中,DeviceD上接口的MAC地址最大,因此DeviceD为Level-2的DIS。Level-1和Level-2的伪节点分别是0000.0000.0002.01和0000.0000.0004.01。
- 配置DeviceA的DIS优先级
[~DeviceA] interface gigabitethernet 0/1/0
[~DeviceA-GigabitEthernet0/1/0] isis dis-priority 100
[*DeviceA-GigabitEthernet0/1/0] commit
# 查看DeviceA的IS-IS邻居信息。
[~DeviceA] display isis peer
Peer information for ISIS(1) System Id Interface Circuit Id State HoldTime Type PRI -------------------------------------------------------------------------------- 0000.0000.0002 GE0/1/0 0000.0000.0001.01 Up 27s L1(L1L2) 64 0000.0000.0003 GE0/1/0 0000.0000.0001.01 Up 27s L1 64 0000.0000.0002 GE0/1/0 0000.0000.0001.01 Up 27s L2(L1L2) 64 0000.0000.0004 GE0/1/0 0000.0000.0001.01 Up 27s L2 64 Total Peer(s): 4
- 验证配置结果
# 查看DeviceA的IS-IS接口信息。
[~DeviceA] display isis interface
Interface information for ISIS(1) --------------------------------- Interface Id IPV4.State IPV6.State MTU Type DIS GE0/1/0 001 Up Mtu:Up/Lnk:Dn/IP:Dn 1497 L1/L2 Yes/Yes
从上述信息中可以看到,在改变IS-IS接口的DIS优先级后,DeviceA立即成为Level-1-2的DIS(DR),且伪节点是0000.0000.0001.01。
# 显示DeviceB的IS-IS邻居和接口信息。
[~DeviceB] display isis peer
Peer information for ISIS(1) System Id Interface Circuit Id State HoldTime Type PRI -------------------------------------------------------------------------------- 0000.0000.0001 GE0/1/0 0000.0000.0001.01 Up 26s L1(L1L2) 100 0000.0000.0003 GE0/1/0 0000.0000.0001.01 Up 26s L1 64 0000.0000.0001 GE0/1/0 0000.0000.0001.01 Up 26s L2(L1L2) 100 0000.0000.0004 GE0/1/0 0000.0000.0001.01 Up 26s L2 64 Total Peer(s): 4
[~DeviceB] display isis interface
Interface information for ISIS(1) --------------------------------- Interface Id IPV4.State IPV6.State MTU Type DIS GE0/1/0 001 Up Mtu:Up/Lnk:Dn/IP:Dn 1497 L1/L2 No/No
# 显示DeviceD的IS-IS邻居和接口信息。
[~DeviceD] display isis peer
Peer information for ISIS(1) System Id Interface Circuit Id State HoldTime Type PRI -------------------------------------------------------------------------------- 0000.0000.0001 GE0/1/0 0000.0000.0001.01 Up 20s L2 100 0000.0000.0002 GE0/1/0 0000.0000.0001.01 Up 20s L2 64 Total Peer(s): 2
[~DeviceD] display isis interface
Interface information for ISIS(1) --------------------------------- Interface Id IPV4.State IPV6.State MTU Type DIS GE0/1/0 001 Up Mtu:Up/Lnk:Dn/IP:Dn 1497 L1/L2 No/No
配置文件
DeviceA的配置文件
#
sysname DeviceA
#
isis 1
network-entity 10.0000.0000.0001.00
#
interface GigabitEthernet0/1/0
undo shutdown
ip address 10.1.1.1 255.255.255.0
isis enable 1
isis dis-priority 100 level-1
isis dis-priority 100 level-2
#
return
DeviceB的配置文件
#
sysname DeviceB
#
isis 1
network-entity 10.0000.0000.0002.00
#
interface GigabitEthernet0/1/0
undo shutdown
ip address 10.1.1.2 255.255.255.0
isis enable 1
#
return
DeviceC的配置文件
#
sysname DeviceC
#
isis 1
is-level level-1
network-entity 10.0000.0000.0003.00
#
interface GigabitEthernet0/1/0
undo shutdown
ip address 10.1.1.3 255.255.255.0
isis enable 1
#
return
DeviceD的配置文件
#
sysname DeviceD
#
isis 1
is-level level-2
network-entity 10.0000.0000.0004.00
#
interface GigabitEthernet0/1/0
undo shutdown
ip address 10.1.1.4 255.255.255.0
isis enable 1
#
return