Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Jan 2006 08:56:36 -0500
From:      Chuck Swiger <cswiger@mac.com>
To:        tomasflyer@netscape.net
Cc:        freebsd-questions@freebsd.org
Subject:   Re: How many IP address aliases can practically be used on one physical Ethernet interface?
Message-ID:  <43DF6C94.7090404@mac.com>
In-Reply-To: <8C7F4678970ACD2-1EFC-9D50@mblkn-m01.sysops.aol.com>
References:  <8C7F4678970ACD2-1EFC-9D50@mblkn-m01.sysops.aol.com>

next in thread | previous in thread | raw e-mail | index | archive | help
tomasflyer@netscape.net wrote:
> I am implementing and using a test bed simulating a huge amount of IP
> clients, each preferable having a unique IP address. There is no, no way
> to have an individual physical interface for each simulated client so I
> use IP aliases.

Use BPF or libnet to generate test traffic using spoofed IPs, rather than
actually configuring a machine with thousands of IPs.  There are also companies
which make hardware IP traffic generators, if you want to buy a solution rather
than building one.

For most purposes, generating 1000 connection requests from one host using 1 IP
is pretty close to generating 1000 connection requests from one host using 1000 IPs.

> So I became quite optimistic reading about Virtual Hosts and IP aliases
> in the FreeBSD handbook chapter 11.9:
> 
> http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/configtuning-vi
> rtual-hosts.html
> 
> "A given network interface has one "real" address, and may have any
> number of "alias" addresses".
> 
> So is this really true and where is the catch?  Will a FreeBSD 6.0 accept
> for example 8190 IP address aliases  each on say five physical Ethernet
> interfaces? Will IP addresses be manageable to add, list and delete? And
> how much will networking performance degrade compared to using just a
> few aliases?

I have heard of people using hundreds of aliases OK, even though I am dubious
about the merits of doing so.  I don't know whether FreeBSD can deal with ~41000
configured IP addresses on a system at all, but I doubt that a normal person
would consider such a setup "manageable".

Consider using IPFW divert sockets instead.  You should also look into dummynet.

> I can add that there is no forwarding or routing through a simulator box
> except IP traffic to and from the client simulation running inside.

What about ARP traffic?  In most cases, machines with hundreds or thousands of
clients are dealing with them remotely, not locally, so all of the traffic just
goes between the host and it's upstream Internet-facing router, involving
minimal layer-2 resolution.

Your setup with tens of thousands of local IPs is going to involve massive ARP
traffic which does not happen with most internet server scenarios.  You're
likely to encounter other issues: most network switches have a limited capacity
for their ARP tables, and are restricted to 1024 or perhaps 4096 entries.

-- 
-Chuck



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43DF6C94.7090404>