topo_VPN.jpg
Em đã thực hiện topo mạng như trên .
Em cấu hình VPN cho 2 Router HN - HCM .
Nhưng sao cuối cùng , em ping lại không được . Mong mọi người hướng dẫn giúp em để em hoàn thành bài demo của mình . Cái này em tham khảo trên Youtube và code theo . Đây là code của em , không biết em đã sai và còn thiếu gì . Em đang rất cần , mong nhận được sự giúp đỡ của mọi người . Tks VNPro và chỉ dẫn của các thầy cũng như các bạn ở trên .
Code:
//////////////// R1 /////////////////
en
conf term
int loopback0
ip add 192.168.2.1 255.255.255.0
no shut
int s1/0
ip add 10.1.1.1 255.255.255.0
no shut
exit
ip route 172.16.1.0 255.255.255.0 10.1.1.2
ip route 172.16.2.1 255.255.255.0 10.1.1.2
ip route 172.16.2.0 255.255.255.0 10.1.1.2
ip route 0.0.0.0 0.0.0.0 serial1/0
do wr mem
exit
copy run start
//////////////// R3 /////////////////
en
conf term
int loopback0
ip add 172.16.2.1 255.255.255.0
no shut
int s1/0
ip add 172.16.1.1 255.255.255.0
no shut
exit
ip route 0.0.0.0 0.0.0.0 serial1/0
ip route 192.168.2.0 255.255.255.0 172.16.1.2
ip route 10.1.1.0 255.255.255.0 172.16.1.2
exit
copy run start
//////////////// R2 /////////////////
en
conf term
int s1/0
ip add 10.1.1.2 255.255.255.0
no shut
int s1/1
ip add 172.16.1.1 255.255.255.0
no shut
copy run start
///////////////// R1 //////////////
ping 172.16.1.1
//////////////// R3 //////////////
ping 10.1.1.1
/////////////// R1 //////////////
conf term
ip access-list extended toHCM
permit ip 192.168.2.0 0.0.0.255 172.16.2.0 0.0.0.255
exit
crypto isakmp policy 2
encryption 3des
authentication pre-share
group 2
exit
crypto isakmp key mycstubes address 172.16.1.1
crypto ipsec transform-set TSA esp-3des esp-sha-hmac
exit
crypto map CMPS1 1 ipsec-isakmp
description Tunnel1 to HCM
set peer 172.16.1.1
set transform-set TSA
match address ToHCM
exit
int s1/0
crypto map CMPS1
exit
copy run start
///////////////// R3 ////////////////
en
conf term
ip access-list extended toHN
permit ip 172.16.2.0 0.0.0.255 192.168.2.0 0.0.0.255
exit
crypto isakmp policy 2
encryption 3des
authentication pre-share
group 2
exit
crypto isakmp key 0 mycstubes address 10.1.1.1
crypto ipsec transform-set TSB esp-3des esp-sha-hmac
exit
crypto map CMPS2 1 ipsec-isakmp
description Tunnel1 to HN
set peer 10.1.1.1
set transform-set TSB
match address ToHN
exit
int s1/0
crypto map CMPS2
exit
copy run start
//////////////// R1 /////////////////////////
ping
IP address : 172.16.2.1
interface : 192.168.2.1
///////////// R3 /////////////////////////////
ping
IP address : 192.168.2.1
interface : 172.16.2.1