Why Inter VLAN Trunk Routing is Not Working – Troubleshooting Guide

routingtrunkvlan

I'm using packet tracer. I have the following configuration :

On switch 2950-24

  • VLAN 99

    • .

    • interface assigned to it is fa 0/1

    • PC 1 has ip 10.10.10.2 with default gateway 10.10.10.3. PC 1 is connected to fa 0/1.
  • VLAN 100

    • .

    • interface assigned to it is fa 0/2

      • PC 2 has ip 10.100.100.2 with default gateway 10.100.100.3. PC 2 is connected to fa 0/2.
  • On the switch, interface fa 0/3 is set to trunk mode

  • Routeur 2621-XM

    • Interface fa 0/0 is up and connected to switch fa 0/3
    • sub interface fa 0/0.2 has ip 10.10.10.3
    • sub interface fa 0/0.3 has ip 10.100.100.3

With all those settings, all lights are green. BUT the problem is that PC1 cannot ping PC 2

Below is an image of the configuration

Immage of my configuration

Below is my Router and switch configuration

Current configuration : 1167 bytes
!
version 12.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch
!
!
!
spanning-tree mode pvst
!
interface FastEthernet0/1
 switchport access vlan 99
 switchport mode access
!
interface FastEthernet0/2
 switchport access vlan 100
 switchport mode access
!
interface FastEthernet0/3
 switchport mode trunk

!
interface Vlan1
 no ip address
 shutdown
!
interface Vlan99
 mac-address 0060.2fbb.3401
 no ip address
!
!
!
!
line con 0
!
line vty 0 4
 login
line vty 5 15
 login
!
!
!
end

And now my router configuration

Current configuration : 752 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname ROUTER
!
!
!
!
!
!
!
!
no ip cef
no ipv6 cef
!
!

interface FastEthernet0/0
 no ip address
 duplex auto
 speed auto
!
interface FastEthernet0/0.2
 encapsulation dot1Q 2
 ip address 10.10.10.3 255.255.255.0
!
interface FastEthernet0/0.3
 encapsulation dot1Q 3
 ip address 10.100.100.3 255.255.255.0
!
interface FastEthernet0/1
 no ip address
 duplex auto
 speed auto
 shutdown
!
interface Serial0/0
 no ip address
 shutdown
!
interface Serial0/1
 no ip address
 shutdown
!
ip classless
!
ip flow-export version 9
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
 login
!
!
!
end

Best Answer

You have mistake in sub-interfaces configuration. As your VLAN ID's is 99 and 100 you should change interface configs respectively:

interface FastEthernet0/0.2
 encapsulation dot1Q 99
 ip address 10.10.10.3 255.255.255.0
!
interface FastEthernet0/0.3
 encapsulation dot1Q 100
 ip address 10.100.100.3 255.255.255.0

And also verify, that you've created VLAN's on switch by entering in enable mode

show vlan

on switch and paste output here.