SUMMARY : Routing : How to force outgoing ethernet interface

From: Alexandre Déry/dgt/sct (Alexandre.Dery_at_sct.gouv.qc.ca)
Date: 07/30/04

  • Next message: Scott Pham: "SUMMARY: Growing Mirror set on soft partitions"
    To: sunmanagers@sunmanagers.org
    Date: Fri, 30 Jul 2004 14:44:03 -0400
    
    

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

    -------------Original Problem-----------------
    > I have a machine with an interface qfe0 with ip address
    > 192.168.2.132, and the default route is 192.168.2.1 (set with
    > "route add default 192.168.2.1"). The interface works fine,
    > and so does the default route...
    > I plumb a second interface, qfe1, with ip addresss
    > 192.168.2.131. 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 (192.168.2.132), 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 192.168.2.131).
    >
    > 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
    > (192.168.2.131) interface, instead of qfe0 (192.168.2.132) ?
    -------------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
    192.168.2.0 network and put each card on it's own subnet... For instance,
    one person suggested to put a netmask of 255.255.255.255 on the qfe0
    interface, which should effectively divert all traffic to the qfe1
    interface...

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

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

    Thanks again to everyone !

    Alexandre Dery
    Technicien, SCSA, CCNA
    _______________________________________________
    sunmanagers mailing list
    sunmanagers@sunmanagers.org
    http://www.sunmanagers.org/mailman/listinfo/sunmanagers


  • Next message: Scott Pham: "SUMMARY: Growing Mirror set on soft partitions"

    Relevant Pages

    • Routing : How to force outgoing ethernet interface
      ... I have a machine with an interface qfe0 with ip address 192.168.2.132, ... the default route is 192.168.2.1 (set with "route add default ... The interface works fine, and so does the default route... ... I plumb a second interface, qfe1, with ip addresss 192.168.2.131. ...
      (SunManagers)
    • Re: Sun Trunking on Solaris9
      ... $ cat /etc/hostname.eri0 ... group ha_group netmask + broadcast + failover up ... have deprecated qfe0. ... The second virtual interface seems redundant, ...
      (comp.unix.solaris)
    • Re: Sun Trunking on Solaris9
      ... $ cat /etc/hostname.eri0 ... group ha_group netmask + broadcast + failover up ... have deprecated qfe0. ... The second virtual interface seems redundant, ...
      (comp.unix.solaris)
    • Add physical net device to Solaris zone
      ... I've dedicated a network interface for it, qfe0. ... Is there any way to get that complete physical interface qfe0 to the ... zone without having to plumb and configure it in the global zone? ...
      (comp.unix.solaris)
    • Re: Add physical net device to Solaris zone
      ... I've got Solaris 10 with a testzone setup. ... I've dedicated a network interface for it, qfe0. ... zone without having to plumb and configure it in the global zone? ...
      (comp.unix.solaris)