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

15-IP隧道及安全VPN

目录

01-IPsec故障处理手册

本章节下载 01-IPsec故障处理手册  (182.28 KB)

01-IPsec故障处理手册

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

1.1  IPsec故障处理手册

1.1.1  未触发IKE协商(IPsec安全框架方式)

1. 故障描述

图1-1所示,需要在Device A和Device B之间建立IKE协商方式的IPsec隧道,用于保护Host A和Host B之间的用户私网流量,IPsec隧道的封装模式为隧道模式。在Device A和Device B上完成配置后,Host A和Host B之间的流量不通。

在Device A上执行display ike sa命令,查看显示信息为空,表示IKE一阶段未协商成功。若执行display ike sa命令显示信息中Flag字段值为RD,且执行display ipsec sa命令,无显示信息,表示IKE二阶段未协商成功,如下所示:

<DeviceA> display ike sa

Flags:

RD--READY RL--REPLACED FD-FADING RK-REKEY

 ID       Profile   Remote             Flag      Remote-Type    Remote-ID

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

<DeviceA> display ipsec sa

<DeviceA>

在Device A上执行display ike statistics命令查看IKE统计数据,发现无明显错误发生,显示信息如下所示:

<DeviceA> display ike statistics

IKE statistics:

  No matching proposal: 0

  Invalid ID information: 0

  Unavailable certificate: 0

  Unsupported DOI: 0

  Unsupported situation: 0

  Invalid proposal syntax: 0

  Invalid SPI: 0

  Invalid protocol ID: 0

  Invalid certificate: 0

  Authentication failure: 0

在Device A上执行display ipsec statistics命令查看IPsec统计数据,发现无明显错误发生,显示信息如下所示:

<DeviceA> display ipsec statistics

  IPsec packet statistics:

    Received/sent packets: 0/0

    Received/sent bytes: 0/0

    Received/sent packet rate: 0/0 packets/sec

    Received/sent byte rate: 0/0 bytes/sec

    Dropped packets (received/sent): 0/0

 

    Dropped packets statistics

      No available SA: 0

      Wrong SA: 0

      Invalid length: 0

      Authentication failure: 0

      Encapsulation failure: 0

      Decapsulation failure: 0

      Replayed packets: 0

      ACL check failure: 0

      MTU check failure: 0

      Loopback limit exceeded: 0

      Crypto speed limit exceeded: 0

图1-1 未触发IKE协商(IPsec安全框架方式)组网图

2. 常见原因

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

·     IPsec网关之间路由不可达。

·     IPsec安全框架配置不正确。

·     IKE profile和IKE proposal配置不正确。

3. 故障分析

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

图1-2 未触发IKE协商(IPsec安全框架方式)的故障处理流程图

 

4. 处理步骤

(1)     检查IPsec网关之间是否可以Ping通。

使用ping命令检查网络连接情况。

a.     如果Ping不通,请参见“三层技术-IP业务类故障处理”手册中的“Ping不通的定位思路”继续定位,确保IPsec网关之间可以Ping通。

b.     如果故障仍不能排除,请执行步骤(2)。

(2)     检查IPsec安全框架配置是否正确。

通过display ipsec profile命令查看本端IPsec网关Device A和对端IPsec网关Device B上的配置是否完整,即都配置了安全提议(Transform set),和IKE profile,需保证两端安全提议下配置的加密算法、认证算法以及PFS一致。Device A的显示信息如下所示:

[DeviceA] display ipsec profile

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

IPsec profile: myprofile

Mode: isakmp

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

  Transform set:  tran1

  IKE profile: profile

  SA duration(time based): 3600 seconds

  SA duration(traffic based): 1843200 kilobytes

  SA soft-duration buffer(time based): 1000 seconds

  SA soft-duration buffer(traffic based): 43200 kilobytes

  SA idle time: 100 seconds

[DeviceA] display ipsec transform-set

IPsec transform set: tran1

  State: complete

  Encapsulation mode: tunnel

  ESN: Enabled

  PFS:

  Transform: AH-ESP

  AH protocol:

    Integrity: SHA1

  ESP protocol:

    Integrity: SHA1

    Encryption: AES-CBC-128

Device B的显示信息如下所示:

[DeviceB] display ipsec profile

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

IPsec profile: myprofile

Mode: isakmp

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

  Transform set:  tran1

  IKE profile: profile

  SA duration(time based): 3600 seconds

  SA duration(traffic based): 1843200 kilobytes

  SA soft-duration buffer(time based): 1000 seconds

  SA soft-duration buffer(traffic based): 43200 kilobytes

  SA idle time: 100 seconds

[DeviceB] display ipsec transform-set

IPsec transform set: tran1

  State: complete

  Encapsulation mode: tunnel

  ESN: Enabled

  PFS:

  Transform: AH-ESP

  AH protocol:

    Integrity: SHA1

  ESP protocol:

    Integrity: SHA1

    Encryption: AES-CBC-128

如果故障仍不能排除,请执行步骤(3)。

(3)     检查IPsec安全框架是否在接口上正确配置。

a.     在本端IPsec网关Device A上执行命令interface tunnel进入隧道接口,执行display this命令查看隧道接口中的本端地址和对端地址,以及IPsec安全框架是否配置正确,显示信息如下所示:

[DeviceA] interface tunnel 1

[DeviceA-Tunnel1] display this

#

interface Tunnel1 mode ipsec

 ip address 3.3.3.1 255.255.255.0

 source 2.2.2.1

 destination 2.2.3.1

 tunnel protection ipsec profile myprofile

[DeviceA-Tunnel1] quit

若有配置错误,请按如下方法修改配置

[DeviceA] interface tunnel 1 mode ipsec

[DeviceA-Tunnel1] ip address 3.3.3.1 255.255.255.0

[DeviceA-Tunnel1] source 2.2.2.1

[DeviceA-Tunnel1] destination 2.2.3.1

[DeviceA-Tunnel1] tunnel protection ipsec profile myprofile

[DeviceA-Tunnel1] quit

b.     在本端IPsec网关Device B上执行命令interface tunnel进入隧道接口,执行display this命令查看隧道接口中的本端地址和对端地址,以及IPsec安全框架是否配置正确,显示信息如下所示:

[DeviceB] interface tunnel 1

[DeviceB-Tunnel1] display this

#

interface Tunnel1 mode ipsec

 ip address 3.3.3.2 255.255.255.0

 source 2.2.3.1

 destination 2.2.2.1

 tunnel protection ipsec profile myprofile

[DeviceB-Tunnel1] quit

若有配置错误,请按如下方法修改配置

[DeviceB] interface tunnel 1 mode ipsec

[DeviceB-Tunnel1] ip address 3.3.3.2 255.255.255.0

[DeviceB-Tunnel1] source 2.2.3.1

[DeviceB-Tunnel1] destination 2.2.2.1

[DeviceB-Tunnel1] tunnel protection ipsec profile myprofile

[DeviceB-Tunnel1] quit

如果故障仍不能排除,请执行步骤(4)。

(4)     检查IKE profile和IKE proposal配置是否正确。

a.     检查IKE profile的配置,确认两端IPsec网关的本端地址和对端地址配置是否正确。若采用预共享密钥认证,本端和对端的预共享密钥必须相同(通过pre-shared-key命令配置),若采用RSA签名或数字信封认证,需要确保数字证书在有效期内(通过display pki certificate domain命令查看证书有效期,即Validity字段显示的有效期内使用),Device A上IKE profile的具体配置举例如下所示:

[DeviceA] ike keychain keychain1

[DeviceA-ike-keychain-keychain1] pre-shared-key address 2.2.3.1 255.255.255.0 key simple 123456TESTplat&!

[DeviceA-ike-keychain-keychain1] quit

[DeviceA] ike profile profile

[DeviceA-ike-profile-profile] keychain keychain1

[DeviceA-ike-profile-profile] local-identity address 2.2.2.1

[DeviceA-ike-profile-profile] match remote identity address 2.2.3.1 255.255.255.0

[DeviceA-ike-profile-profile] quit

Device B上IKE profile的具体配置举例如下所示:

[DeviceB] ike keychain keychain1

[DeviceB-ike-keychain-keychain1] pre-shared-key address 2.2.2.1 255.255.255.0 key simple 123456TESTplat&!

[DeviceB-ike-keychain-keychain1] quit

[DeviceB] ike profile profile

[DeviceB-ike-profile-profile] keychain keychain1

[DeviceB-ike-profile-profile] local-identity address 2.2.3.1

[DeviceB-ike-profile-profile] match remote identity address 2.2.2.1 255.255.255.0

[DeviceB-ike-profile-profile] quit

b.     检查IPsec网关之间的IKE proposal配置是否一致。在Device A和Device B上通过display ike proposal命令查看IKE proposal配置信息,保证配置参数一致,如下所示:

[DeviceA] display ike proposal

 Priority Authentication Authentication Encryption  Diffie-Hellman Duration

              method       algorithm    algorithm       group      (seconds)

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

 default  PRE-SHARED-KEY     SHA1           DES-CBC        Group 1        86400

[DeviceB] display ike proposal

 Priority Authentication Authentication Encryption  Diffie-Hellman Duration

              method       algorithm    algorithm       group      (seconds)

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

 default  PRE-SHARED-KEY     SHA1           DES-CBC        Group 1        86400

如果故障仍不能排除,请执行步骤(5)。

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

¡     上述步骤的执行结果。

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

¡     执行debugging命令收集IPsec隧道建立过程中的相关信息,配置方法如下所示。

<DeviceA> terminal debugging

The current terminal is enabled to display debugging logs.

<DeviceA> terminal monitor

The current terminal is enabled to display logs.

<DeviceA> debugging ike all

<DeviceA> debugging ipsec all

 

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

新华三官网
联系我们