01
What a network is
- A network connects hosts (PCs, servers, phones) over links so they can exchange data.
- LAN = local area network (one site, you own the cabling). WAN = wide area network (links sites over a provider, e.g. the Internet).
- Collision domain = a segment where two frames can collide (each switch port is its own collision domain). Broadcast domain = the set of devices a broadcast reaches (one VLAN = one broadcast domain; routers stop broadcasts).
- A bit is 0 or 1. A byte (octet) is 8 bits. A nibble is 4 bits.
- Binary place values for one octet: 128 64 32 16 8 4 2 1. Add the values where the bit is 1.
- Example: 11000000 = 128+64 = 192. 10101000 = 168. Memorize these - subnetting speed depends on it.
- Hex digits: 0-9 then A=10, B=11, C=12, D=13, E=14, F=15. Base 16.
- One hex digit = exactly 4 bits (one nibble). So a byte = 2 hex digits.
- Hex matters for MAC addresses (48-bit) and IPv6 (128-bit). 0xFF = 11111111 = 255.
04
Protocols, ports, standards & client/server
- A protocol is an agreed set of rules for communicating (e.g. HTTP, TCP, OSPF). Standards bodies: IEEE (LAN/physical, e.g. 802.x), IETF (Internet protocols, publishes RFCs).
- A port number identifies an application/service on a host (e.g. TCP 443 = HTTPS). A socket = IP address + port.
- Client/server: the client requests, the server responds (DHCP, DNS, web all follow this).
05
OSI & TCP/IP models
- OSI 7 layers (top→bottom): 7 Application, 6 Presentation, 5 Session, 4 Transport, 3 Network, 2 Data Link, 1 Physical.
- TCP/IP 4 layers: Application (OSI 5-7), Transport (4), Internet (3), Network Access / Link (1-2).
- Layer→protocol: L7 HTTP/DNS · L4 TCP/UDP · L3 IP/ICMP · L2 Ethernet/MAC · L1 cabling/bits.
- Mnemonic top-down: "All People Seem To Need Data Processing".
OSI layer → PDU → device/protocol | Layer | PDU | Examples |
| 7-5 Application | Data | HTTP, DNS, DHCP, SSH |
| 4 Transport | Segment | TCP, UDP - ports |
| 3 Network | Packet | IP, ICMP, OSPF - routers |
| 2 Data Link | Frame | Ethernet, MAC - switches |
| 1 Physical | Bits | Cables, signals |
06
Encapsulation & PDUs (life of a packet)
- Going DOWN the stack, each layer wraps the data above it with a header (and L2 adds a trailer). Data → Segment (L4) → Packet (L3) → Frame (L2) → Bits (L1).
- De-encapsulation reverses it on the receiver, stripping headers back up the stack.
- Across a router hop the L3 (IP) addresses stay end-to-end, but the L2 (MAC) addresses are rewritten at every hop. This is the single most important "life of a packet" idea.
07
Ethernet frames & MAC addresses
- Ethernet II frame fields: Destination MAC, Source MAC, Type, Payload, FCS/CRC (error check at the end).
- A MAC is a 48-bit hex L2 address: first 24 bits = OUI (vendor), last 24 = device. Broadcast MAC = FFFF.FFFF.FFFF.
- Full duplex = send + receive simultaneously, no collisions (modern switched links). Half duplex shares the medium; late collisions/CRC errors hint at a duplex mismatch - fix is auto/auto on both ends.
08
ARP - mapping IP to MAC
- ARP resolves a known IPv4 address to its MAC on the local segment: host broadcasts "who has 10.0.0.1?", owner replies with its MAC.
- The ARP table (IP↔MAC) is different from the switch MAC address table (MAC↔port). Do not confuse them.
- To reach a host on another network, your PC ARPs for the DEFAULT GATEWAY's MAC, not the remote host.
09
ICMP, ping & traceroute
- ICMP is the L3 diagnostic protocol: echo request/reply, destination-unreachable, time-exceeded (TTL).
- ping verifies L3 reachability (round-trip echo). traceroute maps the path by sending packets with increasing TTL and reading the time-exceeded replies.
- A successful ping ≠ application works, but a failed ping localizes a reachability problem fast.
10
IP addressing & the network, conceptually
- An IPv4 address is a 32-bit LOGICAL Layer-3 address; a MAC is the PHYSICAL Layer-2 address. IP gets you across networks; MAC gets you across one link.
- A host needs three things to talk off-subnet: IP address, subnet mask (which part is network vs host), and default gateway (the router to send off-subnet traffic to).
- Routers move packets BETWEEN networks; switches move frames WITHIN a network.
11
Intro to the Cisco IOS CLI
- Mode hierarchy: user-exec "Router>" → privileged-exec "Router#" (enable) → global-config "Router(config)#" (configure terminal) → sub-modes: interface, router, line.
- Help: "?" lists options; Tab/abbreviation completes commands (e.g. "conf t").
- Verify with show commands (show running-config, show ip interface brief). Save with "copy running-config startup-config" (write memory).
IOS prompt → mode → how you got there | Prompt | Mode | Enter with |
| Router> | User EXEC | console login |
| Router# | Privileged EXEC | enable |
| Router(config)# | Global config | configure terminal |
| Router(config-if)# | Interface | interface g0/0 |
| Router(config-router)# | Routing protocol | router ospf 1 |