Showing posts with label SDN. Show all posts
Showing posts with label SDN. Show all posts

Sunday, May 24, 2020

What is data model - Yang ?

Data model provides the definition of any "anything" which can be easily understood and agreed upon. Using the generic data model, you can describe an individual in a way that is easy for others to understand.

Whatever the communication is done by using the API's are actually encoding in some data format and most of them uses the data model underneath. This is what we will be discussing in this post. Let's see how this can be understood by creating data model of car:
       
Module CAR
OEM: Ford, Volkswagen, Maruti
Engine: Diesel, Pertol
Color: Blue, Green,Black
Type: Sedan, Hatchback


Which language is used to define data models?
YANG is not name of any person but YANG (Yet Another Next Generation) is a data modelling language uses YANG language to write YANG models, providing a standardized way to model the operational and configuration data of a network device. YANG, being a language protocol independent, can then be converted into any data format encoding like XML or JSON. YANG is a language for describing any type of data models. But it was originally designed for networking data models. Below are good aspects of YANG to remember:
       
It is a very structured language
Every data model is a module
Containers are used to group related type of nodes.
Lists (It's same programming list) is used to identify nodes that are stored in sequence. 
Data types can be imported from another YANG module or defined within a module.
Each individual attribute of a node is represented by a leaf.


Where do these YANG models come from? Who writes these data models? Anyone having knowledge of YANG programming can easily write a YANG model. These data models mainly categorized into as open models and native models.
       
Open Models:  Designed to be platform and OEM independent models. These are mainly written by standard bodies like IETF and Open Config
Native Models: These models are mainly written by OEM and specific to platform or operating system. 


Open and Native data models can further classified into two different data models:
Device Data Models: Interfaces, Vlans, OSPF, ACL
Service Data Models: layer 3 vpn, layer 2 vpn, 


YANG model is made up from various components as shown in the image (Image copied from Cisco Live Dev Net Presentation)
       



Container - Infomration is logically grouped into form of containers. Such container is for configuration and one for state. List - Container contains list or even multiple lists. Such as a list of interfaces. Key - Each item within the list is references via a key (unique key). Leaf - Inside list we have leaf's. It contains information. Data Type - Each leaf is associated with a data type.

Click Here To Read Rest Of The Post...

Saturday, May 2, 2020

Network Slicing - Flex Algo


GSMA defines, "5G networks, in combination with network slicing, permit business customers to enjoy connectivity and data processing tailored to the specific business requirements that adhere to a Service Level Agreement (SLA) agreed with the mobile operator. The customisable network capabilities include data speed, quality, latency, reliability, security, and services."

What is customisable network? Every network is fixed network like monolithic and fully dependent on the underneath resource availability. Fixed or monolithic sort of networks can only provide the connectivity with basic business SLAs. But 5G has different network requirements to support different type of business use cases like enhanced mobile broadband, massive machine to machine and ultra reliable low latency. To support different type of use cases, we need network which is like cloud native, we need network like micro-services, we need network like docker. To have these different customization we have to slice the network into different logical layers and use cases can be mapped to logical layers as per the signed business SLA. Dividing monolithic network into different layers or slices by using segment routing along with flexible algorithm is called customisable network or "Network Slicing".

What is Network Slicing?
Network slicing is an end-to-end concept that divides the physical network into logical parallel layers. It enables deployment of multiple logical, self-contained and independent shared or partitioned networks concurrently on a common infrastructure by abstracting, isolating and orcestrating it.

How do we create slicing in service provider network?
We can use flexible algorithm along with Segment Routing to create different slices in the network.

What is Flex Algrithm?
Segment Routing Control Plane - ISIS post explains about the Router Capability TLV (242). Router capability TLV has SR-Algorithm(Segment Routing Algorithm, Flex Algo, Flex Algorithm) Sub-TLV – This is type 19 sub-TLV. SR-Algorithm sub-TLV is optional. A router receiving multiple SR-Algorithm sub-TLVs from the same originator should select the first advertisement in the lowest-numbered LSP. This sub-TLV is used to calculate reachability to other nodes or to prefixes attached to the nodes. It has 2 values 0 and 1.

0: Shortest Path First (SPF) algorithm based on link metric. This is the well-known shortest path algorithm as computed by the IS-IS process. Consistent with the deployed practice for link-state protocols, algorithm 0 permits any node to overwrite the SPF path with a different path based on local policy.

1: Strict Shortest Path First (SPF) algorithm based on link metric. The algorithm is identical to algorithm 0 but algorithm 1 requires that all nodes along the path will honor the SPF routing decision. Local policy MUST NOT alter thevforwarding decision computed by algorithm 1 at the node claiming to support algorithm.

Flexible Algo means that this is flexible rather than fixed and the algorithm is defined by the operator based on per deployment basis.

Below are the steps used to discover and deploy Flex-Algo Topology:
Topology Discovery
1. A node computes Flex-Algo(K) if it is enabled for K. K is nothing but mathematical value starts from 128 till 255.
2. Flex Algo Topology is defined by pruning any nodes and links that is not advertising participation to K.
3. Advertises prefix-sid for that flex also node.
Compute Shortest Path
1. Compute shortest-path tree on Flex-Algo Topo(K) with the metric defined by K. Metric could be IGP, TE or Delay.

Build FIB Table
1. Install any reachable Prefix-SID of Flex-Algo(K) in the forwarding table

By using the above steps, let's see how Flex Algo(K) builds its topology. As per above figure, Node 10 supports 0,128 and 138. Node 1,2,3 and 4 supports flex algo 0 and 128. Nodes 5,6,7 and 8 supports flex algo 0 and 138. Node 9 supports flex also 0,128 and 138.

Node10 will be advertising prefix sid 16010 for flex algo 0, 17010 for flex also 128 and 18010 for flex algo 138. Similarly Nodes 1 will be advertising 16001 for flex algo 0 and 17001 for flex also 128.

By using the flex algo or flexible algorithm we can easily create network slices. Nodes below to same flex algo be part of same network slice. Once we create the slice, accordingly we can apply route the traffic on to the slices as per the business SLA.

Stay tuned for my next post, which will be discussing how to implement network slice on Cisco IOS-XR based platform. References

Click Here To Read Rest Of The Post...

Sunday, April 8, 2018

CUPS: Control User Plane Separation


Telco’s user data traffic is getting doubled every year due to the proliferation of OTT video, social media, gaming and use of smart devices. This exponential growth in the mobile traffic has led lot of architectural changes which are aligned to SDN and NFV technology. At the same time OTTs are taking advantage because Telco’s are building network and serving 70% of OTT traffic only. At the same time, there is strong demand of serving OTT traffic with low latency, high throughput and best customer experience.

To serve all these requirements, Telco’s has to penetrate deeper and deeper in the region and create more EPC locations which means number of new users are not increasing as compare to the traffic demands.

Below is the current network architecture of LTE


During the launch of LTE, this was the best in breed architecture but as the traffic demands grow the intermediator or inline nodes are becoming bottle neck and creating head of Line blocking. CUPS - Control Plane User Plane Separation solves the issue and gave a new architecture approach which is easy to implement and leverages the SDN and NFV technologies so that all the SLA’s and KPI’s can be met.


In nutshell, CUPS allows for:
1. Reducing latency on applications and OTT/Video traffic.
2. Leveraging SDN to deliver Data Plane more efficiently and better scaling in Control Plane.
3. Supporting Increase of Data Traffic, by enabling to add user plane nodes without changing the number of SGW-C, PGW-C and TDF-C in the network.


Click Here To Read Rest Of The Post...

Saturday, April 7, 2018

Network Slicing in 5G


Network slicing is a kind of virtual network architecture, which leverages the principles behind network functions virtualization (NFV) and software-defined networking (SDN). Network slicing allows telecom operators to slice a physical network into multiple virtual networks. From a mobile operator’s point of view, a network slice is an independent end-to-end logical network that runs on a shared physical infrastructure, capable of providing a negotiated service quality. The technology enabling network slicing is transparent to business customers. The virtual networks are then tailored to meet the needs of specific applications and services.

SDN and NFV will play vital role in network slicing. NFV provides the network functions like routing, firewall, load balancer etc. disaggregate from the dedicated OEM appliance and can be host on COTS hardware. The OEM dependency on supplying hardware, elasticity and faster time to market is the key to leverage NFV. SDN on the other hand is use to manage the network flows from the centralized controller sitting in data centers. The main role of the SDN is to provide on demand services without any kind of manual intervention.

5G is all about of providing connectivity to massive IOT devices (Industrial Slice or IOT Slicing), enhance Mobile Broadband for AI, ML and handling Video Traffic (Smartphone Slice) and providing access to low latency devices like Cars (Autonomous Driving Slice). Network Slicing can be achieved by using flex algo along with segment routing.

Network slicing will heavily be used in 5G networks to permit business customers to enjoy seamless connectivity and data processing tailored to the specific business requirements that adhere to a Service Level Agreement (SLA) agreed with the mobile operator. The customizable network capabilities include data speed, quality, latency, reliability, security, and services.

Click Here To Read Rest Of The Post...

Sunday, January 28, 2018

Different IGP Designs To Connect SDN Controller


In the previous post, we have discussed, how does PCEP can be used as south bound protocol to discover the active RSVP LSP in the network. In this post, I will be discussing how we can use any IGP protocol to discovery the existing network topology in the SDN controller. This mechanism is also known as inband. topology discovery by using existing IGP.

We have the various types of SDN Controller connectivity design available and need to understand which one is the best of the existing network.

Design 1: Single area or Small IGP
If you have single area or small IGP design, in that case controller can directly participate in the same domain and discover the existing network topology. The controller connects to the network only to obtain information from it, no data traffic should ever be sent to the controller. Within single area, the TED is the same in all nodes, that’s why we need single connection to the controller.

Different IGP Design To Connect SDN Controller
Design 2: IGP Domain With Multiple Areas
If you have large IGP domain with multiple areas configured, in that case traffic engineering or TED information is only propagated within single area. However the routing among the areas is taken care by border routers. In this case, we might require multiple links to the controller. In large IGP domain, TED information is only available within area. So if we need to get the entire TED information, we may need to connect the controller with different ABRs. If the controller is connected to multiple paths in the network, special care has to be taken so that controller should not come in the forwarding plane.

The main disadvantage of this approach is that, you might require hierarchical PCEP controller because it has to correlate the TED information from different areas. Second disadvantage of this design is that you might require multiple connectivity from different areas or place different controllers near to different areas.

Different IGP Design To Connect SDN Controller
Design 3: SDN Controller With GRE Tunnel
With the known limitations as per design 2, we can use the GRE tunnels to get rid multiple physical connectivity and extract the TED information. The main advantage of this design is that you need single physical connectivity by creating logical interfaces on the top of it.

SDN Controller With GRE Tunnel

Click Here To Read Rest Of The Post...

Saturday, January 27, 2018

PCEP - SDN Control Plane Protocol


Path Computation Element Communication Protocol (PCEP) is defined as a protocol that can work between two devices, one forwarding using Traffic Engineering (Router) while the other performing all of the computations for determining the traffic engineering paths (SDN Controller). It is defined in Request For Comment (RFC) 4655 and as per RFC device running a Traffic-Engineering (TE) protocol known as Path Computation Client (PCC). The device which does all the computation is referred to as a Path Computation Element (PCE), and naturally the protocol between the PCE and PCC takes up the name PCEP.

Traditionally, the routers perform their own computations and exchange information between each other for that purpose. In the PCEP model, the router (acting as a PCC) does the forwarding and label imposition, disposition, etc. but it leaves the entire computation and path decision-making process to the PCE. If there are multiple PCEs working collectively, PCEP may also be used as a communication protocol between them. To learn the Link State Database (LSDB) information from the network, the PCE device could establish a passive IGP relationship with the devices and share the entire traffic engineering database. This approach is limited to single area only as one area doesn’t have the link state information of other area.

PCEP - SDN Control Plane Protocol
PCEP is designed around SDN use-case for traffic engineering. So it applies to RSVP-TE, Generalized MPLS (GMPLS)–based TE, and more recently to Segment Routing TE (SR-TE). The role of the PCEP, PCC, and PCE remains the same in all these cases. For example, the PCC can request the PCE to perform path computations with specific constraints, and the PCE can respond back suggesting the possible paths that meet the required constraints.

PCC requires support only in the edge network. As contrast to OPEN Flow, PCEP is easy to manage, deploy and troubleshoot in any large ISP network.


Click Here To Read Rest Of The Post...

Wednesday, January 17, 2018

PCE vs OPENFLOW Controller


In general networking control plane is used to exchange the destination information whereas data plane is used to program the control plane information in the local stack along with the information how to reach to local neighbors. But in the world of SDN networking, SDN is always referred as separation of control and data plane. At high level, SDN controller can be OPENFLOW or PCE based controller.

But most of Network Planning Engineers always stumble to understand which controller is best for the network.

OpenFlow, where centralizing the control plane of the network usually requires full upgrades and/or replacements of significant parts of the network, PCE rather introduces an evolutionary approach towards a centralized control of the network infrastructure. In the beginning, only the edge layer of the network needs to support PCEP, while the network may continue using traditional ways of signaling (such as RSVP-TE) and same schemes for mapping traffic to paths at the edges, as shown in the figure below. There is no need for controller to communicate to all network elements in the path, as it is the case with OpenFlow

So in nutshell, if you are planning to deploy OPENFLOW based controller you have to upgrade the entire network and has to manage the state of OPENFLOW in each and every router where as in PCE based controller only edge routers need to support the PCE rest network upgradation is not required.

PCE vs OPENFLOW

Click Here To Read Rest Of The Post...

Sunday, January 14, 2018

Scale SDN Applications with Micro Services Architecture


Elasticity is one of the prerequisite of any SDN application if it has to scale out horizontally. Scaling the entire SDN application does not make sense when the scale requirement is only for few of the services. However, if the SDN application is written in monolithic architecture in that the entire code has to recompile just for few scale requirement. Monolithic Architecture becomes head of line blocking in case the application has to scale out.

As per Wikipedia, “A software system is called "MONOLITHIC" if it has a monolithic architecture, in which functionally distinguishable aspects (for example data input and output, data processing, error handling, and the user interface) are all interwoven, rather than containing architecturally separate components.”

Monolithic application always build as single unit which means in case of change of any small code; requires the recompilation of the entire code. Below are the challenges if the applications are deployed with Monolithic Architecture:-
1. Scaling is one of the biggest challenge of Monolithic Applications
2. Slow speed and processing
3. Monolithic applications are implemented as single development stack

Monolithic Architecture


By contrast, micro services are modular in terms of supporting any kind of business requirements. Monolithic code can be divided into smaller parts known as micro services. Micro Services can communicate to each other by using RPC calls. This architecture has below listed benefits as compare to monolithic architecture:-
1. Easy to scale
2. Not dependent on single development stack. Every micro service can be written in any kind of language.
3. Upgradation of any micro service will not affect other micro service.
4. Microservices based architecture can result in far more efficient use of code and underlying infrastructure
5. Easier to implement and faster time to market
6. Provides operational efficiency as dev ops team can focus on updating only on relevant micro service rather than on the entire code.



Click Here To Read Rest Of The Post...

Monday, October 17, 2016

Validating IP Address By Using Python (Conditional Statement)


Splitting IP Address string variable post defines the normal way how to deal with the variables and splitting them into different items. The same splitting can be used by using conditional statement if-else with while loop. This provides more simplicity for network engineers to shorten the python code.

Syntax of If-Else Statement:
if expression:
  statement(s)
elif:
  statement(s)
else
  statement(s)

If expression is FALSE, in that case complier will move to the ELIF part. If ELIF becomes false also, the compiler will execute else block. The elif statement allows you to check multiple expressions for TRUE and execute a block of code as soon as one of the conditions evaluates to TRUE.

while True:
  ip_address = raw_input("Enter IP Address")
  ip_address_check = ip_address.split('.')

  if (len(ip_address_check) == 4) and (1 <= int(ip_address_check[0]) <= 223) and (int(ip_address_check[0]) != 127) and (int(ip_address_check[0]) != 169 or int(ip_address_check[1]) != 254) and (0 <= int(ip_address_check[1]) <= 255 and 0 <= int(ip_address_check[2]) <= 255 and 0 <= int(ip_address_check[3]) <= 255):
  break

  else:
  print "\nThe IP address is INVALID! Please retry!\n"
  continue

print "Shivlu Jain It's Good to go with the given IP Address"

For more info on programming skill read Do I need to be programmer before learning Automation, SDN and NFV technologies?

Click Here To Read Rest Of The Post...

Sunday, October 2, 2016

Python Variable Types


In last post “How To Start With Python For SDN” gives clear direction how to start with Python. In this post I am trying to cover the basic variable types which are must to know for every network engineer who wants to learn Python.

Variables are used to store values in specific memory locations. It means whenever you create a value python reserves some space in memory. Memory allocation happens based on the defined variable type. In Python we have different type of variables as given below:
1. Integer
2. Float
3. String
4. Tuple
5. List
6. Dictionary


Declare the name of the variable and use the assignment operator = to assign the value. We do not declare the variable type. The value assigned to the variable determines the type Integer, Floats, String, Lists, Dictionaries, and more types.

Let’s understand this with the help of below example. We have define a variable called ip_address and assign “192.168.1.1” in double quotes. Now by typing type(ip_address) function help us to understand that the declared variable ip_address is of string type.



The same way we can declare the integers types by not putting them in quote as per below output.



List is collection of items, items are ordered, separated by commas and enclosed with in square brackets.



The values stored in a list can be accessed using the slice operator ([ ] and [:]) with indexes starting at 0 in the beginning of the list and working their way to end -1.



Will cover more in the upcoming posts.

Click Here To Read Rest Of The Post...

Thursday, September 29, 2016

How To Start With Python For SDN?


Recent post of "Which programming language should I Start Learning for Automation” and “Do I need to be programmer before learning Automation, SDN and NFV technologies” gave a clear approach to start with Python Language. Let me tell you one more time “Why Python Is Selected For SDN”.

1. Being platform independent and huge community support
2. It’s an easy language to learn
3. Great Online Documentation Available
4. Open Source With Easy Readable code
5. Code can be easily grouped in modules and packages
6. Easy API Integration
7. Finally it’s object oriented programming (OOPs)

Python is not only selected for SDN but it is widely opted by others communities also:

1. Software Testing
2. Web Development
3. Writing Network Applications
4. Scientific Applications
5. Scripting

Where to Start With Python?
Download Python 2.7 and start working on it. PIP (package manager/installer program)

What you should know before starting Python?
Before starting your python journey, please read more about PIP. PIP is (package manager/installer program). pip stand for "Pip Installs Packages" or "Pip Installs Python". pip is a package management system used to find, install and manage Python packages. Many packages can be found in the Python Package Index (PyPI). This is a repository for Python.

There are currently 89000 packages online and can be easily accessed by using https://pypi.python.org/pypi. You can use pip to find packages in Python Package Index (PyPI) and to install them. How to Start With Python? Download Python 2.7 and start working on it.

Click Here To Read Rest Of The Post...

Tuesday, September 27, 2016

Which programming language should I Start Learning for Automation?


Do I need to be programmer before learning Automation, SDN and NFV technologies: Gave a clear picture that you don’t need to be a programmer to learn these technologies? But knowledge of any basic scripting or programming language is always beneficial for carrier growth. Now the question arises which programming language to select out of the following:-

1. Python
2. XML
3. JSON
4. C/C++
5. Visual Basic
6. Perl
7. TCL
8. Ruby On Rails

Before the selection of any language we should understand that what the common among the languages are. As per my understanding, logic will remain be the same while implementing any of the languages. Secondly, all the languages have common understanding of defining variables, strings, functions, classes, inheritance, conditional statements, for and do-while loops, dictionaries, sockets, importing modules, file opening, error and exception handling. So it would be better if we first select any language and get the understanding of the basics functions. Once it is done, after that it would be very easy to become master in any of the language from understanding perspective. (Please mind that we are network engineers not programmers. The intent is to learn and understand the different puzzles with various buzz words and not to become master). Let the programming masters do their jobs. We will be helping them by extending the support.

Which programming language to select first and why?
I started my journey with C, C++, Visual Basic and Networking. After over period of time I can clearly differentiate among the languages. C is the mother or father of every language. During its writing time, it was designed to be very light. C++ was successor of C. It came with a concept of objects oriented programming. The basic problem with both the languages are platform dependent. That would be the reason it was used to build as base of other programming languages but never ever gain popularity over the web.

Java is widely opted because of its platform independent feature but it has lot of problems at server side. It was mainly a server side language rather than client side.

Python gained popularity in the last few years because of platform independent. Secondly it is very light in weight and have interactive shell too which most of the languages don’t have. It’s an easy to learn language and heavily adopted by every field. It has almost 88000 libraries available which can be used freely by anyone. Now even the lighter python version are also available which are called as PyEz (Python Easy). PyEz makes the code shorter by almost 85%. I have posted My First Step towards Automation: Controlling Junos with Python & PyEZ. Let’s understand how does it works with the help of an example.

A raw python script uses the paramiko library for the ssh connection and you have to define the rpc for show version (get-software-information), then open the socket to the device on the right port (830) and create the transport using that socket as the connection. Once it’s open, you can then send the rpc and then wait for the end of the rpc-reply. Then close the open session, close the transport and then close the socket. This python code is roughly about 50 lines.

The example can be implemented by writing 6 lines in PyEz.

Subsequently you can follow my already written post of My Second Step towards Automation: Install the PyEZ Library and Connect Your Remote Device and My Third Step towards Automation: How to map Junos Commands to PyEZ RPC.

So finally as closing comments I am not expert and can't explain the pros and cons each and every programming language but would suggest to start your learning with Python or PyEz and start writing your first famous “Hello World” program.

Click Here To Read Rest Of The Post...

Monday, September 26, 2016

Do I need to be programmer before learning Automation, SDN and NFV technologies?


Network Engineers are worried about the skills required to learn about the next generation technologies like SDN and NFV. Every time when someone talk about SDN and NFV, I always think that do I need to learn any kind of programming language like C, Python, Perl, SLAX, RUBY etc.? Does my CCNA, CCNP, CCIE, JNCIA, JNCIS skills are no more required? There are lot of questions comes in my mind about job security also. At times, I assume will companies hire or retain only those engineers who understand programming better than BGP or OSPF or ISIS.

Automation is the new buzz word in the industry. Every customer wants to automate their entire infrastructure without understanding how does it work. As per my understanding automation means is to shorten the completion cycle of current job by writing some scripts or loops. But as industry perspective, we think automation means programming and without having its knowledge how someone can automate any kind of job.

In IT industry, automation was being used since long. Ansible is the right example of IT Automation industry. But in networking automation was also used since long. The best example of automation is to run a script in the night which normally takes the backup of the current configurations of network elements. Second best example of automation in networking is Network Management System (Vendor Specific)

In Network we are already decoupling control and data plane by implementing route-reflector functionality.

Now the question arises if automation, SDN etc. technologies are already there then why we all are worrying about it. Is it something different of what we are already doing? I would say: Automation, SDN and NFV are bringing customer on boarding faster time to market. Earlier these technologies are only locked with specific vendor but not multi-vendor is required. Now a days if you require route-reflector functionality, in that case you need to order a dedicated router. The same functionality can be leverage by using route-reflector VNF. Route-Reflector VNF has full fledge functionality of route-reflector what we usually get in hardware router. The only difference is that in earlier case hardware and software were tightly coupled together but now it is decoupled.

Again the question is not answered what skills are required for multi-vendor SDN and NFV. Let’s examine the route-reflector example and it will help us to understand what kind of skills are required.


The above example in figure shows if we have to spin up VNF of virtual route reflector, in that case close integration is required among Compute, Networking and Storage. To get the integration done one must understand the below as listed:-
1. Linux OS Fundamentals
2. Basic Scripting or Programming to automate the stuff
3. Networking
4. Storage
5. API Calls
6. GIT
7. Orchestration tools like Pupper, Chef, Ansible and Salt Stack etc.
8. Open Stack

So it’s not all about programming to become Automation, SDN and NFV engineer. It’s all about how do you embrace these technologies with multiple skill set knowledge. It’s jack of all trade and master of none or one. All you need to understand how does the process works and how do you link each and every step with other.

Click Here To Read Rest Of The Post...

Monday, July 18, 2016

My Third Step towards Automation: How to map Junos Commands to PyEZ RPC


In JUNOS, it’s very easy to find any RPC equivalent of the existing command by running “show route | display xml rpc”. This helps to find what is equivalent RPC command of show route as per below output.

get-route-information

It’s very difficult to find every time on cli what is equivalent of RPC of any Junos command. So we can leverage PyEZ to find the same and in the upcoming posts, you can check how it can be leverage to pass the different values directly in the RPC calls. In PyEZ we can call display_xml_rpc library to get the information of any RPC equivalent Junos Command.

from jnpr.junos import Device
from jnpr.junos.exception import ConnectError
dev = Device(host='192.168.1.1', user='lab', passwd=’lab')
try:
dev.open()
except ConnectError as err:
print "Cannot connect to device: {0}".format(err)
sys.exit(1)
print dev.display_xml_rpc('show route',format='text')
print dev.display_xml_rpc('show interface',format='text')
print dev.display_xml_rpc('show ospf neighbor',format='text')
dev.close()
The output of above file is given below:-
C:\Python27>python.exe testing\connect_device_rpc.py
RPC of show route is:
get-route-information

RPC of show interface is:
get-interface-information

RPC of show ospf neighbor is:
get-ospf-neighbor-information

Click Here To Read Rest Of The Post...

Tuesday, July 12, 2016

My Second Step towards Automation: Install the PyEZ Library and Connect Your Remote Device


Junos PyEZ micro framework has been built and tested tested with Python 2.6 and 2.7. So before moving ahead you must install Python 2.6 or 2.7.

Use:- “pip install junos-eznc” on your ubuntu or linux laptop to install PyEZ library or simply clone it from GIT hub “pip install git+https://github.com/Juniper/py-junos-eznc.git”

. You can install GIT on windows and start playing with it also. This library can be easily installed on your working laptop and you can connect any of your physical or virtual juniper device. Verify Your Installation
In your root directory make sure you have correct folders under python directory as below listed:-
1. C:\Python27\Lib\site-packages\junos_eznc
2. C:\Python27\Lib\site-packages\jnpr\junos

You can work with python in interactive mode or simple by creating a python files and run it from the python shell directly. Interactive shell is real time and generates the output immediately. First PyEZ Program from intractive shell to capture the facts of the device.
1. from jnpr.junos import Device
2. dev = Device(host='192.168.1.1', user='lab', passwd='lab')
Above command is Creating the device instance and provide the hostname, any parameters required for authentication, and any optional parameters.
3. Dev.open()
Above Command is Connecting to the device by calling the open() method.
4. print dev.facts
Above command is Printing the device facts, which are automatically retrieved when the connection and NETCONF session are established.
5. dev.close()
Above command is used to close the NETCONF session

If you are looking for to extract the particular information from the facts. In that case you can change the dev.facts to dev.facts['serialnumber']. By executing this command you will get the serial number of chassis.

Click Here To Read Rest Of The Post...

Sunday, July 10, 2016

My First Step towards Automation: Controlling Junos with Python & PyEZ


You can manage or automate routers by using python. But writing long codes in python is tedious task when it comes for non-programmers. But leveraging PyEZ, Python micro framework can help dev-ops engineers to automate the routers on the fly. Having an XML API is the benefit of using a Juniper router as it is easier than other routers to manage it with python PyEZ library. Moreover Juniper wrote a Python library, which is actually a "micro-framework", called PyEZ and it makes easier for non-programmers like me to manage a Junos OS router. Juniper devices comes with SLAX which can be leverage for on box automation. But PyEZ comes with OFF box solution and for onbox JET framework is required. PyEZ micro frame used NETCONF to communicate with the boxes.

PyEZ library is built for two type of users:-
1. Non-Programmers - Python as a Power Shell: Non-programmers, such as Network Engineers, can use the native Python shell on their management server (laptop, tablet, phone, and so on) as their point-of-control to remotely manage Junos OS devices.
2. Programmers - Open and Extensible: There is a growing interest and need to automate the network infrastructure into larger IT systems. To do so, traditional software programmers, DevOps, hackers, and so on, need an abstraction library of code to further those activities. Junos PyEZ is designed for extensibility so that the programmer can quickly and easily add new widgets to the library in support of their specific project requirements. There is no need to "wait on the vendor" to provide new functionality. Junos PyEZ is not specifically tied to any version of Junos OS or any Junos OS product family.

Junos PyEZ Features
Junos PyEZ is designed to provide the same capabilities as the Junos OS CLI, but in an environment built for automation tasks. These capabilities include, but are not limited to:
• Provide "facts" about the device such as software version, serial number, and so on
• Retrieve the "operational" or "run-state" information (think "show" commands) using Tables/Views
• Retrieve the configuration using Tables/Views
• Make unstructured configuration changes with "snippets" and "templates"
• Make structured configuration changes with modeled abstractions
• Provide common utilities for tasks such as secure copy of files and software updates

Closing Comments:
Currently PyEZ is used to control only Juniper Devices but as it is open and available on GIT hub, I think the same functionality can be extended to multi-vendor environment also. Still my research is on, how PyEZ can be used for multi-vendors environment so that we can leverage the open community rather depending on any OEM lock-in.

Stay tune for the next post of PyEZ installation.

Click Here To Read Rest Of The Post...

Wednesday, July 6, 2016

SDN NFV Considerations For Customers


What is NFV?

Network Functions Virtualization (NFV) is an alternative design approach for building complex IT applications, particularly in the telecommunications and service provider industries, that virtualizes entire classes of function into building blocks that may be connected, or chained, together to create services.

Various NFV Use Cases

Below are some sample NFV use cases can be evaluated and implemented: 1. virtual Provider Edge (vPE)
2. virtual Customer Premise Equipment (vCPE)
3. virtual Security
4. virtual Router
5. virtual BNG
6. Service Chaining
7. virtual Packet Core

What Does All This Mean For Customer?

NFV should be viewed as a transformative technology for Customer. The potential applicability for NFV solutions, as well as potential benefits, are almost endless:
Start Farm as a Consumer of NFV Solutions and Services – There is little doubt that Service Provider offerings will be changing dramatically in the coming years and what used to be table stakes for incumbent Tier 1 TELCOs, Cable MSOs and other traditional providers will be up for grabs. Traditional providers realize this and are moving quickly to embrace SDN, NFV and other disruptive technologies. The end result will be increased competition in the market and downward pressure on pricing. Customer should look to partner with traditional SPs (or other SPs) on innovative NFV based product and service offerings while keeping in mind the potential barriers for successful technology adoption.

NFV Deployment Models

The number of potential NFV deployment models is extensive and will likely grow over time. DC-based NFV is the first likely be the deployment model. The potential value of NFV extends beyond the DC. For providers, NFV solutions will extend beyond the DC to the point of presence (POP) and customer premise.

NFV enablers:
1. Improved x86 hardware performance

2. Maturity level of hypervisor technology

3. Automation and orchestration solutions

NFV Value Proposition
1. Reduce CAPEX/OPEX
2. Increase service agility
3. Accelerate service creation (hardware abstracted cloud based delivery)
4. Reduce energy costs, and
5. Enable dynamic service driven platforms

Click Here To Read Rest Of The Post...

Monday, June 20, 2016

Open Virtual Switch (OVS)


As per Wikipedia, “Open vSwitch, sometimes abbreviated as OVS, is a production-quality open-source implementation of a distributed virtual multilayer switch. The main purpose of Open vSwitch is to provide a switching stack for hardware virtualization environments, while supporting multiple protocols and standards used in computer networks”

Open vSwitch is software based solution which resolves the problems of network separation with in virtualization environment. It also provides fast data path in kernel space with OPENFLOW implementation.

Open vSwitch design is divided into two parts:-

1. User Space: It helps in taking decision how to process the packet

2. Kernel Space: Kernel space is strictly reserved for running a privileged operating system kernel, kernel extensions, and most device drivers.

User Space consists of ovsdb-server and ovs-vswitch daemon whereas kernel space consists of OVS Kernel Module.

OVSDB-Server:- It holds the switch level configuration and communicates with controller by using OVSDB management protocol.

OVS-vSwitchd:- It communicates with outside world by using OPENFLOW protocol.

OVS Kernel Module:- It handles switching and tunneling with exact match of flows. Whenever packets hits this interface, if found, associated actions executed and counters updated. Otherwise packets sent to user space.


Click Here To Read Rest Of The Post...

Sunday, June 19, 2016

Basics of OPENFLOW: Programmatic Way To Program Data Planes


SDN is always referred as separation of control and data plane. But in general networking control plane is used to exchange the destination information whereas data plane is used to program the control plane information in the local stack along with the information how to reach to local neighbors. The advantage of this separation is that every time when the router receives reachability information for a network via control plane protocol, and then programs it’s own data plane so that packets go in the right direction based off of the learned information packets comes in. Data plane takes the responsibility to forward the packets to the neighbors keeping in mind that there is no change in the control plane; if change happens the same has been incorporated in the data plane.

In the world of SDN, we always come across OPENFLOW terminology and have perception in mind that if the software or hardware is not providing this capability is not SDN capable or certified.

However this is not the case; OPENFLOW is a control or communication protocol and foundational element of software defined networking. As in legacy networking, control and data plane resides in same element but leveraging open flow, control plane intelligence is taken out however data plane intelligence is residing local to the element. OPENFLOW defines a programmatic way to define the flow state in the local agent running on switch or router. The local agent must store these flow information locally and push them into vendor specific format on that device.

OPENFLOW is not a configuration protocol like we have NETCONF. OPENFLOW is used to provide the access of data plane by specifying general language which can be easily understood by any switch or router instead of making their own rules from local control plane.

OPENFLOW is control plane protocol as per given figure and the main objective is to provide open and programmatic way to program the data planes instead of relying on local control planes. It’s very clear no one can make the changes in the configuration by using OPENFLOW, it’s only intend is to tell the agent to add the flow, match the flow and forward the flow basis on its characterization like ether type, port, mac address and destination address etc.


Click Here To Read Rest Of The Post...

Wednesday, May 11, 2016

Facebook Introducing Open/R Modular Routing Platform


Open/R generalizes the concept of a replicated state database found in well-known link-state routing protocols such as OSPF and ISIS. It uses this as an underlying message system upon which is used to build multiple applications. Distributed routing is just one of the applications that leverages this message bus. Facebook is leveraging Thrift for all message encoding and use the well-documented and mature open source ZeroMQ library for all message exchange, whether it's intra-process or inter-process.

ZeroMQ typically uses TCP to establish transport connections and allows for flexible message patterns (with PUB/SUB being one important example) that we actively leverage. While it might sound heavyweight compared with OSPF and ISIS, which use their own “lightweight” transports, we haven't found this to be an issue in modern networking hardware, such as the devices we use for Terragraph or the Wedge and 6-pack boxes running FBOSS in our data center networks. On the plus side, using ZeroMQ saves a lot of work implementing and testing the low-level aspects of the system, and it allows us to use the same framework for intra-application and inter-application messaging.

Link to Post
Click Here To Read Rest Of The Post...