public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Michael Clark <michael@metaparadigm.com>
To: Justin Guyett <justin@soze.net>
Cc: Jim Roland <jroland@roland.net>, linux-kernel@vger.kernel.org
Subject: Re: Aliases
Date: Sat, 18 Aug 2001 20:43:45 +0800	[thread overview]
Message-ID: <3B7E6301.50833345@metaparadigm.com> (raw)
In-Reply-To: <Pine.LNX.4.33.0108180245070.27721-100000@kobayashi.soze.net>

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 127.0.0.2
# ifconfig lo:20001 127.0.0.3
# ifconfig lo:10001
lo:10001  Link encap:Local Loopback  
          inet addr:127.0.0.2  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1

# ifconfig lo:20001  
lo:20001  Link encap:Local Loopback  
          inet addr:127.0.0.3  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1

> 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??.

~mc

  parent reply	other threads:[~2001-08-18 12:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-16 21:11 Aliases dmaynor
2001-08-17  2:48 ` Aliases dlang
2001-08-18  5:43   ` Aliases Jim Roland
2001-08-18 10:30     ` Aliases Justin Guyett
2001-08-18 12:32       ` Aliases Ralf Baechle
2001-08-18 12:57         ` Aliases David Lang
2001-08-18 19:29           ` Aliases David Ford
2001-08-18 19:25         ` Aliases David Ford
2001-08-18 21:45           ` Aliases Ralf Baechle
2001-08-20  1:03         ` Aliases David Lang
2001-08-20  2:29           ` Aliases Justin Guyett
2001-08-18 12:43       ` Michael Clark [this message]
     [not found] <00df01c127a8$c354ad20$bb1cfa18@JimWS.suse.lists.linux.kernel>
     [not found] ` <Pine.LNX.4.33.0108180245070.27721-100000@kobayashi.soze.net.suse.lists.linux.kernel>
     [not found]   ` <20010818143232.A11687@bacchus.dhis.org.suse.lists.linux.kernel>
2001-08-18 22:04     ` Aliases Andi Kleen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3B7E6301.50833345@metaparadigm.com \
    --to=michael@metaparadigm.com \
    --cc=jroland@roland.net \
    --cc=justin@soze.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox