Yasser Auda - Introduction To SDN
Yasser Auda - Introduction To SDN
And the question here, can we have a similar concept with network devices such as routers ,
layer 2 switches and multilayer switches ….etc.
Answer is yes by using SDN (Software Defined Networking) which mean the concept of software
(programmatic) control of the network, rather than the more static configuration-controlled
networking. The term network programmability itself refers to more focus on software control
of the network
And to do so we will use SDN controller, which is a software will let us control how routers and
switches work in all possible different situations and this will be done according to our instant
needs which make network devices configuration a dynamic & rapid process.
1
Introduction to SDN CCIE & CCSI: Yasser Ramzy Auda
To fully understand how SDN controller will work for us, we need to understand how Network
devices such as routers and switches works by divide their jobs to three different layers or
planes.
2
Introduction to SDN CCIE & CCSI: Yasser Ramzy Auda
Note: when it comes to switches , LAN switches needed a faster data plane than a generalized
CPU could process in software so switches have always had specialized hardware to perform
data plane processing.
The switching logic occurs not in the CPU with software, but in an application-specific integrated
circuit (ASIC). An ASIC is a chip built for specific purposes, such as for message processing in a
networking device.
The ASIC needs to perform table lookup in the MAC address table, so for fast table lookup, the
switch uses a specialized type of memory to store the equivalent of the MAC address table:
ternary content-addressable memory (TCAM).
So to simply summarize SDN Architecture we can say that the networking devices still exist,
and still forward data, but the control plane functions and location can change dramatically.
SDN Controller will take all or parts of control plane from network devices and do it by itself in
centralized fashion then tell network devices what to do.
A controller does much of the work needed for the control plane in a centralized control model.
So Simply
• SDN controller will make network more smart and can take decisions for them and
deploy many network devices automatically
• SDN controller can handle many vendor with standard language
• SDN controller push changes and can rollback if need it to network devices (aka agents)
• SDN controller is real time situational awareness , for example can detect congestions
• SDN controller comes in physical or virtual with GUI or CLI or both to access it
• SDN controller main goal is manage the flow of packets on the network
Flow: is communication between device and another device such as router
SDN flow: can send configuration to network device and let it do something else with the flow
3
Introduction to SDN CCIE & CCSI: Yasser Ramzy Auda
4
Introduction to SDN CCIE & CCSI: Yasser Ramzy Auda
Remember, SDN is middle man between management interface and network device
SDN controllers have northbound interface NBI and southbound interface SBI
Northbound up to management plane (interface connect to admin)
Southbound down to data plane (interface control traffic)
Most SDN solutions have their own user interface (northbound API) such as , openstack ,
VMware vSphere web client .
And Southbound API such as OpenFlow (standard) or onePK API (cisco proprietary)
Remember, the word “interface” when we talking about SBI, NBI, and API is refers to software
interfaces
Application programming interface API : is a method for one application (program) to exchange
data with another application. Rearranging the words to describe the idea, an API is an interface
to an application program.
5
Introduction to SDN CCIE & CCSI: Yasser Ramzy Auda
SBI: It is an interface between a program (the controller) and a program (on the networking
device) that lets the two programs communicate.
SBI examples:
OpenFlow (from the ONF; https://www.opennetworking.org)
OpFlex (from Cisco; used with ACI)
CLI (Telnet/SSH) and SNMP (from Cisco; used with APIC-EM)
NBI: opens the controller so its data and functions can be used by other programs, enabling
network programmability, with much quicker development. Programs can pull information from
the controller, using the controller’s APIs. The NBIs also enable programs to use the controller’s
abilities to program flows into the devices using the controller’s SBIs.
NBI examples:
REST API
OpenStack
The API Virtual Private Cloud VPC
REST (Representational State Transfer): describes a type of API that allows applications to sit on
different hosts, using HTTP messages to transfer data over the API.
OpenStack: is a cloud operating system that controls large pools of compute, storage, and
networking resources throughout a datacenter, all managed through a dashboard that gives
administrators control while empowering their users to provision resources through a web
interface. https://www.openstack.org/software/
onePK: is an element within Cisco's software defined networking (SDN) strategy. onePK is an
easy-to-use toolkit for development, automation, rapid service creation, and more.
OpenFlow
Is an open interface for remotely controlling the forwarding tables in network switches, routers,
and access points.
When we use OpenFlow we can call the SDN controller a “OpenFlow Controller” and call the
switch support it a “OpenFlow Switch”.
OpenFlow is implemented on top of TLS which providing s secure OpenFlow Channel.
Why OpenFlow?
Within each proprietary switch is data plane and a control plane and there is huge different
between the control planes of switches from different vendors , vendors will never expose their
control plane or support anything will expose it , this make it not easy to be programmable .
To solve this issue we used openflow it is open source control protocol that all the vendors
support.
API can be placed in vendor switch enabling it to be programmed without exposing the vendor
switch code
6
Introduction to SDN CCIE & CCSI: Yasser Ramzy Auda
An OpenFlow switch consists of a flow table, which performs packet lookup and forwarding.
Each flow table in the switch holds a set of flow entries that consists of:
1. Header fields or match fields, with information found in packet header, ingress port, and
metadata, used to match incoming packets.
2. Counters, used to collect statistics for the particular flow, such as number of received packets,
number of bytes, and duration of the flow.
3. A set of instructions or actions to be applied after a match that dictates how to handle
matching packets. For instance, the action might be to forward a packet out to a specified port.
Pure OpenFlow switches only support the Required Actions, while hybrid OpenFlow switches
may also support the NORMAL action. Either type of switches can also support the FLOOD
action.
The Required Actions are:
• Forward
• Drop
• Enqueue
• Modify field
The OpenFlow protocol defines three message types, each with multiple subtypes:
• Controller-to-switch • Symmetric • Asynchronous
For OpenFlow Controllers we can see few examples in the market such as Floodlight
, NOX and POX
NOX (www.noxrepo.org) was the first OpenFlow controller written in C++ and provides API for
Python too but New NOX only supports C++.
POX is Python-only version of NOX. It can be considered as a general, open source OpenFlow
controller written in Python, and a platform for rapid development and prototyping of network
applications.
7
Introduction to SDN CCIE & CCSI: Yasser Ramzy Auda
8
Introduction to SDN CCIE & CCSI: Yasser Ramzy Auda
Note: Cisco does support the OpenFlow and ONF model of OpenFlow , many Cisco products are
supporting OpenFlow such as some models of Cisco Nexus switches, plus some Cisco ASR series
routers and many other cisco routers and switches supporting OpenFlow.
But Cisco does not appear to be setting about to migrate its entire product line to support
OpenFlow
9
Introduction to SDN CCIE & CCSI: Yasser Ramzy Auda
ACI uses a partially centralized control plane, RESTful and native APIs, and OpFlex as an
SBI. The NBIs allow software control from outside the controller. The controller
communicates with the switches connected to the endpoints, and asks those switches
to then create the correct flows to be added to the switches. Interestingly.
Ecosystem
APIC handles the interaction with other solutions besides Nexus 9000 switches, which include
Cisco Adaptive Security Appliances (ASA) firewalls, Cisco Application Virtual Switch (AVS), VM
managers such as VMware vCenter, Microsoft System Center Virtual Machine Manager
(SCVMM), application delivery controllers from companies such as F5 and Citrix, and cloud
orchestration systems such as OpenStack.
10
Introduction to SDN CCIE & CCSI: Yasser Ramzy Auda
In Open SDN solution we centralize most of the control plane and switches must support
OpenFlow.
In Cisco ACI solution we centralizes much but not all of the control plane, leaving some of the
control plane in the switches and switches must support ACI (normally only newer models of
switches with software that supports ACI).
As you can see Neither the Open SDN model nor the Cisco ACI model uses Traditional switches
and routers.
So Cisco made this third SDN solution, APIC Enterprise Module (APIC-EM) which deal with
traditional switches and routers
The Cisco Application Policy Infrastructure Controller - Enterprise Module (APIC-EM) is Cisco's
SDN Controller for Enterprise Networks (Access, Campus, WAN and Wireless).
To help with network programmability, the solution uses a centralized controller. At the same
time, it attempts to support much of the more recent generations of Cisco enterprise routers
and switches by using SBIs
11
Introduction to SDN CCIE & CCSI: Yasser Ramzy Auda
The Cisco APIC-EM platform supports both wired and wireless enterprise networks across the
Campus, Branch and WAN infrastructures. It offers the following benefits:
• Creates an intelligent, open, programmable network with open APIs
• Saves time, resources, and costs through advanced automation
• Transforms business intent policies into a dynamic network configuration
• Provides a single point for network wide automation and control
Feature Description
Network Information The Cisco APIC-EM periodically scans the
Database (NIDB) network to create a “single source of truth” for IT.
This inventory includes all network devices, along
with an abstraction for the entire enterprise
network.
Network topology The Cisco APIC-EM automatically discovers and
visualization maps network devices to a physical topology with
detailed device-level data. You can use this
interactive feature to troubleshoot your network.
EasyQoS The EasyQoS feature enables you to configure
quality of service on the devices in your network
that have been discovered by the Cisco APIC-EM.
12
Introduction to SDN CCIE & CCSI: Yasser Ramzy Auda
Feature Description
links.
Public Key Infrastructure The Cisco APIC-EM provides an integrated PKI
(PKI) server service that acts as Certificate Authority (CA) to
automate X.509 SSL certificate lifecycle
management. Applications, such as IWAN and
PnP, use the capabilities of the imbedded PKI
service for automatic SSL certificate management.
Path Trace application The path trace application helps to solve network
problems by automating the inspection and
interrogation of the flow taken by a business
application in the network.
High Availability (HA) HA is provided in N+ 1 redundancy mode with full
data persistence for HA and Scale. All the nodes
work in Active-Active mode for optimal
performance and load sharing.
Back Up and Restore The Cisco APIC-EM supports complete back up
and restore of the entire database from the
controller GUI.
APIC-EM Apps
APIC-EM comes with many apps inside it and we can use it to test and manage our network ,
some of these apps are free to use and called “Basic apps” and some of the apps need a to
purchase a license from Cisco so we can use it and called “ Solution apps” .
Also remember APIC-EM itself is free to download from Cisco.
13
Introduction to SDN CCIE & CCSI: Yasser Ramzy Auda
The ACL Analysis app will examines the chosen path as determined by the Path Trace tool
(hence the dependency), but it looks for any enabled ACLs.
The ACL Analysis tool analyzes and then characterizes (with notes overlaid on the screen) what
packets sent from source to destination would be filtered as it travelled along that path.
14
Introduction to SDN CCIE & CCSI: Yasser Ramzy Auda
APIC-EM Resources:
https://www.youtube.com/watch?v=DjHa1BoYx70
http://www.cisco.com/c/en/us/td/docs/cloud-systems-management/application-policy-
infrastructure-controller-enterprise-module/1-1-x/config-guide/b_apic-
em_config_guide_v_1-1-x.html
http://www.cisco.com/c/m/en_us/training-events/events-webinars/apic-em.html
http://www.cisco.com/c/en/us/products/cloud-systems-management/application-policy-
infrastructure-controller-enterprise-module/iwan-application-for-apic-em.html
you will need to install the file as browser extension then reload the page choose where in
your computer you want to download the files then click download:
https://developer.cisco.com/site/apic-em/
15
Introduction to SDN CCIE & CCSI: Yasser Ramzy Auda
I will try to explain four scenarios here as example for what threats could target our SDN
environment
16
Introduction to SDN CCIE & CCSI: Yasser Ramzy Auda
17
Introduction to SDN CCIE & CCSI: Yasser Ramzy Auda
Attack Scenario 3
Attacker hack the admin PC used to admin SDN Controller , through the NBI he go inside the
SDN Controller and let it ask all managed device to use specific path to route traffic which
maybe just a null network or even attacker network segment.
Attack Scenario 4
In this scenario lets imagine attacker can exploit any vulnerability found in SDN controller
software, SBI/NBI protocols or API’s
Countermeasures
To protect our self we should think first about SDN solution components, it is the SDN
controllers , the Managed devices , applications & APIs .
Also lets not forget securing access and communications between all of them, in another words
we should think about how to secure data when it is in transit, in rest and in process.
I will go through each one of them and mentions the security features and techniques that help
you to secure each part of them.
18
Introduction to SDN CCIE & CCSI: Yasser Ramzy Auda
Secure access: SSH/HTTPS , keep system update and patch , disable unnecessary protocols or
services ports . AAA with RBAC , enable host based firewall
Secure operation : keep device OS up-to-date , centralize log collection and monitoring ,
configuration management )
Secure control plane: CoPP , FHRP sec , CPPr , ICMP redirects , ICMP unreachable , Proxy ARP ,
securing routing protocols using authentication and route filter
Secure data plane: DAI , ip source guard , port security , uRPF , infra ACL , Anti spoofing ACL ,
disable IP source routing , PVLAN
Secure network services : use QoS , disable unused ports , firewall protection
Secure applications/APIs:
secure coding practice , digital signing of code , code integrity checks , secure development
lifecycle , threat modeling , understand and prioritizing risk , preform threat , mitigation test
include performance negative test , preform static code analysis such as buffer overflow &
resources leaks & null pointers
19
Introduction to SDN CCIE & CCSI: Yasser Ramzy Auda
Q&A
During my writing to this document I asked my Facebook followers to ask questions about SDN
and I promised to answer it here, this will make this document more interactive and contain all
possible information you concern about.
Network Function Virtualization is any Router, Switch, Antivirus , Firewall , IPS …etc. Which run
as Virtual Machine VM (Not Physical Machine)
NFV controller can create new switch or routers and will generate them for you as VM’s
such as vSwitch or vFirewall...etc.
You can controller them using NFV controller or even by SDN controller
Many vendors now provide virtual version of their products, that's why we need NFV.
Nexus 1000v instead of catalyst switch
Virtual f5 load balancer instead of physical appliance
Juniper vRouter
Symantec antivirus
McAfee IPS
Cisco NGIPSv FirePOWER
NFV controller tell hypervisor manager to create switch or router , then VM’s
application such as vSphere web client will let us connect to them .
NVF controller can run Virtual Firewall for us too , or we can create Virtual load
balancer/IDS/IPS
Also we can create antivirus so we will have antivirus appliance VM which can scan all
other VM’s AV controller aka antivirus controller (in this case its NFV controller itself )
will push antivirus definitions updates to the appliance
20
Introduction to SDN CCIE & CCSI: Yasser Ramzy Auda
When I read about SDN I keep seeing the term “DevOps”, what is DevOps?
Actually SDN is one of many reasons lead us to start using this term .
DevOps means developers will work with operations , so both teams share work with new apps
then developers team write the code and operations deploy the code
Since Now day’s developers and operations should act in same department without any barriers
So it is emphasizes the collaboration and communication of both software developers and other
information-technology (IT) professionals
Example:
Developers create SDN solution or just simple Networking application
Operations represented by Network administrators will implement and use this application
Feedback here in both direction and without delay since both working together in same
department or Business Unit .
https://learningnetwork.cisco.com/community/certifications/network-programmability
What is the most related programming language should one know about SDN?
According to Cisco recommended you need to learn one of these programming languages:
Python, C or Java
And I can’t tell which one is better to study since each one has its own pros & cons , for instance
Java applications are typically compiled to bytecode that can run on any Java virtual machine
(JVM) regardless of computer architecture.
While C language is one of the most powerful programming languages but very hard to learn
Same time Python is easy to learn but not using Bytecode.
Let’s take an example for how programming languages cannot be predictable in all times ,
OpenFlow interface has proven to be complex, so researchers are developing network
programming languages, such as Frenetic and Pyretic that will simplify OpenFlow SDN
programming, guess what, Pyretic is based on Python.
21
Introduction to SDN CCIE & CCSI: Yasser Ramzy Auda
I would like to add here a comment of one of my FB friends Mr. Terry Vinson and one of the
authors of Cisco Press CCIEv5 Study Guide , when he answered a similar question on my FB wall.
“I keep getting asked, "is SDN the CCIE killer?!?" My answer is always the same. This abstracted
layer of functionality (Compute, Network & Storage) resides on actual devices. Physical devices
that need to be engineered, upgraded, optimized and maintained. OSPF is not going away. BGP
is not going to be rendered moot by SDN/NV. In fact if you pop the hood on ACI/9K you will find
that every spine is a MP-iBGP Route Reflector where no leaf is more than two hops away from
another (in the typical scenario). So NO I do not think SDN is a CCIE killer. It will simply be
another tool we have in our tool chest to build the most dynamic, scalable and elastic networks
in the industry today. “
Does u see that learning some software programming is a must to be SDN Specialist later on?
As some vendors started to have SDN products managed via GUI .
First of all SDN products now days managed via GUI , my answer will be Yes and NO
No if you just want to be an ordinary network engineer, you will master the SDN controller , how
using controller GUI and that is it.
Yes if you want to be special and more expert since A new job type is being created by the SDN
transition: the network programmer. This is a person who will need to have a wide and deep
knowledge of network engineering, as well as a deep knowledge of at least one powerful C-like
programming language (C, C++, C#, Java, Objective-C). This role will be responsible for the actual
programming of SDN controllers (the interface) and related components.
If you looking for my strong advice, go and learn Programming whatever it is Java, C or python
it will help you even to understand other Cisco products for instance when i am teaching Cisco
FirePOWER and when it comes to Correlation policy the logic behind how it is working is
completely based on IF/THEN programming statement ,Which is the most basic of all the control
flow statements.
if you are studying Cisco ISE which is based on policies apply AAA,802.1X ...etc. concepts and can
tie all these with directory services such as Microsoft AD or any external LDAP database where
we can classify users and hosts (same happens with FirePOWER)
If you play with ISE GUI you will find that the programming IF/THEN aspect shown clearly in ISE
GUI where we have Conditions represent the [IF] and could be simple or complex (more than
one Condition tied with AND/OR Boolean operations) and when these Conditions happens we
specify a Results represent the [THEN] and send these results to routers , switches , wireless LAN
controllers or firewalls to implement enforcement using APIs such as REST (HTTPS) API.
22
Introduction to SDN CCIE & CCSI: Yasser Ramzy Auda
SDN is working in same concept but instead of working with identity management such as ISE ,
SDN work in Routing management and IGP/EGP/QoS control policies and more by using
centralizing model and separates the control plan and data plan.
Imagine using SDN controllers inside MPLS SP core networks and how this will decrease the
number of control planes and reduce the number of interaction of routing protocols required to
create forwarding states
During reading this document you should figure out that SDN has less scale limitation, there are
many SDN solutions for Data Centers , for Traditional R&S networks and so on.
Yes we have some limitation with which network devices support OpenFlow but it looks like all
vendors now days trying to support it on their new network devices models.
23
Introduction to SDN CCIE & CCSI: Yasser Ramzy Auda
We should also keep in mind that scale limitation is decreased dynamically in SDN world , for
instance following diagram shows how scalability limitation is decreased rapidly and in monthly
basis with APIC-EM
24
Introduction to SDN CCIE & CCSI: Yasser Ramzy Auda
What SDN and OpenFlow software switches available to use & practice with?
There are currently several OpenFlow software switches available that can be used such as :
Open vSwitch
Indigo
Pantou (OpenWRT)
25
Introduction to SDN CCIE & CCSI: Yasser Ramzy Auda
Pantou(OpenWrt)
Pantou turns a commercial wireless router/access point to an OpenFlow-enabled
switch.
OpenFlow is implemented as an application on top of OpenWrt.
OpenWrt is an operating system primarily used on embedded devices to route network
traffic.
Indigo
Indigo is an open source OpenFlow implementation that runs on physical switches and
uses the hardware features of application specific integrated circuits (ASICs) of Ethernet
switches to run OpenFlow at line rates.
It is based on the OpenFlow Reference Implementation from Stanford and currently
implements all required features of the OpenFlow 1.0 standard.
For Controllers
we had POX, and OpenDaylight and OpenFlow controllers.
we also have some others like:
-Beacon Java-based controller
-Floodlight Open SDN Controller is an enterprise-class, Apache-licensed, Java-based
OpenFlow Controller.
Can I simulate a network with SDN controllers and SDN enabled network devices (agents)?
Yes you can by using tools such as Mininet.
•Mininet is a software tool, which allows an entire OpenFlow network to be emulated on a
single computer.
• Mininet creates a network of virtual hosts, switches, controllers, and links.
• Mininet hosts run standard Linux network software, and its switches support OpenFlow.
•It is easy to install and is available as a pre-packaged Linux virtual machine (VM) image that
runs on VMware or VirtualBox , download for free from : http://mininet.org/
Mininet GUI
26
Introduction to SDN CCIE & CCSI: Yasser Ramzy Auda
Orchestration can be defined as the use of the automation to provide services through the use
of applications that drive the network.
As an example, orchestration is application that can take an request from a customer via web
portal for new virtual server requiring provisioning. This ideal app will analyses the network
configuration and implement the configuration change for the customer and then update the
billing system. The network itself might implement in the physical network, in a virtual overlay
on hypervisors, across the WAN via encrypted tunnel or one of many other options. The
connectivity is far less important than the orchestrated service establishment across many
devices and platforms.
What is the difference between network orchestration (OpenStack) and SDN control
(OpenDaylight)?
OpenStack can be considered to be not one project but several, consisting of compute, storage
and networking. All three platform components are managed by a dashboard Web application.
Combined, they can provide a complete cloud network operating system.
Conversely, OpenDaylight is an SDN controller but with a number of northbound APIs that allow
interaction with network application and orchestration services, such as OpenStack Neutron,
and southbound APIs, such as OpenFlow, NETCONF and BGP. One goal of the project is to
extend the services available and provide a de facto set of service APIs.
The projects are compatible, and OpenDaylight can be integrated with OpenStack using an
OpenStack via Neutron plugin. This moves the complexity up the stack from OpenStack to
OpenDaylight, completing the SDN picture.
27
Introduction to SDN CCIE & CCSI: Yasser Ramzy Auda
• Citrix
• F5
• HP
• Microsoft
• Radware
• VMware
This list dynamically increased weekly , keep looking in some URL’s like:
https://www.sdxcentral.com/sdn/definitions/sdn-controllers/sdn-controllers-comprehensive-
list/
https://www.opennetworking.org/
28
Introduction to SDN CCIE & CCSI: Yasser Ramzy Auda
Beyond Network Infra Devices vendors such as Cisco, can we see SDN in Systems vendors such
as Microsoft?
Yes , for sure , Microsoft just Turned their new Windows server 2016 to SDDC solution with
many features supporting the concept of Software defined datacenter , for instance they just
add server role called "Network Controller" which provides a centralized, programmable point
of automation to manage, configure, monitor, and troubleshoot both virtual and physical
network infrastructure in your datacenter.
Network Controller is a highly available and scalable server role with SBI & NBI API (for NBI they
use REST API).
you can use Network Controller to manage the following physical and virtual network
infrastructure:
Hyper-V VMs and virtual switches
Physical network switches
Physical network routers
Firewall software
VPN Gateways, including Routing and Remote Access Service (RRAS) Multitenant
Gateways
Load Balancers
More details:
https://technet.microsoft.com/en-us/library/dn859240(v=ws.11).aspx
29
Introduction to SDN CCIE & CCSI: Yasser Ramzy Auda
Resources:
Cisco Application Centric Infrastructure Fundamentals
http://www.cisco.com/c/en/us/td/docs/switches/datacenter/aci/apic/sw/1-x/aci-
fundamentals/b_ACI-Fundamentals.html
SDN Overview
http://www.cisco.com/c/en/us/solutions/software-defined-networking/overview.html
OpenFlow Tutorial
http://archive.openflow.org/wk/index.php/OpenFlow_Tutorial
Books:
Foundations of Modern Networking: SDN, NFV, QoE, IoT, and Cloud
https://www.amazon.com/Foundations-Modern-Networking-SDN-Cloud/dp/0134175395
SDN and NFV Simplified: A Visual Guide to Understanding Software Defined Networks and
Network Function Virtualization
https://www.amazon.com/SDN-NFV-Simplified-Understanding-Virtualization/dp/0134306406
30
Introduction to SDN CCIE & CCSI: Yasser Ramzy Auda
OpenFlow Cookbook
https://www.amazon.com/OpenFlow-Cookbook-Kingston-Smiler-
S/dp/1783987944/ref=sr_1_1?s=books&ie=UTF8&qid=1468503276&sr=1-
1&keywords=OpenFlow
Videos:
Security for Software Defined Networks—Networking Talks
http://www.pearsonitcertification.com/store/security-for-software-defined-networks-
networking-talks-9780789753519
SDN and OpenFlow Overview - Open, API and Overlay based SDN (Free video)
https://www.youtube.com/watch?v=l-DcbQhFAQs
Good Luck
CCIE & CCSI: Yasser Auda
https://www.facebook.com/YasserRamzyAuda
https://learningnetwork.cisco.com/people/yasserramzy
https://www.youtube.com/user/yasserramzyauda
31