1/60
Looks like no tags are added yet.
OSI model
7 layers: Physical, Data Link, Network, Transport, Session, Presentation, Application. Interviewers mostly care about 1 (cables), 2 (MAC, switches), 3 (IP, routers), 4 (TCP/UDP) and 7 (HTTP, DNS).
TCP
Connection-based and reliable: guarantees delivery and order, resending lost packets. Used for web, SSH, email, file transfer.
UDP
Connectionless and fast, with no delivery guarantee. Used for DNS lookups, DHCP, streaming, voice and video calls.
TCP three-way handshake
SYN, SYN-ACK, ACK. Sets up the connection before any data is sent.
IP address
A logical address that identifies a device on a network and is used to route traffic between networks (layer 3).
MAC address
A hardware address burned into a network card (layer 2). Used to deliver frames on the local network only.
Subnet mask
Splits an IP address into its network and host parts, so a device knows whether a destination is local or must go through the gateway.
CIDR notation (/24)
The number of bits used for the network. A /24 = mask 255.255.255.0 = 256 addresses, 254 usable.
Usable hosts in a subnet
2^(host bits) minus 2. The first address is the network ID and the last is the broadcast address.
Private IP ranges
10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. Used inside networks and not routable on the internet.
Public vs private IP
A public IP is reachable on the internet. A private IP only works inside a local network and reaches the internet through NAT.
Default gateway
The router a device sends traffic to when the destination is outside its own subnet. Wrong gateway = local network works, internet doesn't.
Loopback address
127.0.0.1 (localhost) means the device itself. Used to test that the network stack works.
IPv4 vs IPv6
IPv4 is 32-bit (e.g. 192.168.1.10) and ran out of addresses. IPv6 is 128-bit (e.g. 2001:db8::1) with vastly more addresses.
DNS
Translates domain names (google.com) into IP addresses. If DNS breaks, you can reach sites by IP but not by name.
DNS A record
Maps a domain name to an IPv4 address (AAAA = IPv6).
DNS CNAME record
An alias that points one name to another name (e.g. www.example.com to example.com).
DNS MX record
Specifies the mail servers that receive email for a domain.
DNS TTL
How long a DNS answer is cached. Why a DNS change can take time to show up everywhere.
DHCP
Automatically assigns devices an IP address, subnet mask, default gateway and DNS servers.
DHCP process (DORA)
Discover, Offer, Request, Acknowledge.
169.254.x.x address (APIPA)
The device couldn't reach a DHCP server and assigned itself an address. It can't reach the network. Check the cable or Wi-Fi and the DHCP server, then release and renew.
Static IP vs DHCP reservation
Both give a device a fixed address. A static IP is set on the device itself. A reservation is set on the DHCP server, so it's managed centrally. Used for servers and printers.
ARP
Finds the MAC address for an IP address on the local network.
NAT
Translates private IPs to a public IP so many devices can share one internet address. Your home router does this.
Switch vs router
A switch connects devices within the same network using MAC addresses. A router connects different networks using IP addresses.
VLAN
Splits one physical switch into separate logical networks (e.g. staff, guests, phones) for security and less broadcast traffic. Traffic between VLANs needs a router.
Firewall
Allows or blocks traffic based on rules (source, destination, port, protocol).
Stateful vs stateless firewall
Stateful tracks connections and automatically allows return traffic. Stateless checks each packet on its own, so return traffic needs its own rule.
DMZ
A separate network zone for public-facing servers (web, mail), so if one is compromised the internal network is still protected.
VPN
An encrypted tunnel over the internet that connects a remote user or office to a private network.
Split tunneling
Only company traffic goes through the VPN, and everything else goes straight to the internet. Full tunnel sends everything through the VPN.
Load balancer
Spreads incoming traffic across multiple servers and stops sending traffic to servers that fail health checks.
Proxy server
Sits between users and the internet to filter, log or cache web traffic. Bad proxy settings can break browsing while ping still works.
HTTP vs HTTPS
HTTPS is HTTP encrypted with TLS, protecting data in transit and proving the site's identity with a certificate. Ports 80 and 443.
TLS certificate
Proves a server's identity and enables encryption. Common errors: expired, wrong hostname, untrusted issuer.
LAN vs WAN
A LAN covers one site (office, home). A WAN connects sites over long distances. The internet is the largest WAN.
2.4 GHz vs 5 GHz Wi-Fi
2.4 GHz has longer range and goes through walls better but is slower and more crowded. 5 GHz is faster with shorter range.
Latency vs bandwidth
Latency is the delay for data to travel (ms). Bandwidth is how much data a link can carry at once (Mbps). A connection can have high bandwidth and still feel slow from high latency.
Packet loss
Packets that never arrive. Causes slow connections, choppy calls and dropped sessions.
Port
A number that identifies a specific service on a device, so one IP can run many services (e.g. a web server on 443).
Port 22
SSH (secure remote shell, also SFTP).
Port 25
SMTP (sending email).
Port 53
DNS.
Port 67/68
DHCP.
Port 80
HTTP.
Port 443
HTTPS.
Port 389
LDAP (directory lookups, used by Active Directory).
Port 445
SMB (Windows file sharing).
Port 3389
RDP (Windows Remote Desktop).
ping
Sends ICMP echo requests to test whether a host is reachable and how long replies take. No reply doesn't always mean it's down, since firewalls often block ping.
tracert / traceroute
Shows each router hop between you and a destination, to see where traffic slows down or stops.
nslookup
Tests DNS by looking up the IP address for a name.
ipconfig /all
Shows a Windows PC's IP, subnet mask, default gateway, DNS servers, DHCP status and MAC address. The first command for most network tickets.
ipconfig /release and /renew
Drops the current DHCP address and requests a new one.
ipconfig /flushdns
Clears the PC's DNS cache, e.g. after a DNS record changed.
Can ping an IP address but not a website name
Connectivity works but DNS doesn't. Check the DNS server settings and test with nslookup.
Connection refused vs connection timed out
Refused: the host is reachable but nothing is listening on that port. Timed out: no response, usually a firewall dropping traffic or the host is down.
What happens when you type google.com and press Enter
1 DNS resolves google.com to an IP. 2 The browser opens a TCP connection to port 443. 3 TLS handshake verifies the certificate and sets up encryption. 4 The browser sends an HTTP request. 5 The server responds and the browser renders the page.
Security group vs NACL (AWS)
A security group protects instances and is stateful (allow rules only). A NACL protects a subnet and is stateless (allow and deny rules).
Public vs private subnet (AWS)
A public subnet routes to an Internet Gateway. A private subnet doesn't, and reaches the internet outbound through a NAT Gateway.