Bridge Wan

The following scenario shows how to configure the hardware switch to forward traffic from LAN to WAN and vice versa.

../../../../_images/lanwan.svg

Test Forwarded Traffic Through An Isolated Port

Description

In this scenario, switch port eth0p0 behaves as an isolated port and forwards traffic through eth2.

Scenario

Step 1: Set the following configuration in DUT0:

set interfaces ethernet eth2 address 10.0.0.1/24
set interfaces ethernet eth2 traffic nat source rule 1 address masquerade
set interfaces ethernet eth0p0 address 192.168.100.1/24

Step 2: Set the following configuration in DUT1:

set interfaces ethernet eth0 address 192.168.100.2/24
set protocols static route 0.0.0.0/0 next-hop 192.168.100.1

Step 3: Set the following configuration in DUT2:

set interfaces ethernet eth0 address 10.0.0.2/24

Step 4: Ping IP address 10.0.0.2 from DUT1:

admin@DUT1$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=63 time=1.89 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 1.886/1.886/1.886/0.000 ms

Test Forwarded Traffic Through A Hardware Bridged Port

Description

In this scenario, the hardware switch is configured to forward bridged traffic between eth0 and eth0p0 through eth2. Hardware-offload is enabled.

Scenario

Step 1: Set the following configuration in DUT0:

set interfaces ethernet eth2 address 10.0.0.1/24
set interfaces ethernet eth2 traffic nat source rule 1 address masquerade
set interfaces bridge br0 hardware-offload eth0
set interfaces bridge br0 address 192.168.100.1/24
set interfaces ethernet eth0p0 bridge-group bridge br0

Step 2: Set the following configuration in DUT1:

set interfaces ethernet eth0 address 192.168.100.2/24
set protocols static route 0.0.0.0/0 next-hop 192.168.100.1

Step 3: Set the following configuration in DUT2:

set interfaces ethernet eth0 address 10.0.0.2/24

Step 4: Ping IP address 10.0.0.2 from DUT1:

admin@DUT1$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=63 time=432 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 431.631/431.631/431.631/0.000 ms

Test Forwarded Traffic Through A Software Bridged Port

Description

In this scenario, the hardware switch is configured to forward bridged traffic between eth0 and eth0p0 through eth2. Hardware-offload is disabled.

Scenario

Step 1: Set the following configuration in DUT0:

set interfaces ethernet eth2 address 10.0.0.1/24
set interfaces ethernet eth2 traffic nat source rule 1 address masquerade
set interfaces bridge br0 address 192.168.100.1/24
set interfaces ethernet eth0p0 bridge-group bridge br0

Step 2: Set the following configuration in DUT1:

set interfaces ethernet eth0 address 192.168.100.2/24
set protocols static route 0.0.0.0/0 next-hop 192.168.100.1

Step 3: Set the following configuration in DUT2:

set interfaces ethernet eth0 address 10.0.0.2/24

Step 4: Ping IP address 10.0.0.2 from DUT1:

admin@DUT1$ ping 10.0.0.2 count 1 size 56 timeout 1
Show output
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=63 time=455 ms

--- 10.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 454.843/454.843/454.843/0.000 ms