Event to reset Interface if it doesn't have an ip?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2023 12:44 PM
Hi,
I have a Cisco IR809G. When it boots the cellular int 0 does not get an ip from At&t. However, when I shut/no shut the interface it will get an ip. Is there an event manager script to wait for it to get an ip then reload the cellular 0 if it does not get an ip?
"test cellular 0/0/0 modem-power-cycle" does not work, I have to reset the interface itself.
Thanks for any help.
- Labels:
-
Other Network
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2023 12:53 PM
you can use below thread and EEM script help you : (you can tweak based on the Router reload)
https://community.cisco.com/t5/network-management/eem-script-shut-no-shut-cellular-port/td-p/3906662
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2023 01:35 PM
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2023 02:10 PM
no worries good luck
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2023 12:06 PM
@balaji.bandithat seems to have had some effect. I can see the cellular interface shut and unshut a short time after boot and that seems to resolve my issue. a curious thing is that i can't seem to delay it. I added an action to wait 2 minutes but it just happens immediately. Here is what i have.
Sidenote: I keep trying to type"ip sla reaction-configuration 10 react timeout action-type trapOnly threshold-type consecutive 3"
But when I show the config it is changed to "ip sla reaction-configuration 10 react timeout threshold-type consecutive 3 action-type trapOnly"
If I leave it out entirely there is some sort of positive effect.
ip sla responder
ip sla 10
icmp-echo X.X.0.114 source-interface cellular 0
threshold 2000
frequency 30
ip sla enable reaction-alerts
ip sla schedule 10 life forever start-time now
event manager applet RESET_CELL_PORT
event ipsla operation-id 10 reaction-type timeout
action 0.8 cli command "en"
action 0.9 cli command "send log PING_FAILED_RELOADING_CELL0"
action 1.1 wait 240
action 1.2 cli command "conf t"
action 1.3 cli command "int cell 0"
action 1.4 cli command "shut"
action 1.5 wait 10
action 2.1 cli command "int cell 0"
action 2.2 cli command "no shut"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2023 09:54 AM
is the EEM Scripts default timeout 20seconds - so you need to increase what what time you need to. example for 60seconds "maxrun 60" which will allow the EEM applet to run up to 60 seconds.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2023 12:35 PM
Why cellular interface not get IP from at&t and you need to shut/no shut ?
If we know issue we can get correct solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2023 01:18 PM
@MHM Cisco World @balaji.bandi I'm not sure why it doesnt get an ip immediately. Would it have anything to do with the timing of the dailer watcher scheduler? Here is my config for the device.
!
!
!
chat-script lte "" "AT!CALL" TIMEOUT 20 "OK"
password encryption aes
!
!
!
!
redundancy
notification-timer 120000
!
!
!
!
!
controller Cellular 0
lte sim fast-switchover enable
lte failovertimer 5
no cdp run
!
ip tcp synwait-time 10
!
!
!
!
crypto isakmp policy 1
encr aes 256
authentication pre-share
group 19
!
!
!
!
!
!
crypto ipsec client ezvpn TESTPROBE
connect auto
group TEST_BitProbe key 6 xxxxxxxxxxxxxx
mode network-extension
peer 10.50.0.114
virtual-interface 2
username TESTprobe-sec password 6 Jxxxxxxxxxxxxxxx
xauth userid mode local
!
!
!
!
!
!
interface Loopback0
ip address 10.50.9.26 255.255.255.254
no ip redirects
no ip unreachables
no ip proxy-arp
ip flow ingress
ip flow egress
crypto ipsec client ezvpn TESTPROBE inside
!
interface GigabitEthernet1
no ip address
duplex auto
speed auto
no cdp enable
!
interface GigabitEthernet2
no ip address
duplex auto
speed auto
!
interface Cellular0
ip address negotiated
no ip redirects
no ip unreachables
no ip proxy-arp
encapsulation slip
ip tcp adjust-mss 1390
dialer in-band
dialer idle-timeout 0
dialer string lte
dialer watch-group 1
async mode interactive
crypto ipsec client ezvpn TESTPROBE
!
interface Cellular1
no ip address
encapsulation slip
shutdown
!
interface Virtual-Template2 type tunnel
ip unnumbered Cellular0
ip access-group ACL-INFRASTRUCTURE-IN in
ip access-group ACL-INFRASTRUCTURE-OUT out
tunnel mode ipsec ipv4
!
interface Async0
no ip address
encapsulation scada
!
interface Async1
no ip address
encapsulation scada
!
!
ip forward-protocol nd
!
no ip http server
no ip http secure-server
ip http client source-interface Loopback0
ip flow-export source Loopback0
ip flow-export version 5
ip flow-export destination 10.20.219.41 2055
!
ip ftp source-interface Loopback0
ip tftp source-interface Loopback0
ip pim rp-address 10.20.236.254
ip route 10.50.0.114 255.255.255.255 Cellular0
ip ssh time-out 60
ip ssh version 2
ip ssh server algorithm mac hmac-sha1 hmac-sha1-96
ip ssh server algorithm encryption aes128-cbc aes192-cbc aes256-cbc
ip scp server enable
!
!
ip radius source-interface Loopback0
ip sla responder
ip sla 10
icmp-echo 10.20.219.41 source-interface Loopback0
threshold 2000
frequency 30
ip sla enable reaction-alerts
logging facility local2
logging source-interface Loopback0
logging host 10.20.219.31 transport tcp port 1468
dialer watch-list 1 ip 5.6.7.8 255.255.255.255
dialer watch-list 1 delay route-check initial 60
dialer watch-list 1 delay connect 1
ipv6 ioam timestamp
!
!
line 1
stopbits 1
line 2
no activation-character
no exec
transport preferred ssh
transport input ssh
stopbits 1
line 3
exec-timeout 0 0
script dialer lte
modem InOut
no exec
transport preferred none
transport input all
transport output all
rxspeed 100000000
txspeed 50000000
line 8
no exec
transport preferred ssh
transport output lat telnet rlogin lapb-ta mop udptn v120 ssh
rxspeed 100000000
txspeed 50000000
line 1/3 1/6
transport preferred none
transport output none
stopbits 1
!
no scheduler max-task-time
ntp authentication-key 1 md5 0110xxxxxxxxxxxxxx7E6B5B 7
ntp authenticate
ntp trusted-key 1
ntp source Loopback0
ntp access-group peer NTP-SERVERS
ntp update-calendar
ntp server 10.50.102.5 key 1
ntp server 10.50.102.6 key 1 prefer
no iox hdm-enable
iox client enable interface GigabitEthernet2
no iox recovery-enable
!
!
!
!
!
!
event manager applet RESET_CELL_PORT
event ipsla operation-id 10 reaction-type timeout
action 0.8 cli command "en"
action 0.9 cli command "send log PING_FAILED_RELOADING_CELL0"
action 1.1 wait 240
action 1.2 cli command "conf t"
action 1.3 cli command "int cell 0"
action 1.4 cli command "shut"
action 1.5 wait 10
action 2.1 cli command "int cell 0"
action 2.2 cli command "no shut"
!
end
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2023 11:44 AM
As an update, I had messed up my lines and dailer with the update. Fixing these resolved my issue.
line 3
transport preferred ssh
transport output lat pad telnet rlogin lapb-ta mop udptn v120 ssh
line 8
no exec
transport preferred ssh
transport output lat pad telnet rlogin lapb-ta mop udptn v120 ssh
!
!
dialer watch-list 1 delay connect 1
dialer watch-list 1 delay route-check initial 60
dialer watch-list 1 ip 5.6.7.8 255.255.255.255
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2023 10:51 AM
Glad all good and thank you sharing the solution.
