‘IPSec VPN 1’에서 학습한 개념을 바탕으로 여러가지 VPN을 설정해보도록 하자.
- Site-to-Site IPSec VPN
- GRE over IPSec VPN
1. Site-to-Site IPSec VPN

[설정]
– IKE 1단계 ISAKMP SA 및 공유키 설정 (R4, R5)
R4(config)# crypto isakmp policy 10 R4(config-isakmp)# encryption 3des R4(config-isakmp)# hash md5 R4(config-isakmp)# authentication pre-share R4(config-isakmp)# lifetime 2600 R4(config-isakmp)# group2 R4(config-isakmp)# exit R4(config)# R4(config)# crypto isakmp key cisco address 13.13.12.2 R5(config)# crypto isakmp policy 10 R5(config-isakmp)# encryption 3des R5(config-isakmp)# hash md5 R5(config-isakmp)# authentication pre-share R5(config-isakmp)# lifetime 2600 R5(config-isakmp)# group2 R5(config-isakmp)# exit R5(config)# R5(config)# crypto isakmp key cisco address 13.13.10.1
– IKE 2단계 IPSec SA 설정 (R4,R5)
R4(config)# access-list 100 permit ip 192.168.0.0 0.0.0.255 172.30.1.0 0.0.0.255 R4(config)# crypto ipsec transform-set CISCO esp-3des esp-sha-hmac R4(config)# R4(config)# crypto map IPSEC 10 ipsec-isakmp R4(config-crypto-map)# set peer 13.13.12.2 R4(config-crypto-map)# set transform-set CISCO R4(config-crypto-map)# match address 100 R4(config-crypto-map)# exit R4(config)# R4(config)# int fa0/0 R4(config)# crypto map IPSEC R5(config)# access-list 100 permit ip 172.30.1.0 0.0.0.255 192.168.0.0 0.0.0.255 R5(config)# crypto ipsec transform-set CISCO esp-3des esp-sha-hmac R5(config)# R5(config)# crypto map IPSEC 10 ipsec-isakmp R5(config-crypto-map)# set peer 13.13.10.1 R5(config-crypto-map)# set transform-set CISCO R5(config-crypto-map)# match address 100 R5(config-crypto-map)# exit R5(config)# R5(config)# int fa0/0 R5(config)# crypto map IPSEC
[동작 확인]
– R4 PC → R5 PC로 PING 테스트 후 isakmp sa 확인.


‘show crypto isakmp sa’를 했을 때, dst와 src가 조회되는 걸 확인할 수 있다.
– 정책 내용 확인 (순서대로 1단계, 2단계)

2. GRE over IPSec VPN
GRE over IPSec VPN은 Tunnel 만 추가 구성하는 것 외에는Site-to-Site와 크게 다르지 않다.

[설정]
– Tunnel Interface 구성
R4(config)# int tunnel 10 R4(config-if)# ip addr 10.250.10.1 255.255.255.240 R4(config-if)# tunnel source 13.13.10.1 R4(config-if)# tunnel destination 13.13.12.2 R4(config-if)# exit R4(config)# R4(config)# ip route 172.30.1.0 255.255.255.0 tunnel 10 R4(config)# int tunnel 10 R4(config-if)# ip addr 10.250.10.2 255.255.255.240 R4(config-if)# tunnel source 13.13.12.2 R4(config-if)# tunnel destination 13.13.10.1 R4(config-if)# exit R4(config)# R4(config)# ip route 192.168.0.0 255.255.255.0 tunnel 10
– IKE 1단계 ISAKMP SA 및 공유키 설정 (R4, R5)
Site-to-Site IPSec VPN 설정 참고
– IKE 2단계 IPSec SA 설정 (R4,R5)
Site-to-Site IPSec VPN 설정 참고