SUMMARY : Routing : How to force outgoing ethernet interface

From: Alexandre Déry/dgt/sct <>
Date: Fri Jul 30 2004 - 14:44:03 EDT
Hi everybody, 

First of all, thanks for the many replies (Drew Skinner, Nicolas Figaro, 
Robert Petkus, Chuck, Paul Krauss, Crist Clark, Spiro Harvey, and Juan 

-------------Original Problem-----------------
> I have a machine with an interface qfe0 with ip address 
>, and the default route is (set with 
> "route add default"). The interface works fine, 
> and so does the default route...
> I plumb a second interface, qfe1, with ip addresss 
> Now I have 2 interfaces on the same subnet 
> (2.131 and 2.132). Everything is fine.
> The problem :
> At this point, all the traffic that goes out the default 
> route is using qfe0 (, because it was the first 
> one to be plumbed.
> What I would like is a way change de default route to force 
> the traffic to go out the qfe1 interface (with ip
> I tried a few things late last night (mostly interface 
> metrics) but it didn't work. I tried route with the -ifq 
> parameter with no luck... maybe I had the wrong syntax though.
> So, the question is : How can I change my default route to 
> force traffic to go out of the newly plumbed qfe1 
> ( interface, instead of qfe0 ( ?
-------------Original Problem-----------------

First of all, seems to be a general consensus that having 2 nics on the 
same subnet is a bad idea. If the issue is performance, one should go for 
gigabit ethernet and put multiple IPs (virtual) on the same interface. 
However this is not my case and I can't do that.

---- A few solutions ----

1. One way out of this (suggested by many) would be to subnet my network and put each card on it's own subnet... For instance, 
one person suggested to put a netmask of on the qfe0 
interface, which should effectively divert all traffic to the qfe1 

2. I wasn't able to make the "-interface" or "-ifp" switches work with the 
route command (they had no effect on the routing).

3. Another option is to set the qfe0 interface as deprecated using 
ifconfig. Doing so, no outgoing packet should take that interface, but the 
interface should still answer if someone knocks at the door...

4. I found another way to change the routing order. If I do a "ifconfig 
qfe0 down" followed immediately by a "ifconfig qfe0 up", the routing 
process will start using the other interface (qfe1) for outgoing traffic. 
It's true that this will interrupt traffic going through qfe0 at this 
moment, but I tested it with an active LDAP search : the search stopped 
briefly, and continued shortly (2 seconds or so...)... so it's not too 

I'm hoping this lenghty summary may help someone else later :D

Thanks again to everyone !

Alexandre Dery
Technicien, SCSA, CCNA
sunmanagers mailing list
Received on Fri Jul 30 14:44:36 2004

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:36 EST