You will create a VLAN on SW1. This is common in enterprises where different types of traffic are separated for security and efficiency. In our case we are just creating a single Data VLAN 20.
● Power On, devices LnxPC1, WindowsPC1, SW1, and R1
Connect via console, then enter privileged mode:
Switch> enable Switch# configure terminal Switch(config)# hostname SW1 SW1(config)# |
For Data (VLAN 20):
SW1(config)# vlan 20 SW1(config-vlan)# name Data SW1(config-vlan)# exit |
Set Ports Gi0/0, Gi0/1 and Gi0/2 as Access (for user devices on VLAN 20):
SW1(config)# interface GigabitEthernet 0/0 SW1(config-if)# switchport mode access SW1(config-if)# switchport access vlan 20 SW1(config-if)# exit SW1(config)# interface GigabitEthernet 0/1 SW1(config-if)# switchport mode access SW1(config-if)# switchport access vlan 20 SW1(config-if)# exit SW1(config)# interface GigabitEthernet 0/2 SW1(config-if)# switchport mode access SW1(config-if)# switchport access vlan 20 SW1(config-if)# exit SW1(config)# exit SW1# write memory |
Run:
SW1# show vlan brief |
Expected Output:
Interfaces Gi0/0, Gi0/1 and Gi0/2 assigned to VLAN 20 |
Again verify the PING connectivity from the gateway router R1 to both the WindowsPC1 and the LnxPC1
On R1: