Is it possible that all traffic from computer 1 towards computer 2 go thru udp port D of computer 1 and received at udp port B of computer 2. Similarly all traffic from computer 2 towards computer 1 goes thru udp port A of computer 2 and received at udp port C of computer 1 Schematic

I have background of Layer-1 and after lots of googling I am still not able to find if this can be done. If yes then how and what should I search or study in order to do this. Regards Sumit


Welcome to Network Engineering! We hope you will become a contributing member of this community.

I think you misunderstand the concept of ports. They are abstract concepts, not physical ports like a USB port. Data doesn't "go through" ports.

A UDP datagram has a source port and a destination port. Typically the destination port identifies what process on the receiver should process the data; the source port identifies which process sent the data.

  • Ok. Suppose I have two wired connection between A and B (assuming both A and B have two network cards and hence I have eth0, eth1 on A and eth2, eth3 on B). Can I program it to have unidirectional traffic, i.e, from A to B eth0-->eth2 and from B to A eth3 --> eth1. I am sorry for if this sounds stupid. – Newbie Sep 6 '19 at 21:41
  • Yes. For example each link can be s separate subnet. A to B can use link 1, and B to A can use link 2. – Ron Trunk Sep 6 '19 at 22:04

To answer to your question in regards to what to study you couls study about sockets , and some content of network programming if you want to use udp you will need to pick a protocol that uses udp for its transport , there is some good content about sockets in some linux materials hope this helps a little

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