VLANs (Part 3)
Day 18
Last updated
Day 18
Last updated
There are 2 methods to configure a native VLAN on a router:
Using the command encapsulation dot1q
followed by VLAN id and native
on the router subinterface. This tells the router that this subinterface belongs to the native VLAN.
Configuring an IP address for the native VLAN on the router's physical interface. But first, you may need to delete the subinterface of this VLAN on the router.
A multilayer switch has a lot of advantages over a Layer 2 switch:
It is capable of both switching and routing.
You can assign IP addresses to its interfaces.
You can create virtual interfaces and assign IP addresses to those as well.
You can configure routes, just like a router.
It can be used for inter-VLAN routing, unlike Layer 2 switches.
SVIs (Switch Virtual Interfaces) are virtual interfaces with assigned IP addresses in a multilayer switch. It is used to avoid using a router for inter-VLAN routing. Gateway addresses on PCs should be configured to use the SVI. For the packets destined outside the LAN, a separate subnet is created between the Layer 3 switch and the router. Then a default route pointing to the router is configured on the switch. The command which enables Layer 3 routing on a switch is ip routing
, entered from the global configuration mode. The command to change a switch port (Layer 2) to a routed port (Layer 3) is no switchport
, entered from the interface config mode.
To configure an SVI, first, you need to create one. The command is interface vlan
followed by the VLAN id existing on the switch. Then, assign an IP address and enable the interface with no shutdown
command. SVIs are shut down by default.
Requirements for an SVI to be up/up
:
The VLAN must exist on the switch
The switch must have at least one access or trunk port in the VLAN in an up/up
state
The VLAN must not be shut down
The SVI must not be shut down