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

Re: Ip Aliasing the Debian Way...



On Wed, Jan 24, 2001 at 03:24:16PM -0800, Willy Lee wrote:
> > just add something like this to /etc/network/interfaces:
> > 
> > iface eth0:0 inet static
> >         address 192.168.0.1
> >         netmask 255.255.255.0
> >         network 192.168.0.0
> >         broadcast 192.168.0.255
> >         gateway 192.168.0.10
> > 
> > then run either /etc/init.d/networking restart or ifup eth0:0
> > 
> 
> Hm.  This doesn't work for me (latest potato i386).  Here's the stanza I
> add to /etc/network/interfaces (all values given to me by an admin):
> 
> iface eth0:0 inet static
>         address the.new.ip.adr
>         netmask 255.255.255.192
>         gateway the.new.ip.gw
>         broadcast the.new.ip.255
> 
> After running /etc/init.d/networking restart, I get this from ifconfig:
> 
> willy@trs80:~$ /sbin/ifconfig 
> eth0      Link encap:Ethernet  HWaddr 00:10:5A:9C:8B:BF  
>           inet addr:10.0.0.102  Bcast:10.255.255.255  Mask:255.255.255.0
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:279 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:107 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:100 
>           Interrupt:11 Base address:0xd000 
> 
> eth0:0    Link encap:Ethernet  HWaddr 00:10:5A:9C:8B:BF  
>           inet addr:the.new.ip.adr  Bcast:the.new.ip.255 
> Mask:255.255.255.192
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           Interrupt:11 Base address:0xd000 
> 
> Note that the :0 alias doesn't have lines beginning with "RX packets" or
> "TX packets".  I can't ping the.new.ip.adr either, from anywhere.

Well.  Several things:

1) There's no point in tracking RX or TX packets for a virtual
interface (think about the word virtual for a while ...)

2) You're missing the "network" line from your iface stanza.  Since it
looks to me like you're adding a different subnet this is kinda
important.

3) It doesn't look like you added any routes.  This might not be
necessary depending which kernel you're using.
 
> I recompiled the kernel to turn on IP_ALIAS support.  Is there another
> feature I need to turn on, that I perhaps missed?  Is the feature
> limited to certain hardware?  Is it limited to certain subnet masks?

Fixd #2.  Post the output of "netstat -rn".  Consider whether you're
helping us solve your problem by blocking out the IPs.

-- 
Nathan Norman - Staff Engineer | A good plan today is better
Micromuse Inc.                 | than a perfect plan tomorrow.
mailto:nnorman@micromuse.com   |   -- Patton

Attachment: pgpzY7f5J6dAr.pgp
Description: PGP signature


Reply to: