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

Re: Proper way to add a virtual host?



On Fri, Mar 16, 2001 at 12:27:16PM -0700, John Gonzalez/netMDC admin wrote:
> 
> 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 255.255.255.0
> 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   0.0.0.0         255.255.255.255 UH     1500 0          0
> eth0:0
> 206.XX.XXX.XX   0.0.0.0         255.255.255.255 UH     1500 0          0
> eth0:1
> 206.XX.XXX.XX   0.0.0.0         255.255.255.255 UH     1500 0          0
> eth0:3
> 206.XX.XXX.XX   0.0.0.0         255.255.255.255 UH     1500 0          0
> eth0:4
> 
> 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    0.0.0.0         255.255.255.255 UH        0 0          0
> eth0
> 63.XX.XXX.XX    0.0.0.0         255.255.255.255 UH        0 0          0
> eth0
> 207.XX.XXX.XX   0.0.0.0         255.255.255.255 UH        0 0          0
> eth0
> 
> Which, the setup is identical. However, this shows it answering everything
> on eth0 instead of the proper eth0:X device??? any ideas?
IIRC, the output of the commands changed, but not the functionality.

You will be able to use more of the 2.2.xx functions if you use the iproute2
package.  It gives much more detailed information too.

Mike



Reply to: