Sequence
Posts: 1
Joined: Thu Jun 02, 2016 2:52 pm

RPi; IP address range and multiple instances of a process

Thu Jun 02, 2016 3:06 pm

Hi all,

I am looking for a certain solution which would enable me to run 10 or x instances of a server process (java.jar) on a RPi. Easy yes, however, each process instance should communicate through its own static IP-address. The IP side is covered, I have 10 different static IPv4 addresses which I have available to me and the gateway to route them.

At first, I thought the only way forward was to run 10 VM's on a RPi, each configured as a separate host with its own IP. However, I thought it might be wise to ask around first before diving into virtualization on a RPi...

Would anybody be able to give his/her two cents?

Thanks in advance.
Chance favors the prepared mind!

cpc464
Posts: 239
Joined: Tue Jul 08, 2014 5:10 pm
Contact: Website

Re: RPi; IP address range and multiple instances of a proces

Thu Jun 02, 2016 4:08 pm

I thought the normal way to do this was to have each process use a different port, rather than a different IP address. Using different ports should be quite easy. To use different IP addresses, you should be able to just add each IP address to the eth0 device. Either in the same subnet/vlan, or on different vlans.

Not sure a Pi will be able to run 10 instances of your jar thingy. The CPU and memory needed by each will need to be quite low.
Unix engineer since 1989

User avatar
rpdom
Posts: 17170
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: RPi; IP address range and multiple instances of a proces

Thu Jun 02, 2016 5:44 pm

It is possible to have virtual IP interfaces with different IP addresses on one physical interface, without the need for a VM (eth0:0, eth0:1 etc), but I agree that different port numbers would be a better solution.

Return to “Networking and servers”