Top Banner
6.033: Intro to Computer Networks Layering & Routing Dina Katabi & Sam Madden Some slides are contributed by N. McKewon, J. Rexford, I. Stoica
33

6.033: Intro to Computer Networks Layering & Routing Dina Katabi & Sam Madden Some slides are contributed by N. McKewon, J. Rexford, I. Stoica.

Dec 14, 2015

Download

Documents

Jake Beauford
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 6.033: Intro to Computer Networks Layering & Routing Dina Katabi & Sam Madden Some slides are contributed by N. McKewon, J. Rexford, I. Stoica.

6.033: Intro to Computer NetworksLayering & Routing

Dina Katabi & Sam Madden

Some slides are contributed by N. McKewon, J. Rexford, I. Stoica

Page 2: 6.033: Intro to Computer Networks Layering & Routing Dina Katabi & Sam Madden Some slides are contributed by N. McKewon, J. Rexford, I. Stoica.

The Internet is an Exciting Place

2

Page 3: 6.033: Intro to Computer Networks Layering & Routing Dina Katabi & Sam Madden Some slides are contributed by N. McKewon, J. Rexford, I. Stoica.

Two Billion Internet Users

3

~5 Billion Devices (PCs, laptops, smart

phones, etc.)

Page 4: 6.033: Intro to Computer Networks Layering & Routing Dina Katabi & Sam Madden Some slides are contributed by N. McKewon, J. Rexford, I. Stoica.

The Internet is a Tense Place

4

Page 5: 6.033: Intro to Computer Networks Layering & Routing Dina Katabi & Sam Madden Some slides are contributed by N. McKewon, J. Rexford, I. Stoica.
Page 6: 6.033: Intro to Computer Networks Layering & Routing Dina Katabi & Sam Madden Some slides are contributed by N. McKewon, J. Rexford, I. Stoica.

Internet Traffic to/from Egypt

Page 7: 6.033: Intro to Computer Networks Layering & Routing Dina Katabi & Sam Madden Some slides are contributed by N. McKewon, J. Rexford, I. Stoica.

Stop Online Piracy Act (SOPA)

7

Page 8: 6.033: Intro to Computer Networks Layering & Routing Dina Katabi & Sam Madden Some slides are contributed by N. McKewon, J. Rexford, I. Stoica.

Network Neutrality

8

FCC Rules Against Comcast P2P Throttling

The U.S. Federal Communications Commission has ordered Comcast to stop interfering with peer-to-peer traffic on its broadband network…

Page 9: 6.033: Intro to Computer Networks Layering & Routing Dina Katabi & Sam Madden Some slides are contributed by N. McKewon, J. Rexford, I. Stoica.

IP Address Space Exhaustion

9

“Currently, the Internet is built using IPv4, but on February 3, 2011, the global supply of unassigned IPv4 Internet addresses was exhausted. On that date, the Internet Assigned Numbers Authority has distributed the final five blocks of approximately 16 million IPv4 addresses among the five Regional Internet Registries.”

Page 10: 6.033: Intro to Computer Networks Layering & Routing Dina Katabi & Sam Madden Some slides are contributed by N. McKewon, J. Rexford, I. Stoica.

Cyber Attacks

10

Page 11: 6.033: Intro to Computer Networks Layering & Routing Dina Katabi & Sam Madden Some slides are contributed by N. McKewon, J. Rexford, I. Stoica.

What is the Internet?

3 guiding principles!

11

Page 12: 6.033: Intro to Computer Networks Layering & Routing Dina Katabi & Sam Madden Some slides are contributed by N. McKewon, J. Rexford, I. Stoica.

“Best-Effort Packet Delivery Service”

12

THE INTERNET

packets

Page 13: 6.033: Intro to Computer Networks Layering & Routing Dina Katabi & Sam Madden Some slides are contributed by N. McKewon, J. Rexford, I. Stoica.

“Power at the Edge”

End-to-End PrincipleWhenever possible, communications protocol

operations should be defined to occur at the end-points of a communications system.

Keeps the network simple and scalable Allows for easy introduction of new services at the edges

Page 14: 6.033: Intro to Computer Networks Layering & Routing Dina Katabi & Sam Madden Some slides are contributed by N. McKewon, J. Rexford, I. Stoica.

“A Network of Networks”

14

3

4

5

7

ClientBrowser

Web server

6

1

2

THE INTERNET

Page 15: 6.033: Intro to Computer Networks Layering & Routing Dina Katabi & Sam Madden Some slides are contributed by N. McKewon, J. Rexford, I. Stoica.

“A Network of Networks”

15

3

4

5

7

ClientBrowser

Web server

6

1

2

Page 16: 6.033: Intro to Computer Networks Layering & Routing Dina Katabi & Sam Madden Some slides are contributed by N. McKewon, J. Rexford, I. Stoica.

16

How the Internet is Organizing?Layering

Page 17: 6.033: Intro to Computer Networks Layering & Routing Dina Katabi & Sam Madden Some slides are contributed by N. McKewon, J. Rexford, I. Stoica.

Layering• Layering is a particular form of abstraction• The system is broken into a vertical stack of

functions/protocols• The service provided by one layer is based

solely on the service provided by layer below– This is the “up/down” interface

Page 18: 6.033: Intro to Computer Networks Layering & Routing Dina Katabi & Sam Madden Some slides are contributed by N. McKewon, J. Rexford, I. Stoica.

ApplicationHTTP, FTP, SMTP, BitTorrent, …

TransportTCP, UDP

End-to-End Layer

Layering in the Internet

Data Link

Physical

Ethernet, WiFi, … Framing, coding, channel accessModulation/demodulation

NetworkIP Forwarding & routing

Everything else!Reliability, integrity,packet ordering,congestion control, …

Page 19: 6.033: Intro to Computer Networks Layering & Routing Dina Katabi & Sam Madden Some slides are contributed by N. McKewon, J. Rexford, I. Stoica.

Application

Transport

Network

Datalink

Application

Transport

Network

Datalink

Network

Datalink

Physical medium

HostHost

Switch (Router)

• Link and network layers are implemented everywhere• The end-to-end layer (i.e., transport and application) is

implemented only at hosts

Page 20: 6.033: Intro to Computer Networks Layering & Routing Dina Katabi & Sam Madden Some slides are contributed by N. McKewon, J. Rexford, I. Stoica.

An Example

Browser

mypc.mit.edu

Server

web.mit.eduGET “6.033/index.html”

TCPTCPReliable data transfer

IP

IP IP IP

IP

E-mail

FTP

News

File

RouterRouterRouter

WirelessOptical T3

Ethernet

SCTP

UDP

OK; file data

Page 21: 6.033: Intro to Computer Networks Layering & Routing Dina Katabi & Sam Madden Some slides are contributed by N. McKewon, J. Rexford, I. Stoica.

The Internet “Hourglass”

IP

Web FTP Mail News Video Audio ping napster

Applications

TCP SCTP UDP ICMP

Transport protocols

Ethernet 802.11 SatelliteOpticalPower lines BluetoothATM

Link technologies• Many applications, transports, and link protocols• All use IP at the network layer: universal network layer

Page 22: 6.033: Intro to Computer Networks Layering & Routing Dina Katabi & Sam Madden Some slides are contributed by N. McKewon, J. Rexford, I. Stoica.

22

Routing (figuring out the routes) &

Forwarding (sending the packets)

Network Layer

Page 23: 6.033: Intro to Computer Networks Layering & Routing Dina Katabi & Sam Madden Some slides are contributed by N. McKewon, J. Rexford, I. Stoica.

How Does a Router Forwards the Packets?

• A router has input links and output links• A router sends an input packet on the output link leading toward

the packet’s destination node

• A router does not care of who generated the packet

Router

Destination of blue packets

Destination of red packets

Destination of green packets

Router

Page 24: 6.033: Intro to Computer Networks Layering & Routing Dina Katabi & Sam Madden Some slides are contributed by N. McKewon, J. Rexford, I. Stoica.

Link 1, input Link 1, output

Link 2, input Link 2, output

Link 3, input Link 3, output

AA

BB

CCRouter

DD

Router

How does the router know which output link leads to a packet destination?

• Packet header has the destination • Router looks up the destination in its table to find output link• Table is built using a routing protocol

Forwarding Table

Destination Out-link A out-link 1

B out-link 2

C out-link 3

D out-link 3

to B

Page 25: 6.033: Intro to Computer Networks Layering & Routing Dina Katabi & Sam Madden Some slides are contributed by N. McKewon, J. Rexford, I. Stoica.

Basic Requirements of a Routing Protocol

• Finds a path from source to destination• Optimizes some metric (delay, cost, etc.)• Has no (permanent) loops

Page 26: 6.033: Intro to Computer Networks Layering & Routing Dina Katabi & Sam Madden Some slides are contributed by N. McKewon, J. Rexford, I. Stoica.

Distance Vector Routing

• Initialize–Distance to self is zero and next hop is self–Distance to anyone else is infinity

• Announce: Every T seconds– Tell neighbors distances to all destinations

• Update route to dst. upon message from j–Distance via j = j’s distance + weight of link to

j– If distance via j is shorter than current

distance, update routing table to go via j

Page 27: 6.033: Intro to Computer Networks Layering & Routing Dina Katabi & Sam Madden Some slides are contributed by N. McKewon, J. Rexford, I. Stoica.

27

ExampleObjective: Determine the route from (R1, …, R7) to R8

that minimizes the distance

R5

R3

R7

R6R4R2R1

1 1 4

2

4

2 2 3

23

R8

Page 28: 6.033: Intro to Computer Networks Layering & Routing Dina Katabi & Sam Madden Some slides are contributed by N. McKewon, J. Rexford, I. Stoica.

28

Solution is simple by inspection... (in this case)

R3

R1

R5

R4

R8

R6

The shortest paths from all sources to a destination (e.g., R8) is the spanning tree routed at that destination.

R2

R7

1 1 4

2

4

2 23

2 3

Page 29: 6.033: Intro to Computer Networks Layering & Routing Dina Katabi & Sam Madden Some slides are contributed by N. McKewon, J. Rexford, I. Stoica.

29

Distance Vector Routing

R5

R3

R7

R8

R6R4R2R1

Example

1 1 4

2

4

2 2 3

23

Initial State: All routers except R8 set their route length

to ∞. R8 sets its route length to 0.

0

Page 30: 6.033: Intro to Computer Networks Layering & Routing Dina Katabi & Sam Madden Some slides are contributed by N. McKewon, J. Rexford, I. Stoica.

30

R5

R3

R7

R8

R6R4R2R1

1 1 4

2

4

2 2 3

23

R1 Inf

R2 Inf

R3 4, R8

R4 Inf

R5 2, R8

R6 2, R8

R7 3, R8

42 3

2

Every T seconds, Router i tells its neighbors about its current lowest-cost path to R8

Each router updates its distance as min(current distance, received distance + link weight)

Note, routing tables have both the next-hop and the distance

Distance Vector RoutingExample

Page 31: 6.033: Intro to Computer Networks Layering & Routing Dina Katabi & Sam Madden Some slides are contributed by N. McKewon, J. Rexford, I. Stoica.

31

R5

R3

R7

R8

R6R4R2R1

1 1 4

2

4

2 2 3

23

R1 6, R3

R2 4, R5

R3 4, R8

R4 6, R7

R5 2, R8

R6 2, R8

R7 3, R8

42 3

2

Repeat until no distance change

6 4 6

Distance Vector RoutingExample

Page 32: 6.033: Intro to Computer Networks Layering & Routing Dina Katabi & Sam Madden Some slides are contributed by N. McKewon, J. Rexford, I. Stoica.

32

R5

R3

R7

R8

R6R4R2R1

1 1 4

2

4

2 2 3

23

R1 6, R3

R2 4, R5

R3 4, R8

R4 6, R7

R5 2, R8

R6 2, R8

R7 3, R8

42 3

26 4 6

R5

R3

R7

R8

R6R4R2R1

1

2

4

2 2

23

R1 5, R2

R2 4, R5

R3 4, R8

R4 5, R2

R5 2, R8

R6 2, R8

R7 3, R8

42 3

25 4 5

Final Iteration

Distance Vector RoutingExample

Page 33: 6.033: Intro to Computer Networks Layering & Routing Dina Katabi & Sam Madden Some slides are contributed by N. McKewon, J. Rexford, I. Stoica.

Summary

• Internet architecture is based on layeringE2E LayerNetwork LayerLink Layer

• Job of Network Layer is Routing & Forwarding– Routers build routing tables using routing protocol– Routers forward packets based on the packet’s

header and the routing table