OpenVZ Forum


Home » General » Support » internet not reachable from ve
internet not reachable from ve [message #34673] Sun, 25 January 2009 19:08 Go to next message
pastk is currently offline  pastk
Messages: 2
Registered: January 2009
Junior Member
Hello!

Just did a fresh install of Debian 5.0 Lenny on my server, installed openvz kernel from debian repos, installed openvz tools from http://download.openvz.org/debian-systs etch (as in http://wiki.openvz.org/Installation_on_Debian).

Installed vzctl-ostmpl-debian-5.0-i386-minimal package from the same repo (version 20090121). Created one VE, assigned it ip 192.168.2.11. HN ip: 192.168.2.3.

The problem: pings go fine from VE to 192.168.2.3 and back. But other ips (i.e. 192.168.2.1 - my home router) are not reachable from within VE.

tcpdumps:

On VE:
root@localhost:/# ping -c 1 192.168.2.1
PING 192.168.2.1 (192.168.2.1) 56(84) bytes of data.

--- 192.168.2.1 ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms


root@localhost:/# tcpdump -i venet0 -e host 192.168.2.11
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
19:01:06.951193 Out ethertype IPv4 (0x0800), length 100: 192.168.2.11 > 192.168.2.1: ICMP echo request, id 49409, seq 1, length 64
1 packets captured
1 packets received by filter
0 packets dropped by kernel


On HN:
kilgore:~# tcpdump -i venet0 -e host 192.168.2.11
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
22:03:27.833646  In ethertype IPv4 (0x0800), length 100: 192.168.2.11 > 192.168.2.1: ICMP echo request, id 49921, seq 1, length 64
^C
1 packets captured
1 packets received by filter
0 packets dropped by kernel


kilgore:~# tcpdump -i eth0 -e host 192.168.2.11
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
22:04:53.752058 00:40:f4:88:0f:cd (oui Unknown) > 00:14:bf:87:69:e5 (oui Unknown), ethertype IPv4 (0x0800), length 98: 192.168.2.11 > 192.168.2.1: ICMP echo request, id 50177, seq 1, length 64
22:04:53.753679 00:14:bf:87:69:e5 (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: arp who-has 192.168.2.11 tell 192.168.2.1
^C
2 packets captured
2 packets received by filter
0 packets dropped by kernel


Any help appreciated Smile

HN configuration:
kilgore:~# uname -a
Linux kilgore 2.6.26-1-openvz-686 #1 SMP Sat Jan 10 20:42:05 UTC 2009 i686 GNU/Linux

kilgore:~# vzctl --version
vzctl version 3.0.23-1dso1~etch0

kilgore:~# ip rule list
0:	from all lookup local 
32766:	from all lookup main 
32767:	from all lookup default 

kilgore:~# ip route list table all      
192.168.2.11 dev venet0  scope link 
192.168.2.0/24 dev eth0  proto kernel  scope link  src 192.168.2.3 
default via 192.168.2.1 dev eth0 
broadcast 192.168.2.255 dev eth0  table local  proto kernel  scope link  src 192.168.2.3 
broadcast 127.255.255.255 dev lo  table local  proto kernel  scope link  src 127.0.0.1 
broadcast 192.168.2.0 dev eth0  table local  proto kernel  scope link  src 192.168.2.3 
local 192.168.2.3 dev eth0  table local  proto kernel  scope host  src 192.168.2.3 
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 
fe80::/64 dev eth0  metric 256  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::240:f4ff:fe88:fcd via :: dev lo  table local  proto none  metric 0  mtu 16436 advmss 16376 hoplimit 4294967295
ff00::/8 dev eth0  table local  metric 256  mtu 1500 advmss 1440 hoplimit 4294967295
unreachable default dev lo  table unspec  proto none  metric -1  error -101 hoplimit 255


No entries in iptables.

kilgore:~# ifconfig 
eth0      Link encap:Ethernet  HWaddr 00:40:f4:88:0f:cd  
          inet addr:192.168.2.3  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::240:f4ff:fe88:fcd/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:85909 errors:0 dropped:0 overruns:0 frame:0
          TX packets:70799 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:87228294 (83.1 MiB)  TX bytes:7483457 (7.1 MiB)
          Interrupt:9 Base address:0xe800 

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:10 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:2641 (2.5 KiB)  TX bytes:2641 (2.5 KiB)

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:35 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:2750 (2.6 KiB)  TX bytes:756 (756.0 B)


kilgore:~# sysctl -p
net.ipv4.conf.default.forwarding = 1
net.ipv4.conf.default.proxy_arp = 0
net.ipv4.conf.all.rp_filter = 1
kernel.sysrq = 1
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 0


Now VE's config:
root@localhost:/# ip rule list
0:	from all lookup local 
32766:	from all lookup main 
32767:	from all lookup default 


root@localhost:/# ip route list table all
192.0.2.1 dev venet0  scope link 
default via 192.0.2.1 dev venet0 
broadcast 127.255.255.255 dev lo  table local  proto kernel  scope link  src 127.0.0.1 
local 192.168.2.11 dev venet0  table local  proto kernel  scope host  src 192.168.2.11 
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 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
unreachable default dev lo  table unspec  proto none  metric -1  error -101 hoplimit 255


root@localhost:/# ifconfig 
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:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:168 (168.0 B)  TX bytes:168 (168.0 B)

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:4 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:336 (336.0 B)  TX bytes:1910 (1.8 KiB)

venet0:0  Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:192.168.2.11  P-t-P:192.168.2.11  Bcast:0.0.0.0  Mask:255.255.255.255
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1

Re: internet not reachable from ve [message #34675 is a reply to message #34673] Sun, 25 January 2009 21:28 Go to previous messageGo to next message
swindmill is currently offline  swindmill
Messages: 57
Registered: April 2007
Member
Try setting net.ipv4.ip_forward=1 in your /etc/sysctl.conf
Re: internet not reachable from ve [message #34676 is a reply to message #34675] Sun, 25 January 2009 21:54 Go to previous message
pastk is currently offline  pastk
Messages: 2
Registered: January 2009
Junior Member
Thanks a lot! I indeed overlooked it Smile
Previous Topic: vzdump --xdelta
Next Topic: Trouble in start using open vz
Goto Forum:
  


Current Time: Tue Nov 05 20:10:45 GMT 2024

Total time taken to generate the page: 0.03661 seconds