switch老化时间过长导致主机不通解决一例

本文详细介绍了在网络环境中遇到一台设备能ping通另一台设备,但另一台设备无法ping通,并且得到的mac地址不同的情况。通过使用Cisco交换机命令进行arp表检查和mac地址表查询,发现mac地址老化时间设置导致的问题,并最终通过调整老化时间解决此问题。

分类:

一台switch上能ping通,另一台不能ping通,得到的mac address也和另外一台不同。

Core-3750-1#ping 172.16.86.47

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 172.16.86.47, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/9 ms

Core-3750-1#sh ip arp | in 172.16.86.47

Internet  172.16.86.47            0   984b.e16b.5315  ARPA   Vlan86

Core-3750-1#sh mac address-table | in 984b.e16b.5315

  86    984b.e16b.5315    DYNAMIC     Gi1/0/4

 

Core-3750-2#ping 172.16.86.47

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 172.16.86.47, timeout is 2 seconds:

.....

Success rate is 0 percent (0/5)

Core-3750-2#sh ip arp | in 172.16.86.47

Internet  172.16.86.47           44   3c4a.92fa.93a4  ARPA   Vlan86

Core-3750-2#sh mac address-table | in 3c4a.92fa.93a4

  86    3c4a.92fa.93a4    DYNAMIC     Po1

Core-3750-2#

Core-3750-2#clear arp-cache //在switch2上先清除mac address-tables以解决暂时不能访问的问题。

Core-3750-2#sh ip arp | in 172.16.86.47

Internet  172.16.86.47           16   984b.e16b.5315  ARPA   Vlan86  //已更新回来

//查看及更新switch上的mac address-tables的老化时间

Core-3750-1#sh interfaces po1

Port-channel1 is up, line protocol is up (connected)

  Hardware is EtherChannel, address is 30e4.dba3.fb17 (bia 30e4.dba3.fb17)

  MTU 1500 bytes, BW 2000000 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, link type is auto, media type is unknown

  input flow-control is off, output flow-control is unsupported

  Members in this channel: Gi1/0/23 Gi1/0/24

  ARP type: ARPA, ARP Timeout 04:00:00  //默认机器老化时间为4小时

  Last input 00:00:00, 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: 1700

  Queueing strategy: fifo

  Output queue: 0/40 (size/max)

  5 minute input rate 11447000 bits/sec, 2752 packets/sec

  5 minute output rate 13052000 bits/sec, 2762 packets/sec

     63149721869 packets input, 44232956472023 bytes, 0 no buffer

     Received 1581074482 broadcasts (520448140 multicasts)

     0 runts, 0 giants, 0 throttles

     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored

     0 watchdog, 520448140 multicast, 0 pause input

     0 input packets with dribble condition detected

     74776492349 packets output, 62375481517592 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

Core-3750-1#conf t

Enter configuration commands, one per line.  End with CNTL/Z.

Core-3750-1(config)#int po1

Core-3750-1(config-if)#arp timeout 3600

Core-3750-1(config-if)#end

Core-3750-1#wr

Building configuration...

[OK]

Core-3750-1#sh interfaces po1

Port-channel1 is up, line protocol is up (connected)

  Hardware is EtherChannel, address is 30e4.dba3.fb17 (bia 30e4.dba3.fb17)

  MTU 1500 bytes, BW 2000000 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, link type is auto, media type is unknown

  input flow-control is off, output flow-control is unsupported

  Members in this channel: Gi1/0/23 Gi1/0/24

  ARP type: ARPA, ARP Timeout 01:00:00 //更改老化时间为1小时

  Last input 00:00:00, 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: 1700

  Queueing strategy: fifo

  Output queue: 0/40 (size/max)

  5 minute input rate 13595000 bits/sec, 2969 packets/sec

  5 minute output rate 13102000 bits/sec, 2891 packets/sec

     63149839463 packets input, 44233057907548 bytes, 0 no buffer

     Received 1581074997 broadcasts (520448426 multicasts)

     0 runts, 0 giants, 0 throttles

     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored

     0 watchdog, 520448426 multicast, 0 pause input

     0 input packets with dribble condition detected

     74776581352 packets output, 62375504932495 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

Core-3750-1#

由于提供的实训文档中仅包含**文字形式的理论知识、配置命令及流程说明**,未附带任何“结果图”(如实验拓扑验证结果截图、路由表/邻居表显示截图等)或“配置图”(如网络拓扑结构图、设备接口配置示意图等),因此无法直接提取或生成对应图片。 不过,可根据每天的核心内容,为你梳理出“结果图/配置图的核心要素”,以便你自行绘制或在实验中验证时参考: ### 一、第一天(8月25日):网络基础与设备原理 #### 核心配置图要素 1. **网络拓扑结构示意图** - 包含星型、环形、树型、网状拓扑的结构标注(如星型拓扑中“中心交换机+周边PC/设备”的连接关系)。 - 双绞线(超五类线)、光纤的传输距离标注(超五类线100m、光纤单模/多模差异)。 2. **交换机MAC地址表示意图** - 表头:`MAC地址 | 对应接口 | 老化时间(300s)`,示例条目(如`68-54-5A-54-64-BA | GigabitEthernet0/0/1 | 280s`)。 #### 核心结果图要素 - **HUB与交换机的冲突对比图**:HUB所有端口共享带宽(标注“冲突域”),交换机每个端口独立冲突域(标注“无冲突”)。 ### 二、第二天(8月26日):IP地址与ARP协议 #### 核心配置图要素 1. **IP地址分类与网段划分图** - 标注A/B/C类地址范围(如A类`0.0.0.0-127.255.255.255`、默认掩码`255.0.0.0`)、特殊IP(环回`127.0.0.1`、广播`255.255.255.255`)。 - VLSM子网划分示例(如`192.168.1.0/24`划分为`/25`:`192.168.1.0-126`和`192.168.1.128-254`)。 2. **ARP缓存表示意图** - 表头:`IP地址 | MAC地址 | 类型(动态/静态) | 老化时间180s)`,示例条目(如`192.168.1.10 | 00-11-22-33-44-55 | 动态 | 150s`)。 #### 核心结果图要素 - **ARP请求/应答流程时序图**:客户端广播ARP请求(目标IP+全F MAC)→ 目标设备单播ARP应答(携带自身MAC)。 ### 三、第三天(8月27日):OSI/TCP/IP模型与PDU #### 核心配置图要素 1. **OSI与TCP/IP模型对比图** | OSI模型 | TCP/IP模型 | 核心功能 | PDU单位 | |----------------|------------------|---------------------------|-----------| | 应用层 | 应用层 | 人机交互(HTTP/DNS等) | 报文 | | 表示层 | 应用层 | 数据格式转换(压缩/加密) | 报文 | | 会话层 | 应用层 | 建立会话连接 | 报文 | | 传输层 | 传输层 | 端到端传输(TCP/UDP) | 段 | | 网络层 | 网络层 | IP寻址与路由 | 包 | | 数据链路层 | 网络接口层 | MAC寻址(帧封装) | 帧 | | 物理层 | 网络接口层 | 电信号处理 | 比特流 | 2. **TCP/UDP头部结构示意图** - TCP头部:标注源端口(16位)、目的端口(16位)、序号(32位)、ACK标记位、窗口大小(16位)。 - UDP头部:标注源端口(16位)、目的端口(16位)、长度(16位)、校验和(16位)。 #### 核心结果图要素 - **数据封装/解封装流程**:应用层报文→传输层加TCP/UDP头(段)→网络层加IP头(包)→数据链路层加MAC头(帧)→物理层比特流。 ### 四、第四天(8月28日):TCP挥手、IP头部与设备管理 #### 核心配置图要素 1. **TCP四次挥手时序图** - 步骤1:客户端发`FIN=1`(请求断开);步骤2:服务器发`AC找到对应的图片
09-07
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值