[Pkg-vsquare-changes] r140 - vde2/trunk/debian
filippo at alioth.debian.org
filippo at alioth.debian.org
Fri Jun 13 15:10:59 UTC 2008
Author: filippo
Date: 2008-06-13 15:10:59 +0000 (Fri, 13 Jun 2008)
New Revision: 140
Modified:
vde2/trunk/debian/README.Debian
Log:
port README.Debian to RST
Modified: vde2/trunk/debian/README.Debian
===================================================================
--- vde2/trunk/debian/README.Debian 2008-06-13 14:57:35 UTC (rev 139)
+++ vde2/trunk/debian/README.Debian 2008-06-13 15:10:59 UTC (rev 140)
@@ -1,99 +1,99 @@
-vde2 for Debian
----------------
+VDE for Debian
+##############
-VDE usage from /etc/network/interfaces
+ifupdown usage
+==============
- The Debian package provides an extension for iface sections in
- /etc/network/interfaces file:
-
- * vde2-switch -|<parameters>
-
- Start TAP interface with vde_switch command which has control directory
- /var/run/vde/$IFACE.ctl. The control directory is writable by vde2-net
- group. The additional parameters might be --macaddr MAC for switch MAC
- address or other parameters. See `vde_switch --help' or vde_switch(1) for
- description.
+The Debian package provides an extension for iface sections in
+``/etc/network/interfaces`` file:
- When using the "manual" method of ifupdown no further setup is made, thus
- it is possible to connect only the unix socket, e.g.:
-
- auto vde0
- iface vde0 inet manual
- vde2-switch -
+vde2-switch - | <parameters>
- starts a vde_switch on virtual interface vde0 at every boot, see ifup(8).
- In this case vde0 is used for future reference, for example management
- socket can be accessed from /var/run/vde2/vde0.mgmt
+ Start TAP interface with ``vde_switch`` command which has control directory
+ ``/var/run/vde/$IFACE.ctl``. The control directory is writable by vde2-net
+ group. The additional parameters might be --macaddr MAC for switch MAC
+ address or other parameters. See ``vde_switch --help`` or vde_switch(1) for
+ further informations.
- It might be also convenient to attach a vde2-switch to a tap on boot to
- use for bridging:
+ When using the ``manual`` method of ifupdown no further setup is made, thus
+ it is possible to connect only the unix socket, e.g.::
- auto qemu
- iface qemu inet manual
- vde2-switch -t qemu
-
- * vde2-slirp -|<parameters>
+ auto vde0
+ iface vde0 inet manual
+ vde2-switch -
- Start slirp interface connected to the VDE switch with slirpvde command.
- The additional parameter might be -dhcp for DHCP server
- or -netaddr to specify the network address (default 10.0.2.0).
- Call `slirpvde --help' for description.
- Please note that slirp is a virtual router for VDE, it is commonly used
- as a mean to connect the virtual network to the outside world.
- Slirp does not require root access, kernel ip forwarding or iptables
- configuration. Tap requires root access, provide any kind of routing
- as it were a real interface and it is faster.
- Do not use tap and slirp together in the same VDE LAN unless
- you know exactly what you are doing. If you set up a slirp with DHCP
- on a tap and you autoconfigure the interface it will become the
- default route for the entire system.
-
- * vde2-plug <dpipe_arg2>
-
- Start a VDE plug to be connected to a VDE switch controlled by TAP device
- and other switch called by second argument of dpipe command.
-
- i.e.
-
- The command
-
- vde2-plug vde_plug /tmp/vde2.ctl
-
- connects TAP interface to local switch.
-
- The command
-
- vde2-plug ssh remote.machine.org vde_plug /var/run/vde2/tap0.ctl
-
- connects TAP interface to remote switch by encrypted tunnel.
+ starts a ``vde_switch`` on virtual interface ``vde0`` (not TAP!) at every
+ boot, see ifup(8).
+ In this case ``vde0`` is used only for future reference, for example management
+ socket can be accessed from ``/var/run/vde2/vde0.mgmt``
+ It might be also convenient to attach a vde2-switch to a TAP on boot to
+ use for bridging but it should be specified::
-USAGE
+ auto qemu
+ iface qemu inet manual
+ vde2-switch -t qemu
- The encrypted tunnel
- --------------------
+vde2-slirp - | <parameters>
+
+ Start slirp interface connected to the VDE switch with ``slirpvde`` command.
+ The additional parameter might be -dhcp for DHCP server or -netaddr to
+ specify the network address (default 10.0.2.0).
+ See ``slirpvde --help`` for description.
+
+ Please note that slirp is a virtual router for VDE, it is commonly used
+ as a mean to connect the virtual network to the outside world.
+ Slirp does not require root access, kernel ip forwarding or iptables
+ configuration. TAP however requires root access, providing any kind of routing
+ like a real interface and it is also faster.
+
+ Do not use TAP and slirp together in the same VDE LAN unless
+ you know exactly what you are doing. If you set up a slirp with DHCP
+ on a TAP and you autoconfigure the interface it will become the
+ default route for the entire system.
+
+vde2-plug <dpipe_arg2>
+ Start ``dpipe`` connecting a ``vde_plug`` with the given ``dpipe_arg2`` as
+ the second argument after =. See ``dpipe`` man page for further details.
+ For example it is possible to connect two local plugs::
+
+ vde2-plug vde_plug /tmp/vde2.ctl
+
+ connects the ``vde_switch`` controlling the stanza's TAP interface to another
+ local ``vde_switch`` running at ``/tmp/vde2.ctl``.
+ It is also possible to connect to a remote plug::
+
+ vde2-plug ssh remote.machine.org vde_plug /var/run/vde2/tap0.ctl
+
+ connects the given TAP interface to remote ``vde_switch`` using ssh to encrypt the traffic.
+
+Commandline usage
+=================
+
+The encrypted tunnel
+--------------------
- The VDE is the simplest VPN solution.
+The VDE is the simplest VPN solution.
- On local system:
+On local system::
iface tap0 inet static
- address 10.0.2.2
- netmask 255.255.255.0
- vde2-switch -
- vde2-plug ssh user at remote.machine.org vde_plug /var/run/vde2/tap0.ctl
+ address 10.0.2.2
+ netmask 255.255.255.0
+ vde2-switch -
+ vde2-plug ssh user at remote.machine.org vde_plug /var/run/vde2/tap0.ctl
- On remote system:
+On remote system::
iface tap0 inet static
- address 10.0.2.1
- netmask 255.255.255.0
- vde2-switch -
+ address 10.0.2.1
+ netmask 255.255.255.0
+ vde2-switch -
- If vde2-slirp option is used, the connection works without NAT. The VDE can
- be also started with non-root privileges on the remote machine:
+If ``vde2-slirp`` option is used, the connection works without NAT. The VDE can
+be also started with non-root privileges on the remote machine.
- On local system:
+On local system::
iface tap0 inet dhcp
vde2-switch -
@@ -104,54 +104,54 @@
post-down ssh user at remote.machine.org 'test -f /tmp/vde_switch.pid && kill `cat /tmp/vde_switch.pid` || true'
post-down ssh user at remote.machine.org 'test -f /tmp/slirpvde.pid && kill `cat /tmp/slirpvde.pid` || true'
post-down ssh user at remote.machine.org rm -f /tmp/vde_switch.pid /tmp/slirpvde.pid
-
-
- QEMU
- ----
- The VDE is very useful for connecting the QEMU virtual machines.
- In the first example we use VDE as a standard VLAN connected to a
- tap interface.
+QEMU usage
+----------
- Enabling the VDE networking using tap.
+The VDE is very useful for connecting the QEMU virtual machines.
- 1. Configure tap0
-
+In the first example we use VDE as a standard VLAN connected to a
+tap interface.
+
+Enabling the VDE networking using tap.
+
+1. Configure tap0::
+
auto tap0
- iface tap0 inet static
- address 10.0.3.1
- netmask 255.255.255.0
- vde2-switch -
+ iface tap0 inet static
+ address 10.0.3.1
+ netmask 255.255.255.0
+ vde2-switch -
- 2. Start the interface:
+2. Start the interface::
# ifup tap0
- 3. Add the user to vde2-net group:
+3. Add the user to vde2-net group::
# adduser user vde2-net
- 3. Start the QEMUs with different MAC addresses:
+3. Start the QEMUs with different MAC addresses::
- $ vdeq qemu -m 660 -net nic,vlan=1,macaddr=52:54:00:12:01:00
- -net vde,vlan=1,sock=/var/run/vde2/tap0.ctl
+ $ vdeq qemu -m 660 -net nic,vlan=1,macaddr=52:54:00:12:01:00 \
+ -net vde,vlan=1,sock=/var/run/vde2/tap0.ctl \
-boot c -hda Debian1.img
- $ vdeq qemu -m 660 -net nic,vlan=1,macaddr=52:54:00:12:02:00
- -net vde,vlan=1,sock=/var/run/vde2/tap0.ctl
+ $ vdeq qemu -m 660 -net nic,vlan=1,macaddr=52:54:00:12:02:00 \
+ -net vde,vlan=1,sock=/var/run/vde2/tap0.ctl \
-boot c -hda Debian2.img
- 4. Configure the network inside QEMUs' virtual systems:
+4. Configure the network inside QEMUs' virtual systems::
debian1# cat > /etc/network/interfaces << END
auto lo
auto eth0
iface eth0 inet static
- address 10.0.3.101
- netmask 255.255.255.0
- broadcast 10.0.3.255
+ address 10.0.3.101
+ netmask 255.255.255.0
+ broadcast 10.0.3.255
END
debian2# cat > /etc/network/interfaces << END
@@ -160,47 +160,48 @@
iface lo inet loopback
auto eth0
iface eth0 inet static
- address 10.0.3.102
- netmask 255.255.255.0
- broadcast 10.0.3.255
+ address 10.0.3.102
+ netmask 255.255.255.0
+ broadcast 10.0.3.255
END
- 5. Check if the systems are available:
-
+5. Check if the systems are available::
+
# ping 10.0.3.101
# ping 10.0.3.102
- 6. Configure the routing/masquerading/bridging on the host computer
- for tap0 as you do on any other interface.
+6. Configure the routing/masquerading/bridging on the host computer
+ for ``tap0`` as you do on any other interface.
- QEMU-Slirp
+QEMU-Slirp
+----------
- 1. Configure vde0
-
+1. Configure vde0::
+
auto vde0
iface vde0 inet manual
vde2-switch -
vde2-slirp -dhcp
- 2. Start the interface:
+2. Start the interface::
# ifup vde0
- 3. Add the user to vde2-net group:
+3. Add the user to vde2-net group::
# adduser <user> vde2-net
- 3. Start the QEMUs with different MAC addresses:
+4. Start the QEMUs with different MAC addresses::
- $ vdeq qemu -m 660 -net nic,vlan=1,macaddr=52:54:00:12:01:00
- -net vde,vlan=1,sock=/var/run/vde2/vde0.ctl
+ $ vdeq qemu -m 660 -net nic,vlan=1,macaddr=52:54:00:12:01:00 \
+ -net vde,vlan=1,sock=/var/run/vde2/vde0.ctl \
-boot c -hda Debian1.img
- $ vdeq qemu -m 660 -net nic,vlan=1,macaddr=52:54:00:12:02:00
- -net vde,vlan=1,sock=/var/run/vde2/vde0.ctl
+ $ vdeq qemu -m 660 -net nic,vlan=1,macaddr=52:54:00:12:02:00 \
+ -net vde,vlan=1,sock=/var/run/vde2/vde0.ctl \
-boot c -hda Debian2.img
- 4. Configure the network inside QEMUs' virtual systems:
+5. Configure the network inside QEMUs' virtual systems::
debian1# cat > /etc/network/interfaces << END
auto lo
@@ -216,36 +217,41 @@
iface eth0 inet dhcp
END
- 5. Check if the systems can reach their default route:
- debian1# ping 10.0.2.2
- debian2# ping 10.0.2.2
- 6: Try a service on a remote system
- debian1# ssh your.main.server
+6. Check if the systems can reach their default route::
-The virtual system are on the same network but they are on a masqueraded
-network.
+ debian1# ping 10.0.2.2
+ debian2# ping 10.0.2.2
+7. Try a service on a remote system::
- You can also start the VDE networking without root privileges:
-
+ debian1# ssh your.main.server
+
+ The virtual system are on the same network but they are on a masqueraded
+ network.
+
+ You can also start the VDE networking without root privileges::
+
$ vde_switch -s /tmp/vde1.ctl -d
- $ vdeq qemu -net nic,vlan=1,macaddr=52:54:00:12:01:00
- -net vde,vlan=1,sock=/tmp/vde1.ctl
- -boot c -hda Debian1.img
- $ vdeq qemu -net nic,vlan=1,macaddr=52:54:00:12:02:00
- -net vde,vlan=1,sock=/tmp/vde1.ctl
+
+ $ vdeq qemu -net nic,vlan=1,macaddr=52:54:00:12:01:00 \
+ -net vde,vlan=1,sock=/tmp/vde1.ctl \
+ -boot c -hda Debian1.img
+
+ $ vdeq qemu -net nic,vlan=1,macaddr=52:54:00:12:02:00 \
+ -net vde,vlan=1,sock=/tmp/vde1.ctl \
-boot c -hda Debian2.img
In this case the networking is available only inside virtual machines.
- It is possible to start a slirpvde server before the Qemu machines:
+ It is possible to start a slirpvde server before the Qemu machines::
+
$ vde_switch -s /tmp/vde1.ctl -d
$ nohup slirpvde -s /tmp/vde1.ctl -dhcp &
- $ vdeq qemu -net nic,vlan=1,macaddr=52:54:00:12:01:00
- -net vde,vlan=1,sock=/tmp/vde1.ctl
+ $ vdeq qemu -net nic,vlan=1,macaddr=52:54:00:12:01:00 \
+ -net vde,vlan=1,sock=/tmp/vde1.ctl \
-boot c -hda Debian1.img
- $ vdeq qemu -net nic,vlan=1,macaddr=52:54:00:12:02:00
- -net vde,vlan=1,sock=/tmp/vde1.ctl
+ $ vdeq qemu -net nic,vlan=1,macaddr=52:54:00:12:02:00 \
+ -net vde,vlan=1,sock=/tmp/vde1.ctl \
-boot c -hda Debian2.img
These machines can auto-configure their interfaces using the dhcp server
@@ -254,14 +260,16 @@
transparently while port forwarding is needed for server access
(see slirpvde man page for further details).
- Management console
- ------------------
+Management console
+------------------
- You can connect to remote console with unixterm command:
-
+ You can connect to remote console with unixterm command::
+
$ unixterm /var/run/vde2/tap0.mgmt
-
- where tap0 is the name of the interface.
+ where ``tap0`` is the name of the interface.
+
+Authors::
+
-- Piotr Roszatycki <dexter at debian.org> Thu, 14 Dec 2006 10:22:19 +0100
- -- Renzo Davoli <renzo at cs.unibo.it> Fri Apr 20 19:33:27 +0200
+ -- Renzo Davoli <renzo at cs.unibo.it> Fri Apr 20 2007 19:33:27 +0200
More information about the Pkg-vsquare-changes
mailing list