10-18-2010 05:31 AM - edited 03-06-2019 01:34 PM
Hello I'm trying to setup PBR and ran into an issue. I'm need to have dual default gateway depending on traffic, but I can only set PBR for 1 VLAN. I need a default route in the routing table, and a default route for matching traffic in the PBR.
access-list 15 permit 172.20.0.0 0.0.255.255
route-map test-gateway permit 15
match ip address 15
set ip default next-hop 172.20.1.2
interface Vlan3
ip address 172.20.0.230 255.255.0.0
ip policy route-map test-gateway
ip route 0.0.0.0 0.0.0.0 172.19.16.5
ip route 172.26.105.0 255.255.255.0 172.26.104.240
ip route 172.26.106.0 255.255.255.0 172.26.104.240
ip route 199.105.176.0 255.255.248.0 172.19.18.12
ip route 199.105.184.0 255.255.254.0 172.19.18.12
ip route 205.183.246.0 255.255.255.0 172.19.18.12
ip route 207.96.197.0 255.255.255.0 172.19.16.5
ip route 208.134.161.0 255.255.255.0 172.19.18.12
So what I need is traffic from 172.20.0.0/16 using 172.20.1.2 as default gateway while other traffic will use the default gateway int the routing table.
Is that possible?
thanks for any help :-)
10-18-2010 05:36 AM
Hello I'm trying to setup PBR and ran into an issue. I'm need to have dual default gateway depending on traffic, but I can only set PBR for 1 VLAN. I need a default route in the routing table, and a default route for matching traffic in the PBR.
access-list 15 permit 172.20.0.0 0.0.255.255
route-map test-gateway permit 15
match ip address 15
set ip default next-hop 172.20.1.2
interface Vlan3
ip address 172.20.0.230 255.255.0.0
ip policy route-map test-gateway
ip route 0.0.0.0 0.0.0.0 172.19.16.5
ip route 172.26.105.0 255.255.255.0 172.26.104.240
ip route 172.26.106.0 255.255.255.0 172.26.104.240
ip route 199.105.176.0 255.255.248.0 172.19.18.12
ip route 199.105.184.0 255.255.254.0 172.19.18.12
ip route 205.183.246.0 255.255.255.0 172.19.18.12
ip route 207.96.197.0 255.255.255.0 172.19.16.5
ip route 208.134.161.0 255.255.255.0 172.19.18.12
So what I need is traffic from 172.20.0.0/16 using 172.20.1.2 as default gateway while other traffic will use the default gateway int the routing table.
Is that possible?
thanks for any help :-)
Well yes it is possible and your config should do that. Does it not work ?
When you say you can only set PBR for 1 vlan, what exactly do you mean ?
Jon
10-18-2010 05:38 AM
Actually your config is wrong - sorry my mistake.
You have "set ip default next-hop 172.20.1.2" which means check the routing table first then use PBR. You need to change that to -
"set ip next-hop 172.20.1.2"
Also you should change your acl to -
acl 101 permit ip 172.20.0.0 0.0.255.255 any
any traffic not matched in your acl ie. any non 172.20.0.0/16 traffic will be routed via the routing table.
10-18-2010 05:48 AM
Hi Jon thanks for the help.
The thing is now all traffic matching the ACL (172.20.0.0/16) will be routed to the default route, by-passing the routing table, but what I want to do is influence only the default route. I don't want all my traffic from 172.20.0.0 going to 172.20.1.2, only what doesn't match the routing table excepting the default gateway.
10-18-2010 10:55 AM
Martin
How big is the routing table ?
What are the source IPs other than 172.20.0.0/16 ie. can you summarise the other source IPs or are there lots of them
Is the default-route in the routing table only used on this device or is it redistributed to other devices ?
Jon
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