• 全部
  • 经验案例
  • 典型配置
  • 技术公告
  • FAQ
  • 漏洞说明
  • 全部
  • 全部
  • 大数据引擎
  • 知了引擎
产品线
搜索
取消
案例类型
发布者
是否解决
是否官方
时间
搜索引擎
匹配模式
高级搜索

R/AR系列路由器IPSec/IKE多实例配置举例

2007-05-28 发表
  • 0关注
  • 0收藏 883浏览
粉丝: 关注:

R/AR系列路由器IPSec/IKE多实例配置举例

 

一、组网要求

MPLS网络中需要对PECE进行IPSec加密。

 

二、网络结构

 

三、配置

VPN1-CE1配置

#

sysname CE1

#

ike peer test

pre-shared-key huawei

remote-address 21.21.21.1

#

ipsec proposal prop

#

ipsec policy map 1 isakmp

security acl 3000

ike-peer test

proposal prop

#

acl number 3000

rule 0 permit ip source 32.32.32.0 0.0.0.255 destination 33.33.33.0 0.0.0.255

#

interface Ethernet0/1

port link-mode route

ip address 21.21.21.2 255.255.255.0

ipsec policy map

#

interface LoopBack1

ip address 32.32.32.1 255.255.255.255

#

ip route-static 0.0.0.0 0.0.0.0 21.21.21.1

ip route-static 33.33.33.0 255.255.255.0 21.21.21.1

#

PE1配置

#

sysname PE1

#

mpls lsr-id 100.100.100.1

#

mpls

#

mpls ldp

#

ip vpn-instance vrf1

route-distinguisher 100:1

vpn-target 100:1 export-extcommunity

vpn-target 100:1 import-extcommunity

#

ike peer test

pre-shared-key huawei

remote-address 21.21.21.2

#

ipsec proposal prop

#

ipsec policy map 1 isakmp

security acl 3000

ike-peer test

proposal prop

#

acl number 3000

rule 0 permit ip vpn-instance vrf1 source 33.33.33.0 0.0.0.255 destination 32.32.32.0 0.0.0.255

#

interface Ethernet0/0/0

ip address 41.41.41.1 255.255.255.0

mpls

mpls ldp enable

#

interface Ethernet0/0/1

ip binding vpn-instance vrf1

ip address 21.21.21.1 255.255.255.0

ipsec policy map

#

interface LoopBack0

ip address 100.100.100.1 255.255.255.255

#

bgp 100

undo synchronization

group g1 internal

peer 100.100.100.2 group g1

peer 100.100.100.2 connect-interface LoopBack0

#

ipv4-family vpn-instance vrf1

import-route direct

import-route static

undo synchronization

#

ipv4-family vpnv4

peer g1 enable

peer 100.100.100.2 group g1

#

ospf 1

area 0.0.0.0

network 41.41.41.0 0.0.0.255

network 100.100.0.0 0.0.255.255

#

ip route-static vpn-instance vrf1 32.32.32.0 255.255.255.0 21.21.21.2  preferen

ce 60

#

PE2配置

#

sysname PE2

#

mpls lsr-id 100.100.100.2

#

mpls

#

mpls ldp

#

ip vpn-instance vrf1

route-distinguisher 100:1

vpn-target 100:1 export-extcommunity

vpn-target 100:1 import-extcommunity

#

interface Ethernet0/0

ip address 41.41.41.2 255.255.255.0

mpls

mpls ldp enable

#

interface Ethernet0/1

ip binding vpn-instance vrf1

ip address 51.51.51.2 255.255.255.0

#

interface LoopBack0

ip address 100.100.100.2 255.255.255.255

#

bgp 100

undo synchronization

group gl internal

peer 100.100.100.1 group gl

peer 100.100.100.1 connect-interface LoopBack0

#

ipv4-family vpn-instance vrf1

import-route direct

import-route static

undo synchronization

#

ipv4-family vpnv4

peer gl enable

peer 100.100.100.1 group gl

#

ospf 1

area 0.0.0.0

network 41.41.41.0 0.0.0.255

network 100.100.0.0 0.0.255.255

#

ip route-static vpn-instance vrf1 33.33.33.0 255.255.255.0 51.51.51.1  preferen

ce 60

#

VPN1-CE3配置

#

sysname CE2

#

interface Ethernet0/0

ip address 51.51.51.1 255.255.255.0

#

interface LoopBack1

ip address 33.33.33.1 255.255.255.255

#

ip route-static 0.0.0.0 0.0.0.0 51.51.51.2 preference 60

ip route-static 32.32.32.0 255.255.255.0 51.51.51.2 preference 60

#

VPN-CE2参见VPN-CE1VPN-CE4参见VPN-CE3

配置注意PE1上对入IPSec的报文设置ACL的时候vpn-instance指定VPN实例。

 

四、验证

1.查看VRF1的私网路由是否建立

[PE1]dis ip rou vpn vrf1

vrf1   Route Information

Routing Table:  vrf1   Route-Distinguisher:   100:1

Destination/Mask   Protocol Pre  Cost        Nexthop         Interface

21.21.21.0/24      DIRECT   0    0           21.21.21.1      Ethernet0/0/1

21.21.21.1/32      DIRECT   0    0           127.0.0.1       InLoopBack0

32.32.32.0/24      STATIC   60   0           21.21.21.2      Ethernet0/0/1

33.33.33.0/24      BGP      256  0           100.100.100.2   InLoopBack0

51.51.51.0/24      BGP      256  0           100.100.100.2   InLoopBack0

 

<PE2>dis ip rou vpn vrf1

vrf1   Route Information

Routing Table:  vrf1   Route-Distinguisher:   100:1

Destination/Mask   Protocol Pre  Cost        Nexthop         Interface

21.21.21.0/24      BGP      256  0           100.100.100.1   InLoopBack0

32.32.32.0/24      BGP      256  0           100.100.100.1   InLoopBack0

33.33.33.0/24      STATIC   60   0           51.51.51.1      Ethernet0/1

51.51.51.0/24      DIRECT   0    0           51.51.51.2      Ethernet0/1

51.51.51.2/32      DIRECT   0    0           127.0.0.1       InLoopBack0

 

2.查看ipsec sa建立情况:

 [CE1]dis ike sa

total phase-1 SAs:  1

connection-id  peer            flag        phase   doi

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

3          21.21.21.1      RD|ST         2     IPSEC

2          21.21.21.1      RD|ST         1     IPSEC

flag meaning

RD--READY ST--STAYALIVE RL--REPLACED FD--FADING TO—TIMEOUT

[CE1]dis ipsec sa

===============================

Interface: Ethernet0/1

path MTU: 1500

===============================

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

IPsec policy name: "map"

sequence number: 1

mode: isakmp

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

connection id: 3

encapsulation mode: tunnel

perfect forward secrecy: None

tunnel:

local  address: 21.21.21.2

remote address: 21.21.21.1

flow:    (5 times matched)

sour addr: 32.32.32.0/255.255.255.0  port: 0  protocol: IP

dest addr: 33.33.33.0/255.255.255.0  port: 0  protocol: IP

[inbound ESP SAs]

spi: 1876033376 (0x6fd1ff60)

proposal: ESP-ENCRYPT-DES ESP-AUTH-MD5

sa remaining key duration (bytes/sec): 1887436464/2999

max received sequence-number: 4

udp encapsulation used for nat traversal: N

[outbound ESP SAs]

spi: 3601361327 (0xd6a869af)

proposal: ESP-ENCRYPT-DES ESP-AUTH-MD5

sa remaining key duration (bytes/sec): 1887436464/2999

max sent sequence-number: 5

udp encapsulation used for nat traversal: N

 

[PE1]dis ipsec tunnel

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

Connection ID : 3

Perfect forward secrecy: None

SA's SPI :

Inbound :  3601361327 (0xd6a869af) [ESP]

Outbound : 1876033376 (0x6fd1ff60) [ESP]

Tunnel :

Local Address:  21.21.21.1  Remote Address : 21.21.21.2

Flow :     (8 times matched)

Sour Addr : 33.33.33.0/255.255.255.0  Port: 0  Protocol : IP

Dest Addr : 32.32.32.0/255.255.255.0  Port: 0  Protocol : IP

 

3.CE1ping验证:ping -a 32.32.32.1 33.33.33.1

 

 

若您有关于案例的建议,请反馈:

作者在2007-05-29对此案例进行了修订
0 个评论

该案例暂时没有网友评论

编辑评论

举报

×

侵犯我的权益 >
对根叔知了社区有害的内容 >
辱骂、歧视、挑衅等(不友善)

侵犯我的权益

×

泄露了我的隐私 >
侵犯了我企业的权益 >
抄袭了我的内容 >
诽谤我 >
辱骂、歧视、挑衅等(不友善)
骚扰我

泄露了我的隐私

×

您好,当您发现根叔知了上有泄漏您隐私的内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到pub.zhiliao@h3c.com 邮箱,我们会尽快处理。
  • 1. 您认为哪些内容泄露了您的隐私?(请在邮件中列出您举报的内容、链接地址,并给出简短的说明)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)

侵犯了我企业的权益

×

您好,当您发现根叔知了上有关于您企业的造谣与诽谤、商业侵权等内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到 pub.zhiliao@h3c.com 邮箱,我们会在审核后尽快给您答复。
  • 1. 您举报的内容是什么?(请在邮件中列出您举报的内容和链接地址)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)
  • 3. 是哪家企业?(营业执照,单位登记证明等证件)
  • 4. 您与该企业的关系是?(您是企业法人或被授权人,需提供企业委托授权书)
我们认为知名企业应该坦然接受公众讨论,对于答案中不准确的部分,我们欢迎您以正式或非正式身份在根叔知了上进行澄清。

抄袭了我的内容

×

原文链接或出处

诽谤我

×

您好,当您发现根叔知了上有诽谤您的内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到pub.zhiliao@h3c.com 邮箱,我们会尽快处理。
  • 1. 您举报的内容以及侵犯了您什么权益?(请在邮件中列出您举报的内容、链接地址,并给出简短的说明)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)
我们认为知名企业应该坦然接受公众讨论,对于答案中不准确的部分,我们欢迎您以正式或非正式身份在根叔知了上进行澄清。

对根叔知了社区有害的内容

×

垃圾广告信息
色情、暴力、血腥等违反法律法规的内容
政治敏感
不规范转载 >
辱骂、歧视、挑衅等(不友善)
骚扰我
诱导投票

不规范转载

×

举报说明

提出建议

    +

亲~登录后才可以操作哦!

确定

亲~检测到您登陆的账号未在http://hclhub.h3c.com进行注册

注册后可访问此模块

跳转hclhub

你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作