无法ping通网关

网络工程 思科 路由 局域网
2022-02-07 20:45:47

我有两个交换机 cisco 2960(sw-120 和 IDF1-SW)和路由器 cisco 1841(IDF1-R)。

sw-120 上的 fa0/24 通过 IDF1-SW 上的 fa0/7 连接

IDF1-SW 的 fa0/7 和 fa0/24 切换到中继模式

sw-120 的 fa0/24 也切换到中继模式

sw-120 的 fa0/1 切换到访问 vlan 120

路由器(IDF1-R)配置为通过子接口 fa0/1.120 接受来自 vlan 120 的流量

IDF1-R(config-subif)#encapsulation dot1q 120
IDF1-R(config-subif)#ip ad 10.6.1.26 255.255.255.252

笔记本电脑3的配置是

IP : 10.6.1.25   
Subnetmask : 255.255.255.252
Gateway : 10.6.1.26

问题:我无法从笔记本电脑 ping 网关(10.6.1.26)

在此处输入图像描述

在此处输入图像描述

更新

sw-120#show spanning-tree vlan 120
VLAN0120
  Spanning tree enabled protocol ieee
  Root ID    Priority    32888
             Address     0007.EC16.0917
             This bridge is the root
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32888  (priority 32768 sys-id-ext 120)
             Address     0007.EC16.0917
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  20

Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/24           Desg FWD 19        128.24   P2p

sw-120#

更新 2。

这是 IDF1-SW 运行配置 IDF1-SW#sh ru 构建配置...

Current configuration : 1118 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname IDF1-SW
!
!
!
!
!
spanning-tree mode pvst
!
interface FastEthernet0/1
!
interface FastEthernet0/2
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
 switchport access vlan 120
 switchport mode trunk
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
 switchport mode trunk
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
 no ip address
 shutdown
!
!
!
!
line con 0
!
line vty 0 4
 login
line vty 5 15
 login
!
!
end

这是 sw-120 运行配置

sw-120>en
sw-120#sh ru
Building configuration...

Current configuration : 1430 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname sw-120
!
!
!
!
!
spanning-tree mode pvst
!
interface FastEthernet0/1
 switchport access vlan 120
 switchport mode access
!
interface FastEthernet0/2
 switchport access vlan 119
 switchport mode access
!
interface FastEthernet0/3
 switchport access vlan 118
 switchport mode access
!
interface FastEthernet0/4
 switchport access vlan 117
 switchport mode access
!
interface FastEthernet0/5
 switchport access vlan 116
 switchport mode access
!
interface FastEthernet0/6
 switchport access vlan 114
 switchport mode access
!
interface FastEthernet0/7
 switchport access vlan 113
 switchport mode access
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
 switchport mode trunk
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
 no ip address
 shutdown
!
!
!
!
line con 0
!
line vty 0 4
 login
line vty 5 15
 login
!
!
end
1个回答

解决了。解决方案是 VTP 域。您应该创建 VTP 域。IDF1-SW 应处于 vtp-server 模式,sw-120 应处于 vtp-client 模式