04-16-2022
03:08 AM
- last edited on
04-19-2022
03:04 AM
by
Translator
Hello
I may lab I am trying to configure router Loc1Office1 to export only LAN 10.1.0.0/24 to route target RT 65000:100 (this is route target for shared services)
However, using my config, it looks like all LANs are exported into this RT, not only the one I want.
Attached is the config of my environment.
The main idea of what I am trying to achieve is in these lines.
ON Loc1-Core1 router
conf t
hostname Loc1Core1
!----------------------------------------------------------------------------------------------
! For Loc1Office1 VRF I create a list which will allow only LAN to reach Shared1VRF, not Guest
!----------------------------------------------------------------------------------------------
ip prefix-list PL-Loc1Office1-1 permit 10.1.0.0/24
route-map RM-Loc1Office1-Export-1 permit 10
match ip address PL-Loc1Office1-1
set extcommunity rt 65000:100 additive
exit
vrf definition vrf-loc1office1
description vrf for office 1
rd 65000:1
route-target export 65000:1
route-target import 65000:1
route-target import 65000:2
route-target import 65000:3
!bellow import from loc1shared1
route-target import 65000:100
!bellow import from loc1internet1
route-target import 65000:101
address-family ipv4
!Export the map so that the Guest LAN does not show up in shared1 VRF
export map RM-Loc1Office1-Export-1
exit
exit
sh bgp vpnv4 unicast vrf vrf-loc1office1 10.1.0.0
vrf definition vrf-loc1shared1
description vrf for shared services
rd 65000:100
route-target export 65000:100
route-target import 65000:100
!bellow import from locations
route-target import 65000:2
route-target import 65000:3
!bellow import din loc1internet1
route-target import 65000:101
address-family ipv4
exit
exit
Any tips much appreciated.
Best regards!
Solved! Go to Solution.
04-16-2022
04:50 AM
- last edited on
04-19-2022
03:06 AM
by
Translator
ip prefix-list PL-Loc1Office1-1 permit 10.1.0.0/24
route-map RM-Loc1Office1-Export-1 permit 10
match ip address prefix-list PL-Loc1Office1-1<- prefix-list
set extcommunity rt 65000:1001 additive <-different RT that not match your router-target export 65000:100
04-16-2022
04:50 AM
- last edited on
04-19-2022
03:06 AM
by
Translator
ip prefix-list PL-Loc1Office1-1 permit 10.1.0.0/24
route-map RM-Loc1Office1-Export-1 permit 10
match ip address prefix-list PL-Loc1Office1-1<- prefix-list
set extcommunity rt 65000:1001 additive <-different RT that not match your router-target export 65000:100
04-16-2022
05:10 AM
- last edited on
04-19-2022
03:08 AM
by
Translator
Thank you!
This did the trick
match ip address prefix-list PL-Loc1Office1-1<- prefix-list
The idea was to present 10.1.0.0/24 into 65000:100 while 10.1.0.0/24 and 10.1.1.0/24 would be present into 65000:1
Loc1Core1#sh bgp vpnv4 unicast vrf vrf-loc1office1 10.1.0.0
BGP routing table entry for 65000:1:10.1.0.0/24, version 59
Paths: (1 available, best #1, table vrf-loc1office1)
Not advertised to any peer
Refresh Epoch 1
Local
172.1.0.1 (via vrf vrf-loc1office1) from 0.0.0.0 (1.1.1.1)
Origin incomplete, metric 3584000, localpref 100, weight 32768, valid, sourced, best
Extended Community: RT:65000:1 RT:65000:100
Cost:pre-bestpath:128:3584000 (default-2143899647) 0x8800:32768:0
0x8801:11:153600 0x8802:65281:256000 0x8803:65281:1500
0x8806:0:167837953
rx pathid: 0, tx pathid: 0x0
Loc1Core1#sh bgp vpnv4 unicast vrf vrf-loc1office1 10.1.1.0
BGP routing table entry for 65000:1:10.1.1.0/24, version 3
Paths: (1 available, best #1, table vrf-loc1office1)
Not advertised to any peer
Refresh Epoch 1
Local
172.1.0.1 (via vrf vrf-loc1office1) from 0.0.0.0 (1.1.1.1)
Origin incomplete, metric 3584000, localpref 100, weight 32768, valid, sourced, best
Extended Community: RT:65000:1
Cost:pre-bestpath:128:3584000 (default-2143899647) 0x8800:32768:0
0x8801:11:153600 0x8802:65281:256000 0x8803:65281:1500
0x8806:0:167837953
rx pathid: 0, tx pathid: 0x0
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