ā02-26-2016 06:05 AM - edited ā03-08-2019 04:44 AM
Hi
Iam trying to configure Policy based routing.
But it dosen't work.
what i will like:
To have all traffic from 10.10.10.0/29 routet though 20.20.20.20, where my default gateway is 30.30.30.30
Configuration dump:
interface Vlan2000
ip address 10.10.10.1 255.255.255.248
ip pim sparse-mode
ip route-cache same-interface
ip policy route-map Test
!
access-list 100 permit ip 10.10.10.1 0.0.0.7 any
route-map test permit 10
match ip address 100
set ip next-hop 10.10.10.1
!
But traffic is still routet though 30.30.30.30
What iam doing wrong?
I get 30.30.30.30, from OSPF. On the other router i got it from BGP, I don't know if that give me some problems?
Regards Kenneth Dalbjerg
ā02-26-2016 07:32 AM
You have set the next hop to be 10.10.10.1 which is the clients default gateway anyway.
If you want the next hop to be 20.20.20.20, you need to state this in the route map:
route-map test permit 10
match ip address 100
set ip next-hop 20.20.20.20
The packets arrive at 10.10.10.1 as this is the clients default gateway and if you want to use PBR, you need to tell them where to go next otherwise the router will just look at the global routing table and make a decision based on this.
Edit - Also, I believe that route maps are case sensitive. You have called it 'test' in the route map command and 'Test' in the interface config.
ā02-27-2016 10:49 AM
Sorry, it was because the ip address, was not what is in my config, it's not the reals ip address.
I have justed look, i have type: 20.20.20.20, in my config, so it's not that :)
ā02-27-2016 11:03 AM
Did you see the last sentence of my previous post? About the case sensitive bit.
ā02-27-2016 11:12 AM
Hi
That could be it.
I will just test it, thx.
Regards Kenneth
ā02-27-2016 01:27 PM
It was not that.
But i have found out, that if it something on my test devices.
It routing to wrong router. I have type the correct gateway in.
If i tested it from a debian machine, everything is working fine.
Thx for yours time.
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