0

I don't get how Network addressing works for Multi-processor systems.

Check me out : Normal TCP/IP Networking uses The destination IP to designate the entire host/system, and the L4 (TCP/UDP) destination port to designate the target application.

  1. I can (presumably) set the system to have one IP address, and have applications running on the different CPU's use different L4 port numbers. Then, for each incoming packet the L4 port can be used to decide to which CPU to send it. BUT - how does the system ensure applications on one CPU will not re-use a L4 Port number being used on the other?

  2. If the above is the same, it seems to mean I can't really use two (or more) CPU's for one application. For example, if I am running a web-server, all packets toward it will have a TCP port value of 80, and how will the system then decide which packets to send top which CPU?

  3. It is possible, of course to give each CPU its own IP address - but then again, I will not be able to run a multi-CPU application.

What am I missing? how does this work?

closed as off-topic by Michael Homer, msp9011, countermode, schily, sebasth Aug 30 '18 at 12:33

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Requests for learning materials (tutorials, how-tos etc.) are off topic. The only exception is questions about where to find official documentation (e.g. POSIX specifications). See the Help Center and our Community Meta for more information." – Michael Homer, msp9011, countermode, schily, sebasth
If this question can be reworded to fit the rules in the help center, please edit the question.

1

Multi-processor systems and networking are independent from each other.

You can have many network namespaces on a single processor system where each namespace will have a different address, but the same processor will execute the code.

You can have a single network address for a multi-processor system, where all network requests will be processed by whatever processor happens to be available to execute the current thread.

If you somehow want to associate certain processors with certain network addresses (or even port numbers of applications), you'll have to set up this on the OS, using cgroups etc.

"Give each CPU its own IP address" doesn't exist as a concept. "Have the OS make some sort of partitions, and assign a IP address and a single processor to each partition" works. Like any other combination, i.e. "3 IP addresses, and 2 dedicated processors". Or "use a dedicated processor for this dedicated application that is listening on port 80".

Not the answer you're looking for? Browse other questions tagged or ask your own question.