Editing Virtual Ethernet device
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | + | '''Virtual Ethernet device''' is an Ethernet-like device which can be used | |
− | + | inside a [[container]]. Unlike [[venet]] network device, [[veth]] device | |
− | '''Virtual Ethernet device''' is an Ethernet-like device | + | has a MAC address, therefore it can be used in configurations, when veth |
− | inside a [[container]]. Unlike | + | is bridged to ethX or other device and container's user fully sets up |
− | has a MAC address | + | his networking himself, including IPs, gateways etc. |
− | is bridged to | ||
− | |||
− | himself, including IPs, gateways | ||
− | + | Virtual Ethernet device consist of two Ethernet devices -- | |
− | + | the one in [[CT0]] and another one in CT. These devices are connected | |
− | one in [[CT0]] | + | to each other, so if a packet goes to one |
− | + | device it will come out from the other device. | |
− | == Virtual Ethernet device usage == | + | == Virtual Ethernet device usage == |
− | === Kernel module === | + | === Kernel module === |
− | + | First of all, make sure the <code>vzethdev</code> module is loaded: | |
<pre> | <pre> | ||
# lsmod | grep vzeth | # lsmod | grep vzeth | ||
Line 24: | Line 21: | ||
</pre> | </pre> | ||
− | |||
In case it is not loaded, load it: | In case it is not loaded, load it: | ||
<pre> | <pre> | ||
Line 30: | Line 26: | ||
</pre> | </pre> | ||
− | + | {{Note|in vzctl < 3.0.11, vzethdev is not autoloaded by <code>/etc/init.d/vz</code> script, so you have to edit it to load this module.}} | |
− | |||
− | |||
− | |||
− | + | === MAC addresses === | |
− | + | In the below commands, you should use random MAC addresses. Do not use MAC addresses of real eth devices, because this can lead to collisions. | |
− | |||
MAC addresses must be entered in XX:XX:XX:XX:XX:XX format. | MAC addresses must be entered in XX:XX:XX:XX:XX:XX format. | ||
− | + | YOU MAY NOT NEED TO GENERATE MAC ADDRESSES BY HAND BECAUSE vzctl --veth_add | |
− | + | MAY GENERATE THEM AUTOMATICALLY AS NECESSARY. | |
− | + | Nevertheless, there is a utility script available for generating MAC addresses: http://www.easyvmx.com/software/easymac.sh. It is to be used like this: | |
− | chmod +x easymac.sh | + | |
+ | chmod +x easymac.sh | ||
./easymac.sh -R | ./easymac.sh -R | ||
− | === Adding veth to a CT === | + | === Adding veth to a CT === |
− | + | ==== syntax vzctl version > 3.0.22 ==== | |
− | vzctl set <CTID> --netif_add <ifname>[,<mac>,<host_ifname>,<host_mac>,<bridge>] | + | |
+ | vzctl set <CTID> --netif_add <ifname>[,<mac>,<host_ifname>,<host_mac>,<bridge>] | ||
− | |||
Here | Here | ||
* <tt>ifname</tt> is the Ethernet device name in the CT | * <tt>ifname</tt> is the Ethernet device name in the CT | ||
* <tt>mac</tt> is its MAC address in the CT | * <tt>mac</tt> is its MAC address in the CT | ||
* <tt>host_ifname</tt> is the Ethernet device name on the host ([[CT0]]) | * <tt>host_ifname</tt> is the Ethernet device name on the host ([[CT0]]) | ||
− | * <tt>host_mac</tt> is its MAC address on the host ([[CT0]]) | + | * <tt>host_mac</tt> is its MAC address on the host ([[CT0]]) |
− | * <tt>bridge</tt> is an optional parameter which can be used in custom network start scripts to automatically add the interface to a bridge. | + | * <tt>bridge</tt> is an optional parameter which can be used in custom network start scripts to automatically add the interface to a bridge. |
− | + | {{Note|All parameters except <code>ifname</code> are optional and are automatically generated if not specified.}} | |
− | {{Note|All parameters except <code>ifname</code> are optional | ||
− | |||
Example: | Example: | ||
− | + | vzctl set 101 --netif_add eth0 --save | |
− | vzctl set 101 --netif_add eth0 --save | ||
− | + | Or, if you want to specify everything: | |
− | |||
− | + | vzctl set 101 --netif_add eth0,00:12:34:56:78:9A,veth101.0,00:12:34:56:78:9B --save | |
− | vzctl set 101 --netif_add eth0,00:12:34:56:78:9A,veth101.0,00:12:34:56:78:9B --save | + | |
+ | Or, if you want to specify the bridge and leave the other values autogenerated: | ||
+ | |||
+ | vzctl set 101 --netif_add eth0,,,,vmbr1 --save | ||
+ | |||
+ | ==== syntax vzctl version >= 3.0.14 ==== | ||
+ | |||
+ | Syntax is the same as above, but without a <bridge> parameter. | ||
+ | |||
+ | ==== syntax vzctl version < 3.0.14 ==== | ||
+ | |||
+ | vzctl set <CTID> --veth_add <dev_name>,<dev_addr>,<ve_dev_name>,<ve_dev_addr> | ||
+ | |||
+ | |||
+ | Here | ||
+ | * <tt>dev_name</tt> is the Ethernet device name that you are creating on the [[CT0|host system]] | ||
+ | * <tt>dev_addr</tt> is its MAC address | ||
+ | * <tt>ve_dev_name</tt> is the corresponding Ethernet device name you are creating on the CT | ||
+ | * <tt>ve_dev_addr</tt> is its MAC address | ||
+ | |||
+ | {{Note|this option is incremental, so devices are added to already existing ones.}} | ||
+ | |||
+ | NB there should no spaces after the commas. | ||
+ | |||
+ | Example: | ||
+ | <pre> | ||
+ | [host-node] ifconfig eth0 | ||
+ | ... | ||
+ | HWaddress 00:12:34:56:78:9B | ||
+ | ... | ||
+ | </pre> | ||
− | + | [host-node] easymac.sh -R | |
− | + | 00:12:34:56:78:9A | |
− | + | vzctl set 101 --veth_add veth101.0,00:12:34:56:78:9A,eth0,00:12:34:56:78:9B --save | |
− | vzctl set 101 -- | ||
− | < | + | After executing this command <tt>veth</tt> device will be created for CT 101 and veth configuration will be saved to a CT configuration file. |
− | + | Host-side Ethernet device will have <tt>veth101.0</tt> name and <tt>00:12:34:56:78:9A</tt> MAC address. | |
+ | CT-side Ethernet device will have <tt>eth0</tt> name and <tt>00:12:34:56:78:9B</tt> MAC address. | ||
− | + | === Removing veth from a CT === | |
− | |||
− | === | + | ==== syntax vzctl version >= 3.0.14 ==== |
− | + | vzctl set <CTID> --netif_del <dev_name>|all | |
− | vzctl set <CTID> --netif_del <dev_name>|all | ||
− | |||
Here | Here | ||
* <code>dev_name</code> is the Ethernet device name in the [[CT]]. | * <code>dev_name</code> is the Ethernet device name in the [[CT]]. | ||
− | |||
{{Note|If you want to remove all Ethernet devices in CT, use <code>all</code>.}} | {{Note|If you want to remove all Ethernet devices in CT, use <code>all</code>.}} | ||
− | |||
Example: | Example: | ||
− | + | vzctl set 101 --netif_del eth0 --save | |
− | vzctl set 101 --netif_del eth0 --save | ||
− | == | + | ==== syntax vzctl version < 3.0.14 ==== |
+ | |||
+ | vzctl set <CTID> --veth_del <dev_name> | ||
+ | |||
+ | Here <tt>dev_name</tt> is the Ethernet device name in the [[CT0|host system]]. | ||
+ | |||
+ | Example: | ||
+ | |||
+ | vzctl set 101 --veth_del veth101.0 --save | ||
+ | |||
+ | After executing this command veth device with host-side Ethernet name | ||
+ | <code>veth101.0</code> will be removed from CT101 and veth configuration | ||
+ | will be updated in CT config file. | ||
+ | |||
+ | == Common configurations with virtual Ethernet devices == | ||
Module <tt>vzethdev</tt> must be loaded to operate with veth devices. | Module <tt>vzethdev</tt> must be loaded to operate with veth devices. | ||
− | === Simple configuration with virtual Ethernet device === | + | === Simple configuration with virtual Ethernet device === |
− | + | Assuming you have 192.168.0.0/24 on your LAN, you will learn how to integrate a container in this LAN using veth. | |
− | Assuming | ||
− | ==== Start a CT ==== | + | ==== Start a CT ==== |
− | + | [host-node]# vzctl start 101 | |
− | [host-node]# vzctl start 101 | ||
− | ==== Add veth device to CT ==== | + | ==== Add veth device to CT ==== |
− | + | [host-node]# vzctl set 101 --netif_add eth0 --save | |
− | [host-node]# vzctl set 101 --netif_add eth0 --save | ||
− | |||
This allocates a MAC address and associates it with the host eth0 port. | This allocates a MAC address and associates it with the host eth0 port. | ||
− | ==== Configure devices in CT0 ==== | + | ==== Configure devices in CT0 ==== |
− | |||
<pre> | <pre> | ||
[host-node]# ifconfig veth101.0 0 | [host-node]# ifconfig veth101.0 0 | ||
Line 137: | Line 159: | ||
</pre> | </pre> | ||
− | ==== Configure device in CT ==== | + | ==== Configure device in CT ==== |
− | |||
<pre> | <pre> | ||
[host-node]# vzctl enter 101 | [host-node]# vzctl enter 101 | ||
Line 146: | Line 167: | ||
</pre> | </pre> | ||
− | |||
Notes: | Notes: | ||
* Until you ifconfig eth0 it won't appear. When you do it will use the mac address netif_add added earlier | * Until you ifconfig eth0 it won't appear. When you do it will use the mac address netif_add added earlier | ||
Line 154: | Line 174: | ||
** http://openvz.org/pipermail/users/2005-November/000020.html | ** http://openvz.org/pipermail/users/2005-November/000020.html | ||
− | ==== Add route in [[CT0]] ==== | + | ==== Add route in [[CT0]] ==== |
− | + | ||
[host-node]# ip route add 192.168.0.101 dev veth101.0 | [host-node]# ip route add 192.168.0.101 dev veth101.0 | ||
− | |||
− | ==== Situation ==== | + | === Using a directly routed IPv4 with virtual Ethernet device === |
+ | |||
+ | ==== Situation ==== | ||
Hardware Node (HN/CT0) has 192.168.0.1/24 with router 192.168.0.254. | Hardware Node (HN/CT0) has 192.168.0.1/24 with router 192.168.0.254. | ||
− | |||
We also know that IPv4 10.0.0.1/32 is directly routed to 192.168.0.1 (this is called a ''fail-over IP''). | We also know that IPv4 10.0.0.1/32 is directly routed to 192.168.0.1 (this is called a ''fail-over IP''). | ||
− | |||
We want to give this directly routed IPv4 address to a container (CT). | We want to give this directly routed IPv4 address to a container (CT). | ||
− | ==== Start container ==== | + | ==== Start container ==== |
− | + | [host-node]# vzctl start 101 | |
− | [host-node]# vzctl start 101 | ||
− | ==== Add veth device to CT ==== | + | ==== Add veth device to CT ==== |
− | + | [host-node]# vzctl set 101 --netif_add eth0 --save | |
− | [host-node]# vzctl set 101 --netif_add eth0 --save | ||
− | |||
This allocates a MAC address and associates it with the host eth0 port. | This allocates a MAC address and associates it with the host eth0 port. | ||
− | ==== Configure device and add route in CT0 ==== | + | ==== Configure device and add route in CT0 ==== |
− | |||
<pre> | <pre> | ||
[host-node]# ifconfig veth101.0 0 | [host-node]# ifconfig veth101.0 0 | ||
Line 190: | Line 205: | ||
</pre> | </pre> | ||
− | |||
You can automatize this at VPS creation by using a mount script <tt>$VEID.mount</tt>. | You can automatize this at VPS creation by using a mount script <tt>$VEID.mount</tt>. | ||
− | |||
The problem here is that the ''veth'' interface appears in CT0 '''after''' VPS has started, therefore we cannot directly use the commands in the mount script. We launch a shell script (enclosed by { }) in background (operator '''&''') that waits for the interface to be ready and then adds the IP route. | The problem here is that the ''veth'' interface appears in CT0 '''after''' VPS has started, therefore we cannot directly use the commands in the mount script. We launch a shell script (enclosed by { }) in background (operator '''&''') that waits for the interface to be ready and then adds the IP route. | ||
− | |||
Contents of the mount script <tt>/etc/vz/conf/101.mount</tt>: | Contents of the mount script <tt>/etc/vz/conf/101.mount</tt>: | ||
<pre> | <pre> | ||
Line 202: | Line 214: | ||
# This script source VPS configuration files in the same order as vzctl does | # This script source VPS configuration files in the same order as vzctl does | ||
− | |||
# if one of these files does not exist then something is really broken | # if one of these files does not exist then something is really broken | ||
[ -f /etc/vz/vz.conf ] || exit 1 | [ -f /etc/vz/vz.conf ] || exit 1 | ||
[ -f $VE_CONFFILE ] || exit 1 | [ -f $VE_CONFFILE ] || exit 1 | ||
− | |||
# source both files. Note the order, it is important | # source both files. Note the order, it is important | ||
. /etc/vz/vz.conf | . /etc/vz/vz.conf | ||
. $VE_CONFFILE | . $VE_CONFFILE | ||
− | |||
# Configure veth with IP after VPS has started | # Configure veth with IP after VPS has started | ||
{ | { | ||
Line 227: | Line 236: | ||
</pre> | </pre> | ||
− | ==== Make sure IPv4 forwarding is enabled in CT0 ==== | + | ==== Make sure IPv4 forwarding is enabled in CT0 ==== |
− | |||
<pre> | <pre> | ||
[host-node]# echo 1 > /proc/sys/net/ipv4/ip_forward | [host-node]# echo 1 > /proc/sys/net/ipv4/ip_forward | ||
Line 237: | Line 245: | ||
You can permanently set this by using <tt>/etc/sysctl.conf</tt>. | You can permanently set this by using <tt>/etc/sysctl.conf</tt>. | ||
− | ==== Configure device in CT ==== | + | ==== Configure device in CT ==== |
− | |||
1. Configure IP address | 1. Configure IP address | ||
− | |||
2. Add gateway | 2. Add gateway | ||
− | |||
3. Add default route | 3. Add default route | ||
− | |||
<pre> | <pre> | ||
[ve-101]# /sbin/ifconfig eth0 10.0.0.1 netmask 255.255.255.255 | [ve-101]# /sbin/ifconfig eth0 10.0.0.1 netmask 255.255.255.255 | ||
[ve-101]# /sbin/ip route add 192.168.0.1 dev eth0 | [ve-101]# /sbin/ip route add 192.168.0.1 dev eth0 | ||
− | [ve-101]# /sbin/ip route | + | [ve-101]# /sbin/ip route default via 192.168.0.1 |
</pre> | </pre> | ||
− | |||
In a Debian container, you can configure this permanently by using <tt>/etc/network/interfaces</tt>: | In a Debian container, you can configure this permanently by using <tt>/etc/network/interfaces</tt>: | ||
<pre> | <pre> | ||
Line 266: | Line 269: | ||
</pre> | </pre> | ||
− | === Virtual Ethernet device with IPv6 === | + | === Virtual Ethernet device with IPv6 === |
− | |||
See the [[VEs and HNs in same subnets]] article. | See the [[VEs and HNs in same subnets]] article. | ||
− | === | + | === Virtual Ethernet devices can be joined in one bridge === |
− | + | Perform steps 1 - 4 from Simple configuration chapter for several containers and/or veth devices | |
− | |||
− | |||
− | |||
− | ==== Create bridge device ==== | + | ==== Create bridge device ==== |
<pre> | <pre> | ||
[host-node]# brctl addbr vzbr0 | [host-node]# brctl addbr vzbr0 | ||
</pre> | </pre> | ||
− | ==== Add veth devices to bridge ==== | + | ==== Add veth devices to bridge ==== |
<pre> | <pre> | ||
[host-node]# brctl addif vzbr0 veth101.0 | [host-node]# brctl addif vzbr0 veth101.0 | ||
Line 293: | Line 292: | ||
</pre> | </pre> | ||
− | ==== Configure bridge device ==== | + | ==== Configure bridge device ==== |
<pre> | <pre> | ||
[host-node]# ifconfig vzbr0 0 | [host-node]# ifconfig vzbr0 0 | ||
+ | [host-node]# echo 1 > /proc/sys/net/ipv4/conf/vzbr0/forwarding | ||
+ | [host-node]# echo 1 > /proc/sys/net/ipv4/conf/vzbr0/proxy_arp | ||
</pre> | </pre> | ||
− | === | + | ==== Add routes in [[CT0]] ==== |
− | + | <pre> | |
+ | [host-node]# ip route add 192.168.101.1 dev vzbr0 | ||
+ | ... | ||
+ | [host-node]# ip route add 192.168.101.n dev vzbr0 | ||
+ | [host-node]# ip route add 192.168.102.1 dev vzbr0 | ||
+ | ... | ||
+ | ... | ||
+ | [host-node]# ip route add 192.168.XXX.N dev vzbr0 | ||
+ | </pre> | ||
− | + | Thus you'll have more convinient configuration, i.e. all routes to containers will be through this bridge and containers can communicate with each other even without these routes. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | === Making a veth-device persistent === | |
According to http://bugzilla.openvz.org/show_bug.cgi?id=301 , a bug that stopped the veth device persistent was "Obsoleted now when --veth_add/--veth_del are introduced" | According to http://bugzilla.openvz.org/show_bug.cgi?id=301 , a bug that stopped the veth device persistent was "Obsoleted now when --veth_add/--veth_del are introduced" | ||
− | |||
See http://wiki.openvz.org/w/index.php?title=Virtual_Ethernet_device&diff=5990&oldid=5989#Making_a_veth-device_persistent for a workaround that used to be described in this section. | See http://wiki.openvz.org/w/index.php?title=Virtual_Ethernet_device&diff=5990&oldid=5989#Making_a_veth-device_persistent for a workaround that used to be described in this section. | ||
− | |||
That's it! At this point, when you restart the CT you should see a new line in the output, indicating that the interface is being configured and a new route being added. And you should be able to ping the host, and to enter the CT and use the network. | That's it! At this point, when you restart the CT you should see a new line in the output, indicating that the interface is being configured and a new route being added. And you should be able to ping the host, and to enter the CT and use the network. | ||
− | === Making a bridged veth-device persistent === | + | === Making a bridged veth-device persistent === |
− | |||
Like the above example, here it is how to add the veth device to a bridge in a persistent way. | Like the above example, here it is how to add the veth device to a bridge in a persistent way. | ||
− | + | ==== method for vzctl version > 3.0.22 ==== | |
− | vzctl includes a 'vznetaddbr' script, which makes use of the | + | |
+ | Newer versions of vzctl includes a 'vznetaddbr' script, which makes use of the new <bridge> parameter of the --netif_add switch. | ||
− | |||
Just create /etc/vz/vznet.conf containing the following. | Just create /etc/vz/vznet.conf containing the following. | ||
− | |||
<pre> | <pre> | ||
+ | #!/bin/bash | ||
+ | EXTERNAL_SCRIPT="/usr/sbin/vznetaddbr" | ||
+ | </pre> | ||
+ | |||
+ | The script uses 'vmbr0' as default bridge name when no bridge is specified. | ||
+ | |||
+ | ==== method for vzctl version <= 3.0.22 ==== | ||
+ | |||
+ | Older vzctl doesn't offer an automatic function to do this. | ||
+ | |||
+ | 1. First, edit the CT's configuration to specify what is the host bridge , and to indicate that a custom script should be run when starting up a CT. | ||
+ | * Open up /etc/vz/conf/CTID.conf | ||
+ | * Comment out any IP_ADDRESS entries to prevent a CTNET-device from being created in the CT | ||
+ | * Add or change the entry CONFIG_CUSTOMIZED="yes" | ||
+ | * Add an entry VZHOSTBR="<bridge if>" which is the bridge interface (already configured and up), you want to extend. | ||
+ | |||
+ | 2. Now to create that "custom script". The following helper script will check the configuration file for the bridge interface name and for the veth interface, and add the interface to the bridge. Create the script /usr/sbin/vznetaddbr to have the following, and then <code>chmod 0500 /usr/sbin/vznetaddbr</code> to make it executable. | ||
+ | |||
+ | <pre> | ||
+ | #!/bin/bash | ||
+ | # /usr/sbin/vznetaddbr | ||
+ | # a script to add virtual network interfaces (veth's) in a CT to a bridge on CT0 | ||
+ | |||
+ | CONFIGFILE=/etc/vz/conf/$VEID.conf | ||
+ | . $CONFIGFILE | ||
+ | VZHOSTIF=`echo $NETIF |sed 's/^.*host_ifname=\(.*\),.*$/\1/g'` | ||
+ | |||
+ | if [ ! -n "$VZHOSTIF" ]; then | ||
+ | echo "According to $CONFIGFILE CT$VEID has no veth interface configured." | ||
+ | exit 1 | ||
+ | fi | ||
+ | |||
+ | if [ ! -n "$VZHOSTBR" ]; then | ||
+ | echo "According to $CONFIGFILE CT$VEID has no bridge interface configured." | ||
+ | exit 1 | ||
+ | fi | ||
+ | |||
+ | echo "Adding interface $VZHOSTIF to bridge $VZHOSTBR on CT0 for CT$VEID" | ||
+ | /sbin/ifconfig $VZHOSTIF 0 | ||
+ | echo 1 > /proc/sys/net/ipv4/conf/$VZHOSTIF/proxy_arp | ||
+ | echo 1 > /proc/sys/net/ipv4/conf/$VZHOSTIF/forwarding | ||
+ | /usr/sbin/brctl addif $VZHOSTBR $VZHOSTIF | ||
+ | |||
+ | exit 0 | ||
+ | </pre> | ||
+ | |||
+ | 3. Now create /etc/vz/vznet.conf containing the following. This is what defines the "custom script" as being the vznetaddbr which you just created. | ||
+ | |||
+ | <pre> | ||
+ | #!/bin/bash | ||
EXTERNAL_SCRIPT="/usr/sbin/vznetaddbr" | EXTERNAL_SCRIPT="/usr/sbin/vznetaddbr" | ||
</pre> | </pre> | ||
− | < | + | This may not work for particularily old versions of vzctl, e.g., the version 3.0.11 that ships with Debian Etch. For those versions, you can try a hack: Use the custom script <code>/etc/vz/conf/$VID.mount</code> which is available, even in these old versions. But it gets called too early, before the networking has been set up. But it can start some background process, which waits and occasionally polls until $VZHOSTIF has become available. Here is one way to go about it: |
− | + | ||
<pre> | <pre> | ||
− | echo ' | + | #!/bin/bash |
+ | |||
+ | CONFIGFILE="/etc/vz/conf/$VEID.conf" | ||
+ | |||
+ | if [ -f "$CONFIGFILE" ] | ||
+ | then | ||
+ | . "$CONFIGFILE" | ||
+ | VZHOSTIF=`echo $NETIF |sed 's/^.*host_ifname=\(.*\),.*$/\1/g'` | ||
+ | export VZHOSTIF | ||
+ | export VZHOSTBR | ||
+ | |||
+ | # Fork into the background and try a few times, | ||
+ | # until the host side of the interface appears: | ||
+ | /bin/bash -c 'for i in 5 10 20 40 80 160 | ||
+ | do | ||
+ | if ifconfig -a | grep -q "$VZHOSTIF" | ||
+ | then | ||
+ | exec /usr/sbin/vznetaddbr | ||
+ | else | ||
+ | sleep "$i" | ||
+ | fi | ||
+ | done | ||
+ | ' & | ||
+ | |||
+ | # In the meantime, let the CT's start process continue, | ||
+ | # or else the interface will never appear: | ||
+ | exit 0 | ||
+ | else | ||
+ | $0: Config file "$CONFIGFILE" does not exist. | ||
+ | exit 1 | ||
+ | fi | ||
</pre> | </pre> | ||
− | < | + | 4. Of course, the CT's operating system will need to have . Consult the manual for your CT's OS for details. |
− | + | ||
+ | When the CT is started, the veth specified in the NETIF value is added to the bridge specified. You can check this by doing <code>brctl show</code> | ||
+ | |||
+ | Inside the CT you can configure the interface statically or using dhcp, as a real interface attached to a switch on the lan. | ||
− | === Virtual Ethernet devices + VLAN === | + | === Virtual Ethernet devices + VLAN === |
This configuration can be done by adding vlan device to the previous configuration. | This configuration can be done by adding vlan device to the previous configuration. | ||
− | == See also == | + | == See also == |
* [[Virtual network device]] | * [[Virtual network device]] | ||
* [[Differences between venet and veth]] | * [[Differences between venet and veth]] | ||
Line 367: | Line 438: | ||
* Troubleshooting: [[Bridge doesn't forward packets]] | * Troubleshooting: [[Bridge doesn't forward packets]] | ||
− | == External links == | + | == External links == |
* [http://www.tldp.org/HOWTO/Linux+IPv6-HOWTO/hints-daemons-radvd.html Linux IPv6 HOWTO, a chapter about radvd] | * [http://www.tldp.org/HOWTO/Linux+IPv6-HOWTO/hints-daemons-radvd.html Linux IPv6 HOWTO, a chapter about radvd] | ||
− | * [http:// | + | * [http://vireso.blogspot.com/2008/02/2-veth-with-2-brindges-on-openvz-at.html 2 veth with 2 bridges setup] |
− | |||
− | |||
− | |||
[[Category: Networking]] | [[Category: Networking]] | ||
[[Category: HOWTO]] | [[Category: HOWTO]] |