Linux-Bridging

Use case:

Want to run multiple bng-blaster instance using same physical nic interface

Problem:

1.bngblaster application dose not support associating same interface on multiple instances

2.If we create Linux bridge and associate physical interface & veth pairs we could see broadcast packets from one veth interface flooded to other veth interface (normal switch behavior)

  e.g - created bridge 'br-access' associated physical nic 'eth1' & veth interfaces veth-access1 & veth-access2

           Veth pairs : (veth-access1<--->access1)  &&  (veth-access2<--->access2)

           Here broadcast packets from access1 is flooded to access2

Solution:

Enable port isolation for veth interfaces

eg:-

bridge link set dev veth-access1 isolated on
bridge link set dev veth-access2 isolated on

Configuration:

### Access side interface ###

# Create bridge
ip link add br-access type bridge
ip link set br-access up
ip link set eno12429 master br-access
# Add veth pairs
ip link add access1 type veth peer name veth-access1
ip link add access2 type veth peer name veth-access2
ip link set veth-access1 master br-access
ip link set veth-access2 master br-access
ip link set veth-access1 up
ip link set veth-access2 up
ip link set access1 up
ip link set access2 up
# Enable port isolation for veth interfaces
bridge link set dev veth-access1 isolated on
bridge link set dev veth-access2 isolated on


### Network side interface ####

# Create bridge
ip link add br-network type bridge
ip link set br-network up
ip link set eno12409.25 master br-network
# Add veth pairs
ip link add network1 type veth peer name veth-network1
ip link add network2 type veth peer name veth-network2
ip link set veth-network1 master br-network
ip link set veth-network2 master br-network
ip link set veth-network1 up
ip link set veth-network2 up
ip link set network1 up
ip link set network2 up
# Enable port isolation for veth interfaces
bridge link set dev veth-network1 isolated on
bridge link set dev veth-network2 isolated on


Topology:







Comments

Popular posts from this blog

gNMI_with_grafana on containerlabs

EVPN Route type-1 & type-4 in action

Network Automation with ROBOT Framework