-
[패킷트레이서/실습] 19.5.5 사이트 간 IPsec VPN 구성 및 확인공부/패킷 트레이서 2023. 11. 20. 18:35
Part 1: R1에서 IPsec 매개변수 구성
STEP 1 : 연결을 테스트합니다.
- PC-A에서 PC-C로 핑. 장치들은 모두 라우팅으로 구성되어 있습니다. 따라서 핑은 성공적일 것입니다.
STEP 2: 보안 기술 패키지를 활성화합니다.
a. R1에서 show version 명령을 실행하여 Security Technology 패키지 라이센스 정보를 봅니다.
b. Security Technology 패키지가 실행되지 않은 경우 다음 명령을 사용하여 패키지를 실행합니다.R1(config)# license boot module c1900 technology-package securityk9 // license boot module c1900 // 이 부분은 Cisco 1900 시리즈 라우터에 대한 라이선스 부팅 모듈을 설정하고 있습니다. // 이는 특정 모듈에 대한 라이선스를 부팅 시에 활성화하는 데 사용됩니다. // technology-package securityk9 // 이 부분은 라우터에 보안 기능을 포함한 K9 기술 패키지를 적용한다는 것을 나타냅니다. // "securityk9"는 Cisco IOS 소프트웨어의 보안 기능을 활성화하는 데 사용되는 옵션 중 하나입니다. PLEASE READ THE FOLLOWING TERMS CAREFULLY. INSTALLING THE LICENSE OR LICENSE KEY PROVIDED FOR ANY CISCO PRODUCT FEATURE OR USING SUCH PRODUCT FEATURE CONSTITUTES YOUR FULL ACCEPTANCE OF THE FOLLOWING TERMS. YOU MUST NOT PROCEED FURTHER IF YOU ARE NOT WILLING TO BE BOUND BY ALL THE TERMS SET FORTH HEREIN. Use of this product feature requires an additional license from Cisco, together with an additional payment. You may use this product feature on an evaluation basis, without payment to Cisco, for 60 days. Your use of the product, including during the 60 day evaluation period, is subject to the Cisco end user license agreement http://www.cisco.com/en/US/docs/general/warranty/English/EU1KEN_.html If you use the product feature beyond the 60 day evaluation period, you must submit the appropriate payment to Cisco for the license. After the 60 day evaluation period, your use of the product feature will be governed solely by the Cisco end user license agreement (link above), together with any supplements relating to such product feature. The above applies even if the evaluation license is not automatically terminated and you do not receive any notice of the expiration of the evaluation period. It is your responsibility to determine when the evaluation period is complete and you are required to make payment to Cisco for your use of the product feature beyond the evaluation period. Your acceptance of this agreement for the software features on one product shall be deemed your acceptance with respect to all such software on all Cisco products you purchase which includes the same software. (The foregoing notwithstanding, you must purchase a license for each software feature you use past the 60 days evaluation period, so that if you enable a software feature on 1000 devices, you must purchase 1000 licenses for use past the 60 day evaluation period.) Activation of the software command line interface will be evidence of your acceptance of this agreement. ACCEPT? [yes/no]: yes % use 'write' command to make license boot config take effect on next boot
c. 최종 사용자 라이센스 계약에 동의합니다.
d. 실행 중인 구성을 저장하고 라우터를 다시 로드하여 보안 라이센스를 활성화합니다.R1#write memory R1#reload
e. show version 명령을 다시 사용하여 securityk9가 현재 Technology 패키지 아래에 나열되어 있는지 확인합니다.STEP 3: R1에서 흥미로운 트래픽을 식별합니다.
- ACL 110을 구성하여 R1의 LAN에서 R3의 LAN으로 연결되는 트래픽을 관심 트래픽으로 식별합니다.
- 이 관심 트래픽은 R1에서 R3의 LAN 사이에 트래픽이 있을 때 IPsec VPN을 구현하도록 트리거합니다.
- LAN에서 발신되는 다른 모든 트래픽은 암호화되지 않습니다.
- 암묵적인 deny all로 인해 deny ip any 문을 구성할 필요가 없습니다.
R1(config)#access-list 110 permit ip 192.168.1.0 0.0.0.255 192.168.3.0 0.0.0.255 // 확장 ACL // IP 192.168.1.0/24 ~ 192.168.3.0/24로 가는 트래픽 허용
STEP 4: R1에서 IKE Phase 1 ISAKMP 정책을 구성합니다.
- 공유 암호키 vpnpa55와 함께 R1에 암호화 ISAKMP 정책 10 속성을 구성합니다.
- 기본값은 구성할 필요가 없습니다. 따라서 암호화 방식, 키 교환 방식, DH 방식만 구성해야 합니다.
- 참고: Packet Tracer에서 현재 지원하는 가장 높은 DH 그룹은 group 5입니다.
- 프로덕션 네트워크에서는 적어도 DH 24를 구성해야 합니다.
R1(config)#crypto isakmp policy 10 // ISAKMP (Internet Security Association and Key Management Protocol) 정책을 설정합니다. // 여기서 10은 이 정책의 우선순위를 나타냅니다. R1(config-isakmp)#encryption aes 256 // ISAKMP 정책 10에 대해 AES 암호화 알고리즘을 256 비트로 설정합니다. // 이는 VPN 연결에서 사용할 암호화 방법을 정의합니다. R1(config-isakmp)#authentication pre-share // 사전 공유 키를 사용하여 상호 인증을 설정합니다. // 이는 VPN 터널을 설정하는 데 필요한 사전 공유 키를 사용하여 상호 간에 인증을 수행하게 됩니다. R1(config-isakmp)#group 5 // Diffie-Hellman 그룹 5를 사용하여 키 교환을 설정합니다. // 이는 키 교환을 위해 사용되는 알고리즘과 관련이 있습니다. R1(config-isakmp)#exit R1(config)#crypto isakmp key vpnpa55 address 10.2.2.2 // VPN 연결에 사용할 사전 공유 키를 설정합니다. "vpnpa55"는 실제로 사용되는 사전 공유 키이며, // 이것은 원격 터미널의 IP 주소가 10.2.2.2일 때 사용됩니다.
STEP 5: R1에서 IKE 2단계 IPsec 정책을 구성합니다.
a. esp-aes 및 esp-sha-hmac을 사용할 transform-set VPN-SET을 만듭니다.
R1(config)#crypto ipsec transform-set VPN-SET esp-aes esp-sha-hmac // IPsec 변환 세트의 이름을 "VPN-SET"으로 정의 // esp-aes // ESP 프로토콜을 사용하여 암호화를 정의, 여기서는 AES 암호화 알고리즘 사용 // esp-sha-hmac // ESP를 사용하여 인증을 정의, 여기서는 SHA 해시 함수와 함께 HMAC을 사용
b. Phase 2 파라미터를 모두 묶은 암호맵 VPN-MAP을 작성하고 sequence number 10을 사용하여 ipsec-isakmp 맵으로 식별합니다.R1(config)#crypto map VPN-MAP 10 ipsec-isakmp % NOTE: This new crypto map will remain disabled until a peer and a valid access list have been configured. // crypto map을 생성하고 순서 번호 10을 할당 // crypto map 이름은 "VPN-MAP" // ipsec alc isakmp를 프로토콜을 사용하여 보안 연결을 설정 R1(config-crypto-map)#description VPN connection to R3 // crypto map에 대한 설명 (vpn 연결이 R3 라우터와 관련이 있음) R1(config-crypto-map)#set peer 10.2.2.2 // vpn 터널의 대상이 되는 원격 피어의 ip 주소를 설정, 이 경우 vpn 터널의 대상이 10.2.2.2인 것으로 설정 R1(config-crypto-map)#set transform-set VPN-SET // 이전에 정의한 IPsec 변환세트 "VPN-SET"을 crypto map에 연결하여 사용하도록 설정 R1(config-crypto-map)#match address 110 // crypto map이 적용될 트래픽을 결정하는데 사용되는 액세스 제어 목록(ACL)을 지정 // ACL 110은 특정할 트래픽을 선택하기 위해 사용 R1(config-crypto-map)#exit
STEP 6: 발신 인터페이스에 암호 맵을 구성합니다.
- VPN-MAP 암호 맵을 발신 시리얼 0/0/0 인터페이스에 바인딩( 프로그램의 어떤 기본 단위가 가질 수 있는 구성요소의 구체적인 값, 성격을 확정하는 것)합니다.
R1(config)# interface s0/0/0 R1(config-if)# crypto map VPN-MAP
Part 2: R3에서 IPsec 매개변수 구성
STEP 1: 보안 기술 패키지를 활성화합니다.
a. R3에서 show version 명령을 실행하여 Security Technology 패키지 라이센스 정보가 활성화되었는지 확인합니다.
b. Security Technology 패키지가 활성화되지 않은 경우 패키지를 활성화하고 R3을 다시 로드합니다.STEP 2 : R1을 사용한 사이트 간 VPN을 지원하도록 라우터 R3을 구성합니다.
- R3에 왕복 파라미터를 설정합니다.
- R3의 LAN에서 R1의 LAN으로 트래픽을 확인하는 ACL 110을 흥미로운 것으로 설정합니다.
R3(config)#access-list 110 permit ip 192.168.3.0 0.0.0.255 192.168.1.0 0.0.0.255
STEP 3: R3에서 IKE Phase 1 ISAKMP 속성을 구성합니다.
- 공유 암호 키 vpnpa55와 함께 R3에서 암호화 ISAKMP 정책 10 속성을 구성합니다.
R3(config)#crypto isakmp policy 10 R3(config-isakmp)#encryption aes 256 R3(config-isakmp)#authentication pre-share R3(config-isakmp)#group 5 R3(config-isakmp)#exit R3(config)#crypto isakmp key vpnpa55 address 10.1.1.2
STEP4 : R3에서 IKE 2단계 IPsec 정책을 구성합니다.
a. esp-aes 및 esp-sha-hmac을 사용할 변환 집합 VPN-SET을 만듭니다.
R3(config)#crypto ipsec transform-set VPN-SET esp-aes esp-sha-hmac
b. Phase 2 파라미터를 모두 묶은 암호맵 VPN-MAP을 작성하고 sequence number 10을 사용하여 ipsec-isakmp 맵으로 식별합니다.
R3(config)#crypto map VPN-MAP 10 ipsec-isakmp % NOTE: This new crypto map will remain disabled until a peer and a valid access list have been configured. R3(config-crypto-map)#description VPN connection to R1 R3(config-crypto-map)#set peer 10.1.1.2 R3(config-crypto-map)#set transform-set VPN-SET R3(config-crypto-map)#match address 110 R3(config-crypto-map)#exit
5단계: 발신 인터페이스에 암호 맵을 구성합니다.
- VPN-MAP 암호 맵을 발신 시리얼 0/0/1 인터페이스에 바인딩합니다. 참고: 등급이 지정되지 않았습니다.
R3(config)#int s0/0/1 R3(config-if)#crypto map VPN-MAP
Part 3: IPsec VPN 확인
1단계: 관심 트래픽에 앞서 터널을 확인합니다.
- R1에서 show crypto ipsec sa 명령을 실행합니다. 캡슐화, 암호화, 캡슐화 해제 및 복호화된 패킷 수는 모두 0으로 설정됩니다.
2단계: 흥미로운 트래픽을 생성합니다.
- PC-A에서 PC-C를 핑합니다.
3단계: 관심 트래픽이 발생한 후 터널을 확인합니다.
- R1에서 show crypto ipsec sa 명령을 다시 실행합니다.
- 패킷 수가 0보다 크므로 IPsec VPN 터널이 작동 중임을 나타냅니다.
interface: Serial0/0/0 Crypto map tag: VPN-MAP, local addr 10.1.1.2 protected vrf: (none) local ident (addr/mask/prot/port): (192.168.1.0/255.255.255.0/0/0) remote ident (addr/mask/prot/port): (192.168.3.0/255.255.255.0/0/0) current_peer 10.2.2.2 port 500 PERMIT, flags={origin_is_acl,} #pkts encaps: 3, #pkts encrypt: 3, #pkts digest: 0 // 초반 브로드캐스트로 인한 타임아웃을 제외하고 3개 정상적으로 나옴 #pkts decaps: 3, #pkts decrypt: 3, #pkts verify: 0 // 초반 브로드캐스트로 인한 타임아웃을 제외하고 3개 정상적으로 나옴 #pkts compressed: 0, #pkts decompressed: 0 #pkts not compressed: 0, #pkts compr. failed: 0 #pkts not decompressed: 0, #pkts decompress failed: 0 #send errors 1, #recv errors 0 local crypto endpt.: 10.1.1.2, remote crypto endpt.:10.2.2.2 path mtu 1500, ip mtu 1500, ip mtu idb Serial0/0/0 current outbound spi: 0x226914BD(577311933) inbound esp sas: spi: 0x403C11F0(1077678576) transform: esp-aes esp-sha-hmac , in use settings ={Tunnel, } conn id: 2003, flow_id: FPGA:1, crypto map: VPN-MAP sa timing: remaining key lifetime (k/sec): (4525504/3488) IV size: 16 bytes replay detection support: N Status: ACTIVE inbound ah sas: inbound pcp sas: outbound esp sas: spi: 0x226914BD(577311933) transform: esp-aes esp-sha-hmac , in use settings ={Tunnel, } conn id: 2004, flow_id: FPGA:1, crypto map: VPN-MAP sa timing: remaining key lifetime (k/sec): (4525504/3488) IV size: 16 bytes replay detection support: N Status: ACTIVE outbound ah sas: outbound pcp sas:
4단계: 재미없는 트래픽을 생성합니다.
- PC-A에서 PC-B로 핑합니다.
- 참고: 라우터 R1에서 PC-C로 또는 R3에서 PC-A로 핑을 발행하는 것은 흥미로운 트래픽이 아닙니다.
5단계: 터널을 확인합니다.
- R1에서 show crypto ipsec sa 명령을 다시 실행합니다.
- 패킷 수가 변경되지 않았으므로 흥미 없는 트래픽이 암호화되지 않았는지 확인합니다.
interface: Serial0/0/0 Crypto map tag: VPN-MAP, local addr 10.1.1.2 protected vrf: (none) local ident (addr/mask/prot/port): (192.168.1.0/255.255.255.0/0/0) remote ident (addr/mask/prot/port): (192.168.3.0/255.255.255.0/0/0) current_peer 10.2.2.2 port 500 PERMIT, flags={origin_is_acl,} #pkts encaps: 3, #pkts encrypt: 3, #pkts digest: 0 // 초반 브로드캐스트로 인한 타임아웃을 제외하고 3개 정상적으로 나옴 #pkts decaps: 3, #pkts decrypt: 3, #pkts verify: 0 // 초반 브로드캐스트로 인한 타임아웃을 제외하고 3개 정상적으로 나옴 #pkts compressed: 0, #pkts decompressed: 0 #pkts not compressed: 0, #pkts compr. failed: 0 #pkts not decompressed: 0, #pkts decompress failed: 0 #send errors 1, #recv errors 0 local crypto endpt.: 10.1.1.2, remote crypto endpt.:10.2.2.2 path mtu 1500, ip mtu 1500, ip mtu idb Serial0/0/0 current outbound spi: 0x226914BD(577311933) inbound esp sas: spi: 0x403C11F0(1077678576) transform: esp-aes esp-sha-hmac , in use settings ={Tunnel, } conn id: 2003, flow_id: FPGA:1, crypto map: VPN-MAP sa timing: remaining key lifetime (k/sec): (4525504/3488) IV size: 16 bytes replay detection support: N Status: ACTIVE inbound ah sas: inbound pcp sas: outbound esp sas: spi: 0x226914BD(577311933) transform: esp-aes esp-sha-hmac , in use settings ={Tunnel, } conn id: 2004, flow_id: FPGA:1, crypto map: VPN-MAP sa timing: remaining key lifetime (k/sec): (4525504/3488) IV size: 16 bytes replay detection support: N Status: ACTIVE outbound ah sas: outbound pcp sas:
6단계: 결과를 확인합니다.
- 완료율은 100%가 되어야 합니다. 필요한 구성 요소에 대한 피드백 및 검증을 보려면 Check Results(결과 확인)을 클릭하십시오.
'공부 > 패킷 트레이서' 카테고리의 다른 글
[패킷트레이서/실습] OSPF 라우팅 (2) 2023.11.09 [CISCO/구문실습] OSPF SHA 라우팅 프로토콜 인증 // 미작성 (2) 2023.11.06 [CISCO/구문실습] Auto Secure 명령 사용 (1) 2023.11.06 [CISCO/구문실습] R2에서 Superview 구성 (2) 2023.11.06 [CISCO/구문실습] R2의 VIEW 구성 (2) 2023.11.06