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

Typical Configuration Of GRE-Over-IPSec Configuration on AR Series Routers

2007-09-13 发表
  • 0关注
  • 0收藏 499浏览
粉丝: 关注:

Typical Configuration Of GRE-Over-IPSec Configuration on AR Series Routers

 

[Requirements]

Branches 1 and 2 are connected to the center by means of aggressive IPSec, and run OSPF on the tunnel by using GRE -Over-IPSec to interwork with the headquarters.

[Networking diagram]

 

[Configuration script]

Configuration script (center)

#

sysname Center

#

ike local-name center              /Local-name of the center IKE is center/

#

router id 1.1.1.1

#

radius scheme system

#

domain system

#

ike peer branch1                 /Configure the IKE peer to branch 1/

exchange-mode aggressive         /Set IPSec to the aggressive mode/

pre-shared-key abc               /Set the pre-shared key to abc/

id-type name                     /Configure name as the ID used in IKE negotiation/

remote-name branch1              /Set the name of branch 1 as branch1/

#

ike peer branch2                  /Configure the IKE peer to branch 2/

exchange-mode aggressive

pre-shared-key abc

id-type name

remote-name branch2

#

ipsec proposal 1                  /Define IPSec proposal/

#

ipsec policy center 10 isakmp     /Configure the IPsec policy to branch 1/

security acl 3001                /Specify the number of ACL applied in IPSec policy/

ike-peer branch1                /Apply the IKE peer/

proposal 1                      /Apply the IPSec proposal/

#

ipsec policy center 20 isakmp    /The configuration for branch 2 is similar to that for branch 1/

security acl 3002

ike-peer branch2

proposal 1

#

acl number 3001                  /Define the GRE data stream from center to branch 1/

rule 0 permit gre source 202.101.1.2 0 destination 202.101.2.2 0

acl number 3002                  /Define the GRE data stream from center to branch 2/

rule 0 permit gre source 202.101.1.2 0 destination 202.101.3.2 0

#

interface Serial2/0

link-protocol ppp

ip address 202.101.1.2 255.255.255.252

ipsec policy center              /Apply the IPSec policy on the egress of the Internet/

#

interface Tunnel0                 /Configure the GRE tunnel between center and branch 1/

ip address 10.0.0.1 255.255.255.252

source 202.101.1.2

destination 202.101.2.2

#

interface Tunnel1                 /Configure the GRE tunnel between center and branch 2/

ip address 10.0.0.5 255.255.255.252

source 202.101.1.2

destination 202.101.3.2

#

interface NULL0

#

interface LoopBack0

ip address 1.1.1.1 255.255.255.255

#

interface Ethernet0/0

ip address 192.168.1.1 255.255.255.0  /Intranet address of the center/

#

ospf 1

area 0.0.0.10                        /Branch 1 belongs to area 10/

network 10.0.0.0 0.0.0.3

#

area 0.0.0.20                        /Branch 2 belongs to area 20/

network 10.0.0.4 0.0.0.3

#

area 0.0.0.0                         /The headquarters belongs to area 0/

network 1.1.1.1 0.0.0.0

network 192.168.1.0 0.0.0.255

#

ip route-static 0.0.0.0 0.0.0.0 202.101.1.1 preference 60

#

user-interface con 0

user-interface vty 0 4

#

return

Configuration script (branch 1)

#

sysname Branch1

#

ike local-name branch1             /Local-name of the branch 1 IKE is branch1/

#

radius scheme system

#

domain system

#

ike peer center                     /Configure the IKE peer to the center/

exchange-mode aggressive           /Set IPSec to the aggressive mode/

pre-shared-key abc                 /Set the pre-shared key to abc/

id-type name                       /Configure name as the ID used in IKE negotiation/

remote-name center                 /The peer name is center/

remote-address 202.101.1.2         /The peer address is 202.101.1.2 (Internet address of the center)/

#

ipsec proposal 1                    /Define IPSec proposal/

#

ipsec policy branch1 10 isakmp      /Configure the IPsec policy to the center/

security acl 3001                  /Specify the number of ACL applied in IPSec policy/

ike-peer center                    /Apply the IKE peer/

proposal 1                         /Apply the IPSec proposal/

#

acl number 3001                     /Define the GRE data stream from branch 1 to center/

rule 0 permit gre source 202.101.2.2 0 destination 202.101.1.2 0

#

interface Serial2/0

link-protocol ppp

ip address 202.101.2.2 255.255.255.252

ipsec policy branch1               /Apply the IPSec policy on the egress of the Internet/

#

interface Tunnel0                   /Configure the GRE tunnel between branch 1 and center/

ip address 10.0.0.2 255.255.255.252

source 202.101.2.2

destination 202.101.1.2

#

interface NULL0

#

interface LoopBack0

ip address 2.2.2.2 255.255.255.255

#

interface Ethernet0/0               /Configure the intranet address for branch 1/

ip address 192.168.2.1 255.255.255.0

#

ospf 1

area 0.0.0.10                      /Branch 1 belongs to area 10/

network 2.2.2.2 0.0.0.0

network 10.0.0.0 0.0.0.3

network 192.168.2.0 0.0.0.255

#

ip route-static 0.0.0.0 0.0.0.0 202.101.2.1 preference 60

#

user-interface con 0

user-interface vty 0 4

#

return

 

Configuration script (branch 2)

#

sysname Branch2

#

ike local-name branch1         /Local-name of the branch 2 IKE is branch2/

#

radius scheme system

#

domain system

#

ike peer center                /Configure the IKE peer to the center/

exchange-mode aggressive      /Set IPSec to the aggressive mode/

pre-shared-key abc            /Set the pre-shared key to abc/

id-type name                  /Configure name as the ID used in IKE negotiation/

remote-name center            /The peer name is center/

remote-address 202.101.1.2    /The peer address is 202.101.1.2 (Internet address of the center)/

#

ipsec proposal 1               /Define IPSec proposal/

#

ipsec policy branch1 10 isakmp /Configure the IPsec policy to the center/

security acl 3001             /Specify the number of ACL applied in IPSec policy/

ike-peer center               /Apply the IKE peer/

proposal 1                    /Apply the IPSec proposal/

#

acl number 3001                /Define the GRE data stream from branch 2 to center/

rule 0 permit gre source 202.101.3.2 0 destination 202.101.1.2 0

#

interface Serial2/0

link-protocol ppp

ip address 202.101.3.2 255.255.255.252

ipsec policy branch2          /Apply the IPSec policy on the egress of the Internet/

#

interface Tunnel0              /Configure the GRE tunnel between branch 2 and center/

ip address 10.0.0.6 255.255.255.252

source 202.101.3.2

destination 202.101.1.2

#

interface NULL0

#

interface LoopBack0

ip address 3.3.3.3 255.255.255.255

#

interface Ethernet0/0           /Configure the intranet address for branch 2/

ip address 192.168.3.1 255.255.255.0

#

ospf 1

area 0.0.0.20                  /Branch 2 belongs to area 20/

network 3.3.3.3 0.0.0.0

network 10.0.0.4 0.0.0.3

network 192.168.3.0 0.0.0.255

#

ip route-static 0.0.0.0 0.0.0.0 202.101.3.1 preference 60

#

user-interface con 0

user-interface vty 0 4

#

return

 

 


[Verification]

1. IKE SA status on the center:

disp ike sa

    connection-id  peer            flag        phase   doi

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

        4          202.101.3.2     RD            1     IPSEC

        5          202.101.3.2     RD            2     IPSEC

        2          202.101.2.2     RD            1     IPSEC

        3          202.101.2.2     RD            2     IPSEC

 

  flag meaning

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

 

2. IPSec SA status on the center:

disp ipsec sa

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

Interface: Serial2/0/0

    path MTU: 1500

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

 

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

  IPsec policy name: "center"

  sequence number: 10

  mode: isakmp

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

    connection id: 3

    encapsulation mode: tunnel

    perfect forward secrecy: None

    tunnel:

        local  address: 202.101.1.2

        remote address: 202.101.2.2

    flow:    (72 times matched)

        sour addr: 202.101.1.2/255.255.255.255  port: 0  protocol: GRE

        dest addr: 202.101.2.2/255.255.255.255  port: 0  protocol: GRE

 

    [inbound ESP SAs]

      spi: 1168206412 (0x45a16a4c)

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

      sa remaining key duration (bytes/sec): 1887434028/3365

      max received sequence-number: 33   

      udp encapsulation used for nat traversal: N

 

    [outbound ESP SAs]

      spi: 2150942891 (0x8034c8ab)

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

      sa remaining key duration (bytes/sec): 1887433260/3365

      max sent sequence-number: 36

      udp encapsulation used for nat traversal: N

 

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

  IPsec policy name: "center"

  sequence number: 20

  mode: isakmp

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

    connection id: 4

    encapsulation mode: tunnel

    perfect forward secrecy: None

    tunnel:

        local  address: 202.101.1.2

        remote address: 202.101.3.2

    flow:    (73 times matched)

        sour addr: 202.101.1.2/255.255.255.255  port: 0  protocol: GRE

        dest addr: 202.101.3.2/255.255.255.255  port: 0  protocol: GRE

 

    [inbound ESP SAs]                    

      spi: 2624895419 (0x9c74b9bb)       

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

      sa remaining key duration (bytes/sec): 1887433796/3385

      max received sequence-number: 35

      udp encapsulation used for nat traversal: N

 

    [outbound ESP SAs]

      spi: 1281853764 (0x4c678944)

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

      sa remaining key duration (bytes/sec): 1887432856/3385

      max sent sequence-number: 39

      udp encapsulation used for nat traversal: N

 

3. Routing table on the center:

disp ip rout

 Routing Table: public net

Destination/Mask   Protocol Pre  Cost        Nexthop         Interface

0.0.0.0/0          STATIC   60   0           202.101.1.1     Serial2/0/0

1.1.1.1/32         DIRECT   0    0           127.0.0.1       InLoopBack0

2.2.2.2/32         OSPF     10   1563        10.0.0.2        Tunnel0

3.3.3.3/32         OSPF     10   1563        10.0.0.6        Tunnel1

10.0.0.0/30        DIRECT   0    0           10.0.0.1        Tunnel0

10.0.0.1/32        DIRECT   0    0           127.0.0.1       InLoopBack0

10.0.0.4/30        DIRECT   0    0           10.0.0.5        Tunnel1

10.0.0.5/32        DIRECT   0    0           127.0.0.1       InLoopBack0

127.0.0.0/8        DIRECT   0    0           127.0.0.1       InLoopBack0

127.0.0.1/32       DIRECT   0    0           127.0.0.1       InLoopBack0

192.168.1.0/24     DIRECT   0    0           192.168.1.1     LoopBack10

192.168.1.1/32     DIRECT   0    0           127.0.0.1       InLoopBack0

192.168.2.0/24     OSPF     10   1563        10.0.0.2        Tunnel0

192.168.3.0/24     OSPF     10   1563        10.0.0.6        Tunnel1

202.101.1.0/30     DIRECT   0    0           202.101.1.2     Serial2/0/0

202.101.1.1/32     DIRECT   0    0           202.101.1.1     Serial2/0/0

202.101.1.2/32     DIRECT   0    0           127.0.0.1       InLoopBack0

 

4. IKE SA status on branch 1:

disp ike sa

    connection-id  peer            flag        phase   doi

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

        2          202.101.1.2     RD|ST         1     IPSEC

        3          202.101.1.2     RD|ST         2     IPSEC

 

  flag meaning

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

 

5. IPSec SA status on branch 1:

disp ipsec sa

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

Interface: Serial2/0/0

    path MTU: 1500

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

 

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

  IPsec policy name: "branch1"

  sequence number: 10

  mode: isakmp

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

    connection id: 3

    encapsulation mode: tunnel

    perfect forward secrecy: None

    tunnel:

        local  address: 202.101.2.2

        remote address: 202.101.1.2

    flow:    (82 times matched)

        sour addr: 202.101.2.2/255.255.255.255  port: 0  protocol: GRE

        dest addr: 202.101.1.2/255.255.255.255  port: 0  protocol: GRE

 

    [inbound ESP SAs]

      spi: 2150942891 (0x8034c8ab)

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

      sa remaining key duration (bytes/sec): 1887433256/3293

      max received sequence-number: 42   

      udp encapsulation used for nat traversal: N

 

    [outbound ESP SAs]

      spi: 1168206412 (0x45a16a4c)

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

      sa remaining key duration (bytes/sec): 1887432880/3293

      max sent sequence-number: 41

      udp encapsulation used for nat traversal: N

 

6. Routing table on branch 1:

disp ip rout

 Routing Table: public net

Destination/Mask   Protocol Pre  Cost        Nexthop         Interface

0.0.0.0/0          STATIC   60   0           202.101.2.1     Serial2/0/0

1.1.1.1/32         OSPF     10   1563        10.0.0.1        Tunnel0

2.2.2.2/32         DIRECT   0    0           127.0.0.1       InLoopBack0

3.3.3.3/32         OSPF     10   3125        10.0.0.1        Tunnel0

10.0.0.0/30        DIRECT   0    0           10.0.0.2        Tunnel0

10.0.0.2/32        DIRECT   0    0           127.0.0.1       InLoopBack0

10.0.0.4/30        OSPF     10   3124        10.0.0.1        Tunnel0

127.0.0.0/8        DIRECT   0    0           127.0.0.1       InLoopBack0

127.0.0.1/32       DIRECT   0    0           127.0.0.1       InLoopBack0

192.168.1.0/24     OSPF     10   1563        10.0.0.1        Tunnel0

192.168.2.0/24     DIRECT   0    0           192.168.2.1     LoopBack10

192.168.2.1/32     DIRECT   0    0           127.0.0.1       InLoopBack0

192.168.3.0/24     OSPF     10   3125        10.0.0.1        Tunnel0

202.101.2.0/30     DIRECT   0    0           202.101.2.2     Serial2/0/0

202.101.2.1/32     DIRECT   0    0           202.101.2.1     Serial2/0/0

202.101.2.2/32     DIRECT   0    0           127.0.0.1       InLoopBack0

 

[Tip]

1. Differences between IPSec -Over-GRE and GRE-Over-IPSec in configuration:

 

 

GRE-Over-IPSec

IPSec-Over-GRE

ACL definition

GRE data stream

Intranet data stream

Remote-address specified in IKE peer

Internet address of the peer

GRE tunnel address of the peer

Applied port

Internet egress

On the GRE tunnel

 

2. The branches interwork with the headquarters by OSPF routing. If OSPF is not configured, you need to configure static routes between the branches and the headquarters.

[Center configuration]

ip route-static 192.168.2.0 255.255.255.0 Tunnel 0 preference 60  /The data to the intranet of branch 1 goes through tunnel 0/

 ip route-static 192.168.3.0 255.255.255.0 Tunnel 1 preference 60  /The data to the intranet of branch 2 goes through tunnel 1/

 

[Branch 1 configuration]

 ip route-static 192.168.1.0 255.255.255.0 Tunnel 0 preference 60    /The data to the intranet of the center goes through tunnel 0/

 

[Branch 2 configuration]

 ip route-static 192.168.1.0 255.255.255.0 Tunnel 0 preference 60    /The data to the intranet of the center goes through tunnel 0/

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

作者在2007-10-12对此案例进行了修订
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

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