How to configure Inter‐VLAN routing (Router‐on‐a‐stick) Router‐on‐a‐stick or Inter‐VLAN routing is a term frequently used to describe a setup up that consists of a router and switch connected using one Ethernet link configured as an 802.1q trunk link. In this setup, the switch is configured with multiple VLANs and the router performs all routing between the different networks/VLANs. While some believe the term 'router‐on‐a‐stick' sounds a bit silly, it's a very popular term and commonly used in networks where no layer‐3 switch exists. LAB Diagram: Networking devices and notes for this LAB 1‐ Cisco Switch WS‐C2960+24TC‐L: 2 Units 2‐ Mikrotik RouterBoard (hAP lite): 1 Unit 3‐ PCs 4‐ UTP Cat6 cables
14
Embed
How to configure Inter‐VLAN routing (Router‐on‐a‐stick ... · How to configure Inter‐VLAN routing (Router‐on‐a‐stick) Router‐on‐a‐stick or Inter‐VLAN routing
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
How to configure Inter‐VLAN routing (Router‐on‐a‐stick)
Router‐on‐a‐stick or Inter‐VLAN routing is a term frequently used to describe a setup up that
consists of a router and switch connected using one Ethernet link configured as an 802.1q trunk link. In this setup, the switch is configured with multiple VLANs and the router performs all routing between the different networks/VLANs.
While some believe the term 'router‐on‐a‐stick' sounds a bit silly, it's a very popular term and commonly used in networks where no layer‐3 switch exists.
LAB Diagram:
Networking devices and notes for this LAB
1‐ Cisco Switch WS‐C2960+24TC‐L: 2 Units
2‐ Mikrotik RouterBoard (hAP lite): 1 Unit
3‐ PCs
4‐ UTP Cat6 cables
5‐ Console cable
Task to be completed 1‐ Configure VLAN
2‐ Configure VTP
3‐ Assign ports to VLANs for switches
4‐ Configure Etherchannel on switches
5‐ Configure Bonding interface on Mikrotik RB
6‐ Enable RSTP for both switches and assign root bridge
7‐ Configure Trunk ports
8‐ Create sub‐interfaces for VLANs on Mikrotik RB
9‐ Configure DHCP on Mikrotik RB for all VLANs
10‐ Challenging Problem (How to offer IP addresses to all VLANs by using DHCP server which is not
running on Mikrotik RB)
Task 1 ‐ Configure VLAN First step is to create the required fives VLANs on our switch 1 named S1 as below VLAN info:
‐ VLAN2 (Building‐A): 192.168.2.0/24
‐ VLAN3 (Building‐B): 192.168.3.0/24
‐ VLAN98 (Native): 192.168.250.0/24
‐ VLAN99 (Management): 192.168.1.0/24
‐ VLAN255 (Server): 192.168.254.0/24
On Switch 1 (S1):
S1# configure terminal
S1(config)# vlan 2
S1(config‐vlan)# name Building‐A
S1(config)# vlan 3
S1(config‐vlan)# name Building‐B
S1(config)# vlan 98
S1(config‐vlan)# name Native
S1(config)# vlan 99
S1(config‐vlan)# name Management
S1(config)# vlan 255
S1(config‐vlan)# name Server
S1(config‐vlan)# exit
S1(config)# int vlan 99
S1(config‐if)# ip add 192.168.1.1 255.255.255.0
S1(config‐if)# no shut
S1(config‐if)# end
Task 2 ‐ Configure VTP
On Switch 1 (S1):
Configure S1 as VTP server
S1# configure terminal
S1(config)# vtp domain sopheary.com
S1(config)# vtp mode server
S1(config)# vtp version 3
S1(config)# vtp password MyvtpSopheary
S1(config)# exit
S1# vtp primary
S1# show vtp status
On Switch 2 (S2):
Configure S2 as VTP client
S2# configure terminal
S2(config)# vtp domain sopheary.com
S2(config)# vtp mode client
S2(config)# vtp version 3
S2(config)# vtp password MyvtpSopheary
S2(config)# exit
S2# show vtp status
S2# configure terminal
S1(config)# int vlan 99
S1(config‐if)# ip add 192.168.1.2 255.255.255.0
S1(config‐if)# no shut
S2(config)# exit
Task 3 – Assign ports to VLANs for switches
On Switch 1 (S1):
Assign the following ports to each VLAN:
‐ Port F0/13, F0/14: VLAN2 (Building‐A)
‐ Port F0/15, F0/16: VLAN3 (Building‐B)
‐ Port F0/17, F0/18: VLAN255 (Server)
‐ Port F0/21, F0/22: VLAN99 (Management)
S1# configure terminal
S1(config)# int range f0/13‐14
S1(config‐if‐range)# switchport mode access
S1(config‐if‐range)# switchport access vlan 2
S1(config‐if‐range)# spanning‐tree portfast
S1(config‐if‐range)# no shutdown
S1(config‐if‐range)# int range f0/15‐16
S1(config‐if‐range)# switchport mode access
S1(config‐if‐range)# switchport access vlan 3
S1(config‐if‐range)# spanning‐tree portfast
S1(config‐if‐range)# no shutdown
S1(config‐if‐range)# int range f0/17‐18
S1(config‐if‐range)# switchport mode access
S1(config‐if‐range)# switchport access vlan 255
S1(config‐if‐range)# spanning‐tree portfast
S1(config‐if‐range)# no shutdown
S1(config‐if‐range)# int range f0/21‐22
S1(config‐if‐range)# switchport mode access
S1(config‐if‐range)# switchport access vlan 99
S1(config‐if‐range)# spanning‐tree portfast
S1(config‐if‐range)# no shutdown
S1(config‐if‐range)# end
S1# show vlan brief
On Switch 2 (S2):
Assign the following ports to each VLAN:
‐ Port F0/13, F0/14: VLAN2 (Building‐A)
‐ Port F0/15, F0/16: VLAN3 (Building‐B)
‐ Port F0/17, F0/18: VLAN255 (Server)
‐ Port F0/21, F0/22: VLAN99 (Management)
S2# configure terminal
S2(config)# int range f0/13‐14
S2(config‐if‐range)# switchport mode access
S2(config‐if‐range)# switchport access vlan 2
S1(config‐if‐range)# spanning‐tree portfast
S2(config‐if‐range)# no shutdown
S2(config‐if‐range)# int range f0/15‐16
S2(config‐if‐range)# switchport mode access
S2(config‐if‐range)# switchport access vlan 3
S1(config‐if‐range)# spanning‐tree portfast
S2(config‐if‐range)# no shutdown
S2(config‐if‐range)# int range f0/17‐18
S2(config‐if‐range)# switchport mode access
S2(config‐if‐range)# switchport access vlan 255
S1(config‐if‐range)# spanning‐tree portfast
S2(config‐if‐range)# no shutdown
S2(config‐if‐range)# int range f0/21‐22
S2(config‐if‐range)# switchport mode access
S2(config‐if‐range)# switchport access vlan 99
S1(config‐if‐range)# spanning‐tree portfast
S2(config‐if‐range)# no shutdown
S2(config‐if‐range)# end
S2# show vlan brief
Task 4 – Configure Etherchannel on switches
On Switch 1 (S1):
The following info will be configured for Etherchannel on S1:
‐ Portchannel1 (Po1)
o F0/1, F0/2, F0/3, F0/4
‐ Portchannel2 (Po2)
o F0/23, F0/24
S1# configure terminal
S1(config)# int range f0/1‐4
S1(config‐if‐range)# switchport mode access
S1(config‐if‐range)# channel‐group 1 mode active
S1(config‐if‐range)# int range f0/23‐24
S1(config‐if‐range)# switchport mode access
S1(config‐if‐range)# channel‐group 1 mode active
S1(config‐if‐range)# end
S1# show etherchannel summary
On Switch 2 (S2):
The following info will be configured for Etherchannel on S2:
‐ Portchannel1 (Po1)
o F0/1, F0/2, F0/3, F0/4
S1# configure terminal
S1(config)# int range f0/1‐4
S1(config‐if‐range)# switchport mode access
S1(config‐if‐range)# channel‐group 1 mode active
S1(config‐if‐range)# end
S1# show etherchannel summary
Task 5 ‐ Configure Bonding interface on Mikrotik RB
On Mikrotik RB:
Create new bonding interface for ether3 and ether4 as below:
Task 6 ‐ Enable RSTP for both switches and assign root bridge
On Switch 1 (S1):
Enable RSTP spanning‐tree and set this switch to be root primary.