OpenVZ Forum


Home » General » Support » dual nic environment
Re: dual nic environment [message #7511 is a reply to message #7502] Mon, 16 October 2006 17:16 Go to previous messageGo to previous message
rudal is currently offline  rudal
Messages: 20
Registered: July 2006
Junior Member
Hello Andrew,
below is the requested information:

An external machine with 10.2.4.9 IP address is pinging the 10.2.5.2 (currently attached to the VE.)

The HW node has an IP of

eth1:0 Link encap:Ethernet HWaddr 00:0E:0C:7F:0E:D6
inet addr:10.2.4.124 Bcast:10.2.7.255 Mask:255.255.252.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1


From inside a VPS:
-bash-3.00# tcpdump -nni venet0
09:47:50.704721 IP 10.2.4.9 > 10.2.5.2: icmp 64: echo request seq 5
09:47:50.704745 IP 10.2.5.2 > 10.2.4.9: icmp 64: echo reply seq 5
09:47:51.704670 IP 10.2.4.9 > 10.2.5.2: icmp 64: echo request seq 6
09:47:51.704696 IP 10.2.5.2 > 10.2.4.9: icmp 64: echo reply seq 6
09:47:52.704606 IP 10.2.4.9 > 10.2.5.2: icmp 64: echo request seq 7
09:47:52.704630 IP 10.2.5.2 > 10.2.4.9: icmp 64: echo reply seq 7
09:47:53.704574 IP 10.2.4.9 > 10.2.5.2: icmp 64: echo request seq 8
09:47:53.704601 IP 10.2.5.2 > 10.2.4.9: icmp 64: echo reply seq 8

From inside the HN on eth1:
09:50:45.372464 IP 10.2.4.9 > 10.2.5.2: icmp 64: echo request seq 5
09:50:45.372490 IP 10.2.5.2 > 10.2.4.9: icmp 64: echo reply seq 5
09:50:46.373410 IP 10.2.4.9 > 10.2.5.2: icmp 64: echo request seq 6
09:50:46.373439 IP 10.2.5.2 > 10.2.4.9: icmp 64: echo reply seq 6
09:50:47.373368 IP 10.2.4.9 > 10.2.5.2: icmp 64: echo request seq 7
09:50:47.373408 IP 10.2.5.2 > 10.2.4.9: icmp 64: echo reply seq 7
09:50:48.374317 IP 10.2.4.9 > 10.2.5.2: icmp 64: echo request seq 8
09:50:48.374342 IP 10.2.5.2 > 10.2.4.9: icmp 64: echo reply seq 8



From inside the HN on venet0:
09:56:26.916456 IP 10.2.4.9 > 10.2.5.2: icmp 64: echo request seq 5
09:56:26.916533 IP 10.2.5.2 > 10.2.4.9: icmp 64: echo reply seq 5
09:56:27.917379 IP 10.2.4.9 > 10.2.5.2: icmp 64: echo request seq 6
09:56:27.917411 IP 10.2.5.2 > 10.2.4.9: icmp 64: echo reply seq 6
09:56:28.918339 IP 10.2.4.9 > 10.2.5.2: icmp 64: echo request seq 7
09:56:28.918367 IP 10.2.5.2 > 10.2.4.9: icmp 64: echo reply seq 7
09:56:29.919429 IP 10.2.4.9 > 10.2.5.2: icmp 64: echo request seq 8
09:56:29.919454 IP 10.2.5.2 > 10.2.4.9: icmp 64: echo reply seq 8

So now I tried to ping from inside the VE to the external machine:

-bash-3.00# ping 10.2.4.9
PING 10.2.4.9 (10.2.4.9) 56(84) bytes of data.

and at the same time on the HW node: (xx.xxx.x.27 is a public IP on the eth0 of the HW node)

tcpdump -nni venet0

09:58:55.591271 IP xx.xxx.x.27 > 10.2.4.9: icmp 64: echo request seq 10
09:58:56.591045 IP xx.xxx.x.27 > 10.2.4.9: icmp 64: echo request seq 11
09:58:57.590816 IP xx.xxx.x.27 > 10.2.4.9: icmp 64: echo request seq 12
09:58:58.590591 IP xx.xxx.x.27 > 10.2.4.9: icmp 64: echo request seq 13
09:58:59.590362 IP xx.xxx.x.27 > 10.2.4.9: icmp 64: echo request seq 14
09:59:00.590136 IP xx.xxx.x.27 > 10.2.4.9: icmp 64: echo request seq 15
09:59:01.589909 IP xx.xxx.x.27 > 10.2.4.9: icmp 64: echo request seq 16

So apparently, the VE uses eth0 as the outgoing interface? But pinging from the outside to the VE, seems to have worked and the VE knew which interface to use, but not the other way?

My understanding will be since the VE outgoing interface (if initiated from inside the VE) will be defaulted (bounded) to eth0 (packet header will have a source interface of eth0)? But if it's initiated from the outside, and the packet header has a source interface eth1, then the VE will used that source interface to return the echo back to the sender, is that correct?

Hope the information above helps.

Thanks.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: private ip for host-to-ve communication only
Next Topic: *CLOSED* Security breach :: prctl vulnerability
Goto Forum:
  


Current Time: Mon Sep 08 15:01:25 GMT 2025

Total time taken to generate the page: 0.07127 seconds