Anda di halaman 1dari 15

Review: The Problem"

CS162
Operating Systems and
Systems Programming
Lecture 16
Layering"

Application"

Skype "

Transmission"
Media"

March 31, 2014!


Anthony D. Joseph!
http://inst.eecs.berkeley.edu/~cs162!

SSH"

Coaxial "
cable"

NFS"

HTTP"

Fiber"
optic"

Packet"
Radio"

Re-implement every application for every


technology?!
No! But how does the Internet design avoid this?!

3/31/2014!

Solution: Intermediate Layers"

Anthony D. Joseph

!CS162

UCB Spring 2014!

Lec 16.2!

Software System Modularity"


Partition system into modules & abstractions:!
Well-defined interfaces give flexibility!

Introduce intermediate layers that provide set of abstractions


for various network functionality & technologies!

Hides implementation - thus, it can be freely changed!

A new app/media implemented only once!


Variation on add another level of indirection!
Application"

Skype "

SSH"

NFS"

Extend functionality of system by adding new modules!

E.g., libraries encapsulating set of functionality!


E.g., programming language + compiler abstracts away
not only how the particular CPU works !

HTTP"

but also the basic computational model !

Intermediate "
layers"

Well-defined interfaces hide information!


Present high-level abstractions!

Transmission"
Media"

3/31/2014!

Anthony D. Joseph

Coaxial "
cable"

Fiber"
optic"

!CS162

Packet"
radio"

UCB Spring 2014!

But can impair performance!

3/31/2014!

Lec 16.3!

Page 1

Anthony D. Joseph

!CS162

UCB Spring 2014!

Lec 16.4!

Network System Modularity"

Layering: A Modular Approach"

Like software modularity, but:!


Partition the system!

Implementation distributed across many machines


(routers and hosts)!

Each layer solely relies on services from layer below !


Each layer solely exports services to layer above!

Must decide:!

Interface between layers defines interaction!

How to break system into modules:!

Hides implementation details!


Layers can change without disturbing other layers!

Layering!

What functionality does each module implement:!


End-to-End Principle: dont put it in the network if you can
do it in the endpoints."

We will address these choices in this lecture!


3/31/2014!

Anthony D. Joseph

!CS162

UCB Spring 2014!

3/31/2014!

Lec 16.5!

Protocol Standardization"

Anthony D. Joseph

!CS162

UCB Spring 2014!

Example: The Internet Protocol (IP):


Best-Effort Packet Delivery"

Ensure communicating hosts speak the same protocol!

Datagram packet switching!

Standardization to enable multiple implementations!

Send data in packets!


Header with source & destination address!

Or, the same folks have to write all the software!

Standardization: Internet Engineering Task Force!

Service it provides:!

Based on working groups that focus on specific issues!


Produces Request For Comments (RFCs)!
Promoted to standards via rough consensus and running code!

IETF Web site is http://www.ietf.org/ !


RFCs archived at http://www.rfc-editor.org/ !

source

Packet arrives quickly (if it does)!


Packets may be lost!
Packets may be corrupted!
Packets may be delivered out of order!

De facto standards: same folks writing the code!


P2P file sharing, Skype, <your protocol here>!

3/31/2014!

Anthony D. Joseph

!CS162

UCB Spring 2014!

Lec 16.6!

destination

IP network
3/31/2014!

Lec 16.7!

Page 2

Anthony D. Joseph

!CS162

UCB Spring 2014!

Lec 16.8!

Example: Transmission Control


Protocol (TCP)"

Goals for Today"


Networking Concepts and Functionalities!

Communication service!
Ordered, reliable byte stream!
Simultaneous transmission in both directions!

Properties of Layers!

Key mechanisms at end hosts!

Retransmit lost and corrupted packets!


Discard duplicate packets and put packets in order!
Flow control to avoid overloading the receiver buffer!
Congestion control to adapt sending rate to network load!

Five IP Networking Layers:!


Physical, Datalink, Network, Transport, and Application!

Drawbacks of Layering!

TCP connection

source
3/31/2014!

Anthony D. Joseph

network
!

Note: Some slides and/or pictures in the following are adapted from slides
2005 Silberschatz, Galvin, and Gagne. Slides courtesy of Anthony D.
Joseph, John Kubiatowicz, AJ Shankar, George Necula, Alex Aiken, Eric
! Ras Bodik, Ion Stoica, Doug Tygar, and David Wagner.!
Brewer,

destination

!CS162

UCB Spring 2014!

3/31/2014!

Lec 16.9!

Anthony D. Joseph

!CS162

UCB Spring 2014!

Lec 16.10!

Why is Networking Important?"

Example: Whats in a Search Query?"

Virtually all apps you use communicate over network!


DNS !
Servers!

Many times main functionality is implemented remotely


(e.g., Google services, Amazon, Facebook, Twitter, )!
March 2014: Facebook announces 1B active mobile users!

Datacenter!

DNS!
request!

create!
result!
page!

Search!
Index!

Thus, connectivity is key service provided by an OS!


Many times, connectivity issues among top complaints!

Q: What is a Facation? !

Load!
balancer!

A: Taking a break from Facebook !


Dec 2013 Top iPad Air Problems "

Ad Server!

Complex interaction of multiple components in multiple


administrative domains!
3/31/2014!

Anthony D. Joseph

!CS162

UCB Spring 2014!

3/31/2014!

Lec 16.11!

Page 3

Anthony D. Joseph

!CS162

UCB Spring 2014!

Lec 16.12!

Why is Networking Important?"

Network Concepts"
Network (interface) card/controller: hardware that
physically connects a computer to the network!
A computer can have more than one networking cards!

Virtually all apps you use communicate over network!


Many times main functionality is implemented remotely
(e.g., Google services, Amazon, Facebook, Twitter, )!

E.g., one card for wired network, and one for wireless network!

Thus, connectivity is key service provided by an OS!


Many times, connectivity issues among top complaints !

Process!
A!

Process!
B!

Some of the hottest opportunities in the OS space: !


Optimize OS for network boxes (e.g., intrusion detection,
firewalls)!
OSes for Software Defined Networks (SDNs)!

OS!!

!
OS!

!
!

!
!

Network cards!
3/31/2014!

Anthony D. Joseph

!CS162

3/31/2014!

Lec 16.13!

UCB Spring 2014!

Anthony D. Joseph

!CS162

Lec 16.14!

UCB Spring 2014!

Network Concepts (contd)"

Network Concepts (contd)"

Typically, each network card is associated two addresses:!

MAC address: 48-bit unique identifier assigned by card vendor!


IP Address: 32-bit (or 128-bit for IPv6) address assigned by
network administrator or dynamically when computer connects
to network!

Media Access Control (MAC), or physical, address!


IP (network) address; can be shared by network cards on
same host!

Process!
A!

OS!!
!
!

IP Addr2!
MAC Addr2!

IP Addr1!
MAC Addr1!
3/31/2014!

Process!
A!

Process!
B!
IP Addr3!
MAC Addr3!

!
OS!

OS!!

!
!

!
!

!CS162

IP Addr2!
MAC Addr2!

IP Addr1!
MAC Addr1!

Network cards!
Anthony D. Joseph

Process!
B!

UCB Spring 2014!

3/31/2014!

Lec 16.15!

Page 4

IP Addr3!
MAC Addr3!

!
OS!
!
!

Network cards!
Anthony D. Joseph

!CS162

UCB Spring 2014!

Lec 16.16!

Network Concepts (contd)"

Common Port Numbers"

Connection: communication channel between two processes!


Each endpoint is identified by a port number"

Application

Port number: 16-bit identifier assigned by app or OS!


Globally, an endpoint is identified by (IP address, port number)!

Process!
A!

Process!
B!

Connection!

PortA!

PortB!

OS!!
!
!

IP Addr2!
MAC Addr2!

IP Addr1!
MAC Addr1!
3/31/2014!

IP Addr3!
MAC Addr3!

Port number

Wake-on-LAN

!
OS!
!
!

FTP data

20

FTP control

21

SSH

22

Telnet

23

DNS

53

HTTP

80

SNMP

161

Network cards!
Anthony D. Joseph

!CS162

UCB Spring 2014!

3/31/2014!

Lec 16.17!

Anthony D. Joseph

Main Network Functionalities"

!CS162

UCB Spring 2014!

Lec 16.18!

Administrivia"

Delivery: deliver packets between to any host in the Internet!


E.g., deliver a packet from a host in Berkeley to a host in Tokyo?!

Project 3 design due 11:59pm on Tuesday April 8!

Reliability: tolerate packet losses!


E.g., how do you ensure all bits of a file are delivered in the
presence of packet loses?!

Flow control: avoid overflowing the receiver buffer!

Recall our bounded buffer example: stop sender from overflowing


buffer!
E.g., how do you ensure that a server that can send at 10Gbps
doesnt overwhelm a LTE phone?!

Congestion control: avoid overflowing the buffer of a router


along the path!
What happens if we dont do it?!
!

3/31/2014!

Anthony D. Joseph

!CS162

UCB Spring 2014!

3/31/2014!

Lec 16.19!

Page 5

Anthony D. Joseph

!CS162

UCB Spring 2014!

Lec 16.20!

Review: Layering"

Partition the system!


Each layer solely relies on services from layer below !
Each layer solely exports services to layer above!

Interface between layers defines interaction!


Hides implementation details!
Layers can change without disturbing other layers!

2min Break"

3/31/2014!

Anthony D. Joseph

!CS162

UCB Spring 2014!

3/31/2014!

Lec 16.21!

Properties of Layers"

Anthony D. Joseph

!CS162

UCB Spring 2014!

Lec 16.22!

OSI Layering Model"


Open Systems Interconnection (OSI) model!

Service: what a layer does!


Service interface: how to access the service !

Developed by International Organization for


Standardization (ISO) in 1984!
Seven layers !

Interface for layer above !

Protocol (peer interface): how peers communicate to


achieve the service!

Presentation"
Session"
Transport"

Internet Protocol (IP)!

Set of rules and formats that specify the communication


between network elements!
Does not specify the implementation on a single machine,
but how the layer is implemented between machines!

Application"

Only five layers!


The functionalities of the missing layers (i.e.,
Presentation and Session) are provided by
the Application layer!

Network"
Datalink"
Physical"

3/31/2014!

Anthony D. Joseph

!CS162

UCB Spring 2014!

3/31/2014!

Lec 16.23!

Page 6

Anthony D. Joseph

!CS162

UCB Spring 2014!

Lec 16.24!

Physical Layer (1)"


Service: move information between two systems
connected by a physical link!
Interface: specifies how to send and receive bits !
Protocol: coding scheme used to represent a bit,
voltage levels, duration of a bit!
Examples: coaxial cable, optical fiber links;
transmitters, receivers !

Datalink !
layer!

Application"
Present."
Session"
Transport"
Network"
Datalink"
Physical"

Service: !

Enable end hosts to exchange frames (atomic messages) on


the same physical line or wireless link!
Possible other services:!
Arbitrate access to common physical media!
May provide reliable transmission, flow control!

Interface: send frames to other end hosts; receive frames


addressed to end host!
Protocols: addressing, Media Access Control (MAC) (e.g.,
CSMA/CD - Carrier Sense Multiple Access / Collision Detection) !

Datalink !
layer!
Transmission !
medium!

Physical
Layer !

101010100110101110

3/31/2014!

Anthony D. Joseph

101010100110101110
!CS162

UCB Spring 2014!

Datalink Layer (2)"


Each frame has a header which contains a source
and a destination MAC address!
MAC (Media Access Control) address!

Physical
Layer !
3/31/2014!

Lec 16.25!

Application"
Present."
Session"
Transport"
Network"
Datalink"
Physical"

Anthony D. Joseph

!CS162

MAC Dest. Address!


MAC Src. Address!
!

Datalink
Layer !

Frame
Hdr.

Can easily find MAC addr. on your machine/device:!


E.g., ifconfig (Linux, Mac OS X), ipconfig (Windows)!

Physical
Layer !

101010100110101110!

3/31/2014!

Anthony D. Joseph

Frame Payload!

101010100110101110!
!CS162

UCB Spring 2014!

Lec 16.26!

Application"
Present."
Session"
Transport"
Network"
Datalink"
Physical"

Wi-Fi MAC
address!

Network!
Layer!
Frame
Hdr.

Frame Payload!

UCB Spring 2014!

MAC Address Examples"

Uniquely identifies a network interface!


48-bit, assigned by the device manufacturer!
!
Network!
Layer!

Application"
Present."
Session"
Transport"
Network"
Datalink"
Physical"

Datalink Layer (2)"

Wired/Ethernet
MAC address!

Datalink
Layer !
Physical
Layer !
3/31/2014!

Lec 16.27!

Page 7

Anthony D. Joseph

!CS162

UCB Spring 2014!

Lec 16.28!

Local Area Networks (LANs)"


LAN: group of hosts/devices that !
are in the same geographical proximity (e.g., same
building, room) !
use same physical communication technology !

Application"
Present."
Session"
Transport"
Network"
Datalink"
Physical"

LANs"
All hosts in a LAN can share same physical
communication media!
Also called, broadcast channel!

Application"
Present."
Session"
Transport"
Network"
Datalink"
Physical"

Each frame is delivered to every host!


Hubs forward from one wire to all the others!

Examples:!

If a host is not the intended recipient, it drops the


frame!

all laptops connected wirelessly at a Starbucks caf!


all devices and computers at home!
all hosts connected to wired Ethernet in an office!

MAC Addr: A" MAC Addr: B" MAC Addr: C"

!
!

B"

!
Ethernet cable and port!

B"

3/31/2014!

Anthony D. Joseph

!CS162

UCB Spring 2014!

Switches"
Hosts in same LAN can be also connected by
switches!
A switch forwards frames only to intended recipients!

3/31/2014!

Lec 16.29!

Application"
Present."
Session"
Transport"
Network"
Datalink"
Physical"

!CS162

UCB Spring 2014!

Media Access Control (MAC) Protocols"


Problem: !
How do hosts access a broadcast media? !

Lec 16.30!

Application"
Present."
Session"
Transport"
Network"
Datalink"
Physical"

How do they avoid collisions?!

Far more efficient than broadcast channel!


!

Three solutions:!

MAC Addr: D"

MAC Addr: B"

Anthony D. Joseph

Channel partition!
Taking turns!
Switch"

Random access!

MAC Addr: C"

MAC Addr: A"

B"

3/31/2014!

Anthony D. Joseph

!CS162

UCB Spring 2014!

3/31/2014!

Lec 16.31!

Page 8

Anthony D. Joseph

!CS162

UCB Spring 2014!

Lec 16.32!

MAC Protocols"
Channel partitioning protocols:"
Allocate 1/N bandwidth to every host !
Share channel efficiently and fairly at high load!

MAC Protocols"

Application"
Present."
Session"
Transport"
Network"
Datalink"
Physical"

Random Access"
Efficient at low load: single node can fully utilize channel
High load: collision overhead!

Key ideas of random access:!

Inefficient at low load (where load = # senders):!

Carrier sense (CS)"


Listen before speaking, and dont interrupt!
Checking if someone else is already sending data!
and waiting till the other node is done!

1/N bandwidth allocated even if only 1 active node!!

E.g., Frequency Division Multiple Access (FDMA); optical networks!

Taking turns protocols:"

Collision detection (CD)"

Pass a token around active hosts!

If someone else starts talking at the same time, stop!


Realizing when two nodes are transmitting at once!
by detecting that the data on the wire is garbled!

A host can only send data if it has the token!


More efficient at low loads: single node can use >> 1/N banwidth!

Randomness"

Overhead in acquiring the token!

Dont start talking again right away!


Waiting for a random time before trying again!

Vulnerable to failures (e.g., failed node or lost token)!

Examples: CSMA/CD, Ethernet, best known implementation!

E.g., Token ring!


3/31/2014!

Anthony D. Joseph

!CS162

UCB Spring 2014!

(Inter) Network Layer (3)"


Service: !
Deliver packets to specified network (IP) addresses
across multiple datalink layer networks!

3/31/2014!

Lec 16.33!

Application"
Present."
Session"
Transport"
Network"
Datalink"
Physical"

Anthony D. Joseph

Network
Layer !

Interface: send packets to specified network address


destination; receive packets destined for end host!

UCB Spring 2014!

UCB Spring 2014!

Net.
Hdr.

Lec 16.34!

Application"
Present."
Session"
Transport"
Network"
Datalink"
Physical"

Transport!
Layer!

Net. Payload!

Net.
Hdr.

Net. Payload!

Network
Layer !

Net.
Hdr.

Net. Payload!

Datalink
Layer !

Frame Payload!

Protocols: define network addresses (globally unique);


construct forwarding tables; packet forwarding!

!CS162

IP Dest. Address!
IP Src. Address!
!

Transport!
Layer!

Buffer management!

!CS162

IP address: unique addr. assigned to network device


Assigned by network administrator or dynamically
when host connects to network

Packet scheduling/priority!

Anthony D. Joseph

(Inter) Network Layer (3)"

Possible other services:!

3/31/2014!

Application"
Present."
Session"
Transport"
! Network"
Datalink"
Physical"

Datalink
Layer !

Frame
Hdr.

Physical
Layer !

101010100110101110!

3/31/2014!

Lec 16.35!

Page 9

Net.
Hdr.

Frame
Hdr.

Net. Payload!

Anthony D. Joseph

101010100110101110!
!CS162

UCB Spring 2014!

Physical
Layer !
Lec 16.36!

Wide Area Network"


Wide Area Network (WAN): network that covers a
broad area (e.g., city, state, country, entire world)!
E.g., Internet is a WAN!

Application"
Present."
Session"
Transport"
Network"
Datalink"
Physical"

Quiz 16.1: Layering"


Q1: True _ False _ Protocols specify the implementation!
Q2: True _ False _ Congestion control takes care of the
sender not overflowing the receiver!

WAN connects multiple datalink layer networks (LANs)!


Datalink layer networks are connected by routers

Q3: True _ False _ A random access protocol is efficient at


low utilization!

Different LANs can use different communication


technologies (e.g., wireless, cellular, optics, wired)

Host A!
(IP A)!

Q4: True _ False _ At the data link layer, hosts are


identified by IP addresses !
Host B !
(IP B)!

R4!
R2!

Q5: True _ False _ The physical layer is concerned with


sending and receiving bits!

R3!
!
R1!
3/31/2014!

Anthony D. Joseph

!CS162

UCB Spring 2014!

3/31/2014!

Lec 16.37!

Anthony D. Joseph

!CS162

UCB Spring 2014!

Lec 16.38!

Quiz 16.1: Layering"


X" Protocols specify the implementation!
Q1: True _ False _
X" Congestion control takes care of the
Q2: True _ False _
sender not overflowing the receiver!

Q3: True X"


_ False _ A random access protocol is efficient at
low utilization!
X" At the data link layer, hosts are
Q4: True _ False _
identified by IP addresses !

2min Break"

Q5: True X"


_ False _ The physical layer is concerned with
sending and receiving bits!
!

3/31/2014!

Anthony D. Joseph

!CS162

UCB Spring 2014!

3/31/2014!

Lec 16.39!

Page 10

Anthony D. Joseph

!CS162

UCB Spring 2014!

Lec 16.40!

Routers"

Packet Forwarding"

Forward each packet received on an incoming link to an


outgoing link based on packets destination IP address
(towards its destination)!
Store & forward: packets are buffered before being forwarded!
Forwarding table: mapping between IP address and the output
link!
Router

incoming links

Upon receiving a packet, a router


read the IP destination address of the packet
consults its forwarding table output port
forwards packet to corresponding output port

Application"
Present."
Session"
Transport"
Network"
Datalink"
Physical"

outgoing links

Memory

Host A!
(IP A)!

Host B !
(IP B)!

R4!
IP B!

R2!
R3!

R1!
3/31/2014!

Anthony D. Joseph

!CS162

UCB Spring 2014!

IP Addresses vs. MAC Addresses"


Why not use MAC addresses for routing?
Doesnt scale

Analogy

3/31/2014!

Lec 16.41!

Application"
Present."
Session"
Transport"
Network"
Datalink"
Physical"

Anthony D. Joseph

!CS162

UCB Spring 2014!

IP Addresses vs. MAC Addresses"


Why does packet forwarding using IP addr. scale?
Because IP addresses can be aggregated

Lec 16.42!

Application"
Present."
Session"
Transport"
Network"
Datalink"
Physical"

E.g., all IP addresses at UC Berkeley start with 0xA9E5,


i.e., any address of form 0xA9E5**** belongs to Berkeley
Thus, a router in NY needs to keep a single entry for all
hosts at Berkeley!
If we were using MAC addresses the NY router would
need to maintain an entry for every Berkeley host!!!

MAC address SSN


IP address (unreadable) home address

MAC address: uniquely associated to the device for the entire


lifetime of the device
IP address: changes as the device location changes
Your notebook IP address at school is different from home

Analogy:!

10 7th Street NW!


Washington, DC 21115!

1051 Euclid Ave!


Berkeley, CA 94722!

3/31/2014!

Anthony D. Joseph

Give this letter to person with SSN: 123-45-6789 vs.!


Give this letter to John Smith, 123 First Street, LA, US!

!CS162

UCB Spring 2014!

3/31/2014!

Lec 16.43!

Page 11

Anthony D. Joseph

!CS162

UCB Spring 2014!

Lec 16.44!

Mapping the Internet"


!

Networking Standards"

AT&T, Sprint, IS-IS: Intermediate System


BGP: Border Verizon, Tata" to Intermediate System"
Gateway Protocol"

The nice thing about standards is that there are so


many to choose from

Comcast"

- Andrew Tanenbaum

OSPF: Open
Shortest
Path First"
Source: Wikipedia: Internet Connectivity Distribution & Core.svg
3/31/2014!

Anthony D. Joseph

!CS162

3/31/2014!

Lec 16.45!

UCB Spring 2014!

The Internet Protocol (IP)"


Internet Protocol: Internets network layer!
Service it provides: Best-Effort Packet Delivery!

Application"
Present."
Session"
Transport"
Network"
Datalink"
Physical"

!CS162

UCB Spring 2014!

Lec 16.46!

Application"
Present."
Session"
Transport"
Network"
Service:!
Datalink"
Provide end-to-end communication between processes! Physical"

Transport Layer (4)"

Demultiplexing of communication between hosts!

Tries its best to deliver packet to its destination !


Packets may be lost!
Packets may be corrupted!
Packets may be delivered out of order!

source!

Anthony D. Joseph

Possible other services:!


Reliability in the presence of errors!
Timing properties!
Rate adaption (flow-control, congestion control)!

Interface: send message to specific process at given


destination; local process receives messages sent to it!

destination!

Protocol: port numbers, perhaps implement reliability,


flow control, packetization of large messages, framing!

IP network!

Examples: TCP and UDP!


3/31/2014!

Anthony D. Joseph

!CS162

UCB Spring 2014!

3/31/2014!

Lec 16.47!

Page 12

Anthony D. Joseph

!CS162

UCB Spring 2014!

Lec 16.48!

Application"
Present."
Session"
Transport"
Network"
Datalink"
Physical"

Port Numbers"
Port number: 16-bit number identifying the endpoint of a transport connection!
E.g., 80 identifies the port on which a processing
implementing HTTP server can be connected!
Transport
Layer !
Network
Layer !
Datalink
Layer !
Physical
Layer !
3/31/2014!

Frame
Hdr.

Trans.
Hdr.

Data!

Net.
Hdr.

Trans.
Hdr.

Data!

Net.
Hdr.

Trans.
Hdr.

Data!

Frame
Hdr.

101010100110101110!
Anthony D. Joseph

Data!

Net.
Hdr.

Trans.
Hdr.

Data!

Network
Layer !

Net.
Hdr.

Trans.
Hdr.

Data!

Datalink
Layer !

UCB Spring 2014!

Application Layer (7 - not 5!)"


Service: any service provided to the end user!
Interface: depends on the application!
Protocol: depends on the application!

Datagram service (UDP)!


No-frills extension of best-effort IP!
Multiplexing/Demultiplexing among processes!

Transport
Layer !

Trans.
Hdr.

Application"
Present."
Session"
Transport"
Network"
Datalink"
Physical"

Reliable, in-order delivery (TCP)!


Connection set-up & tear-down!
Discarding corrupted packets (segments)!
Retransmission of lost packets (segments)!
Flow control!
Congestion control!

Services not available!


Delay and/or bandwidth guarantees!
Sessions that survive change-of-IP-address!

Physical
Layer !

101010100110101110!
!CS162

Internet Transport Protocols"

3/31/2014!

Lec 16.49!

Application"
Present."
Session"
Transport"
Network"
Datalink"
Physical"

Anthony D. Joseph

!CS162

UCB Spring 2014!

Lec 16.50!

Application Layer (5)"


Application
Layer
Transport
Layer !

Examples: Skype, SMTP (email), HTTP (Web), Halo,


BitTorrent !

Data!

Application
Layer

Trans.
Hdr.

Data!

Transport
Layer !

Net.
Hdr.

Trans.
Hdr.

Data!

Network
Layer !

Net.
Hdr.

Trans.
Hdr.

Data!

Datalink
Layer !

101010100110101110!

Physical
Layer !

Data!

Network
Layer !

Trans.
Hdr.

Data!

Net.
Hdr.

Trans.
Hdr.

Data!

Net.
Hdr.

Trans.
Hdr.

Data!

What happened to layers 5 & 6?!


Session and Presentation layers!
Part of OSI architecture, but not Internet architecture!
Their functionality is provided by application layer!

3/31/2014!

Anthony D. Joseph

!CS162

UCB Spring 2014!

Datalink
Layer !

Frame
Hdr.

Physical
Layer !

101010100110101110!

3/31/2014!

Lec 16.51!

Page 13

Anthony D. Joseph

Frame
Hdr.

!CS162

UCB Spring 2014!

Lec 16.52!

Five Layers Summary"

Physical Communication"
Communication goes down to physical network!
Then from network peer to peer!
Then up to relevant layer!

Lower three layers implemented everywhere!


Top two layers implemented only at hosts!
Logically, layers interacts with peers corresponding
layer!

3/31/2014!

Application"
Transport"
Network"
Datalink"
Physical"
Host A"

Anthony D. Joseph

Network"
Datalink"
Physical"

Application"
Transport"
Network"
Datalink"
Physical"

Application"
Transport"
Network"
Datalink"
Physical"

Router"

Host B"

Host A"

!CS162

UCB Spring 2014!

3/31/2014!

Lec 16.53!

TCP!

Ethernet!
Copper!

SONET!

UCB Spring 2014!

Lec 16.54!

Applications that can run on IP can use any network!

Supports simultaneous innovations above and below IP!

Data Link"
Physical"

Radio!

!CS162

Allows applications to function on all networks!

802.11!

Fiber!

Host B"

Any network technology that supports IP can exchange


packets!

Transport"

Waist!

IP!

Router"

Single Internet-layer module (IP):!


Allows arbitrary networks to interoperate!

Applications"

UDP!

Network"
Datalink"
Physical"

Implications of Hourglass"

The Internet Hourglass"

SMTP! HTTP! DNS! NTP!

Anthony D. Joseph

Application"
Transport"
Network"
Datalink"
Physical"

But changing IP itself, i.e., IPv6 is very complicated and


slow!

The Hourglass Model"

There is just one network-layer protocol, IP!


The narrow waist facilitates interoperability!
3/31/2014!

Anthony D. Joseph

!CS162

UCB Spring 2014!

3/31/2014!

Lec 16.55!

Page 14

Anthony D. Joseph

!CS162

UCB Spring 2014!

Lec 16.56!

Drawbacks of Layering"

Quiz 16.2: Layering"

Layering can hurt performance!

Q1: True _ False _ Layering improves application


performance!

E.g., hiding details about what is really going on!

Q2: True _ False _ Routers forward a packet based on its


destination address!

Headers start to get really big!


Sometimes header bytes >> actual content!

Q3: True _ False _ Best Effort packet delivery ensures


that packets are delivered in order!

Layer N may duplicate layer N-1 functionality !

Q4: True _ False _ Port numbers belong to network layer!

E.g., error recovery to retransmit lost data!

Q5: True _ False _ The hosts on Berkeleys campus share


the same IP address prefix!

Layers may need same information!


E.g., timestamps, maximum transmission unit size!

!
3/31/2014!

Anthony D. Joseph

!CS162

UCB Spring 2014!

3/31/2014!

Lec 16.57!

Anthony D. Joseph

Quiz 16.2: Layering"

Physical: send bits!


Datalink: Connect two hosts on same physical media!
Network: Connect two hosts in a wide area network!
Transport: Connect two processes on (remote) hosts!

X" Port numbers belong to network layer!


Q4: True _ False _

Applications: Enable applications running on remote hosts


to interact !

X" False _ The hosts on Berkeleys campus share


Q5: True _
the same IP address prefix!

Unified Internet layering (Application/Transport/


Internetwork/Link/Physical) decouples apps from
networking technologies!

!
!

!CS162

UCB Spring 2014!

Lec 16.58!

Internet: 5 layers!

X" Best Effort packet delivery ensures


Q3: True _ False _
that packets are delivered in order!

Anthony D. Joseph

UCB Spring 2014!

Layered architecture powerful abstraction for organizing


complex networks!

Q2: True _X" False _ Routers forward a packet based on its


destination address!

Summary"

X" Layering improves application


Q1: True _ False _
performance!

3/31/2014!

!CS162

3/31/2014!

Lec 16.59!

Page 15

Anthony D. Joseph

!CS162

UCB Spring 2014!

Lec 16.60!

Anda mungkin juga menyukai