06-03-2019 12:45 AM
Hi everyone,
How to import VRF route-table to Global route-table
For example:
R1#sho ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, 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, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
12.0.0.0/24 is subnetted, 1 subnets
C 12.1.1.0 is directly connected, FastEthernet0/0
R1#sho ip route vrf A
Routing Table: A
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, 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, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
13.0.0.0/24 is subnetted, 1 subnets
C 13.1.1.0 is directly connected, FastEthernet0/1
I want the global route-table have subnet 13.1.1.0/24 and VRF A route-table have 12.1.1.0/24 too..
I know the VRF route-table can import each other ,but How to import VRF route-table to Global route-table?
Thank you
Solved! Go to Solution.
06-03-2019 02:05 AM - edited 06-03-2019 02:07 AM
Hello
VRF import/export maps
ip prefix-list GlobalRoute permit 12.1.1.0/24
ip prefix-list VRFroute permit 13.1.1.0/24
route-map intoVRF
match ip address prefix-list GlobalRoute
route-map intoGlobal
match ip address prefix-list VRFroute
Ip Vrf A
rd x:x
import ipv4 unicast map intoVRF
Export ipv4 unicast map intoGlobal
06-03-2019 01:31 AM - edited 06-03-2019 01:33 AM
Hello
@tianwen.zhao wrote:
Hi everyone,
How to import VRF route-table to Global route-table
For example:
R1#sho ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, 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, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static routeGateway of last resort is not set
12.0.0.0/24 is subnetted, 1 subnets
C 12.1.1.0 is directly connected, FastEthernet0/0
R1#sho ip route vrf A
Routing Table: A
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, 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, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static routeGateway of last resort is not set
13.0.0.0/24 is subnetted, 1 subnets
C 13.1.1.0 is directly connected, FastEthernet0/1
I want the global route-table have subnet 13.1.1.0/24 and VRF A route-table have 12.1.1.0/24 too..
You could use static routes or import maps depending of what kind of vrf you are running.
Below is a example of vrf -lite route into global rib and global rib into vrf table also it you runing any IGP then naturally the vrf route will also need to be advertised into that for remote reachability.
ip route 13.1.1.0 255.255.255.0 fastethernet 0/1
ip route vrf A 12.1.1.0 255.255.255.0 (nexthop ip address) global
06-03-2019 01:40 AM - edited 06-03-2019 01:44 AM
Thank you for your reply.
Could you please also tell me how to use import maps ?
Thank you so much
06-03-2019 02:05 AM - edited 06-03-2019 02:07 AM
Hello
VRF import/export maps
ip prefix-list GlobalRoute permit 12.1.1.0/24
ip prefix-list VRFroute permit 13.1.1.0/24
route-map intoVRF
match ip address prefix-list GlobalRoute
route-map intoGlobal
match ip address prefix-list VRFroute
Ip Vrf A
rd x:x
import ipv4 unicast map intoVRF
Export ipv4 unicast map intoGlobal
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide