Hướng dẫn cấu hình vpn trên packet tracer
Mô hình: Mô hình lab VPN Site to Site (Cisco) 1. Chuẩn bị: + Đối với thiết bị thật: 3 router cisco 2800, 2 pc chạy windows xp + Đối với thiết bị giả lập: - Sử dụng chương trình GNS3 - Hyper Terminal - Ios router 3700 - Chương trình Vmware - 2 windows xp chạy trên vmware 2. Bước 1: Cấu hình cơ bản: Đặt địa chỉ IP như hình cho các router ở SAIGON, ISP và BINHPHUOC Tại router SAIGON: SAIGON(config) interface f0/0SAIGON(config-if) ip address 192.168.1.1 255.255.255.0SAIGON(config-if) no shutdownSAIGON(config) interface s0/0SAIGON(config-if) ip address 150.1.1.1 255.255.255.0SAIGON(config-if) no shutdownTại router ISP: ISP(config) interface s0/0ISP(config-if) ip address 150.1.1.2 255.255.255.0ISP(config-if) no shutdownISP(config) interface s0/1ISP(config-if) ip address 151.1.1.2 255.255.255.0ISP(config-if) no shutdownTại router BINHPHUOC: BINHPHUOC(config) interface f0/0BINHPHUOC(config-if) ip address 192.168.2.1 255.255.255.0BINHPHUOC(config-if) no shutdownBINHPHUOC(config) interface s0/0BINHPHUOC(config-if) ip address 151.1.1.1 255.255.255.0BINHPHUOC(config-if) no shutdownĐặt địa chỉ cho máy Client_Saigon như sau: Đặt địa chỉ cho máy Client_Binhphuoc như sau: 3. Bước 2: Định tuyến cho hệ thống mạng Tại router SAIGON: SAIGON(config) router ripSAIGON(config-router) network 150.1.1.0SAIGON(config-router) network 192.168.1.0Tại router ISP: ISP(config) router ripISP(config-router) network 150.1.1.0ISP(config-router) network 151.1.1.0Tại router BINHPHUOC: BINHPHUOC(config) router ripBINHPHUOC(config-router) network 151.1.1.0BINHPHUOC(config-router) network 192.168.2.04. Bước 3: Cấu hình chính sách IKE (chính sách pha 1) Tại router SAIGON: SAIGON(config) crypto isakmp policy 10SAIGON(config-isakmp) hash md5SAIGON(config-isakmp) encryption desSAIGON(config-isakmp) group 2SAIGON(config-isakmp) authentication pre-shareTại router BINHPHUOC: BINHPHUOC(config) crypto isakmp policy 10BINHPHUOC(config-isakmp) hash md5BINHPHUOC(config-isakmp) encryption desBINHPHUOC(config-isakmp) group 2BINHPHUOC(config-isakmp) authentication pre-share5. Bước 4: Xác định thông tin key và peer Tại router SAIGON: SAIGON(config) crypto isakmp key 0 vnpro123 address 151.1.1.1Tại router BINHPHUOC: BINHPHUOC(config) crypto isakmp key 0 vnpro123 address 150.1.1.16.Bước 5: Cấu hình chính sách IPSec (chính sách pha 2) ' Tại router SAIGON: SAIGON(config) crypto ipsec transform-set MYSET esp-md5-hmac esp-desTại router BINHPHUOC: BINHPHUOC(config) crypto ipsec transform-set MYSET esp-md5-hmac esp-desTrần Huỳnh Hiệp – VnPro Thông tin khác
Cấu hình VPN Site to Site trên router Cisco ( cli ) 1.Topology 2.Yên cầu Cấu hình VPN cho phép 2 LAN ở router HQ và router Branch liên lạc được với nhau. 3.Cấu hình:
-Router ISP: chỉ cấu hình hostname và IP của các interface như mô hình trên - Router HQ: cấu hình hostname và ip theo mô hình, sau đó cấu hình default route. HQ(config) ip route 0.0.0.0 0.0.0.0 113.114.115.2- Router Branch: cấu hình hostname và ip theo mô hình, sau đó cấu hình default route. Branch(config) ip route 0.0.0.0 0.0.0.0 115.114.113.2b.Cấu hình VPN theo các bước sau: Trên router HQ Bước1: Tạo Internet Key Exchange (IKE) key policy. HQ(config) crypto isakmp policy 9HQ(config-isakmp) hash md5HQ(config-isakmp) authentication pre-shareBước 2: Tạo shared key để sử dụng cho kết nối VPN HQ(config) crypto isakmp key VPNKEY address 115.114.113.1 (ip của router branch)Bước3: Quy định lifetime HQ(config) crypto ipsec security-association lifetime seconds 86400Bước4: Cấu hình ACL dãy IP có thể VPN. HQ(config) access-list 100 permit ip 192.168.1.0 0.0.0.255 192.168.2.0 0.0.0.255Bước 5: Define the transformations set that will be used for this VPN connection HQ(config) crypto ipsec transform-set SETNAME esp-3des esp-md5-hmacBước6: Tạo cypto-map cho các transform, setname HQ(config) crypto map MAPNAME 10 ipsec-isakmpHQ(config-crypto-map) set peer 115.114.113.1 (ip của router branch)HQ(config-crypto-map) set transform-set SETNAME ( setname ở bước 5)HQ(config-crypto-map) match address 100 (100 : acl-number ở bước 4 )Bước7: Gán vào interface HQ(config) inter s0/0/0HQ(config-if) crypto map MAPNAME (mapname ở bước 6)Trên router Branch Thực hiện tương tự theo 7 bước như trên router HQ. Có một số thay đổi nho nhỏ ở các bước sau: - bước 2: Branch(config) crypto isakmp key VPNKEY address 113.114.115.1 (ip của router HQ)- bước 4: Branch(config) access-list 100 permit ip 192.168.2.0 0.0.0.255 192.168.1.0 0.0.0.255- bước 6: Branch(config-crypto-map) set peer 113.114.115.1 (ip của router HQ)Phần trên các router cấu hình đến đây đã xong! Kết quả: ping từ LAN 192.168.1.0/24 sang LAN 192.168.2.0 /24 đã thành công! --- Một số lệnh kiểm tra cấu hình vpn show crypto isakmp sa show crypto ipsec sa show crypto engine connections active and show crypto map --- Mô hình tôi làm trên packer tracer 5.3 + config files : download CHÚC CÁC BẠN THỰC HIỆN THÀNH CÔNG! Life is something that no one can teach you. You have to learn it. Follow him on Để bắt đầu tham gia Giao dịch tài chính: |