Anda di halaman 1dari 17

SOFTWARE DEFINED NETWORKING:

PYTHON PROGRAMMABILITY AND EVENT MANAGER


December, 2015

COPYRIGHT 2014 ALCATEL-LUCENT. ALL RIGHTS RESERVED.


ALCATEL-LUCENT INTERNAL PROPRIETARY USE PURSUANT TO COMPANY INSTRUCTION

AGENDA
1. Python Programmability and Event Manager Intro
2. Scenario and Demo
3. Key Takeaways

3
COPYRIGHT 2012 ALCATEL-LUCENT ENTERPRISE. ALL RIGHTS RESERVED.

WHAT ARE WE GOING TO TALK ABOUT?


NEW FEATURES IN AOS 7.3.4
DESCRIPTION
Event-Action

Triggers execution of a python program when the specified trap occurs

Python
Interpreter

Enables execution of Python programs

RESTful API
(Since 7.3.2)

Web Services management interface to access the MIB as well as CLI in JSON
or XML formats.

SOFTWARE-DEFINED RESPONSE TO NETWORK EVENTS


4

COPYRIGHT 2014 ALCATEL-LUCENT. ALL RIGHTS RESERVED.


ALCATEL-LUCENT INTERNAL PROPRIETARY USE PURSUANT TO COMPANY INSTRUCTION

INTERNAL PYTHON
Internal Python program under AOS on the OmniSwitch
Three ways to execute Python
Automatically, as an AOS event-action when a TRAP occurs
Interactively, from the AOS console
In a file executed by command from the AOS console

AOS Python includes standard Python 3 packages for OS access and issuing AOS commands

AOS 7.3.4
Python script running on
OmniSwitch

Customer-written
Python program
Python 3 interpreter
and standard Python
packages are built into
AOS

5
COPYRIGHT 2014 ALCATEL-LUCENT. ALL RIGHTS RESERVED.
ALCATEL-LUCENT INTERNAL PROPRIETARY USE PURSUANT TO COMPANY INSTRUCTION

EXTERNAL PYTHON
THROUGH RESTFUL API
External Python scripts run on a PC external to the OmniSwitch
Requires python2 or python3 interpreter on PC/Linux/Mac. Easy to install from python.org.
Python script on PC connects to AOS using HTTP/HTTPS and the AOS RESTful APIs.
Sample Python code and libraries are available to demonstrate access to MIB variables in one or more
AOS 7.3.4 switches.
Sample library returns results in an easy-to-handle Python dictionary object
Customer-written
Python program

Python script
running on
PC/Linux/Mac

AOS 7.3.4
MIB variables accessible
via Web Services

Sample AOS
REST library
Python 2 or Python
3 interpreter/PyPi
packages

Web Services via HTTP/HTTPS

6
COPYRIGHT 2014 ALCATEL-LUCENT. ALL RIGHTS RESERVED.
ALCATEL-LUCENT INTERNAL PROPRIETARY USE PURSUANT TO COMPANY INSTRUCTION

INTERNAL + EXTERNAL
Combine internal python scripts with external RESTful API
A python script can execute on the local switch and on the remote switch through the
RESTful API
Can execute interactively from console, from a file or when a TRAP occurs.

Customer-written
Python program
Python 3 interpreter
and standard Python
packages are built into
AOS

Sample AOS
REST library

AOS 7.3.4
Python script running on
OmniSwitch (Client)

RESTFul API (Server)

Web Services via


HTTP/HTTPS

Web Services via


HTTP/HTTPS

7
COPYRIGHT 2014 ALCATEL-LUCENT. ALL RIGHTS RESERVED.
ALCATEL-LUCENT INTERNAL PROPRIETARY USE PURSUANT TO COMPANY INSTRUCTION

RESTFul API (Server)

AOS 7.3.4
Python script running on
OmniSwitch (Client)

Customer-written
Python program
Python 3 interpreter
and standard Python
packages are built into
AOS

Sample AOS
REST library

SCENARIO AND DEMO

DEMO SCENARIO
The Microwave link provides high bandwidth
at low cost however is susceptible to fading
etc in bad weather.
The Telco link provides moderate bandwidth
and high quality but the cost is high.
In normal circumstances, Internet traffic will
use the Microwave link whilst Corporate
traffic including VOIP will use the Telco link.
But when the quality of the Microwave link
degrades, a Python App will divert Internet
traffic to the Telco link and set a 1Mbps
bandwidth cap.
Internet traffic will automatically revert to
using the Microwave link when the quality
becomes acceptable.

Central Site

Remote Site
Corporate Traffic
Internet Traffic

9
COPYRIGHT 2014 ALCATEL-LUCENT. ALL RIGHTS RESERVED.
ALCATEL-LUCENT INTERNAL PROPRIETARY USE PURSUANT TO COMPANY INSTRUCTION

ACTUAL SETUP

HT
TP
S

10.244.1.201

Remote
Lo0 192.168.10.1
Site
EMP (10.244.1.2)
P
RD

6900-T20

RD
P

192.168.30.1

192.168.20.1

dmz33-rdpgw.al-mydemo.com
10.244.1.0/24

Microwave
Link

Telco
Link
192.168.20.2
1

Central
Site

6400
Lo0 192.168.40.1

192.168.30.2
2

Port 10, VLAN 1244


(10.244.1.3)

10
COPYRIGHT 2014 ALCATEL-LUCENT. ALL RIGHTS RESERVED.
ALCATEL-LUCENT INTERNAL PROPRIETARY USE PURSUANT TO COMPANY INSTRUCTION

DEMO SCENARIO
CONFIGURATION
Measuring Link Quality with SAA IP Ping (100 pings every minute)
! SAA:
saa "linktest" interval 1
saa "linktest" type ip-ping destination-ip 192.168.30.2 source-ip 192.168.30.1 type-of-service 5 inter-pkt-delay 100 num-pkts 100
saa "linktest" start

Triggering Python Application after test is completed


! Trap Manager:
snmp-trap absorption disable
event-action trap alaSaaIPIterationCompleteTrap script /flash/python/linkquality.py

QOS Policies
! QOS:
policy condition Internet destination ip 192.168.40.1 #This IP address represents an Internet IP address
policy action UseTelcoLinkAndRateLimit maximum bandwidth 1.00M permanent gateway-ip 192.168.20.2
policy action UseMicrowaveLink permanent gateway-ip 192.168.30.2
policy rule InternetViaMicrowave condition Internet action UseMicrowaveLink
policy rule InternetViaTelco disable condition Internet action UseTelcoLinkAndRateLimit #This rule is normally disabled
qos apply
11
COPYRIGHT 2014 ALCATEL-LUCENT. ALL RIGHTS RESERVED.
ALCATEL-LUCENT INTERNAL PROPRIETARY USE PURSUANT TO COMPANY INSTRUCTION

DEMO SCENARIO
PYTHON LOGIC

> 10 %

Microwave
Link in
Use?

Yes

Disable InternetViaMicrowave rule


Enable InternetViaTelco rule

No

Packet
Loss

5 % to 10 % (hysteresis to avoid toggling)

Do nothing and exit

linkquality.py

Yes
<5%

No

Microwave
Link in
Use?

Disable InternetViaTelco rule


Enable InternetViaMicrowave rule

12
COPYRIGHT 2014 ALCATEL-LUCENT. ALL RIGHTS RESERVED.
ALCATEL-LUCENT INTERNAL PROPRIETARY USE PURSUANT TO COMPANY INSTRUCTION

KEY TAKEAWAYS

PYTHON PROGRAMMABILITY AND EVENT MANAGER


KEY TAKEAWAYS

Embedded software-defined response to network events


Minimize disruption with nearly real-time reaction
No dependence on NMS or SDN controller availability or
reachability
Infinite possibilities

14
COPYRIGHT 2014 ALCATEL-LUCENT. ALL RIGHTS RESERVED.
ALCATEL-LUCENT INTERNAL PROPRIETARY USE PURSUANT TO COMPANY INSTRUCTION

15
COPYRIGHT 2014 ALCATEL-LUCENT. ALL RIGHTS RESERVED.
ALCATEL-LUCENT INTERNAL PROPRIETARY USE PURSUANT TO COMPANY INSTRUCTION

Follow us on:

Twitter.com/ALUEnterprise
Facebook.com/ALUEnterprise
Youtube.com/user/enterpriseALU
Linkedin.com Group: Alcatel-Lucent Enterprise
Slideshare.net/tagged/Enterprise
Storify.com/ALUEnterprise

16
COPYRIGHT 2014 ALCATEL-LUCENT. ALL RIGHTS RESERVED.
ALCATEL-LUCENT INTERNAL PROPRIETARY USE PURSUANT TO COMPANY INSTRUCTION

enterprise.alcatel-lucent.com

Anda mungkin juga menyukai