我有一个设置,它需要两个不同的 VLAN 才能相互 ping 通。我有一个带有 2 层 2 交换机和一个定义了子接口的路由器的设置,并且在我的一生中,我找不到停止 PC 之间 ping 的错误。(由于将来要连接其他PC,我无法卸下路由器和另一台交换机之间的交换机)
我曾多次尝试在棒上配置路由器,重做子接口并中继设备之间的端口,但没有任何效果。
TL:DR - VLAN 50 无法 ping VLAN 80,棒上的路由不起作用
提前致谢
这是路由器的运行配置
Current configuration : 1545 bytes
!
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
ip dhcp pool SERVICEPOOL
network 192.168.50.0 255.255.255.0
default-router 192.168.50.35
ip dhcp pool STUDENTPOOL
dns-server 8.8.8.8
domain-name STUDENTPOOL
ip dhcp pool ADMINPOOL
network 192.168.80.0 255.255.255.0
default-router 192.168.80.254
dns-server 8.8.8.8
!
!
no ip cef
no ipv6 cef
!
!
!
license udi pid CISCO2901/K9 sn FTX1524ETWG-
!
!
ip name-server 8.8.8.8
!
!
spanning-tree mode pvst
!
!
!
interface GigabitEthernet0/0
no ip address
duplex auto
speed auto
shutdown
!
interface GigabitEthernet0/1
ip address 192.168.10.1 255.255.255.0
duplex auto
speed auto
!
interface GigabitEthernet0/1.50
encapsulation dot1Q 50
ip address 192.168.50.1 255.255.255.0
!
interface GigabitEthernet0/1.80
encapsulation dot1Q 80
ip address 192.168.80.1 255.255.255.0
!
interface Serial0/0/0
ip address 192.168.127.9 255.255.255.252
clock rate 2000000
!
interface Serial0/0/1
no ip address
clock rate 2000000
shutdown
!
interface Vlan1
no ip address
shutdown
!
interface Vlan5
no ip address
!
interface Vlan50
no ip address
!
interface Vlan80
no ip address
!
interface Vlan99
ip address 192.168.99.1 255.255.255.0
!
router rip
version 2
passive-interface default
no passive-interface Vlan80
network 192.168.127.0
!
ip classless
!
ip flow-export version 9
!
no cdp run
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
end
这是交换机 A 的运行配置
Current configuration : 2953 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
spanning-tree extend system-id
!
interface FastEthernet0/1
switchport access vlan 50
switchport trunk allowed vlan 1-99
switchport mode access
!
interface FastEthernet0/13
switchport access vlan 80
switchport trunk allowed vlan 1-99
switchport mode access
!
interface GigabitEthernet0/1
switchport access vlan 50
switchport trunk allowed vlan 1-99
switchport mode trunk
spanning-tree portfast trunk
!
interface GigabitEthernet0/2
switchport access vlan 32
switchport trunk allowed vlan 1-99
switchport mode trunk
!
interface Vlan1
ip address 192.168.99.3 255.255.255.0
shutdown
!
interface Vlan5
mac-address 0001.639c.ac61
no ip address
!
interface Vlan50
mac-address 0001.6312.8467
ip address 192.168.50.50 255.255.255.0
!
interface Vlan80
mac-address 0001.64d6.bbc8
ip address 192.168.80.5 255.255.255.0
!
interface Vlan99
mac-address 00e0.b008.e40a
ip address 192.168.99.3 255.255.255.0
!
ip default-gateway 192.168.10.1
!
!
!
line con 0
!
line vty 0 4
login
line vty 5 15
login
!
!
!
!
end
这是开关B
Current configuration : 2905 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
spanning-tree extend system-id
!
interface FastEthernet0/1
switchport access vlan 50
switchport trunk allowed vlan 1-99
switchport mode trunk
!
interface FastEthernet0/13
switchport access vlan 80
switchport trunk allowed vlan 1-99
switchport mode trunk
!
interface GigabitEthernet0/1
switchport trunk allowed vlan 1-99
switchport mode trunk
!
interface GigabitEthernet0/2
switchport access vlan 32
switchport trunk allowed vlan 1-99
switchport mode trunk
!
interface Vlan1
ip address 192.168.99.40 255.255.255.0
!
interface Vlan32
mac-address 00d0.ba11.3e6d
no ip address
!
interface Vlan50
mac-address 000a.f35d.87d7
ip address 192.168.50.25 255.255.255.0
!
interface Vlan80
mac-address 000c.85c0.dcca
ip address 192.168.80.50 255.255.255.0
!
interface Vlan99
description SVI
mac-address 0090.21e6.1388
ip address 192.168.99.2 255.255.255.0
!
ip default-gateway 192.168.10.1
!
!
line con 0
!
line vty 0 4
login
line vty 5 15
login
!
!
end


