Chapter 5. Bridging: In practice

Table of Contents

Creating a bridge
Starting a UML session
Removing the bridge

In the example given here there is a physical network of computers using the addresses 192.168.0.X. There is a host machine running UML sessions that has the IP address

[Warning] Warning

It's quite hard to experiment over SSH to a remote host unless you have two ethernet cards and can SSH through one whilst configuring the other. In order to attach our ethernet device (ethX) to the bridge we need to assign it an IP of, which would time out any SSH session. It is possible to write a script to automate this and not loose connectivity with the host but this is not recommended for the inexperienced or faint of heart.


If we want to allow users to run UML sessions that attach themselves to tun devices on the host they need access to /dev/net/tun. One way of allowing this is to add a group called "uml" and put the users that run UML sessions into this group. A typical /etc/group entry might look like "uml:x:104:david", or you may wish to use your distributions addgroup or groupadd command.

Now that we have created the group we need to make sure /dev/net/tun is owned by the group "uml" and that the group has access to it.

# chown root:uml /dev/net/tun
# chmod 660 /dev/net/tun