Example of working config using vzctl 3.0.28.3 (all commands from within container): # 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:27274 errors:0 dropped:0 overruns:0 frame:0 TX packets:27274 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:34455732 (32.8 MiB) TX bytes:34455732 (32.8 MiB) tunl0 Link encap:IPIP Tunnel HWaddr inet addr:69.12.208.32 Mask:255.255.255.255 UP RUNNING NOARP MTU:1480 Metric:1 RX packets:39811 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:4729009 (4.5 MiB) 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:127.0.0.1 P-t-P:127.0.0.1 Bcast:0.0.0.0 Mask:255.255.255.255 UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1 RX packets:791171 errors:0 dropped:0 overruns:0 frame:0 TX packets:815451 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:110516361 (105.3 MiB) TX bytes:808681637 (771.2 MiB) venet0:0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet addr:64.142.122.2 P-t-P:64.142.122.2 Bcast:64.142.122.2 Mask:255.255.255.255 UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1 venet0:1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet addr:69.12.208.32 P-t-P:69.12.208.32 Bcast:69.12.208.32 Mask:255.255.255.255 UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1 # netstat -rn Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 tunl0 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 venet0 0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 venet0 Ping and traceroute to googles public dns server # ping 8.8.4.4 PING 8.8.4.4 (8.8.4.4) 56(84) bytes of data. 64 bytes from 8.8.4.4: icmp_seq=1 ttl=55 time=8.16 ms 64 bytes from 8.8.4.4: icmp_seq=2 ttl=55 time=7.92 ms --- 8.8.4.4 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1077ms rtt min/avg/max/mdev = 7.922/8.043/8.164/0.121 ms # traceroute -n 8.8.4.4 traceroute to 8.8.4.4 (8.8.4.4), 30 hops max, 60 byte packets 1 64.142.122.1 0.033 ms 0.014 ms 0.015 ms 2 69.12.211.57 0.651 ms 0.979 ms 1.188 ms 3 208.201.224.36 0.495 ms 0.493 ms 0.693 ms 4 209.204.191.37 0.470 ms 0.695 ms 208.201.224.37 0.771 ms 5 64.142.0.206 6.025 ms 6.020 ms 6.220 ms 6 206.223.116.21 6.861 ms 6.775 ms 6.734 ms 7 216.239.49.170 7.458 ms 7.432 ms 216.239.49.168 7.403 ms 8 209.85.249.2 8.344 ms 7.922 ms 209.85.249.4 8.243 ms 9 64.233.175.223 8.490 ms 8.314 ms 8.494 ms 10 8.8.4.4 8.016 ms 8.161 ms 7.870 ms tcpdump ran in another window while pinging 69.12.208.96 # tcpdump -lni venet0 host 69.12.208.96 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on venet0, link-type LINUX_SLL (Linux cooked), capture size 65535 bytes 10:28:05.754769 IP 64.142.122.2 > 69.12.208.96: ICMP echo request, id 42554, seq 1, length 64 10:28:05.755316 IP 69.12.208.96 > 64.142.122.2: ICMP echo reply, id 42554, seq 1, length 64 10:28:06.755361 IP 64.142.122.2 > 69.12.208.96: ICMP echo request, id 42554, seq 2, length 64 10:28:06.755661 IP 69.12.208.96 > 64.142.122.2: ICMP echo reply, id 42554, seq 2, length 64 10:28:07.755370 IP 64.142.122.2 > 69.12.208.96: ICMP echo request, id 42554, seq 3, length 64 10:28:07.755870 IP 69.12.208.96 > 64.142.122.2: ICMP echo reply, id 42554, seq 3, length 64 10:28:08.755396 IP 64.142.122.2 > 69.12.208.96: ICMP echo request, id 42554, seq 4, length 64 10:28:08.755793 IP 69.12.208.96 > 64.142.122.2: ICMP echo reply, id 42554, seq 4, length 64 Example of non working config using vzctl 3.0.29.1-1 (all commands from within container): # 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: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) tunl0 Link encap:IPIP Tunnel HWaddr inet addr:69.12.208.32 Mask:255.255.255.255 UP RUNNING NOARP MTU:1480 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:127.0.0.1 P-t-P:127.0.0.1 Bcast:0.0.0.0 Mask:255.255.255.255 UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1 RX packets:123 errors:0 dropped:0 overruns:0 frame:0 TX packets:109 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:8800 (8.5 KiB) TX bytes:106658 (104.1 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:64.142.122.2 P-t-P:64.142.122.2 Bcast:64.142.122.255 Mask:255.255.255.0 UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1 venet0:1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet addr:69.12.208.32 P-t-P:69.12.208.32 Bcast:69.12.208.255 Mask:255.255.255.0 UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1 # netstat -rn Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 69.12.208.0 0.0.0.0 255.255.255.0 U 0 0 0 venet0 64.142.122.0 0.0.0.0 255.255.255.0 U 0 0 0 venet0 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 tunl0 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 venet0 0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 venet0 # ping 8.8.4.4 PING 8.8.4.4 (8.8.4.4) 56(84) bytes of data. 64 bytes from 8.8.4.4: icmp_seq=1 ttl=55 time=8.10 ms 64 bytes from 8.8.4.4: icmp_seq=2 ttl=55 time=8.06 ms 64 bytes from 8.8.4.4: icmp_seq=3 ttl=55 time=8.20 ms 64 bytes from 8.8.4.4: icmp_seq=4 ttl=55 time=8.39 ms # traceroute -n 8.8.4.4 traceroute to 8.8.4.4 (8.8.4.4), 30 hops max, 60 byte packets 1 64.142.122.1 0.044 ms 0.014 ms 0.013 ms 2 69.12.211.57 0.713 ms 0.951 ms 1.199 ms 3 208.201.224.36 0.523 ms 0.517 ms 0.662 ms 4 64.142.117.37 0.523 ms 0.517 ms 208.201.224.37 0.586 ms 5 64.142.0.206 6.054 ms 6.050 ms 6.033 ms 6 206.223.116.21 38.332 ms 38.492 ms 38.478 ms 7 216.239.49.170 7.564 ms 216.239.49.168 7.724 ms 216.239.49.170 7.485 ms 8 209.85.249.2 22.457 ms 7.769 ms 22.393 ms 9 64.233.175.223 8.289 ms 8.271 ms 8.496 ms 10 8.8.4.4 8.032 ms 7.927 ms 7.893 ms tcpdump ran in another window while pinging 69.12.208.96 Notice traffic is now being sourced by 69.12.208.32 instead of 64.142.122.2 # tcpdump -lni venet0 host 69.12.208.96 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on venet0, link-type LINUX_SLL (Linux cooked), capture size 65535 bytes 11:05:36.182420 IP 69.12.208.32 > 69.12.208.96: ICMP echo request, id 53509, seq 11, length 64 11:05:37.182413 IP 69.12.208.32 > 69.12.208.96: ICMP echo request, id 53509, seq 12, length 64 11:05:38.182350 IP 69.12.208.32 > 69.12.208.96: ICMP echo request, id 53509, seq 13, length 64 11:05:39.182408 IP 69.12.208.32 > 69.12.208.96: ICMP echo request, id 53509, seq 14, length 64 11:05:40.182465 IP 69.12.208.32 > 69.12.208.96: ICMP echo request, id 53509, seq 15, length 64 11:05:41.182471 IP 69.12.208.32 > 69.12.208.96: ICMP echo request, id 53509, seq 16, length 64 11:05:42.182430 IP 69.12.208.32 > 69.12.208.96: ICMP echo request, id 53509, seq 17, length 64 11:05:43.182371 IP 69.12.208.32 > 69.12.208.96: ICMP echo request, id 53509, seq 18, length 64 11:05:44.182409 IP 69.12.208.32 > 69.12.208.96: ICMP echo request, id 53509, seq 19, length 64 Example of non working config setting netmask to /32 for both ips using vzctl 3.0.29.1-1 With this config networking appears to be broken. (all commands except first grep ran from within container): # grep IP_ADDRESS /etc/vz/conf/1.conf IP_ADDRESS="64.142.122.2/32 69.12.208.32/32" # 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: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) tunl0 Link encap:IPIP Tunnel HWaddr inet addr:69.12.208.32 Mask:255.255.255.255 UP RUNNING NOARP MTU:1480 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:127.0.0.1 P-t-P:127.0.0.1 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:84 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) venet0:0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet addr:64.142.122.2 P-t-P:64.142.122.2 Bcast:64.142.122.2 Mask:255.255.255.255 UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1 venet0:1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet addr:69.12.208.32 P-t-P:69.12.208.32 Bcast:69.12.208.32 Mask:255.255.255.255 UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1 # netstat -rn Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 tunl0 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 venet0 0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 venet0 # ping 8.8.4.4 PING 8.8.4.4 (8.8.4.4) 56(84) bytes of data. ^C --- 8.8.4.4 ping statistics --- 4 packets transmitted, 0 received, 100% packet loss, time 3966ms # traceroute -n 8.8.4.4 traceroute to 8.8.4.4 (8.8.4.4), 30 hops max, 60 byte packets 1 * * * 2 * * * 3 * * * 4 * * * 5 * * * 6 *^C # tcpdump -lni venet0 host 69.12.208.96 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on venet0, link-type LINUX_SLL (Linux cooked), capture size 65535 bytes 11:25:57.872799 IP 64.142.122.2 > 69.12.208.96: ICMP echo request, id 1283, seq 1, length 64 11:25:58.872354 IP 64.142.122.2 > 69.12.208.96: ICMP echo request, id 1283, seq 2, length 64 11:25:59.872381 IP 64.142.122.2 > 69.12.208.96: ICMP echo request, id 1283, seq 3, length 64 11:26:00.872389 IP 64.142.122.2 > 69.12.208.96: ICMP echo request, id 1283, seq 4, length 64 11:26:01.872427 IP 64.142.122.2 > 69.12.208.96: ICMP echo request, id 1283, seq 5, length 64 11:26:02.872461 IP 64.142.122.2 > 69.12.208.96: ICMP echo request, id 1283, seq 6, length 64 11:26:03.872350 IP 64.142.122.2 > 69.12.208.96: ICMP echo request, id 1283, seq 7, length 64 11:26:04.872479 IP 64.142.122.2 > 69.12.208.96: ICMP echo request, id 1283, seq 8, length 64 11:26:05.872388 IP 64.142.122.2 > 69.12.208.96: ICMP echo request, id 1283, seq 9, length 64 11:26:06.872476 IP 64.142.122.2 > 69.12.208.96: ICMP echo request, id 1283, seq 10, length 64 Example of working config setting netmask to /32 for second ip using vzctl 3.0.29.1-1 (all commands except first grep ran from within container): # grep IP_ADDRESS /etc/vz/conf/1.conf IP_ADDRESS="64.142.122.2 69.12.208.32/32" # 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: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) tunl0 Link encap:IPIP Tunnel HWaddr inet addr:69.12.208.32 Mask:255.255.255.255 UP RUNNING NOARP MTU:1480 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:127.0.0.1 P-t-P:127.0.0.1 Bcast:0.0.0.0 Mask:255.255.255.255 UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1 RX packets:482 errors:0 dropped:0 overruns:0 frame:0 TX packets:414 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:33495 (32.7 KiB) TX bytes:441966 (431.6 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:64.142.122.2 P-t-P:64.142.122.2 Bcast:64.142.122.255 Mask:255.255.255.0 UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1 venet0:1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet addr:69.12.208.32 P-t-P:69.12.208.32 Bcast:69.12.208.32 Mask:255.255.255.255 UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1 # netstat -rn Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 64.142.122.0 0.0.0.0 255.255.255.0 U 0 0 0 venet0 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 tunl0 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 venet0 0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 venet0 # ping 8.8.4.4 PING 8.8.4.4 (8.8.4.4) 56(84) bytes of data. 64 bytes from 8.8.4.4: icmp_seq=1 ttl=55 time=7.85 ms 64 bytes from 8.8.4.4: icmp_seq=2 ttl=55 time=8.21 ms 64 bytes from 8.8.4.4: icmp_seq=3 ttl=55 time=7.64 ms 64 bytes from 8.8.4.4: icmp_seq=4 ttl=55 time=7.85 ms ^C --- 8.8.4.4 ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3117ms rtt min/avg/max/mdev = 7.645/7.890/8.214/0.214 ms # traceroute -n 8.8.4.4 traceroute to 8.8.4.4 (8.8.4.4), 30 hops max, 60 byte packets 1 64.142.122.1 0.042 ms 0.014 ms 0.011 ms 2 69.12.211.57 0.673 ms 0.947 ms 1.187 ms 3 208.201.224.36 0.593 ms 0.590 ms 0.761 ms 4 208.201.224.37 0.486 ms 0.659 ms 64.142.117.37 0.605 ms 5 64.142.0.206 5.981 ms 5.977 ms 6.179 ms 6 206.223.116.21 7.108 ms 7.723 ms 6.687 ms 7 216.239.49.168 8.172 ms 216.239.49.170 8.119 ms 216.239.49.168 7.543 ms 8 209.85.249.2 11.587 ms 209.85.249.4 8.680 ms 209.85.249.2 11.542 ms 9 64.233.175.223 8.823 ms 8.615 ms 8.638 ms 10 8.8.4.4 8.111 ms 8.428 ms 7.632 ms # tcpdump -lni venet0 host 69.12.208.96 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on venet0, link-type LINUX_SLL (Linux cooked), capture size 65535 bytes 11:36:50.860572 IP 64.142.122.2 > 69.12.208.96: ICMP echo request, id 37125, seq 1, length 64 11:36:50.861117 IP 69.12.208.96 > 64.142.122.2: ICMP echo reply, id 37125, seq 1, length 64 11:36:51.860409 IP 64.142.122.2 > 69.12.208.96: ICMP echo request, id 37125, seq 2, length 64 11:36:51.860738 IP 69.12.208.96 > 64.142.122.2: ICMP echo reply, id 37125, seq 2, length 64 11:36:52.860475 IP 64.142.122.2 > 69.12.208.96: ICMP echo request, id 37125, seq 3, length 64 11:36:52.860901 IP 69.12.208.96 > 64.142.122.2: ICMP echo reply, id 37125, seq 3, length 64 11:36:53.860345 IP 64.142.122.2 > 69.12.208.96: ICMP echo request, id 37125, seq 4, length 64 11:36:53.860794 IP 69.12.208.96 > 64.142.122.2: ICMP echo reply, id 37125, seq 4, length 64