How many IP address aliases can practically be used on one physical Ethernet interface?

Chuck Swiger cswiger at
Tue Jan 31 05:56:28 PST 2006

tomasflyer at 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:
> 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.


More information about the freebsd-questions mailing list