OpenVZ Forum


Home » General » Support » *SOLVED* broken networking...
*SOLVED* broken networking... [message #9690] Wed, 17 January 2007 09:25 Go to next message
wilf is currently offline  wilf
Messages: 30
Registered: January 2007
Location: UK
Member
Hi,

I pinched Kai's format for this message as it seemed so clear and well presented Smile

I am running
Quote:

VZHost~# uname -a
Linux vzhost.b.c.uk 2.6.18-028test010 #2 Sun Jan 14 10:13:12 GMT 2007 x86_64 AMD Athlon(tm) 64 Processor 3200+ AuthenticAMD GNU/Linux
VZHost~# vzctl --version
vzctl version 3.0.13

under Gentoo 2006.1 for amd64.

Installation went fine, can vzctl enter from the VZHost to the VPS.
Network is up and running on the VZHost, and can ping internal and external addresses successfully.
I can ping from the VZHost to the outside world
I can ping from the outside world to the VZHost
I can't ping from the VZHost to the VPS
I can't ping from the VPS to the VZHost (or anywhere else for that matter)

Here is some info:
ifconfig -a
VZHost
VZHost:~# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:61:71:24:FB:AA
         inet addr:x.y.z.31  Bcast:x.y.z.255  Mask:255.255.255.0
         inet6 addr: fe80::216:17ff:fe42:6948/64 Scope:Link
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         RX packets:1005904 errors:0 dropped:0 overruns:0 frame:0
         TX packets:1079156 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:1000
         RX bytes:294041256 (280.4 Mb)  TX bytes:789113682 (752.5 Mb)
         Interrupt:16 Base address:0x4000

eth1      Link encap:Ethernet  HWaddr 00:61:71:24:FB:AB
         inet addr:a.b.c.134  Bcast:a.b.c.135  Mask:255.255.255.252
         inet6 addr: fe80::216:17ff:fe42:6f08/64 Scope:Link
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         RX packets:1047700 errors:0 dropped:0 overruns:0 frame:0
         TX packets:966836 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:1000
         RX bytes:789674957 (753.0 Mb)  TX bytes:286766768 (273.4 Mb)
         Interrupt:17 Base address:0x6000

lo        Link encap:Local Loopback
         inet addr:127.0.0.1  Mask:255.0.0.0
         inet6 addr: ::1/128 Scope:Host
         UP LOOPBACK RUNNING  MTU:16436  Metric:1
         RX packets:25765 errors:0 dropped:0 overruns:0 frame:0
         TX packets:25765 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:0
         RX bytes:2885680 (2.7 Mb)  TX bytes:2885680 (2.7 Mb)

venet0    Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1
          RX packets:12 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1008 (1008.0 b)  TX bytes:0 (0.0 b)


VPS:
VZHost:~# vzctl exec 101  ifconfig -a
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

venet0    Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet addr:x.y.z.80  P-t-P:x.y.z.80  Bcast:0.0.0.0  Mask:255.255.255.255
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)


route -n
VZHost:
VZHost:~# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
x.y.z.80        0.0.0.0         255.255.255.255 UH    0      0        0 venet0
a.b.c.132       0.0.0.0         255.255.255.252 U     0      0        0 eth1
x.y.z.0         x.y.z.46        255.255.255.0   UG    0      0        0 eth0
x.y.z.0         0.0.0.0         255.255.255.0   U     0      0        0 eth0
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
0.0.0.0         a.b.c.133       0.0.0.0         UG    0      0        0 eth1

VPS:
VZHost:~# vzctl exec 101  route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
191.255.255.0   0.0.0.0         255.255.255.0   U     0      0        0 venet0
127.0.0.0       127.0.0.1       255.0.0.0       UG    0      0        0 lo
0.0.0.0         191.255.255.1   0.0.0.0         UG    0      0        0 venet0


These are the VPSs on my VZHost:
VZHost:~# vzlist -a
     VPSID      NPROC STATUS  IP_ADDR         HOSTNAME
      101          1 running                 -


I created a sh script to show what is happening and what is not happening:-
echo ------ VPS
vzctl exec 101 ifconfig -a
echo ------ VZHost
ifconfig -a
ping -c 5 x.y.z.80
echo ------ VPS
vzctl exec 101 ifconfig -a
echo ------ VZHost
ifconfig -a
echo ------ VPS
vzctl exec 101 ping -c 5 x.y.z.31
echo ------ VPS
vzctl exec 101 ifconfig -a
echo ------ VZHost
ifconfig -a

I ran the script as follows:-

2>&1 ~/netvpsstat | tee ~/netvps.txt

I have pruned the lo and eth interfaces from the following results in ~/netvps.txt for clarity (and hopefully I haven't removed the most important info Smile).
Quote:

------ VPS
venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:x.y.z.80 P-t-P:x.y.z.80 Bcast:0.0.0.0 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:25 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:2100 (2.0 Kb)

------ VZHost
venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:37 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3108 (3.0 Kb) TX bytes:0 (0.0 b)

PING x.y.z.80 (x.y.z.80) 56(84) bytes of data.
From x.y.z.31 icmp_seq=1 Destination Host Unreachable
From x.y.z.31 icmp_seq=1 Destination Host Unreachable
From x.y.z.31 icmp_seq=1 Destination Host Unreachable
From x.y.z.31 icmp_seq=1 Destination Host Unreachable
From x.y.z.31 icmp_seq=1 Destination Host Unreachable

--- x.y.z.80 ping statistics ---
0 packets transmitted, 0 received, +5 errors

------ VPS
venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:x.y.z.80 P-t-P:x.y.z.80 Bcast:0.0.0.0 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:25 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:2100 (2.0 Kb)

------ VZHost
venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:37 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3108 (3.0 Kb) TX bytes:0 (0.0 b)

------ VPS
PING x.y.z.31 (x.y.z.31) 56(84) bytes of data.

--- x.y.z.31 ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 3999ms

------ VPS
venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:x.y.z.80 P-t-P:x.y.z.80 Bcast:0.0.0.0 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:30 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:2520 (2.4 Kb)

------ VZHost
venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:42 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3528 (3.4 Kb) TX bytes:0 (0.0 b)

From this, I can see that

o the VZHost is not sending packets to the VPS
o the VPS is successfully sending packets to the VZHost - which is not responding.

Any help is appreciated,

Paul
...

[Updated on: Sat, 20 January 2007 20:57]

Report message to a moderator

Re: broken networking... [message #9691 is a reply to message #9690] Wed, 17 January 2007 11:48 Go to previous messageGo to next message
rickb is currently offline  rickb
Messages: 368
Registered: October 2006
Senior Member
simple, but its solved networking problems countless times on the forum. Is ip forwarding enabled?

cat /proc/net/ipv4/ip_forward


-------------
Common Terms I post with: http://wiki.openvz.org/Category:Definitions

UBC. Learn it, love it, live it: http://wiki.openvz.org/Proc/user_beancounters
Re: broken networking... [message #9692 is a reply to message #9691] Wed, 17 January 2007 12:27 Go to previous messageGo to next message
wilf is currently offline  wilf
Messages: 30
Registered: January 2007
Location: UK
Member
Hi RickB,

Sorry if this has been solved before.

VZHost~# cat /proc/net/ipv4/ip_forward
cat: /proc/net/ipv4/ip_forward: No such file or directory
Doesn't find ip forwarding, but...
VZHost~# cat /proc/sys/net/ipv4/ip_forward
1
does.

Looks like ip forwarding is enabled. I am running a firewall - which might be 'interfering'. I'll look into this (perhaps I am missing a rule) before I bother you again.

Thanks for taking the trouble to reply.

Best Regards, Paul.
Re: broken networking... [message #9696 is a reply to message #9692] Wed, 17 January 2007 15:26 Go to previous messageGo to next message
rickb is currently offline  rickb
Messages: 368
Registered: October 2006
Senior Member
Hi, yes I typed the path a bit too quick. First disable any firewalls on the HN for testing purposes. If still no joy, run tcpdump monitoring the venet and eth devices from the HN. Really the HN should always receive the packet from the VE unless the VE is running an outbound filtering firewall.

-------------
Common Terms I post with: http://wiki.openvz.org/Category:Definitions

UBC. Learn it, love it, live it: http://wiki.openvz.org/Proc/user_beancounters
Re: broken networking... [message #9717 is a reply to message #9690] Thu, 18 January 2007 14:34 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

as RickB mentioned, most likely it is due to firewall settings.
traffic to VPS goes through iptables FORWARD chain, not INPUT one. So since most firewalls disable FORWARDING networkging in VPS doesn't work with them.

use `iptables -L` to see your firewall settings.


http://static.openvz.org/userbars/openvz-developer.png
Re: broken networking... [message #9768 is a reply to message #9717] Sat, 20 January 2007 20:56 Go to previous message
wilf is currently offline  wilf
Messages: 30
Registered: January 2007
Location: UK
Member
Hi Rick and Kirill,

Thanks for all the help.

It was all my fault Smile Firewall was not configured up enough.

Done now, all is well.

Best Regards, Paul.

[Updated on: Sat, 20 January 2007 21:00]

Report message to a moderator

Previous Topic: Unable to open pty: Mo such file or directory
Next Topic: Routing problem
Goto Forum:
  


Current Time: Tue Feb 27 12:56:46 GMT 2024

Total time taken to generate the page: 0.02636 seconds