Friday, April 5, 2024

Cisco 105 - Initial VLAN Trunk sub-interfaces

(config)#int g0/0
(config-if)#no shutdown
(config-if)#int g0/0.10
(config-subif)#encapsulation dot1q 10
(config-subif)#ip address 192.168.1.62 255.255.255.192
^ Sets IP address of sub-interface and uses VLAN 10
Any arriving frames tagged with Vlan 10 will be treated as if they arrived on this sub-interface
Also, any frames sent via this sub-interface will be tagged with Vlan 10

; Now sub-interface g0/0.20

(config-subif)#int g0/0.20
(config-subif)#encapsulation dot1q 20
(config-subif)#ip address 192.168.1.126 255.255.255.192

; Now sub-interface g0/0.30

(config-subif)#int g0/0.30
(config-subif)#encapsulation dot1q 30
(config-subif)#ip address 192.168.1.190 255.255.255.192

#show ip int brief
^
This shows the newly defined sub-interfaces as well as their IP addresses

#show ip route
^
This shows the “directly connected” networks just like regular interfaces


[These are my notes from Jeremy's excellent CCNA course which can be viewed here.]