[Sussex] IP Numbers

John Crowhurst fyremoon at fyremoon.net
Fri May 2 22:50:00 UTC 2003


>> This is a bit of a strange question, but one that has just been asked
>> here.
>>
>>
>> How many IP numbers can LINUX support on the same network interface?
>>
>
> I guess you mean eth0:1 eth0:2 etc. I've run one interface with five
> different network numbers (two "real" IPs, 192.168.9.x, 10.x.x.x,
> 172.16.x.x) so it can't be restricted on the basis of network. I suspect
> that it will depend on the number supported as default at compile time -
> time to look at the code!

Its set to 256 under Linux 2.2 kernels, defined in
linux/net/core/net_alias.c, but entered the kernel in 2.0.31-pre7:

+ *    NET_ALIAS_MAX_DEFAULT: max. alias slot number allowed by default,
+ *      can be changed by sysctl

I'm not sure what the limits are with Linux 2.4 kernels, as it uses
iproute2 rules to set ip aliases, for instance:

#ip addr add 10.0.0.1/24 brd + dev eth0 label eth0:Alias

The limits aren't defined in iproute2's ip addr code, so the limits may be
the number of filters you can apply to iptables/netfilter.

--
John







More information about the Sussex mailing list