Thursday, November 23, 2017

Troubleshooting OSPF neighbor flapping by TCL script on EXOS

If OSPF problem is existing in customer’s network, we could narrow down the cause of this issue by the log filter and access-list, etc.
( whether ospf hello message dropped on sender side or receiver side, if it is receiver side then, whether is dropped on slow patch or it is not found on HW etc )
Please see below example and result in the lab.
1. log filter
[config ]
configure log filter DefaultFilter add events ospf.hello.PktRx match ipaddress "1.1.1.2"
[result ]
* cntcom01.75 # sh log
11/21/2017 13:44:46.89 <Info:ospf.hello.PktRx> MSM-A: test received a Hello pkt from 1.1.1.2
11/21/2017 13:44:36.88 <Info:ospf.hello.PktRx> MSM-A: test received a Hello pkt from 1.1.1.2
2. access-list
Policy: ospf1
entry e1 {
if match all {
   source-address 1.1.1.2/32 ;
   destination-address 224.0.0.5/32 ;
}
then {
   count ospfc_1.1.1.2 ;
}
}
entry e2 {
if match all {
   source-address 1.1.1.3/32 ;
   destination-address 224.0.0.5/32 ;
}
then {
   count ospfc_1.1.1.3 ;
}
}
configure access-list ospf1 vlan test
3. UPM
[ ospfcount.xsf ]
set var cli.out " "
show access-list counter
clear access-list counter
set var output $TCL(split ${cli.out} "\n")
set var len $TCL(llength $output)
set var total ($len - 6 )
set var cnt 0
set var ospflineindex $TCL(lsearch $output *ospfc* )
while ($cnt < $total) do
           set var line $TCL(lindex $output $ospflineindex)
           set var ospfcount $TCL(lindex $line 1)
           create log entry OSPF_COUNT:$ospfcount
           set var cnt ($cnt + 1)
           set var ospflineindex ($ospflineindex +1)
endwhile
[config on switch]
create upm profile ospfcount
load script ospfcount.xsf
.
create upm timer ospfcount_timer
configure upm timer ospfcount_timer profile ospfcount
configure upm timer ospfcount_timer after 10 every 60
[result]
11/21/2017 14:46:34.99 <Info:System.userComment> OSPF_COUNT:6
11/21/2017 14:46:34.97 <Info:System.userComment> OSPF_COUNT:6
11/21/2017 14:46:34.86 <Noti:UPM.Msg.upmMsgExshLaunch> Launched profile ospfcount for the event UPM Timer ospfcount_timer
11/21/2017 14:45:34.35 <Info:System.userComment> OSPF_COUNT:6
11/21/2017 14:45:34.33 <Info:System.userComment> OSPF_COUNT:6
11/21/2017 14:45:34.20 <Noti:UPM.Msg.upmMsgExshLaunch> Launched profile ospfcount for the event UPM Timer ospfcount_timer
4. on neighbor switch ( for example, on 202.251.2.48 )
configure log filter DefaultFilter add events ospf.hello.TxPkt
enable log debug-mode
[result]
* cntcos01.77 # sh log
11/21/2017 14:49:57.24 <Summ:ospf.hello.TxPkt> MSM-A: test is transmitting a Hello pkt to 224.0.0.5 (length 56, interface 0x0050B638, pkt num 8293).
11/21/2017 14:49:47.24 <Summ:ospf.hello.TxPkt> MSM-A: test is transmitting a Hello pkt to 224.0.0.5 (length 56, interface 0x0050B638, pkt num 8292).

No comments:

Post a Comment