Cannot get veth working to save my life... please help! [message #37912] |
Sun, 01 November 2009 21:11 |
batfastad
Messages: 15 Registered: September 2009 Location: London, UK
|
Junior Member |
|
|
Hi everyone
I'm really struggling getting veth to work. The container is Ubuntu 8.04 64bit and host is CentOS 5.3 64bit
I'm following this guide... http://wiki.openvz.org/Veth#Simple_configuration_with_virtua l_Ethernet_device
but I just can't get it going
Here's what I'm doing:
vzctl set 105 --netif_add eth0,,,,vzbr0 --save
[host-node]# ifconfig veth105.0 0
[host-node]# echo 1 > /proc/sys/net/ipv4/conf/veth105.0/forwarding
[host-node]# echo 1 > /proc/sys/net/ipv4/conf/veth105.0/proxy_arp
[host-node]# echo 1 > /proc/sys/net/ipv4/conf/eth0/forwarding
[host-node]# echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp
[host-node]# vzctl enter 101
[ve-101]# /sbin/ifconfig eth0 0
[ve-101]# /sbin/ip addr add 192.168.1.15 dev eth0
[ve-101]# /sbin/ip route add default dev eth0
Do I need to restart the CT or the host's networking at any point in this procedure?
At what point should I be able to ping out of the container?
Anyone?
I've been working on this all day to switch our servers over and still no luck
Cheers, B
[Updated on: Sun, 01 November 2009 21:15] Report message to a moderator
|
|
|
|
Re: Cannot get veth working to save my life... please help! [message #37983 is a reply to message #37921] |
Fri, 06 November 2009 19:29 |
batfastad
Messages: 15 Registered: September 2009 Location: London, UK
|
Junior Member |
|
|
Hi Torsten
Thanks for replying... Sorry for the lack of reply on my part. Because I couldn't get it working I had to re-install our old server configuration.
I've now got a test box setup to experiment with veth and bridges
Host OS is Ubuntu 8.04 Server, container #104 is CentOS 5.3
When I finally get the hang of this veth stuff then my production environment will be the other way round... CentOS host and Ubuntu template (with other CentOS templates)
I created a fresh container and managed to delete my old bridge device.
I still can't get it working.
I've basically followed this section
http://wiki.openvz.org/Veth#Simple_configuration_with_virtua l_Ethernet_device
I got a permission denied error on each of these commands
[host-node]# sudo echo 1 > /proc/sys/net/ipv4/conf/veth104.0/forwarding
[host-node]# sudo echo 1 > /proc/sys/net/ipv4/conf/veth104.0/proxy_arp
[host-node]# sudo echo 1 > /proc/sys/net/ipv4/conf/eth0/forwarding
[host-node]# sudo echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp
... So that's not good. That could be why this isn't working.
192.168.1.96 is the static IP I want to assign to this VE
[host-node]# sudo vzctl enter 104
[ve-104]# /sbin/ifconfig eth0 0
[ve-104]# /sbin/ip addr add 192.168.1.96 dev eth0
[ve-104]# /sbin/ip route add default dev eth0
That final line I get an error "RTNETLINK answers: Network is down"
[host-node]# sudo brctl addbr vzbr0
[host-node]# sudo brctl addif vzbr0 veth104.0
[host-node]# sudo ifconfig vzbr0 0
[host-node]# sudo echo 1 > /proc/sys/net/ipv4/conf/vzbr0/forwarding
[host-node]# sudo echo 1 > /proc/sys/net/ipv4/conf/vzbr0/proxy_arp
Again I got permission denied errors when trying to echo 1 > /proc...
Then I did this (where 192.168.1.96 is the IP I want to assign to my VE)...
[host-node]# sudo ip route add 192.168.1.96 dev veth104.0
[host-node]# ip route add 192.168.1.96 dev vzbr0
At this point, when I run brctl show I had the veth104.0 listed under my bridge vzbr0
So I tried...
sudo brctl addif eth0
to try and add my host's eth0 to the bridge as well.
Then when I re-run brctl show I get eth0 and veth104.0 listed under vzbr0
But I can't ping anywhere but localhost from the host. And nowhere from within the VE.
I get the error "Network is unreachable" in all cases apart from pinging localhost.
I think I'm missing some steps and that I'm not bringing up/down the network or an interface when I should somewhere.
Any ideas?
Would the procedure vary massively between an Ubuntu host and a CentOS host?
Don't suppose anyone can write me a basic step-by-step on this?
I'm willing to give a (small) Paypal reward to someone with (extreme ) patience who can help me out!!
Cheers, B
[Updated on: Fri, 06 November 2009 19:32] Report message to a moderator
|
|
|