OpenVZ Forum


Home » General » Support » OpenVZ with bridged interfaces and VLAN (OpenVZ with bridged interfaces and VLAN)
Re: OpenVZ with bridged interfaces and VLAN [message #47117 is a reply to message #47108] Mon, 09 July 2012 23:44 Go to previous messageGo to previous message
deimosfr is currently offline  deimosfr
Messages: 4
Registered: June 2010
Junior Member
Hi,

Try that on the host :
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
auto eth0
iface eth0 inet manual

# The bridged interface
auto vmbr0
iface vmbr0 inet static
        address 192.168.100.1
        netmask 255.255.255.0
        gateway 192.168.100.254
        broadcast 192.168.100.255
        network 192.168.100.0
        bridge_ports eth0
        bridge_fd 9
        bridge_hello 2
        bridge_maxage 12
        bridge_stp off

# The DMZ Vlan 110
auto vmbr0.110
iface vmbr0.110 inet static
	address 192.168.110.1
	netmask 255.255.255.0
	broadcast 192.168.110.255
	vlan_raw_device vmbr0

On the VE, configure it to get this config :
[...]
CONFIG_CUSTOMIZED="yes"
VZHOSTBR="vmbr0"
IP_ADDRESS=""
NETIF="ifname=eth0,mac=00:18:50:FE:EF:0B,host_ifname=veth101.0,host_mac=00:18:50:07:B8:F4"
[...]

Then on the guest :
# This configuration file is auto-generated.
# WARNING: Do not edit this file, your changes will be lost.
# Please create/edit /etc/network/interfaces.head and /etc/network/interfaces.tail instead,
# their contents will be inserted at the beginning and at the end
# of this file, respectively.
#
# NOTE: it is NOT guaranteed that the contents of /etc/network/interfaces.tail
# will be at the very end of this file.

# Auto generated lo interface
auto lo
iface lo inet loopback

# VE interface
auto eth0
iface eth0 inet manual

# VLAN 110 interface
auto eth0.110
iface eth0.110 inet static
	address 192.168.110.2
	netmask 255.255.255.0
	gateway 192.168.110.254
	broadcast 192.168.110.255
	vlan_raw_device eth0

It works for me Smile
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: need to connect my centos container to the wifi
Next Topic: Xorg - no render extension inside VE
Goto Forum:
  


Current Time: Fri Oct 11 10:19:12 GMT 2024

Total time taken to generate the page: 0.06373 seconds