Sunday, November 16, 2014

Creating Sub interface on a Router (Exam topic 4-H)

Crating a sub interface on a router can be done quickly in a few steps.
A sub interface is required for InterVLAN routing (also known as a Router on a stick)
VLAN routing is done by DOT1Q tagging, you apply your VLAN ID to the sub interface.

In the example below we will create a sub interface for VLAN 10

First step will be to enter Global Configuration mode using the command config t
Then we want to ensure the interface is not in a shutdown state, if so do a no shutdown to bring the interface up
We can also run a few exec commands while in Global config mode by using do in front of the command.  do sh run int fas 0/0 











Next we will create the sub interface by typing int fas 0/0.10 
Yes it is really that simple adding a (.) follow by the sub interface number of your choice, best practice is to keep it consistent with you VLAN ID.
We will also need to apply an IP address to the new interface, this IP will be used as your default-gateway for other devices connected on this VLAN
Apply an IP address using the following command ip address 10.1.10.254 255.255.255.0







Note Depending on the class network your using will impact which octet you use. 
I'm using a class C so I use the 3rd octet for my network, you will keep the 4th octet the same no mater how many sub-interfaces you create i.e 20.254, 30.254, etc

Next we will config the encapsulation using the following command encap dot1q 10
With 10 being the VLAN ID







That's it 3 simple commands and you've created a sub-interface on a router.



No comments:

Post a Comment