Mateus,
This is pretty simple. You can generally just use ifconfig to create an alias;
such as:
ifconfig eth0:1 10.0.0.1 netmask 255.255.255.0 up
ifconfig eth0:2 etc etc etc
Also, in Redhat distros you can make a "range" file with a range of IP's to map
to the box. The range file needs to be named "ifcfg-eth0-range#".
The contents describe the IP range to be mapped which also survives a reboot, or
restart with /etc/init.d/network
Here's a sample of /etc/sysconfig/network-scripts/ifcfg-eth0-range0:
IPADDR_START=10.0.0.1
IPADDR_END=10.0.0.254
CLONENUM_START=1
NETMASK=255.255.255.0
BROADCAST=10.0.0.255
This maps .1 -> 254 to this box starting with eth0:1
For multiple ranges create a different range# file.
Obviously for other NIC's alter eth0 appropriately.
Other distros probably have similar options.
Regards,
Jason H.
TouchSupport, LLC
Mateus Interciso wrote:
Hello,
Is there a way to create thousands of internal ips (like 10.0.0.1) on
just one linux box, with 2 NICs?
I need this for a final paper for university, it would be about routing
and load balancing, and since I don't have thousands of computers, I
would need another way, is there any?
Thanks a lot.
Mateus
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html