12-20-2017 10:57 AM - edited 03-05-2019 09:40 AM
Can you have a different amount of AS prepends in the same route-map using match statements? What I'm trying to achieve is having a certain IP used for MIS traffic take our backup VPN at our regional hub instead of saturating the primary MPLS. The thought is to have the backup VPN advertise less hops to EBGP neighbors than the primary for the MIS traffic generating IP. See below configs... Will the MIS IP be advertised with 3 prepends and all other traffic 7? Will this work? If not, any ideas on how to approach this? To add more complexity, the purpose is to have the MIS traffic directed to our COLO site instead of direct VPN to the remotes receiving the MIS traffic. This is being done so that from the COLO facility the traffic will take the primary MPLS circuits at the remotes. On the way back, the MIS traffic needs to traverse COLO again and back to the regional remotes backup VPN, which is why I need to approach this design from an advertisement standpoint. Essential I need one IP to prefer the backup with all others the primary. Thanks.
ip prefix-list MIS seq 5 permit 10.100.4.41/32
route-map Secondary permit 10
match ip address prefix-list MIS
set metric 10000
set local-preference 200
set ip next-hop 172.21.169.150
set as-path prepend 65555 65555 65555
route-map Secondary permit 20
set metric 10000
set as-path prepend 65555 65555 65555 65555 65555 65555 65555
Solved! Go to Solution.
12-21-2017 12:58 PM - edited 12-21-2017 12:59 PM
Francesco,
I implemented your solution and the AS prepends worked. Thank you very much. Great work. My final configs for the labbed up portion are below. (I need to do the whole 10.100.4.0 subnet in the prefix-list).
R2
ip prefix-list MIS seq 10 permit 10.100.4.0/24
!
route-map Secondary permit 10
match ip address prefix-list MIS
set local-preference 200
set as-path prepend 64555 64555 64555
!
route-map Secondary permit 20
set as-path prepend 64555 64555 64555 64555 64555 64555 64555
route-map MIS permit 10
match ip address prefix-list MIS
set ip next-hop 192.168.2.3
interface Vlan1
ip address 10.100.4.1 255.255.255.0
ip policy route-map MIS
Thanks everyone for the assistance.
12-21-2017 02:22 PM
By doing the whole /24, you will change the routing for the complete subnet, is it what you want?
If you want to do only the host 10.100.4.41/32: let's assume the interface of your local router facing the subnet 10.100.4.0/24 is g0/1
- add a static route : ip route 10.100.4.41 255.255.255.255 g0/1
- modify your prefix-list: ip prefix-list MIS seq 10 permit 10.100.4.41/32
- Under your bgp process, redistribute your static route. If you have multiple static route and you just want to redistribute the static created previously, do:
route-map RED permit 10
mat ip add prefi MIS
router bgp xxx
redistribute static route-map RED
I've done a quick test to show up how you'll see it into bgp on remote peer: (the subnet I used in my example is 192.168.10.0/24)
Network Next Hop Metric LocPrf Weight Path
*> 1.1.1.1/32 172.16.255.1 0 0 1 1 1 1 1 1 1 1 ?
*> 10.100.4.41/32 172.16.255.1 0 0 1 1 1 1 ?
r> 172.16.255.0/24 172.16.255.1 0 0 1 1 1 1 1 1 1 1 ?
*> 192.168.10.0 172.16.255.1 0 0 1 1 1 1 1 1 1 1 ?
*> 192.168.10.6/32 172.16.255.1 0 0 1 1 1 1 ?
You can see that you can prepend differently your /24 and your /32
12-21-2017 04:07 PM
Francesco,
I think I'll be good with the whole subnet. If not, I will definitely come back and reference your solution. Thanks again.
12-21-2017 04:09 PM
12-22-2017 02:41 AM
Hello
i see you have separated the PBR but still have the LP applied to the rm - which I guess if you check doesn’t work Due to the RM set outbound towards your vpn ebgp
res
paul
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