Professional Documents
Culture Documents
Itnet 2 - Routing Vlan Reviewer
Itnet 2 - Routing Vlan Reviewer
Here's a basic example of how you might configure routing for two VLANs (VLAN 10 and VLAN 20) on a
layer 3 switch:
DEFAULT GATEWAY:
VLAN 10 – 192.168.10.1
VLAN 20 – 192.168.20.1
Switch(config)# vlan 10
Switch(config-vlan)# name VLAN10
Switch(config-vlan)# exit
Switch(config)# vlan 20
Switch(config-vlan)# name VLAN20
Switch(config-vlan)# exit
Switch(config)# ip routing
To configure routing for VLANs and assign VLANs to interfaces on a layer 3 switch, you'll need to create
VLANs, configure SVIs for inter-VLAN routing, and assign VLANs to switch interfaces.
Switch(config)# vlan 10
pg. 1
Networking 2- routing vlan & subnetting reviewer
Switch(config)# vlan 20
Switch(config-vlan)# name VLAN20
Switch(config-vlan)# exit
Switch(config)# ip routing
In this configuration:
Two VLANs are created: VLAN 10 and VLAN 20.
SVIs are configured for each VLAN with IP addresses assigned to each.
IP routing is enabled to allow the switch to route traffic between the VLANs.
Interfaces GigabitEthernet0/1 and GigabitEthernet0/2 are assigned to VLAN 10 and VLAN 20,
respectively, using access mode.
Make sure to replace GigabitEthernet0/1 and GigabitEthernet0/2 with the actual interface names on your
switch.
With this configuration, devices connected to interface GigabitEthernet0/1 will be part of VLAN 10 and
will communicate using the IP subnet 192.168.10.0/24, while devices connected to interface
GigabitEthernet0/2 will be part of VLAN 20 and will communicate using the IP subnet 192.168.20.0/24.
Inter-VLAN routing will be handled by the switch, allowing communication between devices in different
VLANs.
To configure routing for VLANs, assign VLANs to interfaces, and enable trunking on a layer 3 switch, you'll
need to create VLANs, configure SVIs for inter-VLAN routing, assign VLANs to switch interfaces, and enable
trunking on interfaces connected to other switches or routers.
Switch(config)# vlan 10
Switch(config-vlan)# name VLAN10
Switch(config-vlan)# exit
pg. 2
Networking 2- routing vlan & subnetting reviewer
Switch(config)# vlan 20
Switch(config-vlan)# name VLAN20
Switch(config-vlan)# exit
Switch(config)# ip routing
In this configuration:
Two VLANs are created: VLAN 10 and VLAN 20.
SVIs are configured for each VLAN with IP addresses assigned to each for inter-VLAN routing.
IP routing is enabled to allow the switch to route traffic between the VLANs.
Interfaces GigabitEthernet0/1 and GigabitEthernet0/2 are assigned to VLAN 10 and VLAN 20,
respectively, using access mode.
Interface GigabitEthernet0/3 is configured as a trunk port to allow traffic from both VLANs to pass
through.
Make sure to replace GigabitEthernet0/1, GigabitEthernet0/2, and GigabitEthernet0/3 with the actual
interface names on your switch.
With this configuration, devices connected to interfaces GigabitEthernet0/1 and GigabitEthernet0/2 will be
part of VLAN 10 and VLAN 20, respectively, and devices connected to interface GigabitEthernet0/3 will
be able to pass traffic from both VLANs. Inter-VLAN routing will be handled by the switch, allowing
communication between devices in different VLANs.
pg. 3