04
2023
12
23:48:14

总部双出口固定IP、分支动态地址IPSec备份, IPSec GRE,



推荐点击下面图片,通过本站淘宝优惠价购买:

image.png

MSR系列路由器

总部双出口固定IP、分支动态地址IPSec备份

关键字IPSecGRE,双线路备份,VPN

一、组网

二、客户需求

总部使用联通、电信双出口,分支单出口。要求总部和分支之间通过IPSec建立VPN,并进行相互备份。部分分支与总部联通线路相连,电信链路作为备份;另一部分与总部电信线路相连,联通线路作为备份。

假设RTC是优选电信线路,RTD是优选联通线路。

三、设计方案

地址,路由设计:

1.       假设分支和总部合起来不超过126个,那么所有Loopback可以使用一个192.168.254.0C类网段,如果超过,就使用192.168.254.0192.168.253.0两个C网段。

2.       所有Loopback0对应联通线路,从192.168.254.1192.168.254.126,如总部可以使用192.168.254.1,其余分支从2126

3.       所有Loopback1对应电信线路,从192.168.254.129192.168.253.254,如总部可以使用192.168.254.129,其余分支从130254

4.       总部和各分支的Loopback0作为源、目的建立一条GRE隧道,tunnel编号从2126,对应分支loopback0地址末端,便于记忆,该隧道只从联通线路建立。

5.       总部和各分支的Loopback1作为源、目的建立一条GRE隧道,tunnel编号从130254,对应分支loopback1地址末端,便于记忆,该隧道只从电信线路建立。

6.       GRE隧道上配置Keeplive,用于监测tunnel接口状态,使用Keeplive后就不需要使用NQA探测了。

7.       总部配置各Loopback0路由ip routing-table 192.168.254.0 25 联通出口。

8.       总部配置各Loopback1路由ip routing-table 192.168.254.128.0 25 电信出口。

9.       各分支建立两条GRE隧道,源分别是Loopback0Loopback1,目的分别是总部的Loopback0Loopback1,编号分别是tunnel 2~126tunnel 130~254tunnel接口编号和所使用源Loopback地址最后一段一致,便于记忆。

10.   分支由于是只有一条拨号线路,使用默认路由即可。

11.   总部将部分分支(优选联通线路)的VPN网段路由指向以Loopback0为源的GRE隧道,优先级默认60,指向以Loopback1为源的GRE隧道,优先级为80,作为备份。

12.   总部将部分分支(优选电信线路)的VPN网段路由指向以Loopback1为源的GRE隧道,优先级默认60,指向以Loopback0为源的GRE隧道,优先级为80,作为备份

13.       部分分支(优选联通线路)将总部VPN网段路由指向以Loopback0为源的GRE隧道,优先级默认60,指向以Loopback1为源的GRE隧道,优先级为80,作为备份。

14.       部分分支(优选电信线路)将总部VPN网段路由指向以Loopback1为源的GRE隧道,优先级默认60,指向以Loopback0为源的GRE隧道,优先级为80,作为备份。

IPSec设计:

1.       由于分支端地址由拨号动态获取或存在NAT设备,所以使用野蛮模式IKE

2.       总部配置1ike peer branch即可,配置pre-shared-keyexchang-mode aggressivenat traversal即可。

3.       分支需要配置2ike peerike peer unicomike peer telecom,除配置pre-shared-keyexchang-mode aggressivenat traversal外,还需要配置remote-address

4.       ike proposal不需要配置,使用默认,配置ipsec proposal def即可。

5.       分支配置两个ACLacl number 3000 rule permit gre source 分支Loopback0 0 destination  总部Loopback0acl number 3001 rule permit gre source 分支Loopback1 0 destination 总部Loopback1

6.       总部配置IPSec policy-template temp 1,指定ike-peer branchproposal def即可,使用模板不需要配置acl

7.       分支配置ipsec policy headquarter 1 isakmp,绑定ike-peer unicomproposal def security acl 3000

8.       分支配置ipsec policy headquarter 2 isakmp,绑定ike-peer telecomproposal def security acl 3001

9.       总部配置ipsec policy branch 1 isakmp template temp

10.   分支将ipsec policy headquarter下发到外网接口。

11.   总部将ipsec policy branch分别下发到联通和电信接口即可。

三、配置

RTA配置

#

//为联通线路创建LoopBack0

interface LoopBack0

 ip address 192.168.254.1 255.255.255.255

#

//为电信线路创建LoopBack1

interface LoopBack1

 ip address 192.168.254.129 255.255.255.255

#

//创建LoopBack10 模拟总部的内部网络

interface LoopBack10

 ip address 10.10.10.10 255.255.255.255

#

//创建总部到分支RTC的联通 GRE隧道

interface Tunnel 2

 ip address 7.1.1.2 255.255.255.0

 source 192.168.254.1

 destination 192.168.254.2

 keepalive

#

//创建总部到分支RTD的联通 GRE隧道

interface Tunnel 3

 ip address 12.1.1.2 255.255.255.0

 source 192.168.254.1

 destination 192.168.254.3

keepalive

#

//创建总部到分支RTC的电信GRE隧道

interface Tunnel 130

 ip address 8.1.1.2 255.255.255.0

 source 192.168.254.129

 destination 192.168.254.130

 keepalive

#

//创建总部到分支RTD的电信GRE隧道

interface Tunnel 131

 ip address 13.1.1.2 255.255.255.0

 source 192.168.254.129

 destination 192.168.254.131

keepalive

#

//电信线路作为前往分支4.1.1.1主线路

ip route-static 4.1.1.0 255.255.255.0 3.1.1.2

//联通线路作为前往分支4.1.1.1的备份

 ip route-static 4.1.1.0 255.255.255.0 2.1.1.2 preference 80

//电信线路作为前往分支5.1.1.1的备份

 ip route-static 5.1.1.0 255.255.255.0 3.1.1.2 preference 80

//联通线路作为前往分支5.1.1.1的主线路

 ip route-static 5.1.1.0 255.255.255.0 2.1.1.2

//配置电信GRE隧道为总部到分支RTC的主线路

 ip route-static 10.1.1.0 255.255.255.0 Tunnel 130

//配置联通GRE隧道为总部到分支RTC的备份线路

 ip route-static 10.1.1.0 255.255.255.0 Tunnel 2 preference 80

//配置电信GRE隧道为总部到分支RTD的备份链路

 ip route-static 11.1.1.0 255.255.255.0 Tunnel 131 preference 80

//配置联通GRE隧道为总部到分支RTD的主链路

 ip route-static 11.1.1.0 255.255.255.0 Tunnel 3

//通过联通线路到达每个分支的LoopBack0

 ip route-static 192.168.254.0 255.255.255.128 2.1.1.2

//通过电信通线路到达每个分支的LoopBack1

 ip route-static 192.168.254.128 255.255.255.128 3.1.1.2

#           

ike peer branch

//由于分支端地址由拨号动态获取或存在NAT设备,所以使用野蛮模式IKE

 exchange-mode aggressive

 pre-shared-key 123

 nat traversal

#

//安全提议采用默认的

ipsec proposal def

#

//总部使用模板,不用配置acl

ipsec policy-template temp 1

 ike-peer branch

 proposal def

#

ipsec policy branch 1 isakmp template temp

#

//联通接口

interface Ethernet0/0

 port link-mode route

 ip address 2.1.1.1 255.255.255.0

//在接口上下发安全策略

 ipsec policy branch

#

//电信接口

interface Ethernet0/1

 port link-mode route

 ip address 3.1.1.1 255.255.255.0

//在接口上下发安全策略

 ipsec policy branch

#

RTB配置

//RTB来模拟Internet

#

interface Ethernet0/0

 port link-mode route

 ip address 3.1.1.2 255.255.255.0

#

interface Ethernet0/1

 port link-mode route

 ip address 2.1.1.2 255.255.255.0

#

interface Ethernet0/2

 port link-mode route

 ip address 4.1.1.2 255.255.255.0

#

interface Ethernet0/3

 port link-mode route

 ip address 5.1.1.2 255.255.255.0

#

RTC配置

#

//为联通线路创建LoopBack0

interface LoopBack0

 ip address 192.168.254.2 255.255.255.255

#

//为电信线路创建LoopBack1

interface LoopBack1

 ip address 192.168.254.130 255.255.255.255

#

//创建联通线路的GRE隧道

interface Tunnel 2

 ip address 7.1.1.1 255.255.255.0

 source 192.168.254.2

 destination 192.168.254.1

 keepalive

#

//创建电信线路的GRE隧道

interface Tunnel130

 ip address 8.1.1.1 255.255.255.0

 source 192.168.254.130

 destination 192.168.254.129

 keepalive

#

//配置一条默认路由来制定出口方向

 ip route-static 0.0.0.0 0.0.0.0 4.1.1.2

//配置联通的GRE隧道为分支访问总部的备份线路

 ip route-static 10.10.10.10 255.255.255.255 Tunnel 2 preference 80

//配置电信的GRE隧道为分支访问总部的主线路

 ip route-static 10.10.10.10 255.255.255.255 Tunnel 130

#

//配置ACL 3000匹配联通线路GRE流量

acl number 3000

 rule 0 permit gre source 192.168.254.2 0 destination 192.168.254.1 0

//配置ACL 3001匹配电信线路GRE流量

acl number 3001

 rule 0 permit gre source 192.168.254.130 0 destination 192.168.254.129 0

#

//配置电信线路的IKE对等体

ike peer telecom

 exchange-mode aggressive

 pre-shared-key 123

 remote-address 3.1.1.1

 nat traversal

#

//配置联通线路的IKE对等体

ike peer unicom

 exchange-mode aggressive

 pre-shared-key 123

 remote-address 2.1.1.1

 nat traversal

#

//配置默认的安全提议

ipsec proposal def

#

//配置走联通线路的路由策略

ipsec policy headquarter 1 isakmp

 security acl 3000

 ike-peer unicom

 proposal def

#

//配置走电信线路的路由策略

ipsec policy headquarter 2 isakmp

 security acl 3001

 ike-peer telecom

 proposal def

#

interface GigabitEthernet0/0

 port link-mode route

 ip address 4.1.1.1 255.255.255.0

//在端口上应用路由策略

 ipsec policy headquarter

#

//G0/1配置一个IP地址模拟分支内部网络

interface GigabitEthernet0/1

 port link-mode route

 ip address 10.1.1.1 255.255.255.0

#

RTD配置

#

//为联通线路创建LoopBack0

interface LoopBack0

 ip address 192.168.254.3 255.255.255.255

#

//为电信线路创建LoopBack1

interface LoopBack1

 ip address 192.168.254.131 255.255.255.255

#

//创建联通线路的GRE隧道

interface Tunnel 3

 ip address 12.1.1.1 255.255.255.0

 source 192.168.254.3

 destination 192.168.254.1

 keepalive

#

//创建电信线路的GRE隧道

interface Tunnel 131

 ip address 13.1.1.1 255.255.255.0

 source 192.168.254.131

 destination 192.168.254.129

 keepalive

#

//配置一条默认路由来制定出口方向

 ip route-static 0.0.0.0 0.0.0.0 5.1.1.2

//配置联通的GRE隧道为分支访问总部的主线路

 ip route-static 10.10.10.10 255.255.255.255 Tunnel 3

//配置电信的GRE隧道为分支访问总部的备份线路

 ip route-static 10.10.10.10 255.255.255.255 Tunnel 131 preference 80

#

//配置ACL 3000匹配联通线路

acl number 3000

 rule 0 permit gre source 192.168.254.3 0 destination 192.168.254.1 0

//配置ACL 3001匹配电信线路

acl number 3001

 rule 0 permit gre source 192.168.254.131 0 destination 192.168.254.129 0

#

//配置电信线路的IKE对等体

ike peer telecom

 exchange-mode aggressive

 pre-shared-key 123

 remote-address 3.1.1.1

 nat traversal

#

//配置联通线路的IKE对等体

ike peer unicom

 exchange-mode aggressive

 pre-shared-key 123

 remote-address 2.1.1.1

 nat traversal

#

//配置默认的安全提议

ipsec proposal def

#

//配置走联通线路的路由策略

ipsec policy headquarter 1 isakmp

 security acl 3000

 ike-peer unicom

 proposal def

#

//配置走电信线路的路由策略

ipsec policy headquarter 2 isakmp

 security acl 3001

 ike-peer telecom

 proposal def

#

interface GigabitEthernet0/0

 port link-mode route

 ip address 5.1.1.1 255.255.255.0

//在端口上应用路由策略

 ipsec policy headquarter

#

//G0/1配置一个IP地址模拟分支内部网络

interface GigabitEthernet0/1

 port link-mode route

 ip address 11.1.1.1 255.255.255.0

#

四、配置关键点

1.       在配置总部的IKE对等体的时候,不能配置remote-address,否则不能实现总部到多个分支的通信。

2.       配置总部安全策略的时候,使用模板,不用配置acl

3.       RTB模拟Internet的时候,要配置静态路由以保证Internet内部路由可达。

4.       分别用LoopBack10,和G0/1来模拟总部和分支的内部网络,通过测试它们之间的联通性来确保总部和分支内部网络之间的可达。

https://zhiliao.h3c.com/Theme/details/89720

本文链接:https://www.hqyman.cn/post/4639.html 非本站原创文章欢迎转载,原创文章需保留本站地址!

分享到:





休息一下,本站随机推荐观看栏目:


« 上一篇 下一篇 »

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

您的IP地址是: