• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 关于我们

15-IP隧道及安全VPN

目录

02-IP隧道故障处理手册

本章节下载 02-IP隧道故障处理手册  (210.32 KB)

02-IP隧道故障处理手册

1 IP隧道及安全VPN类故障处理

1.1  IP隧道故障处理

1.1.1  点对点类隧道无法Ping通对端Tunnel接口IP地址

1. 故障描述

点对点类隧道(包括GRE、IPv4和IPv6隧道配置完成后,本端Tunnel接口IP地址无法Ping通对端Tunnel接口IP地址。

本章以GRE over IPv4隧道为例进行说明。

说明

本节描述的故障处理方法不适用于Ds-Lite、GRE-P2MP等点对多点隧道

 

2. 常见原因

本类故障的常见原因主要包括:

·     配置错误:比如两端隧道模式不一致、未配置源地址或者是目的地址、两端源和目的不满足互为源、目的的关系等。

·     物理链路不通:Tunnel的源和目的地址之间不存在路由,导致Tunnel接口不能UP,或者Tunnel依赖的物理链路路由不通,导致Tunnel口虽然能UP但是中间设备丢包。

3. 故障分析

本类故障的诊断流程如图1-1所示。

图1-1 无法Ping通对端Tunnel接口IP地址故障诊断流程图

 

4. 处理步骤

(1)     ‍‍检查隧道两端接口配置的完整性。

在两端设备分别执行display current interface tunnel命令,查看隧道接口配置,请确保隧道接口的源地址、目的地址和隧道接口IP地址均已配置。

<Sysname> display current interface tunnel

#

interface Tunnel1 mode gre

 ip address 10.1.1.1 255.255.255.0

 source 1.1.1.1

 destination 1.1.1.2

#

如果隧道接口的配置不完整,请参考如下示例补充缺失的配置。

<Sysname> system-view

[Sysname] interface tunnel 1 mode gre

[Sysname-Tunnel1] ip address 10.1.1.1 255.255.255.0

[Sysname-Tunnel1] source 1.1.1.1

[Sysname-Tunnel1] destination 1.1.1.2

(2)     检查隧道两端封装模式是否一致。

在两端设备上分别执行display current interface tunnel命令,查看隧道接口的封装模式。

<Sysname> display current interface tunnel

#

interface Tunnel1 mode gre

 ip address 10.1.1.1 255.255.255.0

 source 1.1.1.1

 destination 1.1.1.2

#

如果两端封装模式不一致,则需要先通过undo interface tunnel命令删除模式配置错误的隧道,再通过interface tunnel命令重新配置隧道接口。隧道删除后,隧道口下的配置也同时被删除,还需要重新配置源地址、目的地址和接口IP地址。

(3)     检查两端隧道源、目的地址是否匹配。

在两端设备分别执行display current interface tunnel命令,查看隧道接口配置,请确保本端隧道的源地址等于对端隧道的目的地址,本端隧道的目的地址等于对端隧道的源地址,且源地址必须是本机地址。

本端设备:

<Sysname> display current interface tunnel

#

interface Tunnel1 mode gre

 ip address 10.1.1.1 255.255.255.0

 source 1.1.1.1

 destination 1.1.1.2

#

对端设备:

<Sysname> display current interface tunnel

#

interface Tunnel1 mode gre

 ip address 10.1.1.2 255.255.255.0

 source 1.1.1.2

 destination 1.1.1.1

#

如果两端隧道源、目的地址配置有误,则在隧道接口视图下执行source命令或destination命令重新配置源、目的地址。

(4)     检查两端隧道GRE key是否一致

在GRE类型隧道的场景下,两端需要配置相同的GRE key,或都不配置GRE key。在两端设备分别执行display current interface tunnel命令,查看GRE key配置。

本端设备:

#

interface Tunnel1 mode gre

 ip address 10.1.1.1 255.255.255.0

 source 1.1.1.1

 destination 1.1.1.2

 gre key 123

#

对端设备:

#

interface Tunnel1 mode gre

 ip address 10.1.1.2 255.255.255.0

 source 1.1.1.2

 destination 1.1.1.1

 gre key 123

#

如果两端隧道接口的GRE key配置不相同,请在隧道接口视图下通过gre key命令配置相同的GRE key。

(5)     检查两端隧道GRE报文携带VPC(Virtual Private Cloud,虚拟私有云)信息功能使能情况是否一致。

提示

需要注意的是,在同一个Tunnel接口下,不允许同时配置GRE key功能和GRE VPC功能。

 

在GRE类型隧道的场景下,两端GRE VPC功能的使能情况需要保持一致,一端使能而另一端未使能GRE VPC功能,则无法Ping通对端接口的IP地址。

在两端设备分别执行display current interface tunnel命令,查看GRE VPC功能的使能情况。

本端设备:

#

interface Tunnel1 mode gre

 ip address 10.1.1.1 255.255.255.0

 source 1.1.1.1

 destination 1.1.1.2

 gre vpc enable

#

对端设备:

#

interface Tunnel1 mode gre

 ip address 10.1.1.2 255.255.255.0

 source 1.1.1.2

 destination 1.1.1.1

 gre vpc enable

#

如果两端隧道接口的GRE VPC使能情况不相同,请分别在两端隧道接口视图下,通过[ undo ] gre vpc enable命令开启或关闭GRE VPC功能。

(6)     检查两端隧道接口状态是否已经UP

通过display interface tunnel可以查看隧道接口状态,如果经过步骤(1)和步骤(2)的检查之后,隧道口状态依旧为Down,请参见《隧道接口故障处理手册》中“隧道接口工作不稳定”继续定位。

#

<Sysname> display interface tunnel 1

Tunnel1

Current state: UP

Line protocol state: UP

Description: Tunnel1 Interface

Bandwidth: 64kbps

Maximum transmission unit: 1476

Internet address: 10.1.2.1/24 (primary)

Tunnel source 2002::1:1 (Vlan-interface10), destination 2001::2:1

Tunnel TOS 0xC8, Tunnel TTL 255

Tunnel protocol/transport GRE/IPv6

#

(7)     检查隧道的源、目的地址间是否路由可达

检查隧道的源、目的IP地址之间是否存在路由。通过display current interface tunnel检查两端隧道接口IP是否在同一网段,如果在同一网段,默认会生成网段路由,不存在物理链路不通的问题;如果不在同一网段,则通过display fib命令检查隧道源、目的IP地址之间是否路由可达,如果不存在路由,则需要配置相应的静态或者动态路由,使隧道的源、目的IP地址间路由可达。如果仍无法解决故障,则继续执行步骤(8)

#

<Sysname> display fib

Route destination count: 4

Directly-connected host count: 0

 

Flag:

  U:Useable   G:Gateway   H:Host   B:Blackhole   D:Dynamic   S:Static

  R:Relay     F:FRR

 

Destination/Mask   Nexthop         Flag     OutInterface/Token       Label

0.0.0.0/32         127.0.0.1       UH       InLoop0                  Null

1.1.1.2/24         192.168.126.1   USGF     M-GE0/0/0                Null

127.0.0.0/8        127.0.0.1       U        InLoop0                  Null

127.0.0.0/32       127.0.0.1       UH       InLoop0                  Null

#

(8)     如果故障仍未排除,请收集如下信息,并联系技术支持人员

¡     上述步骤的执行结果。

¡     设备的配置文件、日志信息、告警信息。

¡     下表中Debug命令输出的调试信息。

表1-1 Debug命令列表

命令

描述

debugging tunnel

开启Tunnel模块的调试信息开关

debugging ip packet [ acl acl-number ]

开启IP报文调试信息开关

debugging ipv6 packet [ acl acl-number ]

开启IPv6报文调试信息开关

debugging ip error

开启IP转发错误调试信息开关

debugging ip info [ acl acl-number ]

开启IP转发调试信息开关

debugging ipv6 info [ acl acl-number ]

开启IPv6转发调试信息开关

 

5. 告警与日志

相关告警

相关日志

不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!

新华三官网
联系我们