Back to Dashboard
Module 19
Network Automation and Programmability
โ Previous Module
Next Module โ
# ๐ CCNA 200-301 - Video 19: Network Automation and Programmability ## Deep Study Notes --- ## ๐ Learning Objectives By the end of this video, you should understand: - Why network automation is important - Software-Defined Networking (SDN) concepts - REST APIs and data formats (JSON, XML, YAML) - Network programmability tools (Python, Ansible) - Cisco DNA Center and Intent-Based Networking - Controller-based network management --- ## ๐ง Core Concepts ### 1. Why Network Automation? **Traditional Network Management (Manual):** ``` โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ TRADITIONAL NETWORK MANAGEMENT โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ โ โ Administrator โ CLI โ Configure device individually โ โ โ โ Problems: โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ โ โข Manual, error-prone โ โ โ โ โข Slow (configure hundreds of devices) โ โ โ โ โข Inconsistent configurations โ โ โ โ โข No version control โ โ โ โ โข Difficult to audit โ โ โ โ โข Hard to roll back โ โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ``` **Automated Network Management:** ``` โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ AUTOMATED NETWORK MANAGEMENT โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ โ โ Automation Tools (Python, Ansible, REST APIs) โ Controller/DNA Center โ โ โ โ โ โผ โ โ Configure all devices โ โ โ โ Benefits: โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ โ โข Faster (configure hundreds in seconds) โ โ โ โ โข Consistent (same config everywhere) โ โ โ โ โข Version controlled (Git) โ โ โ โ โข Easy to audit and roll back โ โ โ โ โข Continuous integration/deployment โ โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ``` --- ### 2. Software-Defined Networking (SDN) **Definition:** SDN is an architecture that separates the network control plane (decision-making) from the data plane (packet forwarding), centralizing control for programmability. ``` โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ TRADITIONAL NETWORK ARCHITECTURE โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ โ CONTROL PLANE โ โ โ โ (Routing protocols, STP, etc.) โ โ โ โ (Distributed - Each device decides independently) โ โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ โ โ โ โ โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ โ DATA PLANE โ โ โ โ (Forwarding packets) โ โ โ โ (Each device forwards independently) โ โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ SDN ARCHITECTURE โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ โ APPLICATION LAYER โ โ โ โ (Business apps, security, orchestration) โ โ โ โ Northbound APIs (REST) โ โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ โ โ โ โ โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ โ CONTROL LAYER โ โ โ โ (SDN Controller - Centralized) โ โ โ โ Southbound APIs (OpenFlow) โ โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ โ โ โ โ โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ โ INFRASTRUCTURE LAYER โ โ โ โ (Switches, routers, firewalls) โ โ โ โ Data Plane โ โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ``` **SDN Layers:** | Layer | Description | Examples | |-------|-------------|----------| | **Application Layer** | Business applications using network services | Cisco DNA Center, Security apps | | **Control Layer** | Centralized controller managing network | Cisco DNA Center, APIC-EM | | **Infrastructure Layer** | Physical/virtual network devices | Routers, switches, APs | **SDN Interfaces:** | Interface | Purpose | Protocols | |-----------|---------|-----------| | **Northbound** | Between Application and Control | REST, RESTCONF, NETCONF | | **Southbound** | Between Control and Infrastructure | OpenFlow, NETCONF, OVSDB | --- ### 3. Cisco DNA Center **Definition:** Cisco DNA Center (Digital Network Architecture Center) is a centralized management platform that provides automation, assurance, and security for enterprise networks. ``` โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ CISCO DNA CENTER โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ โ AUTOMATION โ โ โ โ โข Day 0/1/2 provisioning โ โ โ โ โข Template-based configuration โ โ โ โ โข Network plug-and-play โ โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ โ ASSURANCE โ โ โ โ โข Health scores (network, client, application) โ โ โ โ โข AI/ML anomaly detection โ โ โ โ โข Sensor-based monitoring โ โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ โ SECURITY โ โ โ โ โข Segmentation (SD-Access) โ โ โ โ โข Threat detection โ โ โ โ โข Policy-based access control โ โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ โ PLATFORM โ โ โ โ โข REST APIs for integration โ โ โ โ โข Workflow automation โ โ โ โ โข App hosting โ โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ``` **Intent-Based Networking (IBN):** - **Intent:** What do you want to achieve? (e.g., "All employees should have Wi-Fi") - **Translation:** Convert intent to network policy - **Activation:** Deploy policy across network - **Assurance:** Monitor and verify intent is satisfied - **Remediation:** Automatically fix issues --- ### 4. REST APIs **Definition:** REST (Representational State Transfer) is an architectural style for building web services that use HTTP methods to perform operations on resources. **HTTP Methods (CRUD Operations):** | Method | CRUD | Description | |--------|------|-------------| | **GET** | Read | Retrieve data | | **POST** | Create | Create new resource | | **PUT** | Update/Replace | Update entire resource | | **PATCH** | Update/Modify | Update part of resource | | **DELETE** | Delete | Remove resource | **HTTP Status Codes:** | Code Range | Type | Examples | |------------|------|----------| | **2xx** | Success | 200 OK, 201 Created | | **3xx** | Redirection | 301 Moved Permanently | | **4xx** | Client Error | 400 Bad Request, 401 Unauthorized, 404 Not Found | | **5xx** | Server Error | 500 Internal Server Error | ``` โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ REST API EXAMPLE โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ โ โ GET /api/v1/device/192.168.1.1/interfaces โ โ Host: dna.cisco.com โ โ Authorization: Bearer <token> โ โ โ โ Response: โ โ { โ โ "response": [ โ โ { โ โ "portName": "GigabitEthernet0/0", โ โ "status": "UP", โ โ "ipAddress": "192.168.1.1" โ โ }, โ โ { โ โ "portName": "GigabitEthernet0/1", โ โ "status": "DOWN", โ โ "ipAddress": null โ โ } โ โ ], โ โ "version": "1.0" โ โ } โ โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ``` --- ### 5. Data Formats **JSON (JavaScript Object Notation):** - Most common format for APIs - Lightweight, human-readable - Key-value pairs ```json { "device": { "hostname": "Router1", "interfaces": [ { "name": "GigabitEthernet0/0", "ip": "192.168.1.1", "status": "up" }, { "name": "GigabitEthernet0/1", "ip": "10.1.1.1", "status": "up" } ], "vendor": "Cisco" } } ``` **XML (Extensible Markup Language):** - Older format - More verbose than JSON - Uses tags ```xml <?xml version="1.0" encoding="UTF-8"?> <device> <hostname>Router1</hostname> <interfaces> <interface> <name>GigabitEthernet0/0</name> <ip>192.168.1.1</ip> <status>up</status> </interface> <interface> <name>GigabitEthernet0/1</name> <ip>10.1.1.1</ip> <status>up</status> </interface> </interfaces> <vendor>Cisco</vendor> </device> ``` **YAML (YAML Ain't Markup Language):** - Human-friendly data serialization - Uses indentation - Common in Ansible ```yaml device: hostname: Router1 interfaces: - name: GigabitEthernet0/0 ip: 192.168.1.1 status: up - name: GigabitEthernet0/1 ip: 10.1.1.1 status: up vendor: Cisco ``` --- ### 6. Network Management Protocols **NETCONF (Network Configuration Protocol):** - IETF standard (RFC 6241) - Uses XML for data encoding - Runs over SSH (port 830) - Supports configuration transactions **RESTCONF:** - REST-like interface to NETCONF - Uses HTTP/HTTPS - JSON/XML data formats - Simpler than NETCONF **gRPC (gRPC Remote Procedure Calls):** - Google-developed protocol - High performance - Used for streaming telemetry | Protocol | Transport | Data Format | Use Case | |----------|-----------|-------------|----------| | **NETCONF** | SSH (port 830) | XML | Configuration management | | **RESTCONF** | HTTP/HTTPS | JSON/XML | Programmatic access | | **gRPC** | HTTP/2 | Protobuf | Telemetry streaming | --- ### 7. Python for Network Automation **Basic Python Script for Device Connection (Netmiko):** ```python #!/usr/bin/env python3 from netmiko import ConnectHandler # Device connection parameters device = { 'device_type': 'cisco_ios', 'host': '192.168.1.1', 'username': 'admin', 'password': 'Cisco123', 'secret': 'Cisco123' } # Connect to device connection = ConnectHandler(**device) connection.enable() # Send configuration commands commands = [ 'interface GigabitEthernet0/0', 'description Connected to Core', 'no shutdown', 'exit' ] output = connection.send_config_set(commands) print(output) # Show running config output = connection.send_command('show running-config | include description') print(output) # Disconnect connection.disconnect() ``` **Python Script for REST API (Requests):** ```python #!/usr/bin/env python3 import requests import json # Disable SSL warnings (for lab only) requests.packages.urllib3.disable_warnings() # Authentication url = "https://dna.cisco.com/api/system/v1/auth/token" auth = ("admin", "Cisco123") response = requests.post(url, auth=auth, verify=False) token = response.json()["Token"] # Get devices headers = { "X-Auth-Token": token, "Content-Type": "application/json" } url = "https://dna.cisco.com/api/v1/device" response = requests.get(url, headers=headers, verify=False) devices = response.json() for device in devices["response"]: print(f"{device['hostname']} - {device['managementIpAddress']}") ``` --- ### 8. Ansible for Network Automation **Definition:** Ansible is an open-source automation tool that uses YAML playbooks to define desired states. **Ansible Architecture:** ``` โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ ANSIBLE ARCHITECTURE โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ โ โ Control Node (Ansible Server) โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ โ Playbook (YAML) โ โ โ โ โโโ Tasks โ โ โ โ โโโ Modules โ โ โ โ โโโ Variables โ โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ โ โ โ โ SSH (no agent required) โ โ โผ โ โ Managed Nodes (Network Devices) โ โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ โ โ Router 1 โ โ Switch 1 โ โ Router 2 โ โ โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ``` **Ansible Playbook Example:** ```yaml --- - name: Configure VLANs on switches hosts: switches gather_facts: false vars: vlans: - id: 10 name: Engineering - id: 20 name: Sales - id: 30 name: IT tasks: - name: Create VLANs cisco.ios.ios_vlan: name: "{{ item.name }}" vlan_id: "{{ item.id }}" state: present loop: "{{ vlans }}" - name: Configure trunk ports cisco.ios.ios_interface: name: "{{ item }}" mode: trunk trunk_allowed_vlans: "10,20,30" loop: - GigabitEthernet0/24 - GigabitEthernet0/25 - name: Verify configuration cisco.ios.ios_command: commands: - show vlan brief - show interfaces trunk register: output - name: Display output debug: var: output.stdout_lines ``` --- ### 9. Cisco DevNet and Sandboxes **DevNet:** Cisco's developer program providing learning resources, APIs, and sandboxes for network automation. ``` โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ CISCO DEVNET RESOURCES โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ โ โ DevNet Sandboxes: โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ โ โข Always-on sandboxes (no reservation) โ โ โ โ โข Reserved sandboxes (full control) โ โ โ โ โข Cisco DNA Center, Meraki, ACI, UCS, etc. โ โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ โ โ DevNet Learning: โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ โ โข Learning labs โ โ โ โ โข Certification resources โ โ โ โ โข API documentation โ โ โ โ โข Code exchange โ โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ``` **Cisco DevNet Sandbox Access:** ```python # Example: Accessing Cisco DevNet Sandbox import requests # Meraki Sandbox credentials api_key = "YOUR_API_KEY" org_id = "YOUR_ORG_ID" # Get organization networks url = f"https://api.meraki.com/api/v1/organizations/{org_id}/networks" headers = { "X-Cisco-Meraki-API-Key": api_key } response = requests.get(url, headers=headers) print(response.json()) ``` --- ### 10. Model-Driven Programmability **YANG (Yet Another Next Generation):** - Data modeling language for network configuration - Used by NETCONF, RESTCONF, and gRPC ``` โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ YANG MODEL EXAMPLE โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ โ โ module interface { โ โ namespace "http://example.com/interface"; โ โ prefix "if"; โ โ โ โ container interfaces { โ โ list interface { โ โ key "name"; โ โ leaf name { โ โ type string; โ โ } โ โ leaf ip-address { โ โ type string; โ โ } โ โ leaf status { โ โ type enumeration { โ โ enum "up"; โ โ enum "down"; โ โ } โ โ } โ โ } โ โ } โ โ } โ โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ``` --- ### 11. Configuration Management **Infrastructure as Code (IaC):** - Manage network infrastructure using code (version control) - Treat infrastructure like software **Git for Network Automation:** ``` # Version control for network configurations git init git add configs/ git commit -m "Initial router configurations" git push origin main # Rollback to previous config git revert <commit-hash> ``` **CI/CD Pipeline for Network Automation:** ``` โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ CI/CD PIPELINE โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ โ โ Developer โ Git Push โ CI/CD Server โ Tests โ Deploy โ โ โ โ Steps: โ โ 1. Code change in Git โ โ 2. Automated syntax check โ โ 3. Unit tests (simulation) โ โ 4. Deploy to lab environment โ โ 5. Integration tests โ โ 6. Deploy to production โ โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ``` --- ### 12. Network Telemetry **Streaming Telemetry vs. SNMP Polling:** | Feature | SNMP Polling | Streaming Telemetry | |---------|--------------|---------------------| | **Method** | Pull (polling) | Push (streaming) | | **Efficiency** | Low (many polls) | High (continuous) | | **Granularity** | Seconds/minutes | Milliseconds | | **Data Model** | MIBs | YANG models | | **Protocol** | UDP | gRPC, NETCONF | **Telemetry Example (gRPC):** ``` โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ STREAMING TELEMETRY โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ โ โ Network Device โ gRPC Stream โ Telemetry Collector โ Analytics โ โ โ โ Data Streamed: โ โ โโโ Interface statistics (every 10 seconds) โ โ โโโ CPU/Memory utilization โ โ โโโ Routing table changes โ โ โโโ BGP peer state changes โ โ โโโ Flow telemetry (NetFlow/IPFIX) โ โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ``` --- ## โ Exam Tips (For CCNA 200-301) | Topic | What Cisco Tests | |-------|------------------| | **SDN** | Separation of control and data plane | | **Cisco DNA Center** | Centralized management, automation, assurance | | **REST APIs** | HTTP methods (GET, POST, PUT, DELETE) | | **Data Formats** | JSON, XML, YAML | | **NETCONF/RESTCONF** | Configuration protocols over SSH/HTTP | | **Ansible** | YAML playbooks, agentless automation | | **DevNet** | Cisco developer resources and sandboxes | ### Common Exam Scenarios: **Scenario 1:** "Which Cisco platform provides intent-based networking with automation and assurance capabilities?" - **Answer:** Cisco DNA Center **Scenario 2:** "A developer needs to retrieve device information from a Cisco device using a REST API. Which HTTP method should be used?" - **Answer:** GET **Scenario 3:** "Which data format is most commonly used in Ansible playbooks?" - **Answer:** YAML --- ## ๐ Summary (1-Minute Revision) ``` NETWORK AUTOMATION: SDN ARCHITECTURE: โโโ Application Layer (Business apps) โโโ Control Layer (Controller) โโโ Infrastructure Layer (Devices) CISCO DNA CENTER: โโโ Automation: Day 0/1/2 provisioning โโโ Assurance: Network/client health โโโ Security: Segmentation, policy โโโ Platform: REST APIs REST APIs: โโโ GET: Retrieve โโโ POST: Create โโโ PUT/PATCH: Update โโโ DELETE: Remove DATA FORMATS: โโโ JSON: Key-value, lightweight โโโ XML: Tag-based, verbose โโโ YAML: Indentation-based, Ansible AUTOMATION TOOLS: โโโ Python (Netmiko, Requests) โโโ Ansible (YAML playbooks) โโโ NETCONF (SSH, XML) โโโ RESTCONF (HTTP, JSON/XML) DEVOPS PRACTICES: โโโ Infrastructure as Code โโโ Version control (Git) โโโ CI/CD pipelines โโโ Automated testing ``` --- ## ๐งช Practice Questions **1. Which layer of SDN is responsible for forwarding packets?** - A) Application Layer - B) Control Layer - C) Infrastructure Layer - D) Management Layer <details> <summary>Answer</summary> <b>C) Infrastructure Layer</b> - The infrastructure layer contains network devices that forward packets (data plane). </details> **2. Which HTTP method is used to retrieve data from a REST API?** - A) POST - B) PUT - C) GET - D) DELETE <details> <summary>Answer</summary> <b>C) GET</b> - GET retrieves data from a REST API without modifying resources. </details> **3. Which data format uses indentation to define structure and is commonly used in Ansible?** - A) JSON - B) XML - C) YAML - D) CSV <details> <summary>Answer</summary> <b>C) YAML</b> - YAML uses indentation and is the standard format for Ansible playbooks. </details> **4. Which Cisco platform provides intent-based networking?** - A) Cisco IOS - B) Cisco DNA Center - C) Cisco Prime - D) Cisco ISE <details> <summary>Answer</summary> <b>B) Cisco DNA Center</b> - Cisco DNA Center provides intent-based networking with automation, assurance, and security. </details> **5. Which protocol is used for streaming telemetry?** - A) SNMP - B) NETCONF - C) gRPC - D) RESTCONF <details> <summary>Answer</summary> <b>C) gRPC</b> - gRPC is used for high-performance streaming telemetry. </details> **6. What does the HTTP status code 200 indicate?** - A) Created - B) OK (Success) - C) Not Found - D) Unauthorized <details> <summary>Answer</summary> <b>B) OK (Success)</b> - Status code 200 indicates the request was successful. </details> **7. Which Python library is commonly used for network device SSH connections?** - A) requests - B) netmiko - C) paramiko - D) flask <details> <summary>Answer</summary> <b>B) netmiko</b> - Netmiko is designed specifically for network device SSH connections. </details> **8. Which protocol uses SSH on port 830?** - A) RESTCONF - B) NETCONF - C) gRPC - D) SNMP <details> <summary>Answer</summary> <b>B) NETCONF</b> - NETCONF runs over SSH on TCP port 830. </details> **9. What does the HTTP status code 401 indicate?** - A) OK - B) Not Found - C) Unauthorized - D) Created <details> <summary>Answer</summary> <b>C) Unauthorized</b> - Status code 401 indicates authentication is required. </details> **10. Which DevOps practice involves managing infrastructure using code and version control?** - A) Continuous Integration - B) Infrastructure as Code - C) Continuous Deployment - D) Agile Development <details> <summary>Answer</summary> <b>B) Infrastructure as Code</b> - IaC manages infrastructure using code and version control. </details> **11. Which data format is most verbose and uses tags?** - A) JSON - B) XML - C) YAML - D) CSV <details> <summary>Answer</summary> <b>B) XML</b> - XML uses opening and closing tags, making it more verbose than JSON or YAML. </details> **12. What is the purpose of the northbound API in SDN?** - A) Communicate between controller and devices - B) Communicate between applications and controller - C) Communicate between devices - D) Communicate between controllers <details> <summary>Answer</summary> <b>B) Communicate between applications and controller</b> - Northbound APIs allow applications to interact with the SDN controller. </details> --- ## ๐ Next Steps After completing Video 19, you should be ready for: - **Video 20:** Network Management and Monitoring - **Video 21:** Final Exam Review and Practice **Lab Practice:** 1. Explore Cisco DevNet sandboxes 2. Use Postman to test REST APIs 3. Write Python script to retrieve device information via NETCONF 4. Create Ansible playbook to configure VLANs 5. Explore Cisco DNA Center APIs --- **Ready for Video 20?** Share the link or say "next" and I'll continue with Network Management and Monitoring (SNMP, Syslog, NetFlow, and SPAN). I'll create comprehensive deep notes for **Video 20: Network Management and Monitoring** based on the standard CCNA 200-301 curriculum. ---