Network: assume infrastructure is shared by many users. Infrastructure defines a network. We usually use Internet as "the network" but there exists other network in early years.
basic building blocks: nodes are connected by links
scaling network involving building wires
a network is owned by many private organizations (campus, home, ISP, ...)
Network = Domain. Domains are Internet Service Providers (blue) or client networks (yellow). We have two types of links: inter-domain (red) and intra-domain (black)
Internet: a network of networks
ISP: job of ISP is to connect one client network to the other using their own network
Unlike non-Internet network, Internet allow heterogeneous applications
Networks that is not Internet: radio, cable TV, phone. They all designed for one application.
Telephone Network
Switch: transfer the information from one node to another
Telephone Network: circuit switching by human (one wire is used for the duration of the call)
Internet: send information by packets
Store and forward: Switches use the address in the packet to determine how to forward the packets
Planes:
Forwarding Plane - Moves packets from input to output.
Control Plane - Determines how packets should be forwarded.
Management Plane - Methods of configuring the control plane (CLI, SNMP, etc.)
Instead of continuous stream, package with queue allow us to do concurrent connections
Protocol
Protocol: An agreement between parties on how communication should take place.
Syntax: Data encoding, language, etc. (interpretable format)
Semantics: Error handling, termination, ordering of requests, etc. (action rules)
Internet Design 101
The challenge is that Internet is complex (as picture below)
Internet is Complex
And most people are competeing against each other
Modules
Physical Layer: wires between hosts
Datalink Protocol: protocol on physical layer
Network Layer Protocol: protocol to talk to other networks
Application: ...
Distributed System is on Application Layer (well, if you are building an application that is within network, then you don't need the between-network layer. But it is easier to include between-network protocol)
Network has failures, for example:
packet loss
replicated packet
corrupted packet
Question: in what layer should we correct the failures
Answer: there is no fixed answer. Some application allow some error, others are not. Inforcing correctness requires effort. So we don't build any error correction in non-application level (end-to-end error correction). We let application correct itself. (But WiFi is an exception because of its huge packet loss rate, hop-by-hop error correction)
Further Reading: “End-to-End Arguments in System Design.” Saltzer, Reed, and Clark.
Open Systems Interconnection (OSI) Model
Layers:
physical: bit synchronization, bit rate control, bus, simplex/half-duplex/full-duplex (implemented by physical wires)
data-link: Logical Link Control (LLC), Media Access Control (MAC) (implemented by switch)
network (IP): routing, logical IP address (implemented by router)
transport: port number, break message into segments and reassemble, TCP, UDP (implemented by operating system)
Note that TCP/IP is different from TCP protocol. TCP/IP is a network model that is compared to OSI model. TCP protocol is compared to UDP protocol in Transport layer of OSI model.
The stack has two types of interfaces:
Service: each layer relies on services from layer below and exports
services to layer above (For example: in order to send data from browser, it invoke switch, switch then invoke physical wires, ... going from above to bottom)
Protocol: defines interaction with peer on other hosts, implies communication
How many version of protocol in each layer: we see IPv4 hard to change because everything is depended on it
Internet Goals:
connect networks: yes
survivability: traffic re-route
support types of service: not really, but people make hacks to voice info, video, etc
must accommodate a variety of networks: yes
allow distributed management: yes
Allow host attachment with a low level of effort: yes
Be cost effective: kinda
Allow resource accountability: no, ISP limit us ISP, controlled by government
Survivability: it is costly if a stateful switch fails, then it need time to restore the states after it get back up. Stateless switches and routers are preferred. (Now most switches are stateful but can recover quickly)
Life of a packet between different networks
For horizontal connections, we need to ensure all nodes can talk to each other within their layer, this is done by adding headers.
Headers: we add headers of different protocol as we go down, read and remove headers as we go up
Demultiplexing Field: actual field
Demultiplexing Field: layer in the bottom let top know which protocol to use
How do the receiver know which protocol (TCP or UDP) in one layer? We add a demultiplexing field to Transport Layer.
only Physical and Application layer don't need demultiplexing filed
There is only one data-link protocol
There isn't anything above Application layer
there is an exception: WiFi
The Internet Engineering Task Force (IEF):
unlike IEEE, it does not need membership
designed http and other protocol by researchers (and now )
Process of Making Protocol
People publish draft and revise
Request for Comments: Requests feedback from the community
Standard can be promoted if there is consensus in committee