[wellylug] Sending traffic to a virtual interface

michael at diaspora.gen.nz michael at diaspora.gen.nz
Mon Jun 26 20:55:13 NZST 2006


Cliff Pratt writes:
>I have a machine with interfaces eth0, eth0:0, eth0:1, etc. I want 
>application A to use interface eth0:0 and not eth0 to communicate with 
>IP address xx.yy.zz.ww. There's no way to configure the application 
itself to use a particular interface. Just the IP address.

The "ip" command is useful for this.  For example:

    ip route add to x.y.z.w/32 src a.b.c.d dev eth0

Or:

    ip route add to x.y.z.w via $router src a.b.c.d

Both should work, although ISTR that I used the second form more often...
    -- michael.




More information about the wellylug mailing list