Docsity

Computer Networks Lecture 3: Protocols & Layering by Alex Snoeren, Study notes of Computer Systems Networking and Telecommunications

Partial preview of the text

Download Computer Networks Lecture 3: Protocols & Layering by Alex Snoeren and more Study notes Computer Systems Networking and Telecommunications in PDF only on Docsity!

CSE 123ACSE 123A

Computer NetworksComputer Networks

Winter 2005Winter 2005Lecture 3:^ Lecture 3:Protocols & LayeringProtocols & LayeringAlex SnoerenAlex Snoeren

(standing in for Stefan Savage)(standing in for Stefan Savage)

January 13, 2005

CSE 123A -- Lecture 2 – Signaling and Coding

Yesterday^ Yesterday^ z^ How to send data from point A to point B?

January 13, 2005

CSE 123A -- Lecture 2 – Signaling and Coding

There’^ There

’s more to networking thans more to networking than

sending bits?

Like What?

sending bits?

Like What?

z^ Sending bits to a

particular

destination

z^ Sending a

long

message to a particular

destination z Detecting if there was an error z Fixing the error z Deciding how fast to send z Making sure the message is kept private

January 13, 2005

CSE 123A -- Lecture 2 – Signaling and Coding

Definitions^ Definitions^ z^ Service

: A particular networking function (e.g. message delivery) z Protocol

: An implementation of a service (e.g. UDP) z^ Interface

: How a protocol is manipulated (e.g. packet format) z Layering^ ◆^ Technique for organizing protocols into an

ordered

series of

distinct abstractions ◆ The services provided by a layer depend

only^ on the services

provided by the previous, less abstract, layer

January 13, 2005

CSE 123A -- Lecture 2 – Signaling and Coding

Why Layering?^ Why Layering? z^ Solution: introduce an intermediate layer thatprovides a

unique

abstraction for various network

technologies

SSH^

FTP^

NFS

Packetradio

Coaxialcable

Fiberoptic

Application TransmissionMedia

HTTP

Intermediatelayer

Courtesy Ion Stoica

January 13, 2005

CSE 123A -- Lecture 2 – Signaling and Coding

Benefits of layering^ Benefits of layering^ z^ Encapsulation

◆^ Functionality inside a layer is self-contained; one layer doesn’tneed to reason about other layers z Modularity ◆^ Can replace a layer without impacting other layers ◆^ Lower layers can be reused by higher layers

(e.g. TCP and

UDP both are layered upon IP) z^ One obvious drawback^ ◆^

Information hiding can produce

inefficient implementations

◆^ Encryption layer and compression layer – independent?

January 13, 2005

CSE 123A -- Lecture 2 – Signaling and Coding

The OSI layering Model^ The OSI layering ModelEnd host^ ApplicationPresentationSessionTransportNetworkDatalinkPhysical

End hostApplicationPresentationSessionTransportNetworkDatalinkPhysical

Network nodeNetworkDatalinkPhysical

Network nodeNetworkDatalinkPhysical

-^ Top 4 layers are end-to-end •^ Lower 3 layers are hop-by-hop

January 13, 2005

CSE 123A -- Lecture 2 – Signaling and Coding

Physical Layer (1)^ Physical Layer (1)^ z^ Service

: move the information between two systems connected by a physical link z Interface

: specifies how to send a bit z^ Protocol

: coding scheme used to represent a bit, voltage levels, duration of a bit(what we talked about last class) z Examples: coaxial cable, optical fiber links,transmitters, receivers

Courtesy Ion Stoica

January 13, 2005

CSE 123A -- Lecture 2 – Signaling and Coding

Network Layer (3)^ Network Layer (3)^ z^ Service

◆^ Deliver a packet to specified destination ◆^ Perform segmentation/reassemble(fragmentation/defragmentation) ◆^ Sometimes:» Packet scheduling: order packets are sent» Buffer management: what if there are too many packets? z Interface

: send a packet to a given destination z^ Protocol

: global unique addresses, construct routing tables, forward packets towardsdestination

Courtesy Ion Stoica

January 13, 2005

CSE 123A -- Lecture 2 – Signaling and Coding

Transport Layer (4)^ Transport Layer (4)^ z^ Service

◆^ Provide an

error-free

and^ flow-controlled

end-to-

end connection ◆ Multiplex multiple transport connections to onenetwork connection z^ Interface

: send a packet to specify destination z^ Protocol

: implement reliability and flow control (e.g. TCP and UDP)

Courtesy Ion Stoica

January 13, 2005

CSE 123A -- Lecture 2 – Signaling and Coding

Presentation Layer (6)^ Presentation Layer (6)^ z^ Service

: data format conversion z^ Interface

: depends on service z^ Protocol

: define data formats, and rules to convert from one format to another(e.g. NFS’s XDR)

Courtesy Ion Stoica

January 13, 2005

CSE 123A -- Lecture 2 – Signaling and Coding

Application Layer (7)^ Application Layer (7)^ z^ Service

: any service provided to the end user z^ Interface

: depends on the application z^ Protocol

: depends on the application z^ Examples: FTP, Kazaa, SSHt, HTTP

Courtesy Ion Stoica

January 13, 2005

CSE 123A -- Lecture 2 – Signaling and Coding

Layer Encapsulation via^ Layer Encapsulation viaPacket HeadersPacket Headers^ z^ Typical Web packet^ z^ Notice that layers add overhead

◆^ Space (headers), effective bandwidth ◆^ Time (processing headers, peeling the onion),latency

IP Hdr^

Payload (Web object)

TCP Hdr

HTTP Hdr

Ethernet HdrStart of packet

End of packet

datalink

network

transport

application

January 13, 2005

CSE 123A -- Lecture 2 – Signaling and Coding

Layer encapsulation via^ Layer encapsulation via packet headers^ packet headers

End host ApplicationPresentationSessionTransportNetworkDatalinkPhysical

End hostApplicationPresentationSessionTransportNetworkDatalinkPhysical

DataDataP DataS Data T Data N

Data D

Data Ph

Data DataP DataS DataT

Data N

Data D

Data Ph

Layer N+1 packetbecomesLayer N data