[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Alias Routing Confusion
- To: tech_(_at_)_openbsd_(_dot_)_org
- Subject: Alias Routing Confusion
- From: Erik Sechser <esechser_(_at_)_blue_(_dot_)_weeg_(_dot_)_uiowa_(_dot_)_edu>
- Date: Wed, 15 Nov 2000 09:00:49 -0600 (CST)
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