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 ×××协商好的内容状态。
 

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