1. Computer Networks and the Internet (Introduction)
1.1 What is the Internet?
- There are a couple of ways to answer this question. First, we can describe the nuts and bolts of the Internet, that is, the basic hardware and software components that make up the Internet. Second, we can describe the Internet in terms of a networking infrastructure that provides services to distributed applications.
A Nuts-and-Bolts Description (View)
- millions of connected computing devices:
- hosts = end systems
- running network apps
- communication links
- fiber, copper, radio, satellite
- transmission rate: bandwidth
- Packet switches: forward packets (chunks of data)
- routers and switches
- vs circuit switches: one is wireless, bandwidth used is fixed, better quality, data transmission rate is fixed, waste no time; and one is wired, require more bandwidth, utilization of resources is not full, time taken is too long to establish the link, expensive switching.
- internet: "network of networks"
- interconnected ISPs
- protocols control sending, receiving of msgs
- e.g. TCP, IP, HTTP, Skype, 802.11
- internet standards
- RFC: Request for comments
- IETF: Internet Engineering Task Force
A service view
- Infrastructure that provides services to applications:
- Web, VoIP, email, games, e-commerce, social nets, …
- provides programming interface to apps
- hooks that allow sending and receiving app programs to "connect" to Internet
- provides service options, analogous to postal service
What's a protocol?
human protocols:
- "what's the time?"
- "i have a question"
- instructions
network protocols:
- machines rather than humans
- all communication activity in Internet governed by protocols
≥ protocols define format, order of msgs sent and received among network entities, and actions taken on msg transmission, receipt
1.2 Network Edge
Network structure:
- network edge:
- hosts: client and servers
- servers often in data centers
- access networks, physical media: wired, wireless communication links
- network core:
- interconnected routers
- network of networks
Access Networks and Physical Media
- How to connect end systems to edge router?
- residential access nets
- institutional access networks (school, company)
- mobile access networks
- keep in mind:
- bandwidth (bits per second) of access network ?
- shared or dedicated ?
Access net:
Digital Subscriber Line (DSL)
- use existing telephone line to central office DSLAM
- data over DSL phone line goes to Internet
- voice over DSL phone line goes to telephone net
- < 2.5 Mbps upstream transmission rate (typically < 1 Mbps)
- < 24 Mbps downstream transmission rate (typically < 10 Mbps)
Cable network
- frequency division multiplexing: different channels transmitted in different frequency bands
- HFC: hybrid fiber coax
- asymmetric: up to 30 Mbps downstream transmission rate, 2 Mbps upstream transmission rate
- network of cable, fiber attaches homes to ISP router
- homes share access network to cable headend
- unlike DSL, which has dedicated access to central office
Home network
- DSL, Cable, FTTH, and 5G Fixed Wireless
Enterprise access networks (Ethernet)
- typically used in companies, universities, etc
- 10 Mbps, 100 Mbps, 1Gbps, 10Gbps transmission rates
- today, end systems typically connect into Ethernet switch
Wireless access networks
- shared wireless access network connects and system to router
- via base station aka "access point"
- wireless LANs:
- within building (100 ft)
- 802.11 b/g (WiFi): 11,54 Mbps transmission rate
- wire-area wireless access
- provided by telco (cellular) operator, 10's km
- between 1 and 10 Mbps
- 3G, 4G: LTE
Host: sends 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
Physical media:
- bit: propagates between transmitter/receiver paris
- physical link: what lies between transmitter & receiver
- guided media:
- signals propagates in solid media: copper, fiber, coax
- unguided media:
- signals propagates freely, e.g., radio
- twisted pair (TP)
- two insulated copper wires
- Category 5: 100 Mbps, 1 Gbps Ethernet
- Category 6: 10 Gbps
- two insulated copper wires
Coax, Fiber
- coaxial cable:
- two concentric copper conductors
- bidirectional
- broadband:
- multiple channels on cable
- HFC
- fiber optic cable:
- glass fiber carrying light pulses, each pulse a bit
- high-speed operation:
- high-speed point-to-point transmission (e.g., 10's - 100's Gbps transmission rate)
- low error rate:
- repeaters spaced far apart
- immune to electromagnetic noise
Radio
- signal carried in electromagnetic spectrum
- no physical "wire"
- bidirectional
- propagation environment effects:
- reflection
- obstruction by objects
- interference
- radio link types
- terrestrial microwave
- e.g. up to 45 Mbps channels
- LAN (e.g., WiFi)
- 11 Mbps, 54 Mbps
- wide-area (e.g., cellular)
- 3g cellular: ~ few Mbps
- satellite
- Kbps to 45 Mbps channel (of multiple smaller channels)
- 270 msec end-end delay
- geosynchronous versus low altitude
- terrestrial microwave
1.3 Network core
- mesh of interconnected routers
- packet-swiching: hosts break application-layer messages into packets
- forward packets from one router to the next, across links on path from source to destination
- each packet transmitted at full link capacity
Packet-switching:
Store-and-forward
- take L/R seconds to transmit (push out) L-bit packet into link at R bps
- store and forward: entire packet must arrive at router before it can be transmitted on next link
- end-end delay = 2L/R (assuming zero propagation delay)
- one-hop numerical example:
- L = 7.5 Mbits
- R = 1.5 Mbps
- one-hop transmission delay = 5 sec
Queueing delay, loss
- queuing and loss:
- if arrival rate (in bits) to link exceeds transmission rate of link for a period of time:
- packets will queue, wait to be transmitted on link
- packets can be dropped (lost) if memory (buffer) fills up
- if arrival rate (in bits) to link exceeds transmission rate of link for a period of time:
Two key network-core functions
- routing: determines source-destination route taken by packets
- forwarding: move packets from router's input to appropriate router output
Alternative core: Circuit switching:
- end-ed resources allocated to, reserved for "call" between source & dest:
- in diagram, each link has four circuits
- call gets 2 circuit in top link and 1 circuit in right link
- dedicated resources: no sharing
- circuit-like (guaranteed) performance
- circuit segment idle if not used by call (no sharing)
- Commonly used in traditional telephone networks
- in diagram, each link has four circuits
FDM versus TDM
- FDM:
- frequency domain is segmented into 4 bands
- 4 kHz/bandwidth
- TDM:
- time domain is segmented into frames
- 4 time slots/frame
Packet switching versus circuit switching:
- packet switching allows more users to use network!
- example:
- 1 Mb/s link
- each user:
- 100 kb/s when "active"
- active 10% of time
- circuit-switching:
- 10 users
- packet switching:
- with 35 users, probability > 10 active at same time is less than .0004*
Internet structure: network of networks
- End systems connect to Internet via access ISPs (Internet Service Providers)
- Residential, company and university ISPs
- Access ISPs is turn must be interconnected
- So that any two hosts can send packets to each other
- Resulting network of networks is very complex
- Evolution was driven by economics and national policies
- Let's take a stepwise approach to describe current Internet structure
- Question: given millions of access ISPs, how to connect them together?
- Option: connect each access ISP to every other access ISP? (connecting each access ISP to each other directly doesn't scale: O(N) connections)
- Customer and provider ISPs have economic agreement
- But if one global ISP is viable business, there will be competitors…which must be interconnected…and regional networks may arise to connect access nets to ISPs…and content provider networks (e.g. Google, Microsoft, Akamai) may run their own network, to bring services, content close to end users
- At center: small # of well-connected large networks
- "tier-1" commercial ISPs (e.g., Level 3, Sprint, AT&T, NTT) national & international coverage
- content provider network (e.g. Google): private network that connects it data centers to Internet, often bypassing tier-I, regional ISPs
1.4 Delay, Loss, Throughput in Packet-Switched Networks
How do loss and delay occur?
- Packets queue in router buffers
- packet arrival rate to link (temporarily) exceeds output link capacity
- packets queue, wait for turn
Four sources of packet delay
-
: nodal processing
- check bit errors
- determine output link
- typically < msec
-
: queueing delay
- time waiting at output link for transmission
- depends on congestion level of router
-
: transmission delay
- L: packet length (bits)
- R: link bandwidth (bps)
- = L/R
-
: propagation delay
- d: length of physical link
- s: propagation speed in medium (~2x10 m/sec)
- = d/s
-
and very different
Caravan analogy
- Cars "propagate at 100 km/h"
- toll booth takes 12 sec to service car (bit transmission time)
- car~but; caravan ~packet
- Q: How long until caravan is lined up before 2nd toll booth?
- time to "push" entire caravan through toll booth onto highway = 12 * 10 = 120 sec
- time for last car to propagate from 1st to 2nd toll both: 100 km/(100km/h) = 1 h
- A: 62 minutes
- suppose cars now "propagate" at 100 km/h
- and suppose toll booth now takes one min to service a car
- Q: Will cars arrive to 2nd booth before all cars serviced at first booth?
- A: Yes ! after 7 min, 1st car arrives at second booth; three cars still at 1st booth
Queueing delay (revisited)
- R: link bandwidth (bps)
- L: packet length (bits)
- a: average packet arrival rate
- La/R ~ 0: avg. queueing delay small
- La/R -> 1: avg. queuing delay large
- La/R > 1: more "work" arriving than can be serviced, average delay infinite!
"Real" Internet delays and routes
- wat do "real" Internet delay & loss look like?
- traceroute program: provides delay measurement from source to router along end-end Internet path towards destination. For all i:
- sends three packets that will reach router i on path towards destination
- router i will return packets to sender
- sender times interval between transmission and reply
Packet loss
- queue (aka buffer) preceding link in buffer has finite capacity
- 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 transferred between sender/receiver
- instantaneous: rate at given point in time
- average: rate over longer period of time
Throughput: Internet scenario
- per-connection end-end throughput: min (R , R , R/10)
- in practice: R or R is often bottleneck
1.5 Protocol "layers", service models
Protocol "layers"
- Networks are complex, with many "pieces":
- hosts
- routers
- links of various media
- applications
- protocols
- hardware, software
Layering of airline functionality
- a series of steps
- layers: each layer implements a service
- via its own internal-layer actions
- relying on services provided by layer below
Why layering ?
- dealing with complex systems:
- explicit structure allows identification, relationship of complex system's pieces
- layered reference model for discussion
- modularization eases maintenance, updating of system
- change of implementation of layer's service transparent to rest of system
- e.g., change in date procedure doesn't affect rest of system
- layering considered harmful ?
Internet protocol stack
- application: supporting network applications
- FTP, SMTP, HTTP
- 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.111 (WiFi), PPP
- physical: bits "on the wire"
ISO/OSI reference model
- 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
- needed?
Encapsulation
1.6 Networks under attack: security
Network security
- field of network security:
- how bad guys can attack computer networks
- how we can defend networks against attacks
- how to design architectures that are immune to attacks
- Internet not originally designed with (much) security in mind
- original vision: "a group of mutually trusting users attached to a transparent network"
- Internet protocol designers playing "catch-up"
- security considerations in all layers!
Bad guys can put malware into hosts via Internet
- malware can get in host form:
- virus: self-replicating infection by receiving/executing object (e.g.e, e-mail attachment)
- worm: self-replicating infection by passively receiving object that gets itself executed
- spyware malware can record keystrokes, web sites visited, upload info to collection site
- infected host can be enrolled in botnet, used for spam. DDoS attacks
Bad guys can attack server, network infrastructure
- Denial of Service (DoS): attackers make resources (server, bandwidth) unavailable to legitimate traffic by overwhelming resource with bogus traffic
- select target
- break into hosts around the network (see botnet)
- send packets to target from compromised hosts
Bad guys can sniff packets
- *packet "sniffing":
- broadcast media (shared ethernet, wireless)
- promiscuous network interface reads/records all packets (e.g., including passwords!) passing by
- wire shark software used for end-of-chapter labs is a (free) packet-sniffer
Bad guys can use face addresses
- IP spoofing: send packet with false source address … lots more on security (throughout, Chapter 8)