νƒœκ·Έ 보관물: GRE

GRE 터널링

GRE; Generic Routing Encapsulation

Ciscoμ—μ„œ κ°œλ°œν•œ 터널링 ν”„λ‘œν† μ½œ, VPN이닀.
μ•”ν˜Έν™”λ₯Ό ν•˜μ§€ μ•ŠκΈ° λ•Œλ¬Έμ— λ³΄μ•ˆμ— μ·¨μ•½ν•˜μ§€λ§Œ, 데이터 처리 속도가 λΉ λ₯΄λ‹€.

  • GRE 터널링은 Tunnel μΈν„°νŽ˜μ΄μŠ€λ₯Ό 톡해 데이터λ₯Ό μ£Όκ³ λ°›λŠ”λ‹€.
  • λΌμš°ν„°μ— Tunnel μΈν„°νŽ˜μ΄μŠ€λ₯Ό λ¬΄λ¦¬ν•˜κ²Œ μΆ”κ°€ν•  경우 λΌμš°ν„° λ©”λͺ¨λ¦¬μ— 영ν–₯을 μ€„μˆ˜λ„ μžˆλ‹€.
  • Tunnel Interface λ‹Ή 9Kbps 의 λŒ€μ—­ν­μ΄ ν• λ‹Ήλœλ‹€.
  • Unicast / Multicast / Broadcastλ₯Ό μ§€μ›ν•œλ‹€.

ꡬ성 방법

(1) Tunnel Interface 생성
(2) Tunnel의 μΆœλ°œμ§€/λͺ©μ μ§€ 생성
(3) λΌμš°νŒ…

GRE 터널링 예제 ν† ν΄λ‘œμ§€

[κΈ°λ³Έ ꡬ성]
– 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 헀더가 λ“€μ–΄μžˆλ‹€.