Today we are going to configure sub-interfaces on a Cisco router. We will configure the Fast Ethernet port 0/0 on a 1841 router to have two sub interfaces for vlans 1 and 2.
Hostname(config)#interface fastethernet 0/0
Hostname(config-if)#no ip address
Hostname(config-if)#exit
Hostname(config)#interface fastethernet 0/0.1
Hostname(config-if)#ip address 192.168.1.1
Hostname(config-if)#encapsulation dot1q 1 native
Hostname(config-if)#exit
Hostname(config)#interface fastethernet 0/0.2
Hostname(config-if)#ip address 192.168.2.1
Hostname(config-if)#encapsulation dot1q 2
Hostname(config-if)#exit
Please note that the numbers at the end of the encapsulation dot1q x command indicate the vlan that the encapsulation will be active for.
About the Author
Hi I’m Chris Wakefield the owner of ComTech IT Support. I provide Windows, Mac and Linux based IT Support to small businesses in Stirling, Alloa and Falkirk.
Follow @Comtech247 on Twitter
NICELY WRITTEN article.keep up the good work.
This article help me a lot. i didn’t know much about the cisco.
I basically learned about much of this, but however, I still assumed it turned out helpful. Sweet blog!