Configuration of Router On A Stick - GeeksforGeeks
Configuration of Router On A Stick - GeeksforGeeks
Configuration of Router On A Stick - GeeksforGeeks
Related Articles
Switches divide broadcast domain through VL AN (Vir tual L AN). VL AN is a par titioned
broadcast domain from a single broadcast domain. Switch doesn’t for ward packets
across different VL ANs by itself. If we want to make these vir tual L ANs communicate
Inter VL AN Routing :
Inter VL AN routing is a process in which we make different vir tual L ANs to communicate
with each other irrespective of where the VL ANs are present (on same switch or
different switch). Inter VL AN Routing can be achieved through a layer-3 device i.e.
Router or layer-3 Switch. When the Inter VL AN Routing is done through Router the it is
Router On a Stick :
The Router ’s inter face is divided into sub-inter faces, which acts as a default gateway to
Configuration :
https://www.geeksforgeeks.org/configuration-of-router-on-a-stick/ 1/8
29/01/2021 Configuration of Router on a stick - GeeksforGeeks
Here is a topology in which there is a router and a switch and some end hosts. 2
different VL ANs have been created on the switch. The router ’s inter face is divided into 2
sub-inter faces (as there are 2 different VL ANs) which will acts as a default gateway to
their respective VL ANs. Then router will per form Inter VL AN Routing and the VL ANs
First we will assign IP address to the host PC1 as 192.168.1.10/24, Ser ver
192.168.1.20/24 and the other host PC2 will have IP address 192.168.2.10/24
manually.
Now, we will make sub-inter face of fa0/0 as fa0/0.1 and fa0/0.2 and assign IP
https://www.geeksforgeeks.org/configuration-of-router-on-a-stick/ 2/8
29/01/2021 Configuration of Router on a stick - GeeksforGeeks
NOTE : Here encapsulation type dot1q is used for frame tagging between the 2 different
VL AN. When the switch for wards packet of one VL AN to another, it inser ts a VL AN into
Switch# vlan 2
Switch# name HR_dept
Switch# vlan 3
Switch# name sales_dept
Here, we have assigned VL AN 2 to the specific switch por ts fa0/1, fa0/2 and vlan 3 to
fa0/3 respectively.
NOTE : int range fa0/1-2 command is used as there are more than one host present in a
single VL AN.
Now to check reachability of PC2 from PC1, we will tr y to PING PC2 from PC1.
https://www.geeksforgeeks.org/configuration-of-router-on-a-stick/ 3/8
29/01/2021 Configuration of Router on a stick - GeeksforGeeks
https://www.geeksforgeeks.org/configuration-of-router-on-a-stick/ 4/8
29/01/2021 Configuration of Router on a stick - GeeksforGeeks
https://www.geeksforgeeks.org/configuration-of-router-on-a-stick/ 5/8
29/01/2021 Configuration of Router on a stick - GeeksforGeeks
From the above figures, we see that the packet is delivered to the router by the switch,
because now the broadcast domain have been divided by the different VL ANs present
on the switch therefore, the packet will be delivered to the default gateway (as PC2 is
Attention reader! Don’t stop learning now. Get hold of all the impor tant CS Theor y
concepts for SDE inter views with the CS Theor y Course at a student-friendly price and
its configuration
27, Mar 18
https://www.geeksforgeeks.org/configuration-of-router-on-a-stick/ 6/8
29/01/2021 Configuration of Router on a stick - GeeksforGeeks
30, Apr 18
Like 0
Previous Next
Ar ticle Contributed By :
saurabhsharma56
@saurabhsharma56
https://www.geeksforgeeks.org/configuration-of-router-on-a-stick/ 7/8
29/01/2021 Configuration of Router on a stick - GeeksforGeeks
Writing code in comment? Please use ide.geeksforgeeks.org, generate link and share the link here.
Load Comments
Company Learn
About Us Algorithms
Careers Data Structures
Privacy Policy Languages
Contact Us CS Subjects
Video Tutorials
Practice Contribute
Courses Write an Article
Company-wise Write Interview Experience
Topic-wise Internships
How to begin? Videos