Topology:
配置第一阶段加密
ZB(config)#crypto isZB(config-if)#
在另外一台(FB)上面配置按照ZB路由器配置既可。
其中ISP路由器中只需要配置接口IP,并在R1和R2上写一条静态路由,将数据抛给ISP。
随后在PC1上tracert 192.168.2.2
PC>tracert 192.168.2.2
Tracing route to 192.168.2.2 over a maximum of 30 hops:
1 0 ms 1 ms 0 ms 192.168.1.1
2 * * * Request timed out.
3 0 ms 0 ms 0 ms 192.168.2.2
Trace complete.
outbound pcp sas:
分隔线:因为博客中不能上传文件,只能将配置贴在下方
----------------------------------------------------------------------------------------------
ZB#sh run
Building configuration...
Current configuration : 915 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname ZB
!
!
!
!
!
!
!
!
crypto isakmp policy 1
encr 3des
hash md5
authentication pre-share
group 2
lifetime 3600
!
crypto isakmp key admin address 2.2.2.1
!
!
crypto ipsec transform-set ah-sha-hmac esp-3des
!
crypto map cisco 1 ipsec-isakmp
set peer 2.2.2.1
set transform-set
match address 101
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
interface FastEthernet0/0
ip address 1.1.1.1 255.255.255.0
duplex auto
speed auto
crypto map cisco
!
interface FastEthernet0/1
ip address 192.168.1.1 255.255.255.0
duplex auto
speed auto
!
interface Vlan1
no ip address
shutdown
!
ip classless
ip route 0.0.0.0 0.0.0.0 1.1.1.2
!
!
access-list 101 permit ip 192.168.1.0 0.0.0.255 192.168.2.0 0.0.0.255
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
!
end
----------------------------------------------------------------------------------------------
ISP#sh run
Building configuration...
Current configuration : 504 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname ISP
!
!
!
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
interface FastEthernet0/0
ip address 1.1.1.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 2.2.2.2 255.255.255.0
duplex auto
speed auto
!
interface Vlan1
no ip address
shutdown
!
ip classless
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
!
end
----------------------------------------------------------------------------------------------
FB#sh run
Building configuration...
Current configuration : 915 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname FB
!
!
!
!
!
!
!
!
crypto isakmp policy 1
encr 3des
hash md5
authentication pre-share
group 2
lifetime 3600
!
crypto isakmp key admin address 1.1.1.1
!
!
crypto ipsec transform-set ah-sha-hmac esp-3des
!
crypto map cisco 1 ipsec-isakmp
set peer 1.1.1.1
set transform-set
match address 101
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
interface FastEthernet0/0
ip address 2.2.2.1 255.255.255.0
duplex auto
speed auto
crypto map cisco
!
interface FastEthernet0/1
ip address 192.168.2.1 255.255.255.0
duplex auto
speed auto
!
interface Vlan1
no ip address
shutdown
!
ip classless
ip route 0.0.0.0 0.0.0.0 2.2.2.2
!
!
access-list 101 permit ip 192.168.2.0 0.0.0.255 192.168.1.0 0.0.0.255
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
!
end
----------------------------------------------------------------------------------------------