Last edited one month ago

How to create a bridge between ETH1, ETH2, ETH3



1. Prerequisites[edit | edit source]

This article necessarily needs and assumes that the X-LINUX-TSNSWCH expansion package is installed on top of OpenSTLinux distribution.

2. Purpose[edit | edit source]

This article describes how to create a bridge between ETH1/ETH2/ETH3.
The HW Ethernet switch make a link between ETH1 and ETH3. Their Ethernet network is completely different from the network of ETH2. To link both network to form only one, a software bridge is needed.

Alternate text
Bridge setup : MP25 board and two devices (boards, or PCs with ethernet port)

Here are the steps to configure this setup.

Configuration of MP25 board: bring up the end1/sw0ep interface/IP Forward enabled:

ifconfig end0 169.254.1.1 up
ifconfig sw0p2 192.168.0.20 up
echo 1 > /proc/sys/net/ipv4/ip_forward

IP forwarding in Linux refers to setting the Linux system to accept incoming network packets and forwarding them to another network.

Configuration of Device1 (board or PC): bring up the 'end0' ethernet interface:

ifconfig end0 169.254.1.2 up
ip route add default via 169.254.1.1

Configuration of Device2 (board or PC): bring up the 'end0' ethernet interface:

ifconfig end0 192.168.0.11 up
ip route add default via 192.168.0.10

Device1 and Device2 are now visible to each other:

From Device1:

ping 192.168.0.11 
PING 192.168.0.11 (192.168.0.11) 56(84) bytes of data.
64 bytes from 192.168.0.11: icmp_seq=1 ttl=63 time=1.31 ms
64 bytes from 192.168.0.11: icmp_seq=2 ttl=63 time=1.34 ms
64 bytes from 192.168.0.11: icmp_seq=3 ttl=63 time=1.38 ms
64 bytes from 192.168.0.11: icmp_seq=4 ttl=63 time=1.32 ms

From Device2:

ping 169.254.1.2
PING 169.254.1.2 (169.254.1.2) 56(84) bytes of data.
64 bytes from 169.254.1.2: icmp_seq=1 ttl=63 time=1.34 ms
64 bytes from 169.254.1.2: icmp_seq=2 ttl=63 time=1.26 ms
64 bytes from 169.254.1.2: icmp_seq=3 ttl=63 time=1.28 ms
64 bytes from 169.254.1.2: icmp_seq=4 ttl=63 time=1.25 ms

3. References[edit | edit source]