• All
  • Test
  • Startup
  • Experience Case
  • FAQ
Product line
Search
Cancel
Documents type
Author
Time
Search

Multi subnet VPN ipsec

2022-06-25 04:48:41 Published
  • 0Followed
  • -1Collected ,338Browsed
fans:1 follow:0

Network Topology


router A have 3 subnets, router B have 1 subnet, only create one ipsec-vpn.


Configuration Steps

Route A:

#

 sysname Route A

#

ospf 1

 area 0.0.0.0

  network 2.2.2.0 0.0.0.255

#

#

interface LoopBack0

 ip address 192.168.0.1 255.255.255.0

#

interface LoopBack1

 ip address 10.212.0.1 255.255.255.0

#

interface GigabitEthernet0/0

 port link-mode route

 description mgt

 combo enable copper

 ip address 1.1.1.1 255.255.255.0

#

interface GigabitEthernet0/1

 port link-mode route

 combo enable copper

 ip address 10.1.1.1 255.255.255.0

#

interface GigabitEthernet0/2

 port link-mode route

 combo enable copper

 ip address 2.2.2.1 255.255.255.0

 ipsec apply policy map1

#

 ip route-static 10.1.2.0 24 GigabitEthernet0/2 2.2.2.2

#

 ssh server enable

#

acl advanced 3001

 rule 0 permit ip source 10.1.1.0 0.0.0.255 destination 10.1.2.0 0.0.0.255

 rule 5 permit ip source 192.168.0.0 0.0.0.255 destination 10.1.2.0 0.0.0.255

 rule 10 permit ip source 10.212.0.0 0.0.0.255 destination 10.1.2.0 0.0.0.255

#

#

ipsec transform-set tran1

 esp encryption-algorithm aes-cbc-128

 esp authentication-algorithm sha1

#

ipsec policy map1 10 isakmp

 transform-set tran1

 security acl 3001

 local-address 2.2.2.1

 remote-address 2.2.3.1

 ike-profile profile1

#

ike profile profile1

 keychain keychain1

 match remote identity address 2.2.3.1 255.255.255.0

#

ike keychain keychain1

 pre-shared-key address 2.2.3.1 255.255.255.0 key cipher $c$3$xWK8Ib7X6RlFZLR5I7w6I4+n1k4GmOyrvac=

#


Router B:

#

 sysname Router B

#

ospf 1

 area 0.0.0.0

  network 2.2.3.0 0.0.0.255

#

#

interface GigabitEthernet0/0

 port link-mode route

 combo enable copper

 ip address 1.1.1.2 255.255.255.0

#

interface GigabitEthernet0/1

 port link-mode route

 combo enable copper

 ip address 10.1.2.1 255.255.255.0

#

interface GigabitEthernet0/2

 port link-mode route

 combo enable copper

 ip address 2.2.3.1 255.255.255.0

 ipsec apply policy use1

#

 ip route-static 10.1.1.0 24 GigabitEthernet0/2 2.2.3.2

 ip route-static 10.212.0.0 24 GigabitEthernet0/2 2.2.3.2

 ip route-static 192.168.0.0 24 GigabitEthernet0/2 2.2.3.2

#

 ssh server enable

#

acl advanced 3001

 rule 0 permit ip source 10.1.2.0 0.0.0.255 destination 10.1.1.0 0.0.0.255

 rule 5 permit ip source 10.1.2.0 0.0.0.255 destination 192.168.0.0 0.0.0.255

 rule 10 permit ip source 10.1.2.0 0.0.0.255 destination 10.212.0.0 0.0.0.255

#

#

ipsec transform-set tran1

 esp encryption-algorithm aes-cbc-128

 esp authentication-algorithm sha1

#

ipsec policy use1 10 isakmp

 transform-set tran1

 security acl 3001

 local-address 2.2.3.1

 remote-address 2.2.2.1

 ike-profile profile1

#

ike profile profile1

 keychain keychain1

 match remote identity address 2.2.2.1 255.255.255.0

#

ike keychain keychain1

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

#


////verification result:

dis ipsec sa

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

Interface: GigabitEthernet0/2

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

 

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

  IPsec policy: map1

  Sequence number: 10

  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: 2.2.2.1

        remote address: 2.2.3.1

    Flow:

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

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

 

    [Inbound ESP SAs]

      SPI: 3867484883 (0xe68522d3)

      Connection ID: 4294967296

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

      SA duration (kilobytes/sec): 1843200/3600

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

      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: 1150524503 (0x44939c57)

      Connection ID: 4294967297

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

      SA duration (kilobytes/sec): 1843200/3600

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

      Max sent sequence-number: 4

      UDP encapsulation used for NAT traversal: N

      Status: Active

 

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

  IPsec policy: map1

  Sequence number: 10

  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: 2.2.2.1

        remote address: 2.2.3.1

    Flow:

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

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

 

    [Inbound ESP SAs]

      SPI: 1056131476 (0x3ef34994)

      Connection ID: 4294967298

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

      SA duration (kilobytes/sec): 1843200/3600

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

      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: 1381768642 (0x525c1dc2)

      Connection ID: 4294967299

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

      SA duration (kilobytes/sec): 1843200/3600

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

      Max sent sequence-number: 4

      UDP encapsulation used for NAT traversal: N

      Status: Active

 

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

  IPsec policy: map1

  Sequence number: 10

  Mode: ISAKMP

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

    Tunnel id: 2

    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: 2.2.3.1

    Flow:

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

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

 

    [Inbound ESP SAs]

      SPI: 890041887 (0x350cf61f)

      Connection ID: 4294967300

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

      SA duration (kilobytes/sec): 1843200/3600

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

      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: 228441179 (0x0d9dbc5b)

      Connection ID: 4294967301

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

      SA duration (kilobytes/sec): 1843200/3600

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

      Max sent sequence-number: 4

      UDP encapsulation used for NAT traversal: N

      Status: Active

Key Configuration

acl & router-static

Please rate this case:   
0 comments

No comments

Add Comments:

举报

×

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

侵犯我的权益

×

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

泄露了我的隐私

×

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

侵犯了我企业的权益

×

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

抄袭了我的内容

×

原文链接或出处

诽谤我

×

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

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

×

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

不规范转载

×

举报说明

提出建议

    +

Login before you can operate!

login

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