static route NOT to use a specific interface

Unanswered Question
Nov 14th, 2008
User Badges:

All,


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.


Thanks,

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
Jon Marshall Fri, 11/14/2008 - 06:58
User Badges:
  • Super Blue, 32500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

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..


Jon

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

Here is an example:


ip route 192.168.1.1 255.255.255.255 NOT FE0/2.


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

Jon Marshall Fri, 11/14/2008 - 07:11
User Badges:
  • Super Blue, 32500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

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.


Jon



John Blakley Fri, 11/14/2008 - 10:28
User Badges:
  • Purple, 4500 points or more

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

John Blakley Fri, 11/14/2008 - 12:09
User Badges:
  • Purple, 4500 points or more

You could try:


access-list 10 permit 192.168.1.1


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


John

tcordier Mon, 11/17/2008 - 08:41
User Badges:
  • Bronze, 100 points or more

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

Actions

This Discussion