[lkml]   [2001]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Aliases
Justin Guyett wrote:

> presuming this isn't an ifconfig limit instead of a kernel limit, trying
> "ifconfig eth0:x" works for x < 10000, anything > 10000 and x becomes
> x%10000.

must be a limit in your version of ifconfig.

# ifconfig --version
net-tools 1.60
ifconfig 1.42 (2001-04-13)

# ifconfig lo:10001
# ifconfig lo:20001
# ifconfig lo:10001
lo:10001 Link encap:Local Loopback
inet addr: Mask:

# ifconfig lo:20001
lo:20001 Link encap:Local Loopback
inet addr: Mask:

> However, 2.4 also has multiple addresses of the same type per device;
> unfortunately it's fairly slow. Adding or deleting addresses seems to
> take ~5 seconds per 255 addresses on my machine, and listing addresses
> takes about 1 second / 300 addresses on the same machine.

I can raise 1000 interfaces in 1.6 seconds with 2.4.8 on a 500MHz PIII using my
custom written ifconfig program designed for raising a batch of IPS in one go.
I've actually got up to about 64000 IPs on one interface but performance
degrades rapidly after about 8000 probably due to the kernel ip hash size - i
didn't try any higher than this. Anybody wanting more than a Class B of ip
aliases on one machine has gotta have some sort of problem so I don't think its
really an issue.

# time ./vifup -q -f ip.list internal
available interfaces for internal network: eth1
raised 1020 of 1020

real 0m1.671s
user 0m0.820s
sys 0m0.850s

> Also, listing addresses for another interface isn't any faster, which is
> unfortunate; ip shouldn't need to check addresses of all interfaces just
> to get the ones for the requested interface.

It does need to. The kernel ioctl SIOCGIFCONF only lets you fetch info for all
interfaces so you have to search through the whole lot to find the ones your
interested in. This is a standard BSD interface - or is there a new interface
used by ip??.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:57    [W:0.077 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site