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

Proper way to add a virtual host?

Back in the 2.0.XX days of the kernel, i used to add virtual hosts in the
following fashion, and it worked beautiful. I could even add hosts out of
a diff subnet then the primary interface.

It would take and send traffic out on the same virtual interface it came
in on. Somehow, between 2.0.XX and 2.2.XX -- this behaviour changed. I'm
trying to figure out the proper way to do it now, as it seems im not doing
it right.

Here is some output:

On an old 2.0.XX box:
#alias domain for blah.com
ifconfig eth0:3 206.XX.XXX.XX broadcast 206.XX.XXX.XX netmask
route add -host 206.XX.XXX.XX dev eth0:3

which works beautifully... here is a netstat -nr output, which shows the
computer is using the virtual interface to send/receive packets:

206.XX.XXX.XX UH     1500 0          0
206.XX.XXX.XX UH     1500 0          0
206.XX.XXX.XX UH     1500 0          0
206.XX.XXX.XX UH     1500 0          0

Now, here is the exact same setup on a 2.2.XX based box, and as you can
see, it is not working properly. ARP requests are not going through, so
devices on diff subnets cannot reach the host properly, etc.

63.XX.XXX.XX UH        0 0          0
63.XX.XXX.XX UH        0 0          0
207.XX.XXX.XX UH        0 0          0

Which, the setup is identical. However, this shows it answering everything
on eth0 instead of the proper eth0:X device??? any ideas?

John Gonzalez / johng@netmdc.com / johng@tularosa.net
Tularosa Communications, Inc. (505) 439-0200 voice / (505) 443-1228 fax
http://www.tularosa.net / ASN 11711 / JG6416
[----------------------------------------------[ sys info ]-----------]
 12:20pm  up 190 days, 18:49,  3 users,  load average: 0.16, 0.47, 0.70

Reply to: