cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Bookmark
|
Subscribe
|
2125
Views
0
Helpful
1
Replies

Python script for no shut interfaces with timer

Mate Grbavac
Level 1
Level 1

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

sean_evershed
Level 7
Level 7

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.

Review Cisco Networking for a $25 gift card