實驗拓撲圖:
1、首先在一臺PC上安裝Cisco SDM軟體,並且需要安裝JAVA環境。
2、配置各臺路由器的IP地址,並且使用ping命令確認各路由器的直連口的互通性。基本配置如下:
R1(config)#
interface loop 0
R1(config-if)#
ip address 172.16.1.1 255.255.255.0
R1(config-if)#
ip address 172.16.2.1 255.255.255.0 secondary
R1(config-if)#
exit
R1(config)#
interface serial 1/1
R1(config-if)#
ip address 202.102.48.65 255.255.255.252
R1(config-if)#
no shutdown
R1(config-if)#
exit
R1(config)#
interface fastethernet 0/0
R1(config-if)#
ip address 10.1.1.1 255.255.255.0
R1(config-if)#
no cdp enable
R1(config-if)#
no shutdown
R1(config-if)#
exit
R1(config)#
ip route 0.0.0.0 0.0.0.0 202.102.48.66
R2(config)#
interface serial 1/0
R2(config-if)#
ip address 202.102.48.66 255.255.255.252
R2(config-if)#
no shutdown
R2(config-if)#
exit
R2(config-if)#
R2(config)#
interface serial 1/1
R2(config-if)#
ip address 211.64.135.33 255.255.255.252
R2(config-if)#
no shutdown
R2(config-if)#
exit
R3(config)#
interface loopback 0
R3(config-if)#
ip address 192.168.1.1 255.255.255.0
R3(config-if)#
ip address 192.168.2.1 255.255.255.0 secondary
R3(config-if)#
exit
R3(config)#
interface serial 1/0
R3(config-if)#
ip address 211.64.135.34 255.255.255.252
R3(config-if)#
no shutdown
R3(config-if)#
exit
R3(config)#
interface fastethernet 0/0
R3(config-if)#
no cdp enable
R3(config-if)#
ip address 10.1.1.3 255.255.255.0
R3(config-if)#
no shutdown
R3(config-if)#
exit
R3(config)#
ip route 0.0.0.0 0.0.0.0 211.64.135.33
3、為了能夠讓SDM連線到R1和R3路由器,因此需要在R1和R3上啟用http server服務,配置如下:
R1(config)#
ip http server
R3(config)#
ip http server
4、另外,為了避免SDM不能正常工作,需要對安裝SDM的PC的活動內容進行啟用。啟用的方法是
開啟 IE 瀏覽器,選擇“工具”選單項,繼續選擇“Internet 選項”, 在彈出的對話方塊中,選擇“高階”選項卡,找到下圖選項並打勾。中文是:“允許活動內容在我的計算機上的檔案中執行”。
5、啟動SDM,並且填寫需要管理的裝置IP地址,並單擊Launch按鈕,如下圖顯示:
6、然後在SDM的介面中,選擇“
Configure
”,繼續選擇“
VPN
”,然後選擇“
Site-to-Site VPN
”,選擇“
Create a Site to Site VPN
”,點選“
Launch the selected task
”。如下面所示:
7、在新彈出的Site-to-Site Wizard對話方塊中,選擇“Step by step wizard”,點選下一步。以便於清晰瞭解配置的全過程。
8、選擇建立VPN的介面,配置對等體的IP,選擇認證型別。本實驗選擇了預共享金鑰作為認證方式,因此還需要配置預共享的金鑰。如下圖所示:
9、選擇IKE的策略,也可以新增新策略,本實驗使用預設策略:如下圖所示:
10、選擇IPsec的變換集,本實驗選擇預設,也可能新增新策略,如下圖所示:
11、配置需要被加密保護的IP流量,也可以編寫自定義的ACL進行定義。如下圖所示:
12、檢視配置彙總資訊,如下圖所示:
13、點選結束按鈕,將生成的命令寫入到R1路由器,如下圖所示:
14、完成配置後,可以在R1路由器使用show running-config命令檢視SDM生成的配置命令。
採用相同的配置步驟完成R3的配置,此處不再列出。
:‘15、在SDM中選擇R1或R2路由器測試隧道,如下圖所示:
16、在R1或R3上使用擴充套件ping命令測試隧道:
R1#
ping
Protocol [ip]:
Target IP address: 192。168。1。1
Repeat count [5]:
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]: y
Source address or interface: 172。16。1。1
Type of service [0]:
Set DF bit in IP header? [no]:
Validate reply data? [no]:
Data pattern [0xABCD]:
Loose, Strict, Record, Timestamp, Verbose[none]:
Sweep range of sizes [n]:
Type escape sequence to abort。
Sending 5, 100-byte ICMP Echos to 192。168。1。1, timeout is 2 seconds:
Packet sent with a source address of 172。16。1。1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 72/132/188 ms
R1#
17、具體除錯資訊和其它狀態檢視,請參閱實驗:
Configuring IPsec Site-to-Site With Preshare-Key
。
18、實驗完成。