I'm doing some computer network homework and I'm supposed to develop some sort of Peer to Peer file sharing software, and when I wanna test it I need to run a few (5) instances on my linux/ubuntnu 11.10 . which means each one need to has a unique IP address. I heard I can do that but I dunno how. how can I have many IP addresses on a single computer? thanks
closed as off topic by splattne Feb 2 '12 at 11:47
Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here. If this question can be reworded to fit the rules in the help center, please edit the question.
It is not really clear what you are trying to do, but you can run multiple virtual machines (virtualization) on your PC to do your tests using a single machine.
If you want to have multiple IP addresses on the same physical interface, that is another thing. If this is what you want, you can do it the old way using
The old way:
The new way:
Of course, you need to replace
You need to create a subinterface inorder to assign a multiple ip to the same interface (for e.g. eth0). The command for assigning suppose 2 Ip address like 10.100.10.1/24 & 10.100.10.2/24 to interface eth0 will be as follows
# ifconfig eth0 10.100.10.1 netmask 255.255.255.0 up
# ifconfig eth0:1 10.100.10.2 netmask 255.255.255.0 up
After this restart the network
service network restart
I hope this answers your question...