基于思科IOS场地场的预共享Ipsec×××

wKioL1LWm8XwaGYnAACm-WegySk193.jpg

1、配置路由器的各个接口配置ide

×××_A(config)#int e1/0oop

×××_A(config-if)#ip address 202.202.1.1 255.255.255.0测试

×××_A(config-if)#no shut加密

×××_A(config)#int loopback 1spa

×××_A(config-if)#ip address 192.168.1.1 255.255.255.0orm

×××_A(config-if)#no shutrouter

×××_A(config-if)#exitblog

×××_A(config)#router rip接口

×××_A(config-router)#no au生命周期

×××_A(config-router)#no auto-summary

×××_A(config-router)#version 2

×××_A(config-router)#network 202.202.1.0



ISP(config)#int e1/0

ISP(config-if)#ip add

ISP(config-if)#ip address 202.202.1.2 255.255.255.0

ISP(config-if)#no shut

ISP(config-if)#exit

ISP(config)#int

ISP(config)#int e1/1

ISP(config-if)#ip add 202.202.2.1 255.255.255.0

ISP(config-if)#no shut

ISP(config-if)#exit

ISP(config)#router rip

ISP(config-router)#no auto-summary

ISP(config-router)#version 2

ISP(config-router)#network 202.202.1.0

ISP(config-router)#network 202.202.2.0



×××_B#conf t

×××_B(config)#int e1/1

×××_B(config-if)#ip add 202.202.2.2 255.255.255.0

×××_B(config-if)#no shut

×××_B(config-if)#exit

×××_B(config)#int loopback 1

×××_B(config-if)#ip add 192.168.2.1 255.255.255.0

×××_B(config-if)#no shut

×××_B(config-if)#exit

×××_B(config)#router rip

×××_B(config-router)#no auto-summary

×××_B(config-router)#version 2

×××_B(config-router)#network 202.202.2.0


2、下面是IPsec_×××配置


×××_A(config)#crypto ipsec transform-set ***_weichun ah-sha-hmac esp-des    (IPsec交集配置)

×××_A(cfg-crypto-trans)#exit

×××_A(config)#crypto isakmp policy 1               (指定IKE交换集策略)

×××_A(config-isakmp)#authentication pre-share       (指定IKE的加密方式为des)

×××_A(config-isakmp)#hash sha                        (指定IKE的方式为预共享)

×××_A(config-isakmp)#group 5                    

×××_A(config-isakmp)#lifetime 40000                   (指定IKE的生命周期)

×××_A(config-isakmp)#exit

×××_A(config)#crypto isakmp key ccna address 202.202.2.2     (预共享密钥为ccna)

×××_A(config)#access-lits 101 permit ip 192.168.1.0 0.0.0.255 192.168.2.0 0.0.0.255    (定义一个访问控制列表)

×××_A(config)#crypto map ccna_*** 1 ipsec-isakmp

×××_A(config-crypto-map)#set transform-set ***_weichun

×××_A(config-crypto-map)#set peer 202.202.2.2

×××_A(config-crypto-map)#match address 101

×××_A(config-crypto-map)#ip route 192.168.2.0 255.255.255.0 e1/0

×××_A(config)#int e1/0

×××_A(config-if)#crypto map ccna_***




×××_B(config)#crypto ipsec transform-set ***_weichun ah-sha-hmac esp-des    (IPsec交集配置)

×××_B(cfg-crypto-trans)#exit

×××_B(config)#crypto isakmp policy 1               (指定IKE交换集策略)

×××_B(config-isakmp)#authentication pre-share       (指定IKE的加密方式为des)

×××_B(config-isakmp)#hash sha                        (指定IKE的方式为预共享)

×××_B(config-isakmp)#group 5                    

×××_B(config-isakmp)#lifetime 40000                   (指定IKE的生命周期)

×××_B(config-isakmp)#exit

×××_B(config)#crypto isakmp key ccna address 202.202.1.1     (预共享密钥为ccna)

×××_B(config)#access-lits 101 permit ip 192.168.2.0 0.0.0.255 192.168.1.0 0.0.0.255    (定义一个访问控制列表)

×××_B(config)#crypto map ccna_*** 1 ipsec-isakmp

×××_B(config-crypto-map)#set transform-set ***_weichun

×××_B(config-crypto-map)#set peer 202.202.2.2

×××_B(config-crypto-map)#match address 101

×××_B(config-crypto-map)#ip route 192.168.1.0 255.255.255.0 e1/0

×××_B(config)#int e1/1

×××_B(config-if)#crypto map ccna_***



3、测试结果

wKiom1LWnnDCx_b_AAHPYs6PtPE965.jpg

wKiom1LWnoGylKybAAHluuFF650874.jpg

wKioL1LXwgug3_tPAAGPAsoMLMA965.jpg

相关文章
相关标签/搜索