VRF to VRF default route
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2021 12:19 PM
Good Day,
I have two VRFs, let's say VRF_A & VRF_B.
I want to leak a default route in VRF A for VRF B so that VRF A hosts can access VRFB with there should be a default route only,
how can I achieve this?
Many thanks & Regards,
- Labels:
-
ASR 1000 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2021 02:11 PM
You can selectively export the default route from VRF_B to VRF_A using an export map, but you would also need to leak some routes from VRF_A to VRF_B for the return traffic.
vrf definition vrfB
rd 1:2
!
address-family ipv4
export map tovrfA
route-target export 1:2
route-target import 1:2
!
ip prefix-list default seq 10 permit 0.0.0.0/0
!
route-map tovrfA permit 10
match ip address prefix-list default
set extcommunity rt 1:1 additive
!
Regards,
Harold Ritter, CCIE #4168 (EI, SP)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2021 06:10 AM
If I'm following this correctly, why not just do a static route?
ip route vrf vrfA {network for vrfB} {subnet for vrfB} {interface/subinterface to vrfB's router/environment} {next hop IP}
Example:
VRF vrfA is 10.1.1.1/24 on gi 0/0.1
VRF vrfB is 10.2.1.1/24 on gi 0/0.2
Route in your inquiry:
ip route vrf vrfA 10.1.2.0 255.255.255.0 gi 0/0.2 10.2.1.1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2021 07:07 AM
Hi Steven,
You could certainly use a static route as you mentioned. If the default route present in VRF_B is learned dynamically and you want to keep the dynamic nature through the export/import process, you could then use the export map as I suggested.
Regards,
Harold Ritter, CCIE #4168 (EI, SP)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2021 08:44 AM
Yeah, and after reading your response I had forgotten that the return traffic would also need to be static. Route maps would be nicer, but a bit deeper, whereas the static would be slightly cleaner but involve more administrative overhead to monitor and administer.
I love using route maps for redistributions, think that's by far the coolest implement in routing the past few decades.
At least the OP has a few approaches now. Hopefully one resolves the issue.
