DevNet Associate cheat sheet
DevNet Associate · Keep the key ideas within reach.
Software Development and Design
Git state flows: working directory -> staging area (git add) -> local repository (git commit) -> remote (git push); git status reports which state each file is in.
git merge fast-forwards when the current branch tip is an ancestor of the merged branch; otherwise Git creates a merge commit with two parents.
Merge conflict markers are <<<<<<< (current branch), ======= (separator), and >>>>>>> (incoming branch); conflicts appear only where the same file region changed.
JSON (RFC 8259) supports objects, arrays, strings, numbers, booleans, and null; object keys must be double-quoted strings and comments are not allowed.
YAML uses spaces for indentation (tabs are invalid), list items begin with a dash, key-value pairs use colon-space, and YAML 1.2 is a superset of JSON.
REST architectural constraints: client-server, statelessness, cacheability, uniform interface, layered system, and optional code-on-demand.
MVC separates the model (data and business rules), the view (rendering), and the controller (input handling and mediation between the two).
Test pyramid: many fast isolated unit tests, fewer integration tests that combine components, and the fewest end-to-end tests.
Python containers: list is mutable and ordered, tuple is immutable and ordered, dict is mutable key-value with unique hashable keys, set is unordered with unique elements.
Understanding and Using APIs
Method-to-CRUD mapping: POST creates, GET reads, PUT fully replaces, PATCH partially updates, DELETE removes.
Safe methods are GET, HEAD, and OPTIONS; idempotent methods are GET, HEAD, PUT, DELETE, and OPTIONS. POST is neither safe nor idempotent.
Status families: 2xx success (200 OK, 201 Created, 204 No Content), 3xx redirect (301 permanent, 302/307 temporary), 4xx client error, 5xx server error.
Client error codes: 400 malformed request, 401 missing or invalid credentials, 403 authenticated but not permitted, 404 not found, 405 method not allowed, 409 conflict, 429 rate limited.
Server error codes: 500 internal error, 502 bad gateway from an upstream, 503 service unavailable, 504 gateway timeout.
HTTP Basic auth sends base64(user:password) in the Authorization header; base64 is encoding, not encryption, so TLS is required.
OAuth 2.0 flows: authorization code with PKCE for user-facing apps, client credentials for service-to-service, device code for input-limited devices.
Rate limiting returns 429 with Retry-After and often X-RateLimit-* headers; exponential backoff with jitter prevents retry storms.
curl flags: -X sets the method, -H adds a header, -d sends a request body, -i shows response headers, -u supplies Basic credentials.
Cisco Platforms and Development
Cisco DNA Center (Catalyst Center) Intent API authenticates with HTTP Basic at POST /dna/system/api/v1/auth/token and returns an X-Auth-Token sent on later calls; tokens expire after about an hour.
Meraki Dashboard API is HTTPS REST at api.meraki.com/api/v1 using the header X-Cisco-Meraki-API-Key, with a limit of roughly 5 calls per second per organization.
Cisco APIC (ACI) authenticates via POST /api/aaaLogin.xml, which returns an APIC-cookie; the object model runs tenant > VRF, bridge domain, application profile > EPG.
Cisco SD-WAN vManage REST paths sit under /dataservice/; after login a token from /dataservice/client/token is sent in the X-XSRF-TOKEN header.
Webex REST API uses OAuth bearer tokens with resources such as /v1/rooms, /v1/messages, and /v1/memberships; bots receive a token tied to the bot identity.
IOS XE exposes model-driven interfaces: NETCONF on TCP 830, RESTCONF over HTTPS, gNMI for streaming telemetry, all described by YANG models.
Cisco Intersight exposes a REST API under /api/v1 with signed requests and resource objects such as compute servers, policies, and profiles.
Cisco NSO uses YANG service and device models with northbound interfaces including NETCONF, RESTCONF, and JSON-RPC for multi-vendor configuration.
Application Deployment and Security
Containers share the host operating system kernel and package only the app plus libraries; virtual machines run a full guest OS on a hypervisor.
Deployment strategies: blue-green switches traffic between two identical stacks, canary shifts a small percentage first, rolling replaces instances in batches.
Continuous integration builds and tests every commit; continuous delivery keeps every build deployable; continuous deployment releases automatically to production.
12-factor practices: configuration in environment variables, stateless processes, logs as event streams, dev/prod parity, and disposability.
OWASP Top 10 categories include broken access control, injection, cryptographic failures, insecure design, security misconfiguration, and cross-site scripting.
TLS validates the server certificate against a trusted CA chain and matches the hostname against the SAN; SNI selects the certificate for the requested name.
Least privilege grants only the required actions on the required resources, enforced through RBAC roles, IAM policies, or narrowly scoped API tokens.
Secrets belong in a vault or environment variables, never in Git history; exposed credentials must be rotated, and short-lived tokens are preferred.
Infrastructure and Automation
Idempotent automation means applying the same template, playbook, or Terraform plan repeatedly converges to the same state with no extra side effects.
Ansible is agentless and push-based over SSH or WinRM; an inventory lists hosts, YAML playbooks list tasks, and modules perform the changes.
Terraform is declarative HCL: plan diffs the configuration against the state file, apply executes the diff, and state should be remote and locked.
Puppet and Chef use agent-based pull models in which the node checks in with a server for its catalog or run list.
NETCONF operations include get, get-config, edit-config, copy-config, lock, unlock, and commit; transport is SSH and payloads are XML.
RESTCONF maps YANG-modeled data to HTTP verbs GET, POST, PUT, PATCH, and DELETE using JSON or XML, typically over TCP 443.
Configuration drift is the gap between intended and running state, detected by comparing device or infrastructure state with the source of truth.
Python network libraries: Paramiko and Netmiko for SSH CLI, ncclient for NETCONF, requests for REST APIs, pyATS/Genie for testing and parsing.
Network Fundamentals
OSI layers 1-7 are physical, data link, network, transport, session, presentation, application; the TCP/IP model collapses these into link, internet, transport, and application.
Private IPv4 ranges (RFC 1918): 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16; loopback is 127.0.0.0/8 and link-local is 169.254.0.0/16.
Subnet math: usable hosts = 2^h - 2; /24 gives 254 hosts, /25 gives 126, /30 gives 2; prefix /24 equals mask 255.255.255.0.
TCP opens with a SYN, SYN-ACK, ACK handshake and closes with a four-way FIN/ACK exchange; UDP is connectionless with no retransmission.
Common ports: 22 SSH, 23 Telnet, 53 DNS, 67/68 DHCP, 80 HTTP, 443 HTTPS, 161/162 SNMP, 514 syslog, 830 NETCONF.
ARP resolves an IPv4 address to a MAC address within a broadcast domain and caches the result for building Ethernet frames.
VLANs bound broadcast domains; 802.1Q inserts a 12-bit VLAN ID tag on trunk frames, and SVIs or router subinterfaces route between VLANs.
DNS record types: A maps to IPv4, AAAA to IPv6, CNAME is an alias, MX identifies mail servers, TXT carries verification and policy data, PTR provides reverse lookup.
NAT/PAT translates private source addresses to a public address and tracks port mappings; traffic to off-subnet destinations is sent to the default gateway.