cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2531
Views
6
Helpful
3
Replies

How to import VRF route-table to Global route-table

tianwen.zhao
Level 1
Level 1

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 

1 Accepted Solution

Accepted Solutions

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

 


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

View solution in original post

3 Replies 3

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 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..

 


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


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Thank you for your reply.

Could you please also tell me how to use import maps ?

Thank you so much

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

 


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul
Review Cisco Networking for a $25 gift card