SD network

目标:对计算机网络的网络层到应用层有最基本的了解。包括TCP和UDP、IP和应用层分别提供了什么保证,没有提供什么保证;我们能通过他们达到什么目的;我们如何使用他们。

general goal: on the Internet, we have to solve all of the “normal” networking problems (addressing, routing, transport) at massive scale, while supporting a diverse group of applications and competing economic interests.

introduction

link -> network -> transport -> application

history view

  1. make the internet flexible: layered model in 1978

    with a layered model, we can swap out protocols at one layer without much (or perhaps any) change to protocols at other layers.

  2. reliable transport: TCP 1983

  3. scalibility: EGP (1978), DNS (1982)

Problems (history view):

  1. Congestion collapse -> congestion control mechanism

  2. Commercial use -> policy routing(BGP) (early 90s)

  3. Assign addresses in chunks of different sizes -> CIDR

Problems (today):

  1. Denial of service attack
  2. security
  3. mobility
  4. address space depletion: IPv4 -> IPv6
  5. congestion control

Routing(hard to scale version)

Problems: For every node X, after the routing protocol is run, X’s routing table should contain a minimum-cost route to every other reachable node.

Concept:

  • Path: full path packets will travel.

  • Route: first hop of that path.

  • Link cost

distributed routing protocol: nodes build up their own routing tables, rather than having tables given to them by a centralized authority.

1
2
3
4
for node in Nodes:
Hello(Neighbors);
advertisements();
count(minimum_cost_routes);

Analysis:

there are two ways of routing applying distributed routing protocols:

  1. Link-state routing
  2. Distance-vector routing

Summary: they are good for very small networks but not good enough for scaling to the size of the internet.

Routing at scale:BGP

Concept

BGP: border gateway protocol

policy routing: switches make routing decisions based on some set of policies set by a human. Routing protocol must disseminate enough information to enable those policies.

Problem: why BGP can scale while link state and distance vector can’t?

BGP relationships: customer/provider, peers

Export policies

Import policies

Distributed routing

Problems with BGP

  • Scale
  • Secure

TCP

Concept: reliable transport&congestion control

arguments: Sequence numbers, acknowledgements,timeouts

Problem 0: create a reliable transport protocol, which delivers each byte of data exactly once, in-order, to the receiving application.

Goal: fairness and efficiency.

  • Approach 1: sliding-window protocol

problem 1: how to decide W? (Drops,delay, bandwidth bottleneck)

assumption: infinite offered load

Improvement 1: congestion control

AIMD (additive-increase/multiplicative-decrease): every RTT(round-trip-time, if there is no loss, W = W + 1; else, W = W/2

  • Issue 1: when remove the assumption, TCP has trouble measuring the fairness.

  • Example: S1,S2 offered load 10 packets/s; S3 5 packets/s.

    Result: get max-min fairness:S3 stops increase once it’s sending 5 packets/s. S1 and S2 continue increasing until they reach 7-8 packets/s.

improvement 2: Slow-start: at the start of the connection, double W every RTT.

improvement 3: Fast retransmit/fast recovery: retransmit packet k+1 as soon as four ACKs with sequence number k are received.

  • issue 2: TCP doesn’t react to congestion until it’s already happening. -> next lecture

In-network resource management

TCP have issues that:

problem 1: long delays when routers have too much buffering

problem 2: Doesn’t work well in some scenarios (DCTCP)

Problem 3: doesn’t react to congestion until queues are full.

Goal: solve problem 3: transient queues.

Idea: manipulate switches to get flexibility.

consideration: we need to think about what the method allows a switch to do? Example protocols? How the protocol works? Pros/cons of each protocol.

A1:Queue management

  1. drop tail

  2. Random early detection

  3. explicit congestion notification

A2:Delay-based scheduling

  1. priority queueing

A3:Bandwidth-based scheduling

  1. Round-robin
  2. weighted round-robin
  3. deficit round-robin

Discussion

let’s think about three ideas in lecture:

  1. Traffic differentiation

  2. Queue-management

  3. In-network resource-management