近年來,隨首***技術的發展,越來越多的***產品支持動態IP,這使得一些公司的總部與小的子公司及辦事處能夠建立低成本的***(質量也不低)。Cisco公司的DM***技術就是針對此種解決方案的。如總部利用專線連接Internet(如果連專線都沒有,那就稱不上什麼總部了,不在此文章論述範圍 ^-^),有固定IP地址,而小的辦事處使用ADSL連接Internet,如果需要把辦事處的網絡和總部的網絡連接起來,可使用cisco路由器來完成(當然華爲的路由器也可利用D***來實現)。如果熟悉IP Tunnel配置,可很快上手DM***配置。有些ISP給客戶提供的線路備份方案就是利用此技術實現的。(注:只要理解了DM***配置,簡單網絡與複雜網絡的配置是一樣的)
DM***應用在多點到單點或多點到多點的***網絡環境中。其通過hub-spokes模式來實現,它可以在兩個或多個DM***成員的各自子網間動態建立基於GRE over ipsec連接的路由路徑。根據目的前綴和下一跳結合路由協議來推斷調用的GRE隧道和相關ipsec 保護策略。(此文章不再論述mGRE和NHRP的知識)
配置步驟:
1. 通過mGRE的封裝代替p-t-p GRE封裝來減少手動tunnel 數量及有效結合NHRP。
2. mGRE的下一跳動態解析功能通過NHRP來實現,以便動態建立保護網絡間的臨時tunnel.(保護網絡要路由通告出去或分佈)
3. 通過ipsec profile 實現 ipsec automatic proxy 功能;保護GRE封裝流量,加密根據NHRP和動態路由協議建立起來的保護網絡間的臨時tunnel。(由於是動態方式,IKE 的遠程對端IP爲.0)
實例:
總部cisco路由器
需要配置(其它不相關的配置在此省略)
crypto isakmp policy 1
authentication pre-share
crypto isakmp key ikeadmin address .0
!
crypto ipsec transform-set jiang esp-des esp-md5-hmac
mode transport
!
crypto ipsec profile ***config
set transform-set jiang
!
interface Tunnel0
bandwidth 2000
ip address .1 255.255.255.0
ip mtu 1436(注意設置MTU)
ip nhrp authentication dm***key(nhrp認證,在匹配後,調用mGRE屬性)
ip nhrp map multicast dynamic(啓用NHRP自動加入分支路由器到多播NHRP映射組中)
ip nhrp network-id 99(啓用NHRP,在匹配後,調用mGRE屬性)
ip nhrp holdtime 300
no ip split-horizon eigrp 1(當使用EIGRP協議時,屏蔽水平分割)
no ip next-hop-self eigrp 1 (當使用EIGRP時,直接建立動態SPOKE-TO-SPOKE隧道)
delay 1000
tunnel source Ethernet1
tunnel mode gre multipoint(設置隧道接口的封裝模式爲mGRE)
tunnel key daoyou (tunnel 認證)
tunnel protection ipsec profile ***config(爲隧道接口指定IPSEC模板)
!
interface Ethernet1
ip address 218.4.x.2 255.255.255.224
!
interface Ethernet0
ip address 192.168.2.253 255.255.255.0
!
router eigrp 1
network .0 0.0.0.255 area 0
network 192.168.0.0 .255 area 0
辦事處路由器配置
crypto isakmp policy 1
authentication pre-share
crypto isakmp key ikeadmin address .0
!
crypto ipsec transform-set jiang esp-des esp-md5-hmac
mode transport
!
crypto ipsec profile ***config
set transform-set jiang
interface Tunnel0
ip address .2 255.255.255.0
ip nhrp authentication dm***key
ip nhrp ma.1 218.4.x.2
ip nhrp map multicast 218.4.x.2
ip nhrp network-id 99
ip nhrp holdtime 60
ip nhrp nhs .1
ip tcp adjust-mss 1436
tunnel source Dialer0
tunnel destination 218.4.x.2
tunnel key daoyou
tunnel protection ipsec profile ***prof
!
interface Ethernet0
ip address 192.168.0.1 255.255.255.0
ip nat inside
half-duplex
!
interface FastEthernet0
no ip address
speed auto
half-duplex
pppoe enable
pppoe-client dial-pool-number 1
!
interface Dialer0
mtu 1436
bandwidth 2048
ip address negotiated
ip nat outside
encapsulation ppp
dialer pool 1
dialer-group 1
ppp authentication pap callin
ppp pap sent-username [email protected] password 7
!
dialer-list 1 protocol ip permit
ip nat inside source list 100 interface Dialer0 overload