IS-IS Distance
Administrative distance in IS-IS can be configured for a specified source ID or for all routes.
This example shows configuring the IS-IS administrative distance for the IPv4 address family.
Topology
Figure 13-110: IS-IS Distance Topology
Configuration
R1
#configure terminal | Enter configure mode. |
(config)#interface eth1 | Enter interface mode. |
(config-if)#ip address 1.1.1.1/24 | Assign the IP address on this interface (eth1). |
(config-if)#ip router isis 1 | Enable IS-IS routing on interface eth1. |
(config-if)#commit | Commit candidate configuration to the running configuration |
(config-if)#exit | |
(config)#ip route 150.1.1.0/24 eth1 | Configure static routes. |
(config)#router isis 1 | Create an IS-IS routing instance (1). |
(config-router)#net 49.0001.0000.0001.00 | Set a Network Entity Title (NET) for this instance, specifying the address and the system ID. |
(config-router)#redistribute static | Redistribute the static routes. |
(config-if)#commit | Commit candidate configuration to the running configuration |
R2
#configure terminal | Enter configure mode |
(config)#ip access-list DIST | Enter access list mode |
(config-ip-acl)#permit ipip 88.88.1.2/32 any | Create an access list to permit the 88.88.1.2/32 route from R3. |
(config-if)#commit | Commit candidate configuration to the running configuration |
(config-ip-acl)#exit | Exit access list mode |
(config)#interface eth1 | Enter interface mode. |
(config-if)#ip address 1.1.1.2/24 | Assign the IP address on this interface (eth1). |
(config-if)#ip router isis 1 | Enable IS-IS routing on interface eth1 |
(config-if)#commit | Commit candidate configuration to the running configuration |
(config-if)#exit | Exit interface mode |
(config)#interface eth2 | Enter interface mode. |
(config-if)#ip address 2.2.2.1/24 | Assign the IP address on this interface (eth2). |
(config-if)#ip router isis 1 | Enable IS-IS routing on interface eth2 |
(config-if)#commit | Commit candidate configuration to the running configuration |
(config-if)#exit | Exit interface mode |
(config)#router isis 1 | Create an IS-IS routing instance (1). |
(config-router)#net 49.0001.0000.0002.00 | Specify the NET address. |
(config-router)#distance 100 | Configure the administrative distance for all routes received from R1 and R2. |
(config-router)#distance 20 0001.0000.0001 | Configure the administrative distance for all routes received from R1. This command overwrites the applied distance, 100, and will apply distance 20 for all routes received from R1. |
(config-router)#distance 30 0001.0000.0003 DIST | Configure the distance, 30, to the route, 88.88.1.2/32, received from R3. All other routes from R3 (for example, 70.70.1.0/24) will have the distance applied as 100. If the distance, 100, is not configured, all other routes will have a default distance of 115. |
(config-if)#commit | Commit candidate configuration to the running configuration |
R3
#configure terminal | Enter configure mode. |
(config)#interface eth1 | Enter interface mode. |
(config-if)#ip address 2.2.2.2/24 | Assign the IP address on this interface (eth1). |
(config-if)#ip router isis 1 | Enable IS-IS routing on interface eth1. |
(config-if)#commit | Commit candidate configuration to the running configuration |
(config-if)#exit | Exit interface mode. |
(config)#ip route 88.88.1.2/32 eth2 | Configure static routes |
(config)#ip route 70.70.1.0/24 eth2 | Configure static routes |
(config)#router isis 1 | Create an IS-IS routing instance (1). |
(config-router)#net 49.0001.0000.0003.00 | Specify the NET address. |
(config-router)#redistribute static | Redistribute the static routes. |
(config-if)#commit | Commit candidate configuration to the running configuration |
Validation
R1#show clns neighbors
Total number of L1 adjacencies: 1
Total number of L2 adjacencies: 1
Total number of adjacencies: 2
Tag 1: VRF : default
System Id Interface SNPA State Holdtime Type Protocol
0001.0000.0002 eth1 5254.002a.230a Up 18 L1 IS-IS
Up 18 L2 IS-IS
R2#show clns neighbors
Total number of L1 adjacencies: 2
Total number of L2 adjacencies: 2
Total number of adjacencies: 4
Tag 1: VRF : default
System Id Interface SNPA State Holdtime Type Protocol
0001.0000.0001 eth1 5254.00dc.0b76 Up 7 L1 IS-IS
Up 7 L2 IS-IS
0001.0000.0003 eth2 5254.00a8.940d Up 8 L1 IS-IS
Up 8 L2 IS-IS
R3#show clns neighbors
Total number of L1 adjacencies: 1
Total number of L2 adjacencies: 1
Total number of adjacencies: 2
Tag 1: VRF : default
System Id Interface SNPA State Holdtime Type Protocol
0001.0000.0002 eth2 5254.007e.5ade Up 20 L1 IS-IS
Up 20 L2 IS-IS
R1#show ip isis route
Codes: C - connected, E - external, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, D - discard, e - external metric
** - invalid
Tag 1: VRF : default
Destination Metric Next-Hop Interface Tag
C 1.1.1.0/24 10 -- eth1 0
L1 2.2.2.0/24 20 1.1.1.2 eth1 0
L2 70.70.1.0/24 20 1.1.1.2 eth1 0
L2 88.88.1.2/32 20 1.1.1.2 eth1 0
E 150.1.1.0/24 0 -- -- 0
R2#show ip isis route
Codes: C - connected, E - external, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, D - discard, e - external metric
** - invalid
Tag 1: VRF : default
Destination Metric Next-Hop Interface Tag
C 1.1.1.0/24 10 -- eth1 0
C 2.2.2.0/24 10 -- eth2 0
L2 70.70.1.0/24 10 2.2.2.2 eth2 0
L2 88.88.1.2/32 10 2.2.2.2 eth2 0
L2 150.1.1.0/24 10 1.1.1.1 eth1 0
R3#show ip isis route
Codes: C - connected, E - external, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, D - discard, e - external metric
** - invalid
Tag 1: VRF : default
Destination Metric Next-Hop Interface Tag
L1 1.1.1.0/24 20 2.2.2.1 eth2 0
C 2.2.2.0/24 10 -- eth2 0
E 70.70.1.0/24 0 -- -- 0
E 88.88.1.2/32 0 -- -- 0
L2 150.1.1.0/24 20 2.2.2.1 eth2 0
R1#show ip route
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2,
ia - IS-IS inter area, E - EVPN,
v - vrf leaked
* - candidate default
IP Route Table for VRF "default"
C 1.1.1.0/24 is directly connected, eth1, 00:30:56
i L1 2.2.2.0/24 [115/20] via 1.1.1.2, eth1, 00:26:01
C 10.12.30.0/24 is directly connected, eth0, 00:33:46
i L2 70.70.1.0/24 [115/20] via 1.1.1.2, eth1, 00:21:39
i L2 88.88.1.2/32 [115/20] via 1.1.1.2, eth1, 00:15:04
C 127.0.0.0/8 is directly connected, lo, 00:33:46
S 150.1.1.0/24 [1/0] is directly connected, eth1, 00:29:03
Gateway of last resort is not set
R2#show ip route
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2,
ia - IS-IS inter area, E - EVPN,
v - vrf leaked
* - candidate default
IP Route Table for VRF "default"
C 1.1.1.0/24 is directly connected, eth1, 00:26:46
C 2.2.2.0/24 is directly connected, eth2, 00:26:30
C 10.12.30.0/24 is directly connected, eth0, 00:33:21
i L2 70.70.1.0/24 [100/10] via 2.2.2.2, eth2, 00:21:55
i L2 88.88.1.2/32 [30/10] via 2.2.2.2, eth2, 00:15:09
C 127.0.0.0/8 is directly connected, lo, 00:33:21
i L2 150.1.1.0/24 [100/10] via 1.1.1.1, eth1, 00:25:53
Gateway of last resort is not set
R3#show ip route
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2,
ia - IS-IS inter area, E - EVPN,
v - vrf leaked
* - candidate default
IP Route Table for VRF "default"
i L1 1.1.1.0/24 [115/20] via 2.2.2.1, eth2, 00:22:56
C 2.2.2.0/24 is directly connected, eth2, 00:23:01
C 10.12.30.0/24 is directly connected, eth0, 00:33:57
S 70.70.1.0/24 [1/0] is directly connected, eth2, 00:23:01
S 88.88.1.2/32 [1/0] is directly connected, eth2, 00:16:07
C 127.0.0.0/8 is directly connected, lo, 00:33:57
i L2 150.1.1.0/24 [115/20] via 2.2.2.1, eth2, 00:22:42
Gateway of last resort is not set
R1#show isis database
Tag 1: VRF : default
IS-IS Level-1 Link State Database:
LSPID LSP Seq Num LSP Checksum LSP Holdtime ATT/P/OL
0001.0000.0001.00-00* 0x00000003 0x2AEC 448 0/0/0
0001.0000.0001.01-00* 0x00000002 0x32A4 448 0/0/0
0001.0000.0002.00-00 0x00000004 0x5A80 698 0/0/0
0001.0000.0003.00-00 0x00000006 0xE820 702 0/0/0
0001.0000.0003.01-00 0x00000002 0x3E94 698 0/0/0
IS-IS Level-2 Link State Database:
LSPID LSP Seq Num LSP Checksum LSP Holdtime ATT/P/OL
0001.0000.0001.00-00* 0x00000008 0xB20F 703 0/0/0
0001.0000.0001.01-00* 0x00000002 0x32A4 448 0/0/0
0001.0000.0002.00-00 0x00000004 0x5A80 698 0/0/0
0001.0000.0003.00-00 0x0000000A 0xB2CE 1108 0/0/0
0001.0000.0003.01-00 0x00000002 0x3E94 698 0/0/0
R2#show isis database
Tag 1: VRF : default
IS-IS Level-1 Link State Database:
LSPID LSP Seq Num LSP Checksum LSP Holdtime ATT/P/OL
0001.0000.0001.00-00 0x00000003 0x2AEC 402 0/0/0
0001.0000.0001.01-00 0x00000002 0x32A4 401 0/0/0
0001.0000.0002.00-00* 0x00000004 0x5A80 653 0/0/0
0001.0000.0003.00-00 0x00000006 0xE820 656 0/0/0
0001.0000.0003.01-00 0x00000002 0x3E94 652 0/0/0
IS-IS Level-2 Link State Database:
LSPID LSP Seq Num LSP Checksum LSP Holdtime ATT/P/OL
0001.0000.0001.00-00 0x00000008 0xB20F 657 0/0/0
0001.0000.0001.01-00 0x00000002 0x32A4 401 0/0/0
0001.0000.0002.00-00* 0x00000004 0x5A80 653 0/0/0
0001.0000.0003.00-00 0x0000000A 0xB2CE 1062 0/0/0
0001.0000.0003.01-00 0x00000002 0x3E94 652 0/0/0
R3#show isis database
Tag 1: VRF : default
IS-IS Level-1 Link State Database:
LSPID LSP Seq Num LSP Checksum LSP Holdtime ATT/P/OL
0001.0000.0001.00-00 0x00000003 0x2AEC 317 0/0/0
0001.0000.0001.01-00 0x00000002 0x32A4 317 0/0/0
0001.0000.0002.00-00 0x00000004 0x5A80 568 0/0/0
0001.0000.0003.00-00* 0x00000006 0xE820 573 0/0/0
0001.0000.0003.01-00* 0x00000002 0x3E94 569 0/0/0
IS-IS Level-2 Link State Database:
LSPID LSP Seq Num LSP Checksum LSP Holdtime ATT/P/OL
0001.0000.0001.00-00 0x00000008 0xB20F 573 0/0/0
0001.0000.0001.01-00 0x00000002 0x32A4 317 0/0/0
0001.0000.0002.00-00 0x00000004 0x5A80 568 0/0/0
0001.0000.0003.00-00* 0x0000000A 0xB2CE 979 0/0/0
0001.0000.0003.01-00* 0x00000002 0x3E94 569 0/0/0
R1#show isis topology
Tag 1: VRF : default
IS-IS paths to level-1 routers
System Id Metric Next-Hop Interface SNPA
0001.0000.0001 --
0001.0000.0002 10 0001.0000.0002 eth1 5254.002a.230a
0001.0000.0003 20 0001.0000.0002 eth1 5254.002a.230a
IS-IS paths to level-2 routers
System Id Metric Next-Hop Interface SNPA
0001.0000.0001 --
0001.0000.0002 10 0001.0000.0002 eth1 5254.002a.230a
0001.0000.0003 20 0001.0000.0002 eth1 5254.002a.230a
R2#show isis topology
Tag 1: VRF : default
IS-IS paths to level-1 routers
System Id Metric Next-Hop Interface SNPA
0001.0000.0001 10 0001.0000.0001 eth1 5254.00dc.0b76
0001.0000.0002 --
0001.0000.0003 10 0001.0000.0003 eth2 5254.00a8.940d
IS-IS paths to level-2 routers
System Id Metric Next-Hop Interface SNPA
0001.0000.0001 10 0001.0000.0001 eth1 5254.00dc.0b76
0001.0000.0002 --
0001.0000.0003 10 0001.0000.0003 eth2 5254.00a8.940d
R3#show isis topology
Tag 1: VRF : default
IS-IS paths to level-1 routers
System Id Metric Next-Hop Interface SNPA
0001.0000.0001 20 0001.0000.0002 eth2 5254.007e.5ade
0001.0000.0002 10 0001.0000.0002 eth2 5254.007e.5ade
0001.0000.0003 --
IS-IS paths to level-2 routers
System Id Metric Next-Hop Interface SNPA
0001.0000.0001 20 0001.0000.0002 eth2 5254.007e.5ade
0001.0000.0002 10 0001.0000.0002 eth2 5254.007e.5ade
0001.0000.0003 --