用完想法来解决 Ping 问题 Cisco IOS 3560 交换机

网络工程 转变 思科-ios 故障排除
2021-07-19 16:01:43

概括

昨天,八个系统中的四个(连接到相同的 VLAN,相同的以太网适配器设置)能够 ping tweakers.net今天,另一个系统无法 ping 互联网了。

由于系统站点已被广泛调查,因此可能怀疑 Cisco 交换机并对其进行了分析(请参阅Switch analysis section问题),但问题仍然存在。

现状:阅读了 这个关于数据包嗅探的问答

问题:当某些系统可以 ping 互联网而其他系统不能 ping 时,可以执行哪些进一步的步骤来调试,而以太网适配器是相同的并且它们连接到相同的 VLAN?


开关分析

ARP

Switch>sh arp
Protocol  Address          Age (min)  Hardware Addr   Type   Interface
Internet  10.10.10.2            147   Y               ARPA   VlanNum

MAC地址表

Switch>sh mac address-table
          Mac Address Table
-------------------------------------------

Vlan    Mac Address       Type        Ports
----    -----------       --------    -----
 Num    Y                 DYNAMIC     Gi0/Z

虚拟局域网

Switch>sh vl

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    
Num  VLAN0Num                         active    Gi0/Z

VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1    enet  ...        1500  -      -      -        -    -        0      0
Num  enet  ...        1500  -      -      -        -    -        0      0

Remote SPAN VLANs
------------------------------------------------------------------------------

Primary Secondary Type              Ports
------- --------- ----------------- ------------------------------------------

运行配置

Switch>sh run

interface GigabitEthernet0/Z
 switchport access vlan Num
 switchport mode access
 switchport nonegotiate
!

IP接口

Switch>sh ip int br
Interface              IP-Address      OK? Method Status                Protocol
Vlan1                  X               YES NVRAM  up                    up
VlanNum                10.10.10.1      YES NVRAM  up                    up
GigabitEthernet0/Z     unassigned      YES unset  up                    up

界面

Switch>show interface Gi0/Z
GigabitEthernet0/Z is up, line protocol is up (connected)
  Hardware is Gigabit Ethernet, address is MAC (bia MAC)
  MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation ARPA, loopback not set
  Keepalive set (10 sec)
  Full-duplex, 1000Mb/s, media type is 10/100/1000BaseTX
  input flow-control is off, output flow-control is unsupported
  ARP type: ARPA, ARP Timeout 04:00:00
  Last input never, output 00:00:00, output hang never
  Last clearing of "show interface" counters never
  Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 669
  Queueing strategy: fifo
  Output queue: 0/40 (size/max)
  5 minute input rate 248000 bits/sec, 34 packets/sec
  5 minute output rate 516000 bits/sec, 51 packets/sec
     6069964 packets input, 2943921646 bytes, 0 no buffer
     Received 99 broadcasts (56 multicasts)
     0 runts, 0 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     0 watchdog, 56 multicast, 88133 pause input
     0 input packets with dribble condition detected
     8562995 packets output, 4951152227 bytes, 0 underruns
     0 output errors, 0 collisions, 1 interface resets
     0 babbles, 0 late collision, 0 deferred
     0 lost carrier, 0 no carrier, 0 PAUSE output
     0 output buffer failures, 0 output buffers swapped out
2个回答

如果您想捕获数据包并使用数据包嗅探器(例如,wireshark)分析它们,Cisco IOS 的正确搜索词是 SPAN(交换端口分析器)。请参阅 Cisco 的此文档

关于您的问题:我认为您不会在日志中找到任何内容。

我将开始检查 System1 所连接的端口是否仍处于活动状态,并且确实仍在访问正确的 vlan。显示运行

sh ip int briefshow interface将是我的首选。检查是否有任何错误计数器 > 0。

系统本身也可能存在一些问题。检查 ip 设置、代理、DNS,...(再次)。Ping 默认网关和系统 2 并检查 arp 解析是否有效。

如果您能够从计算机 ping 默认网关,那么交换机就完成了它的工作并且正在转发数据包。我认为您应该继续对默认网关路由器而不是交换机的配置进行故障排除。

检查路由器 NAT 配置,更具体地说是确定哪些源 IP 地址到 NAT 的访问列表。我过去曾看到过由 NAT 访问列表引起的类似问题:

ip access-list extended ACL-NAT-HOSTS
 permit ip 10.10.10.0 0.0.0.**15** any

当它应该被配置时:

ip access-list extended ACL-NAT-HOSTS
 permit ip 10.10.10.0 0.0.0.**255** any

因此只允许来自网络的前 15 台服务器(IP 地址为 10.10.10.1 - 10.10.10.14)访问互联网。