How do I apply a static route to a specific interface?

Answered Question
Jul 3rd, 2007

I have a default route 0.0.0.0 but I'd like some packets that come in on certain interfaces to have a different default route.

Correct Answer by acomiskey about 9 years 7 months ago

If you only wanted 192.168.1.0/24 to use the specific default route on a particular interface, something like this should work.


interface FastEth...

ip policy route-map mymap


access-list 10 permit ip 192.168.1.0 0.0.0.255

route-map mymap permit 20

match ip address 10

set ip default next-hop


Wow, this seems to be a popular answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Amit Singh Tue, 07/03/2007 - 08:20

Roland,


You can use PBR and match the intresteing traffic using an ACL to have it source routed to a different next hop IP. This way your specific incmoing traffic an interface will be policy routed to a different next hop router and the other traffic which doesnot match the PBR will follow the normal defualt route.


http://www.cisco.com/univercd/cc/td/doc/product/software/ios120/12cgcr/qos_c/qcpart1/qcpolicy.htm


HTH,Please rate if it does.


-amit singh

Correct Answer
acomiskey Tue, 07/03/2007 - 08:21

If you only wanted 192.168.1.0/24 to use the specific default route on a particular interface, something like this should work.


interface FastEth...

ip policy route-map mymap


access-list 10 permit ip 192.168.1.0 0.0.0.255

route-map mymap permit 20

match ip address 10

set ip default next-hop


Wow, this seems to be a popular answer.

Actions

This Discussion