Chapter 1.
Internet Overview; What’s a Protocol; Network edge, core,
access network, packet switching, circuit switching, internet
structure; performance (delay, loss), layering, service models
What’s the internet (Nuts and Bolts)?
1. Billions of connected devices:
2. Communication links: Fiber, copper, radio, satellite
● Transmission rate: bandwidth
3. Packet switches (forward data)
...[Show More]
Chapter 1.
Internet Overview; What’s a Protocol; Network edge, core,
access network, packet switching, circuit switching, internet
structure; performance (delay, loss), layering, service models
What’s the internet (Nuts and Bolts)?
1. Billions of connected devices:
2. Communication links: Fiber, copper, radio, satellite
● Transmission rate: bandwidth
3. Packet switches (forward data):
● routers and switches
4. Internet: network of network, interconnected ISPs.
5. Protocols control sending & receiving of messages
6. Standards of internets: RFC, IETF; Request for comments;
Internet Engineering Task Force
What’s the internet (Service)?
1. Infrastructure that provides services to applications
2. Provides programming interface to apps
What’s a protocol?
protocols define format, order of messages sent and received
among network entities, and actions taken on message
transmission, receipt
Network structure
1. Network edge: hosts (clients and servers)
2. Access network, physical media (wired, wireless communication
links)
3. Network core: (interconnected routers)
How to connect end systems to edge routers
1. residential access nets
2. institutional access networks (company)
3. mobile access networks
Access network:
❖ DSL: Digital Subscriber Line
⮚ DSL has dedicated access to central office
❖ Cable network
⮚ frequency division multiplexing: different channels
transmitted in different frequency bands
⮚ HFC: Hybrid Fiber Coax, Asymmetric, down 30, up 2
⮚ Home shares access network
Hosts send packets of data
● Breaks application messages into smaller chunks, known as
packets of length L bits
● Transmits packet into access network at transmission rate
R, aka link capacity, link bandwidth.
● Packet transmission delay = L/R
Physical media: bits are propagated between transmitter and
receiver; physical links are what lies in between transmitter and
receiver; guided media: signals propagate in solid media;
unguided: freely
Store and forward: entire packet must arrive at a router before it
can be transmitted on next link.
Queueing delay & loss: if arrival rate to link exceeds R 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.
Network-core: routing and forwarding;
Routing: determines source-destination route taken by packets.
Forwarding: move packets from router's input to appropriate
router output. Destination address in arriving packet’s headers.
Circuit Switching: end-end resources allocated to, reserved for
“call” between source & dest: dedicated resources; idle if not
used; commonly used in traditional networks.
FDM vs TDM (Frequency/Time Division Multiplexing)
Packet Switching vs Circuit Switching:
● PS allows more users to use network
● PS is good for bursty (一阵一阵的) data
● Excessive congestion possible: PS will have packets delay or
loss: if packet arrival rate to link (temporarily) exceeds
output link capacity. protocols needed for reliable data
transfer, congestion control.
Four sources of packet delays
● Nodal processing: check bit errors, determine output link
❖ Queueing delay: time waiting at output link for
transmission. Dependent on congestion level
⮚ a: Average packet arrival rate.
⮚ La/R = 0: avg. queueing delay small
⮚ La/R closes 1: avg. queueing delay large
⮚ La/R > 1: avg. queueing delay infinite
● Transmission delay: L/R
● Propagation delay: length of physical link / 2e8
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
● Bottleneck: link on end-end path that constrains end-end
throughput
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.11 (WiFi), PPP
● physical: bits “on the wire”
Chapter 2 client-server; P2P; application service requirements:
reliability, bandwidth, delay; TCP/UDP, HTTP, SMTP, DNS, P2P,
Socket Programming
Client-server architecture:
Server: on host; permanent IP address; data centers
Clients: communicate with server; do not communicate with each
other. Dynamic IP addresses. Maybe intermittently connected.
P2P architecture
Not always on server
Arbitrary end systems directly communicate
Peer request service from other peers, provide service in return to
other peers – self scalability.
Peers intermittently connected and change IP addresses
Sockets: processes communicate via sockets.
Addressing processes
● each process must have identifier which includes both ip
address and port numbers associated with process on
host.
● IP address of host alone can’t suffice for identification
App layer protocol defines:
● Types of messages exchanged: request, response
● Message syntax: what fields are in messages & how fields
are delineated
● Message semantics: meaning of information in fields
● Rules for when and how processes send & respond to
messages
● Open protocols: allows for interoperability, e.g. HTTP
● Proprietary protocols: e.g. Skype
What transport service does an app need?
● Data integrity: reliable data transfer
● Throughput: efficient data transfer (multimedia)
● Timing: low delay (interactive games)
● Security: encryption, data integrity, etc
TCP service:
● Reliable transport between sending and receiving
processes
● Flow control: sender won’t overwhelm receiver
● Congestion control: throttle sender when network
overloaded
● Does not provide timing minimum throughput guarantee,
security
● Connection-oriented: setup required between client and
server processes
UDP service:
● Unreliable data transfer between sending and receiving
processes
● Does not provide reliability, flow control, congestion
control, timing, throughput guarantee, security, or
connection setup.
● used primarily for establishing low-latency and losstolerating connections.
TCP and UDP are not encrypted. SSL provides encrypted TCP
connection, data integrity and end-point authentication. SSL is an
app layer.
HTTP: hypertext transfer protocol
● Web’s application layer protocol
● Client: browser that requests, receives and displays web
objects.
● Server: web server sends objects in response to requests.
● Clients inits TCP connection (creates socket) to server, port
80. Server accepts TCP connection. HTTP messages
exchanged between browser and web server. TCP
connection closed.
● HTTP is stateless. Server maintains no information about
past client requests.
Non-persistent HTTP
● One object per request
● Response time = 2RTT + file transmission time; where the
first RTT -> init TCP connection; and the second RTT -> for
HTTP request and first few bytes of HTTP response to
return
● Issues: requires 2RTTs per object. OS overhead for each
TCP connection. Browsers often open parallel TCP
connections to fetch referenced objects.
Persistent HTTP
● multiple objects at a request
● server leaves connection open after sending response
● subsequent HTTP messages between same client/server
sent over open connection.
● Client sends requests as soon as it encounters a referenced
object.
● As little as one RTT for all the referenced objects.
HTTP request message general format:
Request line + header lines + body
HTTP response message general format:
Status line (protocol status code status phrase) + header lines +
data, e.g. requested HTML file
Status codes: 200 OK, 301 Moved Permanently, 400 Bad Request,
404 Not Found, 505 HTTP version not supported
User-server state: cookies:
● Cookie header line of HTTP response message
● Cookie header line in the next http request message
● Cookie file kept on user’s host, managed by user’s browser
● Backend database at website
Web caches (proxy server)
● User set browser: web accesses via cache
● Browser sends all HTTP requests to cache
⮚ Object in cache: direct return
⮚ Else cache requests object from origin server, then
to clients
● Caching example: suppose cache hit rate is 0.4
⮚ Access link utilization: 60%
⮚ Data rate to browsers over access link = 0.6 * access
link rate
⮚ Sum delay: 0.6*delay from server + 0.4 * cache
delay
SMTP: uses TCP to transfer mail from client to server: port 25.
Direct Transfer: sending server to receiving server. Three phases of
transfer: handshaking, transfer of messages, closure. Persistent
connections.
HTTP: each object encapsulated in its own response message.
SMTP: multiple objects sent in multipart message
POP3: stateless. “download and delete”: cannot re-read email if
client was changed. “download and keep”: Copies of messages on
different clients.
IMAP: all messages kept in one place: server
Allows user to organize messages in folders.
Keeps user state across sessions.
DNS: Domain name system
A distributed, hierarchical database.
Example: Client wants ip for www.amazon.com; 1st approximation:
Client queries root sever to find com DNS server; then queries
.com DNS server to get amazon.com DNS server; then queries
amazon.com DNS server to get ip address for www.amazon.com
Rootname server: contacts authoritative name server if name
mapping not known.
Top Level Domain servers: TLD
Authoritative DNS servers: organization’s own DNS servers
Local DNS name server: doesn’t strictly belong to hierarchy. Each
ISP has one (also called default name server). When host makes
DNS query, qu
[Show Less]