Re: [LARTC] multiple MAC addresses from one network card

Linux Advanced Routing and Traffic Control

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

 



On Fri, 6 Apr 2001, Alexey Marinichev wrote:

> On Fri, Apr 06, 2001 at 02:10:00PM -0800, James A. Crippen wrote:
> [...]
> > DON'T USE IFCONFIG AND fooN:M ALIASES IF YOU CAN HELP IT.
> [...]
> 
> Why?  What exactly is the difference between using aliases from ifconfig
> and from ip?
> Why?  Just curious.  BSD uses ifconfig and route just fine, so does
> SunOS.

Right, and the Linux version used to work perfectly well too.  But there
have been so many changes to the underlying network subsystem (under
kernel 2.4 particularly) that ifconfig and route aren't totally in sync
with the system.  Aliases are a good example.  They don't really exist
anymore as network devices.  Instead there's a clear separation now
between the hardware device and its driver and the network stack and
addresses assigned to a device.  The old ifconfig way was to create fake
devices like eth0:0 to hang other IP addresses on.  The new way that the
'ip' tool works is to assign an arbitrary number of addresses to *one*
real device.  If you create an alias with ifconfig as an eth0:0 type of
device then you can see it attached to the real device using 'ip'.  
However if you allocate a number of addresses and attach them to eth0,
say, then you won't see any except the first with ifconfig.  This is
because ifconfig doesn't understand the new alias mechanism.  Then you
start to get out of sync, and you have the problem of your device going
down when you try to remove an alias.  It's just not good to use for
anything more than the old single-address, single-device metaphor.  
Anything more complicated is better done with 'ip'.  And if you've learned
how to use 'ip' you'll find that it's so convenient that you want to just
throw ifconfig and route away.

'james

-- 
James A. Crippen <james@xxxxxxxxxxxx> ,-./-.  Anchorage, Alaska,
Lambda Unlimited: Recursion 'R' Us   |  |/  | USA, 61.2069 N, 149.766 W,
Y = \f.(\x.f(xx)) (\x.f(xx))         |  |\  | Earth, Sol System,
Y(F) = F(Y(F))                        \_,-_/  Milky Way.




[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux