在 Packet Tracer 上对 Trunk 和 STP 配置进行故障排除感到迷茫

网络工程 思科 交换 生成树 树干 数据包跟踪器
2022-02-14 14:49:21

在此处输入图像描述我无法识别错误或我在此网络上的配置中缺少什么,如果你们中的任何人愿意检查它,这是链接PacketTracerFile 我无法从任何 PC ping 到路由器,也无法从任何交换机到任何路由器的用户名和密码对于所有设备都是相同的。用户名:亚当密码:1234

提前致谢

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

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
2个回答

好的,您的问题是您尝试在路由器上进行路由,并且您在路由器上配置了 VLAN 接口,但您没有将 VLAN 从分布交换机中继到路由器:

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

路由器的链接应该是这样的:

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
!

这会将所有 VLAN 中继到路由器,以便数据包可以从一个 VLAN 路由到另一个 VLAN。

此外,在您的交换机上,由于您在路由器上进行路由,它们将是第 2 层交换机,因此您需要删除除用于交换机管理的 SVI 之外的所有 SVI:

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

如果您在一个 VLAN 上有 DHCP 服务器,则需要在所有其他 VLAN 上安装 DHCP 中继。这应该在路由器 VLAN 接口上完成:

ip helper-address <dhcp server address>

首先,我认为这是一个考试而不是问题,IPs vlsm 方案和生成树配置就是证明,无论如何。

1- 路由器和分布 SW 之间的链路必须配置为中继链路。

2- PC的网关必须配置相同的接口VLAN的IP

3- 对于上面的小型拓扑,最好将分布 SW 配置为 VLAN 的根交换机。

4 为所有 SW 1,2 和 3 配置默认网关到分发 SW。

5- 将以太通道重新配置为 LACP 或 PAGP。