我目前正在对我构建的网络进行故障排除,我遇到了 ping 连接问题,我已经设置了 DHCP 和 DNS,我的终端设备可以从 DHCP 获取 IP,并且我有 intervlan 连接,我的所有终端设备都可以相互 ping,以及我的路由器可以 ping 我的终端设备,但我的 2 个交换机都无法 ping 这些设备中的任何一个。如果有人能告诉我我在配置中忽略了什么,将不胜感激,谢谢!
这是我的路由器配置
hostname ChinaRouter
!
!
!
!
ip dhcp excluded-address 192.168.99.2
!
ip dhcp pool Student
network 192.168.30.0 255.255.255.0
default-router 192.168.30.254
dns-server 192.168.99.2
ip dhcp pool Management
network 192.168.99.0 255.255.255.0
default-router 192.168.99.254
dns-server 192.168.99.2
ip dhcp pool VOIP
network 192.168.10.0 255.255.255.0
default-router 192.168.10.254
option 150 ip 192.168.10.254
dns-server 192.168.99.2
ip dhcp pool Instructor
network 192.168.20.0 255.255.255.0
default-router 192.168.20.254
dns-server 192.168.99.2
!
!
!
ip cef
no ipv6 cef
!
!
!
!
license udi pid CISCO1941/K9 sn FTX15245JP0-
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface GigabitEthernet0/0
no ip address
duplex auto
speed auto
shutdown
!
interface GigabitEthernet0/1
ip address 192.168.0.254 255.255.255.0
duplex auto
speed auto
!
interface GigabitEthernet0/1.10
encapsulation dot1Q 10
ip address 192.168.10.254 255.255.255.0
!
interface GigabitEthernet0/1.20
encapsulation dot1Q 20
ip address 192.168.20.254 255.255.255.0
!
interface GigabitEthernet0/1.30
encapsulation dot1Q 30
ip address 192.168.30.254 255.255.255.0
!
interface GigabitEthernet0/1.99
encapsulation dot1Q 99
ip address 192.168.99.254 255.255.255.0
!
interface Serial0/1/0
no ip address
clock rate 2000000
shutdown
!
interface Serial0/1/1
no ip address
clock rate 2000000
shutdown
!
interface Vlan1
no ip address
shutdown
!
router ospf 1
log-adjacency-changes
passive-interface GigabitEthernet0/0
passive-interface GigabitEthernet0/1
network 192.168.10.0 0.0.0.255 area 0
network 192.168.20.0 0.0.0.255 area 0
network 192.168.30.0 0.0.0.255 area 0
network 192.168.99.0 0.0.0.255 area 0
!
ip classless
!
ip flow-export version 9
!
!
!
no cdp run
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
!
end
这是我的 Switch 1 配置
hostname ChinaSW1
!
!
!
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
interface FastEthernet0/1
description Student PC
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/2
description Student PC
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/3
description Student PC
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/4
description Student PC
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/5
description Student PC
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/6
description Student PC
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/7
description Student PC
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/8
description Student PC
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/9
description Student PC
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/10
description Student PC
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/11
description Student PC
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/12
description Student PC
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/13
description Student PC
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/14
description Student PC
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/15
description Student PC
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/16
description Student PC
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/17
description Student PC
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/18
description Student PC
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/19
description Student PC
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/20
description Student PC
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/21
description VOIP
switchport access vlan 10
switchport mode access
!
interface FastEthernet0/22
description Management PC
switchport access vlan 99
switchport mode access
!
interface FastEthernet0/23
description Trunking
switchport mode trunk
!
interface FastEthernet0/24
description Trunking
switchport mode trunk
!
interface GigabitEthernet0/1
description Connection to router
switchport mode trunk
!
interface GigabitEthernet0/2
description Printer
switchport access vlan 20
switchport mode access
!
interface Vlan1
no ip address
shutdown
!
!
!
!
line con 0
!
line vty 0 4
login
line vty 5 15
login
!
!
!
!
end
这是我的 Switch 2 配置
hostname ChinaSW2
!
!
!
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
interface FastEthernet0/1
description Student PC
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/2
description Student PC
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/3
description Student PC
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/4
description Student PC
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/5
description Student PC
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/6
description Student PC
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/7
description Student PC
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/8
description Student PC
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/9
description Student PC
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/10
description Student PC
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/11
description Student PC
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/12
description Student PC
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/13
description Student PC
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/14
description Student PC
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/15
description Student PC
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/16
description Student PC
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/17
description Student PC
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/18
description Student PC
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/19
description Student PC
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/20
description Student PC
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/21
description VOIP
switchport access vlan 10
switchport mode access
!
interface FastEthernet0/22
description Management PC
switchport access vlan 99
switchport mode access
!
interface FastEthernet0/23
description Trunking
switchport mode trunk
!
interface FastEthernet0/24
description Trunking
switchport mode trunk
!
interface GigabitEthernet0/1
description Connection to router
switchport mode trunk
!
interface GigabitEthernet0/2
description Printer
switchport access vlan 20
switchport mode access
!
interface Vlan1
no ip address
shutdown
!
ip default-gateway 192.168.0.254
!
!
!
!
line con 0
!
line vty 0 4
login
line vty 5 15
login
!
!
!
!
end