πŸ—ΊοΈ Network Topology & Device Architecture

Topology Diagrams & Network Device Planes

πŸ—ΊοΈ 6.4 Interpret Network Topology Diagrams

Overview

Network topology diagrams visually represent how devices are connected, including switches, routers, firewalls, load balancers, and the ports/protocols they use. Interpreting these diagrams is essential for understanding network architecture and troubleshooting.

graph TD A["Network Topology"] --> B["Physical Topology"] A --> C["Logical Topology"] B --> B1["Devices & Cables"] B --> B2["Port Connections"] B --> B3["Physical Layout"] C --> C1["IP Addressing"] C --> C2["VLANs"] C --> C3["Routing"] style A fill:#667eea,stroke:#764ba2,stroke-width:3px,color:#fff style B fill:#66bb6a,stroke:#2e7d32,stroke-width:2px,color:#fff style C fill:#42a5f5,stroke:#1976d2,stroke-width:2px,color:#fff

1. Example Network Topology - Enterprise Network

🏒 Complete Network Architecture

Scenario: A typical enterprise network with internet connectivity, security, and internal services

graph TB Internet["Internet"] Internet --> FW["Firewall
Port: 443/TCP
10.0.0.1"] FW --> RTR["Core Router
Gi0/0: 10.0.0.2
Gi0/1: 192.168.1.1
Gi0/2: 192.168.2.1"] RTR --> SW1["Core Switch
VLAN 10, 20, 30
192.168.1.2"] RTR --> LB["Load Balancer
VIP: 192.168.2.100
Ports: 80, 443"] SW1 --> ACC1["Access Switch 1
VLAN 10
Ports: Fa0/1-24"] SW1 --> ACC2["Access Switch 2
VLAN 20
Ports: Fa0/1-24"] LB --> SRV1["Web Server 1
192.168.2.10:80"] LB --> SRV2["Web Server 2
192.168.2.11:80"] LB --> SRV3["Web Server 3
192.168.2.12:80"] ACC1 --> PC1["Engineering PCs
192.168.10.0/24"] ACC2 --> PC2["Sales PCs
192.168.20.0/24"] style Internet fill:#e3f2fd,stroke:#1976d2,stroke-width:2px style FW fill:#ffebee,stroke:#c62828,stroke-width:3px,color:#fff style RTR fill:#667eea,stroke:#764ba2,stroke-width:3px,color:#fff style SW1 fill:#66bb6a,stroke:#2e7d32,stroke-width:2px,color:#fff style LB fill:#ffa726,stroke:#e65100,stroke-width:2px,color:#fff

Topology Interpretation

NETWORK FLOW:
Internet β†’ Firewall β†’ Router β†’ Core Switch β†’ Access Switches β†’ End Devices
        ↳ Load Balancer β†’ Web Servers

DEVICE BREAKDOWN:

1. Firewall (10.0.0.1)
   - Port: 443/TCP (HTTPS)
   - Function: Security boundary between Internet and internal network
   - Filters incoming traffic

2. Core Router
   - Gi0/0: 10.0.0.2 (WAN side, connects to firewall)
   - Gi0/1: 192.168.1.1 (LAN side, gateway for core switch)
   - Gi0/2: 192.168.2.1 (Server subnet gateway)
   - Function: Routes between networks, inter-VLAN routing

3. Core Switch (192.168.1.2)
   - Manages VLANs: 10, 20, 30
   - Function: Aggregates access switches, VLAN distribution

4. Access Switch 1 (VLAN 10)
   - Ports: Fa0/1-24 (FastEthernet 100Mbps)
   - Connects: Engineering department PCs
   - Subnet: 192.168.10.0/24

5. Access Switch 2 (VLAN 20)
   - Ports: Fa0/1-24
   - Connects: Sales department PCs
   - Subnet: 192.168.20.0/24

6. Load Balancer (VIP: 192.168.2.100)
   - Ports: 80 (HTTP), 443 (HTTPS)
   - Distributes traffic across 3 web servers
   - Provides high availability

7. Web Servers (192.168.2.10-12)
   - Port: 80 (HTTP)
   - Backend application servers
   - Load balanced for redundancy

KEY INSIGHTS:
βœ… Three-tier architecture (Core-Distribution-Access)
βœ… Firewall at network edge for security
βœ… VLANs separate departments
βœ… Load balancer for application HA
βœ… Multiple subnets (10.0.0.0/24, 192.168.1.0/24, 192.168.2.0/24, etc.)

2. Understanding Port Numbers and Protocols

πŸ”Œ Common Ports in Network Diagrams

Key Concept: Port numbers identify specific services and applications in network communications

Well-Known Ports (0-1023)

Port Protocol Service Common in Diagrams
22 TCP SSH Remote device management
23 TCP Telnet Insecure remote access
53 TCP/UDP DNS Domain name resolution
80 TCP HTTP Web traffic (unencrypted)
443 TCP HTTPS Secure web traffic
161/162 UDP SNMP Network monitoring
830 TCP NETCONF Network configuration over SSH

Interface Port Notation

# Cisco Port Naming Convention

FastEthernet0/1          Fa0/1     100 Mbps
GigabitEthernet0/1       Gi0/1     1 Gbps
TenGigabitEthernet0/1    Te0/1     10 Gbps

Format: InterfaceType Slot/Port
  or: InterfaceType Module/Slot/Port

Examples in Topology:
  Gi0/0/1  β†’ GigabitEthernet, Module 0, Slot 0, Port 1
  Fa0/24   β†’ FastEthernet, Slot 0, Port 24
  Gi1/0/1  β†’ GigabitEthernet, Module 1, Slot 0, Port 1

Topology Symbols Legend

Symbol Device Function
πŸ”· Switch Layer 2 frame forwarding
πŸ”Ά Router Layer 3 packet routing
πŸ›‘οΈ Firewall Traffic filtering and security
βš–οΈ Load Balancer Distributes traffic across servers
πŸ–₯️ Server Application/service hosting
πŸ’» End Device PC, laptop, phone

3. Redundant Topology with Failover

πŸ”„ High Availability Network Design

Scenario: Redundant paths for fault tolerance and load distribution

graph TB Internet["Internet"] Internet --> FW1["Firewall 1
Primary
203.0.113.1:443"] Internet --> FW2["Firewall 2
Backup
203.0.113.2:443"] FW1 --> RTR1["Router 1
HSRP Priority 110
VIP: 192.168.1.1"] FW2 --> RTR2["Router 2
HSRP Priority 100
VIP: 192.168.1.1"] RTR1 --> SW1["Core Switch 1"] RTR1 --> SW2["Core Switch 2"] RTR2 --> SW1 RTR2 --> SW2 SW1 --> ACC["Access Layer"] SW2 --> ACC style FW1 fill:#66bb6a,stroke:#2e7d32,stroke-width:3px,color:#fff style FW2 fill:#90a4ae,stroke:#455a64,stroke-width:2px,color:#fff style RTR1 fill:#667eea,stroke:#764ba2,stroke-width:3px,color:#fff style RTR2 fill:#90a4ae,stroke:#455a64,stroke-width:2px,color:#fff

Redundancy Interpretation

REDUNDANCY FEATURES:

1. Dual Firewalls
   - Primary: 203.0.113.1 (active)
   - Backup: 203.0.113.2 (standby)
   - Failover: Automatic if primary fails

2. HSRP (Hot Standby Router Protocol)
   - Virtual IP (VIP): 192.168.1.1
   - Router 1: Priority 110 (Active)
   - Router 2: Priority 100 (Standby)
   - Provides gateway redundancy

3. Dual Core Switches
   - SW1 and SW2 for redundancy
   - Both connected to both routers
   - STP prevents loops

4. Multiple Paths
   - Traffic can flow through either firewall
   - If FW1 fails β†’ FW2 takes over
   - If RTR1 fails β†’ RTR2 becomes active

INTERPRETING DIAGRAM:
β†’ Solid lines: Primary paths
β†’ Multiple connections: Redundancy
β†’ VIP notation: Virtual/shared IP address
β†’ Priority numbers: HSRP election (higher = active)

4. Reading Topology Diagrams - Key Skills

πŸ“– How to Interpret Network Diagrams

Essential Skills: What to look for when analyzing network topology diagrams

Topology Analysis Checklist

  • Identify Entry Point: Where does traffic enter? (Usually Internet or WAN)
  • Security Devices: Locate firewalls and their position in flow
  • Routing Devices: Find routers and their interface IPs
  • Switching Hierarchy: Core β†’ Distribution β†’ Access layers
  • Port Numbers: Note service ports (80, 443, 22, etc.)
  • IP Addressing: Identify subnets and IP ranges
  • VLANs: Look for VLAN IDs and segmentation
  • Redundancy: Multiple paths, backup devices, VIPs
  • Load Balancers: Traffic distribution points
  • Interface Types: Gi, Fa, Te ports and speeds
  • Traffic Flow: Trace path from source to destination
  • Single Points of Failure: Devices with no redundancy

Common Topology Patterns

Pattern Description Use Case
Three-Tier Core-Distribution-Access Large enterprise networks
Two-Tier (Collapsed) Core/Distribution + Access Medium-sized networks
Hub and Spoke Central hub with branch spokes WAN, branch offices
Full Mesh All devices interconnected High redundancy, data centers
Partial Mesh Some redundant paths Balance cost and redundancy

πŸ—οΈ 6.5 Management, Data & Control Planes

Overview

Network devices operate using three distinct planes: the Data Plane forwards traffic, the Control Plane makes forwarding decisions, and the Management Plane provides device configuration and monitoring.

graph TD A["Network Device Architecture"] --> B["Management Plane"] A --> C["Control Plane"] A --> D["Data Plane"] B --> B1["SSH/Telnet"] B --> B2["SNMP"] B --> B3["NETCONF/RESTCONF"] C --> C1["Routing Protocols"] C --> C2["STP"] C --> C3["ARP"] D --> D1["Packet Forwarding"] D --> D2["Frame Switching"] D --> D3["ACL Processing"] style A fill:#667eea,stroke:#764ba2,stroke-width:3px,color:#fff style B fill:#ab47bc,stroke:#6a1b9a,stroke-width:2px,color:#fff style C fill:#ffa726,stroke:#e65100,stroke-width:2px,color:#fff style D fill:#66bb6a,stroke:#2e7d32,stroke-width:2px,color:#fff

1. Data Plane (Forwarding Plane)

πŸ“¦ Packet/Frame Forwarding

Function: The data plane is responsible for actual forwarding of packets and frames based on decisions made by the control plane

Data Plane Characteristics

Aspect Details
Also Called Forwarding Plane, User Plane
Primary Function Forward packets/frames from input to output port
Hardware ASICs (Application-Specific Integrated Circuits)
Speed Wire-speed forwarding (hardware-based)
Processes Lookup in FIB/CEF, MAC table, TCAM

Data Plane Operations

  • Layer 2 Switching: Forward frames based on MAC address table
  • Layer 3 Routing: Forward packets based on FIB (Forwarding Information Base)
  • ACL Processing: Apply access control lists to filter traffic
  • QoS Marking: Apply quality of service policies
  • NAT Translation: Translate IP addresses
  • Encapsulation/Decapsulation: Add/remove headers
# Data Plane Flow (Simplified)

1. Packet arrives on interface
2. Check destination MAC address (Layer 2)
3. Lookup in MAC address table
4. If local β†’ forward to port
5. If not local β†’ pass to Layer 3

Layer 3 Processing:
1. Lookup destination IP in FIB/CEF table
2. Determine outgoing interface
3. Apply ACLs (permit/deny)
4. Apply QoS policies
5. Rewrite MAC addresses (next-hop)
6. Forward packet out interface

# FIB (Forwarding Information Base)
Destination          Next-Hop         Interface
192.168.1.0/24      Direct           Gi0/1
10.0.0.0/8          192.168.1.254    Gi0/1
0.0.0.0/0           203.0.113.1      Gi0/0

2. Control Plane

🧠 Intelligence and Decision Making

Function: The control plane builds and maintains routing tables, MAC address tables, and makes decisions about how traffic should be forwarded

Control Plane Characteristics

Aspect Details
Primary Function Build routing tables, learn MAC addresses, run protocols
Processing CPU-based (software)
Speed Slower than data plane (not time-critical)
Examples OSPF, EIGRP, BGP, STP, ARP

Control Plane Protocols

Protocol Purpose Plane Impact
OSPF/EIGRP/BGP Dynamic routing protocols Build routing table β†’ populates FIB
STP (Spanning Tree) Loop prevention Determines which ports forward frames
ARP IP-to-MAC resolution Builds ARP table for L2 forwarding
CDP/LLDP Neighbor discovery Learn topology, populate neighbor table
LACP Link aggregation Bundle multiple physical links
# Control Plane Example - OSPF

Router learns routes via OSPF:
1. OSPF hellos exchanged between routers
2. Build neighbor relationships
3. Exchange Link-State Advertisements (LSAs)
4. Build topology database
5. Run SPF algorithm
6. Populate routing table (RIB)
7. Push best routes to FIB (data plane)

Routing Table (RIB - Routing Information Base):
  O    10.1.1.0/24 [110/20] via 192.168.1.2, Gi0/1
  O    10.2.2.0/24 [110/30] via 192.168.1.3, Gi0/2
  C    192.168.1.0/24 is directly connected, Gi0/1

β†’ Control plane (CPU) calculates routes
β†’ Data plane (ASIC) forwards packets using FIB

3. Management Plane

βš™οΈ Device Configuration and Monitoring

Function: The management plane provides access for administrators to configure, monitor, and maintain network devices

Management Plane Characteristics

Aspect Details
Primary Function Device configuration, monitoring, troubleshooting
Access Methods SSH, Telnet, Console, HTTPS, APIs
Protocols SSH (port 22), SNMP (161/162), NETCONF (830), RESTCONF
Processing CPU-based
Priority Lower than control/data plane (should not affect forwarding)

Management Plane Access Methods

Method Port Use Case Security
SSH 22/TCP Secure CLI access βœ… Encrypted
Telnet 23/TCP Legacy CLI access ❌ Unencrypted
Console Serial Out-of-band access βœ… Physical access required
HTTPS (Web UI) 443/TCP GUI management βœ… Encrypted
SNMP 161-162/UDP Monitoring & polling ⚠️ SNMPv3 encrypted
NETCONF 830/TCP Programmatic config (XML) βœ… SSH-based
RESTCONF 443/TCP RESTful API (JSON) βœ… HTTPS
# Management Plane Operations

Administrative Tasks:
  β€’ Device configuration (CLI, API)
  β€’ Software upgrades (IOS, firmware)
  β€’ Log collection and analysis
  β€’ Performance monitoring
  β€’ Backup/restore configurations
  β€’ User account management

Protocols Used:
  SSH:       ssh admin@192.168.1.1
  SNMP:      snmpget -v3 -u admin 192.168.1.1 sysDescr
  NETCONF:    via port 830
  RESTCONF:  GET https://192.168.1.1/restconf/data/...

4. Plane Comparison and Interaction

πŸ”„ How the Planes Work Together

Relationship: All three planes work together to provide network connectivity

Comparison Table

Aspect Data Plane Control Plane Management Plane
Function Forward traffic Make decisions Configure & monitor
Processing Hardware (ASIC) Software (CPU) Software (CPU)
Speed Wire-speed (fastest) Medium Lowest priority
Examples Packet forwarding, ACLs, NAT OSPF, STP, ARP, BGP SSH, SNMP, NETCONF
Impact if Down No traffic forwarding Can't adapt to changes Can't manage device

How Planes Interact

WORKFLOW EXAMPLE: Adding a New Route

Management Plane:
  β†’ Administrator uses SSH to configure static route
  β†’ Command: ip route 10.5.5.0 255.255.255.0 192.168.1.254

Control Plane:
  β†’ Processes the configuration command
  β†’ Adds route to Routing Information Base (RIB)
  β†’ Calculates best path
  β†’ Programs route into Forwarding Information Base (FIB)

Data Plane:
  β†’ FIB updated with new route
  β†’ When packet arrives for 10.5.5.x:
    1. Lookup in FIB β†’ finds next-hop 192.168.1.254
    2. Rewrites destination MAC
    3. Forwards packet out correct interface

β†’ Management configures
β†’ Control calculates
β†’ Data forwards
graph TD M["Management Plane
Admin configures route"] --> C["Control Plane
Processes & calculates"] C --> D["Data Plane
Forwards packets"] M -.->|SSH, NETCONF| M C -.->|OSPF, BGP, STP| C D -.->|Hardware FIB| D style M fill:#ab47bc,stroke:#6a1b9a,stroke-width:3px,color:#fff style C fill:#ffa726,stroke:#e65100,stroke-width:3px,color:#fff style D fill:#66bb6a,stroke:#2e7d32,stroke-width:3px,color:#fff

🐍 Interactive Python Interpreter

πŸ’‘ How to use:
  • Write Python code in the editor
  • Click "β–Ά Run Code" to execute
  • Try sample code buttons
graph LR A["Internet"] --> B["Firewall"] B --> C["Router"] C --> D["Core Switch"] D --> E["Access Switch"] E --> F["End Devices"] C --> G["Load Balancer"] G --> H["Servers"] style A fill:#e3f2fd,stroke:#1976d2,stroke-width:2px style B fill:#ffebee,stroke:#c62828,stroke-width:2px style C fill:#667eea,stroke:#764ba2,stroke-width:3px,color:#fff style D fill:#66bb6a,stroke:#2e7d32,stroke-width:2px,color:#fff style E fill:#42a5f5,stroke:#1976d2,stroke-width:2px,color:#fff style G fill:#ffa726,stroke:#e65100,stroke-width:2px,color:#fff

1. Switches

πŸ”€ Layer 2 Frame Forwarding

Function: Switches forward frames based on MAC addresses within a local network segment

πŸ“– Diagram Explanation:
This sequence diagram shows a two-phase process:
  1. Phase 1 (Lines 1-6): User logs in with username/password, receives a JWT token
  2. Phase 2 (Lines 7-12): User makes API requests using the token instead of password
sequenceDiagram participant U as User participant C as Client App participant A as Auth API participant D as Device API participant DB as Database U->>C: Enter credentials C->>A: POST /auth/login Note right of C: {username, password} A->>DB: Verify credentials DB-->>A: User valid A-->>C: 200 OK + Token Note right of A: {token: abc123} C->>C: Store token U->>C: Request device list C->>D: GET /devices + Token Note right of C: Authorization: Bearer abc123 D->>D: Validate token D->>DB: Query devices DB-->>D: Device records D-->>C: 200 OK + Data Note right of D: [{id:1, name:R1}] C->>U: Display devices

Step-by-Step Interpretation

PHASE 1: LOGIN AND GET TOKEN
Step 1: User enters username and password into Client App
Step 2: Client sends POST request to /api/v1/auth/login with credentials
Step 3: Auth API queries Database to verify username and password
Step 4: Database confirms user is valid
Step 5: Auth API returns 200 OK with JWT token (e.g., "abc123...")
Step 6: Client App stores the token locally (memory, localStorage, etc.)

PHASE 2: USE TOKEN FOR API CALLS
Step 7: User requests to see device list
Step 8: Client sends GET /api/v1/devices with "Authorization: Bearer abc123" header
Step 9: Device API validates the token is authentic and not expired
Step 10: Device API queries Database for device records
Step 11: Database returns list of devices
Step 12: Device API returns 200 OK with JSON array of devices
Step 13: Client App displays devices to User

KEY INSIGHTS:
βœ… Password is only sent ONCE during login (Step 2)
βœ… Token is used for ALL subsequent API calls (Step 8, etc.)
βœ… Token can expire and requires re-authentication
βœ… More secure than sending password with every request

2. Routers

🌐 Layer 3 Packet Routing

Function: Routers forward packets between different networks based on IP addresses and routing tables

πŸ“– Diagram Explanation:
This shows cloud-managed networking where API calls flow through the Meraki Dashboard to cloud controllers, which then push configs to physical devices.
sequenceDiagram participant S as Script participant M as Meraki API participant C as Cloud participant AP as Access Point S->>M: GET /organizations Note right of S: Header: API-Key M-->>S: 200 OK Note right of M: [{id:123, name:Corp}] S->>M: POST /orgs/123/networks Note right of S: {name:Branch-5, type:wireless} M->>C: Provision network C-->>M: Network created M-->>S: 201 Created Note right of M: {id:net-456} S->>M: PUT /networks/net-456/ssids/0 Note right of S: {name:Corp-WiFi, enabled:true} M->>C: Update SSID C->>AP: Push config AP-->>C: Applied C-->>M: Success M-->>S: 200 OK

Step-by-Step Interpretation

Step 1-2: Script retrieves organization list using API key authentication
  β†’ Response: Organization ID 123 named "Corp"

Step 3-6: Script creates new wireless network in organization 123
  β†’ POST request with network name and type
  β†’ Meraki provisions network in cloud
  β†’ Response: Network ID "net-456" created (HTTP 201)

Step 7-12: Script configures WiFi SSID on the new network
  β†’ PUT request to update SSID 0
  β†’ Cloud controller receives config update
  β†’ Config is pushed to physical Access Point
  β†’ AP applies the configuration
  β†’ Success confirmation flows back through cloud to API
  β†’ Response: 200 OK

WORKFLOW PATTERN:
1. GET (retrieve org ID)
2. POST (create new resource)
3. PUT/PATCH (configure resource)

KEY INSIGHT:
β€’ Cloud-managed: Changes go through API β†’ Cloud β†’ Device
β€’ No direct device access needed
β€’ Centralized management

3. Firewalls

πŸ›‘οΈ Network Security and Traffic Filtering

Function: Firewalls control incoming and outgoing network traffic based on security rules and policies

πŸ“– Diagram Explanation:
Shows how DNA Center discovers devices, assigns them to sites, and deploys configuration templates.
sequenceDiagram participant S as Script participant D as DNA Center participant DB as Database participant R as Router S->>D: POST /auth/token Note right of S: Credentials D->>DB: Validate user DB-->>D: Authenticated D-->>S: 200 OK Note right of D: Token: xyz789 S->>D: POST /network-device/ip Note right of S: IP: 10.1.1.1 D->>R: CDP/LLDP Discovery R-->>D: Device info D->>DB: Store device D-->>S: 202 Accepted Note right of D: taskId: task-123 S->>D: GET /task/task-123 D-->>S: 200 OK Note right of D: Device added S->>D: POST /template-deployment Note right of S: deviceId + templateId D->>R: Deploy via NETCONF R-->>D: Config applied D-->>S: 200 OK

Step-by-Step Interpretation

AUTHENTICATION:
Step 1-4: Script authenticates to DNA Center
  β†’ POST to /auth/token with credentials
  β†’ DNAC validates user in database
  β†’ Returns authentication token (xyz789)

DEVICE DISCOVERY:
Step 5-9: Script initiates device discovery
  β†’ POST device IP address (10.1.1.1)
  β†’ DNAC uses CDP/LLDP to discover device
  β†’ Router responds with device information
  β†’ DNAC stores device in inventory database
  β†’ Returns task ID (202 Accepted - async operation)

TASK MONITORING:
Step 10-11: Script polls for task completion
  β†’ GET /task/{taskId} to check status
  β†’ Returns progress update

TEMPLATE DEPLOYMENT:
Step 12-15: Script deploys configuration template
  β†’ POST with device ID and template ID
  β†’ DNAC pushes config to router via NETCONF
  β†’ Router applies configuration
  β†’ Returns 200 OK (success)

PATTERN:
β€’ Asynchronous operations (discovery returns task ID)
β€’ Polling required for long-running tasks
β€’ Uses NETCONF for device configuration

4. Load Balancers

βš–οΈ Traffic Distribution and High Availability

Function: Load balancers distribute incoming traffic across multiple servers to optimize resource usage and ensure availability

πŸ“– Diagram Explanation:
Demonstrates error handling in API calls - what happens when configuration fails and how to handle rollback scenarios.
sequenceDiagram participant S as Script participant R as Router RESTCONF participant D as Device OS Note over S,D: SUCCESS SCENARIO S->>R: GET /interfaces/Gi1 R->>D: Read config D-->>R: Interface data R-->>S: 200 OK Note right of R: {enabled: false} S->>R: PATCH /interfaces/Gi1 Note right of S: {enabled: true, desc: WAN} R->>D: Apply config D-->>R: Applied R-->>S: 204 No Content Note over S,D: ERROR SCENARIO S->>R: PATCH /interfaces/Gi99 Note right of S: {enabled: true} R->>D: Check interface D-->>R: Not found R-->>S: 404 Not Found Note right of R: Interface Gi99 missing S->>S: Log error

Step-by-Step Interpretation

SUCCESSFUL CONFIGURATION (Steps 1-8):
Step 1-4: Script reads current interface configuration
  β†’ GET interface Gi1 current state
  β†’ Device OS retrieves config
  β†’ Returns interface is disabled (enabled: false)

Step 5-8: Script updates interface configuration
  β†’ PATCH to enable interface and add description
  β†’ Device OS applies the changes
  β†’ Returns 204 No Content (successful, no body needed)

ERROR SCENARIO (Steps 9-13):
Step 9-12: Script attempts to configure non-existent interface
  β†’ PATCH interface Gi99 (which doesn't exist)
  β†’ Device OS checks interface existence
  β†’ Interface not found in configuration
  β†’ Returns 404 Not Found with error message

Step 13: Script handles error gracefully
  β†’ Logs the error for troubleshooting
  β†’ Continues with next operation (doesn't crash)

KEY INSIGHTS:
βœ… Always GET before PATCH to verify resource exists
βœ… Handle HTTP error codes (404, 400, 500)
βœ… Implement try/except in scripts
βœ… Log errors for debugging

5. Reading Sequence Diagrams - Quick Reference

πŸ“š Sequence Diagram Symbols and Notation

Reference Guide: Understanding all sequence diagram elements

Symbol/Notation Meaning Example
participant Actor/system in diagram participant S as Script
->> Synchronous call (solid line) A->>B: Request
-->> Response (dashed line) B-->>A: Response
->>+ Call activates participant A->>+B: Start
-->>- Response deactivates B-->>-A: End
Note over A,B Add notes/comments Note over: Phase 1
alt/else/end Conditional logic alt success / else fail
loop/end Repeated operations loop Every 5 seconds

Common API Patterns in Sequence Diagrams

Pattern Description APIs
Authentication Login β†’ Get token β†’ Use token DNA Center, ACI, Custom APIs
CRUD Operations GET β†’ POST β†’ PUT β†’ DELETE REST APIs, RESTCONF
Async Processing POST β†’ Get task ID β†’ Poll status DNA Center, NSO
Error Handling Request β†’ Error response β†’ Retry/Log All APIs
Multi-tier Client β†’ API β†’ Controller β†’ Device Meraki, DNA Center

🐍 Interactive Python Interpreter

πŸ’‘ How to use:
  • Write Python code in the editor
  • Click "β–Ά Run Code" to execute
  • Try sample code buttons
πŸ“ Python Code Editor
⚑ Console Output
Ready to execute Python code...