IPsec ***配置步驟

配置LAN-to-LAN ***
1)在R1上配置IKEISAKMP)策略:
r1(config)#crypto isakmp policy 1
r1(config-isakmp)#encryption 3des
r1(config-isakmp)#hash sha
r1(config-isakmp)#authentication pre-share
r1(config-isakmp)#group 2
r1(config-isakmp)#exit
說明:定義了ISAKMP policy 1,加密方式爲3deshash算法爲sha,認證方式爲Pre-Shared Keys (PSK),密鑰算法(Diffie-Hellman)爲group 2
 
2)在R1上定義認證標識:
r1(config)#crypto isakmp key 0 cisco123 address 23.1.1.3
說明:因爲之前定義的認證方式爲Pre-Shared Keys (PSK),所以需要定義認證密碼,這裏定義與peer 23.1.1.3的認證密碼爲cisco123,並且雙方密碼必須一致,否則無法建立IKE SA,其中0表示密碼在running-config中顯示爲明文。
 
3)在R1上配置IPsec transform:
r1(config)#crypto ipsec transform-set ccie esp-3des esp-sha-hmac
r1(cfg-crypto-trans)#exit
說明:配置了transform-setccie,其中數據封裝使用esp3des加密,並且使用esp結合shahash計算,默認的IPsec modetunnel
 
4)在R1上定義感興趣流量:
r1(config)#access-list 100 permit ip 10.1.1.0 0.0.0.255 192.168.1.0 0.0.0.255
說明:這裏需要被IPsec保護傳輸的流量爲上海公司至北京公司的流量,即10.1.1.0/24發往 192.168.1.0/24的流量,切記不可使用any來表示地址。
 
5)在R1上創建crypto map:
r1(config)#crypto map l2l 1 ipsec-isakmp
r1(config-crypto-map)#set peer 23.1.1.3
r1(config-crypto-map)#set transform-set ccie
r1(config-crypto-map)#match address 100
r1(config-crypto-map)#exit
說明:R1上配置crypto mapl2l,序號爲1,即第1組策略,其中指定加密數據發往的對端爲23.1.1.3,即和23.1.1.3建立IPsec隧道,調用的IPsec transformccie,並且指定ACL 100中的流量爲被保護的流量。
 
6)在R1上將crypto map應用於接口:
r1(config)#int f0/0
r1(config-if)#crypto map l2l
r1(config-if)#exit
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章