IPsec ***實驗

PacketTracer這款模擬器,雖然比不上工大瑞普和小凡等模擬器,但作爲初學者的入門,模擬器是一個不錯的模擬器。其優點在於較真實的事物效果功能(能看交換機路由器的形狀,能換網絡模塊等),能加深初學者網絡拓撲圖的學習。在PacketTracer 5.2之前的PacketTracer系列模擬器都不能做***實驗。現在PacketTracer 5.2可以做***,但功能有限,只能做一部分***實驗,傳輸模式的IPSEc ***和easy ***。(若想玩更深的***,還是會玩工大瑞普和小凡模擬器)。

現在就開始PacketTracer 5.2的IPsec ***實驗
網絡拓撲大概描述一下:


Router 1 模擬成Internet網(其實,就是沒有私有IP地址路由的路由器,在說通俗點,現在***技術常用來解決總部與分部跨越Internet網解決內部私有地址的連通性)
Router 3 爲總部,Router 4 爲分部。
IP規劃:
Router 1 FastEthernet0/0   200.1.1.1    FastEthernet0/1  100.1.1.1
Router 3  FastEthernet0/0  192.168.1.254  FastEthernet0/1 100.1.1.2
Router 4 FastEthernet0/0   200.1.1.2       FastEthernet0/1   192.168.2.254
PC1 :192.168.1.1/24
PC2:    192.168.2.1/24
實驗要求讓總部和分佈的私有地址能通信!(大家可以按我的配置做一遍,紅色爲***配置關鍵代碼,在沒配置***時,PC1 是不能與PC2 相互Ping通)

配置如下:
Router1 的配置(Internet):
interface FastEthernet0/0
ip address 200.1.1.1 255.255.255.0
no shutdown

interface FastEthernet0/1
ip address 100.1.1.1 255.255.255.0
no shutdown

Router 3的配置:

crypto isakmp policy 10
encr 3des
hash md5
authentication pre-share

crypto isakmp key tom address 200.1.1.2

crypto ipsec transform-set tim esp-3des esp-md5-hmac

access-list 101 permit ip 192.168.1.0 0.0.0.255 192.168.2.0 0.0.0.255


crypto map tom 10 ipsec-isakmp
set peer 200.1.1.2
set transform-set tim
match address 101

interface FastEthernet0/0
ip address 192.168.1.254 255.255.255.0
no shutdown

interface FastEthernet0/1
ip address 100.1.1.2 255.255.255.0
no shutdown
crypto map tom

ip route 0.0.0.0 0.0.0.0 100.1.1.1

Router 4的配置:
crypto isakmp policy 10
encr 3des
hash md5
authentication pre-share

crypto isakmp key tom address 100.1.1.2

crypto ipsec transform-set tim esp-3des esp-md5-hmac
!
crypto map tom 10 ipsec-isakmp
set peer 100.1.1.2
set transform-set tim
match address 101

access-list 101 permit ip 192.168.2.0 0.0.0.255 192.168.1.0 0.0.0.255

interface FastEthernet0/0
ip address 200.1.1.2 255.255.255.0
no shutdown
crypto map tom

interface FastEthernet0/1
ip address 192.168.2.254 255.255.255.0
no shutdown

ip route 0.0.0.0 0.0.0.0 200.1.1.1

最終,PC1和PC2能相互Ping通。(在Ping的過程中,會丟掉幾個包,因爲在建立IPSec ***的協商)。用show crypto isakmp sa 和show crypto ipsec sa能看到IPSec ***協商好的內容狀態。
 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章