Print

S6900交换机ipv6路由不生效经验案例

2020-08-19 发表

组网及说明

6900和中心设备之间跑ospfv3。到网关为静态路由指定。

问题描述

用户在网关设备上ping远端基站目的地址不通,在s6900上查看IPV6路由正常。

===============display ipv6 routing-table=============== 

 

Destination: ::/0                                        Protocol  : O_ASE2

NextHop    : FE80::D6C1:C8FF:FE8E:DCB0                   Preference: 150

Interface  : Vlan100                                     Cost      : 1

 

Destination: 240E:xxxx::3000/119                          Protocol  : O_SUM

NextHop    : ::                                          Preference: 255

Interface  : NULL0                                       Cost      : 0

 

Destination: 240E:xxxx::3000/122                          Protocol  : Static

NextHop    : 240E:xxxx::30E1                              Preference: 60

Interface  : Vlan300                                     Cost      : 0

过程分析

在设备上流量统计,发现流量在6900和中心交换机之间不断的来回转发。

Interface: Ten-GigabitEthernet2/0/2  //上行口

  Direction: Inbound

  Policy: test

   Classifier: test

     Operator: AND

     Rule(s) :

      If-match acl ipv6 3200

     Behavior: test

      Accounting enable:

        160 (Packets)

 

Interface: Ten-GigabitEthernet2/0/2  //上行口

  Direction: Outbound

  Policy: test

   Classifier: test

     Operator: AND

     Rule(s) :

      If-match acl ipv6 3200

     Behavior: test

      Accounting enable:

        160 (Packets)

 

Interface: Ten-GigabitEthernet2/0/3  //下行口

  Direction: Inbound

  Policy: test

   Classifier: test

     Operator: AND

     Rule(s) :

      If-match acl ipv6 3200

     Behavior: test

      Accounting enable:

        5 (Packets)6900的上行口抓包,发现流量回来后本应发到网关的流量被6900又发回中兴了。


查看芯片底层的路由表项

[6900-probe]debug ipv6-drv show route 0 240E:186::3001 slot 2

 

**********************************************************

- IPv6 Route Information        Slot 2

**********************************************************

- uiMask=112 is bigger than 64!

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

提示路由掩码大于64没有下发到芯片底层。而默认路由是小于64位的,在底层是会下发的,所以报文回到到交换机后,三层转发匹配默认路由又扔回中兴设备。

 

[6900-probe]debug ipv6-drv show route 0 0::0 0 slot 2

 

**********************************************************

- IPv6 Route Information        Slot 2

**********************************************************

--- UNIT: 0 ---

- IPv6 ADDR:            0000:0000:0000:0000:0000:0000:0000:0000

- VRF:                  0

- MASKLEN:              0

- EGRESS ID:            100015

- FLAGS:                0x20000

- PRI:                  0

- CLASS ID:             32

- HWINDEX:              7173

- TUNNEL OPT:           0

- HITBIT:               NO

 

- EGRESS NUM:           0

- EGRESS FLAGS:         0x0

- INTF NUM:             7

- MAC ADDR:             d4c1-c88e-dc90

- VLAN:                 100

- DMOD:                 66

- DPORT:                49

- TRUNK:                0

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

 


解决方法

通过命令hardware-resource routing-mode { ipv6-64 | ipv6-128 }修改设备支持大于64位掩码的ipv6路由。此命令需要重启设备才能生效。

可以通过如下命令查看是否支持大于64位研发的ipv6路由

# 显示前缀大于64位的IPv6路由功能的支持情况。

display hardware-resource routing-mode

Routing-mode resource(routing-mode), all supported modes:

  ipv6-64           ipv6-64 supported

  ipv6-128          ipv6-128 supported

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

  Default         Current         Next

  ipv6-64         ipv6-128        ipv6-128