06-23-2004 02:04 AM - edited 03-02-2019 04:33 PM
I have a default route for the whole router
ip route 0.0.0.0 0.0.0.0 10.5.1.31
but for a specific subnet, 10.80.1.0/24, I want another default route. Can this be done?
Solved! Go to Solution.
06-23-2004 02:49 AM
Hello,
just add a route for 10.80.1.0/24, e.g.:
ip route 10.80.1.0 255.255.255.0 FastEthernet0/0
the router will choose that route for all traffic destined for 10.80.1.0/24, since that route is more specific than the default route.
Or is 10.80.1.0/24 your source and do you want to have traffic originating in that network to be routed somewhere else ? This can be done as well, with policy routing, the syntax would look like this:
interface FastEthernet 0/0
ip policy route-map SUBNET
1
route-map SUBNET permit 10
match ip address 101
set ip next-hop 10.10.10.1
or
set interface FastEthernet0/1
1
access-list 101 permit ip 10.80.1.0 0.0.0.255 any
Regards,
Georg
06-23-2004 05:20 AM
As I read the original post I believe that they want a different default route for traffic originating from that subnet.
I agree that the approach to solving this is to use policy routing. But I would suggest that "set ip next-hop 10.10.10.1" or "set interface FastEthernet0/1" will affect forwarding of ALL packets from that subnet not just provide a different default route. I would suggest that it should be "set ip default next-hop 10.10.10.1" or "set default interface FastEthernet0/1". This will allow normal forwarding for traffic which has a match in the routing table and will change only forwarding of traffic which is going to the default route.
06-23-2004 02:49 AM
Hello,
just add a route for 10.80.1.0/24, e.g.:
ip route 10.80.1.0 255.255.255.0 FastEthernet0/0
the router will choose that route for all traffic destined for 10.80.1.0/24, since that route is more specific than the default route.
Or is 10.80.1.0/24 your source and do you want to have traffic originating in that network to be routed somewhere else ? This can be done as well, with policy routing, the syntax would look like this:
interface FastEthernet 0/0
ip policy route-map SUBNET
1
route-map SUBNET permit 10
match ip address 101
set ip next-hop 10.10.10.1
or
set interface FastEthernet0/1
1
access-list 101 permit ip 10.80.1.0 0.0.0.255 any
Regards,
Georg
06-23-2004 05:20 AM
As I read the original post I believe that they want a different default route for traffic originating from that subnet.
I agree that the approach to solving this is to use policy routing. But I would suggest that "set ip next-hop 10.10.10.1" or "set interface FastEthernet0/1" will affect forwarding of ALL packets from that subnet not just provide a different default route. I would suggest that it should be "set ip default next-hop 10.10.10.1" or "set default interface FastEthernet0/1". This will allow normal forwarding for traffic which has a match in the routing table and will change only forwarding of traffic which is going to the default route.
06-23-2004 09:20 PM
It seems that policy routing with "set ip default.." will solve it. Thanks both of you!
06-24-2004 03:53 AM
It seems that neighter "set ip default" or "set ip next-hop" is supported on my Catalyst 3550 sw/v 12.1(12c)EA1.
Is there any other way?
06-24-2004 04:55 AM
Hello,
AFAIK, before you can enable policy routing, you must configure one of these commands in the global configuration mode, and then the configuration must be written and the switch reloaded:
sdm prefer extended-match
sdm prefer access extended-match
sdm prefer routing extended-match
HTH,
Georg
07-17-2018 10:47 PM
i agree sir
and your respond helped remember that we can actually do this when we have routing protocol and we need to segregate the default route for specific subnets without effecting the interconnection made by the routing protocol
*****
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