Editing VEs and HNs in same subnets
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 3: | Line 3: | ||
This describes a method of setting up networking for a host and its VEs such that the networking configuration for the VEs can be configured exactly as if the VEs were standalone hosts of their own in the same subnets or VLAN as the host. This method makes use of the Virtual Ethernet device and bridges between the host and its containers. This technique has the advantage of allowing IPv6 network configurations to work on both VEs and hosts as they normally would. In particular, both hosts and VEs can use IPv6 autoconfiguration. The network configuration of a VE can be identical to that of a non-VE system. | This describes a method of setting up networking for a host and its VEs such that the networking configuration for the VEs can be configured exactly as if the VEs were standalone hosts of their own in the same subnets or VLAN as the host. This method makes use of the Virtual Ethernet device and bridges between the host and its containers. This technique has the advantage of allowing IPv6 network configurations to work on both VEs and hosts as they normally would. In particular, both hosts and VEs can use IPv6 autoconfiguration. The network configuration of a VE can be identical to that of a non-VE system. | ||
− | In the following example the host has two physical interfaces and we are setting up the network configuration for VE 100. The host IP configuration is moved out of the ethN interface configs and into the | + | In the following example the host has two physical interfaces and we are setting up the network configuration for VE 100. The host IP configuration is moved out of the ethN interface configs and into the vzbrN interface config scripts (ifcfg-vzbr0 and ifcfg-vzbr1). Ie. the host IP configuration will now reside on the vzbrN interfaces instead of the ethN interfaces. The example also assumes IPv4 is configured statically, whereas IPv6 is auto-configured. |
==Configure host bridge interfaces== | ==Configure host bridge interfaces== | ||
Line 92: | Line 92: | ||
DEVICE=veth100.1 | DEVICE=veth100.1 | ||
ONBOOT=no | ONBOOT=no | ||
− | BRIDGE= | + | BRIDGE=vzbr1 |
To make the above take effect, either start the VE, | To make the above take effect, either start the VE, | ||
Line 100: | Line 100: | ||
Or if it's already started then manually add each VE interface to its corresponding bridge using: | Or if it's already started then manually add each VE interface to its corresponding bridge using: | ||
− | /usr/sbin/brctl addif | + | /usr/sbin/brctl addif vzbr0 veth100.0 |
− | /usr/sbin/brctl addif | + | /usr/sbin/brctl addif vzbr1 veth100.1 |
8. Verify each bridge includes the host interface and the veth interfaces for each VE: | 8. Verify each bridge includes the host interface and the veth interfaces for each VE: |