Sub Interface
Sub interface in a cisco router is to configure the VLAN ID specific interface of the main interface.
1 main interface can have multiple sub interface. To configure sub interface (assuming the main interface is FastEthernet0/0
, we can do)
> config
> int FastEthernet0/0.x
In which x
is in the range of 1 - 4,294,967,295
Normally we name x
as the same name of VLAN ID. You can technically name it anything but this is by convention
So the full vlanid configuration can be as follows:
> config
> int FastEthernet0/0.3 # assuming we configure for vlan id 3
> encapsulation dot1q 3 # this number has to be the number of vlan id
> ip address 192.168.3.1 255.255.255.0 # this is to configure the router ip for vlan id 3
> no shutdown
> exit