Troubleshooting Trunk and STP Configurations on Packet Tracer

ciscopacket-tracerspanning treeswitchingtrunk

enter image description hereI couldn't identify the mistake or what I have missing in the configuration on this network, if anyone of you is welling to check it out this is the link PacketTracerFile
I could not ping from any PC to the router and neither from any switch to any router
the username and password are the same for all devices.
username: adam
password: 1234

thanks in advance

===============================================================

Router0#sh ru
Building configuration...

Current configuration : 3075 bytes
!
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
service password-encryption
!
hostname Router0
!
!
!
enable secret 5 $1$mERr$4dpRATIgxQacPVK0CfNV4/
!
!
!
!
!
!
no ip cef
no ipv6 cef
!
!
!
username adam privilege 15 secret 5 $1$mERr$4dpRATIgxQacPVK0CfNV4/
!
!
license udi pid CISCO2901/K9 sn FTX1524B6P2
!
!
!
!
!
!
!
!
!
no ip domain-lookup
ip domain-name 19HyperMarket_Sdn._Bhd.
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface Loopback0
 ip address 1.1.1.1 255.255.255.0
!
interface GigabitEthernet0/0
 description Local Network Link
 no ip address
 duplex auto
 speed 1000
!
interface GigabitEthernet0/0.10
 description Connection to Sales VLAN
 encapsulation dot1Q 10
 ip address 172.22.128.1 255.255.255.0
!
interface GigabitEthernet0/0.20
 description Connection to Finance VLAN
 encapsulation dot1Q 20
 ip address 172.22.129.1 255.255.255.192
!
interface GigabitEthernet0/0.30
 description Connection to Admin VLAN
 encapsulation dot1Q 30
 ip address 172.22.129.65 255.255.255.224
!
interface GigabitEthernet0/0.40
 description Connection to IT VLAN
 encapsulation dot1Q 40
 ip address 172.22.129.97 255.255.255.224
!
interface GigabitEthernet0/0.50
 description Connection to Inventory & Delivery VLAN
 encapsulation dot1Q 50
 ip address 172.22.129.129 255.255.255.224
!
interface GigabitEthernet0/0.99
 description Connection to Management VLAN
 encapsulation dot1Q 99 native
 ip address 172.22.129.161 255.255.255.240
!
interface GigabitEthernet0/1
 no ip address
 duplex auto
 speed auto
 shutdown
!
interface Vlan1
 no ip address
 shutdown
!
ip classless
!
ip flow-export version 9
!
!
!
banner motd ^C


^C
!
!
!
!
line con 0
 logging synchronous
 login local
!
line aux 0
!
line vty 0 4
 login local
 transport input ssh
line vty 5 15
 login local
 transport input ssh
!
!
!
end
============================================================================================
Dist_Switch#sh ru
Building configuration...

Current configuration : 5190 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
service password-encryption
!
hostname Dist_Switch
!
!
!
no ip domain-lookup
ip domain-name 19HyperMarket_Sdn._Bhd.
!
username adam secret 5 $1$mERr$4dpRATIgxQacPVK0CfNV4/
!
!
spanning-tree mode pvst
spanning-tree vlan 10,20,30,40,50,99 priority 24576
!
interface Port-channel 1
 switchport trunk native vlan 99
 switchport mode trunk
!
interface Port-channel 2
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/1
 switchport trunk native vlan 99
 switchport mode trunk
 channel-group 1 mode active
!
interface FastEthernet0/2
 switchport trunk native vlan 99
 switchport mode trunk
 channel-group 1 mode active
!
interface FastEthernet0/3
 switchport trunk native vlan 99
 switchport mode trunk
 channel-group 2 mode desirable
!
interface FastEthernet0/4
 switchport trunk native vlan 99
 switchport mode trunk
 channel-group 2 mode desirable
!
interface FastEthernet0/5
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/6
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/7
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/8
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/9
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/10
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/11
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/12
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/13
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/14
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/15
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/16
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/17
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/18
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/19
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/20
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/21
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/22
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/23
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/24
 description These ports have been disabled
 shutdown
!
interface GigabitEthernet0/1
 switchport access vlan 99
 switchport mode access
 switchport port-security
 switchport port-security maximum 3
 switchport port-security mac-address sticky 
 switchport port-security mac-address sticky 0090.2B83.CC01
 speed 1000
!
interface GigabitEthernet0/2
 shutdown
!
interface Vlan1
 no ip address
 shutdown
!
interface Vlan10
 description Sales Department Network
 mac-address 00e0.8fd5.2b01
 ip address 172.22.128.2 255.255.255.0
!
interface Vlan20
 description Finance Department Network
 mac-address 00e0.8fd5.2b02
 ip address 172.22.129.2 255.255.255.192
!
interface Vlan30
 description Admin Department Network
 mac-address 00e0.8fd5.2b03
 ip address 172.22.129.66 255.255.255.224
!
interface Vlan40
 description IT Department Network
 mac-address 00e0.8fd5.2b04
 ip address 172.22.129.98 255.255.255.224
!
interface Vlan50
 description Inventory Department Network
 mac-address 00e0.8fd5.2b05
 ip address 172.22.129.130 255.255.255.224
!
interface Vlan99
 description Management Department Network
 mac-address 00e0.8fd5.2b06
 ip address 172.22.129.162 255.255.255.240
!
ip default-gateway 172.22.129.161
!
banner motd ^C


^C
!
!
!
line con 0
 logging synchronous
 login local
!
line vty 0 4
 login local
 transport input ssh
line vty 5 15
 login local
 transport input ssh
!
!
!
end
======================================================================================
Switch_1#sh ru
Building configuration...

Current configuration : 5425 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
service password-encryption
!
hostname Switch_1
!
!
!
no ip domain-lookup
ip domain-name 19HyperMarket_Sdn._Bhd.
!
username adam secret 5 $1$mERr$4dpRATIgxQacPVK0CfNV4/
!
!
spanning-tree mode pvst
!
interface Port-channel 1
 switchport trunk native vlan 99
 switchport mode trunk
!
interface Port-channel 2
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/1
 switchport trunk native vlan 99
 switchport mode trunk
 channel-group 1 mode desirable
!
interface FastEthernet0/2
 switchport trunk native vlan 99
 switchport mode trunk
 channel-group 1 mode desirable
!
interface FastEthernet0/3
 switchport trunk native vlan 99
 switchport mode trunk
 channel-group 2 mode desirable
!
interface FastEthernet0/4
 switchport trunk native vlan 99
 switchport mode trunk
 channel-group 2 mode desirable
!
interface FastEthernet0/5
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/6
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/7
 description Sales Department PC1
 switchport access vlan 10
 switchport mode access
 switchport port-security
 switchport port-security maximum 3
 switchport port-security mac-address sticky 
 switchport port-security violation restrict 
 switchport port-security mac-address sticky 0040.0B63.3A4A
!
interface FastEthernet0/8
 description Inventory & Delivery Department PC1
 switchport access vlan 50
 switchport mode access
 switchport port-security
 switchport port-security maximum 3
 switchport port-security mac-address sticky 
 switchport port-security violation restrict 
 switchport port-security mac-address sticky 0001.C773.632D
!
interface FastEthernet0/9
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/10
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/11
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/12
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/13
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/14
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/15
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/16
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/17
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/18
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/19
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/20
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/21
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/22
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/23
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/24
 description These ports have been disabled
 shutdown
!
interface GigabitEthernet0/1
 shutdown
!
interface GigabitEthernet0/2
 shutdown
!
interface Vlan1
 no ip address
 shutdown
!
interface Vlan10
 description Sales Department Network
 mac-address 0003.e47d.b701
 ip address 172.22.128.3 255.255.255.0
!
interface Vlan20
 description Finance Department Network
 mac-address 0003.e47d.b702
 ip address 172.22.129.3 255.255.255.192
!
interface Vlan30
 description Admin Department Network
 mac-address 0003.e47d.b703
 ip address 172.22.129.67 255.255.255.224
!
interface Vlan40
 description IT Department Network
 mac-address 0003.e47d.b704
 ip address 172.22.129.99 255.255.255.224
!
interface Vlan50
 description Inventory Department Network
 mac-address 0003.e47d.b705
 ip address 172.22.129.131 255.255.255.224
!
interface Vlan99
 description Management Department Network
 mac-address 0003.e47d.b706
 ip address 172.22.129.163 255.255.255.240
!
ip default-gateway 172.22.129.161
!
banner motd ^C



^C
!
!
!
line con 0
 logging synchronous
 login local
!
line vty 0 4
 login local
 transport input ssh
line vty 5 15
 login local
 transport input ssh
!
!
!
end
======================================================================================
Switch_2#sh ru
Building configuration...

Current configuration : 5406 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
service password-encryption
!
hostname Switch_2
!
!
!
no ip domain-lookup
ip domain-name 19HyperMarket_Sdn._Bhd.
!
username adam secret 5 $1$mERr$4dpRATIgxQacPVK0CfNV4/
!
!
spanning-tree mode pvst
!
interface Port-channel 1
 switchport trunk native vlan 99
 switchport mode trunk
!
interface Port-channel 2
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/1
 switchport trunk native vlan 99
 switchport mode trunk
 channel-group 1 mode desirable
!
interface FastEthernet0/2
 switchport trunk native vlan 99
 switchport mode trunk
 channel-group 1 mode desirable
!
interface FastEthernet0/3
 switchport trunk native vlan 99
 switchport mode trunk
 channel-group 2 mode desirable
!
interface FastEthernet0/4
 switchport trunk native vlan 99
 switchport mode trunk
 channel-group 2 mode desirable
!
interface FastEthernet0/5
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/6
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/7
 description IT Department PC
 switchport access vlan 40
 switchport mode access
 switchport port-security
 switchport port-security maximum 3
 switchport port-security mac-address sticky 
 switchport port-security violation restrict 
 switchport port-security mac-address sticky 00D0.FF79.7B05
!
interface FastEthernet0/8
 description Admin Department PC
 switchport access vlan 30
 switchport mode access
 switchport port-security
 switchport port-security maximum 3
 switchport port-security mac-address sticky 
 switchport port-security violation restrict 
 switchport port-security mac-address sticky 00D0.97EA.EBA3
!
interface FastEthernet0/9
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/10
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/11
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/12
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/13
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/14
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/15
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/16
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/17
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/18
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/19
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/20
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/21
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/22
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/23
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/24
 description These ports have been disabled
 shutdown
!
interface GigabitEthernet0/1
 shutdown
!
interface GigabitEthernet0/2
 shutdown
!
interface Vlan1
 no ip address
 shutdown
!
interface Vlan10
 description Sales Department Network
 mac-address 0060.3e3d.4701
 ip address 172.22.128.4 255.255.255.0
!
interface Vlan20
 description Finance Department Network
 mac-address 0060.3e3d.4702
 ip address 172.22.129.4 255.255.255.192
!
interface Vlan30
 description Admin Department Network
 mac-address 0060.3e3d.4703
 ip address 172.22.129.68 255.255.255.224
!
interface Vlan40
 description IT Department Network
 mac-address 0060.3e3d.4704
 ip address 172.22.129.100 255.255.255.224
!
interface Vlan50
 description Inventory Department Network
 mac-address 0060.3e3d.4705
 ip address 172.22.129.132 255.255.255.224
!
interface Vlan99
 description Management Department Network
 mac-address 0060.3e3d.4706
 ip address 172.22.129.164 255.255.255.240
!
ip default-gateway 172.22.129.161
!
banner motd ^C



^C
!
!
!
line con 0
 logging synchronous
 login local
!
line vty 0 4
 login local
 transport input ssh
line vty 5 15
 login local
 transport input ssh
!
!
!
end
=======================================================================================
Switch_3#sh ru
Building configuration...

Current configuration : 5726 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
service password-encryption
!
hostname Switch_3
!
!
!
no ip domain-lookup
ip domain-name 19HyperMarket_Sdn._Bhd.
!
username adam secret 5 $1$mERr$4dpRATIgxQacPVK0CfNV4/
!
!
spanning-tree mode pvst
!
interface Port-channel 1
 switchport trunk native vlan 99
 switchport mode trunk
!
interface Port-channel 2
 switchport trunk native vlan 99
 switchport mode trunk
!
interface FastEthernet0/1
 switchport trunk native vlan 99
 switchport mode trunk
 channel-group 1 mode desirable
!
interface FastEthernet0/2
 switchport trunk native vlan 99
 switchport mode trunk
 channel-group 1 mode desirable
!
interface FastEthernet0/3
 switchport trunk native vlan 99
 switchport mode trunk
 channel-group 2 mode desirable
!
interface FastEthernet0/4
 switchport trunk native vlan 99
 switchport mode trunk
 channel-group 2 mode desirable
!
interface FastEthernet0/5
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/6
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/7
 description Cashier Interface
 switchport access vlan 20
 switchport mode access
 switchport port-security
 switchport port-security mac-address sticky 
 switchport port-security mac-address sticky 0001.4245.4C16
 speed 10
!
interface FastEthernet0/8
 description Finance Department PC1
 switchport access vlan 20
 switchport mode access
 switchport port-security
 switchport port-security maximum 2
 switchport port-security mac-address sticky 
 switchport port-security violation protect 
 switchport port-security mac-address sticky 00E0.B077.4728
!
interface FastEthernet0/9
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/10
 description These ports have been disabled
 switchport mode access
 shutdown
!
interface FastEthernet0/11
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/12
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/13
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/14
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/15
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/16
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/17
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/18
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/19
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/20
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/21
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/22
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/23
 description These ports have been disabled
 shutdown
!
interface FastEthernet0/24
 description These ports have been disabled
 shutdown
!
interface GigabitEthernet0/1
 switchport port-security violation protect 
 shutdown
!
interface GigabitEthernet0/2
 description File Server Port
 switchport access vlan 20
 switchport mode access
 switchport port-security
 switchport port-security mac-address sticky 
 switchport port-security violation protect 
 switchport port-security mac-address sticky 00E0.B028.929A
!
interface Vlan1
 no ip address
 shutdown
!
interface Vlan10
 description Sales Department Network
 mac-address 0030.f2e3.ba01
 ip address 172.22.128.5 255.255.255.0
!
interface Vlan20
 description Finance Department Network
 mac-address 0030.f2e3.ba02
 ip address 172.22.129.5 255.255.255.192
!
interface Vlan30
 description Admin Department Network
 mac-address 0030.f2e3.ba03
 ip address 172.22.129.69 255.255.255.224
!
interface Vlan40
 description IT Department Network
 mac-address 0030.f2e3.ba04
 ip address 172.22.129.101 255.255.255.224
!
interface Vlan50
 description Inventory Department Network
 mac-address 0030.f2e3.ba05
 ip address 172.22.129.133 255.255.255.224
!
interface Vlan77
 mac-address 0030.f2e3.ba06
 no ip address
 shutdown
!
interface Vlan99
 description Management Department Network
 mac-address 0030.f2e3.ba07
 ip address 172.22.129.165 255.255.255.240
!
ip default-gateway 172.22.129.161
!
banner motd ^C



^C
!
!
!
line con 0
 logging synchronous
 login local
!
line vty 0 4
 login local
 transport input ssh
line vty 5 15
 login local
 transport input ssh
!
!
!
end

Best Answer

OK, your problem is that you are trying to route on the router, and you have the VLAN interfaces configured on the router, but you are not trunking the VLANs to the router from the distribution switch:

interface GigabitEthernet0/1
 switchport access vlan 99
 switchport mode access
!

What the link to the router should look like is:

interface GigabitEthernet0/1
 description Connection to Router0 GigabitEthernet0/0
 switchport trunk encapsulation dot1Q ! some switches don't want this, but it is required for some
 switchport mode trunk
!

This will trunk all the VLANs to the router so that packets can be routed from one VLAN to another VLAN.

Also, on your switches, since they will be layer-2 switches because you are routing on the router, you need to remove all the SVIs except for the one for switch management:

no interface Vlan10
!
no interface Vlan20
!
no interface Vlan30
!
no interface Vlan40
!
no interface Vlan50
!

If you have a DHCP server on one VLAN, you will need to put in a DHCP relay on all the other VLANs. This should be done on the router VLAN interfaces:

ip helper-address <dhcp server address>