首页 > 代码库 > Linux Network Bridge

Linux Network Bridge

1. About Network Bridge

    A network bridge is a Link Layer device which forwards traffic between networks based on MAC addresses and is therefore also referred to as a Layer 2 device.


    It makes forwarding decisions based on tables of MAC addresses which it builds by learning what hosts are connected to each network. 


    A software bridge can be used within a Linux host in order to emulate a hardware 

bridge, for example in virtualization applications for sharing a NIC with one or more virtual NICs. 



Example: Sample ifcfg-br0 interface configuration file


DEVICE=br0

TYPE=Bridge

IPADDR=192.168.1.100

NETMASK=255.255.255.0

ONBOOT=yes

BOOTPROTO=none

NM_CONTROLLED=no

DELAY=0


Example:Sample ifcfg-eth0 interface configuration file


DEVICE=eth0

TYPE=Ethernet

HWADDR=08:00:27:72:C0:A0

BOOTPROTO=none

ONBOOT=yes

NM_CONTROLLED=no

BRIDGE=br0


Linux Network Bridge