All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] ip addr add vs ifconfig eth0:1
@ 2004-04-04 16:44 lartc
  2004-04-04 16:55 ` Alan Ford
  2004-04-05  0:50 ` Martin A. Brown
  0 siblings, 2 replies; 3+ messages in thread
From: lartc @ 2004-04-04 16:44 UTC (permalink / raw)
  To: lartc

A stupid question: which is recomended? 

I have 1 interface eth0. I need to set about 20 virtual interfaces eth0:xx 
on it. 

If I create them with ifconfig eth0:xx I see it with ifconfig and with ip 
addr ls. If I set it with 'ip addr add', ifconfig don't show them, but 'ip 
addr ls' and 'route' show them. So, which is better? 

Thanks in advance.
PS: I can't find anywhere docs about relationship between 'old' utilities 
ifconfig, route, etc and the iproute2 package. Point me to some comparision 
between them, please. 


_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LARTC] ip addr add vs ifconfig eth0:1
  2004-04-04 16:44 [LARTC] ip addr add vs ifconfig eth0:1 lartc
@ 2004-04-04 16:55 ` Alan Ford
  2004-04-05  0:50 ` Martin A. Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Alan Ford @ 2004-04-04 16:55 UTC (permalink / raw)
  To: lartc

On Sun, Apr 04, 2004 at 07:44:50PM +0300, lartc@pro-technica.com wrote:
> I have 1 interface eth0. I need to set about 20 virtual interfaces eth0:xx 
> on it. 
> 
> If I create them with ifconfig eth0:xx I see it with ifconfig and with ip 
> addr ls. If I set it with 'ip addr add', ifconfig don't show them, but 'ip 
> addr ls' and 'route' show them. So, which is better? 

If you create them with:
"ip addr add ... dev eth0 label eth0:xx"
you can still give them ifconfig-compatible labels, visible with 
both tools.

-- 
Alan Ford * alan@whirlnet.co.uk 
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LARTC] ip addr add vs ifconfig eth0:1
  2004-04-04 16:44 [LARTC] ip addr add vs ifconfig eth0:1 lartc
  2004-04-04 16:55 ` Alan Ford
@ 2004-04-05  0:50 ` Martin A. Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Martin A. Brown @ 2004-04-05  0:50 UTC (permalink / raw)
  To: lartc

Hello,

 : A stupid question: which is recomended?

The iproute2 tools expose all of the complexity of the Linux kernel in a
clear and transparent way, so I recommend iproute2 for any but the most
pedestrian uses of IP addressing on Linux boxen.  Naturally, for
workstations and standalone boxen, there's no need--you will get the same
result by using the much more platform agnostic ifconfig tool.

 : I have 1 interface eth0. I need to set about 20 virtual interfaces
 : eth0:xx on it.
 :
 : If I create them with ifconfig eth0:xx I see it with ifconfig and with
 : ip addr ls. If I set it with 'ip addr add', ifconfig don't show them,
 : but 'ip addr ls' and 'route' show them. So, which is better?

As a previous poster (Alan Ford) has suggested, you can use the label
parameter to your "ip addr" command lines.  This will allow you to use
both ifconfig and iproute2 tools to see what IP addresses are active on a
given interface.

 : PS: I can't find anywhere docs about relationship between 'old'
 : utilities ifconfig, route, etc and the iproute2 package. Point me to
 : some comparision between them, please.

I don't have any documentation specifically about the relationship between
the two utilities, although you may find some answers in my guide [0].
Each utility reports (in a different way) on the current configuration of
interfaces and their addresses.

Best of luck,

-Martin

  [0] http://linux-ip.net/
      http://linux-ip.net/html/tools-ip-management.html

-- 
Martin A. Brown --- SecurePipe, Inc. --- mabrown@securepipe.com

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-04-05  0:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-04 16:44 [LARTC] ip addr add vs ifconfig eth0:1 lartc
2004-04-04 16:55 ` Alan Ford
2004-04-05  0:50 ` Martin A. Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.