第一部分 动态地址解决方案
1.1 动态MAP VS 静态MAP
中心有固定ip地址但是分支机构没有固定ip地址,如果都是cisco设备,建议采用EZ×××来解决。
如果不都是cisco产品,这是唯一的解决方法
配置要点:
center:
crypto isakmkp key cisco address 0.0.0.0 0.0.0.0由于远端地址为动态,所以只能使用八个零的配置方式由于不清楚对端地址,也不清楚感兴趣流,所以只配置转换集,具体peer和感兴趣流协商决定crypto map cisco 1000 ipsec-isakmp dynamic dymap动态map的ID 应该是最后一个,让明细map优先匹配
branch:
正常配置
动态MAP技术问题分析
1.center不能主动向branch发起连接,必须要等branch主动发起建立×××后,center端网络才能访问branch端网络2.center和branch间没有虚拟隧道接口,不能在隧道接口上运用各种技术来控制明文流量,也不能运行动态路由协议,所以动态MAP技术只适用于网络环境比较简单的场合
1.2 动态域名解析技术
为了解决动态MAP中心端不能主动发起的问题,我们可以采用动态域名(DDNS)技术。为每一个branch端申请一个动态域名,中心可以把peer配置成为branch的动态域名来主动发起连接。
IPSec ×××动态域名配置
ip name-server 202.106.0.20配置路由器解析域名的DNS服务器crypto isakmp key 0 cisco 61.149.0.0 255.255.0.0设置branch端可能获取的网段,也可以用八个零crypto map cisco 5 ipsec-isakmp set peer 我的域名 dynamic set transform-set cisco match address ***
第二部分 NAT对×××的影响
感兴趣流被PAT转换后,不再匹配感兴趣流,所以没有加密直接发送到internet,而internet没有去往目的地路由
解决:
ip access-list extended pat deny ip 1.1.1.0 0.0.0.255 2.2.2.0 0.0.0.255 permit ip 1.1.1.0 0.0.0.255 anydeny 掉感兴趣流,让感兴趣流不转换
第三部分 SVTI(IKEv1 和IKEv2)
3.1
VTI技术介绍
ipsec VTI技术允许我们配置一个虚拟隧道接口,我们可以运用各种特性到这个接口上。控制明文的特性应该被配置到VTI接口上,控制密文的特性应该被用到物理接口上。当我们使用IPSec VTI技术,我们可以对明文和加密后流量分开运用NAT,ACL和Qos等特性。如果我们运用传统的crypto map技术,没有一种简单的方法来运用这些加密特性到IPSec隧道。一共有两种类型的VTI接口,静态VTI(SVTI)和动态VTI(DVTI)
SVTI技术介绍
SVTI配置被用于站点到站点的连接(L2L×××),两个站点间的隧道是“always-on”的。SVTI相对于传统crypto map 配置的优势在于可以在隧道口上运用动态路由协议,并且不需要那额外的4字节GRE头部(GRE over IPSec),因此降低了发送加密数据的带宽。进一步,多重CISCO IOS 特性能够被直接配置在隧道接口上和物理接口上,这种直接的配置提供用户对加密前和加密后的流量更加强大的控制
3.2 IKE v1 IPv4 SVTI隧道配置
branch :
crypto配置与IKEv1一样
policy ,key ,transform-set ,profile
SVTI配置
interface trunnel10 ip address 172.16.1.1 255.255.255.0 tunnel source 202.100.1.1 tunnel destination 61.128.1.10 tunnel node ipsec ipv4(关键命令) tunnel protection ipsec profile ipsec-profile
center-1:
policy ,key ,transform-set ,profile
SVTI:
interface trunnel10 ip address 172.16.1.1 255.255.255.0 tunnel source ethernet1/0 tunnel destination 202.100.1.1 tunnel node ipsec ipv4(关键命令) tunnel protection ipsec profile ipsec-profile
show crypto session 查看状态
show crypto engine connections active
3.3 IKEv2 IPv4 SVTI隧道配置
keyring,ikev2 profile,ipsec profile
interface trunnel20 ip address 172.16.1.1 255.255.255.0 tunnel source ethernet1/0 tunnel destination 61.128.2.20 tunnel node ipsec ipv4(关键命令) tunnel protection ipsec profile ipsec-profile
第四部分 VPDN
VPDN(virtual private dialup network)
PPTP(Point-to point tunneling protocol)
L2TP over IPSec(layer 2 tunneling protocol)
PPTP介绍
由两个协议组成-控制信道TCP/1723-封装PPP数据GREPPP能够封装IP,NetBEUI ,IPX等多种协议
PPTP需要注意的问题
PPTP封装数据使用GRE协议,所以需要考虑--如何穿越防火墙--如何穿越PAT设备cisco ASA使用“inspect pptp”解决PPTP穿越问题PPTP可以使用MPPE(microsoft point-to-point encryption)技术实现加密,但是必须和MSCHAPv1/v2联合使用
4.2 PPTP配置
GW:
vpdn enablevpdn-group 1 accept-dialin(接受拨入) protocol pptp virtual-template 1(关联到虚模板用于clone 产生virtual-access接口)username pptpuser password ciscoip local pool ippool 123.1.1.100 123.1.1.200intface virtual-template 1 ip unnumbered ethernet1/0(unnumbered 任意一个有ip的接口,也可以任意配置ip地址) peer default ip address pool ippool ppp encrypt mppe auto required (启用MPPE对PPTP流量进行加密,required表示必须要加密) ppp authentication ms-chap-v2(MPPT必须和ms-chap联合使用)
win7:
创建一个拨号连接
4.3 L2TP 技术介绍
L2TP是一个标准协议L2TP源自于两个老的PPP隧道协议cisco的layer2 forwarding protocol(L2F)和microsoft的PPTPL2TP自身不提供安全机制,IPsec是保障L2TP安全性的首选,也就是L2TP over ipsec(transport mode)L2TP所有数据都被封装在UDP/1701内
4.4 L2TP over IPSec 配置
GW:
vpdn enablevpdn-group 1 accept-dialin protocol l2tp virtual-template 1 l2tp security crypto-profile cryptoprof no l2tp tunnel authenticationusername l2tpuser password ciscoip local pool ippool 123.1.1.100 123.1.1.200intface virtual-template 1 ip unnumbered ethernet1/0 peer default ip address pool ippool ppp authentication ms-chap-v2(ms默认算法) #配置ipsecusername l2tpuser password ciscocrypto isakmp policy 10 authentication pre-share encryption 3des group 2 crypto isakmp key cisco address 0.0.0.0 0.0.0.0 crypto ipsec transform-set cisco esp-3des esp-sha-hmac mode transport crypto map cisco 10 ipsec-isakmp profile cryptoprof set transform-set cisco inter ethernet1/0 ip address 202.100.1.1 255.255.255.0 crypto map cisco
win7:
创建L2TP的拨号