Inter-VLAN Routing Lab

Published on:

I did this Practice Exercise for CCNA Course ( Neil Anderson )

Stage 1


Initial Setup:


Configuration Steps:

  1. Checked default switchport settings using:

    show interfaces switchport

  2. Configured trunk links between switches:

    BASH
    interface Gi0/1
    switchport mode trunk
    switchport trunk native vlan 199
    Click to expand and view more
  3. Configured VTP:

    • On SW1:

      BASH
      vtp mode server
      vtp domain FLACKBOX
      Click to expand and view more
    • On SW2:

      BASH
      vtp mode transparent
      vtp domain FLACKBOX
      Click to expand and view more
    • On SW3:

      BASH
      vtp mode client
      vtp domain FLACKBOX
      Click to expand and view more
  4. Created VLANs on SW1 (VTP Server):

    BASH
    vlan 10
    name ENG
    vlan 20
    name SALES
    vlan 199
    name NATIVE
    Click to expand and view more
  5. VLAN propagation:

    • Verified VLANs automatically synced to SW3 (Client).
    • SW2 remained unchanged (Transparent mode).
  6. Set trunk native VLAN on all trunk ports for security:

    BASH
    switchport trunk native vlan 199
    Click to expand and view more
  7. Configured access ports for PCs:

    • Example on SW3:

      BASH
      int range f0/1 - 2
      switchport mode access
      switchport access vlan 10
      int f0/3
      switchport mode access
      switchport access vlan 20
      Click to expand and view more
  8. Resolved native VLAN mismatch errors:

    • Matched native VLAN (199) on both sides of trunk links.
    • STP blocking issues resolved.

Verification:


Stage 2: Inter-VLAN Routing - Option 1

Using Separate Physical Interfaces on Router (R1)


Router (R1) Configuration

  1. Enable and assign IP addresses to interfaces:
    • FastEthernet0/0 (for ENG VLAN):

      BASH
      interface FastEthernet0/0
      ip address 10.10.10.1 255.255.255.0
      no shutdown
      Click to expand and view more
    • FastEthernet0/1 (for Sales VLAN):

      BASH
      interface FastEthernet0/1
      ip address 10.10.20.1 255.255.255.0
      no shutdown
      Click to expand and view more

Both interfaces are UP and functioning


Switch (SW2) Configuration

  1. VLAN Configuration:

    • VLAN 10 (ENG) and VLAN 20 (Sales) are already created:

      BASH
      vlan 10
      name ENG
      
      vlan 20
      name Sales
      Click to expand and view more
  2. Assign VLANs to Ports:

    • Fa0/1 → VLAN 10 (ENG):

      BASH
      interface Fa0/1
      switchport mode access
      switchport access vlan 10
      Click to expand and view more
    • Fa0/2 → VLAN 20 (Sales):

      BASH
      interface Fa0/2
      switchport mode access
      switchport access vlan 20
      Click to expand and view more
  3. Trunk Port Configured:

    • Gig0/1 set as trunk with native VLAN 199:

      BASH
      interface Gig0/1
      switchport trunk native vlan 199
      switchport mode trunk
      Click to expand and view more

VLAN interfaces Vlan10 and Vlan20 are up


Verification Steps

  1. Connectivity from Eng1 (Fa0/1) to R1’s VLAN 20 (10.10.20.1)

    (pending)

  2. Connectivity from Eng1 to Sales1 (across VLANs)

    image.png

image.png


image.png

image.png


Stage 3: Inter-VLAN Routing - Option 2

Router-on-a-Stick Configuration


Router (R1) Configuration

  1. Clear Existing IPs on Physical Interface
    • Removed IPs from FastEthernet0/0 to prepare for subinterfaces.
  2. Configure Sub-Interfaces on FastEthernet0/0:
    • For VLAN 10 (ENG):

      BASH
      interface FastEthernet0/0.10
      encapsulation dot1Q 10
      ip address 10.10.10.1 255.255.255.0
      Click to expand and view more
    • For VLAN 20 (Sales):

      BASH
      interface FastEthernet0/0.20
      encapsulation dot1Q 20
      ip address 10.10.20.1 255.255.255.0
      Click to expand and view more

Both sub-interfaces are UP and functional

*FastEthernet0/0 now acts as trunk carrying tagged VLAN traffic*


Switch (SW2) Configuration

  1. VLAN Setup:

    • VLANs already exist:

      BASH
      vlan 10
      name ENG
      vlan 20
      name Sales
      vlan 199
      name NATIVE
      Click to expand and view more
  2. Assign Access Ports:

    • Fa0/1 to VLAN 10 (ENG)

      BASH
      interface Fa0/1
      switchport mode access
      switchport access vlan 10
      Click to expand and view more
    • Fa0/2 to VLAN 20 (Sales)

      BASH
      interface Fa0/2
      switchport mode access
      switchport access vlan 20
      Click to expand and view more
  3. Configure Trunk to Router:

    • Fa0/1 (connected to R1’s Fa0/0) as trunk:

      BASH
      interface Fa0/1
      switchport trunk encapsulation dot1q
      switchport mode trunk
      switchport trunk allowed vlan 10,20
      Click to expand and view more

Trunk operational and forwarding VLAN 10 and 20 traffic

  1. Set Default Gateway on SW2:

    BASH
    ip default-gateway 10.10.10.1
    Click to expand and view more

Verification Steps

  1. PC Eng1 (VLAN 10) should be able to:

    • Ping 10.10.20.1 (R1’s subinterface for VLAN 20)
    • Ping Sales1 PC

    image.png

    Pinging Sales 3 from Eng 1

    image.png

Pinging Eng1 from Sales 1

image.png

Conclusion

This lab successfully demonstrated three critical aspects of VLAN implementation:

Key Learning Outcomes:

All configurations were verified with successful ping tests between VLANs, demonstrating a fully functional network design.

Start searching

Enter keywords to search articles

↑↓
ESC
⌘K Shortcut