OpenVZ Forum


Home » General » Support » centos + OpenVZ network issue (Unable to conect guest OS to internet)
centos + OpenVZ network issue [message #46008] Sun, 22 April 2012 10:45
sharonsreedh is currently offline  sharonsreedh
Messages: 2
Registered: April 2012
Junior Member
Hi,

Am unable to connect my guest OS(centos2.6.18-308.el5.028stab099.3) to internet. Please help am totaly lost. Sad

My setup
#cat ifcfg-eth0
# Intel Corporation PRO/100 VE Network Connection
DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=00:19:D1:ED:E6:6A
ONBOOT=yes
TYPE=Ethernet
==================================================
#cat ifcfg-venet0
DEVICE=venet0
BOOTPROTO=static
ONBOOT=yes
IPADDR=127.0.0.1
NETMASK=255.255.255.255
BROADCAST=0.0.0.0
=======================================================
#cat ifcfg-venet0:0
DEVICE=venet0:0
ONBOOT=yes
IPADDR=192.168.22.11
NETMASK=255.255.255.255
GATEWAY=192.168.1.2
======================================================
# cat /etc/sysctl.conf

net.ipv4.conf.default.forwarding = 1
net.ipv4.conf.default.proxy_arp = 0
net.ipv4.ip_forward = 1
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.rp_filter=1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 1
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 4294967295
kernel.shmall = 268435456
net.ipv4.conf.default.proxy_arp = 0
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.eth0.proxy_arp = 1
net.ipv4.icmp_echo_ignore_broadcasts=1
============================================================ ==
#sysctl -p

net.ipv4.conf.default.forwarding = 1
net.ipv4.conf.default.proxy_arp = 0
net.ipv4.ip_forward = 1
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 1
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 4294967295
kernel.shmall = 268435456
net.ipv4.conf.default.proxy_arp = 0
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.eth0.proxy_arp = 1
net.ipv4.icmp_echo_ignore_broadcasts = 1
============================================================ ==
# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
117.207.232.1 * 255.255.255.255 UH 0 0 0 ppp0
192.168.22.11 * 255.255.255.255 UH 0 0 0 venet0
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
192.168.122.0 * 255.255.255.0 U 0 0 0 virbr0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth0
default * 0.0.0.0 U 0 0 0 ppp0
===========================================================
# ip route
117.207.232.1 dev ppp0 proto kernel scope link src 117.207.238.235
192.168.22.11 dev venet0 scope link
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.2
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1
169.254.0.0/16 dev eth0 scope link
default dev ppp0 scope link
============================================================ ==

#vzctl create 101 --ostemplate centos-5-x86 -config basic
#vzctl set 101 --ipadd 192.168.22.11 --save
#vzctl set 101 --nameserver 218.248.245.1 218.248.255.139 --save
#vzctl set 101 --hostname server101.myvps.com --save
#vzctl 101 start
#vzctl enter 101
3entered into CT 101
[root@server101 /]#

#route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
169.254.0.0 * 255.255.0.0 U 0 0 0 venet0
default * 0.0.0.0 U 0 0 0 venet0
# ip route
169.254.0.0/16 dev venet0 scope link
default dev venet0 scope link
#ping google.com
ping: unknown host google.com
 
Read Message
Previous Topic: /vz/private on NFS
Next Topic: Server halting
Goto Forum:
  


Current Time: Sun Jul 14 16:52:59 GMT 2024

Total time taken to generate the page: 0.02327 seconds