[Users] Can't get networking working
Joseph
openvz.org at jks.tupari.net
Tue Jan 27 00:14:09 EST 2009
[root at p11 /etc]# cat /proc/vz/version
028stab059
[root at p11 /etc]# uname -a
Linux p11 2.6.18-92.1.13.el5.028stab059.6 #1 SMP Fri Nov
14 16:01:01 MSK 2008 x86_64 x86_64 x86_64 GNU/Linux
At first I tried this:
vzctl create $CTID --ostemplate centos-5-x86_64
vzctl set $CTID --ipadd $VIP --save
vzctl set $CTID --hostname $VHOSTNAME --save
vzctl set $CTID --nameserver 199.107.233.222 --save
vzctl start $CTID
but I couldn't ping the ve from anywhere, including the host, and I
couldn't ping out. Next I tried this, but it doesn't work either:
vzctl create $CTID --ostemplate centos-5-x86_64
vzctl set $CTID --hostname $VHOSTNAME --save
vzctl set $CTID --nameserver 199.107.233.222 --save
vzctl set $CTID --netif_add eth0 --save
vzctl start $CTID
ifconfig veth${CTID}.0 0
for IFACE in veth${CTID}.0 eth0 eth1 ; do
for IFILE in forwarding proxy_arp ; do
echo 1 > /proc/sys/net/ipv4/conf/$IFACE/$IFILE
done
done
route add $VIP dev veth${CTID}.0
#now configure eth0 inside the VE
vzctl exec $CTID /sbin/ifconfig eth0 $VIP broadcast 63.240.50.223 netmask
255.255.255.224
vzctl exec $CTID route add default gw 63.240.50.193
More information about the Users
mailing list