Tải bản đầy đủ (.ppt) (15 trang)

Kỹ thuật đường hầm - Tuneling

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (462.07 KB, 15 trang )

© 2008 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialBSCI
1
Kỹ thuật đường hầm
(Tunneling)
Quản trị mạng nâng cao
© 2008 Cisco Systems, Inc. All rights reserved.BSCI
2
Advanced knowledge Bachkhoa Networking Academy
BKACAD
Nội dung
1. Tổng quan về tunneling
2. Ưu điểm và nhược điểm
3. Các bước cấu hình
4. Ví dụ
© 2008 Cisco Systems, Inc. All rights reserved.BSCI
3
Advanced knowledge Bachkhoa Networking Academy
BKACAD

Kỹ thuật đường hầm dùng để vận chuyển giao thức L3
(IPX,IP,IPv6 ) qua hạ tầng của một L3 network khác.

Tạo một đường kết nối trực tiếp (ảo) giữa Nguồn và Đích
Thông qua hạ tầng mạng sẵn có.

Về logic: Nguồn và Đích coi như kêt nối trực tiếp với nhau
– Bản chất: đóng gói thêm một lớp L3 header vào gói tin ban đầu
3
Tunneling
© 2008 Cisco Systems, Inc. All rights reserved.BSCI
4


Advanced knowledge Bachkhoa Networking Academy
BKACAD
Đóng gói Tunnel

Transport Protocol: giao thức dùng để vận chuyển
trong hạ tầng mạng sẵn có

Passenger Protocol: giao thức được vận chuyển

Loại dữ liệu mà ta cần vận chuyển

Carrier Encapsulation: giao thức tạo đường hầm
4
© 2008 Cisco Systems, Inc. All rights reserved.BSCI
5
Advanced knowledge Bachkhoa Networking Academy
BKACAD
Generic Route Encapsulation (GRE)

Cơ chế đóng gói Layer3

RFC 1701, 1702, 2784

Sử dụng IP làm Transport protocol

Hỗ trợ vận chuyển nhiều loại giao thức qua hạ tầng IP network
(IPX, IP, IPv6 )
5
© 2008 Cisco Systems, Inc. All rights reserved.BSCI
6

Advanced knowledge Bachkhoa Networking Academy
BKACAD
GRE Encapsulation
6
© 2008 Cisco Systems, Inc. All rights reserved.BSCI
7
Advanced knowledge Bachkhoa Networking Academy
BKACAD
Ưu điểm và nhược điểm của GRE

Ưu điểm:

Đơn giản hóa việc triển khai IP VPN

Có thể mang hầu hết các loại giao thức qua tunnel

Nhược điểm:

Dữ liệu không được bảo vệ (mã hóa, toàn vẹn)
7
© 2008 Cisco Systems, Inc. All rights reserved.BSCI
8
Advanced knowledge Bachkhoa Networking Academy
BKACAD
Các bước cấu hình GRE
1. Tạo interface tunnel
2. Cấu hình địa chỉ nguồn tunnel
3. Câu hình địa chỉ đích tunnel
4. Đặt địa chỉ logic cho tunnel
© 2008 Cisco Systems, Inc. All rights reserved.BSCI

9
Advanced knowledge Bachkhoa Networking Academy
BKACAD
GRE monitoring and troubleshooting
9
© 2008 Cisco Systems, Inc. All rights reserved.BSCI
10
Advanced knowledge Bachkhoa Networking Academy
BKACAD
Ví dụ
R1(config)#interface tunnel 0
R1(config-if)#ip address 172.16.1.1 255.255.255.0
R1(config-if)#tunnel source 172.30.1.2
R1(config-if)#tunnel destination 172.30.2.2
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#ip route 10.0.2.0 255.255.255.0 tunnel 0
172.30.1.2
Site 1 Site 2
172.30.6.2
10.0.1.12 10.0.6.12
R1
R6
Internet
10.0.1.0 10.0.6.0
B
A
© 2008 Cisco Systems, Inc. All rights reserved.BSCI
11
Advanced knowledge Bachkhoa Networking Academy

BKACAD
Sử dụng GRE
1. GRE kết hợp cùng IPSec VPN

Hỗ trợ gửi multicast, broadcast qua kênh VPN

Hỗ trợ các giao thức routing động (OSPF,EIGRP,RIP) qua
IPSec VPN
H c vi n m ng Bách Khoa - www.bkacad.com
IP ESP IP TCP Data
Tunnel Mode
Example
IP GRE
ESP IP TCP Data
Transport Mode
Example
IP GRE
Encrypted Payload
Encrypted Payload
ESP
ESP
© 2008 Cisco Systems, Inc. All rights reserved.BSCI
12
Advanced knowledge Bachkhoa Networking Academy
BKACAD
GRE over IPSec example

interface tunnel 0
ip add 100.0.0.1 255.255.255.0
tunnel source 120.0.0.1

tunnel destination 123.0.0.2

crypto isakmp policy 10
encrypt 3des
hash md5
authentication pre-share
group 2

crypto isakmp key 6 cisco123 address 123.0.0.2
crypto ipsec transform-set vpn esp-3des esp-md5-hmac

access-list 116 permit gre host 120.0.0.1 host 123.0.0.2

crypto map gre 10 ipsec-isakmp
match address 116
set peer 123.0.0.2
set transform-set vpn

int serial 2/0
crypto map gre

interface tunnel 0
Ip add 100.0.0.2 255.255.255.0
tunnel source 123.0.0.2
tunnel destination 120.0.0.1

crypto isakmp policy 10
encrypt 3des
hash md5
group 2

authentication pre-share

crypto isakmp key 6 cisco123 address 120.0.0.1

crypto ipsec transform-set vpn esp-3des esp-md5-hmac

access-list 116 permit gre host 123.0.0.2 host 120.0.0.1

crypto map gre 10 ipsec-isakmp
match address 116
set peer 120.0.0.1
set transform-set vpn
int serial 2/0
crypto map gre
© 2008 Cisco Systems, Inc. All rights reserved.BSCI
13
Advanced knowledge Bachkhoa Networking Academy
BKACAD
Sử dụng GRE
2. Tạo tunnel thông các Site

Hỗ trợ các giao thức routing động (OSPF,EIGRP,RIP) giữa các
Site (thông qua mạng INTERNET)

Sử dụng static route giữa các Site
H c vi n m ng Bách Khoa - www.bkacad.com
© 2008 Cisco Systems, Inc. All rights reserved.BSCI
14
Advanced knowledge Bachkhoa Networking Academy
BKACAD

H c vi n m ng Bách Khoa - www.bkacad.com
R1(config)#interface tunnel 0
R1(config-if)#ip address 16.16.16.1 255.255.255.0
R1(config-if)#tunnel source 172.30.1.2
R1(config-if)#tunnel destination 172.30.6.2
R1(config-if)#no shutdown
R1(config)#router ospf 1
R1(config-router)#network 16.16.16.0 0.0.0.255 area 0
R1(config-router)#network 16.0.1.0 0.0.0.255 area 0
172.30.1.2
Site 1 Site 2
172.30.6.2
10.0.1.12 10.0.6.12
R1
R6
Internet
10.0.1.0 10.0.6.0
B
A
R6(config)#interface tunnel 0
R6(config-if)#ip address 16.16.16.2 255.255.255.0
R6(config-if)#tunnel source 172.30.6.2
R6(config-if)#tunnel destination 172.30.1.2
R6(config-if)#no shutdown
R6(config)#router ospf 1
R6(config-router)#network 16.16.16.0 0.0.0.255 area 0
R6(config-router)#network 16.0.1.0 0.0.0.255 area 0
© 2008 Cisco Systems, Inc. All rights reserved.BSCI
15
Advanced knowledge Bachkhoa Networking Academy

BKACAD

×