(E-Mail Removed) (Vijay) wrote in message news:<(E-Mail Removed) om>...
> Cameron Kerr <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> > Vijay <(E-Mail Removed)> wrote:
> >
> > > /sbin/ifconfig eth0:1 192.168.220.1 netmask 255.255.255.255 up
> > > /sbin/ifconfig eth0:2 192.168.220.2 netmask 255.255.255.255 up
> > > /sbin/ifconfig eth0:3 192.168.220.3 netmask 255.255.255.255 up
Of course, you know that there is no "real" /32 network -- wonder if
that is also part of the gotcha? See below ...
> > So what's assigned to eth0? (no alias)
>
> eth0 has my machine IP (original ipaddress). I also tried shutting
> down the interface using the following command as u mentioned, but in
> vain.
>
> 'ifconfig eth0:1 down'
>
> Thanks,
> Vijay.
You may be running into a shortcoming of ifconfig -- all things ip in
Linux run through the ip command. ifconfig uses ip for relatively
simple tasks but has not been re-written to interface with ip to
handle "aliases" very well.
With the extensive re-working of the IP stack in 2.2.?? links
(interfaces) and ip addresses are treated independently -- adds
greater flexibility to the configuration and routing code, etc.
Currently, with your approach, it _seems_ the first ip address you
assign is a "primary" address, the following are "secondary"
addresses. ip behavior is that if you delete the primary, the
secondaries will also be deleted. The details are not well documented
and I don't understand all the ramifications myself -- another gotcha
is that interfaces are referenced by index # in the code and
_sometimes_ the order of configuration matters (like here?). Not sure
just how ifconfig uses ip, but your netmask of /32 would be the
"right" approach with ip -- all primaries -- but the alias naming
causes a hiccup ...?
You should have a copy of ip-cref on your machine, or try here for an
html version:
http://linux-ip.net/gl/ip-cref/
There is a script -- ifcfg -- at the end that may help or shed light
....
This thread is not a full discussion, but may get you started ...
http://www.uwsg.iu.edu/hypermail/lin...10.3/0003.html
note: I was too busy to chase down the start
Have you tried adding/deleting the addresses with ip instead of
ifconfig? The "best" way may also depend on how/why you're using the
addresses.
Working through qdiscs can seem simple compared to some of the quirks
of ip/ifconfig ;-(
hth,
rpg
email above disabled