Usage

A bridge interface is a virtual interface that can be created to perform data link layer forwarding on physical ethernet ports connected to multiple network segments. The ethernet ports become slaves to the bridge interface.

You can manage bridges from Linux or from the fast path.

Managing bridges from Linux

The following Linux commands allow to manage bridge devices (assuming Linux - Fast Path Synchronization is started).

Loading required modules

  1. Load required modules:

    # modprobe bridge
    

Creating a bridge device

# brctl addbr br0

This creates a new device (br0).

Displaying information about a bridge device

# brctl show br0

Deleting a bridge device

# brctl delbr br0

Adding a port to the bridge

# brctl addif br0 eth0

Forcing promiscuity in the fast path

This feature is meant for Linux < 3.13.

# ip link set eth0 promisc on

Deleting a port from a bridge

# brctl delif br0 eth0

Managing bridges from the fast path

The fp-cli commands below allow you to manage Fast Path Ethernet Bridge instances.

Setting port features from a bridge

Synopsis

bridge-port-set IFNAME [hairpin|learning|flooding <on|off>]
IFNAME

Name of the port interface.

Example

<fp-0> bridge-port-set eth0 hairpin on
eth0-vr0: master br0-vr0
        state: forwarding
        features: hairpin learning flooding

Displaying bridge interfaces

Synopsis

bridge

Example

<fp-0> bridge
Bridge interfaces:
br0-vr0:
        eth0-vr0: master br0-vr0
                state: forwarding
                features: learning flooding
        eth1-vr0: master br0-vr0
                state: forwarding
                features: learning flooding

Displaying a bridge interface’s FDB entry

Synopsis

bridge-fdb IFNAME
IFNAME

Name of the bridge interface.

Example

<fp-0> bridge-fdb br0
br0-vr0:
 00:30:1b:b4:dc:87 eth0-vr0 local
 00:50:fc:4c:88:e4 eth1-vr0
 00:50:fc:62:ec:c6 eth1-vr0 local
 00:30:1b:b4:df:94 eth0-vr0

Configuring the bridge FDB hitflags refresh policy

Synopsis

bridge-fdb-hitflags-set PERIOD MAX_SCANNED MAX_SENT
PERIOD

Period in seconds of FDB checking.

MAX_SCANNED

Maximum number of FDB entries to scan on a given period of time.

MAX_SENT

Maximum number of FDB entries to send over a given period of time.

Example

<fp-0> bridge-fdb-hitflags-set 30 2500 1600

Displaying bridge FDB hitflags parameters

Synopsis

hitflags [all|bridge-fdb|...]
No parameter

Display parameters for all categories.

all

Same as with no parameters.

bridge-fdb

Display bridge FDB hitlfags parameters.

Example

<fp-0> hitflags bridge-fdb
Bridge FDB hitflags
  period_in_seconds: 30
  max_scanned: 2500
  max_sent: 1600

Providing options

Some capabilities can be tuned for this module.

--iface-max

Maximum number of bridge interfaces

Default value

127

Memory footprint per bridge interface

32 B

Example

FP_OPTIONS="--mod-opt=bridge:--iface-max=16"

Then fast path can manage up to 16 bridge interfaces.

--port-max

Maximum number of bridge ports

Default value

511

Memory footprint per bridge ports

36 B

Example

FP_OPTIONS="--mod-opt=bridge:--port-max=500"
--fdb-max

Maximum number of FDB entries

Default value

5000

Memory footprint per FDB entry

40 B

Example

FP_OPTIONS="--mod-opt=bridge:--fdb-max=5000"
--iface-hash-order

Size order of bridge interfaces hash table. Value automatically updated if --iface-max is changed.

Default value

Range

1 .. 31

Example

FP_OPTIONS="--mod-opt=bridge:--iface-hash-order=8"
--fdb-hash-order

Size order of bridge fdb hash table. Value automatically updated if --fdb-max is changed.

Default value

Range

1 .. 31

Example

FP_OPTIONS="--mod-opt=bridge:--fdb-hash-order=8"

Tip

To get optimal performance, apply the following ratios to these parameters:

Parameter

Value

–iface-hash-order

N

–iface-max

2 ** N

–fdb-hash-order

M

–fdb-max

2 ** M

Note

See Fast Path Capabilities documentation for impact of the available memory on the default value of configurable capabilities