Ask Your Question
0

Vms cannot ping dhcp server on another network with a router

asked 2012-10-26 12:14:58 -0500

gongysh gravatar image

HI, I create two networks and with one subnet on each: 10.0.1.0/24 on private net1 20.0.1.0/24 on private net2 then I start one VM on each of this network: server1 with 10.0.1.3 IP server2 with 20.0.1.3 IP. then I create a router and add two interfaces to this router: quantum router-interface-add router1 subnet1 quantum router-interface-add router1 subnet2 then In Vm server1, I can ping 20.0.1.3 (server2)and 20.0.1.1 (router) but I cannot ping 20.0.1.2(dhcp server) in VM server2, I can ping 10.0.1.3 and 10.0.1.1, but I cannot ping 10.0.1.2 either. in router namespace, I can ping 10.0.1.2 and 20.0.1.2: sudo ip netns exec qrouter-3d7229c6-2594-425e-8551-665817ecbb99 ping 10.0.1.2 PING 10.0.1.2 (10.0.1.2) 56(84) bytes of data. 64 bytes from 10.0.1.2: icmp_req=1 ttl=64 time=0.580 ms 64 bytes from 10.0.1.2: icmp_req=2 ttl=64 time=0.083 ms

any one can explain this?

edit retag flag offensive close merge delete

5 answers

Sort by ยป oldest newest most voted
0

answered 2012-10-29 01:45:00 -0500

gongysh gravatar image

Yes. It can ping its own DHCP server.

edit flag offensive delete link more
0

answered 2012-10-26 22:32:13 -0500

danwent gravatar image

interesting, I will try to repro.

can a VM ping its local DHCP IP? In the example about, you showed that VMs cannot reach the DHCP server in the other subnet.

edit flag offensive delete link more
0

answered 2012-11-06 05:20:55 -0500

danwent gravatar image

Hi Yong,

Sorry it took me so long to fully investigate this. It turns out the answer is actually quite simple, it just took me a while to figure it out.

The reason you're seeing this behavior is that the namespace for the DHCP server only has a route to a local subnet, it does not have a "default route" to reach other subnets. Thus, you can ping it from an IP in the same subnet as the DHCP server, but not from any server in a different subnet.

Arguably this is the right thing, as their is no reason anyone outside of the local subnet needs to contact the DHCP server.

edit flag offensive delete link more
0

answered 2012-11-06 05:26:31 -0500

gongysh gravatar image

Yes, I agree with you. In fact, I answer other's email with the same idea as yours here.

Thanks

edit flag offensive delete link more
0

answered 2012-11-06 05:26:43 -0500

gongysh gravatar image

Thanks dan wendlandt, that solved my question.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2012-10-26 12:14:58 -0500

Seen: 79 times

Last updated: Nov 06 '12