PBR/route maps

Answered Question
Aug 13th, 2007

I'm running into a weird situation here or at least I think I'm but anyways here is the situation. I have static route that points to a network called SNET and that is where the 168.162.128.0 subnet is being learned from, also I have a PBR that I have in place that states an anything coming from the 10.255.183.0 subnet that wants to hit the 168.162.128.0 will be routed over my BGP router to a new work that is called VMNET. So when I start advertising the 168.162.128.0 subnet via the bgp router the PBR works and I can hit the 168.162.128.0 subnet without issues the problem is all my other subnet chooses that route as well even though I have a static route pointing to the SNET connection for some reason they all want to go over the BGP route. I would pronbably need to paste my settings so if anyone can help let me know and I will send it to you. Thank you in advance

I have this problem too.
0 votes
Correct Answer by Edison Ortiz about 9 years 4 months ago

The easier solution would be creating two /24 static routes.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (2 ratings)
Loading.
Edison Ortiz Mon, 08/13/2007 - 10:17

If you post configs and topology of your network, it will be most helpful.

Perhaps the BGP routes have a longer mask than your static routes and that's the reason is choosing that path over the SNET connection ?

wgranada1 Mon, 08/13/2007 - 10:52

You know you I think you are right cause when it is advertised via SNET it is a /23 subnet and when it is being advertised via the BGP it is being advertised as a /24. So even though the SNET connection is a static route the BGP route will win cause it is longer. So if I get the BGP route to advertise a /23 instead of a /24 then my route map should work. Here is the config I have for my route map

wgranada1 Mon, 08/13/2007 - 10:55

Sorry hit send to fast:

Here is the static route:

ip route 168.162.128.0 255.255.254.0 10.255.192.1

and here is the route map information:

ip prefix-list to-VNET seq 70 permit 10.255.183.0/24 le 32

ip prefix-list from-VNET seq 260 permit 168.162.128.0/24

access-list 100 permit ip 10.255.183.0 0.0.0.255 168.162.128.0 0.0.1.255

route-map sfs-inside-filter permit 30

match ip address 100

set ip next-hop 172.19.98.50

ip access-list extended sfs-to-vnet

141 permit ip 10.255.183.0 0.0.0.255 168.162.128.0 0.0.1.255

But what you are saying about the length is correct the static route is a /23 while the bgp route is a /24 so that is probably why when I activate this everything is taking the

BGP route

Correct Answer
Edison Ortiz Mon, 08/13/2007 - 14:15

The easier solution would be creating two /24 static routes.

Actions

This Discussion