14
1 Session 2. Application and Layered Architectures Dongsoo S. Kim Electrical and Computer Engineering. Indiana U. Purdue U. Indianapolis ECE/IUPUI Intro to Computer Communication Networks 2-2 Communication Networks Various services and flexibility Network architectures n Grouping a set of related function to a layer n A set of protocols Advantage of layered architectures n Simplification n Flexibility vs. Monolithic Layered Interface Interface

02-Application and Layered Architectureset.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch02.pdfISO/OSI Reference Model International Standard Organization / Open Systems Interconnection

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: 02-Application and Layered Architectureset.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch02.pdfISO/OSI Reference Model International Standard Organization / Open Systems Interconnection

1

Session 2.Application and Layered Architectures

Dongsoo S. KimElectrical and Computer Engineering.

Indiana U. Purdue U. Indianapolis

ECE/IUPUI

Intro to Computer Communication Networks

2-2

Communication NetworksVarious services and flexibilityNetwork architecturesn Grouping a set of related function to a layern A set of protocols

Advantage of layered architecturesn Simplificationn Flexibility

vs.

Monolithic Layered

Interface

Interface

Page 2: 02-Application and Layered Architectureset.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch02.pdfISO/OSI Reference Model International Standard Organization / Open Systems Interconnection

2

ECE/IUPUI

Intro to Computer Communication Networks

2-3

Example of ProtocolInteraction between two peer entities

Server/Clientn Server – a process waiting a request

w Listening a specific port in TCP/IPw Httpd (Apache™ ) , telnetd, ftpd, …

n Client – a process making a requestw A request to server address and the port numberw Netscape™ , telnet, gftp, ws_ftp, …

A connection in a server/client model is a 5-tuplen Protocol type, Source address, Destination addressn Source port number, destination port number

ECE/IUPUI

Intro to Computer Communication Networks

2-4

Example of Protocol, http (1)

Server Client

Listening on port 80 Request to 134.68.80.4:80

Connection established

Send a requestGET/index.html HTTP 1.0

Send a result codeHTTP/1.1 200

Read and send the file<html> <head> …

Disconnect the connection

Interpret and display the html

Waiting…

Connection established

Page 3: 02-Application and Layered Architectureset.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch02.pdfISO/OSI Reference Model International Standard Organization / Open Systems Interconnection

3

ECE/IUPUI

Intro to Computer Communication Networks

2-5

Example of Protocol, http (2)Need a connection-oriented service & a reliable underlying layer

ProtocolHTTPServer

HTTPClient

TCP TCP

80 #n

Protocol

Interface Interface

ECE/IUPUI

Intro to Computer Communication Networks

2-6

Other ExamplesDNS (Domain Name System)n Convert an IP name to an IP address, or vice versan netlab.ece.iupui.edu ↔ 134.68.80.4n UDP/IP - Connectionless

SMTP (Simple Mail Transfer Protocol)n TCP connection to local SMTP servern Work as if connectionless for forwarding the message to remote SMTP server

Page 4: 02-Application and Layered Architectureset.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch02.pdfISO/OSI Reference Model International Standard Organization / Open Systems Interconnection

4

ECE/IUPUI

Intro to Computer Communication Networks

2-7

OSI Reference ModelInternational Organization for Standardization / Open System Interconnection (IOS/OSI)Reference model, but not a real implementationA process on one machine at layer n n Communicates with a peer process on the other machinen By exchanging PDU (Protocol Data Unit)

PDU contains a header and a payload called SDU (Service Data Unit)n Header – control informationn Payload – do not care

Layer n protocol - A set of rules governing the behavior of the layer n

Layer nEntity

Layer nEntity

n-SDU H

n-SDUH

n-PDU

n-PDU

Terminal A Terminal B

ECE/IUPUI

Intro to Computer Communication Networks

2-8

Interface and ServiceCommunication between two peer processes is not physical

The layer n+1 uses the services provided by layer n through layer n interface, called SAP (Service Access Point).

(n+1)-PDU

(n+1)-PDU

layern+1

layern+1

layern

layern

n-SAP

n-SDU H

n-SDUH

n-SAP

n-PDU

Terminal A Terminal B

Page 5: 02-Application and Layered Architectureset.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch02.pdfISO/OSI Reference Model International Standard Organization / Open Systems Interconnection

5

ECE/IUPUI

Intro to Computer Communication Networks

2-9

Segmentation and ReassemblyMaximum PDU size of Ethernet is 1500 bytesHow can we send information larger than the maximum thru Ethernet?Segmentationn The layer n in a terminal can segment its payload into small pieces

Reassemblyn The layer n in the other terminal put together the small pieces in a payload.

(n+1)-PDU

n-SDU H n-SDU H n-SDU H

(n+1)-PDU

n-SDU H n-SDU H n-SDU H

Host A Host B

ECE/IUPUI

Intro to Computer Communication Networks

2-10

ISO/OSI Reference ModelInternational Standard Organization /Open Systems Interconnection7 LayersPrinciplesn A layer should be created where a different level of abstraction is

needed.n Each layer should perform a well defined function.n The function of each layer should be chosen with an eye toward

defining internationally standardized protocols.n The layer boundaries should be chosen to minimize the information

flow across the interfaces.n The number of layers should be large enough that distinct function

need not be thrown together in the same layer out of necessity.n The number of layers should be small enough that the architecture

does not become unwieldy.

Page 6: 02-Application and Layered Architectureset.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch02.pdfISO/OSI Reference Model International Standard Organization / Open Systems Interconnection

6

ECE/IUPUI

Intro to Computer Communication Networks

2-11

OSI 7 Layer Reference Model

Physical

Data Link

Network

Transport

Session

Presentation

Application

Layer 1

Layer 2

Layer 3

Layer 4

Layer 5

Layer 6

Layer 7

Physical

Data Link

Network

Transport

Session

Presentation

Application

Physical

Data Link

Network

Physical

Data Link

Network

Communication network boundary

Application Protocol

Presentation Protocol

Session Protocol

Transport Protocol

Network layer host-router protocolData link layer host-router protocolPhysical layer host-router protocol

ECE/IUPUI

Intro to Computer Communication Networks

2-12

The Physical LayerDeal with the transfer of raw bits over communication channel

Electrical aspectsn Voltage leveln Signal duration

Mechanical aspectsn Socket typen Number of pines

Examplesn Twisted copper wire – telephone wire, 10/100BaseT, …n Coaxial cable – CATV, 10Base2, 10Base5, …n Radio – cellular phone, 802.11, LMDS, …n Optical fiber – WDM, DWDM,

Page 7: 02-Application and Layered Architectureset.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch02.pdfISO/OSI Reference Model International Standard Organization / Open Systems Interconnection

7

ECE/IUPUI

Intro to Computer Communication Networks

2-13

The Data Link LayerDeal with the transfer of framesFraming informationn Boundary of the frame

w attaching special bit patterns to the beginning and end of the framen Control and address informationn Check bit for recovering from transmission errors

w acknowledge framesw handle with damaged, lost, and duplicate frames

n Flow controlsw prevent a fast transmitter from drowning a slow receiver in data

Broadcast networksn control access to the shared channel n LAN

w Sub-layer: Medium Access Control layer (MAC)w One-to-one communication over broadcast medium

Examplesn HDLC – High-level Data Link Controln PPP – Point-to-Point Protocoln SONET – Synchronous Optical Network

ECE/IUPUI

Intro to Computer Communication Networks

2-14

The Network LayerTransfer of data (packet) over networksRoutingn Select a path from the source to the destination thru many

intermediate network components as switches and routers.n Static routing vs. dynamic routingn Deal with congestion – temporary traffic surges in a network

components forming bottlenecksn Differentiation of packet typesn Heterogeneous Network

w Different address schemew Maximum Transfer Unit (MTU)

n Political routingw Inter-office emails between Microsoft branches shouldn’t pass through

Netscape’s routers.

Billing

Page 8: 02-Application and Layered Architectureset.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch02.pdfISO/OSI Reference Model International Standard Organization / Open Systems Interconnection

8

ECE/IUPUI

Intro to Computer Communication Networks

2-15

The Transport LayerResponsible for the end-to-end transfer of messageSegmentation and reassemblyError-free transfern Error detection and recoveryn Sequencingn Flow control

Establishing and releasing connectionsn Multiple connections for high throughputsn Multiplexing a connection among many session layers for reducing the cost

Type of Servicesn Connection-oriented services – error-free point-to-point channeln Connectionless services – no guarantee on the correct delivery of the message

Examplen Unix socket interface

ECE/IUPUI

Intro to Computer Communication Networks

2-16

The Session LayerEnhance a reliable transfer serviceControl how data is exchangedn manage dialogue control

w full duplexw half duplex

Examplesn Log in to a remote systemn Transfer a file between two machinen Token management

w both side do not attempt the same operation at the same time.n Synchronization

w Two-hour file transfer with one-hour mean time crashesw The whole transfer would start over againw Insert checkpoints into the data streamw After a crash, continue after the last checkpoint

Page 9: 02-Application and Layered Architectureset.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch02.pdfISO/OSI Reference Model International Standard Organization / Open Systems Interconnection

9

ECE/IUPUI

Intro to Computer Communication Networks

2-17

The Presentation LayerConcern with the syntax and sematic of the information

Overcome the difference in data representationResolve machine-dependencies Character coden ASCII, EBCDIC, Unicode, …

Big endian or little endian

4 13 2 1 42 3

32-bit word like an integers

SUN Sparc, MIPS Intel x86, Dec Alpha

The POWER Processor can be configured as either big endian or little endian

ECE/IUPUI

Intro to Computer Communication Networks

2-18

The Application LayerTo provide network services

Examplen HTTP – web browsing applicationn FTP – File transfer between two different systems

w different file name conventionw different ways of representing text lines

n SMTP – Electronic mailn Virtual terminals – vt100, TN 3270, xterm

Page 10: 02-Application and Layered Architectureset.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch02.pdfISO/OSI Reference Model International Standard Organization / Open Systems Interconnection

10

ECE/IUPUI

Intro to Computer Communication Networks

2-19

Data Transmission in OSI Model

Physical

Data Link

Network

Transport

Session

Presentation

Application

Physical

Data Link

Network

Transport

Session

Presentation

Application

data

data AH

data

data

data

data

SH

TH

data NH

DH

PH

DT

Bits

sendingprocess

receivngprocess

actual data transmission path

ECE/IUPUI

Intro to Computer Communication Networks

2-20

TCP/IP ArchitectureHistoryn Successor of ARPANET (Defense Advanced Research Project Agency)

Principlesn Robustness

w If failures occurs in the network, the packets are routed around the failure point.w Multiple paths and globally unique address.

n Flexibility – No Data link layer or physical layer definedn Packet switching networksn Best-effort connectionless in the Network layer

w “I will do my best to transfer your data, though I cannot guarantee their quality and delivery ”

w IP packets are exchanged between routers without a connection setup.

n Two services in the Transport layerw TCP – reliable connection-oriented transferw UDP – unreliable connectionless transfer

Applicationsn remote login, e-mail, file transfer, network management

Page 11: 02-Application and Layered Architectureset.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch02.pdfISO/OSI Reference Model International Standard Organization / Open Systems Interconnection

11

ECE/IUPUI

Intro to Computer Communication Networks

2-21

OSI Model vs. TCP/IP

Application

Presentation

Session

Transport

Network

Data Link

Physical

OSIApplication

TCP,UDP

IP

NetworkInterface

Layer

TCP/IP

Not presentin the model

ECE/IUPUI

Intro to Computer Communication Networks

2-22

Protocols and Networks in TCP/IP

NetworkInterface

Network

Transport

ApplicationTELNET FTP SMTP DNS RTP

TCP UDP

IP

X.25 ATM FR ETHER

ICMP

ARP

Page 12: 02-Application and Layered Architectureset.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch02.pdfISO/OSI Reference Model International Standard Organization / Open Systems Interconnection

12

ECE/IUPUI

Intro to Computer Communication Networks

2-23

TCP/IP ProtocolEach host (NIC) is assigned by a globally unique IP address (32-bit)n IP address = network address + host addressn A net mask is used to calculate them

Each host (NIC) is also assigned by a machine address, or a physical addressn Meaningful in one network by routern Ethernet uses 6-octect (48-bit). n ATM uses 16-octect.

Router – consists of two or more network interfaces

appTCPIPNI

appTCPIPNI

IPNI NI

router

ECE/IUPUI

Intro to Computer Communication Networks

2-24

TCP/IP in a Network

IP (1,2)

NI3487

data

data1,2

data3487

IP(1,3)

NI6537

data

1,3

6537

data1,21,3

Page 13: 02-Application and Layered Architectureset.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch02.pdfISO/OSI Reference Model International Standard Organization / Open Systems Interconnection

13

ECE/IUPUI

Intro to Computer Communication Networks

2-25

TCP/IP thru a Router

IP (1,2)

NI3487

data

data1,2

data3487

IP(2,5)

NI3903

data

NI6543

NI1002

IP(1,1) (2,3)

2,5 data1,22,5

data1,22,5

6543data

10023903

Host A Router Host B

ECE/IUPUI

Intro to Computer Communication Networks

2-26

TCP/IP in a System

Data

TCP PayloadTCP

Header

IP PayloadIP

Header

Ethernet PayloadEthernetHeader

EthernetTail

Source Port #,Destin Port #

Source IP addr ,Destin IP addr ,Protocol type

Source PH addr ,Destin PH addr ,Network protocol type

Page 14: 02-Application and Layered Architectureset.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch02.pdfISO/OSI Reference Model International Standard Organization / Open Systems Interconnection

14

ECE/IUPUI

Intro to Computer Communication Networks

2-27

Server in TCP/IPA process waiting a packet on a specific port numberDuplicate a connection after establishingConnection?n 5 tuple – (PT, SA, SP, DA, DP)

w protocol type, source address, source port, destin address, destin port.

n A server waits on (pt, sa, sp, any -DA, any -DP)

n Upon a request from the client, any -DA and any -DP are filled with specific value.

Server Port Number – 0 to 1023 are reserved to well-known services.

World Wide Web80HTTP

Domain name system53DNS

E-mail25SMTP

remote login23telnet

File Transfer21FTP

CommentsReserved Port #Protocol

ECE/IUPUI

Intro to Computer Communication Networks

2-28

Berkeley SocketAPI – interface available to programmern socket(), bind(), listen(), accept(), connect(),

sendto(), recvfrom(), htonl(), htons(), ntohl(), ntohs()

n Utility function - gethostbyname(), gethostbyaddr()Support multiple communication protocolsn Internet Domainn Unix Domainn Xerox NS Domain (XNS)n ATM Domain (Recent progress in several implementation)

Referencesn Richard Stevens, “Unix Network Programming”