cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
411
Views
0
Helpful
6
Replies

static route NOT to use a specific interface

yuhuiyao
Level 1
Level 1

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,

6 Replies 6

Jon Marshall
Hall of Fame
Hall of Fame

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

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

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

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

HTH, John *** Please rate all useful posts ***

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

HTH, John *** Please rate all useful posts ***

tcordier
Level 1
Level 1

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

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: