(+84) 236.3827111 ex. 402

Dynamic Multipoint Virtual Private Network


Mạng riêng ảo hay VPN ( Virtual Private Network) là một mạng dành riêng để kết nối các máy tính của các công ty, tập đoàn hay các tổ chức với nhau thông qua mạng Internet công cộng.

Với VPN truyền thống thì chúng ta có 2 mô hình: Client-to-site và Site-to-Site. Chung quy lại thì vẫn là kết nối điểm-điểm. Vì vậy nếu doanh nghiệp có nhu cầu kết nối điểm-đa điểm thì VPN truyền thống không còn phù hợp nữa.

Bài viết này xin giới thiệu về công nghệ VPN điểm-đa điểm đó là DMVPN. Dynamic Multipoint Virtual Private Network (DMVPN) là sự kết hợp của các công nghệ: IPSec, mGRE, và NHRP các công nghệ này kết hợp lại cho phép được triển khai IPSec trong mạng riêng ảo một cách dễ dàng.

Ưu điểm của DMVPN Khi ta có cấu trúc mạng với nhiều site và tạo mã hoá tunnel giữa mỗi site với nhau, ta thiết lập được: [n(n-1)] /2 tunnels.

Các giao thức được sử dụng trong DMVPN:

i) IPSec (Internet Protocol SECurity)

Giao thức cho phép bảo vệ sự thay đổi của các gói tin tại lớp IP. Dựa trên khoá công khai trên mode Tunnel, nội dung và tiêu đề của gói tin được mã hoá. cả hai đều được bảo vệ

ii) mGRE (Generic Routing Encapsulation)

Giao thức truyền trên tunnel, đóng gói các loại gói tin thành 1 loại lớn trong IP tunnels. Sau đó tạo Point-to-Point virtual kết nối với các Router ở xa trong cấu trúc mạng IP.

iii) NHRP (Next Hop Resolution Protocol)

Giao thức được sử dụng bởi các Router phát hiện MAC address của các Router khác và host khác.

Lab demo

Sử dụng GNS3, IOS: c3725-adventerprisek9-mz.124-15.T5.bin

Tạo 2 tunnel từ Main Office về 2 chi nhánh.

Cấu hình:

1) Cấu hình IP cho các Interfaces

R1:

conf t

int f0/0

no shut

ip add 192.168.123.1 255.255.255.0

exit

int lo0

ip add 1.1.1.1 255.255.255.255

ex

R2:

conf t

int f0/0

no shut

ip add 192.168.123.2 255.255.255.0

exit

int lo0

ip add 2.2.2.2 255.255.255.255

ex

R3:

conf t

int f0/0

no shut

ip add 192.168.123.3 255.255.255.0

exit

int lo0

ip add 3.3.3.3 255.255.255.255

ex

2) Cấu hình Hub Router (R1)

interface tunnel 0

ip address 172.16.123.1 255.255.255.0

tunnel mode gre multipoint

tunnel source fastEthernet 0/0

ip nhrp map multicast dynamic

ip nhrp network-id 1

ip nhrp authentication DMVPN

ex

3) Now let’s configure our spoke routers, R2 and R3

R2:

interface tunnel 0

ip address 172.16.123.2 255.255.255.0

tunnel mode gre multipoint

ip nhrp authentication DMVPN

ip nhrp map 172.16.123.1 192.168.123.1

ip nhrp map multicast 192.168.123.1

ip nhrp network-id 1

ip nhrp nhs 172.16.123.1

tunnel source fastEthernet 0/0

ex

R3:

interface tunnel 0

ip address 172.16.123.3 255.255.255.0

tunnel mode gre multipoint

ip nhrp authentication DMVPN

ip nhrp map 172.16.123.1 192.168.123.1

ip nhrp map multicast 192.168.123.1

ip nhrp network-id 1

ip nhrp nhs 172.16.123.1

tunnel source fastEthernet 0/0

ex

4) First we will check the hub router:

R1#show dmvpn

R2#show dmvpn

R3#show dmvpn

R2#ping 172.16.123.1

R3#ping 172.16.123.1

R2#ping 172.16.123.3

R1#show dmvpn

R2#show dmvpn

R3#show dmvpn

5) Configure IPSEC to encrypt mGRE Tunnels

R1,R2 & R3:

crypto isakmp policy 1

encryption aes

hash md5

authentication pre-share

group 2

lifetime 86400

ex

crypto isakmp key 0 DTU address 0.0.0.0

crypto ipsec transform-set MYSET esp-aes esp-md5-hmac

crypto ipsec profile MGRE

set security-association lifetime seconds 86400

set transform-set MYSET

ex

interface tunnel 0

tunnel protection ipsec profile MGRE

ex

6) Verification of IPSEC encrypted tunnels

R1,R2 & R3:

interface tunnel 0

shutdown

no shutdown

ex

7) Next step is to check if IPSEC is active

R1#show crypto session

R2#ping 172.16.123.1

R3#ping 172.16.123.1

R1#show crypto ipsec sa

8) DMVPN routing configuration

R1:

router ospf 1

network 1.1.1.1 0.0.0.0 area 0

network 172.16.123.0 0.0.0.255 area 0

ex

interface tunnel 0

ip ospf network broadcast

ex

R2:

router ospf 1

network 2.2.2.2 0.0.0.0 area 0

network 172.16.123.0 0.0.0.255 area 0

ex

interface tunnel 0

ip ospf priority 0

ip ospf network broadcast

ex

R3:

router ospf 1

network 3.3.3.3 0.0.0.0 area 0

network 172.16.123.0 0.0.0.255 area 0

ex

interface tunnel 0

ip ospf priority 0

ip ospf network broadcast

ex

Demo Lab & dịch: dangocuong@duytan.edu.vn