Eth-Trunk Hash方式导致交换机直连ping不通

发布时间:  2014-12-16 浏览次数:  304 下载次数:  0
问题描述
两台交换机直连,直连的两个端口加入Eth-Trunk,两台设备的Eth-Trunk端口状态UP,此时交换机A的两个Eth-Trunk成员端口均UP,而交换机B只有一个Eth-Trunk成员端口UP,另一个成员端口DOWN,两个设备在Eth-Trunk端口上起VLANIF,VLANIF状态也UP,但交换机A无法ping通交换机B设备。
处理过程
1、由于Eth-Trunk端口能够UP,VLANIF也能UP,再次检查配置,确认两台交换机配置上没有问题;
2、由于ping不通,首先检查arp表是否学习到了
<oinhcpslhw01>dis arp all

IP ADDRESS      MAC ADDRESS     EXPIRE(M) TYPE INTERFACE      VPN-INSTANCE     

                                          VLAN

------------------------------------------------------------------------------

10.20.130.20    30d1-7eb2-e142            I -  Vlanif1

10.20.130.1     0000-5e00-0101  20        D-0  Eth-Trunk0

                                          1

10.20.130.4     04f9-38c5-a742  17        D-0  Eth-Trunk0

                                          1

------------------------------------------------------------------------------

Total:3         Dynamic:2       Static:0     Interface:1   
发现可以学到对端的arp;
3、那么可能是单通,即交换机B到交换机A通,而交换机A到交换机B不通,但实际上两台交换机之间Eth-trunk和Vlanif都是UP的,考虑到交换机B设备两个Eth-trunk成员端口只有一个端口UP,所以另一个Eth-trunk成员端口是单通的,那应该交换机A的ping报文在hash选路时选了那条单通的端口;
4、更换交换机B DOWN端口的光纤使Eth-trunk成员口都UP,这时交换机A可以ping通交换机B。
根因
1、查看Trunk hash方式,hash方式为SA-XOR-DA,由于ping报文源MAC和目的MAC不变,所以hash选路只会选其中一个端口发送,接下来确认是否从那个单通的成员口发送了。
[oinhcpslhw01-Eth-Trunk0]display this interface

Eth-Trunk0 current state : UP

Line protocol current state : UP

Description:to _Aggregation Switch_10.20.130.4_G0/0/16_G1/0/16

Switch Port, PVID :    1, Hash arithmetic : According to SA-XOR-DA

2、清除端口计数后,多次ping对端后查看端口计数
<oinhcpslhw01>r c i

<oinhcpslhw01>ping -c 1000000 -m 10 10.20.130.4

<oinhcpslhw01>dis int gi 0/1/1

GigabitEthernet0/1/1 current state : UP

Line protocol current state : UP

Description:to _Aggregation Switch_10.20.130.4_G0/0/16_G1/0/16

Switch Port, TPID : 8100(Hex), The Maximum Frame Length is 1600

IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 30d1-7eb2-e140

Current system time: 2014-12-13 18:40:51-05:13

Port Mode: COMMON FIBER

Speed : 1000,   Loopback: NONE

Duplex: FULL,   Negotiation: DISABLE

Flow-control: DISABLE

Last 300 seconds input rate 1960 bits/sec, 2 packets/sec

Last 300 seconds output rate 1528 bits/sec, 1 packets/sec

Input peak rate 3812256 bits/sec, Record time: 2014-12-13 18:05:42

Output peak rate 345808 bits/sec, Record time: 2014-12-13 18:04:11

Input:  604 packets, 73724 bytes

  Unicast:                        479,  Multicast:                          73

  Broadcast:                       52,  Jumbo:                               0

  Discard:                          0,  Pause:                               0



  Total Error:                      0

  CRC:                              0,  Giants:                              0

  Jabbers:                          0,  Fragments:                           0

  Runts:                            0,  DropEvents:                          0

  Alignments:                       0,  Symbols:                             0

  Ignoreds:                         0,  Frames:                              0

                                         

Output:  464 packets, 57484 bytes

  Unicast:                        464,  Multicast:                           0

  Broadcast:                        0,  Jumbo:                               0

  Discard:                          0,  Pause:                               0



  Total Error:                      0

  Collisions:                       0,  ExcessiveCollisions:                 0

  Late Collisionss                  0,  Deferreds:                           0

  Buffers Purged:                   0



    Input bandwidth utilization threshold : 90.00%

    Output bandwidth utilization threshold: 90.00%

    Input bandwidth utilization  : 0.01%

    Output bandwidth utilization : 0.01%



<oinhcpslhw01>dis int gi 0/1/2

GigabitEthernet0/1/2 current state : UP

Line protocol current state : UP

Description:to _Aggregation Switch_10.20.130.4_G0/0/16_G1/0/16

Switch Port, TPID : 8100(Hex), The Maximum Frame Length is 1600

IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 30d1-7eb2-e140

Current system time: 2014-12-13 18:40:55-05:13

Port Mode: COMMON FIBER

Speed : 1000,   Loopback: NONE

Duplex: FULL,   Negotiation: DISABLE

Flow-control: DISABLE

Last 300 seconds input rate 168 bits/sec, 0 packets/sec

Last 300 seconds output rate 256 bits/sec, 0 packets/sec

Input peak rate 4131312 bits/sec, Record time: 2014-12-13 17:30:23

Output peak rate 339704 bits/sec, Record time: 2014-12-13 17:30:23

Input:  27 packets, 6432 bytes

  Unicast:                          0,  Multicast:                           0

  Broadcast:                       27,  Jumbo:                               0

  Discard:                          0,  Pause:                               0



  Total Error:                      0

  CRC:                              0,  Giants:                              0

  Jabbers:                          0,  Fragments:                           0

  Runts:                            0,  DropEvents:                          0

  Alignments:                       0,  Symbols:                             0

  Ignoreds:                         0,  Frames:                              0

                                         

Output:  71 packets, 9866 bytes

  Unicast:                         31,  Multicast:                          39

  Broadcast:                        1,  Jumbo:                               0

  Discard:                          0,  Pause:                               0



  Total Error:                      0

  Collisions:                       0,  ExcessiveCollisions:                 0

  Late Collisions:                  0,  Deferreds:                           0

  Buffers Purged:                   0



    Input bandwidth utilization threshold : 90.00%

    Output bandwidth utilization threshold: 90.00%

    Input bandwidth utilization  : 0.01%

    Output bandwidth utilization : 0.01%


交换机选择Eth-trunk成员G0/1/1端口收发报文,
对比之前交换机B设备Eth-trunk成员端口状态,确实和交换机A G0/1/1对接的端口处于DOWN的状态
-----------------------------------------------------

PortName                      Status      Weight

-----------------------------------------------------

GigabitEthernet0/1/1          DOWN        1

GigabitEthernet0/1/2          UP          1

-----------------------------------------------------
至此,直连ping不通的根因已找到。
解决方案
保证两台交换机Eth-Trunk成员端口都UP,交换机A可以ping通对端

END