• 全部
  • 经验案例
  • 典型配置
  • 技术公告
  • FAQ
  • 全部
  • 全部
产品线
搜索
取消
案例类型
发布者
是否解决
是否官方
时间
高级搜索

MSR v7 ipsec 公网单线路主模式加野蛮模式配置案例

2019-08-12 发表
  • 0关注
  • 4收藏,385浏览
粉丝:22人 关注:13人

组网及说明

需求:两个MSR36之间同时通过主模式和野蛮模式建立2条ipsec vpn隧道,公网线路只有一条,保护不同的数据流。


配置步骤

[A]设备的基本配置

interface GigabitEthernet0/0

 port link-mode route

 combo enable copper

 ip address dhcp-alloc

 ipsec apply policy policy1

#

ip route-static 192.168.2.0 24 1.1.1.2

ip route-static 192.168.4.0 24 1.1.1.2

#

acl advanced 3000

 rule 0 permit ip source 192.168.1.0 0.0.0.255 destination 192.168.2.0 0.0.0.255

#

acl advanced 3001

 rule 0 permit ip source 192.168.3.0 0.0.0.255 destination 192.168.4.0 0.0.0.255

#

ipsec transform-set tran1

 esp encryption-algorithm aes-cbc-128

 esp authentication-algorithm sha1

#

ipsec transform-set tran2

 esp encryption-algorithm aes-cbc-128

 esp authentication-algorithm sha1

#

ipsec policy policy1 1 isakmp

 transform-set tran1

 security acl 3000

 remote-address 2.2.2.1

 ike-profile profile1

#

ipsec policy policy1 2 isakmp

 transform-set tran2

 security acl 3001

 remote-address 8.8.8.8

 ike-profile profile2

#

 ike identity fqdn rta

#

ike profile profile1

 keychain keychain1

 exchange-mode aggressive

 match remote identity fqdn rtb

 proposal 1

#

ike profile profile2

 keychain keychain2

 local-identity address 1.1.1.1

 match remote identity address 8.8.8.8 255.255.255.255

 proposal 2

#

ike proposal 1

 authentication-algorithm md5

#

ike proposal 2

 encryption-algorithm 3des-cbc

 authentication-algorithm md5

#

ike keychain keychain1

 pre-shared-key address 2.2.2.1 255.255.255.0 key cipher $c$3$LPfGmJNHUhMEAwGOO6QmJOTYANy7SA==

#

ike keychain keychain2

 pre-shared-key address 8.8.8.8 255.255.255.255 key cipher $c$3$75RKWL/+vR9sbfeKRVzSvagndMMkc/M/GQ==

 

 

C设备的基本配置

interface LoopBack0

 ip address 8.8.8.8 255.255.255.255

#

interface GigabitEthernet0/0

 port link-mode route

 combo enable copper

 ip address 2.2.2.1 255.255.255.0

 ipsec apply policy policy1

 

ip route-static 192.168.1.0 24 2.2.2.2

 ip route-static 192.168.3.0 24 2.2.2.2

#

acl advanced 3000

 rule 0 permit ip source 192.168.2.0 0.0.0.255 destination 192.168.1.0 0.0.0.255

#

acl advanced 3001

 rule 0 permit ip source 192.168.4.0 0.0.0.255 destination 192.168.3.0 0.0.0.255

#

ipsec transform-set tran1

 esp encryption-algorithm aes-cbc-128

 esp authentication-algorithm sha1

#

ipsec transform-set tran2

 esp encryption-algorithm aes-cbc-128

 esp authentication-algorithm sha1

#

ipsec policy-template template1 1

 transform-set tran1

 security acl 3000

 ike-profile profile1

#

ipsec policy policy1 1 isakmp template template1

#

ipsec policy policy1 2 isakmp

 transform-set tran2

 security acl 3001

 local-address 8.8.8.8

 remote-address 1.1.1.1

 ike-profile profile2

#

 ike identity fqdn rtb

#

ike profile profile1

 keychain keychain1

 exchange-mode aggressive

 match remote identity fqdn rta

 proposal 1

#

ike profile profile2

 keychain keychain2

 local-identity address 8.8.8.8

 match remote identity address 1.1.1.1 255.255.255.0

 proposal 2

#

ike proposal 1

 authentication-algorithm md5

#

ike proposal 2

 encryption-algorithm 3des-cbc

 authentication-algorithm md5

#

ike keychain keychain1

 pre-shared-key hostname rta key cipher $c$3$pwVKjfLPeJTguQGt933ztIxPbum89Q==

#

ike keychain keychain2

 pre-shared-key address 1.1.1.1 255.255.255.0 key cipher $c$3$JdQsVUYxTEcCEtw2B4pXe/RdSBESdo81vw==

 

[PC1]ping 192.168.2.2

Ping 192.168.2.2 (192.168.2.2): 56 data bytes, press CTRL_C to break

56 bytes from 192.168.2.2: icmp_seq=0 ttl=253 time=3.000 ms

56 bytes from 192.168.2.2: icmp_seq=1 ttl=253 time=4.000 ms

56 bytes from 192.168.2.2: icmp_seq=2 ttl=253 time=2.000 ms

56 bytes from 192.168.2.2: icmp_seq=3 ttl=253 time=2.000 ms

56 bytes from 192.168.2.2: icmp_seq=4 ttl=253 time=1.000 ms

 

[PC3]ping 192.168.4.2

Ping 192.168.4.2 (192.168.4.2): 56 data bytes, press CTRL_C to break

56 bytes from 192.168.4.2: icmp_seq=0 ttl=253 time=7.000 ms

56 bytes from 192.168.4.2: icmp_seq=1 ttl=253 time=2.000 ms

56 bytes from 192.168.4.2: icmp_seq=2 ttl=253 time=2.000 ms

56 bytes from 192.168.4.2: icmp_seq=3 ttl=253 time=2.000 ms

56 bytes from 192.168.4.2: icmp_seq=4 ttl=253 time=2.000 ms

 

<A>dis ike sa

    Connection-ID   Remote                Flag         DOI

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

    3               8.8.8.8               RD           IPsec

    4               2.2.2.1               RD           IPsec

Flags:

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

<A>dis ipsec sa

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

Interface: GigabitEthernet0/0

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

 

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

  IPsec policy: policy1

  Sequence number: 1

  Mode: ISAKMP

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

    Tunnel id: 0

    Encapsulation mode: tunnel

    Perfect Forward Secrecy:

    Inside VPN:

    Extended Sequence Numbers enable: N

    Traffic Flow Confidentiality enable: N

    Path MTU: 1428

    Tunnel:

        local  address: 1.1.1.1

        remote address: 2.2.2.1

    Flow:

        sour addr: 192.168.1.0/255.255.255.0  port: 0  protocol: ip

        dest addr: 192.168.2.0/255.255.255.0  port: 0  protocol: ip

 

    [Inbound ESP SAs]

      SPI: 1851293844 (0x6e588094)

      Connection ID: 12884901889

      Transform set: ESP-ENCRYPT-AES-CBC-128 ESP-AUTH-SHA1

      SA duration (kilobytes/sec): 1843200/3600

      SA remaining duration (kilobytes/sec): 1843199/3586

      Max received sequence-number: 4

      Anti-replay check enable: Y

      Anti-replay window size: 64

      UDP encapsulation used for NAT traversal: N

      Status: Active

 

    [Outbound ESP SAs]

      SPI: 706730433 (0x2a1fd9c1)

      Connection ID: 12884901888

      Transform set: ESP-ENCRYPT-AES-CBC-128 ESP-AUTH-SHA1

      SA duration (kilobytes/sec): 1843200/3600

      SA remaining duration (kilobytes/sec): 1843199/3586

      Max sent sequence-number: 4

      UDP encapsulation used for NAT traversal: N

      Status: Active

 

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

  IPsec policy: policy1

  Sequence number: 2

  Mode: ISAKMP

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

    Tunnel id: 1

    Encapsulation mode: tunnel

    Perfect Forward Secrecy:

    Inside VPN:

    Extended Sequence Numbers enable: N

    Traffic Flow Confidentiality enable: N

    Path MTU: 1428

    Tunnel:

        local  address: 1.1.1.1

        remote address: 8.8.8.8

    Flow:

        sour addr: 192.168.3.0/255.255.255.0  port: 0  protocol: ip

        dest addr: 192.168.4.0/255.255.255.0  port: 0  protocol: ip

 

    [Inbound ESP SAs]

      SPI: 4132429910 (0xf64fe056)

      Connection ID: 12884901891

      Transform set: ESP-ENCRYPT-AES-CBC-128 ESP-AUTH-SHA1

      SA duration (kilobytes/sec): 1843200/3600

      SA remaining duration (kilobytes/sec): 1843199/3478

      Max received sequence-number: 4

      Anti-replay check enable: Y

      Anti-replay window size: 64

      UDP encapsulation used for NAT traversal: N

      Status: Active

 

    [Outbound ESP SAs]

      SPI: 645568134 (0x267a9686)

      Connection ID: 55834574850

      Transform set: ESP-ENCRYPT-AES-CBC-128 ESP-AUTH-SHA1

      SA duration (kilobytes/sec): 1843200/3600

      SA remaining duration (kilobytes/sec): 1843199/3478

      Max sent sequence-number: 4

      UDP encapsulation used for NAT traversal: N

      Status: Active

 

<C>display ike sa

    Connection-ID   Remote                Flag         DOI

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

    3               1.1.1.1               RD           IPsec

    4               1.1.1.1               RD           IPsec

Flags:

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

<C>display ipsec sa

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

Interface: GigabitEthernet0/0

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

 

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

  IPsec policy: policy1

  Sequence number: 1

  Mode: Template

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

    Tunnel id: 0

    Encapsulation mode: tunnel

    Perfect Forward Secrecy:

    Inside VPN:

    Extended Sequence Numbers enable: N

    Traffic Flow Confidentiality enable: N

    Path MTU: 1428

    Tunnel:

        local  address: 2.2.2.1

        remote address: 1.1.1.1

    Flow:

        sour addr: 192.168.2.0/255.255.255.0  port: 0  protocol: ip

        dest addr: 192.168.1.0/255.255.255.0  port: 0  protocol: ip

 

    [Inbound ESP SAs]

      SPI: 706730433 (0x2a1fd9c1)

      Connection ID: 12884901889

      Transform set: ESP-ENCRYPT-AES-CBC-128 ESP-AUTH-SHA1

      SA duration (kilobytes/sec): 1843200/3600

      SA remaining duration (kilobytes/sec): 1843199/3592

      Max received sequence-number: 4

      Anti-replay check enable: Y

      Anti-replay window size: 64

      UDP encapsulation used for NAT traversal: N

      Status: Active

 

    [Outbound ESP SAs]

      SPI: 1851293844 (0x6e588094)

      Connection ID: 12884901888

      Transform set: ESP-ENCRYPT-AES-CBC-128 ESP-AUTH-SHA1

      SA duration (kilobytes/sec): 1843200/3600

      SA remaining duration (kilobytes/sec): 1843199/3592

      Max sent sequence-number: 4

      UDP encapsulation used for NAT traversal: N

      Status: Active

 

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

  IPsec policy: policy1

  Sequence number: 2

  Mode: ISAKMP

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

    Tunnel id: 1

    Encapsulation mode: tunnel

    Perfect Forward Secrecy:

    Inside VPN:

    Extended Sequence Numbers enable: N

    Traffic Flow Confidentiality enable: N

    Path MTU: 1428

    Tunnel:

        local  address: 8.8.8.8

        remote address: 1.1.1.1

    Flow:

        sour addr: 192.168.4.0/255.255.255.0  port: 0  protocol: ip

        dest addr: 192.168.3.0/255.255.255.0  port: 0  protocol: ip

 

    [Inbound ESP SAs]

      SPI: 645568134 (0x267a9686)

      Connection ID: 12884901891

      Transform set: ESP-ENCRYPT-AES-CBC-128 ESP-AUTH-SHA1

      SA duration (kilobytes/sec): 1843200/3600

      SA remaining duration (kilobytes/sec): 1843199/3484

      Max received sequence-number: 4

      Anti-replay check enable: Y

      Anti-replay window size: 64

      UDP encapsulation used for NAT traversal: N

      Status: Active

 

    [Outbound ESP SAs]

      SPI: 4132429910 (0xf64fe056)

      Connection ID: 12884901890

      Transform set: ESP-ENCRYPT-AES-CBC-128 ESP-AUTH-SHA1

      SA duration (kilobytes/sec): 1843200/3600

      SA remaining duration (kilobytes/sec): 1843199/3484

      Max sent sequence-number: 4

      UDP encapsulation used for NAT traversal: N

      Status: Active

配置关键点

0 个评论

该案例暂时没有网友评论

编辑评论

举报

×

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

侵犯我的权益

×

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

泄露了我的隐私

×

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

侵犯了我企业的权益

×

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

抄袭了我的内容

×

原文链接或出处

诽谤我

×

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

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

×

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

不规范转载

×

举报说明

提出建议

    +
<

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

确定

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