[Day 9] 7. Inter-VLAN Connection
Inter-VLAN Routing (Router-on-a-Stick Configuration)
Explanation:
Inter-VLAN routing is necessary when devices in different VLANs need to communicate. This is achieved by using a router to route traffic between VLANs. A common method for implementing this is known as Router-on-a-Stick.
In a Router-on-a-Stick configuration, the router uses a single physical interface (such as FastEthernet 0/0) to handle traffic for multiple VLANs. To enable this, we create sub-interfaces on the router, each of which is associated with a specific VLAN.
- Each sub-interface acts as a virtual interface for a particular VLAN.
- Sub-interfaces allow the router to communicate with multiple VLANs through a single physical interface.
- The VLAN information is encapsulated (tagged) using 802.1Q or ISL.
Router Configuration Steps:
-
Create a sub-interface for the desired VLAN:
bashR1(config)# int fa0.2 -
Assign an IP address to the sub-interface (for the corresponding VLAN):
bashR1(config-if)# ip address 172.16.10.1 255.255.255.0 -
Configure encapsulation for the VLAN (using 802.1Q or ISL):
-
For 802.1Q:
bashR1(config-if)# encapsulation dot1q 2 -
For ISL:
bashR1(config-if)# encapsulation isl 2
-
Monitoring Commands:
-
: Displays information about the VLANs configured on the switch.
show vlan -
: Shows a concise summary of the VLANs on the switch.
show vlan brief -
: Displays trunk link status and VLANs allowed on trunk interfaces.
show int trunk -
: Lists the MAC addresses learned on each switch port.
show mac-address table -
: Displays the status of the VTP (VLAN Trunking Protocol) on the switch, including domain name and mode.
show vtp status
Read Next
[Day 9] 8. IPv4 Header
### **Breakdown of an IPv4 Header (20 bytes)** 1. **Version (4 bits)**: - Specifies the IP version (IPv4 = 4, IPv6 = 6). - **Size**...
[Day 10] 1. Access Control List (ACL)
An **Access Control List (ACL)** is a set of rules configured on a router to filter and control the flow of network traffic based on specified criteri...