How to configure the switch to route traffic across VLANs

Zyxel_ArisaZyxel_Arisa Zyxel Official Agent Posts: 25  mod

The purpose of VLANs are to isolate one broadcast domain from another. If we would like hosts from different VLANs to communicate with each other, we have to set the switch to route traffic. The example shows how to configure the switch to route traffic across one VLAN to another.

Note:

All network IP addresses and subnet masks are used as examples in this article. Please replace them with your actual network IP addresses and subnet masks. This example was tested using XGS4600-32 (Firmware Version: V4.50).


1.Configure VLAN 10

1-1. Use AdministratorPC to create VLAN 10. Enter the web GUI and go to Menu > Advanced Application > VLAN > VLAN Configuration > Static VLAN Setup. Check the ACTIVE box. Type the Name and VLAN Group ID=10. Select port 1 as Fixed and uncheck Tx Tagging (Untagged). Click “Apply”.

1-2. Go to Menu > Advanced Application > VLAN > VLAN Configuration > VLAN Port Setup. Set the PVID. Set port 1 as PVID=10 (VLAN 10). Click “Apply”.

1-3. Create a Static IP Address for Switch in VLAN 10 (To be the gateway in VLAN 10): Go to Menu > Basic Setting > IP Setup > IP Configuration > IP Interface. Set the Static IP Address: 192.168.10.1 for Switch in VLAN 10. Click “Add”.


2.Configure VLAN 20

2-1. Create VLAN 20. Follow the same steps. Go to Menu > Advanced Application > VLAN > VLAN Configuration > Static VLAN Setup. Check the ACTIVE box. Type the Name and VLAN Group ID=20. Select port 2 as Fixed and uncheck Tx Tagging (Untagged). Click “Apply”.

2-2. Go to Menu > Advanced Application > VLAN > VLAN Configuration > VLAN Port Setup. Set the PVID. Set port 2 as PVID=20 (VLAN 20). Click “Apply”.

2-3. Create a Static IP Address for Switch in VLAN 20 (To be the gateway in VLAN 20). Go to Menu > Basic Setting > IP Setup > IP Configuration > IP Interface. Set a Static IP Address: 192.168.20.1 for Switch in VLAN 20. Click “Add”.


3.Set the gateway on PC-1 and PC-2

3-1. Set the Gateway of PC-1 as 192.168.10.1 (The Static IP Address of Switch in VLAN 10).

3-2. Set the Gateway of PC-2 as 192.168.20.1 (The Static IP Address of Switch in VLAN 20).


4.Test the Result

4-1. PC-1 can ping PC-2 successfully.


5.What could go wrong

If PC-1 cannot reach PC-2:

a. Verify that the subnet of PC-1 is not using the same subnet as that of PC-2.

b. Verify that the default gateways of PC-1 and PC-2 matches the Switch’s IP interface on their respective VLANs.

c. Make sure that there are no policy routes using the subnet of PC-1 or PC-2 as a destination IP criteria.

Sign In to comment.