Module 6 Slides
Module 6 Slides
Network Automation
Overview of SDN
Overview of Software Defined Networking (SDN)
Applications
Terms to Know:
- Distributed Control Plane
- API
- SBI
Northbound Interfaces - Centralized Control Plane
- OpenFlow
- NBI
- RESTful APIs
- JSON
SDN
Controller
Southbound Interfaces
{
"firstName": "Kevin",
"lastName": "Wallace"
}
JSON (JavaScript Object Notation) Format
Array ["CCNA","CCNP Enterprise","CCIE Enterprise
Infrastructure“]
• An ordered set of comma-separated
values. With whitespace:
• Enclosed in straight brackets.
[
"CCNA",
"CCNP Enterprise",
"CCIE Enterprise Infrastructure”
]
JSON (JavaScript Object Notation) Format
Value
• Can be a string, number, object, array, null, true, or false.
• Example of a JSON validator:
https://jsonlint.com
• https://github.com/YangModels/yang
Data Modeling Example
Apple iPhone
Model: 11, 11 Pro, 11 Pro Max, Other
Display Size : 5.8”, 6.1”, 6.5”, Other
Color: Midnight Green, Silver, Space Gray, Gold, Purple,
Yellow, Green, Black, White, (PRODUCT) ,Other
RED
Type
Container
List
Interfaces Container
Interface Node
IPv4 Node
Leaf
Namespace
YANG Data in XML Format
NETCONF
NETCONF
CLI SNMP
(Telnet, SSH)
NETwork CONFiguration
NETCONF
Request
Reply
Manager
Client
Server
NETCONF
NETCONF
Manager
Agent
NETCONF
NETCONF
Manager
Agent
NETCONF
NETCONF
L YANG Data
Manager
Agent
NETCONF
NETCONF DEMO
RESTCONF
RESTCONF
HTTPS
Client
Server
RESTCONF
Representational State Transfer (REST)
CRUD HTTP
NETCONF Operation
CCreate Function Verb
Create POST <edit_config> (operation=“create”)
Read
R Read GET <get> , <get_config>
U
Update Update PUT or PATCH <edit_config> (operation=“create/replace” or “merge”)
Code Deploy
DevOps
Pla
n
Software
Operate
s e
IT Operations
Build
el a
Development Re
Lifecycle
Test Monitor
Puppet
Manifest Cisco Nexus 6000
(State B)
Agent
Server State BA
• Written in Ruby
• Recipes: A set of instructions for a specific task
• Cookbook: A collection of recipes
Chef
cisco_interface 'Ethernet1/1' do
action :create
ipv4_address '192.168.1.1'
ipv4_netmask_length 24
ipv4_proxy_arp true
shutdown false
switchport_mode 'disabled'
end
cisco_interface 'Ethernet1/2' do
action :create
access_vlan 200
shutdown false
switchport_mode 'access'
switchport_vtp false
end
Ansible
Inventory
Playbook Cisco Nexus 6000
SSH
Components:
SSL Connection
Salt Master
Minions
Salt Master:
• Main hub for configuration
• Instructions and configurations pushed out to Minions
SaltStack
SSL Connection
Salt Master
Minions
Minions:
• Runs as agent software installed on managed nodes
• Used to receive and execute commands, and report information back to the Salt Master
SaltStack
Grains
SSL Connection
Salt Master
Minions
Grains:
• Information about managed nodes sent to Salt Master
• Network information, operating system, hardware details, etc.
• Information is static and not real-time
SaltStack
Grains
SSL Connection
Pillar
Salt Master
Minions
Pillar:
• Stores data that Minions can retrieve
• Contains minion-specific sensitive data
• Cryptographic keys, passwords, etc.
SaltStack
Grains
SSL Connection
Pillar
Salt Master
Minions
Salt Mine:
• Captures arbitrary information from managed Minions
• Information is made available to all of the Minions
• Salt Mine data is much more up-to-date than Grain information
Python Demo
Cisco DNA Center and
vManage Demos
Cisco DNA Center Cisco vManage
https://sandboxdnac2.cisco.com https://cisco.com/go/sdwandemos
Username: devnetuser Username: demo
Password: Cisco123! Password: demo1234!
Cisco DNA Center and
vManage APIs
Cisco DNA Center and vManage APIs
• Administrative APIs
• Certificate Management APIs
• Configuration APIs
• Device Inventory APIs
• Monitoring APIs
• Real-Time Monitoring APIs
• Troubleshooting APIs
REST API Response
Codes
REST API Response Codes
<note>
<to>John</to>
<from>Susan</from>
<heading>Reminder</heading>
<body>Don't forget to buy eggs!</body>
</note>
REST API Response Codes