Computer Networking: A Top-Down Approach - Chapter 1 Notes
Introduction
- These slides are available for free use, modification, and distribution.
- Attribution is requested when used in classes or posted online.
- All material is copyrighted by J.F Kurose and K.W. Ross.
Chapter 1 Overview
- Goal: To gain a foundational understanding and terminology related to computer networking.
- Roadmap:
- What is the Internet? What is a protocol?
- Network edge: hosts, access network, physical media
- Network core: packet/circuit switching, internet structure
- Performance: loss, delay, throughput
- Protocol layers, service models
- Security
- History
The Internet: A Nuts and Bolts View
- Billions of connected computing devices (hosts or end systems) running network applications at the Internet’s edge.
- Networks are collections of devices, routers, and links managed by an organization.
- Packet switches (routers, switches) forward packets (chunks of data).
- Communication links use fiber, copper, radio, satellite with varying transmission rates (bandwidth).
- The Internet is a “network of networks,” interconnected ISPs.
- Protocols govern sending and receiving messages, including HTTP (Web), streaming video, Skype, TCP, IP, WiFi, 4/5G, Ethernet.
- Internet standards are defined in RFCs (Request for Comments) and managed by the IETF (Internet Engineering Task Force).
The Internet: A Services View
- The Internet provides services to applications like web browsing, streaming video, multimedia teleconferencing, email, games, e-commerce, social media, and interconnected appliances.
- It offers a programming interface to distributed applications, allowing them to connect to and use Internet transport services.
- Service options are analogous to postal service options.
What’s a Protocol?
- Protocols define the format, order of messages sent and received among network entities, and actions taken on message transmission, receipt.
- It is a set of rules governing communication.
- Human protocols example:
- “what’s the time?”
- “I have a question”
- introductions
- Network protocols example:
- Computers (devices) rather than humans
- Specific messages sent
- Specific actions taken when a message is received, or other events
- Examples:
- Human: "Hi," "Got the time?"
- Computer: TCP connection request, TCP connection response, HTTP GET request, file transfer.
Network Edge
- Hosts (clients and servers) are located at the network edge.
- Servers are often located in data centers.
Access Networks and Physical Media
- Access networks connect end systems to the edge router.
- Physical media includes wired and wireless communication links.
- Types of access networks:
- Residential access networks
- Institutional access networks (school, company)
- Mobile access networks (WiFi, 4G/5G)
Access Networks: Cable-Based
- Cable modem uses frequency division multiplexing (FDM) to transmit different channels in different frequency bands.
- HFC (hybrid fiber coax) systems offer asymmetric transmission rates (up to 40 Mbps – 1.2 Gbps downstream, 30-100 Mbps upstream).
- Homes share access network to cable headend.
- Cable modem termination system (CMTS) connects cable network to ISP.
Access Networks: Digital Subscriber Line (DSL)
- DSL uses existing telephone lines to connect to a central office DSLAM.
- Voice and data are transmitted at different frequencies over a dedicated line.
- Offers dedicated downstream (24-52 Mbps) and upstream (3.5-16 Mbps) transmission rates.
- DSL modem and splitter are used in homes.
Access Networks: Home Networks
- Combine wired (Ethernet) and wireless (WiFi) devices with a router, firewall, and NAT.
Wireless Access Networks
- Shared wireless access networks connect end systems to a router via a base station or access point.
- Wireless LANs (WLANs) typically operate within a building (~100 ft) using 802.11b/g/n (WiFi) standards.
- Wide-area cellular access networks are provided by mobile operators (10’s km) using 4G/5G cellular networks.
Access Networks: Enterprise Networks
- Used by companies, universities, etc.
- Mix of wired (Ethernet at 100Mbps, 1Gbps, 10Gbps) and wireless (WiFi at 11, 54, 450 Mbps) technologies.
Access Networks: Data Center Networks
- High-bandwidth links (10s to 100s Gbps) connect thousands of servers together and to the Internet.
Host: Sending Packets of Data
- Host sending function:
- Takes application message
- Breaks into smaller chunks, known as packets, of length L bits
- Transmits packet into access network at transmission rate R.
- Link transmission rate, aka link capacity, aka link bandwidth
- Packet transmission delay = \frac{L}{R} where L is the packet length in bits and R is the transmission rate in bits/sec.
Links: Physical Media
- Bit propagates between transmitter/receiver pairs.
- Physical link lies between transmitter & receiver.
- Guided media: signals propagate in solid media (copper, fiber, coax).
- Unguided media: signals propagate freely (radio).
Links: Physical Media - Twisted Pair (TP)
- Two insulated copper wires.
- Category 5: 100 Mbps, 1 Gbps Ethernet.
- Category 6: 10Gbps Ethernet.
Links: Physical Media - Coaxial Cable
- Two concentric copper conductors.
- Bidirectional.
- Broadband: multiple frequency channels (100’s Mbps per channel).
Links: Physical Media - Fiber Optic Cable
- Glass fiber carrying light pulses.
- High-speed operation (10’s-100’s Gbps).
- Low error rate, immune to electromagnetic noise.
Links: Physical Media - Wireless Radio
- Signal carried in various “bands” in the electromagnetic spectrum.
- No physical “wire”.
- Broadcast, “half-duplex” (sender to receiver).
- Propagation environment effects: reflection, obstruction, interference/noise.
- Radio link types:
- Wireless LAN (WiFi): 10-100’s Mbps; 10’s of meters.
- Wide-area (4G/5G cellular): 10’s Mbps (4G) over ~10 Km.
- Bluetooth: cable replacement; short distances, limited rates.
- Terrestrial microwave: point-to-point; 45 Mbps channels.
- Satellite: up to < 100 Mbps (Starlink) downlink; 270 msec end-end delay (geostationary).
The Network Core
- Mesh of interconnected routers.
- Packet-switching: hosts break application-layer messages into packets, and the network forwards packets from one router to the next.
Two Key Network-Core Functions
- Forwarding (Switching):
- Local action to move arriving packets from router’s input link to the appropriate output link.
- Routing:
- Global action to determine source-destination paths taken by packets.
- Routing algorithms.
Packet-Switching: Store-and-Forward
- Packet transmission delay is the time needed to transmit an L-bit packet into a link at R bps: \frac{L}{R}.
- Store and forward: entire packet must arrive at router before it can be transmitted on the next link.
- Numerical example: L = 10 Kbits, R = 100 Mbps, one-hop transmission delay = 0.1 msec.
Packet-Switching: Queueing
- Queueing occurs when the arrival rate is faster than it can be serviced.
Packet-Switching: Queueing and Loss
- If the arrival rate (in bps) to a link exceeds the transmission rate (bps) of the link for some period of time:
- Packets will queue, waiting to be transmitted on the output link.
- Packets can be dropped (lost) if the memory (buffer) in the router fills up.
Alternative to Packet Switching: Circuit Switching
- End-end resources are allocated to, reserved for a “call” between source and destination.
- Dedicated resources with no sharing resulting in circuit-like (guaranteed) performance.
- In circuit switching, a circuit segment is idle if not used by a call (no sharing).
- Commonly used in traditional telephone networks.
Circuit Switching: FDM and TDM
- Frequency Division Multiplexing (FDM):
- Optical, electromagnetic frequencies divided into narrow frequency bands.
- Each call allocated its own band and can transmit at the max rate of that narrow band.
- Time Division Multiplexing (TDM):
- Time is divided into slots.
- Each call has periodic slot(s) allocated, and can transmit at the maximum rate of the assigned frequency band only during its time slot(s).
Packet Switching Versus Circuit Switching
- Example: 1 Gb/s link, each user requires 100 Mb/s when “active,” and is active 10% of the time.
- Circuit-switching: 10 users can be supported.
- Packet switching: with 35 users, the probability of >10 being active at the same time is less than 0.0004.
- Packet switching is great for “bursty” data with resource sharing and simple implementation, but can experience packet delay and loss due to congestion.
- Circuit switching guarantees dedicated resources but can be inefficient for bursty data.
Internet Structure: A “Network of Networks”
- Hosts connect to the Internet via access Internet Service Providers (ISPs).
- Access ISPs must be interconnected so hosts can send packets to each other.
- The resulting network of networks is complex due to economics and national policies.
Internet Structure: Connecting Access ISPs
- Connecting each access ISP to each other directly doesn’t scale: O(N^2) connections.
Internet Structure: Global Transit ISP
- Connect each access ISP to one global transit ISP, with customer and provider ISPs having an economic agreement.
Internet Structure: Competitors and IXPs
- If one global ISP is viable, there will be competitors.
- ISPs will want to be connected via peering links and Internet exchange points (IXP).
Internet Structure: Regional Networks
- Regional networks may arise to connect access nets to ISPs.
Internet Structure: Content Provider Networks
- Content provider networks (e.g., Google, Microsoft, Akamai) may run their own network to bring services and content close to end users.
Internet Structure: Tier-1 ISPs and Content Providers
- At the “center” are a small number of well-connected large networks, including “tier-1” commercial ISPs and content provider networks.
- Tier 1 ISPs have national & international coverage.
- Content providers connect their data centers to the Internet, often bypassing tier-1, regional ISPs.
Packet Delay and Loss
- Packets queue in router buffers, waiting for their turn for transmission.
- Queue length grows when the arrival rate to a link exceeds the output link capacity.
- Packet loss occurs when the memory to hold queued packets fills up.
Packet Delay: Four Sources
d{nodal} = d{proc} + d{queue} + d{trans} + d_{prop}
d_{proc}: nodal processing (check bit errors, determine output link) typically < microsecs.
d_{queue}: queueing delay (time waiting at output link for transmission) depends on congestion level.
d_{trans}: transmission delay: L (packet length in bits) / R (link transmission rate in bps).
d_{prop}: propagation delay: d (length of physical link) / s (propagation speed ~2x10^8 m/sec).
Packet Queueing Delay
- a: average packet arrival rate
- L: packet length (bits)
- R: link bandwidth (bit transmission rate)
- Traffic intensity = \frac{La}{R}:
- \frac{La}{R} \approx 0: avg. queueing delay small
- \frac{La}{R} \rightarrow 1: avg. queueing delay large
- \frac{La}{R} > 1: average delay infinite!
“Real” Internet Delays and Routes
- Traceroute program: provides delay measurement from source to router along end-end Internet path towards destination.
- Sends three packets that will reach router i on path towards destination (with time-to-live field value of i).
- Router i will return packets to sender.
- Sender measures time interval between transmission and reply.
Packet Loss
- Packet arriving to full queue dropped (aka lost).
- Lost packet may be retransmitted by previous node, by source end system, or not at all.
Throughput
- Throughput: rate (bits/time unit) at which bits are being sent from sender to receiver.
- Instantaneous: rate at a given point in time.
- Average: rate over a longer period of time.
Throughput: Bottleneck Link
- If Rs < Rc, average end-end throughput is R_s.
- If Rs > Rc, average end-end throughput is R_c.
Network Security
- The Internet was not originally designed with security in mind.
- Security considerations are now present in all layers.
Bad Guys: Packet Interception
- Packet “sniffing” in broadcast media (shared Ethernet, wireless).
- Promiscuous network interface reads/records all packets (e.g., including passwords!).
Bad Guys: Fake Identity
- IP spoofing: injection of packet with false source address.
Bad Guys: Denial of Service
- Denial of Service (DoS): attackers make resources unavailable to legitimate traffic by overwhelming the resource with bogus traffic.
- Involves selecting a target, breaking into hosts around the network (botnet), and sending packets to the target.
Lines of Defense
- Authentication: proving you are who you say you are.
- Confidentiality: via encryption.
- Integrity checks: digital signatures to prevent/detect tampering.
- Access restrictions: password-protected VPNs.
- Firewalls: specialized “middleboxes” in access and core networks to filter incoming packets.
Protocol “Layers” and Reference Models
- Networks are complex with many “pieces” and it is beneficial to organize their structure.
Example: Organization of Air Travel
- Air travel can be organized into layers, each implementing a service via its own internal actions and relying on services provided by the layer below.
Why Layering?
- Explicit structure allows identification and relationship of system’s pieces.
- Modularization eases maintenance and updating of system.
Layered Internet Protocol Stack
- Application: supporting network applications (HTTP, IMAP, SMTP, DNS).
- Transport: process-process data transfer (TCP, UDP).
- Network: routing of datagrams from source to destination (IP, routing protocols).
- Link: data transfer between neighboring network elements (Ethernet, 802.11 (WiFi), PPP).
- Physical: bits “on the wire”.
Services, Layering and Encapsulation
Transport-layer protocol encapsulates application-layer message M with transport layer header H_t to create a transport-layer segment
Transport-layer protocol transfers M from one process to another, using services of network layer.Network-layer protocol encapsulates transport-layer segment [Ht | M] with network layer header Hn to create a network-layer datagram.
Link-layer protocol encapsulates network datagram [Hn| [Ht |M], with link-layer header H_l to create a link-layer frame
Internet History
- 1961: Kleinrock - queueing theory shows effectiveness of packet-switching.
- 1964: Baran - packet-switching in military nets.
- 1967: ARPAnet conceived by Advanced Research Projects Agency.
- 1969: first ARPAnet node operational.
- 1972:
- ARPAnet public demo
- NCP (Network Control Protocol) first host-host protocol
- first e-mail program
- ARPAnet has 15 nodes
Internet History: 1972-1980
- 1970: ALOHAnet satellite network in Hawaii
- 1974: Cerf and Kahn - architecture for interconnecting networks
- 1976: Ethernet at Xerox PARC
- late70’s: proprietary architectures: DECnet, SNA, XNA
- 1979: ARPAnet has 200 nodes
- Cerf and Kahn’s internetworking principles:
- minimalism, autonomy - no internal changes required to interconnect networks
- best-effort service model
- stateless routing
- decentralized control
- define today’s Internet architecture
Internet History: 1980-1990
- 1983: deployment of TCP/IP
- 1982: smtp e-mail protocol defined
- 1983: DNS defined for name-to -IP-address translation
- 1985: ftp protocol defined
- 1988: TCP congestion control
- new national networks: CSnet, BITnet, NSFnet, Minitel
- 100,000 hosts connected to confederation of networks
Internet History: 1990, 2000s
- early 1990s: ARPAnet decommissioned
- 1991: NSF lifts restrictions on commercial use of NSFnet (decommissioned, 1995)
- early 1990s: Web
- hypertext [Bush 1945, Nelson 1960’s]
- HTML, HTTP: Berners-Lee
- 1994: Mosaic, later Netscape
- late 1990s: commercialization of the Web
- late 1990s – 2000s:
- more killer apps: instant messaging, P2P file sharing
- network security to forefront
- est. 50 million host, 100 million+ users
- backbone links running at Gbps
Internet History: 2005-present
- aggressive deployment of broadband home access (10-100’s Mbps)
- 2008: software-defined networking (SDN)
- increasing ubiquity of high-speed wireless access: 4G/5G, WiFi
- service providers (Google, FB, Microsoft) create their own networks
- bypass commercial Internet to connect “close” to end user, providing “instantaneous” access to social media, search, video content, …
- enterprises run their services in “cloud” (e.g., Amazon Web Services, Microsoft Azure)
- rise of smartphones: more mobile than fixed devices on Internet (2017)
- ~15B devices attached to Internet (2023, statista.com)
Chapter 1: Summary
- Internet overview
- what’s a protocol?
- network edge, access network, core
- packet-switching versus circuit-switching
- Internet structure
- performance: loss, delay, throughput
- layering, service models
- security
- history
ISO/OSI Reference Model
- Two layers not found in Internet protocol stack!
- presentation: allow applications to interpret meaning of data, e.g., encryption, compression, machine-specific conventions
- session: synchronization, checkpointing, recovery of data exchange
- Internet stack “missing” these layers!
- these services, if needed, must be implemented in application