01-10-2019 12:57 PM
I would like to setup a site with a specific gateway of last resort if they are coming from a specific subnet. I am assuming the best way to do that is on our layer 3 switch with a PBR.
I am looking for an example of how to set that up.
Thanks
Tracy
01-10-2019 01:14 PM
Hello,
here is an example. Traffic from 192.168.1.0/24 will go to whatever you define in the 'set' clause of the route map"
access-list 101 permit ip 192.168.1.0 0.0.0.255 any
!
route-map LAST_RESORT permit 10
match ip address 101
set ip next-hop x.x.x.x
or
set interfaces X
!
interface GigabitEthernet0/0/0
ip policy route-map LAST_RESORT
01-10-2019 02:15 PM - edited 01-10-2019 02:17 PM
Hello Tracy
Can you confirm if you would want resiliency in case this alternative gateway became unavailable - if not then @Georg Pauwen example would be applicable.
However is you do want resiliency then as it stands the supplied example would black hole your define PBR traffic if that alternative gateway failed.
01-14-2019 09:01 AM
Sorry this won't work since I don't want all my traffic to go that next-hop. I need just traffic I don't have a route to so my gateway of last resort. What was suggested will send all my traffic to that hop.
For example I have ip address 10.20.0.1 and I have many routes to get anywhere but if there is not route I want my gateway of last resort for this ip address to go to a different gateway of last resort then what is configured by default.
01-14-2019 09:35 AM - edited 01-14-2019 09:36 AM
Hi,
Example:
Traffic from 192.168.1.0/24 will go to 10.10.10.0/24 subnet by using next-hop xxx.xxx.xxx.xxx
ip access-list extended pbr_acl
permit ip 192.168.1.0 0.0.0.255 10.10.10.0 0.0.0.255
!
route-map pbr_map permit 10
match ip address pbr_acl
set ip next-hop x.x.x.x <Next hop IP address>
!
route-map pbr_map permit 20
!
interface GigabitEthernet0/0/0
IP address 192.168.1.1 255.255.255.0
ip policy route-map pbr_map
!
Regards,
Deepak Kumar
01-14-2019 10:06 AM
Hello,
post a schematic drawing of what you want to accomplish, including all the gateways you have, and indicate which traffic you want to get where under which condition...
01-14-2019 12:06 PM
I am just adding another internet connection that i want to send a specific group of IP addresses out. However only the internet traffic so I thought we could make a specific subnet go out a different gateway of last resort.
I have a layer 3 switch with many Vlans . The gateway of last resort was going to the current internet. I want to leave that but send specific subnets to go to the new internet. Would that be better with a static route ?
01-14-2019 01:00 PM - edited 01-14-2019 01:02 PM
Hello
@TRACY HARTMANN wrote:
Sorry this won't work since I don't want all my traffic to go that next-hop. I need just traffic I don't have a route to so my gateway of last resort. What was suggested will send all my traffic to that hop.
For example I have ip address 10.20.0.1 and I have many routes to get anywhere but if there is not route I want my gateway of last resort for this ip address to go to a different gateway of last resort then what is configured by default.
PBR will do this for you - what i am saying is if you don't have any verification on this additional gateway then any traffic PBR'd towards this gateway will be blackholed if that gateway is lost, now if that's acceptable then @Georg Pauwen example would be applicable.
01-15-2019 12:41 AM
Use Georg's example but use -
"set ip default next-hop x.x.x.x"
which will use the routing table first but if there is no specific route ie. only a default route matches then it will use x.x.x.x as the next hop instead which I think is what you are after.
Jon
01-15-2019 02:00 PM
This will work with the default in it thanks. Now how can I apply it? I see it more as a routing statement so do I put it under my EIGRP statement like
redistrubute static Last-resort ?
01-16-2019 12:08 AM
See the example given.
You apply it to the L3 interface whether the traffic is inbound to the device.
Jon
01-22-2019 06:14 AM
Thanks for the help, tried to enter the commands last night and could not apply the ip policy to the interface. Looked up issues on it and it says I need ip routing on, which it is. Next it mentioned something about the SDM prefer . Right now this states desktop default. Do I need to change this to routing? If I do what does it affect, I don't want to break anything.
Tracy
01-22-2019 06:19 AM
Yes you need to enable the routing template and you will need a reboot of your device.
You should be fine to change it.
Jon
01-22-2019 08:13 AM
Do you know if it changes the memory allocations?
01-22-2019 08:15 AM
Also I noticed I have ip base do I need ip services?
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