IPsec和动态虚拟专用网
     DM×××(动态多点×××) 允许管理员通过结合GRE隧道,IPsec加密和下一跳解析协议(NHRP)更好地扩展大型的和小型的IPSEC ×××.(×××的星型模式hub-spoke配置会变的很复杂,尤其是spoke对spoke之间,而DM×××使其配置简单化)
     DM×××主要优点:
      减少中心(HUB)路由器配置:它允许管理员配置单个多点GRE隧道接口和单个       IPsec配置文件,因而不用在HUB路由器上配置加密访问列表来处理所有的       spoke路由器。
      自动IPsec加密初始化
       使用DM×××,NHRP为GRE配置或解析对等体源和目的地址,它允许为点对点       GRE 隧道立即触发IPsec。多点GRE隧道,当GRE对等体地址通过NHRP被解析后       ,IPSEC被触发。
      支持动态编址的spoke路由器
      当spoke到spoke隧道动态建立隧道
  DM×××依赖于以下的CISCO技术:
      NHRP
       是一个客户/服务器协议,该协议中HUB设置是服务器,SPOKE是客户端。
       HUB设备维护一个含有每个SPOKE设备公共接口地址的NHRP数据库
      mGRE隧道接口
       允许单个GRE接口支持多个IPsec隧道,简化配置的大小和复杂度。
     296/561
  DM×××配置
     需要hub和spoke路由器上激活mGRE和IPsec隧道,需要配置一个使用全局IPsec策略模板的加密映射,也必须为IPsec加密配置mGRE隧道。
     1 IPsec配置文件
     2 为DM×××配置hub
     3 为DM×××配置spoke
     4 验证DM×××
    在hub路由器上配置IPsec配置文件,完成以下步骤
     1 crypto ipsec profile name 进入加密映射配置模式
     2 set transform-set transform-set-name 指定转换集来使用
     3 set identity [address|fqdn|user-fqdn] 用set identity命令指定用于      ipsec  配置文件的识别限制
     4 set security association lifetime (seconds  |kilobytes )  用该命令为IPSEC配置文件覆盖全局生命期值   seconds 指定SA在国企之前保持活动的秒       数     kilobytes 指定在过期之前,使用给定SA在IPsec对等体之间可以通过的流量总数。
     5 set pfs[group 1 (768为DH素模组)|group 2(768为DH素模组)]  用该命令指定IPsec询问PFS何时为该IPsec配置文件请求新的SA。
    在hub设备上配置DM×××
     1 interface tunnel number  用该命令来配置隧道接口并将进入接口配置模式 number--指定想生成或配置的隧道接口号,对隧道接口号没有限制。
     2 ip address ip-address mask [secondary]   用该命令为隧道接口设置一个主要或次要的IP地址
     3 ip mtu bytes   用该命令设置在接口传送IP数据包的最大传输单元大小,以字节为单位
     4 ip nhrp authentication string 为了接口使用NHRP,用该命令配置认证字符串。  
     5 ip nhrp map multicast dynamic 该命令允许NHRP自动添加spoke路由器到多点传送NHRP映射。
     6 ip nhrp network-id number 该命令在接口上激活NHRP.
     7 用 tunnel source {ip-address |interface-type interface-number}命令来设置隧道接口的源地址
     8 tunnel key key-number 该命令为隧道接口激活ID密钥
     9 tunnel mode gre multipoint 该命令为隧道接口设置mGRE封装模式
     10 tunnel protection ipsec-profile name 该命令将隧道接口和IPsec配置文件相关联。
   下面是一个HUB上配置DM×××实例:
      config t
      interface tunnel 5
      ip address 10.0.0.1 255.255.255.0
      ip mtu 1416
      ip nhrp authentication donttell
      ip nhrp map multicast dynamic
      ip nhrp network-id 99
      tunnel source Ethernet0
      tunnel key 100000
      tunnel mode gre multipoint
      tunnel protection ipsec-profile ***prof
 在spoke设备上配置DM×××
     1 interface tunnel number  用该命令来配置隧道接口并将进入接口配置模式 number--指定想生成或配置的隧道接口号,对隧道接口号没有限制
     2 ip address ip-address mask [secondary]   用该命令为隧道接口设置一个主要或次要的IP地址
     3 ip mtu bytes   用该命令设置在接口传送IP数据包的最大传输单元大小,以字节为单位
     4 ip nhrp authentication string 为了接口使用NHRP,用该命令配置认证字符串。  
     5 ip nhrp map hub-tunnel-ip-address hub-physical-ip-address  该命令静态地配置IP-他哦-NBMA的连接到NBMA网络的IP目的地址映射
     6 ip nhrp map multicast 该命令在spoke和hub之间激活动态路由选择协议,发送组播数据包到hub路由器.
     7 ip nhrp nhs hub-tunnel-ip-address 该命令将hub路由器配置为NHRP下一跳服务器。
     8 ip nhrp network-id number 在接口上激活NHRP
     9 tunnel source{ip-address|interface-type interface-number} 用该命令来设置隧道接口的源地址
     10 tunnel key key-number 用该命令为隧道接口激活ID密钥
     11 tunnel mode gre multipoint 该命令为隧道接口设置mGRE封装模式
     12 tunnel protection ipsec-profile 该命令将隧道接口和IPsec配置文件相关联
   下面是一个spoke上配置DM×××实例:
       config t
       interface tunnel 5
       ip address 10.0.0.1 255.255.255.0
       ip mtu 1416
       ip nhrp authentication donttell
       ip nhrp map 10.0.0.1 172.17.0.1
       ip nhrp map multicast 172.17.0.1
       ip nhrp nbs 10.0.0.1
       ip nhrp network-id 99
       tunnel source Ethernet0
       tunnel key 100000
       tunnel mode gre multipoint
       tunnel protection ipsec-profile ***prof
   验证DM×××
       show crypto isakmp sa   显示在对等体的所有当前的IKE SA
       show crypto map [interface |tag ]   显示加密映射配置
       show ip nhrp [dynamic|static] [type number]   显示NHRP缓存