Dotted Quad Notation: in
127.0.0.1 we define
127 as first quad,
0 as second,
0 as third, and
1 as fourth quad. Each quad is
8 bits long.
Flat addressing: no structure, could be a random number
e.g. social security number
defined by IEEE
Networks ("LAN") use this: Ethernet, WiFi, Bluetooth
It assumes network to be small (to avoid collision), but reality is layer 2 network is big. The assumption is incorrect, but it works fine as computing technology improved.
48 bits long (very big, but collision do happen)
Switch: look up address and send data to specific port.
Flat Address Forwarding:
routing table is filled using routing protocols (VGP using Bellman-ford, Dijkstra algorithm)
bridge / switch track a table of
MAC address with
so given a
MAC address (or, in another word,
Ethernet Address), it send packet to
initial packets are broadcasted: when a new device join the
LAN, the switch does not know its
MAC Address associated with
port. Therefore when the first packet send to a
MAC Address that is not in the current table, the message will be broadcasted. When someone respond, then the switch will associate whoever responded in some port with that
MAC Address. (This is extremely insecure, but security is typically handeled at application layer.)
Hierarchical addresses: has a structure, simplify deliver packets
Network Functions: (only the first two will impact distributed system)
Network vs Internet:
Money aspect: user -> content provider -> commerce -> ISPs -> ISPs...
IPv4: not flat
it is hard to know whether an IPv4 address is used (it is too short, can't randomly generate and hope)
packet forwarding is expensive and slow: table lookup is costly with large table size
Routing protocol is CPU and bandwidth hungry: constructing large lookup table is costly
When ISPs gives you a
networkIP, then you can assign up to 2^9 many IPs to your machines without talking to ISP. When other people outside of network send a packet to your IP, ISP only use
networkto send packet to your network. You are responsible to use
hostto the actual machine (or drop it if you want).
So routing protocol only need to identify paths to all networks, not all hosts
8bit network and 24bit host
As a solution to original IP Address
Problem: Everybody is asking for class B (no specific reason, just fact)
The prefix is used to identify class in routers.
Classless Interdomain Routing (CIDR):
network predix (
network) can be any size
/26to denote howmany
networkbits (or, formally, 32-bit mask like
help with space deplition, but hurt forwarding speed
define IPv6: 128 bits address
Ethernet Address). When packet send into a
LANwill start to read
MAC Address, the last 48-bit.
Network address translation (NAT): hosts share IP address and only translated inside network
Internet Corporation for Assigned Names and Numbers (ICANN) assign large chunks to Regional Internet Registries (e.g. American Registry for Internet Names (ARIN)
Regional Internet Registries assign chunks to ISPs
ISPs assign to Institutions
Institutions assign to individuals
Propagation delay on links: proportional to the length of the link
Transmission delay links: proportional to packet size and 1/link speed
Processing delay on switches: depends on the speed of the router
Queuing delay on switches: depends on the traffic load and queue size
Roundtrip Time (RTT): measure the time by
ping, the fastest delay you can ever get.
two way delay
include server processing time
RTT for in-kernel protocols is a bit shorter: since kernel code is counting the time, not application.
easy to measure
Efficiency: Fully use the bandwidth on the bottleneck link Fairness: all flows have the same throughput (having same bandwith is not realistic)
If we put this rule into multiple routers: Longer paths are likely to experience significant congestion.
Flow Completion Time: a metric to measure performance of the network concerning the entire protocol stack - associated with ending and receiving a block of data (image, HTML, video)
Optimizing FCT is possible, e.g. in datacenter where the infrastructure is controlled by only one organization
TCP: reliable, two-way byte stream service
reliable: bytes received correctly in order
connection: three way handshake
flow control: avoid sender outrun receivers and disallow receiver to drop packet due to buffer overflow
error control: recover from packet loss, corruption, reordering
congestion control: controls the transmit rate of the sender (too slow increase FCT, too fast result in packet loss)
TCP is developed during world war. This specific behavior was invented by assuming there is poor connection between US's military after nuclear impact
Edge Computing: move data center closer to the clients
Table of Content