IPsec VPNs
@ 목표 : Basic GRE 의 취약점인 보안 부분에 VPN 기술을 적용하여서 안전한 Secure GRE 설정
@ 구성도
@ xxx.net 파일
================================================
autostart = False
[localhost]
workingdir = D:\NP2-12\Secure-GRE\working
[[3660]]
image = D:\NP2-12\unzip-C3660-jk9s-mz 123-3.bin
ram = 128
idlepc = 0x603b2a18
[[ROUTER r1]]
model = 3660
s1/0 = r2 s1/0
f0/0 = r3 f0/0
f0/1 = NIO_gen_eth:\Device\NPF_{4DD316B2-0F92-418A-897F-5CAD53A6FEBD} ## VMnet1
cnfg = D:\NP2-12\Secure-GRE\cfg\r1.cfg
[[ROUTER r2]]
model = 3660
s1/1 = r3 s1/1
cnfg = D:\NP2-12\Secure-GRE\cfg\r2.cfg
[[ROUTER r3]]
model = 3660
cnfg = D:\NP2-12\Secure-GRE\cfg\r3.cfg
================================================
@ 설정해보자~
[[Secure GRE Lab]]
@ 1. Eigrp routing
R1(config)#router eigrp 1
R1(config-router)#no auto-summary
R1(config-router)#network 192.168.12.0
R2(config)#router eigrp 1
R2(config-router)#no auto-summary
R2(config-router)#network 192.168.12.0
R2(config-router)#network 192.168.23.0
R3(config)#router eigrp 1
R3(config-router)#no auto-summary
R3(config-router)#network 192.168.23.0
@ 2. Tunnel 설정
R1(config)#int tunnel 0
R1(config-if)#tunnel source s1/0
R1(config-if)#tunnel destination 192.168.23.3
R1(config-if)#ip add 172.16.13.1 255.255.255.0
R3(config)#int tunnel 0
R3(config-if)#tunnel source s1/1
R3(config-if)#tunnel destination 192.168.12.1
R3(config-if)#ip add 172.16.13.3 255.255.255.0
@ 3. Tunnel 을 통해서 Eigrp AS 2 을 설정해서 R1,R3 Loopback 통신하자
R1(config)#router eigrp 2
R1(config-router)#no auto-summary
R1(config-router)#net 172.16.0.0
R3(config)#router eigrp 2
R3(config-router)#no auto-summary
R3(config-router)#network 172.16.0.0
@ 4. IPSec 정책설정하자
# ISAKMP 정책
encryption algorithm : AES 256
Hash algorithm : SHA
authentication method : pre-shared key(cisco)
Diffie-Hellman group : #5
lifetime : 3600 seconds
# IPSec 정책
보호할 트래픽 : 172.16.1.0 <-> 172.16.3.0
encapsulation 방식 : ESP
암호화 방식 : 3DES
무결성 확인 : SHA
# 정책을 인터페이스에 적용한다
# Eigrp 2 를 설정한다.
R1(config)#router eigrp 2
R1(config-router)#no auto-summary
R1(config-router)#net 172.16.0.0
R3(config)#router eigrp 2
R3(config-router)#no auto-summary
R3(config-router)#network 172.16.0.0
@ 5. VPN 세션 확인
@ 6. Secure GRE 를 SDM 을 이용하여서 설치해보자~
# AH , ESP 각각 설정후 패킷 캡쳐해서 확인해보자
============================
I am a bit puzzled about some statments in the article. You write:
or you could enable PMTUD for GRE tunnels with the tunnel path-mtu-discovery interface configuration command. When you enable the PMTUD on a GRE tunnel, the GRE packets are sent with the DF bit set and the router responds to the incoming ICMP destination unreachable messages with the reduction of the tunnel MTU size.
On the other hand, you write:
DF bit is copied from the source IP packet into the GRE envelope. If the source IP packet doesn't have the DF bit set, it won't be set in the outgoing GRE packet, potentially resulting in fragmentation of the GRE packet and expensive reassembly on the tail-end router.
How do these two statements connect? Which combination of tunnel path-mtu-discovery and a DF flag in an incoming package causes DF to be set on the GRE package?
11 January, 2008 16:37
Ivan Pepelnjak said...
OK, let me try to rephrase:
* If the tunnel path-mtu-discovery is not configured, all GRE packets are sent without the DF bit and thus fragmented if needed (and the receiving router falls back from CEF into process switching and dies a horrible death when the traffic load increases :( ).
* If the tunnel path-mtu-discovery is configured, the DF bit is copied from the source IP packet into the GRE packet, triggering PMTUD if and only if the original packet looks like it could come from a PMTUD-aware source.
예전에는 기업의 본사/지사를 연결하는 사내망을 구축할려면..값비싼 Frame Relay, Leased Line(L/L)를 써야 했습니다.
엄청비쌌죠..
그게 아니면 연결이 불가능했거든요..
그런데.. 기술이 발전하면서.. 공용회선을 이용해서 터널링하는 방법이 생겨났고.. 그런 기술을 이용해서 이기종네트워크를 연결해주게 됩니다.
대표적인 기술이 VPN이며.. 그안에.. GRE, PPTP, IPIP, IPSec, Layer2 프로토콜 등이 있습니다..
1. GRE
Generic Routing Encapsulation.
시스코에서 개발한 터널링 프로토콜입니다.
다양한 프로토콜의 패킷을 IP 터널내에 암호화하여 시스코 라우터 간의 가상의 점 대 점 링크를 만드는 것이구요..
이종네트워크 세그먼트를 연결해주기 위한 것으로 생각하시면 됩니다.
좀더 자세한 사항은 아래 주소를 하면 좋다
http://www.cisco.com/global/KR/about/packet/tech/16.shtml#1
특징은 시스코(Sysco)사에서 개발한 VPN 프로토콜로서 데이타를 암호화하지 않으므로 속도가 빠릅니다. 시스코 라우터에 기본 내장되어 있으므로 시스코 라우터와 VPN 구성시 편합니다. 서버와 클라인트 양 쪽 다 고정 IP를 사용해야 합니다. 본사의 남는 공인 IP를 지사에 할당하는 경우 등에 사용합니다.
2. VPN
인터넷과 같은 공용망을 사적이며 안전한 네트웍의 일부로 사용하는 것이죠.
한 네트웍에서 다른 네트웍으로의 접속을 거쳐, 데이타를 보내는 기술입니다.
이때, 사용하는 기술(프로토콜)에 GRE가 있습니다. ^^
참고할 만한 사이트다
http://www.linuxlab.co.kr/libra/00-6.htm
Microsoft Office OneNote 2007을 사용하여 작성했습니다.
모든 노트 및 정보를 한 곳에서 볼 수 있습니다.