cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
904
Views
25
Helpful
4
Replies

Flexlink+ Auto Recovery on C9300

hk24596
Level 1
Level 1

We're planning to configure Flexlink+ Feature on Existing Switches .However we have doubt related to the Auto recovery of uplinks. Because as per Cisco document (Refer below link) traffic will not be fail back to primary uplink from secondary once the primary uplink will come online. Is there any configuration we need to do to happen this(Traffic failback to primary uplink automatically) or the traffic will remain on secondary uplink until it doesn't goes down?

 

Reference link : https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9300/software/release/17-2/configuration_guide/lyr2/b_172_lyr2_9300_cg/configuring_flexlink_.html

 

Thanks in Advance !

2 Accepted Solutions

Accepted Solutions

balaji.bandi
Hall of Fame
Hall of Fame

I think you are correct, you many need manual intervention, or some kind of Script like EEM to make this action.

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

View solution in original post

Hello,

 

an EEM script would have to check the status of the REP topology. Let's say you have interface GigabitEthernet1/1 configured as the primary link, and GIgabitEthernet1/2 as the secondary link, the script would have to check the REP topology to see if the status is reversed.

 

If it looks like this:

 

C9300#show rep topology
REP Segment 1
BridgeName PortName Edge Role
-------------------------------- ---------- ---- ----
C9300 Gi1/2 Pri Open
C9300 Gi1/1 Sec Alt

 

The link that was initially the backup/secondary link is now the primary link. If that is the case, the script below would reenable the initial configuration (making GigabitEthernet1/1 the primary and GigabitEthernet1/2 the secondary).

 

In the sample below, the script runs every 60 seconds. Change that value, as well as the interfaces, to what you actually need:

 

event manager applet FLEXLINK
event timer watchdog time 60
action 1.0 cli command "enable"
action 2.0 cli command "show rep topology | include Gi1/1"
action 3.0 regexp "Sec Alt" $_cli_result
action 4.0 if $_regexp_result eq 1
action 5.0 cli command "conf t"
action 6.0 cli command "interface GigabitEthernet1/1"
action 7.0 cli command "rep segment 1023 edge no-neighbor primary"
action 8.0 cli command "exit"
action 8.1 cli command "interface GigabitEthernet1/2"
action 8.2 cli command "rep segment 1023 edge no-neighbor preferred"
action 8.3 end

 

 

View solution in original post

4 Replies 4

balaji.bandi
Hall of Fame
Hall of Fame

I think you are correct, you many need manual intervention, or some kind of Script like EEM to make this action.

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Thanks for your reply @balaji.bandi 

 

Can you give us any reference links related to EEM Script to make this possible ?

 

Thanks again !

I do not have in hand - But i do not see hard to create one and test it for your self.

 

high level - check the interface come back, some manual checks or based on syslog and shutdown secondary(as now primary link) - this failover to primary link, check the stability giving 10min or so, then bring up secondary link and observe the results.

 

First check - manually do this task, how the results are and note the leraning lesson and apply the EEM script based on the outcome

 

Some reference :

https://www.cisco.com/c/en/us/support/docs/ios-nx-os-software/ios-xe-16/216091-best-practices-and-useful-scripts-for-ee.html

https://community.cisco.com/t5/networking-documents/cisco-eem-basic-overview-and-sample-configurations/ta-p/3148479

 

 

Note : appologies, if this information not as you expected, as i mentioned i do not have anything to offer in had that script. - instead i put my thoughts how you can do this. (Hope this helps you ?)

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Hello,

 

an EEM script would have to check the status of the REP topology. Let's say you have interface GigabitEthernet1/1 configured as the primary link, and GIgabitEthernet1/2 as the secondary link, the script would have to check the REP topology to see if the status is reversed.

 

If it looks like this:

 

C9300#show rep topology
REP Segment 1
BridgeName PortName Edge Role
-------------------------------- ---------- ---- ----
C9300 Gi1/2 Pri Open
C9300 Gi1/1 Sec Alt

 

The link that was initially the backup/secondary link is now the primary link. If that is the case, the script below would reenable the initial configuration (making GigabitEthernet1/1 the primary and GigabitEthernet1/2 the secondary).

 

In the sample below, the script runs every 60 seconds. Change that value, as well as the interfaces, to what you actually need:

 

event manager applet FLEXLINK
event timer watchdog time 60
action 1.0 cli command "enable"
action 2.0 cli command "show rep topology | include Gi1/1"
action 3.0 regexp "Sec Alt" $_cli_result
action 4.0 if $_regexp_result eq 1
action 5.0 cli command "conf t"
action 6.0 cli command "interface GigabitEthernet1/1"
action 7.0 cli command "rep segment 1023 edge no-neighbor primary"
action 8.0 cli command "exit"
action 8.1 cli command "interface GigabitEthernet1/2"
action 8.2 cli command "rep segment 1023 edge no-neighbor preferred"
action 8.3 end

 

 

Review Cisco Networking products for a $25 gift card