cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1365
Views
0
Helpful
1
Replies
Highlighted
Beginner

Python script for no shut interfaces with timer

Hi,

 

we have full mesh network with fabric path between N7700 (spine) and Nexus 5600 (leaf). There are Nexus 2200 FEX-es dual-homed to Nexus 5600.

 

We have problem with traffic loss after Nexus 5600 reloads. Fabric path is up, FEX-es are still down and spine switch forwards traffic (because FP is up) to restarted leaf switch and it drops traffic (it should send it to vPC peer over peer-link). Traffic starts after FEX come online on restarted Nexus 5600.

 

We opened TAC case and TAC said that this is BUG and for resolving it they need to develop new feature (there is no any date for this).

 

Workaround are EEM and python scripts.

 

EEM script should shutdown fabric path uplink ports after switch boots up (match PFMA-5-MOD_STATUS: Module 1 current-status is MOD_STATUS_ONLINE) and start python script.

 

Python script should wait some time (timer should be addopted to number of FEX-es, more FEX-es means higher timer value) and after timer expires (all FEX-es come online) it should enable fabric path uplink ports.

 

Can somebody help me to write this script?

 

BR, Mate 

1 REPLY 1
Highlighted
Rising star

You can find some Cisco N5K

You can find some Cisco N5K Python scripts here. Potentially you could modify one of them to suit your purpose.

https://github.com/datacenter?page=2

Don't forget to rate all posts that are helpful.