overview and introduction to networking - cos 316 lecture 1€¦ · option1: in-networkreliability...

23
Overview and Introduction to Networking COS 316 Lecture 1 Amit Levy 1

Upload: others

Post on 24-Jun-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Overview and Introduction to Networking - COS 316 Lecture 1€¦ · Option1: In-networkreliability • Eachlink-levelconnectionisreliable • Pros: • Simpleabstractiontoapplications(end-to-endprotocols

Overview and Introduction to NetworkingCOS 316 Lecture 1

Amit Levy

1

Page 2: Overview and Introduction to Networking - COS 316 Lecture 1€¦ · Option1: In-networkreliability • Eachlink-levelconnectionisreliable • Pros: • Simpleabstractiontoapplications(end-to-endprotocols

Course Overview

• Instructors: Amit Levy (me!) & Alan Kaplan

• Staff: Danny Chen, Ashwini Raina, Mary Hogan, David Liu, Will Sweeny

• Lectures: M/W 1:30-2:20, Precepts: Thursdays

• Guest lectures from: Prof. Rexford, Prof. Freedman, Prof. Jamieson, Prof. Lloyd

• Goals:

1. Learn common principles of system design

2. A taste of systems fields: networking, distributed systems, security, operating systems.

3. Learn practical skills: Go, git, socket programming, concurrent programming. . .

4. Build a meaningfully large system: a web framework

2

Page 3: Overview and Introduction to Networking - COS 316 Lecture 1€¦ · Option1: In-networkreliability • Eachlink-levelconnectionisreliable • Pros: • Simpleabstractiontoapplications(end-to-endprotocols

What is a System?

Page 4: Overview and Introduction to Networking - COS 316 Lecture 1€¦ · Option1: In-networkreliability • Eachlink-levelconnectionisreliable • Pros: • Simpleabstractiontoapplications(end-to-endprotocols

What are examples of systems?

• Operating system kernel

• The Internet

• Database

• Distributed file system

• Web framework

• Game engine

• Web browser

• Sensor network

3

Page 5: Overview and Introduction to Networking - COS 316 Lecture 1€¦ · Option1: In-networkreliability • Eachlink-levelconnectionisreliable • Pros: • Simpleabstractiontoapplications(end-to-endprotocols

What are examples of systems?

• Operating system kernel

• The Internet

• Database

• Distributed file system

• Web framework

• Game engine

• Web browser

• Sensor network

3

Page 6: Overview and Introduction to Networking - COS 316 Lecture 1€¦ · Option1: In-networkreliability • Eachlink-levelconnectionisreliable • Pros: • Simpleabstractiontoapplications(end-to-endprotocols

What makes something a System?

• Provides an interface to underlying resources

• Mediates access to shared resources

• Isolates applications

• Abstracts complexity

• Abstracts differences in implementation

4

Page 7: Overview and Introduction to Networking - COS 316 Lecture 1€¦ · Option1: In-networkreliability • Eachlink-levelconnectionisreliable • Pros: • Simpleabstractiontoapplications(end-to-endprotocols

What makes something a System?

• Provides an interface to underlying resources

• Mediates access to shared resources

• Isolates applications

• Abstracts complexity

• Abstracts differences in implementation

4

Page 8: Overview and Introduction to Networking - COS 316 Lecture 1€¦ · Option1: In-networkreliability • Eachlink-levelconnectionisreliable • Pros: • Simpleabstractiontoapplications(end-to-endprotocols

Why is this challanging?

• Correctness

• Performance

• Security

• How general should an interface be?

• How portable should an interface be?

5

Page 9: Overview and Introduction to Networking - COS 316 Lecture 1€¦ · Option1: In-networkreliability • Eachlink-levelconnectionisreliable • Pros: • Simpleabstractiontoapplications(end-to-endprotocols

Why is this challanging?

• Correctness

• Performance

• Security

• How general should an interface be?

• How portable should an interface be?

5

Page 10: Overview and Introduction to Networking - COS 316 Lecture 1€¦ · Option1: In-networkreliability • Eachlink-levelconnectionisreliable • Pros: • Simpleabstractiontoapplications(end-to-endprotocols

Introduction to Networking

Page 11: Overview and Introduction to Networking - COS 316 Lecture 1€¦ · Option1: In-networkreliability • Eachlink-levelconnectionisreliable • Pros: • Simpleabstractiontoapplications(end-to-endprotocols

The simplest network

Figure 1: A two node network

6

Page 12: Overview and Introduction to Networking - COS 316 Lecture 1€¦ · Option1: In-networkreliability • Eachlink-levelconnectionisreliable • Pros: • Simpleabstractiontoapplications(end-to-endprotocols

A Multi-Hop Network

Figure 2: How can we get data from A to B?7

Page 13: Overview and Introduction to Networking - COS 316 Lecture 1€¦ · Option1: In-networkreliability • Eachlink-levelconnectionisreliable • Pros: • Simpleabstractiontoapplications(end-to-endprotocols

Option 1: Circuit Switched Networking

Figure 3: Bell Systems Switchboard [2]8

Page 14: Overview and Introduction to Networking - COS 316 Lecture 1€¦ · Option1: In-networkreliability • Eachlink-levelconnectionisreliable • Pros: • Simpleabstractiontoapplications(end-to-endprotocols

Option 2: Packet Switched Networking

• Data between nodes broken into “packets”

• Routes must only be consistent on a per-packet basis

• Packets include a header with the destination address (e.g. an IP address)

• Internal nodes (routers, switches) forward packets to other nodes closer to thedestination.

This is what the Internet uses

9

Page 15: Overview and Introduction to Networking - COS 316 Lecture 1€¦ · Option1: In-networkreliability • Eachlink-levelconnectionisreliable • Pros: • Simpleabstractiontoapplications(end-to-endprotocols

How can we get data from A to B reliabily?

Figure 4: How can we get data from A to B reliably?10

Page 16: Overview and Introduction to Networking - COS 316 Lecture 1€¦ · Option1: In-networkreliability • Eachlink-levelconnectionisreliable • Pros: • Simpleabstractiontoapplications(end-to-endprotocols

Option 1: In-network reliability

• Each link-level connection is reliable

• Pros:

• Simple abstraction to applications (end-to-end protocols)

• Resiliant to changes in network topology

• Cons:

• High packet overhead

• Higher latency

• Doesn’t solve the end-to-end problem

• Often still need to check validity of multi-packet transfer (e.g. a whole file)

11

Page 17: Overview and Introduction to Networking - COS 316 Lecture 1€¦ · Option1: In-networkreliability • Eachlink-levelconnectionisreliable • Pros: • Simpleabstractiontoapplications(end-to-endprotocols

Option 2: End-to-end reliability

• Each link may be unreliable

• Higher-layer protocols use acknowledgement packets, timeouts, checksums. . .

• Pros:

• More general: only some applications want reliable transport

• More performant when packet loss is rare

• Cons:

• Pushes complexity up the stack

• May take longer to notice and retransmit packets

• Harder to handle changes in network topology

This is what the Internet uses 12

Page 18: Overview and Introduction to Networking - COS 316 Lecture 1€¦ · Option1: In-networkreliability • Eachlink-levelconnectionisreliable • Pros: • Simpleabstractiontoapplications(end-to-endprotocols

Narrow Waist: The Internet’s Layered Model

IPEthernet

Sonet ATM

FibreCoax

Cat5 Wi-Fi 3G

Web

EmailVoIP P2P

RTSP

TCP UDP

ICMP

Application

Transport

Network

Link

Physical

Every Internetdevice implements

IP

Figure 5: IP is the “narrow waist” of the Inernet [1]13

Page 19: Overview and Introduction to Networking - COS 316 Lecture 1€¦ · Option1: In-networkreliability • Eachlink-levelconnectionisreliable • Pros: • Simpleabstractiontoapplications(end-to-endprotocols

Why is a “narrow waist” useful?

• Portability: Interconnecting varying networks

• Ethernet, WiFi, DSL, Cable, 4G, etc. . .

• Hides variation from applications

• Generality: many applications can use the same Internet

• The Web, file sharing, video streaming, VOIP, e-mail, etc. . .

• Internal nodes don’t need to change for new application

14

Page 20: Overview and Introduction to Networking - COS 316 Lecture 1€¦ · Option1: In-networkreliability • Eachlink-levelconnectionisreliable • Pros: • Simpleabstractiontoapplications(end-to-endprotocols

Why is a “narrow waist” useful?

• Portability: Interconnecting varying networks

• Ethernet, WiFi, DSL, Cable, 4G, etc. . .

• Hides variation from applications

• Generality: many applications can use the same Internet

• The Web, file sharing, video streaming, VOIP, e-mail, etc. . .

• Internal nodes don’t need to change for new application

14

Page 21: Overview and Introduction to Networking - COS 316 Lecture 1€¦ · Option1: In-networkreliability • Eachlink-levelconnectionisreliable • Pros: • Simpleabstractiontoapplications(end-to-endprotocols

Summary

This time: The Internet• The Internet is a graph: a network of networks

• Routing through packet switching

• Reliability end-to-end

• Narrow waist makes one system general for many applications, portable acrossmany networks.

Next time: Syllabus & Distributed systems & Databases

15

Page 22: Overview and Introduction to Networking - COS 316 Lecture 1€¦ · Option1: In-networkreliability • Eachlink-levelconnectionisreliable • Pros: • Simpleabstractiontoapplications(end-to-endprotocols

References

Page 23: Overview and Introduction to Networking - COS 316 Lecture 1€¦ · Option1: In-networkreliability • Eachlink-levelconnectionisreliable • Pros: • Simpleabstractiontoapplications(end-to-endprotocols

References

[1] A representation of the Internet Hourglass. Wikimedia Commons.

[2] Photograph of Women Working at a Bell System international TelephoneSwitchboard. The U.S. National Archives.

16