[clug] Virtual Ethernet Interfaces and Routing

Joel Pearson pearj at writeme.com
Fri Jun 18 14:07:11 GMT 2004


The problem I have is I have an ADSL router in the office, and it does dhcp
and it mostly works pretty well.  But I have decided that I'll like to have
a transparent proxy, plus have the ability to do load balancing as well as
having some records of where all our traffic is going.

So the idea I had was to have the router on a different subnet to the rest
of the network, but not actually bother having it on a separate physical
network, because I'm quite certain I don't have to worry about people
changing their ip to a different subnet.

This is the current network layout:
Router - WAN - (Go Internode!)
Router - LAN -
Server - eth0 -

So from what I can gather all I need to do is create a vitual ethernet
interface, like so:
ifconfig eth0:1 netmask So then the plan would be
to put everyone on the subnet and set their default gateway as and then the server would route everything to,
because it would be set as the default gateway.
But for some some reason I just couldn't make it route packets.  Is there
something that needs to be enabled in the kernel, caus I don't want to do ip
masquerading because that seems a bit silly in this situation.
But just thinking now do I need to tell the adsl router about the network?  Because I can add static routes to its routing table.
Hmm now that I actually come to think of it I think that could be the
problem, because when I was testing all the other computers had their
gateways set as, and if I tried to ping them the traffic would
probably get to the destination computer (from the network),
but when they tried to respond the router( wouldn't know what
to do with the subnet.

Anyway, my main question is, do virtual interfaces work that way? and does
the kernel need to have something enabled to make routing work between
subnets for other computers?

Thanks in advance


More information about the linux mailing list