static route NOT to use a specific interface

Unanswered Question
Nov 14th, 2008


Need to find a command on the router to define a static NOT to use a specific interface while it can use any other interfaces.


I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Jon Marshall Fri, 11/14/2008 - 06:58

Can you be a bit more specific and give us an example of what you mean - are you talking about static route/static NAT etc..


yuhuiyao Fri, 11/14/2008 - 07:03

Here is an example:

ip route NOT FE0/2.

Assuming the router has multiple interfaces, it can use any interfaces to route except FE0/2

Jon Marshall Fri, 11/14/2008 - 07:11

Still not sure what you are trying to achieve.

When adding a static route with a next-hop on an ethernet network the interface used will be the one that allows the router to forward the packet to the next-hop.


John Blakley Fri, 11/14/2008 - 10:28

I think your best bet is to use policy based routing. Based on destination, you can choose what interface to send the traffic out on.

Jon will have a MUCH better idea on how to set this up than me.


John Blakley Fri, 11/14/2008 - 12:09

You could try:

access-list 10 permit

route-map NOFA2 permit 5

match ip address 10

set next-hop

If you want to drop the traffic from that address, I think you can do:

route-map NOFA2 permit 5

match ip address 10

set default-interface null0

Apply it to your inside interface:

int fa0/1

ip policy route-map NOFA2

HTH also


tcordier Mon, 11/17/2008 - 08:41

I think the easiest would be to define a static for each interface you want the router to use. The router will then load-share the traffic accross the different interfaces. The option to use Policy-based routing will make use of only a single interface at a time.

HTH, Thomas


This Discussion