Inter-VLAN routing and explore how to configure subinterfaces on router interfaces. This is a crucial topic for network administrators, especially when dealing with segmented LANs. ๐๐
### What is Inter-VLAN Routing? - Inter-VLAN routing allows us to logically segment a Local Area Network (LAN) into different broadcast domains using Virtual Local Area Networks (VLANs). - Each VLAN acts as a separate broadcast domain, enhancing security, simplicity, and flexibility. - However, for communication between VLANs, we need a routing device (usually a router or Layer 3 switch).
### Methods of Inter-VLAN Routing: 1. Traditional Inter-VLAN Routing:
- In this method, we use a router with multiple physical interfaces.
- Each interface connects to a switch, with one interface per VLAN.
- The switch ports connected to the router are set to access mode.
- Each router interface becomes the default gateway for hosts in its associated VLAN.
- When hosts from different VLANs need to communicate, traffic is routed through the router.
- ![Traditional Inter-VLAN Routing](https://www.comparitech.com/wp-content/uploads/2023/12/Traditional-Inter-VLAN-Routing.png)
- Example: If Host A (VLAN 10) wants to send a message to Host B (VLAN 20):
1. Host A checks if the destination IP is in its VLAN.
2. If not, it forwards the traffic to its default gateway (router interface Fa0/0). 3. Host A sends an ARP request to the switch to find the router's MAC address. 4. The frame is unicast to the router, which then routes it to VLAN 20. - Each router interface handles traffic for its connected VLANs.
2. Router-on-a-Stick Inter-VLAN Routing:
- In this approach, we use a single router interface (usually a subinterface).
- The router interface connects to a trunk port on a switch.
- The trunk carries traffic for multiple VLANs.
- The router processes VLAN-tagged frames and routes between VLANs.
- ![Router-on-a-Stick Inter-VLAN Routing](https://www.comparitech.com/wp-content/uploads/2023/12/Router-on-a-Stick-Inter-VLAN-Routing.png)
- Example: Configure a subinterface on the router (e.g., ge-0/0.10 for VLAN 10 and ge-0/0.20 for VLAN 20).
- The router's IP addresses on these subinterfaces serve as default gateways for hosts in their respective VLANs.
3. Multilayer Switch Inter-VLAN Routing:
- Multilayer switches (Layer 3 switches) can perform inter-VLAN routing.
- They have VLAN interfaces and routing capabilities.
- Each VLAN has an associated SVI (Switch Virtual Interface).
- The switch routes traffic between VLANs internally.
- ![Multilayer Switch Inter-VLAN Routing](https://www.comparitech.com/wp-content/uploads/2023/12/Multilayer-Switch-Inter-VLAN-Routing.png)
- Example: Configure SVIs for VLAN 10 and VLAN 20 on the multilayer switch.
- The switch handles inter-VLAN routing without an external router.
### Configuration Steps: 1. Traditional Inter-VLAN Routing:
- Connect router interfaces to switch ports (access mode).
- Assign IP addresses to router interfaces.
- Set each router interface as the default gateway for its VLAN.
2. Router-on-a-Stick Inter-VLAN Routing:
- Configure subinterfaces on the router.
- Assign IP addresses to subinterfaces.
- Set the router's IP addresses as default gateways for VLANs.
3. Multilayer Switch Inter-VLAN Routing:
- Configure SVIs on the multilayer switch.
- Assign IP addresses to SVIs.
- Enable routing on the switch.
Remember, the choice of method depends on your network design and requirements. Happy routing! ๐๐