Lecture 003 - Network

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.

Addressing

Flat addressing: no structure, could be a random number

Flat Address Forwarding

Flat Address Forwarding

Switch: plug-and-play

Switch: plug-and-play

Switch: look up address and send data to specific port.

Flat Address Forwarding:

Hierarchical addresses: has a structure, simplify deliver packets

Network Functions: (only the first two will impact distributed system)

  1. Packet Forwarding: (run at high frequency)
  2. Network Control: executing routing protocols, update forwarding table, ... (once every minutes)
  3. Network Management: adding new wires, change forward rules by traffic engineers (infrequent)

Network vs Internet:

Money aspect: user -> content provider -> commerce -> ISPs -> ISPs...

IPv4 Hierarchy

IPv4 Hierarchy

IPv4: not flat

When ISPs gives you a network IP, 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 network to send packet to your network. You are responsible to use host to the actual machine (or drop it if you want).

So routing protocol only need to identify paths to all networks, not all hosts

Historical IP Address

Original IP Address

8bit network and 24bit host

Class-based IP

As a solution to original IP Address

Class-based IP as solution to Original IP Address

Class-based IP as solution to Original IP Address

Today’s Addressing: CIDR

Classless Interdomain Routing (CIDR):

Tomorrow's Addressing: IPv6

IETF developed

IPv6: simpler than CIDER, blue is network part, green is host part

IPv6: simpler than CIDER, blue is network part, green is host part

Assignment of IPv4

Assignment of IPv4

Assigning IPv4:

Packet Delay

Delays:

Roundtrip Time (RTT): measure the time by ping, the fastest delay you can ever get.

Efficiency: Fully use the bandwidth on the bottleneck link Fairness: all flows have the same throughput (having same bandwith is not realistic)

Max-min Fairness:

  1. Assume each connection need some bandwidth \{1, 5, 3, 7, 9\}. And each switch or router has some bandwidth 10.
  2. Evenly all bandwidth among all people. \{2, 2, 2, 2, 2\}
  3. Notice that we exceed bandwidth for the first connection. Then we divide its bandwidth among others: \{1, 2\frac{1}{4}, 2\frac{1}{4}, 2\frac{1}{4}, 2\frac{1}{4}\}

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

Retransmission on timeout

Retransmission on timeout

Sliding Window

Sliding Window

TCP Congestion Control: bandwidth probe

TCP Congestion Control: bandwidth probe

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