[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Alias Routing Confusion



Does anyone know how to route through certain aliases which you give
to an interface? (BTW I know how to GIVE an interface an alias. This is
deeper.)

Say vr0 has IP x.x.x.129. And I give it an alias;
'ifconfig vr0 alias x.x.x.130 netmask 0xffffffff'.
But now say I want all routing to a certain subnet to come FROM x.x.x.130
on my box instead of the primary interface IP (x.x.x.129).
The gateway will remain the same of course, say x.x.x.1.
I know Linux can route through virtual interfaces like this:
'route add -net <subnet> netmask <netmask> gw <gateway> dev eth0:1', where
eth0:1 is an IP alias for interface eth0...
'ifconfig eth0 x.x.x.129 netmask 255.255.255.0'
'ifconfig eth0:1 x.x.x.130 netmask 255.255.255.0'

Thanks,
 
E






Visit your host, monkey.org