DM×××出现的背景:

在传统×××中,由于只有中心站点有静态IP,分支只是用动态IP。若实现分支与分支之间的互通,有两种解决办法。

hop-spok,两次加解密,两个分支之间通过中心站点
full-mesh,点对点全互联

DM×××的特点:cisco私有协议
1、简单的hub和Spoke提供了full mesh的连通性
2、支持Spoke动态地址
3、增加新的spoke,hub端不需要更改配置
4、spoke 和spoke动态产生隧道触发IPSec
5、优化性能,分支之间直接加解密,不需两次加解密。
6、不丢包,建立时其中的几个包通过中心转发
7、支持动态路由协议
8、支持spoke与hub的组播
9、支持MPLS网络VRF
10、支持多个×××中心设备的负载均衡

组成部分:
1、MGRE 多点GRE
2、NHRP 下一跳解析协议            对虚拟地址与全局地址之间的映射,支持动态、手动映射
3、DRP 动态路由协议
4、IPSec×××
 

其实DM×××,就是GRE Over IPSec。

包结构如下:

 

DM××× 实验_第1张图片

 

工作原理:

每个分支,开机在线,并获得互联网IP之后,通过NHRP把全局IP与逻辑IP传到 NHRP服务器上。
分支到中心的解析,是手工配置;与其他分支之间的解析,通过NHRP动态获得。
 

实验拓扑

 

DM××× 实验_第2张图片

配置详解:

 

Center:

接口下的配置
配置tunnel
interface Tunnel0
 ip address 172.16.1.100 255.255.255.0               为tunnel设置私有IP地址
 tunnel source FastEthernet0/0          
 tunnel mode gre multipoint                      GRE为多点模式,这种模式不需要配置目的IP
 tunnel key 12345                                    必须一致,虽然有人称不一致也可以。但一定要一致的。
配置NHRP
 ip nhrp map multicast dynamic                     动态组播映射
 ip nhrp network-id 10                                用于识别NHBR,必须一致
配置EIGRP动态路由协议
 no ip split-horizon eigrp 100                        在EIGRP中关闭水平分割,如果没有此命令,分支站点将学不到对方路由。 只在中心端配置即可
 no ip next-hop-self eigrp 100                    由于是hup-spoke,在分支之间通信,默认是通过中心站点来转发的。设置此命令之后,路由指向正确的分支。

注意在配完EIGRP之后,肯定不能通。此时关闭所有tunnel口,并从中心站点开始 no shut 。这样能解决

关联IPSec
 tunnel protection ipsec profile cisco            关联上ipsec profile 名称为cisco
 ip mtu 1440                                           设置MTU,cisco推荐为1440或1436


启用EIGRP动态路由
router eigrp 100
 network 172.16.1.0 0.0.0.255
 network 192.168.100.0
 no auto-summary


配置IPSec
Isakmp策略
crypto isakmp policy 10
 hash md5
 authentication pre-share
配置认证Key ,为cisco
crypto isakmp key cisco address 0.0.0.0 0.0.0.0            由于是多点相连,只要key 相同则可以建立联系。
配置转换集
crypto ipsec transform-set cisco esp-des esp-md5-hmac
 mode transport                                                         注意,这里使用的传输模式,如果启用隧道模式,则会增加至3个IP头部。
建立ipsec profile,名称为cisco,在tunnel下调用
crypto ipsec profile cisco
 set transform-set cisco


Branch 1
接口下的配置
配置tunnel
interface Tunnel0
 ip address 172.16.1.1 255.255.255.0
 tunnel source FastEthernet0/0
 tunnel mode gre multipoint
 tunnel key 12345
配置NHRP
 ip nhrp map 172.16.1.100 202.100.1.100    静态映射,物理IP与虚拟IP的对应关系,在中心端无此配置。前面地址为虚拟IP
 ip nhrp map multicast 202.100.1.100     静态组播映射,并且指向地址为中心站点的真实IP(即公网IP)
 ip nhrp network-id 10                         必须匹配服务器端的配置
 ip nhrp nhs 172.16.1.100                    指向服务器为 172.16.1.100 这是中心的虚拟IP,而不是真实IP(真实IP即为公网IP)
关联IPSec
 tunnel protection ipsec profile cisco
 ip mtu 1440

配置EIGRP
router eigrp 100
 network 172.16.1.0 0.0.0.255
 network 192.168.1.0
 no auto-summary

配置IPSec,同中心端
crypto isakmp policy 10
 hash md5
 authentication pre-share
crypto isakmp key cisco address 0.0.0.0 0.0.0.0
crypto ipsec transform-set cisco esp-des esp-md5-hmac
 mode transport
crypto ipsec profile cisco
 set transform-set cisco

 

排错命令:

show crypto isak
Branch1#sho crypto isakmp sa
IPv4 Crypto ISAKMP SA
dst             src             state          conn-id slot status
202.100.1.100   202.100.1.1     QM_IDLE           1001    0 ACTIVE

clear crypto sa
clear crypto isakmp
sho crypto ipsec sa