IPSEC ××× 綜合應用

IPSEC ××× 

R1-CQ:group 1 des   esp-des esp-sha-hmac

R1-NJ :group 2 3des  esp-3des esp-sha-hmac

R1-SH:group 5 3des  esp-3des esp-sha-hmac

總部R1配置:

R1(config)#int loop1

R1(config-if)#ip add 10.1.1.1 255.255.255.0

R1(config-if)#int  f0/0

R1(config-if)#ip add 199.1.1.1 255.255.255.0

R1(config-if)#no shutdown

R1(config)#ip route 0.0.0.0 0.0.0.0 f0/0

R1(config)#crypto isakmp enable

R1(config)#crypto isakmp policy 1

R1(config-isakmp)#authentication pre-share 

R1(config-isakmp)#encryption des 

R1(config-isakmp)#group 1

R1(config)#crypto isakmp key 6 123 address 201.1.1.2

R1(config)#crypto isakmp policy 2

R1(config-isakmp)#authentication pre-share 

R1(config-isakmp)#encryption 3des 

R1(config-isakmp)#hash sha 

R1(config-isakmp)#group 2

R1(config)#crypto isakmp key 6 456 address 202.1.1.2

R1(config)#crypto isakmp policy 3

R1(config-isakmp)#authentication pre-share 

R1(config-isakmp)#encryption 3des 

R1(config-isakmp)#hash sha 

R1(config-isakmp)#group 5

R1(config)#crypto isakmp key 6 789 address 203.1.1.2

R1(config)#access-list 100 permit ip 10.1.1.0 0.0.0.255 172.16.1.0 0.0.0.255

R1(config)#access-list 101 permit ip 10.1.1.0 0.0.0.255 172.16.2.0 0.0.0.255

R1(config)#access-list 102 permit ip 10.1.1.0 0.0.0.255 172.16.3.0 0.0.0.255

R1(config)#crypto ipsec transform-set abc esp-des esp-sha-hmac

R1(cfg-crypto-trans)#mode tunnel

R1(config)#crypto map cisco 10 ipsec-isakmp

R1(config-crypto-map)#match address 100

R1(config-crypto-map)#set transform-set abc

R1(config-crypto-map)#set pfs group1

R1(config-crypto-map)#set peer 201.1.1.2

R1(config)#crypto ipsec transform-set abc1 esp-3des esp-sha-hmac 

R1(cfg-crypto-trans)#mode tunnel

R1(config)#crypto map cisco 20 ipsec-isakmp

R1(config-crypto-map)#match address 101

R1(config-crypto-map)#set transform-set abc1

R1(config-crypto-map)#set pfs group2

R1(config-crypto-map)#set peer 202.1.1.2

R1(config)#crypto ipsec transform-set abc2 esp-3des esp-sha-hmac 

R1(cfg-crypto-trans)#mode tunnel

R1(config)#crypto map cisco 30 ipsec-isakmp

R1(config-crypto-map)#match address 102

R1(config-crypto-map)#set transform-set abc2

R1(config-crypto-map)#set pfs group5

R1(config-crypto-map)#set peer 203.1.1.2

R1(config)#int f0/0

R1(config-if)#crypto map cisco

R2(config)#int f0/0

R2(config-if)#ip add 199.1.1.2 255.255.255.0

R2(config-if)#int f1/0

R2(config-if)#ip add 200.1.1.1 255.255.255.0

R2(config-if)#no shutdown 

R2(config)#router ospf 1

R2(config-router)#net 199.1.1.0 0.0.0.255 area 0

R2(config-router)#net 200.1.1.0 0.0.0.255 area 0

R3(config)#int f1/0

R3(config-if)#ip add 200.1.1.2 255.255.255.0

R3(config-if)#no shutdown 

R3(config-if)#int f0/0

R3(config-if)#ip add 201.1.1.1 255.255.255.0

R3(config-if)#no shutdown 

R3(config-if)#int f2/0

R3(config-if)#ip add 202.1.1.1 255.255.255.0

R3(config-if)#no shutdown 

R3(config-if)#int f3/0

R3(config-if)#ip add 203.1.1.1 255.255.255.0

R3(config-if)#no shutdown 

R3(config)#router ospf 1

R3(config-router)#net 200.1.1.0 0.0.0.255 area 0

R3(config-router)#net 201.1.1.0 0.0.0.255 area 2

R3(config-router)#net 202.1.1.0 0.0.0.255 area 3

R3(config-router)#net 203.1.1.0 0.0.0.255 area 4

分佈重慶配置:

R4(config)#int f0/0

R4(config-if)#ip add 201.1.1.2 255.255.255.0

R4(config-if)#no shutdown

R4(config-if)#int loop1

R4(config-if)#ip add 172.16.1.1 255.255.255.0

R4(config)#ip route 0.0.0.0 0.0.0.0 f0/0

R4(config)#crypto isakmp enable

R4(config)#crypto isakmp policy 1

R4(config-isakmp)#authentication pre-share 

R4(config-isakmp)#encryption des 

R4(config-isakmp)#group 1

R4(config)#crypto isakmp key 6 123 address 199.1.1.1

R4(config)#access-list 100 permit ip 172.16.1.0 0.0.0.255 10.1.1.0 0.0.0.255

R4(config)#crypto ipsec transform-set abc esp-des esp-sha-hmac 

R4(cfg-crypto-trans)#mode tunnel 

R4(config)#crypto map cisco 10 ipsec-isakmp 

R4(config-crypto-map)#match address 100

R4(config-crypto-map)#set transform-set abc

R4(config-crypto-map)#set pfs group1

R4(config-crypto-map)#set peer 199.1.1.1

R4(config)#int f0/0

R4(config-if)#crypto map cisco     

分部南京配置:

R5(config)#int loop1

R5(config-if)#ip add 172.16.2.1 255.255.255.0

R5(config-if)#int f0/0

R5(config-if)#ip add 202.1.1.2 255.255.255.0

R5(config-if)#no shutdown 

R5(config)#ip route 0.0.0.0 0.0.0.0 f0/0

R5(config)#crypto isakmp enable 

R5(config)#crypto isakmp policy 2

R5(config-isakmp)#authentication pre-share 

R5(config-isakmp)#encryption 3des 

R5(config-isakmp)#hash sha 

R5(config-isakmp)#group 2

R5(config)#crypto isakmp key 6 456 address 199.1.1.1

R5(config)#access-list 101 permit ip 172.16.2.0 0.0.0.255 10.1.1.0 0.0.0.255

R5(config)#crypto ipsec transform-set abc1 esp-3des esp-sh

R5(config)#crypto ipsec transform-set abc1 esp-3des esp-sha-hmac 

R5(cfg-crypto-trans)#mode tunnel 

R5(config)#crypto map cisco 20 ipsec-isakmp 

R5(config-crypto-map)#match address 101

R5(config-crypto-map)#set transform-set abc1

R5(config-crypto-map)#set pfs group2

R5(config-crypto-map)#set peer 199.1.1.1

R5(config)#int f0/0

R5(config-if)#crypto map cisco       

分部SH配置:

R6(config)#int loop1

R6(config-if)#ip add 172.16.3.1 255.255.255.0

R6(config-if)#int f0/0

R6(config-if)#ip add 203.1.1.2 255.255.255.0

R6(config-if)#no shutdown 

R6(config)#ip route 0.0.0.0 0.0.0.0 f0/0

R6(config)#crypto isakmp enable 

R6(config)#crypto isakmp policy 3

R6(config-isakmp)#authentication pre-share 

R6(config-isakmp)#encryption 3des 

R6(config-isakmp)#hash sha 

R6(config-isakmp)#group 5

R6(config)#crypto isakmp key 6 789 address 199.1.1.1

R6(config)#access-list 102 permit ip 172.16.3.0 0.0.0.255 10.1.1.0 0.0.0.255 

R6(config)#crypto ipsec transform-set abc2 esp-3des esp-sh

R6(config)#crypto ipsec transform-set abc2 esp-3des esp-sha-hmac 

R6(cfg-crypto-trans)#mode tunnel 

R6(config)#crypto map cisco 30 ipsec-isakmp 

R6(config-crypto-map)#match address 102

R6(config-crypto-map)#set transform-set abc2

R6(config-crypto-map)#set pfs group5

R6(config-crypto-map)#set peer 199.1.1.1

R6(config)#int f0/0

R6(config-if)#crypto map cisco

此時總部與分公司的內部網絡通訊成功

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