Technical - Networking Flashcards
TCP vs UDP (Provide examples)
TCP (Transmission Control Protocol):
Purpose: Connection-oriented, reliable, ordered, error-checked delivery
How: 3-way handshake(SYN, SYN-ACK, ACK), sequencing, ACKs/timeouts, error checking/checksums.
Examples: HTTP, FTP
UDP (User Datagram Protocol):
Purpose: Fast, connectionless, no delivery guarantees
No Handshake: Fire-and-forget
Examples: DNS, Streaming
HTTP/HTTPS
HTTP (Hypertext Transfer Protocol):
Purpose: Transfer web content
Port: 80
Transport: TCP, plain text
HTTPS (HTTP Secure):
Purpose: Secure web content with encryption
Port: 443
Encryption: TLS/SSL (Asymmetric for key exchange, Symmetric for data)
TLS vs SSL
SSL (Secure Sockets Layer):
Purpose: Outdated encryption protocol, vulnerable
TLS (Transport Layer Security):
Purpose: Modern, secure encryption
Key Exchange: Asymmetric (RSA/ECDHE), Data Encryption (Symmetric AES)
VPN
VPN (Virtual Private Network):
Purpose: Secure, encrypted private network over the internet
Encryption: Encrypts entire packet (payload + headers)
Protocols: IPsec, OpenVPN
DNS
DNS (Domain Name System):
Purpose: Translate domain names to IP addresses
Resolution:
Process: Resolver > Root DNS > TLD DNS > Authoritative DNS
Record Types: A (IPv4), AAAA (IPv6), CNAME, MX
Port: 53 (UDP/TCP)
DHCP
DHCP (Dynamic Host Configuration Protocol):
Purpose: Automatically assigns IP addresses and network configurations
Process: Discover > Offer > Request > ACK
ARP
ARP (Address Resolution Protocol):
Purpose: Resolve IP addresses to MAC addresses
Process: ARP Request > ARP Reply
Cache: Stores IP-MAC mappings
Trace egress request from local machine to the internet (Local Machine > OSI > Router/Modem > ISP)
- Local Machine: Application generates data.
- OSI Layers: Translated into TCP/UDP segments, packets, and eventually transmitted as frames.
- Router:
- NAT: Translates source IP/Port (Ephemeral)
- Forwards based on routing table - Modem: Converts and sends packet to ISP.
- ISP: Routes packet through its network to destination.
Trace ingress response from internet to local machine (ISP > Modem > Router > OSI > Local Machine)
- ISP: Receives and routes packet to public IP.
- Modem: Converts and sends packet to router.
- Router:
- Reverse NAT: Translates destination IP/Port (Ephemeral)
- Forwards to machine private IP - OSI Layers: Translated from frames into packets and eventually TCP/UDP segments.
- Local Machine: Application processes received data.
OSI vs TCP/IP (Explain layers)
OSI (Open Systems Interconnection):
Purpose: Conceptual model for network protocols
7 Layers: Physical, Data Link, Network, Transport, Session, Presentation, Application
TCP/IP (Transmission Control Protocol/Internet Protocol):
Purpose: Practical framework for network communication
4 Layers: Link(Frame), Internet(Packet), Transport(Packet), Application(Data)
CIDR vs Subnet Mask (Explain /24 and 255.255.255.0)
CIDR (Classless Inter-Domain Routing):
Purpose: Represent range of IP address
/24: First 24 bits (3 octets) reserved
Subnet Mask:
Purpose: Represent range of IP address
255.255.255.0: First 24 bits (3 octets) reserved
Default Gateway
Default route for traffic from a local network to destinations outside of the network
What happens when I type https://google.com in browser and hit enter?
- Enter key stroke handled
- Enter key bottoms out
- Keyboard hardware/firmware sends data to OS driver
- Browser retrieves keystroke and handles event
- DNS resolution
- Browser uses regex to identify input as url (not search query)
- Browser checks local cache and system cache
- Browser send DNS query (resolver > root > tld > authoritative)
- TLS session established
- Server sends server certificate (pub key, ca)
- Browser checks cert against trusted CAs (verify exp, domain, sig)
- Session key established
- Browser receives and renders page
- Server responds to GET request with encrypted blob of HTML/CSS/JS
- Browser decrypts, executes client side code, renders page
BGP
BGP (Border Gateway Protocol)
Purpose: Exchange routing information between different autonomous systems.
Process: Establishes peering sessions > Exchanging routing updates > Route selection based on policies.
Key Features: Uses path vector mechanism, supports policy-based routing, handles large-scale networks, and prevents routing loops.
Port: 179 (TCP)
OSPF
OSPF (Open Shortest Path First)
Purpose: Determine the best path for data within a single autonomous system.
Process: Neighbor discovery > Database synchronization > Shortest path calculation using Dijkstra’s algorithm.
Key Features: Link-state protocol, fast convergence, hierarchical network design with areas, and uses multicast for updates.
Port: 89 (IP Protocol)