Route Leaking
Route leaking is defined in RFC 2966. For Level-1 (L1) routers, only level-1 routes are populated in the routing table. The L1 router has a default route to the nearest Level-1/Level-2 (L1/L2) router: This could result in sub-optimal routing in certain scenarios. Route leaking causes an L1/L2 router to advertise the level-2 routes in its database to the L1 router, thus allowing the L1 router to acknowledge the prefixes advertised by the Level-2 (L2) router. In this way, the L1 router has the ability to learn the true cost to reach other areas.
In the following example, R1 is the L1 router, R2 is the L1/L2 router doing the route leaking, and R3 is the L2 router. The following configuration is given only for R2, assuming that the adjacency with R1 and R3 are already up, and the route tables with appropriate routes are already populated.
Topology
Figure 13-108: Route Leaking Topology
Configuration
R1
#configure terminal | Enter configure mode. |
(config)#router isis 1 | Create an IS-IS routing instance (1). |
(config-router)#net 49.0001.0000.0000.0001.00 | Define the NET address. |
(config-router)#is-type level-1 | Configure instance as level-1. |
(config-if)#commit | Commit candidate configuration to the running configuration |
(config-router)#exit | Exit router mode. |
(config)#interface eth1 | Specify the interface (eth1)to configure and enter Interface mode. |
(config-if)#ip address 20.20.20.1/24 | Configure IP address on interface. |
(config-if)#isis circuit-type level-1 | Set the circuit type as level-1 for the interface |
(config-if)#ip router isis 1 | Enable IS-IS routing on interface eth1 (connected to R2). |
(config-if)#commit | Commit candidate configuration to the running configuration |
R2
#configure terminal | Enter configure mode. |
(config)#interface eth1 | Specify the interface (eth1)to configure and enter Interface mode. |
(config-if)#ip address 20.20.20.2/24 | Configure IP address on interface. |
(config-if)#ip router isis 1 | Enable IS-IS routing on interface eth1 (connected to R1). |
(config-if)#isis circuit-type level-1 | Configure instance as level-1-only routing. |
(config-if)#commit | Commit candidate configuration to the running configuration |
(config-if)#exit | Exit interface mode and return to Configure mode. |
(config)#interface eth2 | Specify the interface (eth2)to configure and enter Interface mode. |
(config-if)#ip address 30.30.30.1/24 | Configure IP address on interface. |
(config-if)#ip router isis 1 | Enable IS-IS routing on interface eth2 (connected to R3). |
(config-if)#isis circuit-type level-2-only | Configure instance as level-2-only routing. |
(config-if)#commit | Commit candidate configuration to the running configuration |
(config-if)#exit | Exit interface mode and return to Configure mode. |
(config)#router isis 1 | Create an IS-IS routing instance (1). |
(config-router)#net 49.0001.0000.0000.0002.00 | Define the NET address. |
(config-router-af)#redistribute isis level-2 into level-1 | Enable redistribution of isis routes from level-2 into level-1 |
(config-if)#commit | Commit candidate configuration to the running configuration |
R3
#configure terminal | Enter configure mode. |
(config)#interface lo | Specify the interface (lo)to configure and enter Interface mode. |
(config-if)#ip address 3.3.3.3/32 secondary | Configure IP address on loopback interface. |
(config-if)# ip router isis 1 | Enable IS-IS routing on interface lo |
(config-if)#commit | Commit candidate configuration to the running configuration |
(config-if)#exit | Exit interface mode and return to Configure mode. |
(config)#router isis 1 | Create an IS-IS routing instance (1). |
(config-router)#is-type level-2-only | Configure instance as level-2-only routing. |
(config-router)#net 49.0001.0000.0000.0003.00 | Define the NET address. |
(config-if)#commit | Commit candidate configuration to the running configuration |
(config-router)#exit | Exit router mode. |
(config)#interface eth2 | Specify the interface (eth2)to configure and enter Interface mode. |
(config-if)#ip address 30.30.30.2/24 | Configure IP address on interface. |
(config-if)#isis circuit-type level-2-only | Set the circuit type as level-2-only for the interface |
(config-if)#ip router isis 1 | Enable IS-IS routing on interface eth1 (connected to R2). |
(config-if)#commit | Commit candidate configuration to the running configuration |
In the example, route, i ia 3.3.3.3/32 [115/30] via 20.20.20.2, eth1, 00:12:29, is the L2 route leaked by the L1/L2 router into the L1 router.
Validation
R1#show clns neighbors
Total number of L1 adjacencies: 1
Total number of L2 adjacencies: 0
Total number of adjacencies: 1
Tag 1: VRF : default
System Id Interface SNPA State Holdtime Type Protocol
0000.0000.0002 eth1 5254.002a.230a Up 21 L1 IS-IS
R2#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
0000.0000.0001 eth1 5254.00dc.0b76 Up 5 L1 IS-IS
0000.0000.0003 eth2 5254.00a8.940d Up 6 L2 IS-IS
R3#show clns neighbors
Total number of L1 adjacencies: 0
Total number of L2 adjacencies: 1
Total number of adjacencies: 1
Tag 1: VRF : default
System Id Interface SNPA State Holdtime Type Protocol
0000.0000.0002 eth2 5254.007e.5ade Up 21 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
ia 3.3.3.3/32 30 20.20.20.2 eth1 0
C 20.20.20.0/24 10 -- eth1 0
ia 30.30.30.0/24 20 20.20.20.2 eth1 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
L2 3.3.3.3/32 20 30.30.30.2 eth2 0
C 20.20.20.0/24 10 -- eth1 0
C 30.30.30.0/24 10 -- eth2 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
C 3.3.3.3/32 10 -- lo 0
L2 20.20.20.0/24 20 30.30.30.1 eth2 0
C 30.30.30.0/24 10 -- 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"
i ia 3.3.3.3/32 [115/30] via 20.20.20.2, eth1, 00:20:53
C 10.12.30.0/24 is directly connected, eth0, 01:02:10
C 20.20.20.0/24 is directly connected, eth1, 00:48:08
i ia 30.30.30.0/24 [115/20] via 20.20.20.2, eth1, 00:23:30
C 127.0.0.0/8 is directly connected, lo, 01:02:10
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"
i L2 3.3.3.3/32 [115/20] via 30.30.30.2, eth2, 00:21:07
C 10.12.30.0/24 is directly connected, eth0, 01:01:55
C 20.20.20.0/24 is directly connected, eth1, 00:48:12
C 30.30.30.0/24 is directly connected, eth2, 00:48:12
C 127.0.0.0/8 is directly connected, lo, 01:01:55
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"
C 3.3.3.3/32 is directly connected, lo, 00:21:25
C 10.12.30.0/24 is directly connected, eth0, 01:01:26
i L2 20.20.20.0/24 [115/20] via 30.30.30.1, eth2, 00:24:06
C 30.30.30.0/24 is directly connected, eth2, 00:48:13
C 127.0.0.0/8 is directly connected, lo, 01:01:26
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
0000.0000.0001.00-00* 0x0000000C 0xE4B5 642 0/0/0
0000.0000.0001.01-00* 0x00000007 0x13C3 642 0/0/0
0000.0000.0002.00-00 0x00000012 0x8AC8 804 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
0000.0000.0001.00-00 0x00000003 0xF6AC 304 0/0/0
0000.0000.0001.01-00 0x00000002 0x1DBE 304 0/0/0
0000.0000.0002.00-00* 0x00000009 0x2ECA 358 0/0/0
IS-IS Level-2 Link State Database:
LSPID LSP Seq Num LSP Checksum LSP Holdtime ATT/P/OL
0000.0000.0002.00-00* 0x00000007 0x2F5A 353 0/0/0
0000.0000.0003.00-00 0x00000003 0x25E6 347 0/0/0
0000.0000.0003.02-00 0x00000002 0x24B0 347 0/0/0
R3#show isis database
Tag 1: VRF : default
IS-IS Level-2 Link State Database:
LSPID LSP Seq Num LSP Checksum LSP Holdtime ATT/P/OL
0000.0000.0002.00-00 0x00000007 0x2F5A 335 0/0/0
0000.0000.0003.00-00* 0x00000003 0x25E6 331 0/0/0
0000.0000.0003.02-00* 0x00000002 0x24B0 331 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
0000.0000.0001 --
0000.0000.0002 10 0000.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
0000.0000.0001 10 0000.0000.0001 eth1 5254.00dc.0b76
0000.0000.0002 --
IS-IS paths to level-2 routers
System Id Metric Next-Hop Interface SNPA
0000.0000.0002 --
0000.0000.0003 10 0000.0000.0003 eth2 5254.00a8.940d
R3#show isis topology
Tag 1: VRF : default
IS-IS paths to level-2 routers
System Id Metric Next-Hop Interface SNPA
0000.0000.0002 10 0000.0000.0002 eth2 5254.007e.5ade
0000.0000.0003 --