0

I have 3 VMs A,B and C which are running on Ubuntu. Those VMs are connected like follows :-

A (eth0/10.1.1.10) <------>(eth0/10.1.1.20)B(eth1/10.1.1.30)<------------>(eth0/10.1.1.40)C

Basically I am trying to do simple socket communication between System A and system C via system B(When A,B and C are in same network).

When I am ping from A to B (10.1.1.20) ping is not working.

is there any way to send a packet coming to interface eth0 of system B and send it of eth1 of system B in above topology?

5
  • 2
    Please edit your question and add more details and clarification. How exactly do you send traffic? What means "not able to send it"? Does an error occur? Do the packets get sent directly from A to C without passing B? This would be the expected behavior if all interfaces are connected to the same logical network. Addresses 10.1.1.300 and 10.1.1.400 are invalid. What is your network mask? Routing tables? Showing the corresponding code would help to understand your question.
    – Bodo
    Dec 16, 2020 at 15:45
  • body says "A to C via B". Title says "from three different system in same" which is it? Dec 16, 2020 at 16:12
  • If you can't ping B from A, then doing anything else in that direction between those two hosts seems to be out of the question. You seem to have an issue with your network setup that you will need to resolve before you can start thinking about sending data between your systems.
    – Kusalananda
    Dec 16, 2020 at 16:23
  • What virtualization software do you use? How did you configure the network for the VMs? Please add more details about what you want to implement. Do you want to configure the routing in a way that any packet sent from A to C or vice versa will be automatically routed via B? Or do you want to implement a software to be run on machine B that will communicate with both A and C and forward data from A to C and vice versa?
    – Bodo
    Dec 16, 2020 at 16:40
  • Inconsistency: Title says same network, body says "to interface eth0 of system B and send it of eth1". Dec 16, 2020 at 17:21

1 Answer 1

1

Your current setup will not work because eth0 and eth1 on Machine-B must belong to different subnets in order for Layer 3 packet forwarding to take place. However, you can make Machine-B forward frames at Layer 2 within a broadcast domain. This means that Machine-B must be configured as a bridge (or Layer 2 switch).

Here is a howto guide from Ubuntu Website. It explains how to turn a linux box into a network bridge for a subnet.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .