GRE; Generic Routing Encapsulation
Cisco에서 개발한 터널링 프로토콜, VPN이다.
암호화를 하지 않기 때문에 보안에 취약하지만, 데이터 처리 속도가 빠르다.
- GRE 터널링은 Tunnel 인터페이스를 통해 데이터를 주고받는다.
- 라우터에 Tunnel 인터페이스를 무리하게 추가할 경우 라우터 메모리에 영향을 줄수도 있다.
- Tunnel Interface 당 9Kbps 의 대역폭이 할당된다.
- Unicast / Multicast / Broadcast를 지원한다.
구성 방법
(1) Tunnel Interface 생성
(2) Tunnel의 출발지/목적지 생성
(3) 라우팅

[기본 구성]
– R1-R2, R2-R3 : OSPF area 0
– R1 내부, R3 내부 : EIGRP AS 100
R1(config)# int fa0/0 R1(config-if)# no shutdown R1(config-if)# ip addr 1.1.1.2 255.255.255.252 R1(config-if)# int fa0/1 R1(config-if)# no shutdown R1(config-if)# ip addr 192.168.100.1 255.255.255.0 R1(config-if)# exit R1(config)# R1(config)# router ospf 1 R1(config-router)# network 1.1.1.0 0.0.0.3 area 0 R1(config-router)# exit R1(config)# R1(config)# router eigrp 100 R1(config-router)# no auto-summary R1(config-router)# network 192.168.100.0 0.0.0.255 R1(config-router)# exit R1(config)# R2(config)# int fa0/0 R2(config-if)# no shutdown R2(config-if)# ip addr 1.1.1.1 255.255.255.252 R2(config-if)# int fa0/1 R2(config-if)# no shutdown R2(config-if)# ip addr 2.2.2.1 255.255.255.252 R2(config-if)# exit R2(config)# R2(config)# router ospf 1 R2(config-router)# network 1.1.1.0 0.0.0.3 area 0 R2(config-router)# network 2.2.2.0 0.0.0.3 area 0 R2(config-router)# exit R2(config)# R3(config)# int fa0/0 R3(config-if)# no shutdown R3(config-if)# ip addr 2.2.2.2 255.255.255.252 R3(config-if)# int fa0/1 R3(config-if)# no shutdown R3(config-if)# ip addr 192.168.200.1 255.255.255.0 R3(config-if)# exit R3(config)# R3(config)# router ospf 1 R3(config-router)# network 2.2.2.0 0.0.0.3 area 0 R3(config-router)# exit R3(config)# R3(config)# router eigrp 100 R3(config-router)# no auto-summary R3(config-router)# network 192.168.200.0 0.0.0.255 R3(config-router)# exit R3(config)#
– Tunnel Interface 설정 및 라우팅 설정
R1(config)# int tunnel 1 R1(config-if)# ip addr 10.250.10.241 255.255.255.240 R1(config-if)# tunnel source 1.1.1.2 R1(config-if)# tunnel destination 2.2.2.2 R1(config-if)# exit R1(config)# R1(config)# router eigrp 100 R1(config-router)# network 10.250.10.241 0.0.0.0 R1(config)# exit R3(config)# int tunnel 1 R3(config-if)# ip addr 10.250.10.242 255.255.255.240 R3(config-if)# tunnel source 2.2.2.2 R3(config-if)# tunnel destination 1.1.1.2 R3(config-if)# exit R3(config)# R3(config)# router eigrp 100 R3(config-router)# network 10.250.10.242 0.0.0.0 R3(config)# exit
[확인]
– R1과 R3의 EIGRP Neighbor에 추가된 것을 확인할 수 있다.

– R1과 R3 라우팅 테이블에 상대의 사설대역이 Tunnel로 라우팅된 것을 확인할 수 있다.

– R1 내부 PC → R3 내부 PC로 TRACERT 시 Tunnel로 가는 것을 확인할 수 있다.

– R1 내부 PC → R3 내부 PC로 PING 테스트 과정 중 Wireshark 확인하면 ICMP 패킷에 GRE encapsulation 헤더가 들어있다.
