Тема неоднократно рассмотренная, но не потерявшая своей актуальности. В случае, если организация обладает разветвленной сетью мини-офисов, число сотрудников в которых не превышает 5-10 человек, а единственно доступным (по цене, в том числе) является только канал Интернет, то для организации защищенных каналов связи весьма удобно использовать технологию Cisco Easy VPN.
В отличие от NHRP/mGRE, технологию Cisco Easy VPN поддерживают все модели маршрутизаторов Cisco. При использовании бюджетных маршрутизаторов (85х, 86х и т.д.) мы также ограничены и в выборе протокола динамической маршрутизации.
В данном примере у нас имеется Hub, осуществляющий прием подключений от региональных офисов и Spoke, на котором организован туннель к Hub. Маршрутизация осуществляется по протоколу RIP (ODR не работает в Easy VPN), при этом к Spoke отдается маршрут по умолчанию, а от него принимается маршрут к его локальной сети.
Конфигурация Hub:
! version 12.4 service tcp-keepalives-in service tcp-keepalives-out service timestamps debug datetime msec localtime service timestamps log datetime msec localtime service password-encryption service sequence-numbers ! hostname lab ! boot-start-marker boot-end-marker ! enable secret cisco ! aaa new-model ! ! aaa authentication login default local aaa authorization network default local ! aaa session-id common ! resource policy ! clock timezone MSK 3 clock summer-time MSD recurring last Sun Mar 2:00 last Sun Oct 3:00 no network-clock-participate slot 1 ip cef ! ! ! no ip domain lookup ip domain name dreamcatcher.ru ! ! username cisco privilege 15 secret cisco ! ! policy-map Minibranch_TraffShape class class-default shape average 2560000 ! ! crypto keyring Minibranch pre-shared-key address 0.0.0.0 0.0.0.0 key MegaKey ! crypto isakmp policy 10 encr aes 256 authentication pre-share group 2 crypto isakmp invalid-spi-recovery crypto isakmp keepalive 120 20 periodic crypto isakmp nat keepalive 20 crypto isakmp profile Minibranch keyring Minibranch match identity address 0.0.0.0 virtual-template 1 ! ! crypto ipsec transform-set Minibranch esp-aes 256 esp-sha-hmac ! crypto ipsec profile Minibranch set transform-set Minibranch set pfs group2 ! ! interface FastEthernet0/0 description --- To Inet --- ip address 192.168.100.2 255.255.255.0 duplex auto speed auto ! interface FastEthernet1/0 description --- LAN --- ip address 192.168.1.1 255.255.255.0 duplex auto speed auto ! interface Virtual-Template1 type tunnel description --- Minibranch --- bandwidth 256 ip unnumbered FastEthernet1/0 tunnel source FastEthernet0/0 tunnel mode ipsec ipv4 tunnel protection ipsec profile Minibranch service-policy output Minibranch_TraffShape ! router rip version 2 passive-interface default no passive-interface Virtual-Template1 network 192.168.1.0 default-information originate distribute-list prefix DEF out distribute-list prefix RIP in no auto-summary ! ip route 0.0.0.0 0.0.0.0 192.168.100.1 ! ip prefix-list DEF seq 5 permit 0.0.0.0/0 ! ip prefix-list RIP seq 5 permit 192.168.0.0/16 le 24 ! control-plane ! line con 0 line aux 0 line vty 0 4 ! ! end [/cc] Конфигурация Spoke: [cc lang="bash"] version 15.1 no service pad service timestamps debug datetime msec service timestamps log datetime msec service password-encryption ! hostname branch ! boot-start-marker boot-end-marker ! ! logging buffered 51200 warnings enable secret cisco ! no aaa new-model memory-size iomem 10 crypto pki token default removal timeout 0 ! ! ip source-route ! ip cef no ip domain lookup ip domain name dreamcatcher.ru ! username cisco privilege 15 secret cisco ! crypto keyring Minibranch pre-shared-key address 0.0.0.0 0.0.0.0 key MegaKey ! crypto isakmp policy 10 encr aes 256 authentication pre-share group 2 crypto isakmp invalid-spi-recovery crypto isakmp keepalive 120 20 crypto isakmp nat keepalive 20 crypto isakmp profile Minibranch keyring Minibranch match identity address 0.0.0.0 virtual-template 1 ! ! crypto ipsec transform-set Minibranch esp-aes 256 esp-sha-hmac ! crypto ipsec profile Minibranch set transform-set Minibranch set pfs group2 ! interface Tunnel0 description --- To GW --- ip unnumbered Vlan1 ip virtual-reassembly in tunnel source FastEthernet4 tunnel mode ipsec ipv4 tunnel destination 192.168.100.2 tunnel protection ipsec profile Minibranch ! interface FastEthernet4 description --- WAN --- ip address 192.168.101.2 255.255.255.0 duplex auto speed auto ! interface Vlan1 description --- LAN --- ip address 192.168.2.1 255.255.255.0 ip tcp adjust-mss 1452 ! router rip version 2 passive-interface default no passive-interface Tunnel0 network 192.168.2.0 distribute-list prefix RIP out no auto-summary ! ip route 0.0.0.0 0.0.0.0 192.168.101.1 ! ! ip prefix-list RIP seq 5 permit 192.168.0.0/16 le 24 ! line con 0 login local no modem enable line aux 0 line vty 0 4 privilege level 15 login local transport input telnet ssh ! end
Используемая литература:
Configuration Examples and TechNotes
Автор: Сгибнев Михаил