VLAN Routing with Layer 2 Switch and Router
VLAN Routing with Layer 2 Switch is done with the help of a Layer 3 device, a router. Mainly, in the router, in layer 3, gateways are created for the VLANs. These gateways are the subinterfaces under the physical interface. For each subinterface, an IP address is assigned.
Our VLAN Routing example topology is below:
Switch Configuration for VLAN Routing
On Huawei switch, firstly we will configure the VLAN interfaces. We will set link-types of this interfaces as access and we will set its default vlan.
We will configure the router face interface of the switch as “trunk” and we will configure it to allow all vlans. If you want to allow only specific VLANs, it allows only these VLANs.