Network Automation, QoS & VPN/IPsec
Mastering network automation, quality of service, and secure VPN implementations
Network Automation
Automating network operations for efficiency and scalability
- 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
Devices that can alter their behavior based on external information are considered "smart":
Smart Technology
Devices incorporate intelligence to govern behavior
Environmental Adaptation
Devices alter behavior based on their environment
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
| 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 is a human-readable data format used by applications for storing, transferring and reading data:
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
An API is software that allows other applications to access its data or services:
API Request
User sends request to server for specific information
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).
| 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
An API is considered "RESTful" if it has these features:
Client-Server
Client handles front end, server handles back end
Stateless
No client data stored on server between requests
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 |
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 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
| 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 becomes active when congestion occurs on network links:
Traffic Volume
When traffic exceeds network capacity, packets are queued
Queue Delay
Queuing packets causes delay as they wait for transmission
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
| 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
Identifying traffic types and sorting into classes
Marking
Adding QoS information to packet headers
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 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
- 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 is a framework of open standards that provides secure communications:
Confidentiality
Encryption prevents unauthorized reading of packets
Integrity
Ensures packets haven't been altered in transit
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
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
IP Header + Data
New IP Header + ESP/AH + Encrypted Data
IKE Phase 1
Authenticates peers and establishes secure channel
IKE Phase 2
Negotiates IPsec parameters and establishes IPsec tunnel
Data Transfer
Secure data exchange through IPsec tunnel
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 VPNs provide remote access using a web browser and SSL/TLS protocol:
Clientless
Access through web browser without VPN client
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
| 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