OpenVZ Forum


Home » General » Support » Bridgin thru vethxxx.0 (Problems bridging my CTs nic thru my HN nic)
Bridgin thru vethxxx.0 [message #40200] Fri, 30 July 2010 11:25 Go to previous message
alvakoldo10 is currently offline  alvakoldo10
Messages: 5
Registered: July 2010
Junior Member
Hi.
I have followed instructions at http://wiki.openvz.org/Using_veth_and_brctl_for_protecting_H N_and_saving_IP_addresses but I just have one phisical NIC eth0. So I issue next commands in order to have my 2 containers connected between them and to the network (see commands below).
Problem is I neither get one of my goals, CTs do not see each other and even worse ! whenever I issue the final brctl addif br0 eth0 my phisical network falls down !

See what I have done to get nothing working Sad

---------- COMMANDS ---------------
ifconfig venet0:0 down
ifconfig venet0 down
#===============================   CONTAINER 1
echo "ACTIONS ON THE CONTAINER 201 .........."
vzctl set 201 --netif_add eth0,00:0C:29:FA:54:FF,veth201.0,00:0C:29:FA:F3:D3 --save
ifconfig veth201.0 0
echo 0 > /proc/sys/net/ipv4/conf/veth201.0/forwarding
echo 0 > /proc/sys/net/ipv4/conf/veth201.0/proxy_arp
#
vzctl exec 201 ifconfig venet0:0 down
vzctl exec 201 ifconfig venet0 down
vzctl exec 201 ifconfig eth0 0
vzctl exec 201 ip addr add 192.168.2.201 dev eth0
vzctl exec 201 ip route add default dev eth0
vzctl exec 201 route add default gw 192.168.1.35
#
#===============================   CONTAINER 2
echo "ACTIONS ON THE CONTAINER 202 .........."
vzctl set 202 --netif_add eth0,00:0C:29:FA:54:FF,veth202.0,00:0C:29:FA:F3:D3 --save
ifconfig veth202.0 0
echo 0 > /proc/sys/net/ipv4/conf/veth202.0/forwarding
echo 0 > /proc/sys/net/ipv4/conf/veth202.0/proxy_arp
#
vzctl exec 202 ifconfig venet0:0 down
vzctl exec 202 ifconfig venet0 down
vzctl exec 202 ifconfig eth0 0
vzctl exec 202 ip addr add 192.168.2.202 dev eth0
vzctl exec 202 ip route add default dev eth0
vzctl exec 202 route add default gw 192.168.1.35
#
#===============================   BRIDGE
ifconfig eth0 0
echo 0 > /proc/sys/net/ipv4/conf/eth0/forwarding
echo 0 > /proc/sys/net/ipv4/conf/eth0/proxy_arp
#
brctl addbr br0
brctl addif br0 eth0
brctl addif br0 veth201.0
brctl addif br0 veth202.0
ifconfig br0 0
#
echo 0 > /proc/sys/net/ipv4/conf/br0/forwarding
echo 0 > /proc/sys/net/ipv4/conf/br0/proxy_arp
# ============= MY HARVEST
dhclient eth0
route add -net 192.168.2.0 netmask 255.255.255.0 dev br0


I have tried different iptable's rules and even stop it at all.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Web server
Next Topic: stab069.6 kernel not stable
Goto Forum:
  


Current Time: Tue Jul 29 15:44:37 GMT 2025

Total time taken to generate the page: 0.20708 seconds