Virtual Networks

From Bobs Projects
Jump to: navigation, search

Virtual Networks covers a vast variety of topics.

Contents

Virtual Private Network

VPN, such as:

Virtual Local Area Network

VLAN

Virtual Ethernet Bridge

In Linux, the brctl command is used for setting up (Virtual) Ethernet Bridges.

Creating TAP/TUN devices

Assuming the Linux kernel is compiled to support TAP/TUN and the appropriate device node has been created in /dev/net, there are several ways to create TAP/TUN devices:

  • using tunctl command (from UML utilities)
  • using the openvpn command (from OpenVPN)
  • using the ip command (from iproute2):
# ip tuntap add mode tap

will add a new tapX device

The new tapX can be added to a Virtual Ethernet Bridge:

# brctl addif brY tapX
# ip link set tapX up

VirtualBox and Linux Ethernet Bridges

VirtualBox allows a guest to have multiple network interfaces, any of which can be connected to host Ethernet Bridges. However, probably due to the multi-platform nature of VirtualBox, the bridged interfaces do not appear as normal Linux Ethernet Bridge interfaces, eg. when viewed using:

brctl show

Also, the VirtualBox documentation clearly discusses the bridge mode as "connecting to a special interface alongside the physical interface".

External links