0

I have three Ubuntu machines, machine A, B, C. I also created a VNet 10.3.0.0/16, and create three sub-net SubN1: 10.3.0.0/24 SubN2: 10.3.1.0/24 SubN3: 10.3.2.0/24

Machine A has 3 nics, eth0, eth1, eth2 Machine B has 2 nics eth0, eth1 Machine C has 2 nics eth0, eth1

I let eth0 of every machine connect to SubN1 for management purpose. Machine A eth1 and Machine B eth1 belongs to SubN2 Machine A eth2 and Machine C eth1 belongs to SubN3 I want to let Machine B connect to Machine C with interface eth1, It means I need to add a route between Machine B & C I've verified B and C not connected.

Then, In machine B routing table, I type the command: ip route add {SubN3}/24 via {Ip address of Machine A's eth1} dev eth1 In machine C routing table, I type the command: ip route add {SubN2}/24 via {Ip address of Machine A's eth2} dev eth1

I even didn't set the IP forwarding in Machine A, then machine B can connect to machine C via their eth1 successfully.

It's great! However, the questions come.

I cannot see any traffic in Machine A(either eth1 or eth2) while Machine B and C are connected(ping or ssh each other)

Even I shutdown Machine A. Machine B and C are still connected!!, It is weird.

What I want is: machine B and C connected but the traffic should via Machine A.

Would you tell me what's wrong or anything I need to set?

Thanks

  • 1
    What default gateway does each host use? If you shut down A, what does a traceroute between B and C look like? – guzzijason Sep 5 '18 at 3:22
0

I think you need to wait for more time for the ping output.

I have the same test as you.

vm1 has nic0 10.0.0.4, nic1 10.0.1.4, nic2 10.0.2.4;
vm2 has nic0 10.0.0.5, nic1 10.0.1.5;
vm3 has nic0 10.0.0.6, nic2 10.0.2.5.
nic0s join into subnet0 10.0.0.0/24; 
nic1s join into subnet1 10.0.1.0 24; 
nic2s join into subnet2 10.0.2.0/24.

Then I add the one route to vm2: sudo ip route add 10.0.2.0/24 via 10.0.1.4 dev eth1 enter image description here

add one route to vm3: sudo ip route add 10.0.1.0/24 via 10.0.2.4 dev eth1 enter image description here

So I can ping from vm2 to vm3 using eth1. Once I stop the vm1 on the portal. I find the response: Destination Host Unreachable. enter image description here

Once I restart the vm1, The ping connection is restoring. enter image description here

So I think you set correct, just need more time in this case.

  • Please let me know if this helps or if you need more info in this case. – Nancy Xiong Sep 7 '18 at 1:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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