802.1q has VLAN identifier tag that gives the information about which VLAN does the frame belongs. The trunk ports make use of trunk protocols like ISL and dot1q or IEEE 802.1q to transmit the VLAN information between two switches. Trunk ports allow the VLAN data to pass from one switch to another switch. IEEE 802.1q is simply represented as dot1q. Dot1q encapsulation technique is used when VLAN’s are configured. Encapsulation is the process of adding control data when it passes through the layered network. The Fast Ethernet 0/0.1 and Fast Ethernet 0/0.2 indicates two logical interfaces derived from physical interface fast Ethernet 0/0. The configuration of subinterface is same as that of configuring a physical interface.ĬISCO-ROUTER(config)# interface FastEthernet 0/0.1ĬISCO-ROUTER(config-if)# encapsulation dot1q 15ĬISCO-ROUTER(config-if)# ip address 12.31.14.15 255.0.0.0ĬISCO-ROUTER(config)# interface FastEthernet 0/0.2ĬISCO-ROUTER(config-if)# encapsulation dot1q 13ĬISCO-ROUTER(config-if)# ip address 132.26.26.1 255.255.0.0 Once the port is active, we can divide the port logically. The above list of commands makes an inactive Fast Ethernet port active. Hence, Fast Ethernet 0/0 must be made active before dividing the Fast Ethernet interface logically.ĬISCO-ROUTER(config)# interface FastEthernet 0/0 Let us consider an example where we create two sub interfaces or logical interfaces on Fast Ethernet 0/0 port of the router. Before configuring a sub interface, the physical interface that is going to be divided must be turned active or on.
The configuration of a sub interface is same as that of configuring physical interface.
Sub interfaces are used when Virtual Local Area Network (VLAN) is created in the network and inter-VLAN routing is enabled using a router on a stick method. A physical interface can be divided into multiple sub interfaces. Instead of having another router or additional interface cards, it is very easy to divide physical interface into two parts logically.Ī sub interface is the logical division of physical interface.
Imagine a scenario where we have a router with a single interface and the same interface has to connect to two different IP networks. The interface is the point of communication between two devices.