peter a. steenkiste, scs, cmu 1 lecture 2 protocol stacks peter steenkiste david eckhardt school of...

31
Peter A. Steenkiste, SCS, CMU 1 Lecture 2 Protocol Stacks Peter Steenkiste David Eckhardt School of Computer Science Carnegie Mellon University 15-441 Networking, Spring 2006 http://www.cs.cmu.edu/~441

Upload: rose-singleton

Post on 19-Jan-2018

223 views

Category:

Documents


0 download

DESCRIPTION

Peter A. Steenkiste, SCS, CMU 3 Some History: The Early Days l Early packet switching networks (61-72). »Definition of packet switching »Early DARPA net: up to tens of nodes –single network –discovery of “interesting” applications »Less than 100 years after telephone (Alexander Bell, 1876) l Internetworking (72-80). »Multiple networks with inter-networking: networks are independent, but need some rules for interoperability »Key concepts: best effort service, “stateless” routers, decentralized control (very different from telephones!) »Basis for Internet: TCP, IP, congestion control, DNS, … »Rapid growth: 10 to hosts in 10 years –Driven by NSF net, research community

TRANSCRIPT

Page 1: Peter A. Steenkiste, SCS, CMU 1 Lecture 2 Protocol Stacks Peter Steenkiste David Eckhardt School of Computer Science Carnegie Mellon University 15-441

Peter A. Steenkiste, SCS, CMU 1

Lecture 2Protocol Stacks

Peter SteenkisteDavid Eckhardt

School of Computer ScienceCarnegie Mellon University

15-441 Networking, Spring 2006http://www.cs.cmu.edu/~441

Page 2: Peter A. Steenkiste, SCS, CMU 1 Lecture 2 Protocol Stacks Peter Steenkiste David Eckhardt School of Computer Science Carnegie Mellon University 15-441

Peter A. Steenkiste, SCS, CMU 2

Today’s Lecture

Some history. What is a protocol. Protocol stacks. Standards organizations. Application layer.

Page 3: Peter A. Steenkiste, SCS, CMU 1 Lecture 2 Protocol Stacks Peter Steenkiste David Eckhardt School of Computer Science Carnegie Mellon University 15-441

Peter A. Steenkiste, SCS, CMU 3

Some History: The Early Days

Early packet switching networks (61-72).» Definition of packet switching» Early DARPA net: up to tens of nodes

– single network– discovery of “interesting” applications

» Less than 100 years after telephone (Alexander Bell, 1876) Internetworking (72-80).

» Multiple networks with inter-networking: networks are independent, but need some rules for interoperability

» Key concepts: best effort service, “stateless” routers, decentralized control (very different from telephones!)

» Basis for Internet: TCP, IP, congestion control, DNS, …» Rapid growth: 10 to 100000 hosts in 10 years

– Driven by NSF net, research community

Page 4: Peter A. Steenkiste, SCS, CMU 1 Lecture 2 Protocol Stacks Peter Steenkiste David Eckhardt School of Computer Science Carnegie Mellon University 15-441

Peter A. Steenkiste, SCS, CMU 4

Next Step:Commercialization

Industry interest in networking encourages first commercial network deployment.

» In part also encouraged by NSFNET policies Introduction of the Web makes networks

more accessible.» Killer application» Good user interface that is accessible to anybody» Network access on every desktop and in every home

Today: e-commerce.» Integral part of the economy» Part of every day life: entertainment, news, ..

Page 5: Peter A. Steenkiste, SCS, CMU 1 Lecture 2 Protocol Stacks Peter Steenkiste David Eckhardt School of Computer Science Carnegie Mellon University 15-441

Peter A. Steenkiste, SCS, CMU 5

Current Trends

Access for mobile users:» 802.11 is becoming ubiquitous» PDA/cellphone access

Networked sensors:» Have always existed in “embedded” networks, e.g. X10» Integration into broader network infrastructure next

What else?

Page 6: Peter A. Steenkiste, SCS, CMU 1 Lecture 2 Protocol Stacks Peter Steenkiste David Eckhardt School of Computer Science Carnegie Mellon University 15-441

Peter A. Steenkiste, SCS, CMU 6

Alexander Bellversus the Internet

Analog voice versus digital information.

Permanent circuit versus packet switched.

Analog Signal

“Digital” Signal

Pgh SF

Pgh SF

Page 7: Peter A. Steenkiste, SCS, CMU 1 Lecture 2 Protocol Stacks Peter Steenkiste David Eckhardt School of Computer Science Carnegie Mellon University 15-441

Peter A. Steenkiste, SCS, CMU 7

Taxonomy of Communication Networks

CommunicationNetworks

BroadcastNetworks

SwitchedNetworks

Circuit-SwitchedNetworks

Packet-SwitchedNetworks

DatagramNetworks

Virtual CircuitNetworks

Page 8: Peter A. Steenkiste, SCS, CMU 1 Lecture 2 Protocol Stacks Peter Steenkiste David Eckhardt School of Computer Science Carnegie Mellon University 15-441

Peter A. Steenkiste, SCS, CMU 8

Different Network Views A network is a shared infrastructure that

supports communication for many users.» Sharing view: how do users share the network?

Many network technologies exist.» Technology view: how do the technologies coexist?

Networks are owned and managed by multiple organizations.

» Management view: how does global communication take place?

Networks cover different geographic areas.» Geographic view: network diameter?

Networks run many protocols that are responsible for different functions.

» Protocol view: how are the many protocols coordinated?

Page 9: Peter A. Steenkiste, SCS, CMU 1 Lecture 2 Protocol Stacks Peter Steenkiste David Eckhardt School of Computer Science Carnegie Mellon University 15-441

Peter A. Steenkiste, SCS, CMU 9

Protocols

An agreement between parties on who communication should take place.

Protocols may have to define many aspects of the communication.

» Data encoding, language, error recovery, termination conditions, ..

Network protocols can exist between computer programs or hardware components.

Can you give me some directions?

Certainly, where would you

like to go?

Heinz Hall

Go left atthe next light

Thank you

Page 10: Peter A. Steenkiste, SCS, CMU 1 Lecture 2 Protocol Stacks Peter Steenkiste David Eckhardt School of Computer Science Carnegie Mellon University 15-441

Peter A. Steenkiste, SCS, CMU 10

More on Protocols

Protocols are the key to interoperability.» The hardware/software of communicating parties are

often not built by the same vendor– Sun workstation with PC, 3COM with Cisco bridge, ..

» Yet they can communicate because they use the same protocol

Protocols exist at many levels.» Application level protocols, e.g. access to mail,

distribution of bboards, web access, ..» Protocols at the hardware level allow two boxes to

communicate over a link, e.g. the Ethernet protocol» Intermediate protocols can “add value” to a lower-level

protocol, e.g. provide a reliable communication service over an unreliable link

Page 11: Peter A. Steenkiste, SCS, CMU 1 Lecture 2 Protocol Stacks Peter Steenkiste David Eckhardt School of Computer Science Carnegie Mellon University 15-441

Peter A. Steenkiste, SCS, CMU 11

Too Many Network Components

Application

Operating System

Protocol SoftwareComputer

Links

Router Hardware

Router Software(many protocols)

Bridge HW/SW

Application

Operating System

ComputerNetwork Interface

Page 12: Peter A. Steenkiste, SCS, CMU 1 Lecture 2 Protocol Stacks Peter Steenkiste David Eckhardt School of Computer Science Carnegie Mellon University 15-441

Peter A. Steenkiste, SCS, CMU 12

What is a Communication Network

Electrons and photons as communication medium.

Links: fiber, copper, wireless, .. Switches: electronic, optical, crossbar,

Banyan, .. Protocols: Ethernet, X.25, SONET,

Framerelay, IP, TCP, HTTP, … Functionality: routing, error control, flow

control, congestion control, QoS, security, .. Applications: FTP, web, games, telephone,

video streaming, ..

Page 13: Peter A. Steenkiste, SCS, CMU 1 Lecture 2 Protocol Stacks Peter Steenkiste David Eckhardt School of Computer Science Carnegie Mellon University 15-441

Peter A. Steenkiste, SCS, CMU 13

How to Organize the Network?

Web FTP VoiceTelnet

Tw. Pair Coax WirelessOptical

Video

Page 14: Peter A. Steenkiste, SCS, CMU 1 Lecture 2 Protocol Stacks Peter Steenkiste David Eckhardt School of Computer Science Carnegie Mellon University 15-441

Peter A. Steenkiste, SCS, CMU 14

Try Again:How to Organize the

Network?

Web FTP VoiceTelnet

Tw. Pair Coax WirelessOptical

Intermediate Layer

Page 15: Peter A. Steenkiste, SCS, CMU 1 Lecture 2 Protocol Stacks Peter Steenkiste David Eckhardt School of Computer Science Carnegie Mellon University 15-441

Peter A. Steenkiste, SCS, CMU 15

Types of Protocols

Core network: responsible for transferring data between a sending and receiving host.

End-to-end protocols: present a network service to applications and users.

» May add value to the core network protocols

host

hosthost

host

host

host

host

Page 16: Peter A. Steenkiste, SCS, CMU 1 Lecture 2 Protocol Stacks Peter Steenkiste David Eckhardt School of Computer Science Carnegie Mellon University 15-441

Peter A. Steenkiste, SCS, CMU 16

Protocol andService Levels

Application

End-to-end

CoreNetwork

Page 17: Peter A. Steenkiste, SCS, CMU 1 Lecture 2 Protocol Stacks Peter Steenkiste David Eckhardt School of Computer Science Carnegie Mellon University 15-441

Peter A. Steenkiste, SCS, CMU 17

A Layer Network ModelThe Open Systems Interconnection (OSI) Model.

Application

Presentation

Session

Transport

Network

Data link

Physical1

2

3

4

5

6

7

Network

Data link

Physical

Application

Presentation

Session

Transport

Network

Data link

Physical

Page 18: Peter A. Steenkiste, SCS, CMU 1 Lecture 2 Protocol Stacks Peter Steenkiste David Eckhardt School of Computer Science Carnegie Mellon University 15-441

Peter A. Steenkiste, SCS, CMU 18

OSI Motivation

Standard way of breaking up a system in a set of components, but the components are organized as a set of layers.

» Only horizontal and vertical communication» Components/layers can be implemented and modified in isolation

Each layer offers a service to the higher layer, using the services of the lower layer.

“Peer” layers on different systems communicate via a protocol.

» higher level protocols (e.g. TCP/IP, Appletalk) can run on multiple lower layers

» multiple higher level protocols can share a single physical network

Page 19: Peter A. Steenkiste, SCS, CMU 1 Lecture 2 Protocol Stacks Peter Steenkiste David Eckhardt School of Computer Science Carnegie Mellon University 15-441

Peter A. Steenkiste, SCS, CMU 19

OSI Functions

(1) Physical: transmission of a bit stream. (2) Data link: flow control, framing, error

detection. (3) Network: switching and routing. (4) Transport: reliable end to end delivery. (5) Session: managing logical connections. (6) Presentation: data transformations. (7) Application: specific uses, e.g. mail, file

transfer, telnet, network management.

Multiplexing takes place in multiple layers

Page 20: Peter A. Steenkiste, SCS, CMU 1 Lecture 2 Protocol Stacks Peter Steenkiste David Eckhardt School of Computer Science Carnegie Mellon University 15-441

Peter A. Steenkiste, SCS, CMU 20

Example: Sending a Web Page

Http hdr Web page

TCP header

. . .

Applicationpayload

Application

Presentation

Session

Transport

Network

Data link

Physical

Page 21: Peter A. Steenkiste, SCS, CMU 1 Lecture 2 Protocol Stacks Peter Steenkiste David Eckhardt School of Computer Science Carnegie Mellon University 15-441

Peter A. Steenkiste, SCS, CMU 21

Ethernet preamble

A TCP / IP / 802.3 Packet

MAC header

LLC / SNAP header

IP header

TCP header

Data

Application

Presentation

Session

Transport

Network

Data link

Physical

Page 22: Peter A. Steenkiste, SCS, CMU 1 Lecture 2 Protocol Stacks Peter Steenkiste David Eckhardt School of Computer Science Carnegie Mellon University 15-441

Peter A. Steenkiste, SCS, CMU 22

Multiplexing and Demultiplexing

There may be multiple implementations of each layer.

» How does the receiver know what version of a layer to use?

Each header includes a demultiplexing field that is used to identify the next layer.

» Filled in by the sender» Used by the receiver

IP

TCP

IP

TCP

V/HL TOS LengthID Flags/Offset

TTL Prot. H. ChecksumSource IP address

Destination IP addressOptions..

Page 23: Peter A. Steenkiste, SCS, CMU 1 Lecture 2 Protocol Stacks Peter Steenkiste David Eckhardt School of Computer Science Carnegie Mellon University 15-441

Peter A. Steenkiste, SCS, CMU 23

Different Sources of Components

Application: web server/browser, mail, distributed game,..

Presentation/session.» Often part of application» Sometimes a library

Transport/network.» Typically part of the operating

system Datalink.

» Often written by vendor of the network interface hardware

Physical.» Hardware: card and link

Application

Presentation

Session

Transport

Network

Data link

Physical

Page 24: Peter A. Steenkiste, SCS, CMU 1 Lecture 2 Protocol Stacks Peter Steenkiste David Eckhardt School of Computer Science Carnegie Mellon University 15-441

Peter A. Steenkiste, SCS, CMU 24

Limitations of theLayered Model

Some layers are not always cleanly separated.» Inter-layer dependencies in implementations for

performance reasons» Some dependencies in the standards (header checksums)

Higher layers not always well defined.» Session, presentation, application layers

Lower layers have “sublayers”.» Sublayers well defined in the standards

Interfaces are not really standardized.» It would be hard to mix and match layers from independent

implementations» Many cross-layer assumptions, e.g. buffer management

Page 25: Peter A. Steenkiste, SCS, CMU 1 Lecture 2 Protocol Stacks Peter Steenkiste David Eckhardt School of Computer Science Carnegie Mellon University 15-441

Peter A. Steenkiste, SCS, CMU 25

The TCP/IP Model

Application(plus

libraries)

TCP/UDPIP/ICMP

Data link

Physical

Application

Presentation

Session

Transport

Network

Data link

Physical

Page 26: Peter A. Steenkiste, SCS, CMU 1 Lecture 2 Protocol Stacks Peter Steenkiste David Eckhardt School of Computer Science Carnegie Mellon University 15-441

Peter A. Steenkiste, SCS, CMU 26

Local Area Network Protocols

IEEE 802 standards “refine” the OSI data link layer.

Application

Presentation

Session

Transport

Network

Data link

Physical

LLC

MAC

Physical

UpperLayer

Protocols

link serviceaccess points

Page 27: Peter A. Steenkiste, SCS, CMU 1 Lecture 2 Protocol Stacks Peter Steenkiste David Eckhardt School of Computer Science Carnegie Mellon University 15-441

Peter A. Steenkiste, SCS, CMU 27

The Internet Protocol Suite

Application

Presentation

Session

Transport

Network

Data link

Physical

UDP TCP

Data Link

Physical

ApplicationsPresentation

Session

The Hourglass Model

Page 28: Peter A. Steenkiste, SCS, CMU 1 Lecture 2 Protocol Stacks Peter Steenkiste David Eckhardt School of Computer Science Carnegie Mellon University 15-441

Peter A. Steenkiste, SCS, CMU 28

Standardization

Key to network interoperability. A priori standards.

» Standards are defined first by a standards committee» Risk of defining standards that are untested or

unnecessary» Standard may be available before there is serious use of

the technology De facto standards.

» Standards is based on an existing systems» Gives the company that developed the base system a big

advantage» Often results in competing “standards” before the official

standard is established

Page 29: Peter A. Steenkiste, SCS, CMU 1 Lecture 2 Protocol Stacks Peter Steenkiste David Eckhardt School of Computer Science Carnegie Mellon University 15-441

Peter A. Steenkiste, SCS, CMU 29

Relevant Standardization Bodies

ITU-TS - Telecommunications Sector of the International Telecommunications Union.

» government representatives (PTTs/State Department)» responsible for international “recommendations”

T1 - telecom committee reporting to American National Standards Institute.

» T1/ANSI formulate US positions» interpret/adapt ITU standards for US use, represents US

in ISO IEEE - Institute of Electrical and Electronics

Engineers.» responsible for many physical layer and datalink layer

standards ISO - International Standards Organization.

» covers a broad area

Page 30: Peter A. Steenkiste, SCS, CMU 1 Lecture 2 Protocol Stacks Peter Steenkiste David Eckhardt School of Computer Science Carnegie Mellon University 15-441

Peter A. Steenkiste, SCS, CMU 30

The Internet Engineering Task Force

The Internet society.» Oversees the operations of the Internet

Internet Engineering Task Force.» decides what technology will be used in the Internet» based on working groups that focus on specific issues» encourages wide participation

Request for Comments.» document that provides information or defines standard» requests feedback from the community» can be “promoted” to standard under certain conditions

– consensus in the committee– interoperating implementations

Page 31: Peter A. Steenkiste, SCS, CMU 1 Lecture 2 Protocol Stacks Peter Steenkiste David Eckhardt School of Computer Science Carnegie Mellon University 15-441

Peter A. Steenkiste, SCS, CMU 31

Higher Level Standards

Many session/application level operations are relevant to networks.

» encoding: MPEG, encryption, ...» services: electronic mail, newsgroups, HTTP, ...» electronic commerce, ....

Standards are as important as for “lower-level” networks: interoperability.

» defined by some of the same bodies as the low-level standards, e.g. IETF

Interactions between layers are important.» persistent HTTP» encryption and compression» MPEG frame types