• 全部
  • 經驗案例
  • 典型配置
  • 技術公告
  • FAQ
  • 漏洞說明
  • 全部
  • 全部
  • 大數據引擎
  • 知了引擎
產品線
搜索
取消
案例類型
發布者
是否解決
是否官方
時間
搜索引擎
匹配模式
高級搜索

HCL模擬MSR V7平台路由器GRE over IPSec VPN多分支互通

  • 0關注
  • 1收藏 5485瀏覽
粉絲:0人 關注:0人

組網及說明

1.組網拓撲

2.需求描述:

實現兩個分部內網終端能夠通過GRE over IPSec VPN隧道訪問到總部,也能通過總部實現兩個分部的內網終端互通。

分部與總部終端用loopback接口替代,ip地址固定。

3.配置思路:

配置各個端口ip地址與靜態路由,配置GRE隧道與IPSec VPN相關命令實現流量的GRE封裝,並通過IPSec隧道進行保護傳輸至目的地。

配置步驟

1.RT1

1.1ACL列表:

Advanced IPv4 ACL 3001, 2 rules,

ACL's step is 5

 rule 0 permit ip source 1.1.1.0 0.0.0.255 destination 2.2.2.0 0.0.0.255

 rule 1 permit ip source 1.1.1.0 0.0.0.255 destination 3.3.3.0 0.0.0.255

 

Advanced IPv4 ACL 3002, 3 rules,

ACL's step is 5

 rule 0 deny ip source 1.1.1.0 0.0.0.255 destination 2.2.2.0 0.0.0.255

 rule 1 deny ip source 1.1.1.0 0.0.0.255 destination 3.3.3.0 0.0.0.255

 

 rule 2 permit ip

1.2 關鍵配置:

#

interface Tunnel0 mode gre

 ip address 10.0.0.1 255.255.255.0

 source 1.1.1.1

 destination 2.2.2.2

#

ipsec transform-set 1

 esp encryption-algorithm 3des-cbc

 esp authentication-algorithm md5

#

ipsec policy RT1 1 isakmp

 transform-set 1

 security acl 3001

 remote-address 2.2.2.2

 ike-profile RT1

#

ike profile RT1

 keychain RT1

 local-identity address 1.1.1.1

 match remote identity address 2.2.2.2 255.255.255.0

 proposal 1

#

ike proposal 1

 encryption-algorithm 3des-cbc

 authentication-algorithm md5

#

ike keychain RT1

 pre-shared-key address 2.2.2.2 255.255.255.0 key cipher $c$3$SyBhccDEm/kTkb3J7k6o2PZq10DEypOVEg==

#

interface LoopBack0

 ip address 192.168.1.10 255.255.255.0

#

interface GigabitEthernet0/0

 port link-mode route

 combo enable copper

 ip address 1.1.1.1 255.255.255.0

 nat outbound 3002

 ipsec apply policy RT1

#

 ip route-static 0.0.0.0 0 1.1.1.254

 ip route-static 192.168.2.0 24 Tunnel0

 ip route-static 192.168.3.0 24 Tunnel0

 

2.RT2

2.1ACL列表

Advanced IPv4 ACL 3001, 2 rules,

ACL's step is 5

 rule 0 permit ip source 2.2.2.0 0.0.0.255 destination 1.1.1.0 0.0.0.255

 rule 1 permit ip source 3.3.3.0 0.0.0.255 destination 1.1.1.0 0.0.0.255

 

Advanced IPv4 ACL 3002, 2 rules,

ACL's step is 5

 rule 0 permit ip source 2.2.2.0 0.0.0.255 destination 3.3.3.0 0.0.0.255

 rule 1 permit ip source 1.1.1.0 0.0.0.255 destination 3.3.3.0 0.0.0.255

 

Advanced IPv4 ACL 3003, 5 rules,

ACL's step is 5

 rule 0 deny ip source 2.2.2.0 0.0.0.255 destination 1.1.1.0 0.0.0.255

 rule 1 deny ip source 2.2.2.0 0.0.0.255 destination 3.3.3.0 0.0.0.255

 rule 2 deny ip source 1.1.1.0 0.0.0.255 destination 3.3.3.0 0.0.0.255

 rule 5 deny ip source 3.3.3.0 0.0.0.255 destination 1.1.1.0 0.0.0.255

 rule 6 permit ip

2.2關鍵配置:

#

interface Tunnel0 mode gre

 ip address 10.0.0.2 255.255.255.0

 source 2.2.2.2

 destination 1.1.1.1

#

interface Tunnel1 mode gre

 ip address 20.0.0.2 255.255.255.0

 source 2.2.2.2

 destination 3.3.3.3

#

ipsec transform-set 1

 esp encryption-algorithm 3des-cbc

 esp authentication-algorithm md5

#

ipsec policy RT2 1 isakmp

 transform-set 1

 security acl 3001

 remote-address 1.1.1.1

 ike-profile RT2-RT1

#

ipsec policy RT2 2 isakmp

 transform-set 1

 security acl 3002

 remote-address 3.3.3.3

 ike-profile RT2-RT3

#

ike profile RT2-RT1

 keychain RT2-RT1

 local-identity address 2.2.2.2

 match remote identity address 1.1.1.1 255.255.255.0

 proposal 1

#

ike profile RT2-RT3

 keychain RT2-RT3

 local-identity address 2.2.2.2

 match remote identity address 3.3.3.3 255.255.255.0

 proposal 1

#

ike proposal 1

 encryption-algorithm 3des-cbc

 authentication-algorithm md5

#

ike keychain RT2-RT1

 pre-shared-key address 1.1.1.1 255.255.255.0 key cipher $c$3$w74T8OIbosspb4Evy/1aSu3S+fb5SUJjeA==

#

ike keychain RT2-RT3

 pre-shared-key address 3.3.3.3 255.255.255.0 key cipher $c$3$YDfVYtM49YVzXjOKCn8NQFd8yN/D+Xpq2zzLZw==

#

interface LoopBack0

 ip address 192.168.2.10 255.255.255.0

#

interface GigabitEthernet0/0

 port link-mode route

 combo enable copper

 ip address 2.2.2.2 255.255.255.0

 nat outbound 3003

 ipsec apply policy RT2

#

 ip route-static 0.0.0.0 0 2.2.2.254

 ip route-static 192.168.1.0 24 Tunnel0

 ip route-static 192.168.3.0 24 Tunnel1

 

3.RT3

3.1ACL列表:

Advanced IPv4 ACL 3001, 2 rules,

ACL's step is 5

 rule 0 permit ip source 3.3.3.0 0.0.0.255 destination 2.2.2.0 0.0.0.255

 rule 1 permit ip source 3.3.3.0 0.0.0.255 destination 1.1.1.0 0.0.0.255

 

Advanced IPv4 ACL 3002, 3 rules,

ACL's step is 5

 rule 0 deny ip source 3.3.3.0 0.0.0.255 destination 2.2.2.0 0.0.0.255

 rule 1 deny ip source 3.3.3.0 0.0.0.255 destination 1.1.1.0 0.0.0.255

 rule 2 permit ip

3.2關鍵配置:

#

interface Tunnel1 mode gre

 ip address 20.0.0.1 255.255.255.0

 source 3.3.3.3

 destination 2.2.2.2

#

ipsec transform-set 1

 esp encryption-algorithm 3des-cbc

 esp authentication-algorithm md5

#

ipsec policy RT3 1 isakmp

 transform-set 1

 security acl 3001

 remote-address 2.2.2.2

 ike-profile RT3

#

ike profile RT3

 keychain RT3

 local-identity address 3.3.3.3

 match remote identity address 2.2.2.2 255.255.255.0

 proposal 1

#

ike proposal 1

 encryption-algorithm 3des-cbc

 authentication-algorithm md5

#

ike keychain RT3

 pre-shared-key address 2.2.2.2 255.255.255.0 key cipher $c$3$Fx1hsMm+uamipkMpvCFJr6wGrLORTkkBbgESOQ==

#

interface LoopBack0

 ip address 192.168.3.10 255.255.255.0

#

interface GigabitEthernet0/0

 port link-mode route

 combo enable copper

 ip address 3.3.3.3 255.255.255.0

 nat outbound 3002

 ipsec apply policy RT3

#

 ip route-static 0.0.0.0 0 3.3.3.254

 ip route-static 192.168.1.0 24 Tunnel1

 ip route-static 192.168.2.0 24 Tunnel1

 

4.Internet

4.1關鍵配置:

#

interface GigabitEthernet0/0

 port link-mode route

 combo enable copper

 ip address 1.1.1.254 255.255.255.0

#

interface GigabitEthernet0/1

 port link-mode route

 combo enable copper

 ip address 3.3.3.254 255.255.255.0

#

interface GigabitEthernet0/2

 port link-mode route

 combo enable copper

 ip address 2.2.2.254 255.255.255.0

#

 ip route-static 192.168.1.0 24 1.1.1.1

 ip route-static 192.168.2.0 24 2.2.2.2

 ip route-static 192.168.3.0 24 3.3.3.3

 

5.測試

RT1內網終端(分部1)ping通RT2內網終端(總部)

 

RT1內網終端(分部1)ping通RT3內網終端(分部2)

 

RT2總部查看ike sa與ipsec sa相關信息:

 <RT2>dis ike sa

    Connection-ID   Local               Remote              Flag      DOI

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

    1               2.2.2.2             1.1.1.1             RD        IPsec

    2               2.2.2.2             3.3.3.3             RD        IPsec

Flags:

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

 

<RT2>dis ipsec sa

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

Interface: GigabitEthernet0/0

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

 

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

  IPsec policy: RT2-RT1

  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

    Transmitting entity: Responder

    Path MTU: 1444

    Tunnel:

        local  address: 2.2.2.2

        remote address: 1.1.1.1

    Flow:

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

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

 

    [Inbound ESP SAs]

      SPI: 3085965188 (0xb7f01784)

      Connection ID: 4294967296

      Transform set: ESP-ENCRYPT-3DES-CBC ESP-AUTH-MD5

      SA duration (kilobytes/sec): 1843200/3600

      SA remaining duration (kilobytes/sec): 1843197/3577

      Max received sequence-number: 19

      Anti-replay check enable: Y

      Anti-replay window size: 64

      UDP encapsulation used for NAT traversal: N

      Status: Active

 

    [Outbound ESP SAs]

      SPI: 3622549341 (0xd7ebb75d)

      Connection ID: 4294967297

      Transform set: ESP-ENCRYPT-3DES-CBC ESP-AUTH-MD5

      SA duration (kilobytes/sec): 1843200/3600

      SA remaining duration (kilobytes/sec): 1843198/3577

      Max sent sequence-number: 18

      UDP encapsulation used for NAT traversal: N

      Status: Active

 

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

  IPsec policy: RT2-RT1

  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

    Transmitting entity: Initiator

    Path MTU: 1444

    Tunnel:

        local  address: 2.2.2.2

        remote address: 3.3.3.3

    Flow:

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

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

 

    [Inbound ESP SAs]

      SPI: 1899742260 (0x713bc434)

      Connection ID: 4294967298

      Transform set: ESP-ENCRYPT-3DES-CBC ESP-AUTH-MD5

      SA duration (kilobytes/sec): 1843200/3600

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

      Max received sequence-number: 9

      Anti-replay check enable: Y

      Anti-replay window size: 64

      UDP encapsulation used for NAT traversal: N

      Status: Active

 

    [Outbound ESP SAs]

      SPI: 62185102 (0x03b4de8e)

      Connection ID: 4294967299

      Transform set: ESP-ENCRYPT-3DES-CBC ESP-AUTH-MD5

      SA duration (kilobytes/sec): 1843200/3600

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

      Max sent sequence-number: 9

      UDP encapsulation used for NAT traversal: N

      Status: Active

 

 

 

 

配置關鍵點

1.如果之前已經在外網口配置了 nat outbound,需要先undo

2.隧道兩端注意加密算法和認證算法的統一

3.注意創建相關正確的ACL,把IPSec感興趣流從NAT轉換的數據deny掉,防止IPSec數據流被NAT優先轉換

4.ipsec policy RT2中創建序列號為1和2分別用於目的為分部1和分部2的策略

該案例對您是否有幫助:

您的評價:1

若您有關於案例的建議,請反饋:

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

你的郵箱還未認證,請認證郵箱或綁定手機後進行當前操作