How to Create Bridge Networking in Linux

Tags: February 1, 2014 1:47 PM

Two user space tools used for creating bridge networking in linux are tunctl and brctl. tunctl used for simulating the network or link layer device and brctl for configuring them.

Create the TAP interface

Issue command below to create tap interface and then activate the tap.
tunctl -t vtap01 -u myuser
ip link set up dev vtap01
# or
ifconfig vtap01 up

Create the Bridge

Issue command below to configure the bridge for using the TAP interface which just created.
brctl addbr vbr01
brctl addif vbr01 vtap01

Assign IP and Routing to the Bridge

Make the bridge identified by others such as another computers or VMs (Assuming the network is
ip link set up dev vbr01
ip addr add dev vbr01
ip route add dev vbr01
or it could be written as:
ifconfig vbr01 up
ifconfig vbr01 netmask
route add -net netmask dev vbr01
The host at should be able to ping host (via bridge).


Share on Facebook Twitter


Post a Comment