OpenVZ Forum


Home » General » Support » communicating between virtual machines
communicating between virtual machines [message #35238] Wed, 11 March 2009 11:18 Go to next message
arulP is currently offline  arulP
Messages: 18
Registered: March 2009
Location: india
Junior Member

how to communicate between virtual machines within a same physical machine?I tried ssh ,but its not working..can any one suggest a way?
Re: communicating between virtual machines [message #35243 is a reply to message #35238] Wed, 11 March 2009 16:10 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Hello,

could you describe your problem in more detail?
http://forum.openvz.org/index.php?t=tree&goto=27545& #msg_27545

Are you able to reach one VE from another via ping?
Is sshd is running?
Re: communicating between virtual machines [message #35249 is a reply to message #35243] Thu, 12 March 2009 04:40 Go to previous messageGo to next message
arulP is currently offline  arulP
Messages: 18
Registered: March 2009
Location: india
Junior Member

I cannot ping from one VE to the other and the sshd service is running in both the VEs.Do i need another ethernet card for communicating between two VEs?


here are the details:
[root@yahoo2 ~]# ip rule list ---------------------------routing rules
0: from all lookup local
32766: from all lookup main
32767: from all lookup default


[root@yahoo2 ~]# ip route list table all
192.168.4.171 dev venet0 scope link
192.168.4.170 dev venet0 scope link
192.168.4.0/24 dev eth0 proto kernel scope link src 192.168.4.102
192.168.4.0/24 dev venet0 proto kernel scope link src 192.168.4.173
169.254.0.0/16 dev venet0 scope link
default via 192.168.4.1 dev eth0
local 192.168.4.173 dev venet0 table local proto kernel scope host src 192.168.4.173
broadcast 192.168.4.255 dev eth0 table local proto kernel scope link src 192.168.4.102
broadcast 192.168.4.255 dev venet0 table local proto kernel scope link src 192.168.4.173
broadcast 127.255.255.255 dev lo table local proto kernel scope link src 127.0.0.1
broadcast 192.168.4.0 dev eth0 table local proto kernel scope link src 192.168.4.102
broadcast 192.168.4.0 dev venet0 table local proto kernel scope link src 192.168.4.173
local 192.168.4.102 dev eth0 table local proto kernel scope host src 192.168.4.102
broadcast 127.0.0.0 dev lo table local proto kernel scope link src 127.0.0.1
local 127.0.0.1 dev lo table local proto kernel scope host src 127.0.0.1
local 127.0.0.0/8 dev lo table local proto kernel scope host src 127.0.0.1
unreachable ::/96 dev lo metric 1024 expires 21333833sec error -101 mtu 16436 advmss 16376 hoplimit 4294967295
unreachable ::ffff:0.0.0.0/96 dev lo metric 1024 expires 21333833sec error -101 mtu 16436 advmss 16376 hoplimit 4294967295
unreachable 2002:a00::/24 dev lo metric 1024 expires 21333833sec error -101 mtu 16436 advmss 16376 hoplimit 4294967295
unreachable 2002:7f00::/24 dev lo metric 1024 expires 21333833sec error -101 mtu 16436 advmss 16376 hoplimit 4294967295
unreachable 2002:a9fe::/32 dev lo metric 1024 expires 21333833sec error -101 mtu 16436 advmss 16376 hoplimit 4294967295
unreachable 2002:ac10::/28 dev lo metric 1024 expires 21333833sec error -101 mtu 16436 advmss 16376 hoplimit 4294967295
unreachable 2002:c0a8::/32 dev lo metric 1024 expires 21333833sec error -101 mtu 16436 advmss 16376 hoplimit 4294967295
unreachable 2002:e000::/19 dev lo metric 1024 expires 21333833sec error -101 mtu 16436 advmss 16376 hoplimit 4294967295
unreachable 3ffe:ffff::/32 dev lo metric 1024 expires 21333833sec error -101 mtu 16436 advmss 16376 hoplimit 4294967295
fe80::/64 dev eth0 metric 256 expires 21333836sec mtu 1500 advmss 1440 hoplimit 4294967295
fe80::/64 dev veth170.0 metric 256 expires 21333929sec mtu 1500 advmss 1440 hoplimit 4294967295
fe80::/64 dev veth171.0 metric 256 expires 21334117sec mtu 1500 advmss 1440 hoplimit 4294967295
unreachable default dev lo table unspec proto none metric -1 error -101 hoplimit 255
local ::1 via :: dev lo table local proto none metric 0 mtu 16436 advmss 16376 hoplimit 4294967295
local fe80::218:51ff:fe38:6a4a via :: dev lo table local proto none metric 0 mtu 16436 advmss 16376 hoplimit 4294967295
local fe80::218:51ff:fe56:c259 via :: dev lo table local proto none metric 0 mtu 16436 advmss 16376 hoplimit 4294967295
local fe80::223:54ff:fe17:a95e via :: dev lo table local proto none metric 0 mtu 16436 advmss 16376 hoplimit 4294967295
ff00::/8 dev eth0 table local metric 256 expires 21333836sec mtu 1500 advmss 1440 hoplimit 4294967295
ff00::/8 dev veth170.0 table local metric 256 expires 21333929sec mtu 1500 advmss 1440 hoplimit 4294967295
ff00::/8 dev veth171.0 table local metric 256 expires 21334117sec mtu 1500 advmss 1440 hoplimit 4294967295
unreachable default dev lo table unspec proto none metric -1 error -101 hoplimit 255


------in virtual machine
[root@op /]# ip rule list
0: from all lookup local
32766: from all lookup main
32767: from all lookup default

------------------------------netfilter configuration


[root@yahoo2 ~]# iptables -t nat -L && iptables -t filter -L && iptables -t mangle -L
Chain PREROUTING (policy ACCEPT)
target prot opt source destination

Chain POSTROUTING (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain PREROUTING (policy ACCEPT)
target prot opt source destination

Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Chain POSTROUTING (policy ACCEPT)
target prot opt source destination




-----------------------packet paths
[root@yahoo2 ~]# tcpdump ----------------------------------------------------in HN
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
09:58:13.112700 IP 192.168.4.6.netbios-ns > 192.168.4.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
09:58:13.113430 IP 192.168.4.102.34670 > 192.168.4.1.domain: 1328+ PTR? 255.4.168.192.in-addr.arpa. (44)
09:58:13.121168 IP 192.168.4.1.domain > 192.168.4.102.34670: 1328 NXDomain* 0/1/0 (91)
09:58:13.121269 IP 192.168.4.102.54181 > 192.168.4.1.domain: 31018+ PTR? 6.4.168.192.in-addr.arpa. (42)
09:58:13.121577 IP 192.168.4.1.domain > 192.168.4.102.54181: 31018 NXDomain* 0/1/0 (89)
09:58:13.121680 IP 192.168.4.102.59213 > 192.168.4.1.domain: 56387+ PTR? 1.4.168.192.in-addr.arpa. (42)
09:58:13.121987 IP 192.168.4.1.domain > 192.168.4.102.59213: 56387 NXDomain* 0/1/0 (89)
09:58:13.122038 IP 192.168.4.102.58371 > 192.168.4.1.domain: 27962+ PTR? 102.4.168.192.in-addr.arpa. (44)
09:58:13.122396 IP 192.168.4.1.domain > 192.168.4.102.58371: 27962 NXDomain* 0/1/0 (91)
09:58:13.219456 IP 192.168.4.7.netbios-ns > 192.168.4.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
09:58:13.219595 IP 192.168.4.102.35445 > 192.168.4.1.domain: 58836+ PTR? 7.4.168.192.in-addr.arpa. (42)
09:58:13.219879 IP 192.168.4.1.domain > 192.168.4.102.35445: 58836 NXDomain* 0/1/0 (89)
09:58:13.227269 arp who-has 192.168.3.200 tell 192.168.3.84
09:58:13.227330 IP 192.168.4.102.49192 > 192.168.4.1.domain: 24555+ PTR? 200.3.168.192.in-addr.arpa. (44)
09:58:13.227678 IP 192.168.4.1.domain > 192.168.4.102.49192: 24555 NXDomain* 0/1/0 (91)
09:58:13.227786 IP 192.168.4.102.37992 > 192.168.4.1.domain: 47504+ PTR? 84.3.168.192.in-addr.arpa. (43)
09:58:13.228088 IP 192.168.4.1.domain > 192.168.4.102.37992: 47504 NXDomain* 0/1/0 (90)
09:58:13.286779 arp who-has 192.168.3.34 tell 192.168.3.31
09:58:13.286875 IP 192.168.4.102.44656 > 192.168.4.1.domain: 45284+ PTR? 34.3.168.192.in-addr.arpa. (43)
09:58:13.287188 IP 192.168.4.1.domain > 192.168.4.102.44656: 45284 NXDomain* 0/1/0 (90)
09:58:13.287245 IP 192.168.4.102.60931 > 192.168.4.1.domain: 15132+ PTR? 31.3.168.192.in-addr.arpa. (43)
09:58:13.287597 IP 192.168.4.1.domain > 192.168.4.102.60931: 15132 NXDomain* 0/1/0 (90)
09:58:13.312632 arp who-has 192.168.3.138 tell 192.168.3.105
09:58:13.312711 IP 192.168.4.102.39256 > 192.168.4.1.domain: 44893+ PTR? 138.3.168.192.in-addr.arpa. (44)
09:58:13.313041 IP 192.168.4.1.domain > 192.168.4.102.39256: 44893 NXDomain* 0/1/0 (91)
09:58:13.313097 IP 192.168.4.102.38241 > 192.168.4.1.domain: 755+ PTR? 105.3.168.192.in-addr.arpa. (44)
09:58:13.313450 IP 192.168.4.1.domain > 192.168.4.102.38241: 755 NXDomain* 0/1/0 (91)
09:58:13.400946 arp who-has 192.168.3.76 tell 192.168.3.11
09:58:13.401028 IP 192.168.4.102.52068 > 192.168.4.1.domain: 3891+ PTR? 76.3.168.192.in-addr.arpa. (43)
09:58:13.401354 IP 192.168.4.1.domain > 192.168.4.102.52068: 3891 NXDomain* 0/1/0 (90)
09:58:13.401410 IP 192.168.4.102.46938 > 192.168.4.1.domain: 52643+ PTR? 11.3.168.192.in-addr.arpa. (43)
09:58:13.401764 IP 192.168.4.1.domain > 192.168.4.102.46938: 52643 NXDomain* 0/1/0 (90)
09:58:13.419504 IP 192.168.4.12.netbios-ns > 192.168.4.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
09:58:13.419589 IP 192.168.4.102.57456 > 192.168.4.1.domain: 54390+ PTR? 12.4.168.192.in-addr.arpa. (43)
09:58:13.419913 IP 192.168.4.1.domain > 192.168.4.102.57456: 54390 NXDomain* 0/1/0 (90)
09:58:13.472443 arp who-has 192.168.3.169 tell 192.168.3.99
09:58:13.472518 IP 192.168.4.102.56024 > 192.168.4.1.domain: 53334+ PTR? 169.3.168.192.in-addr.arpa. (44)
09:58:13.472852 IP 192.168.4.1.domain > 192.168.4.102.56024: 53334 NXDomain* 0/1/0 (91)
09:58:13.472907 IP 192.168.4.102.51156 > 192.168.4.1.domain: 54159+ PTR? 99.3.168.192.in-addr.arpa. (43)
09:58:13.473262 IP 192.168.4.1.domain > 192.168.4.102.51156: 54159 NXDomain* 0/1/0 (90)
09:58:13.560280 IP 192.168.4.15.netbios-ns > 192.168.4.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
09:58:13.560374 IP 192.168.4.102.50605 > 192.168.4.1.domain: 15489+ PTR? 15.4.168.192.in-addr.arpa. (43)
09:58:13.560690 IP 192.168.4.1.domain > 192.168.4.102.50605: 15489 NXDomain* 0/1/0 (90)
09:58:13.613198 arp who-has 192.168.3.47 tell 192.168.3.64
09:58:13.613277 IP 192.168.4.102.42911 > 192.168.4.1.domain: 50
...

Re: communicating between virtual machines [message #35251 is a reply to message #35249] Thu, 12 March 2009 06:59 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Quote:


Do i need another ethernet card for communicating between two VEs?


No, you don't need additional network cards!

Please, check sysctl parameters
http://wiki.openvz.org/Quick_installation#sysctl

Could you also show "arp -n" from HN?
Re: communicating between virtual machines [message #35253 is a reply to message #35251] Thu, 12 March 2009 11:32 Go to previous messageGo to next message
arulP is currently offline  arulP
Messages: 18
Registered: March 2009
Location: india
Junior Member

Quote:

Could you also show "arp -n" from HN?



[root@yahoo4 ~]# arp -n
Address HWtype HWaddress Flags Mask Iface
192.168.4.1 ether 00:02:44:18:6C:78 C eth0
192.168.4.153 * * MP eth0
192.168.4.152 * * MP eth0



last two rows are for the two VEs.


sysctl.conf-------------in HN

# Controls IP packet forwarding
net.ipv4.ip_forward = 1

# Controls source route verification
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.proxy_arp = 0
# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0

# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 2

# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1

# Controls the use of TCP syncookies
net.ipv4.tcp_syncookies = 1

#newly added
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 0

Re: communicating between virtual machines [message #35254 is a reply to message #35253] Thu, 12 March 2009 11:40 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
How did you configure venet interface inside VEs?

Quote:


192.168.4.0/24 dev venet0 proto kernel scope link src 192.168.4.173
169.254.0.0/16 dev venet0 scope link


This is wrong.

Please, use vzctl set $VEID --ipadd $IP [--save] command
Re: communicating between virtual machines [message #35255 is a reply to message #35254] Thu, 12 March 2009 11:46 Go to previous messageGo to next message
arulP is currently offline  arulP
Messages: 18
Registered: March 2009
Location: india
Junior Member

i used this command only------>vzctl set VEid --ipadd <ipaddr> --save
Re: communicating between virtual machines [message #35256 is a reply to message #35255] Thu, 12 March 2009 11:52 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
And why does HN contain these strings?
Quote:


192.168.4.0/24 dev venet0 proto kernel scope link src 192.168.4.173
169.254.0.0/16 dev venet0 scope link



vzctl shouldn't add them!
Re: communicating between virtual machines [message #35257 is a reply to message #35254] Thu, 12 March 2009 11:55 Go to previous messageGo to next message
arulP is currently offline  arulP
Messages: 18
Registered: March 2009
Location: india
Junior Member

192.168.4.0/24 dev venet0 proto kernel scope link src 192.168.4.173
169.254.0.0/16 dev venet0 scope link







why is this wrong??can you please be more clear?
Re: communicating between virtual machines [message #35258 is a reply to message #35257] Thu, 12 March 2009 12:02 Go to previous messageGo to next message
arulP is currently offline  arulP
Messages: 18
Registered: March 2009
Location: india
Junior Member

in order to communicate between two vm i looked at that site and did the same..

http://wiki.openvz.org/VEs_and_HNs_in_different_subnets

can u refer this for me..

So u will get to know what i did
Re: communicating between virtual machines [message #35259 is a reply to message #35257] Thu, 12 March 2009 12:05 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Quote:


can you please be more clear?



Yes, of course.
You don't need to create these records on the HN.
The only command you have issue is: "vzctl set $VEID --ipadd $IP --save". In this case vzctl adds additional route on the HN - something like "192.168.4.171 dev venet0 scope link". Thats all.
http://wiki.openvz.org/Venet
Re: communicating between virtual machines [message #35260 is a reply to message #35259] Thu, 12 March 2009 12:11 Go to previous messageGo to next message
arulP is currently offline  arulP
Messages: 18
Registered: March 2009
Location: india
Junior Member

okay leave it....

Assume i have two virtual machines namely
151 and 152
i just created and added hostname and ip (as you said) and set password for root...

now i am able to login into the virtualmachine using
ssh 192.168.4.151
after supplying password i went inside vm

now i want to go to second virtualmachine(152) from 151
i.e. ssh 192.168.4.152
no route to the host : port 22 connection refused..
This is the output i am getting

i want to ping the other virtual machine from my present virtual machine

is there any way...
Re: communicating between virtual machines [message #35261 is a reply to message #35260] Thu, 12 March 2009 12:18 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Yes, the way exits.

(on the HN - as you said)
# vzctl set 151 --ipadd 192.168.4.151 --save
# vzctl set 152 --ipadd 192.168.4.152 --save

after that check "ip r l" output on the HN. It should contain
"192.168.4.151 dev venet0 scope link" and "192.168.4.152 dev venet0 scope link" records.
Then check "ip r l" inside each VE.
Re: communicating between virtual machines [message #35262 is a reply to message #35261] Thu, 12 March 2009 12:24 Go to previous messageGo to next message
arulP is currently offline  arulP
Messages: 18
Registered: March 2009
Location: india
Junior Member

i got these as output

vzctl enter 152
entered into CT 152
[root@open1 /]# ip
192.0.2.0/24 dev venet0 scope host
169.254.0.0/16 dev venet0 scope link metric 1003
default via 192.0.2.1 dev venet0
[root@open1 /]# logout
exited from CT 152
[root@yahoo4 ~]# vzctl enter 153
entered into CT 153
[root@openvz2 /]# ip r l
192.0.2.0/24 dev venet0 scope host
169.254.0.0/16 dev venet0 scope link metric 1003
default via 192.0.2.1 dev venet0


Then?
Re: communicating between virtual machines [message #35263 is a reply to message #35262] Thu, 12 March 2009 12:37 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Then everything should work.

Show "ip a l" from the HN.

Try to ping one VE from another, at the same time:

inside both VEs and on the HN:

# tcpdump -n -i venet0
Re: communicating between virtual machines [message #35264 is a reply to message #35263] Thu, 12 March 2009 12:43 Go to previous messageGo to next message
arulP is currently offline  arulP
Messages: 18
Registered: March 2009
Location: india
Junior Member

[root@yahoo4 ~]# ip a l
2: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
4: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:23:54:17:a9:e5 brd ff:ff:ff:ff:ff:ff
inet 192.168.4.104/24 brd 192.168.4.255 scope global eth0
inet6 fe80::223:54ff:fe17:a9e5/64 scope link
valid_lft forever preferred_lft forever
6: eth2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:22:b0:52:ac:aa brd ff:ff:ff:ff:ff:ff
inet 192.168.4.179/24 brd 192.168.4.255 scope global eth2
1: sit0: <NOARP> mtu 1480 qdisc noop
link/sit 0.0.0.0 brd 0.0.0.0
8: pan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop
link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
3: tunl0: <NOARP> mtu 1480 qdisc noop
link/ipip 0.0.0.0 brd 0.0.0.0
5: venet0: <BROADCAST,POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue
link/void
7: veth151.0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue
link/ether 00:0c:29:7a:29:04 brd ff:ff:ff:ff:ff:ff
inet6 fe80::20c:29ff:fe7a:2904/64 scope link
valid_lft forever preferred_lft forever
[root@yahoo4 ~]#


This is the output i am getting..
Is everything going right?
Re: communicating between virtual machines [message #35265 is a reply to message #35263] Thu, 12 March 2009 12:46 Go to previous messageGo to next message
arulP is currently offline  arulP
Messages: 18
Registered: March 2009
Location: india
Junior Member

tcpdump -n -i venet0
tcpdump: WARNING: arptype 65535 not supported by libpcap - falling back to cooked socket
tcpdump: WARNING: venet0: no IPv4 address assigned
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on venet0, link-type LINUX_SLL (Linux cooked), capture size 96 bytes


This is the output i'm getting in all three machines namely physical , vm1,vm2
Re: communicating between virtual machines [message #35266 is a reply to message #35264] Thu, 12 March 2009 12:50 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Yes, and also

Quote:


after that check "ip r l" output on the HN. It should contain
"192.168.4.151 dev venet0 scope link" and "192.168.4.152 dev venet0 scope link" records.



"arp -n" (on the HN) should also contain
192.168.4.151 * * MP eth0
192.168.4.152 * * MP eth0
Re: communicating between virtual machines [message #35267 is a reply to message #35265] Thu, 12 March 2009 12:53 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
That's mean that nothing leaves your VE.

Show "ip a l", "ip r l" from VE151 and VE152.
Re: communicating between virtual machines [message #35292 is a reply to message #35267] Mon, 16 March 2009 11:00 Go to previous messageGo to next message
arulP is currently offline  arulP
Messages: 18
Registered: March 2009
Location: india
Junior Member

VE 152
[root@open1 /]# ip a l
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
3: venet0: <BROADCAST,POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
link/void
inet 127.0.0.1/32 scope host venet0
inet 192.168.4.152/32 brd 192.168.4.152 scope global venet0:0
5: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
link/ether 00:23:54:17:a9:e5 brd ff:ff:ff:ff:ff:ff


[root@open1 /]# ip r l
192.0.2.0/24 dev venet0 scope host
169.254.0.0/16 dev venet0 scope link metric 1003
default via 192.0.2.1 dev venet0

VE 153
[root@openvz2 /]# ip a l
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
3: venet0: <BROADCAST,POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
link/void
inet 127.0.0.1/32 scope host venet0
inet 192.168.4.153/32 brd 192.168.4.153 scope global venet0:0


[root@openvz2 /]# ip r l
192.0.2.0/24 dev venet0 scope host
169.254.0.0/16 dev venet0 scope link metric 1003
default via 192.0.2.1 dev venet0



Re: communicating between virtual machines [message #35293 is a reply to message #35292] Mon, 16 March 2009 11:29 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Hello,

taking your last message into consideration looks like the tcpdump output you've shown is wrong. I'm almost sure that you shouldn't have got an empty output.

Please, conduct the following experiment:

- suppose VE152 has ip address 192.168.4.152 and VE153 has ip address 192.168.4.153.
- please, ping VE153 from inside VE152.
-AT THE SAME TIME run "tcpdump -n -i venet0" command inside VE152, VE153 and on the HN.
- show "sysctl -a | grep forward" from the HN.

[Updated on: Mon, 16 March 2009 11:36]

Report message to a moderator

Re: communicating between virtual machines [message #35312 is a reply to message #35293] Tue, 17 March 2009 08:36 Go to previous messageGo to next message
arulP is currently offline  arulP
Messages: 18
Registered: March 2009
Location: india
Junior Member

ok leave it..........

We are in a tight situation to finish this one for our project...
So can u please give instruction starting from creating steps, So that we can check where we went wrong...

Our objective is to create two virtual machines and ping one system from another...


Re: communicating between virtual machines [message #35313 is a reply to message #35312] Tue, 17 March 2009 08:50 Go to previous messageGo to next message
arulP is currently offline  arulP
Messages: 18
Registered: March 2009
Location: india
Junior Member

ping open1
PING open1 (192.168.4.152) 56(84) bytes of data.
From yahoo4 (192.168.4.104) icmp_seq=1 Destination Host Prohibited
From yahoo4 (192.168.4.104): icmp_seq=1 Redirect Host(New nexthop: open1 (192.168.4.152))
From yahoo4 (192.168.4.104) icmp_seq=2 Destination Host Prohibited
From yahoo4 (192.168.4.104): icmp_seq=2 Redirect Host(New nexthop: open1 (192.168.4.152))
From yahoo4 (192.168.4.104) icmp_seq=3 Destination Host Prohibited
From yahoo4 (192.168.4.104): icmp_seq=3 Redirect Host(New nexthop: open1 (192.168.4.152))
From yahoo4 (192.168.4.104) icmp_seq=4 Destination Host Prohibited
From yahoo4 (192.168.4.104): icmp_seq=4 Redirect Host(New nexthop: open1 (192.168.4.152))
From yahoo4 (192.168.4.104) icmp_seq=5 Destination Host Prohibited
From yahoo4 (192.168.4.104): icmp_seq=5 Redirect Host(New nexthop: open1 (192.168.4.152))
From yahoo4 (192.168.4.104) icmp_seq=6 Destination Host Prohibited
From yahoo4 (192.168.4.104): icmp_seq=6 Redirect Host(New nexthop: open1 (192.168.4.152))
From yahoo4 (192.168.4.104) icmp_seq=7 Destination Host Prohibited
From yahoo4 (192.168.4.104) icmp_seq=8 Destination Host Prohibited
From yahoo4 (192.168.4.104): icmp_seq=8 Redirect Host(New nexthop: open1 (192.168.4.152))
From yahoo4 (192.168.4.104) icmp_seq=9 Destination Host Prohibited
From yahoo4 (192.168.4.104) icmp_seq=10 Destination Host Prohibited
From yahoo4 (192.168.4.104) icmp_seq=11 Destination Host Prohibited
From yahoo4 (192.168.4.104): icmp_seq=11 Redirect Host(New nexthop: open1 (192.168.4.152))
From yahoo4 (192.168.4.104) icmp_seq=12 Destination Host Prohibited
From yahoo4 (192.168.4.104) icmp_seq=13 Destination Host Prohibited
From yahoo4 (192.168.4.104) icmp_seq=14 Destination Host Prohibited
From yahoo4 (192.168.4.104) icmp_seq=15 Destination Host Prohibited
From yahoo4 (192.168.4.104) icmp_seq=16 Destination Host Prohibited
From yahoo4 (192.168.4.104) icmp_seq=17 Destination Host Prohibited
From yahoo4 (192.168.4.104): icmp_seq=17 Redirect Host(New nexthop: open1 (192.168.4.152))
From yahoo4 (192.168.4.104) icmp_seq=18 Destination Host Prohibited
From yahoo4 (192.168.4.104) icmp_seq=19 Destination Host Prohibited
From yahoo4 (192.168.4.104) icmp_seq=20 Destination Host Prohibited
From yahoo4 (192.168.4.104) icmp_seq=21 Destination Host Prohibited
From yahoo4 (192.168.4.104) icmp_seq=22 Destination Host Prohibited
From yahoo4 (192.168.4.104) icmp_seq=23 Destination Host Prohibited
From yahoo4 (192.168.4.104) icmp_seq=24 Destination Host Prohibited
From yahoo4 (192.168.4.104) icmp_seq=25 Destination Host Prohibited
From yahoo4 (192.168.4.104) icmp_seq=26 Destination Host Prohibited
From yahoo4 (192.168.4.104) icmp_seq=27 Destination Host Prohibited
From yahoo4 (192.168.4.104) icmp_seq=28 Destination Host Prohibited
From yahoo4 (192.168.4.104) icmp_seq=29 Destination Host Prohibited
From yahoo4 (192.168.4.104) icmp_seq=30 Destination Host Prohibited
From yahoo4 (192.168.4.104) icmp_seq=31 Destination Host Prohibited
From yahoo4 (192.168.4.104) icmp_seq=32 Destination Host Prohibited
From yahoo4 (192.168.4.104) icmp_seq=33 Destination Host Prohibited
Re: communicating between virtual machines [message #35317 is a reply to message #35312] Tue, 17 March 2009 10:16 Go to previous messageGo to next message
arulP is currently offline  arulP
Messages: 18
Registered: March 2009
Location: india
Junior Member

Quote:

i tried it in another machine but the result is same ..donno wat to do.pls help













[root@localhost ~]# sysctl -a|grep forward
net.ipv6.conf.eth0.forwarding = 0
net.ipv6.conf.default.forwarding = 0
net.ipv6.conf.all.forwarding = 0
net.ipv6.conf.lo.forwarding = 0
net.ipv4.conf.eth0.mc_forwarding = 0
net.ipv4.conf.eth0.forwarding = 1
net.ipv4.conf.venet0.mc_forwarding = 0
net.ipv4.conf.venet0.forwarding = 1
net.ipv4.conf.lo.mc_forwarding = 0
net.ipv4.conf.lo.forwarding = 1
net.ipv4.conf.default.mc_forwarding = 0
net.ipv4.conf.default.forwarding = 1
net.ipv4.conf.all.mc_forwarding = 0
net.ipv4.conf.all.forwarding = 1
net.ipv4.ip_forward = 1



[root@localhost ~]# vzctl enter 152
entered into CT 152
[root@openvz2 /]# ping 192.168.1.153
PING 192.168.1.153 (192.168.1.153) 56(84) bytes of data.
From 192.168.1.100 icmp_seq=1 Destination Host Prohibited
From 192.168.1.100: icmp_seq=1 Redirect Host(New nexthop: 192.168.1.153)
From 192.168.1.100 icmp_seq=2 Destination Host Prohibited
From 192.168.1.100: icmp_seq=2 Redirect Host(New nexthop: 192.168.1.153)
From 192.168.1.100 icmp_seq=3 Destination Host Prohibited
From 192.168.1.100: icmp_seq=3 Redirect Host(New nexthop: 192.168.1.153)
From 192.168.1.100 icmp_seq=4 Destination Host Prohibited
From 192.168.1.100: icmp_seq=4 Redirect Host(New nexthop: 192.168.1.153)
From 192.168.1.100 icmp_seq=5 Destination Host Prohibited
From 192.168.1.100: icmp_seq=5 Redirect Host(New nexthop: 192.168.1.153)
From 192.168.1.100 icmp_seq=6 Destination Host Prohibited
From 192.168.1.100: icmp_seq=6 Redirect Host(New nexthop: 192.168.1.153)
From 192.168.1.100 icmp_seq=7 Destination Host Prohibited
From 192.168.1.100 icmp_seq=8 Destination Host Prohibited
From 192.168.1.100: icmp_seq=8 Redirect Host(New nexthop: 192.168.1.153)
From 192.168.1.100 icmp_seq=9 Destination Host Prohibited
From 192.168.1.100: icmp_seq=9 Redirect Host(New nexthop: 192.168.1.153)
From 192.168.1.100 icmp_seq=10 Destination Host Prohibited
From 192.168.1.100: icmp_seq=10 Redirect Host(New nexthop: 192.168.1.153)
From 192.168.1.100 icmp_seq=11 Destination Host Prohibited
From 192.168.1.100: icmp_seq=11 Redirect Host(New nexthop: 192.168.1.153)
From 192.168.1.100 icmp_seq=12 Destination Host Prohibited
From 192.168.1.100: icmp_seq=12 Redirect Host(New nexthop: 192.168.1.153)
From 192.168.1.100 icmp_seq=13 Destination Host Prohibited
From 192.168.1.100: icmp_seq=13 Redirect Host(New nexthop: 192.168.1.153)
From 192.168.1.100 icmp_seq=14 Destination Host Prohibited
From 192.168.1.100 icmp_seq=15 Destination Host Prohibited
From 192.168.1.100: icmp_seq=15 Redirect Host(New nexthop: 192.168.1.153)
From 192.168.1.100 icmp_seq=16 Destination Host Prohibited
From 192.168.1.100 icmp_seq=17 Destination Host Prohibited
From 192.168.1.100 icmp_seq=18 Destination Host Prohibited
From 192.168.1.100: icmp_seq=18 Redirect Host(New nexthop: 192.168.1.153)
From 192.168.1.100 icmp_seq=19 Destination Host Prohibited
From 192.168.1.100 icmp_seq=20 Destination Host Prohibited
From 192.168.1.100 icmp_seq=21 Destination Host Prohibited
From 192.168.1.100 icmp_seq=22 Destination Host Prohibited
From 192.168.1.100 icmp_seq=23 Destination Host Prohibited
From 192.168.1.100 icmp_seq=24 Destination Host Prohibited
From 192.168.1.100: icmp_seq=24 Redirect Host(New nexthop: 192.168.1.153)
From 192.168.1.100 icmp_seq=25 Destination Host Prohibited
From 192.168.1.100 icmp_seq=26 Destination Host Prohibited
From 192.168.1.100 icmp_seq=27 Destination Host Prohibited
From 192.168.1.100 icmp_seq=28 Destination Host Prohibited
From 192.168.1.100 icmp_seq=29 Destination Host Prohibited
From 192.168.1.100 icmp_seq=30 Destination Host Prohibited
From 192.168.1.100 icmp_seq=31 Destination Host Prohibited
Re: communicating between virtual machines [message #35332 is a reply to message #35317] Wed, 18 March 2009 09:20 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
This output makes me suppose that there exists firewall somewhere which is blocking up your packet.
Re: communicating between virtual machines [message #35348 is a reply to message #35332] Wed, 18 March 2009 13:56 Go to previous messageGo to next message
arulP is currently offline  arulP
Messages: 18
Registered: March 2009
Location: india
Junior Member

yup...atlast problem solved ..i flushed all the iptable entries in HN..now its pinging..ssh works too..thanks for your support maratrus
Re: communicating between virtual machines [message #35349 is a reply to message #35348] Wed, 18 March 2009 13:58 Go to previous messageGo to next message
arulP is currently offline  arulP
Messages: 18
Registered: March 2009
Location: india
Junior Member

[root@localhost ~]# vzctl enter 152
entered into CT 152
[root@openvz2 /]# ping 192.168.1.153
PING 192.168.1.153 (192.168.1.153) 56(84) bytes of data.
From 192.168.1.102: icmp_seq=1 Redirect Host(New nexthop: 192.168.1.153)
64 bytes from 192.168.1.153: icmp_seq=1 ttl=64 time=0.089 ms
From 192.168.1.102: icmp_seq=2 Redirect Host(New nexthop: 192.168.1.153)
64 bytes from 192.168.1.153: icmp_seq=2 ttl=64 time=0.094 ms
From 192.168.1.102: icmp_seq=3 Redirect Host(New nexthop: 192.168.1.153)
64 bytes from 192.168.1.153: icmp_seq=3 ttl=64 time=0.090 ms
From 192.168.1.102: icmp_seq=4 Redirect Host(New nexthop: 192.168.1.153)
64 bytes from 192.168.1.153: icmp_seq=4 ttl=64 time=0.088 ms
From 192.168.1.102: icmp_seq=5 Redirect Host(New nexthop: 192.168.1.153)
64 bytes from 192.168.1.153: icmp_seq=5 ttl=64 time=0.089 ms
From 192.168.1.102: icmp_seq=6 Redirect Host(New nexthop: 192.168.1.153)
64 bytes from 192.168.1.153: icmp_seq=6 ttl=64 time=0.086 ms
64 bytes from 192.168.1.153: icmp_seq=7 ttl=64 time=0.063 ms

--- 192.168.1.153 ping statistics ---
7 packets transmitted, 7 received, 0% packet loss, time 6066ms
rtt min/avg/max/mdev = 0.063/0.085/0.094/0.013 ms
Re: communicating between virtual machines [message #35351 is a reply to message #35349] Wed, 18 March 2009 17:25 Go to previous message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
check iptables rules on 192.168.1.102.
Previous Topic: set alternative router for VE through dhcp
Next Topic: Kernel Panic with Server Dual Quad Xeon E54xx
Goto Forum:
  


Current Time: Tue Nov 19 05:29:24 GMT 2024

Total time taken to generate the page: 0.03098 seconds