A Discrete-Event Network Simulator
API
Bridge Network Device

a virtual net device that bridges multiple LAN segments More...

Files

file  bridge-channel.cc
 ns3::BridgeChannel implementation.
 
file  bridge-channel.h
 ns3::BridgeChannel declaration.
 
file  bridge-helper.cc
 ns3::BridgeHelper implementation.
 
file  bridge-helper.h
 ns3::BridgeHelper declaration.
 
file  bridge-net-device.cc
 ns3::BridgeNetDevice implementation.
 
file  bridge-net-device.h
 ns3::BridgeNetDevice declaration.
 
file  csma-bridge-one-hop.cc
 Bridge example connecting two broadcast domains.
 
file  csma-bridge.cc
 Bridge example connecting four nodes, with the bridge acting as a simple switch.
 
file  csma-bridge.py
 Bridge example connecting two broadcast domains.
 

Classes

class  ns3::BridgeChannel
 Virtual channel implementation for bridges (BridgeNetDevice). More...
 
class  ns3::BridgeHelper
 Add capability to bridge multiple LAN segments (IEEE 802.1D bridging) More...
 
class  ns3::BridgeNetDevice
 a virtual net device that bridges multiple LAN segments More...
 
struct  ns3::BridgeNetDevice::LearnedState
 Structure holding the status of an address. More...
 

Detailed Description

a virtual net device that bridges multiple LAN segments

The BridgeNetDevice object is a "virtual" netdevice that aggregates multiple "real" netdevices and implements the data plane forwarding part of IEEE 802.1D. By adding a BridgeNetDevice to a Node, it will act as a "bridge", or "switch", to multiple LAN segments.

By default the bridge netdevice implements a "learning bridge" algorithm (see 802.1D), where incoming unicast frames from one port may occasionally be forwarded throughout all other ports, but usually they are forwarded only to a single correct output port.

Attention
The Spanning Tree Protocol part of 802.1D is not implemented. Therefore, you have to be careful not to create bridging loops, or else the network will collapse.
Bridging is designed to work only with NetDevices modelling IEEE 802-style technologies, such as CsmaNetDevice and WifiNetDevice.
If including a WifiNetDevice in a bridge, the wifi device must be in Access Point mode. Adhoc mode is not supported with bridging.