Cyber Services / All lessons / CCNA — Networking / Day 12 — QoS, VPN, IPsec & Automation

Day 12 — QoS, VPN, IPsec & Automation

Module 12 of 12 · 7 min read · Free to read

MODULES ↓ Command blocks have a COPY button

Network Automation, QoS & VPN/IPsec

Mastering network automation, quality of service, and secure VPN implementations

Network Automation
Data Formats
APIs
QoS Concepts
VPN & IPsec

Network Automation

Automating network operations for efficiency and scalability

Automation Benefits
  • 24/7 operation without breaks
  • More uniform product output
  • Collection of vast amounts of data for analysis
  • Use in dangerous conditions (mining, firefighting)
  • Smart devices that reduce energy usage
  • Medical diagnosis and driving safety improvements
Smart Devices

Devices that can alter their behavior based on external information are considered "smart":

1

Smart Technology

Devices incorporate intelligence to govern behavior

2

Environmental Adaptation

Devices alter behavior based on their environment

3

Network Automation Tools

Programming required for devices to "think"

Examples of Smart Devices

  • Smart appliances reducing power during peak demand
  • Self-driving cars
  • Smart thermostats
  • Industrial automation systems

Data Formats

Structured formats for storing and exchanging data

Common Data Formats
Format Full Name Primary Use
HTML Hypertext Markup Language Web page structure
XML eXtensible Markup Language Data representation
JSON JavaScript Object Notation Data interchange
YAML YAML Ain't Markup Language Configuration files

Data Format Rules

  • Syntax: Brackets {}, [], white space, quotes, commas
  • Object Representation: Characters, strings, lists, arrays
  • Key/Value Pairs: Key identifies data, value is the data itself
JSON Format

JSON is a human-readable data format used by applications for storing, transferring and reading data:

{ "ietf-interfaces:interface": { "name": "GigabitEthernet0/0/0", "description": "Wide Area Network", "enabled": true, "ietf-ip:ipv4": { "address": [ { "ip": "172.16.0.2", "netmask": "255.255.255.0" } ] } } }

JSON Syntax Rules

  • Hierarchical structure with nested values
  • Braces { } hold objects, brackets [ ] hold arrays
  • Data written as key/value pairs
  • Keys must be strings in double quotes
  • Values can be string, number, array, boolean, null, or object

APIs

Application Programming Interfaces for application interaction

API Concept

An API is software that allows other applications to access its data or services:

API Request/Response Flow
User
API
Applications/Data
1

API Request

User sends request to server for specific information

2

API Response

Server processes request and returns data

API Analogy

An API is like a waiter in a restaurant - it takes your order (request) and brings your food (response).

API Types
Type Description Examples
Open/Public APIs Publicly available with no restrictions Google Maps API, Twitter API
Internal/Private APIs Used within organization for internal use Sales data access for sales team
Partner APIs Used between company and business partners Travel service using airline API

Web Service APIs

Type Data Format Strengths
SOAP XML Well-established
REST JSON, XML, YAML Flexible, widely used
XML-RPC XML Well-established, simple
JSON-RPC JSON Simple

REST and RESTful APIs

Representational State Transfer for web services

RESTful Features

An API is considered "RESTful" if it has these features:

1

Client-Server

Client handles front end, server handles back end

2

Stateless

No client data stored on server between requests

3

Cacheable

Clients can cache responses to improve performance

RESTful Operations

HTTP Method RESTful Operation Description
POST Create Create new resource
GET Read Retrieve resource
PUT/PATCH Update Modify existing resource
DELETE Delete Remove resource
RESTful Request Anatomy
http://www.mapquestapi.com/directions/v2/route?outFormat=json&key=KEY&from=San+Jose,Ca&to=Monterey,Ca

Request Components

  • API Server: Server that answers REST requests
  • Resources: Specific API being requested
  • Query: Data format and request information
  • Format: Usually JSON, but can be YAML or XML
  • Key: Authorization key if required
  • Parameters: Information pertaining to the request

API Keys

Many RESTful APIs require keys for:

  • Authentication and authorization
  • Limiting number of users
  • Tracking request frequency
  • Capturing and tracking data requests
  • Gathering user information

Configuration Management Tools

Automating network configuration and management

Traditional vs Automated

Traditional Configuration

  • Manual CLI configuration
  • Time-consuming for large networks
  • Prone to human error
  • Difficult to maintain consistency

Automated Configuration

  • Configuration management tools
  • Scalable across thousands of devices
  • Consistent configurations
  • Faster deployment

Automation Benefits

  • Software and version control
  • Device attributes (names, addressing, security)
  • Protocol configurations
  • ACL configurations
Configuration Tools
Tool Language Agent Type Management Output
Ansible Python + YAML Agentless Any device as controller Playbook
Chef Ruby Agent-based Chef Master Cookbook
Puppet Ruby Both Puppet Master Manifest
SaltStack Python Both Salt Master Pillar

Automation vs Orchestration

  • Automation: Tool automatically performs a task on a system
  • Orchestration: Arranging automated tasks into coordinated workflows

Quality of Service (QoS)

Managing network traffic to ensure performance for critical applications

QoS Overview

QoS becomes active when congestion occurs on network links:

1

Traffic Volume

When traffic exceeds network capacity, packets are queued

2

Queue Delay

Queuing packets causes delay as they wait for transmission

3

Packet Loss

If queues fill up, packets are dropped

Congestion Points

  • Aggregation: Multiple links feeding into one
  • Speed Mismatch: Fast link feeding slow link
  • LAN to WAN: High-speed LAN to slower WAN
Network Transmission Issues
Issue Description Impact
Bandwidth Bits transmitted per second (bps) Overall capacity
Latency Time for packet to travel source to destination Delay in communication
Jitter Variation in latency Uneven packet arrival
Loss Packets dropped during transmission Data retransmission

Voice and Video Requirements

  • Voice: Minimal delay, jitter, and loss
  • Video: Higher bandwidth than voice
  • Data: Can tolerate delay but not loss

QoS Mechanisms

Techniques for managing network traffic quality

Classification and Marking
1

Classification

Identifying traffic types and sorting into classes

2

Marking

Adding QoS information to packet headers

3

Trust Boundaries

Points where QoS markings are accepted or rewritten

Marking Locations

  • Layer 2: 802.1Q/p Class of Service (CoS) - 3 bits
  • Layer 3: IP Precedence (IPP) - 3 bits
  • Layer 3: Differentiated Services Code Point (DSCP) - 6 bits
Queuing and Dropping

Queuing Algorithms

  • FIFO: First In, First Out
  • WFQ: Weighted Fair Queuing
  • CBWFQ: Class-Based Weighted Fair Queuing
  • LLQ: Low Latency Queuing

Dropping Algorithms

  • Tail Drop: Drops new packets when queue is full
  • WRED: Weighted Random Early Detection

Congestion Avoidance

  • Monitors network traffic loads to anticipate and avoid congestion
  • Uses WRED to drop packets before queues become full
  • TCP traffic backs off when packets are dropped

VPN and IPsec

Secure remote access and site-to-site connectivity

VPN Benefits
  • Cost savings - Eliminates expensive dedicated WAN links
  • Security - Encryption, strong authentication
  • Scalability - Easy to add more users
  • Compatibility with broadband
  • Remote worker support

VPN Types

Type Description Use Case
Site-to-Site Connects entire networks Branch office connectivity
Remote Access Connects individual users Teleworkers, mobile users
IPsec VPN

IPsec is a framework of open standards that provides secure communications:

1

Confidentiality

Encryption prevents unauthorized reading of packets

2

Integrity

Ensures packets haven't been altered in transit

3

Authentication

Verifies identity of source

IPsec Protocols

Protocol Function Description
AH Authentication Data integrity and origin authentication
ESP Encryption Confidentiality, authentication, integrity

IPsec Components

Building blocks of IPsec VPN implementation

IPsec Modes

Tunnel Mode

  • Entire original packet encrypted
  • New IP header added
  • Used between gateways
  • Hides original IP addresses

Transport Mode

  • Only payload encrypted
  • Original IP header preserved
  • Used between end devices
  • Faster but less secure
IPsec Tunnel Mode
Original Packet
IP Header + Data
Encrypted Packet
New IP Header + ESP/AH + Encrypted Data
IPsec Framework
1

IKE Phase 1

Authenticates peers and establishes secure channel

2

IKE Phase 2

Negotiates IPsec parameters and establishes IPsec tunnel

3

Data Transfer

Secure data exchange through IPsec tunnel

4

Tunnel Termination

Session teardown when no longer needed

IKE Protocols

  • ISAKMP: Framework for authentication and key exchange
  • Oakley: Key exchange protocol using Diffie-Hellman

SSL VPNs

Web-based VPN access for remote users

SSL VPN Overview

SSL VPNs provide remote access using a web browser and SSL/TLS protocol:

1

Clientless

Access through web browser without VPN client

2

SSL Tunnel

Client software provides full network access

Clientless SSL VPN

  • Uses web browser with SSL/TLS encryption
  • Provides access to limited services (web, email, file shares)
  • No special client software required
  • Easy to deploy and maintain
SSL VPN vs IPsec VPN
Feature SSL VPN IPsec VPN
Deployment Easy, uses web browser Requires client software
Access Application-level Network-level
Firewall Traversal Uses port 443 (HTTPS) May require special rules
Security Good for most applications Stronger, more comprehensive

SSL VPN Advantages

  • Easy to implement and use
  • Can traverse most firewalls
  • No special client in clientless mode
  • Granular access control

Day 12 Summary

Key concepts for Network Automation, QoS, and VPN/IPsec

Network Automation

  • Benefits of automation
  • Smart devices and technology
  • Data formats (JSON, XML, YAML)
  • APIs and RESTful services
  • Configuration management tools

Quality of Service

  • Congestion management
  • Classification and marking
  • Queuing algorithms
  • Dropping mechanisms
  • Voice and video requirements

VPN & IPsec

  • Site-to-site and remote access VPNs
  • IPsec confidentiality, integrity, authentication
  • Tunnel vs transport mode
  • IKE phase 1 and phase 2
  • SSL VPNs for web-based access

Data Formats

  • JSON syntax and structure
  • XML for data representation
  • YAML for configuration files
  • Key/value pairs in data structures

APIs

  • API request/response model
  • RESTful API characteristics
  • API keys for authentication
  • HTTP methods (GET, POST, PUT, DELETE)
  • API server and resource access
Modules (12) ← CCNA — Networking