OcNOS-RON : Layer 3 Guide : VRF Lite Configuration Guide : Inter-VRF Route Leaking Configuration : Static Leaking
Static Leaking
Static route leaking directly between VRFs is not supported. What does work is routing traffic from a VRF to the global default VRF routing table. One advantage of using static route leaking is that you can configure exactly which routes are reachable without configuring BGP.
Topology
Figure 6-9: Static leaking
Configuration
The following steps describe how to configure static leaking.
RTR1
 
RTR1#configure terminal
Enter configure mode.
RTR1(config)#interface xe5
Enter interface mode
RTR1(config-if)#ip address 5.5.5.5/24
Assign IP address 5.5.5.5 to interface xe5
RTR1(config-if)#exit
Exit interface mode
RTR1(config)#interface xe27
Enter interface mode
RTR1(config-if)#ip address 1.1.1.1/24
Assign IP address 1.1.1.1 to interface xe27
RTR1(config-if)#exit
Exit interface mode
RTR2
 
RTR2#configure terminal
Enter configure mode.
RTR2(config)#interface xe1/2
Enter interface mode
RTR2(config-if)#ip address 1.1.1.2/24
Assign IP address 1.1.1.2 to interface xe1/2
RTR2(config-if)#exit
Exit interface mode
RTR2(config)#ip vrf vrf1
Create VRF vrf1
RTR2(config-vrf)#exit
Exit VRF mode
RTR2(config)#interface xe3/1
Enter interface mode
RTR2(config-if)#ip vrf forwarding vrf1
Associate xe3/1 to vrf1
RTR2(config-if)#ip address 6.6.6.6/24
Assign IP address 6.6.6.6 to interface xe3/1
RTR2(config-if)#exit
Exit interface mode
RTR2(config)#ip route vrf vrf1 5.5.5.0/24 1.1.1.1 xe1/2 global
Add static route to reach global default VRF table
RTR2(config)#exit
Exit configure mode
Validation
RTR2#show ip route vrf all
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,
v - vrf leaked
* - candidate default
 
IP Route Table for VRF "default"
C 1.1.1.0/24 is directly connected, xe1/2, 00:00:05
C 127.0.0.0/8 is directly connected, lo, 00:20:38
IP Route Table for VRF "management"
Gateway of last resort is 10.12.29.1 to network 0.0.0.0
 
S* 0.0.0.0/0 [1/0] via 10.12.29.1, eth0, 00:20:38
C 10.12.29.0/24 is directly connected, eth0, 00:20:38
C 127.0.0.0/8 is directly connected, lo.management, 00:20:38
IP Route Table for VRF "vrf1"
S v5.5.5.0/24 [1/0] via 1.1.1.1, xe1/2, 00:05:20
C 6.6.6.0/24 is directly connected, xe3/1, 00:07:06
C 127.0.0.0/8 is directly connected, lo.vrf1, 00:12:25
 
RTR2#show ip route vrf all database
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,
v - vrf leaked
> - selected route, * - FIB route, p - stale info
 
IP Route Table for VRF "default"
C *> 1.1.1.0/24 is directly connected, xe1/2, 00:00:51
C *> 127.0.0.0/8 is directly connected, lo, 00:21:24
IP Route Table for VRF "management"
S *> 0.0.0.0/0 [1/0] via 10.12.29.1, eth0, 00:21:24
C *> 10.12.29.0/24 is directly connected, eth0, 00:21:24
C *> 127.0.0.0/8 is directly connected, lo.management, 00:21:24
IP Route Table for VRF "vrf1"
S *> v5.5.5.0/24 [1/0] via 1.1.1.1, xe1/2, 00:06:06
C *> 6.6.6.0/24 is directly connected, xe3/1, 00:07:52
C *> 127.0.0.0/8 is directly connected, lo.vrf1, 00:13:11
Last modified date: 08/28/2023