安全CCIE战报:

最近一个半月内连续PASS八人,没有一人出现意外(考多少个过多少个)!可以说明版本和面试在Yeslab已经相当稳定,希望各位关注Yeslab安全CCIE的朋友,年后参加Yeslab的新年优惠活动加入我们的队伍!

欢迎光临我在土豆网的主页:

http://www.tudou.com/home/xrmjjz

图7-16: 第三阶段DM×××实验拓扑(逻辑)

DM×××三个发展阶段介绍

阶段一:星形拓扑设计(Hub-to-Spoke Designs)

图7-8 DM×××第一阶段星形拓扑设计


第一阶段星形拓扑设计,是DM×××技术的最原始阶段,除了中心站点为多点GRE隧道,所有分支站点为普通点对点GRE隧道。分支站点间的流量都必须经过中心站点转发。第一阶段星形拓扑DM×××的优势就在于,增加分支站点不增加中心站点的配置,并且分支站点支持动态获取IP地址。优点仅此而已,所以本书中不再详细介绍。

阶段二:虚拟网状拓扑设计(Spoke-to-Spoke Designs)

图7-9 DM×××第二阶段虚拟网状拓扑设计

 



 

DM×××发展到第二阶段,所有站点都采用多点GRE配置,功能大大提升,支持分支站点和分支站点间直接建立隧道。实现了虚拟网状拓扑,真正实现了DM×××的高扩展性。我们在实验一中介绍的就是DM×××第二阶段的配置。

阶段三:层次化(树状)设计(Hierarchical (Tree-Based))Designs)

图7-10 DM×××第三阶段层次化(树状)设计

 

第三阶段也是DM×××的最新发展阶段,主用运用于DM×××的超大范围部署,实现DM×××层次化的结构,并且能够实现不同区域的分支站点间直接建立隧道。如果使用第二阶段DM×××实现层次化部署,两个不同DM×××区域的分支站点必须经过本区域的中心站点才能建立连接。具体效果如图7-11所示

图7-11 DM×××第二阶段层次化部署
 


为了更加深刻的理解DM×××三个阶段的区别,我们可以查看表7-1和表7-2,表中详细介绍了三个阶段的特点。

表7-1 DM×××三个阶段比较表

第一阶段(星形拓扑设计)

第二阶段(虚拟网状拓扑设计)

第三阶段(层次化设计)

1.特性源自于12.2(13)T

1.特性源自于12.3(4)T

1.特性源自于12.4(6)T

2.简化的中心站点和分支站点配置,中心站点为MGRE隧道,分支站点为点对点GRE隧道

2.分支站点配置MGRE隧道

2.增加了一个中心站点能够承载的分支站点数量

3.支持分支站点动态地址

3.分支站点间直接建立连接,减轻中心站点负担

3.层次化树状架构,不需要区域中心站点间网状连接

4.由于分支站点都是点对点GRE隧道,所以支持分支站点到中心站点的组播

4.不支持到中心站点的汇总路由

4.分支站点不需要完整的路由表,支持到中心站点的汇总路由

5.支持到中心站点的汇总路由

5.去往某分支站点内部网络的路由,下一跳必须是那个分支站点虚拟隧道接口地址。

5.不支持在一个DM×××云中,同时出现第二阶段和第三阶段配置

表7-2 DM××× 第二和第三阶段分支站点间隧道处理方法比较表

动态分支站点到分支站点隧道处理方法的不同

第二阶段

第三阶段

如何设置路由

去往某分支站点内部网络的路由,下一跳必须是那个分支站点虚拟隧道接口地址。不支持路由汇总

中心站点无需对路由进行任何特殊设置,支持发送汇总路由给分支站点

NHRP解析是如何触发的

初始化分支站点发送NHRP请求,解析下一条

中心站点发送NHRP重定向,触发分支站点发送解析请求

谁有责任响应NHRP解析请求

NHRP服务器(中心站点)有责任回应解析请求,发送一个响应给初始化分支站点

被解析的目的站点直接回送NHRP解析信息给发起方分支站点

NHRP正在被解析时,数据流如何被处理

流量被中心站点通过进程交换(Process-switch)转发,效率低

流量被中心站点快速转发,效率高

我们从表7-2中可以发现,第三阶段支持汇总路由,并且NHRP的处理方法也和第二阶段有明显不同,下面我们就会第三阶段NHRP的解析过程进行详细的介绍。在介绍前,我们先看看图7-12了解一下第二阶段DM×××的NHRP是如何工作的。

图7-12 第二阶段DM××× NHRP工作示意图


第一步:分支站点一到分支站点二数据通过中心站点代转。

第二步:分支站点一发送NHRP解析请求给中心站点,请求解析分支站点二虚拟IP地址。

第三步:中心站点回送NHRP解析回应给分支站点一。

第四步:分支站点一获取分支站点二NHRP解析后,直接建立分支站点间的IPSec隧道,后续数据在站点间IPSec隧道内进行转发

介绍了第二阶段NHRP工作后,我们再通过图7-13来看看第三阶段DM××× NHRP工作的细节。

图7-13 第三阶段DM××× NHRP工作示意图


 

第一步:第三阶段DM×××支持中心站点向分支站点发送汇总路由,所以站点间流量总是会先送到中心站点,并由中心站点代转。

第二步:中心站点收到分支站点间数据后,回送NHRP重定向,这个重定向的主要目的是告诉分支站点一:中心站点不是最优的下一跳(虽然路由学习的下一跳是中心站点),最优的下一跳是分支站点二的虚拟隧道地址。

注意:由于NHRP重定向能够动态优化路由,所以第三阶段的DM×××支持中心站点的路由汇总。

第三步:当分支站点一收到NHRP重定向信息,并且学习到最优的下一跳是分支站点二,就会马上发送NHRP解析请求给NHRP服务器(中心站点)。在DM×××第三阶段,中心站点不会直接回送NHRP解析回应,而是把这个NHRP解析请求直接发给目的站点。

第四步:分支站点二收到分支站点一所发的NHRP解析请求后,站点二会主动和站点一建立IPSec隧道。

第五步:站点间IPSec隧道建立后,站点二会在隧道内直接回送NHRP解析回应给站点一。

注意:DM×××第三阶段采取由目的站点触发IPSec,并且在IPSec隧道内回送NHRP回应信息。这样做的好处在于,如果分支站点二正在一个PAT设备内部,使用第三阶段的DM×××就能够由站点二由内向外主动发起了,但是使用传统的第二阶段DM×××技术,就很难穿越PAT设备,建立分支站点间隧道。

第六步:后续站点间流量就会直接在第四步建立的IPSec隧道内转发。

现在我们已经了解了DM×××第三阶段的特点与NHRP工作的细节,就让我们通过实验二来配置一个第三阶段的DM×××,并且测试一下它是如何工作的。

实验二:第三阶段DM×××实验

第一部分:实验目标

配置第三阶段DM×××

第二部分:实际接线状况

图7-14:第三阶段DM×××实验实际接线图

 

第三部分:实验拓扑

图7-15: 第三阶段DM×××实验拓扑(物理)

 

7-16: 第三阶段DM×××实验拓扑(逻辑)


拓扑介绍:本次实验主要目的是在三个站点间使用第三阶段DM×××技术,建立站点到站点的IPSec ×××。202.100.1.0/24模拟互联网,中心站点IP地址为202.100.1.100,分支站点一IP地址为202.100.1.1,分支站点二位202.100.1.2。192.168.X.0/24分别模拟各站点内部网络,172.16.1.0/24为MGRE隧道网络。本次实验在MGRE网络运行的动态路由协议为EIGRP,为了展示第三阶段DM×××的特点,中心站点会通过EIGRP给所有分支站点发送汇总路由。

第四部分:基本网络配置

Hub基本网络配置

enable

configure terminal

!

hostname Hub

!

interface Loopback0

ip address 192.168.100.1 255.255.255.0

!

interface FastEthernet0/0

ip address 202.100.1.100 255.255.255.0

no shutdown

end

Spoke1基本网络配置

enable

configure terminal

!

hostname Spoke1

!

interface Loopback0

ip address 192.168.1.1 255.255.255.0

!

interface FastEthernet0/0

ip address 202.100.1.1 255.255.255.0

no shutdown

end

Spoke2基本网络配置

enable

configure terminal

!

hostname Spoke2

!

interface Loopback0

ip address 192.168.2.1 255.255.255.0

!

interface FastEthernet0/0

ip address 202.100.1.2 255.255.255.0

no shutdown

!

end

第五部分:MGRENHRP配置

Hub基本网络配置

Hub(config)#interface tunnel 0

Hub(config-if)#ip address 172.16.1.100 255.255.255.0

Hub(config-if)#tunnel mode gre multipoint

Hub(config-if)#tunnel source fastEthernet 0/0

Hub(config-if)#tunnel key 12345

Hub(config-if)#ip nhrp network-id 10

Hub(config-if)#ip nhrp authentication cisco

Hub(config-if)#ip nhrp map multicast dynamic

Hub(config-if)#ip nhrp redirect

<第三阶段的DM×××需要要在中心站点启用nhrp重定向,这样中心站点才会给分支站点发送NHRP重定向信息来优化下一跳。>

Spoke1基本网络配置

Spoke1(config)#interface tunnel 0

Spoke1(config-if)#ip address 172.16.1.1 255.255.255.0

Spoke1(config-if)#tunnel mode gre multipoint

Spoke1(config-if)#tunnel source fastEthernet 0/0

Spoke1(config-if)#tunnel key 12345

Spoke1(config-if)#ip nhrp network-id 10

Spoke1(config-if)#ip nhrp authentication cisco

Spoke1(config-if)#ip nhrp map 172.16.1.100 202.100.1.100

Spoke1(config-if)#ip nhrp map multicast 202.100.1.100

Spoke1(config-if)#ip nhrp nhs 172.16.1.100

Spoke1(config-if)#ip nhrp shortcut

<第三阶段的DM×××需要要在所有分支站点启用nhrp短路,这样才能在分支站点间直接建立隧道。>

Spoke2基本网络配置

Spoke2(config)#interface tunnel 0

Spoke2(config-if)#ip address 172.16.1.2 255.255.255.0

Spoke2(config-if)#tunnel mode gre multipoint

Spoke2(config-if)#tunnel source fastEthernet 0/0

Spoke2(config-if)#tunnel key 12345

Spoke2(config-if)#ip nhrp network-id 10

Spoke2(config-if)#ip nhrp authentication cisco

Spoke2(config-if)#ip nhrp map 172.16.1.100 202.100.1.100

Spoke2(config-if)#ip nhrp map multicast 202.100.1.100

Spoke2(config-if)#ip nhrp nhs 172.16.1.100

Spoke2(config-if)#ip nhrp shortcut

第六部分:动态路由协议EIGRP配置

Hub动态路由协议EIGRP配置

Hub(config)#router eigrp 100

Hub(config-router)#no auto-summary

Hub(config-router)#network 172.16.1.0 0.0.0.255

Hub(config)#interface tunnel 0

Hub(config-if)# ip summary-address eigrp 100 192.168.0.0 255.255.0.0

<第三阶段的DM×××不再需要关闭水平分割,也不再需要no掉“ip next-hop-self eigrp 100”来优化路由,只需要中心给所有的分支发送一条汇总路由。>

Spoke1动态路由协议EIGRP配置

Spoke1(config)#router eigrp 100

Spoke1(config-router)#no auto-summary

Spoke1(config-router)#network 172.16.1.0 0.0.0.255

Spoke1(config-router)#network 192.168.1.0 0.0.0.255

Spoke2动态路由协议EIGRP配置

Spoke2(config)#router eigrp 100

Spoke2(config-router)#no auto-summary

Spoke2(config-router)#network 172.16.1.0 0.0.0.255

Spoke2(config-router)#network 192.168.2.0 0.0.0.255

第七部分:配置IPSec ×××

Hub IPSec ×××配置

Hub(config)#crypto isakmp policy 10

Hub(config-isakmp)#authentication pre-share

Hub(config)#crypto isakmp key 0 cisco address 0.0.0.0 0.0.0.0

Hub(config)#crypto ipsec transform-set cisco esp-des esp-md5-hmac

Hub(cfg-crypto-trans)#mode transport

Hub(config)#crypto ipsec profile dm***-profile

Hub(ipsec-profile)#set transform-set cisco

Hub(config)#interface tunnel 0

Hub(config-if)#ip mtu 1400

Hub(config-if)#tunnel protection ipsec profile dm***-profile

Spoke1 IPSec ×××配置

Spoke1(config)#crypto isakmp policy 10

Spoke1(config-isakmp)#authentication pre-share

Spoke1(config)#crypto isakmp key 0 cisco address 0.0.0.0 0.0.0.0

Spoke1(config)#crypto ipsec transform-set cisco esp-des esp-md5-hmac

Spoke1(cfg-crypto-trans)#mode transport

Spoke1(config)#cry ipsec profile dm***-profile

Spoke1(ipsec-profile)#set transform-set cisco

Spoke1(config)#interface tunnel 0

Spoke1(config-if)#ip mtu 1400

Spoke1(config-if)#tunnel protection ipsec profile dm***-profile

Spoke2 IPSec ×××配置

Spoke2(config)#crypto isakmp policy 10

Spoke2(config-isakmp)#authentication pre-share

Spoke2(config)#crypto isakmp key 0 cisco address 0.0.0.0 0.0.0.0

Spoke2(config)#crypto ipsec transform-set cisco esp-des esp-md5-hmac

Spoke2(cfg-crypto-trans)#mode transport

Spoke2(config)#crypto ipsec profile dm***-profile

Spoke2(ipsec-profile)#set transform-set cisco

Spoke2(config)#interface tunnel 0

Spoke2(config-if)#ip mtu 1400

Spoke2(config-if)#tunnel protection ipsec profile dm***-profile

第八部分:测试第三阶段DM×××

Spoke1查看路由表

Spoke1#show ip route eigrp

D 192.168.0.0/16 [90/310172416] via 172.16.1.100, 00:00:17, Tunnel0

Spoke1查看NHRP映射

Spoke1#show ip nhrp

172.16.1.100/32 via 172.16.1.100, Tunnel0 created 00:00:36, never expire

Type: static, Flags: used

NBMA address: 202.100.1.100

Spoke1发起分支站点间流量

Spoke1#ping 192.168.2.1 source 192.168.1.1 repeat 100

Type escape sequence to abort.

Sending 100, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds:

Packet sent with a source address of 192.168.1.1

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Success rate is 100 percent (100/100), round-trip min/avg/max = 64/174/568 ms

Spoke1查看NHRP映射

Spoke1#show ip nhrp

172.16.1.2/32 via 172.16.1.2, Tunnel0 created 00:01:26, expire 01:58:35

Type: dynamic, Flags: router implicit

NBMA address: 202.100.1.2

<中心站点通过NHRP重定向信息让分支站点产生的NHRP映射>

172.16.1.100/32 via 172.16.1.100, Tunnel0 created 00:03:05, never expire

Type: static, Flags: used

NBMA address: 202.100.1.100

192.168.1.0/24 via 172.16.1.1, Tunnel0 created 00:01:25, expire 01:58:35

Type: dynamic, Flags: router unique local

NBMA address: 202.100.1.1

(no-socket)

192.168.2.0/24 via 172.16.1.2, Tunnel0 created 00:01:25, expire 01:58:34

Type: dynamic, Flags: router

NBMA address: 202.100.1.2

<优化的NHRP映射,192.168.2.0/24下一条为172.16.1.2>

Spoke1查看IPSec SA

Spoke1#show crypto ipsec sa

interface: Tunnel0

Crypto map tag: Tunnel0-head-0, local addr 202.100.1.1

--------------------------省略Spoke1和Hub之间IPSec SA相关信息--------------------

protected vrf: (none)

local ident (addr/mask/prot/port): (202.100.1.1/255.255.255.255/47/0)

remote ident (addr/mask/prot/port): (202.100.1.2/255.255.255.255/47/0)

<分支站点间IPSec 隧道>

current_peer 202.100.1.2 port 500

PERMIT, flags={origin_is_acl,}

#pkts encaps: 93, #pkts encrypt: 93, #pkts digest: 93

#pkts decaps: 93, #pkts decrypt: 93, #pkts verify: 93

#pkts compressed: 0, #pkts decompressed: 0

#pkts not compressed: 0, #pkts compr. failed: 0

#pkts not decompressed: 0, #pkts decompress failed: 0

#send errors 1, #recv errors 0

local crypto endpt.: 202.100.1.1, remote crypto endpt.: 202.100.1.2

path mtu 1500, ip mtu 1500, ip mtu idb FastEthernet0/0

current outbound spi: 0xFDA815DB(4255651291)

inbound esp sas:

spi: 0xDECB38DE(3737860318)

transform: esp-des esp-md5-hmac ,

in use settings ={Transport, }

conn id: 31, flow_id: SW:31, crypto map: Tunnel0-head-0

sa timing: remaining key lifetime (k/sec): (4590501/3491)

IV size: 8 bytes

replay detection support: Y

Status: ACTIVE

inbound ah sas:

inbound pcp sas:

outbound esp sas:

spi: 0xFDA815DB(4255651291)

transform: esp-des esp-md5-hmac ,

in use settings ={Transport, }

conn id: 32, flow_id: SW:32, crypto map: Tunnel0-head-0

sa timing: remaining key lifetime (k/sec): (4590501/3490)

IV size: 8 bytes

replay detection support: Y

Status: ACTIVE

outbound ah sas:

outbound pcp sas:

DM×××高可用性技术介绍

DM×××有如下两种主要的高可用性方案

1. 单云双中心

图7-17 DM×××单云双中心

DM×××单云表示只有一个隧道网络,图7-17中隧道网段为172.16.1.0/24。并且这个隧道网络内有两个中心站点。每一个分支站点同时和两个中心站点建立两个永久的IPSec隧道,也同时和两个中心站点建立动态路由协议的邻居关系。分支站点会从两个中心站点同时学习到中心内部网络(192.168.1.0/24)的路由。当分支站点访问中心内部网络时,可以利用两个中心站点实现负载均衡。并且当其中一个中心站点出现问题的时候,另外一个站点能够接管所有流量,实现DM×××的高可用性。相对于本章最后要介绍的双云双中心的解决方案,我更推荐大家在工程中使用单云双中心的解决方案,因为这种设计在路由结构和配置上都比较简单。

DM×××单云双中心配置

中心站点一配置:

enable

configure terminal

!

hostname Hub1

!

crypto isakmp policy 10

authentication pre-share

crypto isakmp key cisco address 0.0.0.0 0.0.0.0

crypto isakmp keepalive 10 periodic

!

crypto ipsec transform-set cisco esp-des esp-md5-hmac

mode transport

!

crypto ipsec profile dm***-profile

set transform-set cisco

!

interface Tunnel0

bandwidth 1000

<推荐优化DM×××参数>

ip address 172.16.1.100 255.255.255.0

no ip redirects

ip mtu 1400

ip nhrp map multicast dynamic

ip nhrp map 172.16.1.101 202.100.1.101

ip nhrp map multicast 202.100.1.101

<两个中心之间要彼此映射>

ip nhrp network-id 10

ip nhrp holdtime 360

<推荐优化DM×××参数>

ip tcp adjust-mss 1360

<推荐优化DM×××参数>

ip ospf network broadcast

ip ospf cost 100

ip ospf priority 2

delay 1000

<推荐优化DM×××参数>

tunnel source FastEthernet0/0

tunnel mode gre multipoint

tunnel key 12345

tunnel protection ipsec profile dm***-profile

!

interface FastEthernet0/0

ip address 202.100.1.100 255.255.255.0

no shutdown

!

interface FastEthernet1/0

ip address 192.168.100.100 255.255.255.0

no shutdown

!

router ospf 1

log-adjacency-changes

network 172.16.1.0 0.0.0.255 area 0

network 192.168.100.0 0.0.0.255 area 0

!

end

中心站点二配置:

enable

configure terminal

!

hostname Hub2

!

crypto isakmp policy 10

authentication pre-share

crypto isakmp key cisco address 0.0.0.0 0.0.0.0

crypto isakmp keepalive 10 periodic

!

crypto ipsec transform-set cisco esp-des esp-md5-hmac

mode transport

!

crypto ipsec profile dm***-profile

set transform-set cisco

!

interface Tunnel0

bandwidth 1000

ip address 172.16.1.101 255.255.255.0

no ip redirects

ip mtu 1400

ip nhrp map multicast dynamic

ip nhrp map 172.16.1.100 202.100.1.100

ip nhrp map multicast 202.100.1.100

ip nhrp network-id 10

ip nhrp holdtime 360

ip tcp adjust-mss 1360

ip ospf network broadcast

ip ospf cost 105

ip ospf priority 2

delay 1000

tunnel source FastEthernet0/0

tunnel mode gre multipoint

tunnel key 12345

tunnel protection ipsec profile dm***-profile

!

interface FastEthernet0/0

ip address 202.100.1.101 255.255.255.0

no shutdown

!

interface FastEthernet1/0

ip address 192.168.100.101 255.255.255.0

no shutdown

!

router ospf 1

log-adjacency-changes

network 172.16.1.0 0.0.0.255 area 0

network 192.168.100.0 0.0.0.255 area 0

!

end

分支站点一配置:

enable

configure terminal

!

hostname Spoke1

!

crypto isakmp policy 10

authentication pre-share

crypto isakmp key cisco address 0.0.0.0 0.0.0.0

crypto isakmp keepalive 10 periodic

!

crypto ipsec transform-set cisco esp-des esp-md5-hmac

mode transport

!

crypto ipsec profile dm***-profile

set transform-set cisco

!

interface Loopback0

ip address 192.168.1.1 255.255.255.0

!

interface Tunnel0

bandwidth 1000

ip address 172.16.1.1 255.255.255.0

no ip redirects

ip mtu 1400

ip nhrp map 172.16.1.100 202.100.1.100

ip nhrp map multicast 202.100.1.100

ip nhrp map 172.16.1.101 202.100.1.101

ip nhrp map multicast 202.100.1.101

<每一个分支站点需要静态配置两个中心站点的NHRP映射>

ip nhrp network-id 10

ip nhrp holdtime 360

ip nhrp nhs 172.16.1.100

ip nhrp nhs 172.16.1.101

<配置两个NHRP服务器>

ip tcp adjust-mss 1360

ip ospf network broadcast

ip ospf priority 0

delay 1000

tunnel source FastEthernet0/0

tunnel mode gre multipoint

tunnel key 12345

tunnel protection ipsec profile dm***-profile

!

interface FastEthernet0/0

ip address 202.100.1.1 255.255.255.0

no shutdown

!

router ospf 1

log-adjacency-changes

network 172.16.1.0 0.0.0.255 area 0

network 192.168.1.0 0.0.0.255 area 0

!

end

分支站点二配置:

enable

configure terminal

!

hostname Spoke2

!

crypto isakmp policy 10

authentication pre-share

crypto isakmp key cisco address 0.0.0.0 0.0.0.0

crypto isakmp keepalive 10 periodic

!

crypto ipsec transform-set cisco esp-des esp-md5-hmac

mode transport

!

crypto ipsec profile dm***-profile

set transform-set cisco

!

interface Loopback0

ip address 192.168.2.1 255.255.255.0

!

interface Tunnel0

bandwidth 1000

ip address 172.16.1.2 255.255.255.0

no ip redirects

ip mtu 1400

ip nhrp map 172.16.1.100 202.100.1.100

ip nhrp map multicast 202.100.1.100

ip nhrp map 172.16.1.101 202.100.1.101

ip nhrp map multicast 202.100.1.101

ip nhrp network-id 10

ip nhrp holdtime 360

ip nhrp nhs 172.16.1.100

ip nhrp nhs 172.16.1.101

ip tcp adjust-mss 1360

ip ospf network broadcast

ip ospf priority 0

delay 1000

tunnel source FastEthernet0/0

tunnel mode gre multipoint

tunnel key 12345

tunnel protection ipsec profile dm***-profile

!

interface FastEthernet0/0

ip address 202.100.1.2 255.255.255.0

no shutdown

!

router ospf 1

log-adjacency-changes

network 172.16.1.0 0.0.0.255 area 0

network 192.168.2.0 0.0.0.255 area 0

!

end

内部服务器配置:

enable

configure terminal

!

hostname Center-Inside

!

interface FastEthernet1/0

ip address 192.168.100.1 255.255.255.0

no shutdown

!

router ospf 1

log-adjacency-changes

network 192.168.100.0 0.0.0.255 area 0

!

end

2. 双云双中心

图7-18 DM×××单云双中心

DM×××双云表示有两个隧道网络,图7-18隧道一网段为172.16.1.0/24,隧道二网段为172.16.2.0/24。双中心表示每一个隧道有一个中心站点,两个隧道加在一起就有两个中心。双云双中心这种DM×××,每一个分支站点都需要配置两个MGRE隧道接口,每一个隧道接口需要配置一个NHRP服务器。分支站点需要同时和两个隧道口的两个中心站点建立IPSec隧道和路由协议的邻居关系。和单云双中心一样,分支站点能够通过两个中心站点学习到内部网络(192.168.100.0/24)的路由,也同样能够利用两个分支站点实现负载均衡。任何一个中心站点出现故障另外一个中心站点能够接管所有流量。只是相对于单云双中心,双云双中心,路由结构和配置都比较复杂,所以并不太推荐在工程中部署。

中心站点一配置:

enable

configure terminal

!

hostname Hub1

!

crypto isakmp policy 10

authentication pre-share

crypto isakmp key cisco address 0.0.0.0 0.0.0.0

crypto isakmp keepalive 10 periodic

!

crypto ipsec transform-set cisco esp-des esp-md5-hmac

mode transport

!

crypto ipsec profile dm***-profile

set transform-set cisco

!

interface Tunnel0

<每一个中心只配置一个MGRE隧道>

bandwidth 1000

ip address 172.16.1.100 255.255.255.0

no ip redirects

ip mtu 1400

ip nhrp map multicast dynamic

ip nhrp network-id 10

ip nhrp holdtime 360

ip tcp adjust-mss 1360

ip ospf network broadcast

ip ospf cost 100

ip ospf priority 2

delay 1000

tunnel source FastEthernet0/0

tunnel mode gre multipoint

tunnel key 12345

tunnel protection ipsec profile dm***-profile

!

interface FastEthernet0/0

ip address 202.100.1.100 255.255.255.0

no shutdown

!

interface FastEthernet1/0

ip address 192.168.100.100 255.255.255.0

no shutdown

!

router ospf 1

log-adjacency-changes

network 172.16.1.0 0.0.0.255 area 0

network 192.168.100.0 0.0.0.255 area 0

!

end

中心站点二配置:

enable

configure terminal

!

hostname Hub2

!

crypto isakmp policy 10

authentication pre-share

crypto isakmp key cisco address 0.0.0.0 0.0.0.0

crypto isakmp keepalive 10 periodic

!

crypto ipsec transform-set cisco esp-des esp-md5-hmac

mode transport

!

crypto ipsec profile dm***-profile

set transform-set cisco

!

interface Tunnel1

bandwidth 1000

ip address 172.16.2.100 255.255.255.0

no ip redirects

ip mtu 1400

ip nhrp map multicast dynamic

ip nhrp network-id 10

ip nhrp holdtime 360

ip tcp adjust-mss 1360

ip ospf network broadcast

ip ospf cost 105

ip ospf priority 2

delay 1000

tunnel source FastEthernet0/0

tunnel mode gre multipoint

tunnel key 54321

tunnel protection ipsec profile dm***-profile

!

interface FastEthernet0/0

ip address 202.100.1.101 255.255.255.0

no shutdown

!

interface FastEthernet1/0

ip address 192.168.100.101 255.255.255.0

no shutdown

!

router ospf 1

log-adjacency-changes

network 172.16.2.0 0.0.0.255 area 0

network 192.168.100.0 0.0.0.255 area 0

!

end

分支站点一配置:

enable

configure terminal

!

hostname Spoke1

!

crypto isakmp policy 10

authentication pre-share

crypto isakmp key cisco address 0.0.0.0 0.0.0.0

crypto isakmp keepalive 10 periodic

!

crypto ipsec transform-set cisco esp-des esp-md5-hmac

mode transport

!

crypto ipsec profile dm***-profile

set transform-set cisco

!

interface Loopback0

ip address 192.168.1.1 255.255.255.0

!

interface Tunnel0

<隧道口一,在这个隧道网络中,中心站点一为NHRP服务器>

bandwidth 1000

ip address 172.16.1.1 255.255.255.0

no ip redirects

ip mtu 1400

ip nhrp map multicast dynamic

ip nhrp map 172.16.1.100 202.100.1.100

ip nhrp map multicast 202.100.1.100

<只配置中心站点一的NHRP映射>

ip nhrp network-id 10

ip nhrp holdtime 360

ip nhrp nhs 172.16.1.100

<中心站点一为NHRP服务器>

ip tcp adjust-mss 1360

ip ospf network broadcast

ip ospf priority 0

delay 1000

tunnel source FastEthernet0/0

tunnel mode gre multipoint

tunnel key 12345

tunnel protection ipsec profile dm***-profile shared

<配置时一定需要注意“Shared”关键字,这样一个Profile就能同时运用到两个不同隧道>

!

interface Tunnel1

<隧道口二,在这个隧道网络中,中心站点二为NHRP服务器>

bandwidth 1000

ip address 172.16.2.1 255.255.255.0

no ip redirects

ip mtu 1400

ip nhrp map multicast dynamic

ip nhrp map 172.16.2.100 202.100.1.101

ip nhrp map multicast 202.100.1.101

<只配置中心站点二的NHRP映射>

ip nhrp network-id 10

ip nhrp holdtime 360

ip nhrp nhs 172.16.2.100

<中心站点二为NHRP服务器>

ip tcp adjust-mss 1360

ip ospf network broadcast

ip ospf priority 0

delay 1000

tunnel source FastEthernet0/0

tunnel mode gre multipoint

tunnel key 54321

tunnel protection ipsec profile dm***-profile shared

!

interface FastEthernet0/0

ip address 202.100.1.1 255.255.255.0

no shutdown

!

router ospf 1

log-adjacency-changes

network 172.16.1.0 0.0.0.255 area 0

network 172.16.2.0 0.0.0.255 area 0

network 192.168.1.0 0.0.0.255 area 0

!

end

分支站点二配置:

enable

configure terminal

!

hostname Spoke2

!

crypto isakmp policy 10

authentication pre-share

crypto isakmp key cisco address 0.0.0.0 0.0.0.0

crypto isakmp keepalive 10 periodic

!

crypto ipsec transform-set cisco esp-des esp-md5-hmac

mode transport

!

crypto ipsec profile dm***-profile

set transform-set cisco

!

interface Loopback0

ip address 192.168.2.1 255.255.255.0

!

interface Tunnel0

bandwidth 1000

ip address 172.16.1.2 255.255.255.0

no ip redirects

ip mtu 1400

ip nhrp map multicast dynamic

ip nhrp map 172.16.1.100 202.100.1.100

ip nhrp map multicast 202.100.1.100

ip nhrp network-id 10

ip nhrp holdtime 360

ip nhrp nhs 172.16.1.100

ip tcp adjust-mss 1360

ip ospf network broadcast

ip ospf priority 0

delay 1000

tunnel source FastEthernet0/0

tunnel mode gre multipoint

tunnel key 12345

tunnel protection ipsec profile dm***-profile shared

!

interface Tunnel1

bandwidth 1000

ip address 172.16.2.2 255.255.255.0

no ip redirects

ip mtu 1400

ip nhrp map multicast dynamic

ip nhrp map 172.16.2.100 202.100.1.101

ip nhrp map multicast 202.100.1.101

ip nhrp network-id 10

ip nhrp holdtime 360

ip nhrp nhs 172.16.2.100

ip tcp adjust-mss 1360

ip ospf network broadcast

ip ospf priority 0

delay 1000

tunnel source FastEthernet0/0

tunnel mode gre multipoint

tunnel key 54321

tunnel protection ipsec profile dm***-profile shared

!

interface FastEthernet0/0

ip address 202.100.1.2 255.255.255.0

no shutdown

!

router ospf 1

log-adjacency-changes

network 172.16.1.0 0.0.0.255 area 0

network 172.16.2.0 0.0.0.255 area 0

network 192.168.2.0 0.0.0.255 area 0

!

end

内部服务器配置:

enable

configure terminal

!

hostname Center-Inside

!

interface FastEthernet1/0

ip address 192.168.100.1 255.255.255.0

no shutdown

!

router ospf 1

log-adjacency-changes

network 192.168.100.0 0.0.0.255 area 0

!

 

end