reference

Appendix Quick Reference

Quick Reference Guide

Quick lookup for key concepts, protocols, algorithms, and formulas in computer networking.


Protocol Summary Table

ProtocolLayerPortPurposeConnectionReliability
HTTPApplication80Web content transferConnectionless (over TCP)Yes (via TCP)
HTTPSApplication443Secure webConnectionless (over TCP)Yes (via TCP)
SMTPApplication25Email sendingConnection-oriented (over TCP)Yes (via TCP)
DNSApplication53Name resolutionConnectionless (over UDP)No
FTPApplication20, 21File transferConnection-oriented (over TCP)Yes (via TCP)
SSHApplication22Secure remote accessConnection-oriented (over TCP)Yes (via TCP)
TCPTransport-Reliable transportConnection-orientedYes
UDPTransport-Fast transportConnectionlessNo
IPNetwork-Host addressing and routingConnectionlessNo
OSPFNetwork-Link-state intradomain routing--
RIPNetwork-Distance-vector intradomain routing--
BGPNetwork179Interdomain routingConnection-oriented (over TCP)Policy-based
ARPLink-MAC address resolutionConnectionlessNo
EthernetLink-LAN communicationConnectionlessNo

Layer Responsibilities

LayerResponsibilityData UnitKey ProtocolsAddressing
5. ApplicationApplication-specific servicesMessageHTTP, SMTP, DNS, FTPApplication-defined
4. TransportProcess-to-process communicationSegmentTCP, UDPPort numbers (16-bit)
3. NetworkHost-to-host routingDatagram/PacketIP, OSPF, RIP, BGPIP addresses (32-bit IPv4, 128-bit IPv6)
2. Data LinkHop-to-hop transmissionFrameEthernet, Wi-Fi, PPPMAC addresses (48-bit)
1. PhysicalBit transmissionBitsVaries by mediumPhysical ports

Port Number Ranges

RangeTypePurposeExamples
0-1023Well-KnownStandard servicesHTTP (80), HTTPS (443), SSH (22), DNS (53), SMTP (25)
1024-49151RegisteredApplication-specificCustom applications
49152-65535Ephemeral/DynamicTemporary client portsAssigned by OS for outgoing connections

Routing Algorithm Comparison

AlgorithmTypeKnowledgeUpdate TriggerConvergenceLoopsComplexityProtocols
DijkstraLink StateGlobal topologyLink state changeFast (seconds)NoO(n²) or O(n log n)OSPF
Bellman-FordDistance VectorNeighbors onlyPeriodic (30s) or triggeredSlow (minutes)Possible (count-to-infinity)O(n × neighbors)RIP
Path VectorHybridAS pathPolicy changesVariableNo (due to path info)-BGP

BGP Route Selection Process

Order of Decision (first match wins):

  1. Highest LocalPref (Local Preference) - Operator-defined preference
  2. Shortest AS Path - Fewest AS hops
  3. Lowest Origin Type - IGP < EGP < Incomplete
  4. Lowest MED (Multi-Exit Discriminator) - Preferred entry point (same AS only)
  5. eBGP over iBGP - Prefer external routes
  6. Lowest IGP Cost to Next Hop - Hot potato routing
  7. Lowest Router ID - Tiebreaker

Business Relationship Priority: Customer > Peer > Provider


TCP States

StateDescription
CLOSEDNo connection
LISTENServer waiting for connection
SYN-SENTClient sent SYN, waiting for SYNACK
SYN-RECEIVEDServer received SYN, sent SYNACK, waiting for ACK
ESTABLISHEDConnection active, data transfer
FIN-WAIT-1Sent FIN, waiting for ACK
FIN-WAIT-2Received ACK of FIN, waiting for peer’s FIN
CLOSE-WAITReceived FIN, waiting for application to close
CLOSINGBoth sides sent FIN simultaneously
LAST-ACKSent FIN in response, waiting for ACK
TIME-WAITWaiting to ensure remote received ACK of FIN

TCP Congestion Control Summary

PhaseTriggercwnd AdjustmentGrowth Pattern
Slow StartConnection start or timeoutDouble per RTT (×2)Exponential
Congestion Avoidance (AIMD)cwnd ≥ ssthresh+1 MSS per RTTLinear (additive)
Fast Recovery3 Duplicate ACKscwnd = ssthresh = cwnd/2Halve (multiplicative decrease)
Timeout RecoveryTimeoutcwnd = 1, ssthresh = cwnd/2Restart slow start

TCP CUBIC: Uses cubic function instead of linear AIMD, RTT-independent


QoS Scheduling Algorithms

AlgorithmTime ComplexityFairnessDescription
FIFOO(1)NoFirst In First Out, simple but unfair
Priority QueuingO(1)NoHigh-priority always served first
Fair Queuing (Bit-by-Bit)O(log n)PerfectTheoretical ideal, simulates bit-by-bit service
Weighted Fair Queuing (WFQ)O(log n)WeightedAssigns weights to flows
Deficit Round Robin (DRR)O(1)ApproximateConstant-time approximation of fair queuing

Traffic Shaping Mechanisms

MechanismBehaviorUse CaseParameters
Token BucketAllows bursts, enforces average rateBursty traffic with rate limitBucket size (B), Token rate (R)
Leaky BucketSmooths traffic to constant rateConstant-rate outputBucket size, Output rate

Formula: Token Bucket allows burst of size B, average rate R tokens/sec


Packet Classification Algorithms

AlgorithmMemory UsageLookup TimeDescription
Linear SearchLowO(n)Check each rule sequentially
CachingMediumVariableCache recent matches
Set-Pruning TriesVery HighO(W)Destination trie with source tries at leaves
BacktrackingMediumVariablePoints to source tries, backtracks on miss
Grid of TriesHighO(W)Switch pointers eliminate backtracking

W = Address width (32 bits for IPv4)


Common Formulas

Dijkstra’s Algorithm

distance[u] = minimum distance from source to u
For each unvisited neighbor v of u:
    if distance[u] + cost(u,v) < distance[v]:
        distance[v] = distance[u] + cost(u,v)

Bellman-Ford Equation

D_x(y) = min over all neighbors v { cost(x,v) + D_v(y) }

D_x(y) = Distance from router x to destination y
cost(x,v) = Link cost from x to neighbor v
D_v(y) = Neighbor v's distance to y

TCP Timeout Estimation

EstimatedRTT = (1 - α) × EstimatedRTT + α × SampleRTT
DevRTT = (1 - β) × DevRTT + β × |SampleRTT - EstimatedRTT|
TimeoutInterval = EstimatedRTT + 4 × DevRTT

Typical: α = 0.125, β = 0.25

Token Bucket

Tokens in bucket: min(B, current_tokens + R × time_elapsed)
Packet transmitted if: packet_size ≤ current_tokens
After transmission: current_tokens -= packet_size

B = Bucket capacity (bytes)
R = Token rate (bytes/second)

Key Acronyms

AcronymFull NameContext
ACKAcknowledgmentTCP, reliable delivery
AIPAccountable Internet ProtocolClean-slate architecture
AIMDAdditive Increase Multiplicative DecreaseTCP congestion control
ARPAddress Resolution ProtocolMAC address lookup
ASAutonomous SystemBGP, interdomain routing
ASNAutonomous System NumberAS identifier
BGPBorder Gateway ProtocolInterdomain routing
CDNContent Delivery NetworkDistributed content servers
CIDRClassless Inter-Domain RoutingIP address aggregation
DASHDynamic Adaptive Streaming over HTTPVideo streaming
DDoSDistributed Denial of ServiceSecurity attack
DNSDomain Name SystemName to IP resolution
DRRDeficit Round RobinFair queuing algorithm
eBGPExternal BGPBetween different ASes
FIBForwarding Information BaseRouter forwarding table
FIFOFirst In First OutSimple queuing
FTPFile Transfer ProtocolFile transfer
GFWGreat FirewallChina’s censorship system
HOLHead-of-Line (Blocking)Switching fabric issue
HTTPHypertext Transfer ProtocolWeb
iBGPInternal BGPWithin same AS
ICMPInternet Control Message ProtocolError reporting (ping, traceroute)
IGPInterior Gateway ProtocolIntradomain routing
IPInternet ProtocolNetwork layer
IXPInternet Exchange PointPeering location
LPMLongest Prefix MatchIP forwarding
LSALink State AdvertisementOSPF topology update
MACMedia Access ControlLayer 2 addressing
MEDMulti-Exit DiscriminatorBGP attribute
MSSMaximum Segment SizeTCP segment size
NATNetwork Address TranslationIP address translation
ONOSOpen Networking Operating SystemDistributed SDN controller
OSPFOpen Shortest Path FirstLink-state intradomain routing
P4Programming Protocol-independent Packet ProcessorsSDN data plane language
QoSQuality of ServiceTraffic prioritization
RIPRouting Information ProtocolDistance-vector intradomain routing
RTTRound-Trip TimeTime for packet to go and return
SDNSoftware-Defined NetworkingControl/data plane separation
SDXSoftware-Defined ExchangeSDN at IXPs
STPSpanning Tree ProtocolLayer 2 loop prevention
TCPTransmission Control ProtocolReliable transport
TTLTime To LiveIP header field
UDPUser Datagram ProtocolUnreliable transport
VoIPVoice over IPReal-time voice
WFQWeighted Fair QueuingQoS scheduling

IP Address Classes (Historical)

ClassFirst BitsRangeDefault MaskPurpose
A00.0.0.0 - 127.255.255.255/8Large networks
B10128.0.0.0 - 191.255.255.255/16Medium networks
C110192.0.0.0 - 223.255.255.255/24Small networks
D1110224.0.0.0 - 239.255.255.255-Multicast
E1111240.0.0.0 - 255.255.255.255-Reserved

Note: Modern Internet uses CIDR, not classes


Private IP Address Ranges (RFC 1918)

RangeCIDRNumber of Addresses
10.0.0.0 - 10.255.255.25510.0.0.0/816,777,216
172.16.0.0 - 172.31.255.255172.16.0.0/121,048,576
192.168.0.0 - 192.168.255.255192.168.0.0/1665,536

Switching Fabric Types

TypeMechanismSpeedBlockingCost
Memory-basedCPU copies packets via memorySlowest (2× bus bandwidth)YesLowest
Bus-basedShared busMedium (1× bus bandwidth)YesMedium
CrossbarParallel pathsFastest (N× port speed)Only HOLHighest

Security Properties (CIAA)

PropertyDefinitionMechanisms
ConfidentialityOnly intended parties can readEncryption (AES, RSA)
IntegrityMessage not modified in transitHash functions (SHA), MACs
AuthenticationVerify identity of partiesDigital signatures, certificates
AvailabilityService remains accessibleRedundancy, DDoS mitigation

Common Attack Types

AttackLayerDescriptionMitigation
IP SpoofingNetworkFake source IPIngress filtering, source verification
BGP HijackingNetworkAnnounce false routesARTEMIS, RPKI
DDoSNetwork/TransportOverwhelm with trafficRate limiting, Blackholing, Flowspec
DNS InjectionApplicationFake DNS responsesDNSSEC
TCP SYN FloodTransportExhaust connection resourcesSYN cookies

See Also


Use this reference for quick lookups during study or review. For detailed explanations, refer to the main topic files.