Open main menu

OpenVZ Virtuozzo Containers Wiki β

Changes

Talk:Virtual Ethernet device

762 bytes added, 22:14, 7 December 2011
no edit summary
The script for making a persistent bridge get added to a particular host-bridge on startup VPS/VE, doesn't seem to account for having multiple bridges. I have a bridge to a private lan for administrative functions and a bridge to the public network for inbound connections for services. How might one ensure that the vethVEID.x's are hooked up to the bridges on the host every time the VE is started? --[[User:Btrotter|Btrotter]] 05:34, 17 March 2008 (EDT)
: Please take a look at [[Using private IPs for Hardware Nodes]] and http://viresosysadmin-ivanov.blogspot.com/2008/02/2-veth-with-2-brindgesbridges-on-openvz-at.html. There you will find scripts which will help you to manage 2 bridges, and you can simply extend this script to use more then 2 bridges. --[[User:Major|Major]] 15:59, 27 March 2008 (MSK)
==Making a bridged veth-device persistent==
ifconfig veth0 192.168.0.1
ifconfig veth1 192.168.0.2</pre>
 
Answer: Enable CONFIG_VETH in your kernel, load the veth module and create a new pair with the 'ip' command from the [http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2 iproute2 package].
<pre>modprobe veth
ip link add name veth0 type veth peer name veth1
ifconfig veth0 192.168.0.1
ifconfig veth1 192.168.0.2</pre>
 
You may also want to check out this [ftp://robur.slu.se/pub/Linux/bifrost/seminars/workshop-2010-01-27/jens/Namespaces.pdf presentation on namespaces in Linux].
 
== Using iproute toolset or net-tools toolset ==
 
Hello,
 
I propose to substitute all usage of
 
ifconfig <device> 0
 
with
 
ip link set <device> up
 
 
Since iproute seems to be a requirement, I think its a good idea to drop support for ifconfig.
7
edits