Cấu hình OSPF bên trong tunnel IPSEC VPN

Mô hình

- Đầu tiên ta đặt IP và routing cơ bản để 2 IP WAN 100.1.1.2 và 200.1.1.2 thông nhau

- Sau đó khai VPN kiểu route-based ở R1 và R2 (Router_Internet ở giữa ko cần khai) :

R1:

crypto isakmp policy 10

 encr aes

 authentication pre-share

 group 2

crypto isakmp key CISCO123 address 200.1.1.2     

!

crypto ipsec transform-set TS_AES_SHA esp-aes esp-sha-hmac

 mode tunnel

!

crypto ipsec profile PROF_VTI

 set transform-set TS_AES_SHA

!

interface Tunnel0

 ip address 172.16.1.1 255.255.255.252

 tunnel source Ethernet0/0

 tunnel mode ipsec ipv4

 tunnel destination 200.1.1.2

 tunnel protection ipsec profile PROF_VTI

!

ip route 0.0.0.0 0.0.0.0 100.1.1.1

#######Tương tự cho R2 chỉ thay IP#########

###########Khai OSPF###########

router ospf 1

 network 172.16.1.0 0.0.0.3 area 0 ##IP tunnel đấu nối

 network 192.168.1.0 0.0.0.255 area 0 ##Dải LAN cần quảng bá

CHECK LẠI:

show crypto session

show ip ospf neighbor

Thử bắt gói thì đã thấy toàn bộ mã hoá chứ ko có gói OSPF thường.

------------

Tải bài lab đã làm sẵn https://drive.google.com/file/d/1SDwrN_C9Ocx57AL-MzVMBcR66gGSqUri/view?usp=sharing

 

Bài viết cùng danh mục