이 문서에서는 사이트 간 IPsec VPN에서 Cisco IOS 라우터를 VPN 게이트웨이 뒤에 겹치는 사설 네트워크 주소로 구성하는 방법에 대해 설명합니다.
이 문서에 대한 특정 요건이 없습니다.
이 문서의 정보는 소프트웨어 버전 12.4를 실행하는 Cisco IOS 3640 라우터를 기반으로 합니다.
이 문서의 정보는 특정 랩 환경의 디바이스를 토대로 작성되었습니다.이 문서에 사용된 모든 디바이스는 초기화된(기본) 컨피그레이션으로 시작되었습니다.현재 네트워크가 작동 중인 경우, 모든 명령어의 잠재적인 영향을 미리 숙지하시기 바랍니다.
문서 규칙에 대한 자세한 내용은 Cisco 기술 팁 규칙을 참조하십시오.
이 섹션에서는 이 문서에 설명된 기능을 구성하는 정보를 제공합니다.
참고: 명령 조회 도구(등록된 고객만 해당)를 사용하여 이 섹션에 사용된 명령에 대한 자세한 내용을 확인하십시오.
이 문서에서는 다음 네트워크 설정을 사용합니다.
참고: 이 구성에 사용된 IP 주소 지정 체계는 인터넷에서 합법적으로 라우팅할 수 없습니다.실습 환경에서 사용된 RFC 1918 주소입니다.
Private_LAN1 및 Private_LAN2에는 모두 192.168.1.0/24의 IP 서브넷이 있습니다. 이는 IPsec 터널의 각 측면 뒤에 겹치는 주소 공간을 시뮬레이션합니다.
이 예에서는 Site_A 라우터가 양방향 변환을 수행하여 두 개의 프라이빗 LAN이 IPsec 터널을 통해 통신할 수 있도록 합니다.변환은 Private_LAN1이 IPsec 터널을 통해 Private_LAN2를 10.10.10.0/24으로 "표시"하고, Private_LAN2는 IPSec 터널을 통해 Private_LAN1을 10.5.5.0/24으로 "표시"한다는 것을 의미합니다.
이 문서에서는 다음 구성을 사용합니다.
참고: 이 문서에서는 라우터가 인터페이스 컨피그레이션 등의 기본 설정으로 구성되어 있다고 가정합니다.자세한 내용은 SDM을 사용한 기본 라우터 컨피그레이션을 참조하십시오.
NAT 컨피그레이션
NAT를 사용하여 Site_A 라우터에서 SDM을 구성하려면 다음 단계를 완료합니다.
Configure(구성) > NAT > Edit NAT Configuration(NAT 컨피그레이션 수정)을 선택하고 Designate NAT Interfaces(NAT 인터페이스 지정)를 클릭하여 신뢰할 수 있는 인터페이스와 신뢰할 수 없는 인터페이스를 그림과 같이 정의합니다.
확인을 클릭합니다.
Add(추가)를 클릭하여 아래와 같이 내부에서 외부로 NAT 변환을 구성합니다.
확인을 클릭합니다.
다시 한 번, Add를 클릭하여 표시된 대로 외부에서 내부 방향으로 NAT 변환을 구성합니다.
확인을 클릭합니다.
참고: 다음은 동일한 CLI 컨피그레이션입니다.
동등한 CLI 컨피그레이션 | |
---|---|
interface Loopback0 ip nat inside interface Ethernet0/0 ip nat inside ip nat inside source static network 192.168.1.0 10.5.5.0 /24 ip nat outside source static network 192.168.1.0 10.10.10.0 /24 |
VPN 컨피그레이션
VPN을 사용하여 Site_A 라우터에서 SDM을 구성하려면 다음 단계를 완료합니다.
이 이미지에 표시된 대로 IKE 정책을 정의하려면 Configure(구성) > VPN > VPN Components(VPN 구성 요소) > IKE > IKE Policies(IKE 정책) > Add(추가)를 선택합니다.
확인을 클릭합니다.
참고: 다음은 동일한 CLI 컨피그레이션입니다.
동등한 CLI 컨피그레이션 | |
---|---|
crypto isakmp policy 10 encr des hash md5 authentication pre-share group1 |
피어 IP 주소로 사전 공유 키 값을 설정하려면 Configure > VPN > VPN Components > IKE > Pre-shared Keys > Add를 선택합니다.
확인을 클릭합니다.
참고: 다음은 동일한 CLI 컨피그레이션입니다.
동등한 CLI 컨피그레이션 | |
---|---|
crypto isakmp key 6 L2L12345 address 172.16.1.2 255.255.255.0 |
이 이미지에 표시된 대로 변환 세트 myset를 생성하려면 Configure(구성) > VPN > VPN Components(VPN 구성 요소) > IPSec > Transform Sets(변형 집합) > Add(추가)를 선택합니다.
확인을 클릭합니다.
참고: 다음은 동일한 CLI 컨피그레이션입니다.
동등한 CLI 컨피그레이션 | |
---|---|
crypto ipsec transform-set myset esp-des esp-md5-hmac |
Configure(구성) > VPN > VPN Components(VPN 구성 요소) > IPSec > IPSec Rules(ACL) > Add(추가)를 선택하여 암호화 ACL(Access Control List) 101을 생성합니다.
확인을 클릭합니다.
참고: 다음은 동일한 CLI 컨피그레이션입니다.
동등한 CLI 컨피그레이션 | |
---|---|
access-list 101 permit ip 10.5.5.0 0.0.0.255 192.168.1.0 0.0.0.255 |
Configure(구성) > VPN > VPN Components(VPN 구성 요소) > IPSec > IPSec Policies(IPSec 정책) > Add in to create crypto map mymap mymap(이 이미지에 표시된 대로 mymap을 매핑하기 위해 추가)를 선택합니다.
Add(추가)를 클릭합니다.
일반 탭을 클릭하고 기본 설정을 유지합니다.
피어 IP 주소 172.16.1.2을 추가하려면 Peer Information 탭을 클릭합니다.
원하는 변환 세트 myset을 선택하려면 변형 집합 탭을 클릭합니다.
기존 암호화 ACL 101을 선택하려면 IPSec 규칙 탭을 클릭합니다.
확인을 클릭합니다.
참고: 다음은 동일한 CLI 컨피그레이션입니다.
동등한 CLI 컨피그레이션 | |
---|---|
crypto map mymap 10 ipsec-isakmp set peer 172.16.1.2 set transform-set myset match address 101 |
Configure > VPN > Site-to-Site VPN > Edit Site-to-Site VPN > Add를 선택하여 암호화 맵 mymap을 인터페이스 Ethernet0/0에 적용하려면 Add를 선택합니다.
확인을 클릭합니다.
참고: 다음은 동일한 CLI 컨피그레이션입니다.
동등한 CLI 컨피그레이션 | |
---|---|
interface Ethernet0/0 crypto map mymap |
Site_A 라우터 |
---|
Site_A#show running-config *Sep 25 21:15:58.954: %SYS-5-CONFIG_I: Configured from console by console Building configuration... Current configuration : 1545 bytes ! version 12.4 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname Site_A ! boot-start-marker boot-end-marker ! ! no aaa new-model ! resource policy ! ! ! ip cef ! ! crypto isakmp policy 10 hash md5 authentication pre-share !--- Defines ISAKMP policy. crypto isakmp key 6 L2L12345 address 172.16.1.2 255.255.255.0 !--- Defines pre-shared secret used for IKE authentication ! ! crypto ipsec transform-set myset esp-des esp-md5-hmac !--- Defines IPSec encryption and authentication algorithms. ! crypto map mymap 10 ipsec-isakmp set peer 172.16.1.2 set transform-set myset match address 101 !--- Defines crypto map. ! ! ! ! interface Loopback0 ip address 192.168.1.1 255.255.255.0 ip nat inside ip virtual-reassembly ! interface Ethernet0/0 ip address 10.1.1.2 255.255.255.0 ip nat outside ip virtual-reassembly half-duplex crypto map mymap !--- Apply crypto map on the outside interface. ! ! !--- Output Suppressed ! ip http server no ip http secure-server ! ip route 0.0.0.0 0.0.0.0 10.1.1.1 ! ip nat inside source static network 192.168.1.0 10.5.5.0 /24 !--- Static translation defined to translate Private_LAN1 !--- from 192.168.1.0/24 to 10.5.5.0/24. !--- Note that this translation is used for both !--- VPN and Internet traffic from Private_LAN1. !--- A routable global IP address range, or an extra NAT !--- at the ISP router (in front of Site_A router), is !--- required if Private_LAN1 also needs internal access. ip nat outside source static network 192.168.1.0 10.10.10.0 /24 !--- Static translation defined to translate Private_LAN2 !--- from 192.168.1.0/24 to 10.10.10.0/24. ! access-list 101 permit ip 10.5.5.0 0.0.0.255 192.168.1.0 0.0.0.255 !--- Defines IPSec interesting traffic. !--- Note that the host behind Site_A router communicates !--- to Private_LAN2 using 10.10.10.0/24. !--- When the packets arrive at the Site_A router, they are first !--- translated to 192.168.1.0/24 and then encrypted by IPSec. ! ! control-plane ! ! line con 0 line aux 0 line vty 0 4 ! ! end Site_A# |
Site_B 라우터 |
---|
Site_B#show running_config Building configuration... Current configuration : 939 bytes ! version 12.2 service timestamps debug uptime service timestamps log uptime no service password-encryption ! hostname Site_B ! ! ip subnet-zero ! ! crypto isakmp policy 10 hash md5 authentication pre-share crypto isakmp key L2L12345 address 10.1.1.2 255.255.255.0 ! ! crypto ipsec transform-set myset esp-des esp-md5-hmac ! crypto map mymap 10 ipsec-isakmp set peer 10.1.1.2 set transform-set myset match address 101 ! ! ! ! interface Ethernet0 ip address 192.168.1.1 255.255.255.0 ! interface Ethernet1 ip address 172.16.1.2 255.255.255.0 crypto map mymap ! !--- Output Suppressed ! ip classless ip route 0.0.0.0 0.0.0.0 172.16.1.1 ip http server ! access-list 101 permit ip 192.168.1.0 0.0.0.255 10.5.5.0 0.0.0.255 ! line con 0 line aux 0 line vty 0 4 ! end Site_B# |
이 섹션에서는 컨피그레이션이 제대로 작동하는지 확인하는 데 사용할 수 있는 정보를 제공합니다.
Output Interpreter 도구(등록된 고객만 해당)(OIT)는 특정 show 명령을 지원합니다.OIT를 사용하여 show 명령 출력의 분석을 봅니다.
show crypto isakmp sa - 피어의 현재 IKE(Internet Key Exchange) 보안 연결(SA)을 모두 표시합니다.
Site_A#show crypto isakmp sa dst src state conn-id slot status 172.16.1.2 10.1.1.2 QM_IDLE 1 0 ACTIVE
show crypto isakmp sa detail - 피어에 있는 모든 현재 IKE SA의 세부 정보를 표시합니다.
Site_A#show cryto isakmp sa detail Codes: C - IKE configuration mode, D - Dead Peer Detection K - Keepalives, N - NAT-traversal X - IKE Extended Authentication psk - Preshared key, rsig - RSA signature renc - RSA encryption C-id Local Remote I-VRF Status Encr Hash Auth DH Lifetime Cap. 1 10.1.1.2 172.16.1.2 ACTIVE des md5 psk 1 23:59:42 Connection-id:Engine-id = 1:1(software)
show crypto ipsec sa - 현재 SA에서 사용하는 설정을 표시합니다.
Site_A#show crypto ipsec sa interface: Ethernet0/0 Crypto map tag: mymap, local addr 10.1.1.2 protected vrf: (none) local ident (addr/mask/prot/port): (10.5.5.0/255.255.255.0/0/0) remote ident (addr/mask/prot/port): (192.168.1.0/255.255.255.0/0/0) current_peer 172.16.1.2 port 500 PERMIT, flags={origin_is_acl,} #pkts encaps: 2, #pkts encrypt: 2, #pkts digest: 2 #pkts decaps: 2, #pkts decrypt: 2, #pkts verify: 2 #pkts compressed: 0, #pkts decompressed: 0 #pkts not compressed: 0, #pkts compr. failed: 0 #pkts not decompressed: 0, #pkts decompress failed: 0 #send errors 3, #recv errors 0 local crypto endpt.: 10.1.1.2, remote crypto endpt.: 172.16.1.2 path mtu 1500, ip mtu 1500, ip mtu idb Ethernet0/0 current outbound spi: 0x1A9CDC0A(446487562) inbound esp sas: spi: 0x99C7BA58(2580003416) transform: esp-des esp-md5-hmac , in use settings ={Tunnel, } conn id: 2002, flow_id: SW:2, crypto map: mymap sa timing: remaining key lifetime (k/sec): (4478520/3336) IV size: 8 bytes replay detection support: Y Status: ACTIVE inbound ah sas: inbound pcp sas: outbound esp sas: spi: 0x1A9CDC0A(446487562) transform: esp-des esp-md5-hmac , in use settings ={Tunnel, } conn id: 2001, flow_id: SW:1, crypto map: mymap sa timing: remaining key lifetime (k/sec): (4478520/3335) IV size: 8 bytes replay detection support: Y Status: ACTIVE outbound ah sas: outbound pcp sas: Site_A#
show ip nat translations - 변환 슬롯 정보를 표시합니다.
Site_A#show ip nat translations Pro Inside global Inside local Outside local Outside global --- --- --- 10.10.10.1 192.168.1.1 --- --- --- 10.10.10.0 192.168.1.0 --- 10.5.5.1 192.168.1.1 --- --- --- 10.5.5.0 192.168.1.0 --- ---
show ip nat statistics - 변환에 대한 통계 정보를 표시합니다.
Site_A#show ip nat statistics Total active translations: 4 (2 static, 2 dynamic; 0 extended) Outside interfaces: Ethernet0/0 Inside interfaces: Loopback0 Hits: 42 Misses: 2 CEF Translated packets: 13, CEF Punted packets: 0 Expired translations: 7 Dynamic mappings: Queued Packets: 0 Site_A#
연결을 확인하려면 다음 단계를 완료하십시오.
SDM에서 Tools > Ping을 선택하여 소스 IP가 192.168.1.1이고 대상 IP가 10.10.10.1인 IPsec VPN 터널을 설정합니다.
이 이미지에 표시된 대로 IPsec VPN 터널이 설정되었는지 확인하려면 Test Tunnel을 클릭합니다.
시작을 클릭합니다.
이 섹션에서는 컨피그레이션 문제를 해결하는 데 사용할 수 있는 정보를 제공합니다.
Site_A#debug ip packet IP packet debugging is on Site_A#ping Protocol [ip]: Target IP address: 10.10.10.1 Repeat count [5]: Datagram size [100]: Timeout in seconds [2]: Extended commands [n]: y Source address or interface: 192.168.1.1 Type of service [0]: Set DF bit in IP header? [no]: Validate reply data? [no]: Data pattern [0xABCD]: Loose, Strict, Record, Timestamp, Verbose[none]: Sweep range of sizes [n]: Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.10.10.1, timeout is 2 seconds: Packet sent with a source address of 192.168.1.1 !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 40/45/52 ms Site_A# *Sep 30 18:08:10.601: IP: tableid=0, s=192.168.1.1 (local), d=10.10.10.1 (Ethern et0/0), routed via FIB *Sep 30 18:08:10.601: IP: s=192.168.1.1 (local), d=10.10.10.1 (Ethernet0/0), len 100, sending *Sep 30 18:08:10.641: IP: tableid=0, s=10.10.10.1 (Ethernet0/0), d=192.168.1.1 ( Loopback0), routed via RIB *Sep 30 18:08:10.641: IP: s=10.10.10.1 (Ethernet0/0), d=192.168.1.1, len 100, rc vd 4 *Sep 30 18:08:10.645: IP: tableid=0, s=192.168.1.1 (local), d=10.10.10.1 (Ethern et0/0), routed via FIB *Sep 30 18:08:10.645: IP: s=192.168.1.1 (local), d=10.10.10.1 (Ethernet0/0), len 100, sending *Sep 30 18:08:10.685: IP: tableid=0, s=10.10.10.1 (Ethernet0/0), d=192.168.1.1 ( Loopback0), routed via RIB *Sep 30 18:08:10.685: IP: s=10.10.10.1 (Ethernet0/0), d=192.168.1.1, len 100, rc vd 4 *Sep 30 18:08:10.685: IP: tableid=0, s=192.168.1.1 (local), d=10.10.10.1 (Ethern et0/0), routed via FIB *Sep 30 18:08:10.689: IP: s=192.168.1.1 (local), d=10.10.10.1 (Ethernet0/0), len 100, sending *Sep 30 18:08:10.729: IP: tableid=0, s=10.10.10.1 (Ethernet0/0), d=192.168.1.1 ( Loopback0), routed via RIB *Sep 30 18:08:10.729: IP: s=10.10.10.1 (Ethernet0/0), d=192.168.1.1, len 100, rc vd 4 *Sep 30 18:08:10.729: IP: tableid=0, s=192.168.1.1 (local), d=10.10.10.1 (Ethern et0/0), routed via FIB *Sep 30 18:08:10.729: IP: s=192.168.1.1 (local), d=10.10.10.1 (Ethernet0/0), len 100, sending *Sep 30 18:08:10.769: IP: tableid=0, s=10.10.10.1 (Ethernet0/0), d=192.168.1.1 ( Loopback0), routed via RIB *Sep 30 18:08:10.769: IP: s=10.10.10.1 (Ethernet0/0), d=192.168.1.1, len 100, rc vd 4 *Sep 30 18:08:10.773: IP: tableid=0, s=192.168.1.1 (local), d=10.10.10.1 (Ethern et0/0), routed via FIB *Sep 30 18:08:10.773: IP: s=192.168.1.1 (local), d=10.10.10.1 (Ethernet0/0), len 100, sending *Sep 30 18:08:10.813: IP: tableid=0, s=10.10.10.1 (Ethernet0/0), d=192.168.1.1 ( Loopback0), routed via RIB *Sep 30 18:08:10.813: IP: s=10.10.10.1 (Ethernet0/0), d=192.168.1.1, len 100, rc vd 4
개정 | 게시 날짜 | 의견 |
---|---|---|
1.0 |
24-Sep-2008 |
최초 릴리스 |