Jump to content
Калькуляторы

Cisco EEM Трабла

Добрый день!

Имеем цыску 2691 вот с таким софтом:

slot0:c2691-adventerprisek9_ivs-mz.124-15.T10.bin

 

Вот с таким конфигом:

version 12.4
service timestamps debug datetime localtime
service timestamps log datetime localtime
service password-encryption
!
hostname C2691-UME
!
boot-start-marker
boot-end-marker
!
logging buffered 4096
!
aaa new-model
!
!
!
!
aaa session-id common
no network-clock-participate slot 1
ip cef
!
!
no ip dhcp use vrf connected
!
ip dhcp pool PHONES
  network 192.168.3.0 255.255.255.0
  default-router 192.168.3.1
  dns-server 8.8.8.8
!
!
!
multilink bundle-name authenticated
!
archive
log config
 hidekeys
!
!
!
!
!
track 1 rtr 10 reachability
delay down 10 up 10
!
track 2 rtr 20 reachability
delay down 10 up 10
!
!
interface FastEthernet0/0
description UPLINK-1
ip address xxx.yyy.1.106 255.255.255.252
no ip redirects
no ip unreachables
no ip proxy-arp
ip nat outside
ip virtual-reassembly
load-interval 30
speed 100
full-duplex
hold-queue 4096 in
hold-queue 4096 out
!
interface FastEthernet0/1
description UPLINK-2
ip address www.zzz.21.66 255.255.255.0
no ip redirects
no ip unreachables
no ip proxy-arp
ip nat outside
ip virtual-reassembly
load-interval 30
duplex auto
speed auto
hold-queue 4096 in
hold-queue 4096 out
!
interface FastEthernet1/0
description INSIDE
ip address 192.168.2.1 255.255.255.0
ip nat inside
ip virtual-reassembly
ip policy route-map track-nat
load-interval 30
speed 100
full-duplex
hold-queue 4096 in
hold-queue 4096 out
!
interface FastEthernet1/1
description INSIDE PHONES
ip address 192.168.3.1 255.255.255.0
ip nat inside
ip virtual-reassembly
ip policy route-map track-nat
load-interval 30
speed 100
full-duplex
hold-queue 4096 in
hold-queue 4096 out
!
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 xxx.yyy.1.105 200 track 1
ip route 0.0.0.0 0.0.0.0 www.zzz.21.1 250 track 2
!
ip http server
no ip http secure-server
ip nat inside source route-map UPLINK-1 interface FastEthernet0/0 overload
ip nat inside source route-map UPLINK-2 interface FastEthernet0/1 overload
!
ip access-list extended NAT-UPLINK-1
permit ip 192.168.2.0 0.0.0.255 any
permit ip 192.168.3.0 0.0.0.255 any
permit ip 192.168.1.0 0.0.0.255 any
ip access-list extended NAT-UPLINK-2
permit ip 192.168.2.0 0.0.0.255 any
permit ip 192.168.3.0 0.0.0.255 any
permit ip 192.168.1.0 0.0.0.255 any
!
ip sla 10
icmp-echo xxx.yyy.1.105
frequency 5
ip sla schedule 10 life forever start-time now
ip sla 20
icmp-echo www.zzz.21.1
frequency 5
ip sla schedule 20 life forever start-time now
snmp-server community xxxxxxxxx RW
snmp-server ifindex persist
snmp-server location UME
!
route-map UPLINK-1 permit 10
match interface FastEthernet0/0
!
route-map track-nat permit 10
match ip address NAT-UPLINK-1
set ip next-hop verify-availability xxx.yyy.1.105 10 track 1
set ip next-hop verify-availability www.zzz.21.1 20 track 2
!
route-map track-nat permit 20
match ip address NAT-UPLINK-2
set ip next-hop verify-availability www.zzz.21.1 10 track 2
set ip next-hop verify-availability xxx.yyy.1.105 20 track 1
!
route-map UPLINK-2 permit 10
match interface FastEthernet0/1
!
!
!
!
control-plane
!
gatekeeper
shutdown
!
!
line con 0
line aux 0
event manager applet UPLINK1_DOWN
event track 1 state down
action 1.0 cli command "enable"
action 1.5 cli command "clear ip nat translation *"
action 1.8 cli command "end"
action 1.9 cli command "exit"
event manager applet UPLINK1_UP
event track 1 state up
action 1.0 cli command "enable"
action 1.5 cli command "clear ip nat translation *"
action 1.8 cli command "end"
action 1.9 cli command "exit"

Собственно ниче необычного обычная энтерпрайз цыска с двумя аплинками, делает нат для компов и сип-телефонов.

Стоит задача зарезервировать аплинк.

Была создана конструкция с роутмпами и трекерами

Пингуется шлюз первого аплинка, если пинг пропал то переключается на второго.

Теперь проблема: интет отрабатывает замечательно, а вот сип-телефоны не регаются с нового адреса на атс оператора, через нат на этой цыске. Дело втом что таблице нат повисает старая сессия и помогает только команда clear ip nat translations *

Что бы этот трюк провернуть воспользовались EEM с привязкой к трекеру (продублирую строчки конфига):

event manager applet UPLINK1_DOWN
event track 1 state down
action 1.0 cli command "enable"
action 1.5 cli command "clear ip nat translation *"
action 1.8 cli command "end"
action 1.9 cli command "exit"
event manager applet UPLINK1_UP
event track 1 state up
action 1.0 cli command "enable"
action 1.5 cli command "clear ip nat translation *"
action 1.8 cli command "end"
action 1.9 cli command "exit"

Однако данный функционал не отрабатывает потому что сессии так и висят, сбросить можно тока руками.

Вопрос в какую сторону рыть?

Заранее спасибо!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.