SlideShare a Scribd company logo
1 of 4
Download to read offline
CUSTOMIZING NETWORK LINK
AGGREGATION USING PYTHON
SCRIPTS IN OMNISWITCH
APPLICATION NOTE
Customizing network link aggregation using Python scripts in OmniSwitch
ALCATEL-LUCENT ENTERPRISE
2
INTRODUCTION
Today’s enterprise networks provide mission-critical resources for employees, customers
and business partners. Networks must be flexible, and the network operations staff must
be able to trust that network issues are resolved quickly to minimize business impact.
Alcatel-Lucent OmniSwitch® products can respond to network events quickly using the
Event Manager of the Alcatel-Lucent Operating System (AOS) and its embedded Python®
scripting feature.
Specific network events can trigger Python scripts to provide fast, real-time, software-
defined responses tailored to the requirements of the enterprise. For example, the
customers can set up different responses for link failures depending on the location and
type of a link.
This application note demonstrates a combination of OmniSwitch features, including the
AOS Event Manager and Python scripting, to provide a software-defined response failure
of individual links in a link aggregation group. The software-defined result is customized
to match the customer’s network policy needs, following the industry-standard link
aggregation protocols. Another note describes how the AOS Event Manager and Python
scripting can be used to extend policy-based routing.
SOFTWARE-DEFINED RESPONSE TO A PARTIAL
FAILURE OF A LINK AGGREGATION GROUP
Enterprise networks frequently use multiple link aggregation groups to provide higher
bandwidth and increased network resiliency. The AOS Event Manager and Python
scripting can provide software-defined responses when a link failure occurs.
LAG A
AOS Python
scripting
provides
software-
defined
response to
link failure
OS A
Enterprise
network
OS B
LAG B
Customizing network link aggregation using Python scripts in OmniSwitch
ALCATEL-LUCENT ENTERPRISE
3
The Enterprise network shown above uses two OmniSwitch units, OS A and OS B,
and two link aggregation groups, LAG A and LAG B, to provide redundant access to a
major router. There are four ports in each LAG identified as ports A1 through A4 and B1
through B4.
In this example, the customer has designed the network so that either LAG can provide
sufficient bandwidth for all traffic and only one LAG is active at any time. The customer
policy is to consider a LAG failed when half of the links in that LAG have failed.
The customer is concerned about partial failures where several links in a LAG fail, but
at least one link remains operational. In that case, the traffic capacity is significantly
reduced, but industry-standard link aggregation protocols do not automatically consider
the LAG as failed.
The following solution implements a custom policy using the AOS Event Manager and
Python scripting, along with AOS Web Services RESTful remote command execution.
The OmniSwitch Event Manager executes a custom Python script in OS A whenever a
link fails. The Python script checks the number of remaining links in the LAG A group
against a pre-defined limit and disables the entire LAG if the number of remaining links
falls below the limit. The second LAG is then enabled remotely by OS A on OS B using
the AOS RESTful API. All traffic then flows through the LAG B. This avoids operating the
network with a partially-failed LAG and meets the goals set by the customer policy.
EXAMPLE
This example demonstrates the AOS Event Manager and Python scripting.
The Event Manager is configured with event-action commands that execute the script
linkagg_script.py when the snmp linkDown trap occurs.
! Trap Manager:
snmp-trap absorption disable
event-action trap linkDown script /flash/python/linkagg_script.py
AOS passes the trap type and other parameters to the script when a linkDown trap
occurs. The script then checks the parameters trap and data[ifIndex] to determine
what happened.
enterprise.alcatel-lucent.com Alcatel-Lucent and the Alcatel-Lucent Enterprise logo are trademarks of Alcatel-Lucent. To view
Alcatel-Lucent Enterprise trademarks visit: enterprise.alcatel-lucent.com/trademarks. All other trademarks are the property of their
respective owners. The information presented is subject to change without notice. Alcatel-Lucent Enterprise assumes no responsibility
for inaccuracies contained herein. Copyright © 2015 Alcatel-Lucent Enterprise. All Rights Reserved. 201502170004EN (March)
Pseudocode for linkagg_script.py
If (SNMP trap is linkDown)
	 If (the port is a member of LAG 1)
		 Set value = the number of operational ports remaining in LAG 1
			 If (number of remaining ports is below the customer’s threshold)
				Execute local AOS command to Disable LAG 1 on OmniSwitch A
				Execute remote AOS command to Enable LAG 2 on OmniSwitch B
				Send email message to network manager’s phone
			Else
				Log the port failed and the number of remaining ports
	Else
		 linkDown event is not on a member of LAG 1. Ignore it.
CONCLUSION
The AOS Event Manager and Python scripting provide a fast, flexible, software-defined
response to network events. The response supports and enforces network policies defined
by the networking staff. Responses can include enabling or disabling links or changing
network priorities. It can also include gathering information to document the failure and
notifying network staff by e-mail.
REFERENCES
See “OmniSwitch AOS XXX Switch Management Guide”, chapter “Web Services, CLI
Scripting, and OpenFlow”. The document is located at http://enterprise.alcatel-lucent.
com/UserGuides. This application note applies to AOS release 7.3.4 or later.

More Related Content

Recently uploaded

Production 2024 sunderland culture final - Copy.pptx
Production 2024 sunderland culture final - Copy.pptxProduction 2024 sunderland culture final - Copy.pptx
Production 2024 sunderland culture final - Copy.pptx
ChloeMeadows1
 
audience research (emma) 1.pptxkkkkkkkkkkkkkkkkk
audience research (emma) 1.pptxkkkkkkkkkkkkkkkkkaudience research (emma) 1.pptxkkkkkkkkkkkkkkkkk
audience research (emma) 1.pptxkkkkkkkkkkkkkkkkk
lolsDocherty
 

Recently uploaded (16)

Pvtaan Social media marketing proposal.pdf
Pvtaan Social media marketing proposal.pdfPvtaan Social media marketing proposal.pdf
Pvtaan Social media marketing proposal.pdf
 
Reggie miller choke t shirtsReggie miller choke t shirts
Reggie miller choke t shirtsReggie miller choke t shirtsReggie miller choke t shirtsReggie miller choke t shirts
Reggie miller choke t shirtsReggie miller choke t shirts
 
TORTOGEL TELAH MENJADI SALAH SATU PLATFORM PERMAINAN PALING FAVORIT.
TORTOGEL TELAH MENJADI SALAH SATU PLATFORM PERMAINAN PALING FAVORIT.TORTOGEL TELAH MENJADI SALAH SATU PLATFORM PERMAINAN PALING FAVORIT.
TORTOGEL TELAH MENJADI SALAH SATU PLATFORM PERMAINAN PALING FAVORIT.
 
Statistical Analysis of DNS Latencies.pdf
Statistical Analysis of DNS Latencies.pdfStatistical Analysis of DNS Latencies.pdf
Statistical Analysis of DNS Latencies.pdf
 
Development Lifecycle.pptx for the secure development of apps
Development Lifecycle.pptx for the secure development of appsDevelopment Lifecycle.pptx for the secure development of apps
Development Lifecycle.pptx for the secure development of apps
 
I’ll See Y’All Motherfuckers In Game 7 Shirt
I’ll See Y’All Motherfuckers In Game 7 ShirtI’ll See Y’All Motherfuckers In Game 7 Shirt
I’ll See Y’All Motherfuckers In Game 7 Shirt
 
Thank You Luv I’ll Never Walk Alone Again T shirts
Thank You Luv I’ll Never Walk Alone Again T shirtsThank You Luv I’ll Never Walk Alone Again T shirts
Thank You Luv I’ll Never Walk Alone Again T shirts
 
Production 2024 sunderland culture final - Copy.pptx
Production 2024 sunderland culture final - Copy.pptxProduction 2024 sunderland culture final - Copy.pptx
Production 2024 sunderland culture final - Copy.pptx
 
Premier Mobile App Development Agency in USA.pdf
Premier Mobile App Development Agency in USA.pdfPremier Mobile App Development Agency in USA.pdf
Premier Mobile App Development Agency in USA.pdf
 
Bug Bounty Blueprint : A Beginner's Guide
Bug Bounty Blueprint : A Beginner's GuideBug Bounty Blueprint : A Beginner's Guide
Bug Bounty Blueprint : A Beginner's Guide
 
The Use of AI in Indonesia Election 2024: A Case Study
The Use of AI in Indonesia Election 2024: A Case StudyThe Use of AI in Indonesia Election 2024: A Case Study
The Use of AI in Indonesia Election 2024: A Case Study
 
GOOGLE Io 2024 At takes center stage.pdf
GOOGLE Io 2024 At takes center stage.pdfGOOGLE Io 2024 At takes center stage.pdf
GOOGLE Io 2024 At takes center stage.pdf
 
How Do I Begin the Linksys Velop Setup Process?
How Do I Begin the Linksys Velop Setup Process?How Do I Begin the Linksys Velop Setup Process?
How Do I Begin the Linksys Velop Setup Process?
 
Cyber Security Services Unveiled: Strategies to Secure Your Digital Presence
Cyber Security Services Unveiled: Strategies to Secure Your Digital PresenceCyber Security Services Unveiled: Strategies to Secure Your Digital Presence
Cyber Security Services Unveiled: Strategies to Secure Your Digital Presence
 
iThome_CYBERSEC2024_Drive_Into_the_DarkWeb
iThome_CYBERSEC2024_Drive_Into_the_DarkWebiThome_CYBERSEC2024_Drive_Into_the_DarkWeb
iThome_CYBERSEC2024_Drive_Into_the_DarkWeb
 
audience research (emma) 1.pptxkkkkkkkkkkkkkkkkk
audience research (emma) 1.pptxkkkkkkkkkkkkkkkkkaudience research (emma) 1.pptxkkkkkkkkkkkkkkkkk
audience research (emma) 1.pptxkkkkkkkkkkkkkkkkk
 

Featured

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

How to use Python to automate a response if members of a Link-Aggregation failed

  • 1. CUSTOMIZING NETWORK LINK AGGREGATION USING PYTHON SCRIPTS IN OMNISWITCH APPLICATION NOTE
  • 2. Customizing network link aggregation using Python scripts in OmniSwitch ALCATEL-LUCENT ENTERPRISE 2 INTRODUCTION Today’s enterprise networks provide mission-critical resources for employees, customers and business partners. Networks must be flexible, and the network operations staff must be able to trust that network issues are resolved quickly to minimize business impact. Alcatel-Lucent OmniSwitch® products can respond to network events quickly using the Event Manager of the Alcatel-Lucent Operating System (AOS) and its embedded Python® scripting feature. Specific network events can trigger Python scripts to provide fast, real-time, software- defined responses tailored to the requirements of the enterprise. For example, the customers can set up different responses for link failures depending on the location and type of a link. This application note demonstrates a combination of OmniSwitch features, including the AOS Event Manager and Python scripting, to provide a software-defined response failure of individual links in a link aggregation group. The software-defined result is customized to match the customer’s network policy needs, following the industry-standard link aggregation protocols. Another note describes how the AOS Event Manager and Python scripting can be used to extend policy-based routing. SOFTWARE-DEFINED RESPONSE TO A PARTIAL FAILURE OF A LINK AGGREGATION GROUP Enterprise networks frequently use multiple link aggregation groups to provide higher bandwidth and increased network resiliency. The AOS Event Manager and Python scripting can provide software-defined responses when a link failure occurs. LAG A AOS Python scripting provides software- defined response to link failure OS A Enterprise network OS B LAG B
  • 3. Customizing network link aggregation using Python scripts in OmniSwitch ALCATEL-LUCENT ENTERPRISE 3 The Enterprise network shown above uses two OmniSwitch units, OS A and OS B, and two link aggregation groups, LAG A and LAG B, to provide redundant access to a major router. There are four ports in each LAG identified as ports A1 through A4 and B1 through B4. In this example, the customer has designed the network so that either LAG can provide sufficient bandwidth for all traffic and only one LAG is active at any time. The customer policy is to consider a LAG failed when half of the links in that LAG have failed. The customer is concerned about partial failures where several links in a LAG fail, but at least one link remains operational. In that case, the traffic capacity is significantly reduced, but industry-standard link aggregation protocols do not automatically consider the LAG as failed. The following solution implements a custom policy using the AOS Event Manager and Python scripting, along with AOS Web Services RESTful remote command execution. The OmniSwitch Event Manager executes a custom Python script in OS A whenever a link fails. The Python script checks the number of remaining links in the LAG A group against a pre-defined limit and disables the entire LAG if the number of remaining links falls below the limit. The second LAG is then enabled remotely by OS A on OS B using the AOS RESTful API. All traffic then flows through the LAG B. This avoids operating the network with a partially-failed LAG and meets the goals set by the customer policy. EXAMPLE This example demonstrates the AOS Event Manager and Python scripting. The Event Manager is configured with event-action commands that execute the script linkagg_script.py when the snmp linkDown trap occurs. ! Trap Manager: snmp-trap absorption disable event-action trap linkDown script /flash/python/linkagg_script.py AOS passes the trap type and other parameters to the script when a linkDown trap occurs. The script then checks the parameters trap and data[ifIndex] to determine what happened.
  • 4. enterprise.alcatel-lucent.com Alcatel-Lucent and the Alcatel-Lucent Enterprise logo are trademarks of Alcatel-Lucent. To view Alcatel-Lucent Enterprise trademarks visit: enterprise.alcatel-lucent.com/trademarks. All other trademarks are the property of their respective owners. The information presented is subject to change without notice. Alcatel-Lucent Enterprise assumes no responsibility for inaccuracies contained herein. Copyright © 2015 Alcatel-Lucent Enterprise. All Rights Reserved. 201502170004EN (March) Pseudocode for linkagg_script.py If (SNMP trap is linkDown) If (the port is a member of LAG 1) Set value = the number of operational ports remaining in LAG 1 If (number of remaining ports is below the customer’s threshold) Execute local AOS command to Disable LAG 1 on OmniSwitch A Execute remote AOS command to Enable LAG 2 on OmniSwitch B Send email message to network manager’s phone Else Log the port failed and the number of remaining ports Else linkDown event is not on a member of LAG 1. Ignore it. CONCLUSION The AOS Event Manager and Python scripting provide a fast, flexible, software-defined response to network events. The response supports and enforces network policies defined by the networking staff. Responses can include enabling or disabling links or changing network priorities. It can also include gathering information to document the failure and notifying network staff by e-mail. REFERENCES See “OmniSwitch AOS XXX Switch Management Guide”, chapter “Web Services, CLI Scripting, and OpenFlow”. The document is located at http://enterprise.alcatel-lucent. com/UserGuides. This application note applies to AOS release 7.3.4 or later.