Changes

Jump to: navigation, search

Virtual Ethernet device

1,786 bytes added, 14:03, 7 June 2006
no edit summary
Virtual ethernet device is ethernet device which can be used inside a [[VE]]. Unlike
venet network device, veth device has a MAC address.

Virtual ethernet device consist of two ethernet devices - one in [[VE0]] and another one
in VE. These devices are connected to each other, so if a packet goes to one
device it will come out from the other device.


== Virtual ethernet device usage ==

=== Adding veth to a VE ===
<pre>
vzctl set <VEID> --veth_add <dev_name>,<dev_addr>,<ve_dev_name>,<ve_dev_addr>
</pre>
Here
* <tt>dev_name</tt> is ethernet device name in the [[VE0|host system]]
* <tt>dev_addr</tt> is its MAC address
* <tt>ve_dev_name</tt> is an ethernet device name in the VE
* <tt>ve_dev_addr</tt> is its MAC address

MAC addresses must be entered in XX:XX:XX:XX:XX:XX format. Note that this option
is incremental, so devices are added to already existing ones.

=== Removing veth from a VE ===
<pre>
vzctl set <VEID> --veth_del <dev_name>
</pre>
Here <tt>dev_name</tt> is the ethernet device name in the [[VE0|host system]].

== Common configurations with virtual ethernet devices ==

=== Virtual ethernet device can be used with IPv6 ===
You'll need to setup IPv6 address on ethernet device inside a VE, add default route inside a VE
and add route to this address via host-side veth in host system.
Do not forget to enable forwarding and proxy_arp on host-side veth device.

=== Virtual ethernet devices can be joined in one bridge ===
Thus you'll have more convinient configuration, i.e. all routes to VEs will be
through this bridge and VEs can communicate with each other even without these routes.

=== Virtual ethernet devices + VLAN ===
This configuration can be done by adding vlan device to the previous configuration.

[[Category: Networking]]
[[Category: HOWTO]]
22
edits

Navigation menu