CISCO настройка GRE - IPSec
В продолжение предыдущей статьи про VPN
http://snakeproject.ru/rubric/article.php?art=cisco_vpn_site_to_site_2
Разберем примеры IPSEC - GRE
Пример из Packet Tracer (Для второго роутера по аналогии):
1. Определение наборов трансформаций
crypto ipsec transform-set MOSTSECURE esp-aes 256 esp-sha-hmac
2. Определение IPSec Crypto Map
access-list 100 permit ip 10.1.1.0 0.0.0.255 10.2.2.0 0.0.0.255
!
crypto map PT-IPSEC 1000 ipsec-isakmp
description Packet Tracer IPSEC Test Crypto Map
set peer 172.16.2.1
set pfs group5
set security-association lifetime seconds 120
set transform-set MOSTSECURE
match address 100
3. Определение политики ISAKMP защиты ассоциации безопасности (шаг 2)
crypto isakmp policy 100
encr aes 256
authentication pre-share
group 5
lifetime 60
4. Определение Ключа аутентификации
crypto isakmp key samekey address 172.16.2.1
5. Привязка IPSec Crypto Map к исходящему интерфейсу
interface Serial0/0/0
ip address 172.16.1.1 255.255.255.252
crypto map PT-IPSEC
-----------------------------------
Пример из реального оборудования 1:
Роутер1:
interface fasthethernet 0/0
ip address 172.16.1.1 255.255.255.0
!
interface loopback 0
ip address 10.1.1.254 255.255.255.0
!
interface tunnel10
ip address 192.168.0.1 255.255.255.0
tunnel source 172.16.1.1
tunnel destination 172.16.2.1
!
router eigrp 10
network 10.1.1.0 0.0.0.255
network 192.168.0.0
!
access-list 172 permit gre host 172.16.1.1 host 172.16.2.1
!
crypto isakmp key cisco123 address 172.16.2.1
crypto isakmp policy 10
authentication pre-shared-key
encryption des
hash sha
group 1
!
crypto ipsec transform-set esp-3des esp-3des esp-sha-hmac
!
crypto map out_map 10 ipsec-isakmp
set peer 172.16.2.1
set transform-set esp-3des
match address 172
crypto map out_map local-address fastEthernet 0/0
!
interface fasthethernet0/0
crypto map out_map
Роутер2:
interface fasthethernet 0/0
ip address 172.16.2.1 255.255.255.0
!
interface loopback 0
10.2.2.254 255.255.255.0
!
interface tunnel10
ip address 192.168.0.2 255.255.255.0
tunnel source 172.16.2.1
tunnel destination 172.16.1.1
!
router eigrp 10
network 10.2.2.0 0.0.0.255
network 192.168.0.0
!
access-list 172 permit gre host 172.16.2.1 host 172.16.1.1
!
crypto isakmp key cisco123 address 172.16.1.1
crypto isakmp policy 10
authentication pre-shared-key
encryption des
hash sha
group 1
!
crypto ipsec transform-set esp-3des esp-3des esp-sha-hmac
!
crypto map out_map 10 ipsec-isakmp
set peer 172.16.1.1
set transform-set esp-3des
match address 172
crypto map out_map local-address fastEthernet 0/0
!
interface fasthethernet0/0
crypto map out_map
-----------------------------------
Пример из реального оборудования 2:
Роутер1:
crypto isakmp policy 10
encr aes
authentication pre-share
group 2
crypto isakmp key cisco123 address 2.2.2.2
!
crypto ipsec transform-set TS esp-aes esp-sha-hmac
mode tunnel
!
interface Loopback0
ip address 192.168.1.1 255.255.255.0
!
interface Tunnel0
ip unnumbered FastEthernet1/0
tunnel source FastEthernet1/0
tunnel destination 2.2.2.2
!
interface FastEthernet1/0
ip address 1.1.1.2 255.255.255.0
!
ip route 0.0.0.0 0.0.0.0 1.1.1.1
ip route 192.168.3.0 255.255.255.0 Tunnel0
Роутер2:
crypto isakmp policy 10
encr aes
authentication pre-share
group 2
crypto isakmp key cisco123 address 1.1.1.2
!
crypto ipsec transform-set TS esp-aes esp-sha-hmac
mode tunnel
!
interface Loopback0
ip address 192.168.3.3 255.255.255.0
!
interface Tunnel0
ip unnumbered FastEthernet1/0
tunnel source FastEthernet1/0
tunnel destination 1.1.1.2
!
interface FastEthernet1/0
ip address 2.2.2.2 255.255.255.0
!
ip route 0.0.0.0 0.0.0.0 2.2.2.1
ip route 192.168.1.0 255.255.255.0 Tunnel0
На этом - все, желаю удачи!
Комментарии пользователей
Анонимам нельзя оставоять комментарии, зарегистрируйтесь!