Network not availible. [message #21011] |
Sun, 30 September 2007 09:52  |
Drew2k
Messages: 12 Registered: September 2007
|
Junior Member |
|
|
Hi, i have installed OpenVZ on Fedora core 7 and all is working other than network access to VPS that are created. Here is what i have done so far :-
# vzctl create 101 --ipadd 72.55.180.209 --ostemplate fedora-core-7-i386-default
Creating VE private area (fedora-core-7-i386-default)
Performing postcreate actions
VE private area was created
# vzctl start 101
Starting VE ...
VE is mounted
Adding IP address(es): 72.55.180.209
Setting CPU units: 1000
Configure meminfo: 49152
VE start in progress...
# vzctl enter 101
entered into VE 101
# ping google.com
ping: unknown host google.com
also, when i try and ping the ip of the host machine, it just says
# ping 72.55.179.7
PING 72.55.179.7(72.55.179.7) 56(84) bytes of data.
and does nothing.
finally, when i try to reload the network
# vzctl exec 101 /etc/init.d/network restart
Shutting down interface venet0: [ OK ]
Shutting down loopback interface: [ OK ]
SIOCGIFFLAGS: No such device
Bringing up loopback interface: [ OK ]
Bringing up interface venet0: SIOCADDRT: Network is unreachable
[ OK ]
Here is a ifconfig of VPS
# 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)
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:10 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:840 (840.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:72.55.180.209 P-t-P:72.55.180.209 Bcast:72.55.180.209 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.0.2.0 * 255.255.255.0 U 0 0 0 venet0
169.254.0.0 * 255.255.0.0 U 0 0 0 venet0
default 192.0.2.1 0.0.0.0 UG 0 0 0 venet0
and the same for the host machine
# ifconfig
eth0 Link encap:Ethernet HWaddr 00:1B:FC:2F:95:72
inet addr:72.55.179.7 Bcast:72.55.179.31 Mask:255.255.255.224
inet6 addr: fe80::21b:fcff:fe2f:9572/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:456310 errors:0 dropped:0 overruns:0 frame:0
TX packets:307979 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:510055357 (486.4 MiB) TX bytes:42855331 (40.8 MiB)
Interrupt:201
eth0:0 Link encap:Ethernet HWaddr 00:1B:FC:2F:95:72
inet addr:72.55.180.209 Bcast:72.55.180.215 Mask:255.255.255.248
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:201
eth0:1 Link encap:Ethernet HWaddr 00:1B:FC:2F:95:72
inet addr:72.55.180.210 Bcast:72.55.180.215 Mask:255.255.255.248
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:201
eth0:2 Link encap:Ethernet HWaddr 00:1B:FC:2F:95:72
inet addr:72.55.180.211 Bcast:72.55.180.215 Mask:255.255.255.248
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:201
eth0:3 Link encap:Ethernet HWaddr 00:1B:FC:2F:95:72
inet addr:72.55.180.212 Bcast:72.55.180.215 Mask:255.255.255.248
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:201
eth0:4 Link encap:Ethernet HWaddr 00:1B:FC:2F:95:72
inet addr:72.55.180.213 Bcast:72.55.180.215 Mask:255.255.255.248
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:201
eth0:5 Link encap:Ethernet HWaddr 00:1B:FC:2F:95:72
inet addr:72.55.180.214 Bcast:72.55.180.215 Mask:255.255.255.248
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:201
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:477 errors:0 dropped:0 overruns:0 frame:0
TX packets:477 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:102566 (100.1 KiB) TX bytes:102566 (100.1 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:10 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:840 (840.0 b) TX bytes:0 (0.0 b)
# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
ip-72-55-180-20 * 255.255.255.255 UH 0 0 0 venet0
72.55.180.208 * 255.255.255.248 U 0 0 0 eth0
72.55.179.0 * 255.255.255.224 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth0
default ip-72-55-179-1. 0.0.0.0 UG 0 0 0 eth0
Can some offer any help on why the networks not availible.
|
|
|
|
Re: Network not availible. [message #21095 is a reply to message #21011] |
Mon, 01 October 2007 17:59   |
Drew2k
Messages: 12 Registered: September 2007
|
Junior Member |
|
|
Hi, here are the results as requested.
On the VPS
# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.0.2.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 venet0
0.0.0.0 192.0.2.1 0.0.0.0 UG 0 0 0 venet0
On the HOST
# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
72.55.180.208 0.0.0.0 255.255.255.248 U 0 0 0 eth0
72.55.179.0 0.0.0.0 255.255.255.224 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 72.55.179.1 0.0.0.0 UG 0 0 0 eth0
Quote: |
Quote: |
#ip-72-55-180-20 * 255.255.255.255 UH 0 0 0 venet0
|
Is it your VPS?
I've asked this question, because addresses 72-55-180-20 and 72.55.180.209 are different. Is it normal?
|
That route was from the HOST machine. 72.55.180.209 is the VPS. Im not sure what 72.55.180.20 is. Its not one of my addresses.
My HOST IP is 72.55.179.7
[Updated on: Mon, 01 October 2007 18:01] Report message to a moderator
|
|
|
|
|
|
|
Re: Network not availible. [message #21212 is a reply to message #21206] |
Wed, 03 October 2007 12:12   |
maratrus
Messages: 1495 Registered: August 2007 Location: Moscow
|
Senior Member |
|
|
Hi,
1. Quote: | [root@VE101 /]# ping google.com
ping: unknown host google.com
|
May be you have not set a nameserver for your VPS. To do it, please see "man vzctl", namely "nameserver" parameter.
2. Are you sure, that IP address 72.55.180.209 is valid to access the Internet. Have you come to an agreement with your provider about this IP?
[Updated on: Wed, 03 October 2007 13:15] Report message to a moderator
|
|
|
|
|
|
Re: Network not availible. [message #21231 is a reply to message #21011] |
Wed, 03 October 2007 15:44   |
 |
dowdle
Messages: 261 Registered: December 2005 Location: Bozeman, Montana
|
Senior Member |
|
|
Unless you have those virtual interfaces on your host node for some valid reason (I'm guessing not)... you need to remove them all.
You don't have to do any special NIC configuration on the hn to create NICs for your VPSes... vzctl does it all for you... and those virtual interfaces are blocking your VPSes from getting the packets.
Regarding name resolution, as was mentioned, you need to do a:
vzctl set {VEID} --nameserver {a.b.c.d} --save
I think if you wipe the slate clean with your network configuration (only have the hn set to it's own IP address and that's it) you'll be in business.
Nowhere in the OpenVZ quick install guide, wiki, manuals, etc... does it ever say you need to pre-configure the host node with virtual interfaces... and you are the second person I've run into who has done this.
--
TYL, Scott Dowdle
Belgrade, Montana, USA
|
|
|
Re: Network not availible. [message #21232 is a reply to message #21011] |
Wed, 03 October 2007 15:45   |
Drew2k
Messages: 12 Registered: September 2007
|
Junior Member |
|
|
Hello, i have done as requested.
I have also done the same for VPS102, and its the same as VPS101 - Communicates with the host and vice versa, but not the internet.
[[email]root@cl-t091-040cl[/email] ~]# ping 64.233.167.99
PING 64.233.167.99 (64.233.167.99) 56(84) bytes of data.
64 bytes from 64.233.167.99: icmp_seq=2 ttl=244 time=25.0 ms
64 bytes from 64.233.167.99: icmp_seq=6 ttl=244 time=24.9 ms
64 bytes from 64.233.167.99: icmp_seq=7 ttl=244 time=25.1 ms
64 bytes from 64.233.167.99: icmp_seq=8 ttl=244 time=24.8 ms
64 bytes from 64.233.167.99: icmp_seq=9 ttl=244 time=49.6 ms
[[email]root@cl-t091-040cl[/email] ~]# iptables -t filter -L
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
[[email]root@cl-t091-040cl[/email] ~]# iptables -t nat -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
And finally, the tcpdump
[[email]root@cl-t091-040cl[/email] ~]# 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
11:40:10.282116 IP 72.55.180.209 > 64.233.167.99: ICMP echo request, id 15214, seq 93, length 64
11:40:11.281370 IP 72.55.180.209 > 64.233.167.99: ICMP echo request, id 15214, seq 94, length 64
11:40:12.281660 IP 72.55.180.209 > 64.233.167.99: ICMP echo request, id 15214, seq 95, length 64
11:40:13.281932 IP 72.55.180.209 > 64.233.167.99: ICMP echo request, id 15214, seq 96, length 64
11:40:14.281182 IP 72.55.180.209 > 64.233.167.99: ICMP echo request, id 15214, seq 97, length 64
11:40:15.281471 IP 72.55.180.209 > 64.233.167.99: ICMP echo request, id 15214, seq 98, length 64
11:40:16.281745 IP 72.55.180.209 > 64.233.167.99: ICMP echo request, id 15214, seq 99, length 64
11:40:17.280992 IP 72.55.180.209 > 64.233.167.99: ICMP echo request, id 15214, seq 100, length 64
11:40:18.281287 IP 72.55.180.209 > 64.233.167.99: ICMP echo request, id 15214, seq 101, length 64
11:40:19.281555 IP 72.55.180.209 > 64.233.167.99: ICMP echo request, id 15214, seq 102, length 64
Quote: |
Unless you have those virtual interfaces on your host node for some valid reason (I'm guessing not)... you need to remove them all.
You don't have to do any special NIC configuration on the hn to create NICs for your VPSes... vzctl does it all for you... and those virtual interfaces are blocking your VPSes from getting the packets.
Regarding name resolution, as was mentioned, you need to do a:
vzctl set {VEID} --nameserver {a.b.c.d} --save
I think if you wipe the slate clean with your network configuration (only have the hn set to it's own IP address and that's it) you'll be in business.
Nowhere in the OpenVZ quick install guide, wiki, manuals, etc... does it ever say you need to pre-configure the host node with virtual interfaces... and you are the second person I've run into who has done this.
|
I didnt set up the virtual alias. They where set up by my server provider.
I have now removed them, and the only interfaces are eth0, lo and venet0.
I have setup the --nameserver, pointing the address to my host node which has BindDNS installed.
[Updated on: Wed, 03 October 2007 15:48] Report message to a moderator
|
|
|
Re: Network not availible. [message #21234 is a reply to message #21232] |
Wed, 03 October 2007 16:03   |
 |
dowdle
Messages: 261 Registered: December 2005 Location: Bozeman, Montana
|
Senior Member |
|
|
I'm sure you already know this, but you don't really need to run your own DNS as long as you put in a valid DNS IP for nameserver... but perhaps you have other reasons to do so.
So, your VPSes can make it to the host but not go out, is that correct? Either you still have something weird with the network setup on your hn or your ISP isn't routing your additional (VPS) addresses... or it something I haven't run into before. 
If you traceroute to an address of one of your VPSes, is the last hop (even if it doesn't make it to your VPS) the same last hop as your host node? If so, then routing (that your hosting provider manages) is probably ok.
--
TYL, Scott Dowdle
Belgrade, Montana, USA
|
|
|
|
|
|
|
|
|
Re: Network not availible. [message #21302 is a reply to message #21011] |
Thu, 04 October 2007 15:32   |
Drew2k
Messages: 12 Registered: September 2007
|
Junior Member |
|
|
Ok, i have the VPS accessing the internet. I executed
iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to 72.55.179.7
72.55.179.7 being my host. Now all VPS have access to the internet. However, the internet can not access the VPS.
Any ideas?
I've also noticed the following while restarting the network
[[email]root@cl-t091-040cl[/email] sysconfig]# /etc/init.d/network restart
Shutting down interface eth0: [ OK ]
Shutting down interface venet0: [ OK ]
Shutting down loopback interface: [ OK ]
Disabling IPv4 packet forwarding: net.ipv4.ip_forward = 0
[ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: [ OK ]
Bringing up interface venet0:
Determining IP information for venet0... failed.
[FAILED]
however, i have enabled ip_forward in the /etc/sysctl.conf file.
[Updated on: Thu, 04 October 2007 16:24] Report message to a moderator
|
|
|
|
|
|
|
|