Lec1 NWArchitecture Layers Protocols r1

Preview:

Citation preview

Network Architecture- Layering- Protocols

byDr. Nguyen Minh HoangHoang.dhbk@gmail.com

Jan 2013

2

Outline

Review What/Why is layering? What is Network Protocol? ISO/OSI layering and Internet

layering Summary

3

Reference Book

Computer Network by A. S. Tanenbaum

4

Review

circuit-switchednetworks

(e.g. telephone)

communication networks

switchednetworks

broadcastnetworks

packet-switched networks

datagram networks

(e.g. Internet)

virtual circuit-switched networks(e.g. ATM)

5

Broadcast vs. Switched Communication Networks Broadcast networks

Nodes share a common channel; information transmitted by a node is received by all other nodes in the network

Examples: TV, radio Switched networks

Information is transmitted to a small sub-set (usually only one) of the nodes

6

Review: Packet Switching vs. Circuit Switching

Advantages of packet switching over circuit switching

most important advantage of packet-switching over circuit switching is statistical multiplexing, and therefore efficient bandwidth usage

no call setup (for datagram switching only) no per-flow state information (for datagram switching

only) simple to implement

Disadvantages of packet switching potential congestion: packet delay and high loss

protocols needed for reliable data transfer, congestion control

packet header overhead per packet processing overhead

7

Protocol “Layers”

Networks are complex!

many “pieces”: hardware

hosts routers links of various

media

software applications protocols

Question: Is there any hope of

organizing the structure of networks?

Or at least our discussion of

networks?

8

What is Layering?

A technique to organize a network system into a succession of logically distinct entities, such that the service provided by one entity is solely based on the service provided by the previous (lower level) entity.

9

ISO/OSI Concepts

ISO – International Standard Organization OSI – Open System Interconnection

Service – says what a layer does Interface – says how to access the

service Protocol – says how the service is

implemented a set of rules and formats that govern the

communications between two peers

10

An Example of Layering

11

Why Layering?

Dealing with complex systems: Explicit structure allows identification of the

relationship among a complex system’s pieces layered reference model for discussion

Modularization eases maintenance, updating of system change of implementation of a layer’s

service transparent to rest of system e.g., change in routing protocol doesn’t

affect rest of system

12

An Example: No Layering

No layering: each new application has to be re-implemented for every network technology!

Telnet FTP

packetradio

coaxial cable

fiberoptic

Application

TransmissionMedia

HTTP

13

An Example: Benefit of Layering

Solution: introduce an intermediate layer that provides a common abstraction for various network technologies

HTTPTelnet FTP

packetradio

coaxial cable

fiberoptic

Application

TransmissionMedia

Transport& Network

14

Disadvantages of Layering

Information hiding – inefficient implementations

15

What is a Network Protocol?

A network protocol defines the format and the order of messages exchanged between two or more communicating entities, as well as the actions taken on the transmission and/or receipt of a message or other event.

16

An Example: Simple Mail Transfer Protocol (SMTP)

Messages from a client to a mail server HELO MAIL FROM: <address> RCPT TO: <address> DATA

<This is the text end with a line with a single .>

QUIT Messages from a mail server to a client

status codeThe first digit of the response broadly indicates the success, failure, or progress of the previous command.

1xx - Informative message 2xx - Command ok 3xx - Command ok so far, send the rest of it. 4xx - Command was correct, but couldn't be

performed for some reason. 5xx - Command unimplemented, or

incorrect, or a serious program error occurred.

content

user mailbox

outgoing message queue

mailserver

useragent

useragent

useragent

mailserver

useragentuser

agent

mailserver

useragent

SMTP

SMTP

SMTP

POP3,IMAPSMTP

17

What Is Networking?

Involves connecting hosts/terminals/computers for the purpose of sharing information and resources

Requires a great deal of technology

Offers many possible choices for physical connections and related software

18

Networking Fundamentals

Consists of two or more hosts/terminals/computers connected to each other by wire or cable to transmit data back and forth

Primary motivation arises from a need for individuals to share data quickly and efficiently

19

Primary Benefits of Networking

Permits groups of users to exchange information routinely and to route data from one individual to another Single consistent master copy of data

files Improves human communication

Electronic mail (e-mail) Enables device sharing

20

ISO OSI Reference Model Seven layers

Lower two layers are peer-to-peer Network layer involves multiple switches Next four layers are end-to-end

Application

Presentation

Session

Transport

Network

Datalink

Physical

Application

Presentation

Session

Transport

Network

Datalink

Physical

Network

Datalink

Physical

Physical medium A Physical medium B

Host 1 Intermediate switch Host 2

21

Physical Layer (1)

Service: moves information between two systems connected by a physical link

Interface: specifies how to send a bit Protocol: coding scheme used to

represent a bit, voltage levels, duration of a bit

Examples: coaxial cable, optical fiber links; transmitters, receivers

22

Datalink Layer (2) Service:

framing, i.e., attach frames separator send data frames between peers others:

arbitrates the access to common physical media ensures reliable transmission provides flow control

Interface: sends a data unit (packet) to a machine connected to the same physical media

Protocol: layer addresses, implement Medium Access Control (MAC) (e.g., CSMA/CD)…

23

Network Layer (3)

Service: delivers a packet to a specified destination performs fragmentation/reassembly of packets others:

packet scheduling buffer management

Interface: sends a packet to a specified destination

Protocol: defines global unique addresses; constructs routing tables; implement packet forwarding; fragments/reassembles packets

24

Data and Control Planes

Data plane: concerned with packet forwarding buffer management packet scheduling

Control Plane: concerned with installing and maintaining the states for the data plane

25

Transport Layer (4)

Service: provides an in-order, error-free, and flow and

congestion controlled end-to-end connection multiplex/demuliplex packets

Interface: sends a packet to a destination Protocol: implements reliability, as well as flow

and congestion control Examples: TCP and UDP

TCP: in-order, error free, flow and congestion control

26

Session Layer (5)

Service: full-duplex access management, e.g., token control synchronization, e.g., provide check points for

long transfers Interface: depends on service Protocols: token management; insert

checkpoints, implement roll-back functions

27

Presentation Layer (6)

Service: converts data between various representations

Interface: depends on service Protocol: defines data formats and

rules to convert from one format to another

28

Application Layer (7)

Service: any service provided to end users

Interface: depends on the application

Protocol: depends on the application

Examples: FTP, Telnet, WWW

29

Physical Communication

Communication goes down to physical network, then to peer, then up to relevant layer

Application

Presentation

Session

Transport

Network

Datalink

Physical

Application

Presentation

Session

Transport

Network

Datalink

Physical

Network

Datalink

Physical

Physical medium

Host A Host B

Router

30

Encapsulation A layer can use only the service provided by the

layer immediate below it Each layer may change and add a header to data

packet

data

data

data

data

data

data

data

data

data

data

data

data

data

data

31

Internet Protocol Architecture The TCP/IP protocol

suite is the basis for the networks that we call the Internet.

The TCP/IP suite has five layers: Application, Transport, Network, and (Data) Link Layer, Physical Layer

Computers (hosts) implement all five layers. Routers (gateways) only have the bottom three layers.

ApplicationLayer

TransportLayer

NetworkLayer

(Data) LinkLayer

telnet, ftp, email

TCP, UDP

IP, ICMP, IGMP

Device Drivers

User space

Kernel space

32

Internet Protocol Layers

Five layers Application: supporting network

applications ftp, smtp, http

Transport: host-host data transfer tcp, udp

Network: routing of datagram from source to destination

ip, routing protocols Link: data transfer between

neighboring network elements ppp, ethernet

Physical: bits “on the wire”

application

transport

network

link

physical

33

Internet Layering and OSI Layering

OSI: conceptually define: service, interface, protocol

Internet: provide a successful implementation

Application

Presentation

Session

Transport

Network

Datalink

Physical

Internet

Host-to-network

Transport

Application

IP

LAN Packetradio

TCP UDP

Telnet FTP DNS

34

Application

TCP

IP

EthernetDriver

User data

User dataApplicationHeader

Application dataTCP Header

Application dataTCP HeaderIP Header

Application dataTCP HeaderIP HeaderEthernetHeader

EthernetTrailer

IP datagram

TCP segment

Ethernet frame

Encapsulation As data is moving down the protocol stack,

each protocol is adding layer-specific control information.

35

Protocol Peer Relationship

Lower three layers are hop-by-hop Next two layers are end-to-end

Application

Transport

Network

Datalink

Physical

Application

Transport

Network

Datalink

Physical

Network

Datalink

Physical

Physical medium

36

Layering: Logical Communication

E.g.: application take command from

user encode the

command to generate messages

send messages to peer

For example, HELO, MAIL FROM, RCPT TO are messages between two SMTP peers

37

Layering: Logical Communication

applicationtransportnetwork

linkphysical

applicationtransportnetwork

linkphysical

applicationtransportnetwork

linkphysical

applicationtransportnetwork

linkphysical

networklink

physical

data

dataE.g.: transport take data from

application add

addressing, reliability check info to form “datagram”

send datagram to peer

wait for peer to ack receipt

data

transport

transport

ack

38

Layering: Physical Communication

applicationtransportnetwork

linkphysical

applicationtransportnetwork

linkphysical

applicationtransportnetwork

linkphysical

applicationtransportnetwork

linkphysical

networklink

physical

data

data

39

Protocol Layering and Data

Each layer takes data from above adds header information to create new data

unit passes new data unit to layer below

applicationtransportnetwork

linkphysical

applicationtransportnetwork

linkphysical

source destination

M

M

M

M

Ht

HtHn

HtHnHl

M

M

M

M

Ht

HtHn

HtHnHl

message

segment

datagram

frame

40

IP

Ethernet FDDIWireless

TCP UDP

Telnet Email FTP WWW

The Hourglass Architecture of the Internet

Network layer is the highest layer supported by all network components

Note: Additional protocols like routing protocols (RIP, OSPF) needed to make IP work

41

Implications of Hourglass

A single Internet layer module, a single “language”: Allows all networks to interoperate

all networks technologies that support IP can exchange packets

Allows all applications to function on all networks all applications that can run on IP can use any network

Simultaneous developments above and below IP

42

Link Layer: Services Provided by Ethernet

Multiplexing/demultiplexing send frames to the network

layer Multiple access control

send frame to peer sharing the common channel

Error detection

IP

Ethernet FDDIWireless

TCP UDP

Telnet Email FTP WWW

43

Network Layer: Services Provided by IP

Multiplexing/demultiplexing send packets to the transport

Routing best-effort to send packets from

source to destination Fragmentation and

reassembling partition a fragment into smaller

packets removed in IPv6

Does not provide reliability, or reservation

IP

Ethernet FDDIWireless

TCP UDP

Telnet Email FTP WWW

44

Network Layer: IPv4 Header

45

Transport Layer: Services Provided by TCP

Multiplexing/demultiplexing Reliable transport

between sending and receiving process

setup required between sender and receiver: a connection-oriented service

Flow control sender won’t overwhelm receiver

Congestion control throttle sender when network

overloaded Does not provide

timing, minimum bandwidth guarantees

IP

Ethernet FDDIWireless

TCP UDP

Telnet Email FTP WWW

46

TCP Header

47

Services Provided by UDP

Connectionless service Does not provide: connection setup, reliability, flow

control, congestion control, timing, or bandwidth guarantee

Q: Why is there a UDP?

48

Summary: Layering

Key technique to implement communication protocols; provides Modularity

Key design decision: what functionality to put in each layer?

49

Assignment 1, due 05 Oct 05

Problems 1.3, 1.5, 1.7, 1.8, 1.9, 1.11, 1.12, 1.15 (pp. 69-71 of text book)

Submission: email to dccn.caohoc@gmail.com with subject: Assignment 1 – your class – your name

Due date: 9:00am, 09 Oct 11 Note: Late submission will NOT be

accepted!

Backup Slides

The Design Philosophy of the DARPA Internet

52

Goals

1. Survivability in the face of failure2. Support multiple types of service

3. Accommodate a variety of networks

4. Permit distributed management of resources5. Be cost effective6. Permit host attachment with a low level of effort7. Be accountable

0. Connect different networks

53

Survivability in the Face of Failure: Questions

What does the goal mean? Why is the goal important? How does the Internet achieve this

goal? Does the Internet achieve this goal

(or in what degree does the Internet achieve this goal)?

54

Survivability in the Face of Failure

Continue to operate even in the presence of network failures (e.g., link and router failures)

as long as the network is not partitioned, two endpoints should be able to communicate…moreover, any other failure (excepting network partition) should be transparent to endpoints

Decision: maintain state only at end-points (fate-sharing)

eliminate the problem of handling state inconsistency and performing state restoration when router fails

Internet: stateless network architecture

55

Support Multiple Types of Service: Questions

What does this goal mean? Why is the goal important? How does the Internet achieve this

goal? Does the Internet achieve this goal

(or in what degree does the Internet achieve this goal)?

56

Support Multiple Types of Service

Add UDP to TCP to better support other types of applications

e.g., “real-time” applications This was arguably the main reason for

separating TCP and IP Provide datagram abstraction: lower common

denominator on which other services can be built: everything over IP

service differentiation was considered (remember ToS?), but this has never happened on the large scale (Why?)

57

Support a Variety of Networks: Questions

What does the goal mean? Why is this goal important? How does the Internet achieve this

goal? Does the Internet achieve this goal

(or in what degree does the Internet achieve this goal)?

58

Support a Variety of Networks

Very successful because the minimalist service; it requires

from underlying network only to deliver a packet with a “reasonable” probability of success

…does not require: reliability in-order delivery

The mantra: IP over everything Then: ARPANET, X.25, DARPA satellite

network.. Now: ATM, SONET, WDM…

59

Other Goals

Permit distributed management of resources

Be cost effective Permit host attachment with a low

level of effort Be accountable