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

image.png

Stage 1


Initial Setup:

  • All switches and routers were in factory default state.
  • Verified VLAN database using show vlan brief โ€“ only default VLANs existed.

๐Ÿ”ง Configuration Steps:

  1. Checked default switchport settings using:

    show interfaces switchport

  2. Configured trunk links between switches:

    interface Gi0/1
    switchport mode trunk
    switchport trunk native vlan 199
    
  3. Configured VTP:

    • On SW1:

      vtp mode server
      vtp domain FLACKBOX
      
    • On SW2:

      vtp mode transparent
      vtp domain FLACKBOX
      
    • On SW3:

      vtp mode client
      vtp domain FLACKBOX
      
  4. Created VLANs on SW1 (VTP Server):

    vlan 10
    name ENG
    vlan 20
    name SALES
    vlan 199
    name NATIVE
    
  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:

    switchport trunk native vlan 199
    
  7. Configured access ports for PCs:

    • Example on SW3:

      int range f0/1 - 2
      switchport mode access
      switchport access vlan 10
      int f0/3
      switchport mode access
      switchport access vlan 20
      
  8. Resolved native VLAN mismatch errors:

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

โœ… Verification:

  • Verified VLANs using: show vlan brief
  • Verified trunk status: show interfaces trunk
  • Checked PC connectivity with ping commands (Eng1 โ†” Eng3, Sales1 โ†” Sales3)

โœ… 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):

      interface FastEthernet0/0
      ip address 10.10.10.1 255.255.255.0
      no shutdown
      
    • FastEthernet0/1 (for Sales VLAN):

      interface FastEthernet0/1
      ip address 10.10.20.1 255.255.255.0
      no shutdown
      

โœ… Both interfaces are UP and functioning


๐Ÿ”ง Switch (SW2) Configuration

  1. VLAN Configuration:

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

      vlan 10
      name ENG
      
      vlan 20
      name Sales
      
  2. Assign VLANs to Ports:

    • Fa0/1 โ†’ VLAN 10 (ENG):

      interface Fa0/1
      switchport mode access
      switchport access vlan 10
      
    • Fa0/2 โ†’ VLAN 20 (Sales):

      interface Fa0/2
      switchport mode access
      switchport access vlan 20
      
  3. Trunk Port Configured:

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

      interface Gig0/1
      switchport trunk native vlan 199
      switchport mode trunk
      

โœ… VLAN interfaces Vlan10 and Vlan20 are up


๐Ÿ“ก Verification Steps

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

    โณ

  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):

      interface FastEthernet0/0.10
      encapsulation dot1Q 10
      ip address 10.10.10.1 255.255.255.0
      
    • For VLAN 20 (Sales):

      interface FastEthernet0/0.20
      encapsulation dot1Q 20
      ip address 10.10.20.1 255.255.255.0
      

โœ… 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:

      vlan 10
      name ENG
      vlan 20
      name Sales
      vlan 199
      name NATIVE
      
  2. Assign Access Ports:

    • Fa0/1 to VLAN 10 (ENG)

      interface Fa0/1
      switchport mode access
      switchport access vlan 10
      
    • Fa0/2 to VLAN 20 (Sales)

      interface Fa0/2
      switchport mode access
      switchport access vlan 20
      
  3. Configure Trunk to Router:

    • Fa0/1 (connected to R1โ€™s Fa0/0) as trunk:

      interface Fa0/1
      switchport trunk encapsulation dot1q
      switchport mode trunk
      switchport trunk allowed vlan 10,20
      

โœ… Trunk operational and forwarding VLAN 10 and 20 traffic

  1. Set Default Gateway on SW2:

    ip default-gateway 10.10.10.1
    

๐Ÿ“ก 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:

  • Basic VLAN Configuration: Established proper VLAN segmentation with VTP configuration across multiple switches
  • Traditional Inter-VLAN Routing: Implemented routing using separate physical interfaces, proving the basic concept of inter-VLAN communication
  • Router-on-a-Stick: Successfully configured and tested a more scalable inter-VLAN routing solution using subinterfaces

Key Learning Outcomes:

  • Understanding of different VTP modes and their impact on VLAN propagation
  • Practical experience with both physical and logical inter-VLAN routing methods
  • Troubleshooting skills for native VLAN mismatches and connectivity issues

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