computer networks sadiq m. sait, ph.d. [email protected] department of computer engineering...

99
Computer Networks Sadiq M. Sait, Ph.D. [email protected] Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran, Saudi Arabia February 17 - 21, 2001

Post on 19-Dec-2015

228 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Computer Networks

Sadiq M. Sait, Ph.D.

[email protected] of Computer

Engineering King Fahd University of Petroleum

and MineralsDhahran, Saudi Arabia

February 17 - 21, 2001

Page 2: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Historical glimpses

The past several decades have witnessed a phenomenal growth in the computer industry:

As computer proliferated, so did the need for data communication» People became more and more interested in

connecting several computers together. Computer Network:

Interconnected collection of autonomous computers and computer resources

Page 3: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Historical glimpses (contd.) Late 1960’s -- ARPA (later became DARPA) began a partnership with

45 universities and research institutions to investigate Data Communication Technologies.» 1969 -- ARPANET went into operation with 4 nodes.

– The experiment was a success and ARPANET grew into a network spanning the entire USA.

1974 -- Birth of the first LAN (Xerox) In early years of networking, each computer manufacturer

developed its own communication solution– Structured Network Architecture (SNA) of IBM– DEC Network Architecture (DNA) of DEC– ARPANET of ARPA– etc.

Page 4: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Historical glimpses (contd.) 1977 -- ISO established a subcommittee to

develop an architecture/structure that defines communication tasks and which would:» Serve as a reference model for international standards» would facilitate efficient internetworking among

systems from different technologies, manufacturers, administrations, nationalities, and enterprises.

Page 5: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Historical glimpses (contd.) 1978 -- Meeting of 40 experts in Washington, D.

C. started work that yielded 6 years later the OSI Reference Model.» Paper by Louis Pouzin and Hubert Zimmermann, Proc.

Of the IEEE November 1978, pp. 1346 - 1370. 1975 -- ARPANET transitioned to Defense

commercial agency. 1978-80 -- ARPANET protocol were upgraded

with TCP/IP.» Paper by Cerf and Khann, IEEE Trans. Comm., May

1974.

Page 6: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Historical glimpses (contd.) February 1980 -- The IEEE started Project 802 to develop

standards for the LAN market. 1981 -- A new host added to ARPANET every 20 days. 1983 -- TCP/IP switchover complete.

» TCP/IP adopted as standard by DOD » ARPANET had over 300 hosts.» Over 1200 nodes by 1985.» ARPANET split

– ARPANET: Academic (Educational, Research)– MILNET: Military

Page 7: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Historical glimpses (contd.) 1984 -- The OSI-RM came out.

» Defines a strategic outline/vision» Reduces degrees of freedom of standards developers» Centered around the hierarchical decomposition of

communication functions 1986 -- NSFnet backbone created. 1990 -- ARPANET put to rest

» 1987 -- over 25000 nodes» 1989 -- 3000 networks for over 200000 users

Page 8: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Historical glimpses (contd.) 1991-- WWW invented & Gopher introduced 1995

» Internet backbone privatized» Over 7 million networks around the world» 150000 users join the network every month

July, 1998 -- over 36 million networks Jan, 1999 -- 157 million users Projected to be 327 million by year 2000

Page 9: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Historical glimpses (contd.) The Internet is an Information Highway

» Dedicated communication links (copper, fiber, satellite) functioning as the concrete/asphalt

» Usually T/E leased lines serve as the on-ramp connecting to regional networks

– Capacity of T1 highways is 1.544 Mbps– that of T3 is 45 Mbps

The Internet is becoming a platform for most computer needs.

Page 10: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Network Evolution

Page 11: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

1960s and 1970s: Communications

Programssoftware

hardware

Value-addednetworks

Programssoftware

hardware

BA

Centered around the host (mainframe). On a single computer, accessing resources, running

programs, and copying files are relatively straightforward.

Unintelligentterminal

Unintelligentterminal

Low speed links

Page 12: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

1960s and 1970s: Communications (contd.)

Even on a system of only two computers, coordinating resources becomes much more complex.

Transferring information requires, among other things, addressing, error detection, error correction, synchronization, and transmission coordination.

Programssoftware

hardware

Value-addednetworks

Programssoftware

hardware

BA

Unintelligentterminal

Unintelligentterminal

Low speed links

Page 13: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

1970s and 1980s: Networks The introduction of PCs revolutionized computer

communication and networking» LANs evolved to share resources (Disks, Printers)

Minicomputers and shared WANs evolved» Facilitated the emergence of distributed processing» Applications remained separate and independent, and

different communication protocols were developed

TokenRing

Page 14: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

1980s and 1990s: Internetworks

Token-Ring

Private netsand Internet

FDDI

Router Router

RouterRouter

FDDI Ring

Page 15: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

1980s and 1990s: Internetworks

Most of today’s networks are a mixture of old and new technologies.

The approach to computer communication in most

organizations is changing rapidly in response to new technologies, evolving business requirements, and the need for more bandwidth and “instant” knowledge transfer.

Internetworks tie LANs and WANs, computer systems, software, and related devices together to form the corporate communication infrastructure.

Page 16: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

1990s: Global Internetworking

Telephone

Television

Router

Public switch

Page 17: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

1990s: Global Internetworking

Studies show that users increasingly require more bandwidth.

Networks will have to meet these demands and provide low delay, bandwidth on demand, and other new services.

Such networks are characterized by the following:» increasing use of graphics and imaging» larger files and larger programs» client/server computing» bursty network traffic

Global internetworking will provide an environment for emerging applications that will require even greater amounts of bandwidth.

Page 18: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Basic Networking concepts

Page 19: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Simple Data Communication Model

TransceiverTransceiverTransport System

DigitalAnalog/Digital

Digital

001101

001101

Data Network

Public Telephone Network

Page 20: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Terminology

Networks are classified on the basis of geographic span.» Local Area Networks (LANs)» Metropolitan Area Networks (MANs)» Wide Area Networks (WANs)

The difference in geographical extent between WANs and LANs account for significant differences in their respective design issues.

Page 21: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

LAN Characteristics

LANs are designed to:» Operate within a limited geographic area» Allow multi-access to high-bandwidth media» Control the network privately under local

administration» Provide full-time connectivity to local services» Connect physically adjacent devices

Page 22: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

LAN Characteristics

» All nodes are connected by a single high speed shared channel.

» Data is packetized and packets are carried past all nodes in the network.

» Addressing is required but routing is not needed.

» Congestion control and network architecture are among design issues.

» Several topologies can be used but the choice of topology is not a major issue.

Page 23: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

LAN Topologies

Linear Bus Topology

Page 24: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

LAN Topologies (Contd.)

Star

Page 25: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

LAN Topologies (Contd.)

Ring.

Page 26: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

LAN Topologies (Contd.)

Hierarchical/Inverse Tree.Higher power at higher levels.

Page 27: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

LAN Components

A LAN has the following basic components:

Transmission Medium» Cable or Cable-less. It connects the various

stations. E.g. twisted pair, coaxial cable, CATV cable, fiber optics, radio waves.

Stations» Intelligent workstations which attach to

the medium. E.g. PC or workstation.

Page 28: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

LAN Components (Cont.)

» Non-intelligent which attach to a station. E.g. Printers, Modems, Hard disks, etc.

File server» The main unit in the network that offers

various services to the network users.» It refers to a computer, its hard disk, its

network operating system, and the file server software that manages the network resources.

Page 29: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

LAN Components (Cont.)

Network Interface Card (NIC)» Network adapter to send and receive

messages. It is a circuit board with the components necessary for handling communication tasks

» The NIC is plugged onto one of the available slots on the PC expansion bus.

» Installed in each workstation and file server such as Ethernet NIC.

Page 30: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

LAN Components (Cont.)

Network Operating System (NOS)» Installed on the hard disk of the file sever

station. Its function is to control the access to the common shared resources, such as printers, hard disks, database applications, etc.

Workstation Operating System» Consists of a network shell installed on any

one of the popular operating systems such as DOS, Unix, Linux, MAC-OS, etc.

Page 31: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Anatomy of a LAN node

Hub

Operating

System

Application

Network protocol

NIC Driver

Ethernet NIC

Protocol API

DriverSpecification

HardwareInterface

Applicationlevel API

Kernellevel API

Kernellevel API

TransmitReceive

Page 32: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

LAN Characteristics

What distinguishes one LAN from another:» Transmission Medium

– Twisted pair, Coax, CATV, Fiber Optic, or Wireless.

» Topology: Star, Bus, Ring» Transmission method: Base/Broadband» Medium Access Technique

– Random Access (CSMA/CD)– Controlled Access (Token Passing)

Page 33: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

LAN Characteristics (Cont.)

» Others– Type (Peer-to-Peer or Server-based)– Speed:

in bits per second (bps)

– Span: distance between end stations

– Load: number of stations.

Page 34: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Server-Based LANs

Server-based: A server-based network consists of a group of user-oriented PCs called clients that request and receive network services from specialized computers called servers.

Page 35: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Peer-to-Peer LANs

Peer-to-peer: A peer-to-peer network is a group of user-oriented PCs that basically operate as equals. Each PC is called a peer. The peers share resources, such as files and printers, but no specialized servers exists. Each peer is responsible for its own security, and, in a sense, each peer is both a client and a server.

Page 36: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Peer-to-Peer Networking (Workgroup)

Resources are distributed throughout the network on computer systems that may act as both service requesters and service providers.

The user of each PC is responsible for the administration and sharing of resources for his PC.

Ideal for small organizations where security is not of concern.

Page 37: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Resources for Peer-to-Peer Network

Personal computers. Network Operating System

» Ex: Windows 98/ NT/ 2000, Linux, Unix.

Network Interface Card (NIC) + the driver of the NIC.

Network cables. Hubs (in case twisted-pair cables are

used).

Page 38: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Client Server Model

Client-Server paradigm is the primary pattern of interactions among cooperating applications.

This model constitutes the foundation on which distributed algorithms are built.

Page 39: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

What is the Client-Server Paradigm?

The paradigm divides communicating applications into 2 broad categories, depending on whether the application waits for communication or initiates it.» An application that initiates a

communication is called a client.» End users usually invoke a client software

when they use a network service.

Page 40: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Client Server Model (cont.)

Server: Any program that offers a service reachable over the network» If a machine’s primary purpose is to

support a particular server program, the term server is usually applied to both, the machine and the server program

Client: An executing program becomes a client when it sends a request to a server and waits for a response

Page 41: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Client Server Model (cont.)

A server is any program that waits for incoming communication requests from a client.» Each time a client application needs to contact a

server, it sends a request and awaits a response.

» The server receives a client’s request, performs the necessary computation, and returns the result to the client.

» When the response arrives at the client, the client continues processing.

Page 42: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Client Server Model (cont.)

Request

Reply

Machine Running Client Application

Machine Running Server Application

ClientProgram

ServerProgram

Page 43: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Client Server Model (cont.)

A Misconception:» Technically, a server is a program and

not a piece of hardware.» However, computer users frequently

(mis)apply the term to the computer responsible for running a particular server program.– For example, Web Server, is usually a

computer running the http server program.

Page 44: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

WANs

To make optimum use of expensive communication links, WANs are structured with irregular placement of the nodes. Store-and-Forward packet switching is used to deliver packets to their destination.

Page 45: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Wide-Area Networks and Devices

WANs are designed to:» Allow access over serial interfaces operating

at lower speeds» Control the network subject to regulated

public services» Connect devices separated over wide, even

global areas

Page 46: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

WANs

Design Issues:Capacity assignment

Network topology

Routing algorithm

Congestion control

Network architecture

S D

Page 47: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Enterprise Developments The enterprise is a corporation, agency, service, or

other organization that will tie together its data, communication, computing, and storage resources.

Developments on the enterprise network include:» LANs interconnected to provide client/server applications

integrated with the traditional legacy applications from mainframe data centers

» End-user needs for higher bandwidth on the LAN, which can be consolidated at a switch and delivered on dedicated media

» Integration of formerly separate networks so that the non-bursty traffic from voice and video applications coexist on a single network

» Relaying technologies for WAN service, with very rapid growth in Frame Relay and cell relay (ATM)

Page 48: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Network Architecture

Page 49: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Communication Protocols To provide error-free and maximally

convenient information transfers, the network communication is regulated by a set of rules and conventions called network protocols.

Protocols define connectors, cables, signals, data formats, error control techniques, and algorithms for message preparation, analysis and transfer.

Page 50: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Communication Protocols (Contd.)

Network Protocol:» A set of rules defining the syntax (form)

and semantics (meaning) in order to regulate communication between network nodes.

» Protocols can be implemented in either hardware or software

» The EIA-232-D is a physical layer protocol implemented in hardware.

» TCP/IP are implemented in software.

Page 51: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Protocol Data Units (PDU)

Each PDU must contain two major parts:» Header:

– Identifies how the following parts are to be handled and routed.

» Message:– This is the message body itself.– This is where the protocol is determined

to be character oriented or bit oriented.Header Message Trailer

Page 52: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Communication Standards

The goal of the ISO subcommittee developing the OSI model was to provide a framework for network standards acceptable to all manufacturers

Page 53: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

ISO OSI Reference Architecture

The architecture is layered to reduce complexity.» Each layer offers certain services to the

layer immediately above it.» Each layer shields the higher layer from

the details of implementation of how the services are offered.

» Layer "n" on one station carries on a conversation with layer "n" on another network station.

Page 54: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

OSI Reference Model

The ISO OSI Layered Model» Application: File transfer, mail, rlogin, etc.» Presentation: Data formatting.» Session: Negotiation and connection.» Transport: End-to-end delivery.» Network: Routing of packets.» Data link: Transfer of frames.» Physical: Cabling system.

Page 55: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Why a Layered Model

7 Application 6 Presentation 5 Session 4 Transport 3 Network 2 Datalink 1 Physical

Reduces complexity Standardizes interfaces Facilitates modular engineering Ensures interoperable technology Accelerates evolution Simplifies teaching and learning

Page 56: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

7 Application Network processes to applications 6 Presentation Data representation 5 Session Inter-host communication 4 Transport End-to-end connections 3 Network Addresses and best path 2 Datalink Access to media 1 Physical Binary transmission

Layer Functions

Page 57: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Application Application Presentation Presentation Session Session Transport Transport NetworkNetwork DatalinkDatalink Physical Physical

Layer Functions

bits

frames

packets

segments

Host A Host B

Page 58: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Application Application Presentation Presentation Session Session Transport Transport NetworkNetwork DatalinkDatalink Physical Physical

Data Encapsulation

frame network data frameheader header trailer

segment data header

network segment data header header

data

01001000111010

Page 59: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Data Encapsulation Example

segment data header

network segment data header header

data

Frame Network Segment Data Frame header header header trailer

Data

Segment

Packet

Frame

Bits01111111010101101000100100010110101 Router

Page 60: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Application, Presentation,

and Session Layers

Page 61: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Application Layer

Computer Applications

Word Processing Presentation Graphics Spreadsheet Database Design/Manufacturing Project Planning Others

Network Applications

Electronic mail File Transfer Remote Access Client/Server Process Information Location Network Management WWW Video-Conferencing Others

Page 62: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Application Layer (cont.)

Network Applications(For enterprise

communication) Electronic mail File Transfer Remote Access Client/Server Process Information Location Network Management Others

Internetwork Applications(Extend beyond the enterprise)

Electronic Data Interchange World Wide Web E-mail Gateways Special-Interest Bulletin

Boards Financial Transaction

Services Internet Navigation Utilities Conferencing (Video, Voice,

Data)

Page 63: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Presentation Layer

Text Data

» ASCII, EBCDIC» Encrypted

Sound Video

» MIDI (Musical Instrument Digital Interface)» MPEG (Motion Picture Experts Group)» QuickTime

Page 64: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Presentation Layer

Graphics Visual Images

» PICT(format to transfer QuickDraw graphics between Macintosh or PowerPC programs)

» TIFF (Tagged Image File Format)» JPEG (Joint Photographic Experts Group)» GIF

Provides code formatting and conversion for applications

Page 65: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Session Layer

Coordinates applications as they interact on different hosts

Service Request

Service Reply

Page 66: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Session Layer (contd.)

Network File System (NFS)– Allows trasnparent access to remote network resources

Structured Query Language (SQL) Remote-Procedure Call (RPC)

– RPC procedures are built on clients and executed on servers

X Window System– Allows intelligent terminals to communicate with remote

UNIX machines AppleTalk Session Protocol (ASP)

– Establishes and maintains sessions between an AppleTalk client and server

DNA Session Control Protocol (SCP)

Page 67: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

TransportLayer

Page 68: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Transport Layer Overview

Segments upper-layer applications Establishes an end-to-end connection Sends segments from one end host to

another Ensures end-to-end data reliability

Page 69: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Segment Upper-Layer Applications

Application Electronic File TerminalPresentation Mail Transfer

SessionSession

Transport

Transport segments share traffic stream

Application Data Application Data port port

Page 70: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Establishes Connection

sender receiver

synchronize

Negotiate connection

synchronize

Acknowledge

Connection established

Data transfer (send segments)

Page 71: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Establishes Connection

sender receivertransmit

not ready

ready

Resume Transmission

Buffer full process segments

Buffer OK

Page 72: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Reliability with Windowing In the most basic form of reliable

connection-oriented transfer, data segments must be delivered to the recipient in the same sequence that they were transmitted.

Windowing is a method to control the amount of information transferred end-to-end. Some protocols measure information in terms of number of packets

Page 73: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Reliability with Windowing

send 1 window size =1 receive 1 Ack 2

send 2 receive 2 Ack 3

send 1 window size =3 receive 1 send 2 receive 2 send 3 receive 3 Ack 4 send 4

sender receiver

sender receiver

Page 74: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

An Acknowledgement Technique

Reliable delivery guarantees that a stream of data sent from one machine will be delivered through a functioning data link to another machine without duplication or data loss. Positive acknowledgement with retransmission is one technique that guarantees reliable delivery of data streams.

The sender keeps the record of each segment it sends and waits for an acknowledgement.

The sender also starts a timer when it sends a segment, and it retransmits a segment it the timer expires before an acknowledgement arrives.

Page 75: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

An Acknowledgement Technique

send 1 send 2 send 3 Ack 4 send 4 send 5

send 6Ack 5

send 5Ack 7

sender receiver

1 2 3 4 5 61 2 3 4 5 6

X

Page 76: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Transport to Network Layer

End-to-end segments

Routed packetsRouter

Router

Router

RouterRouter

Page 77: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Summary Presentation layer formats and converts network

application data to represent text, graphics, images, video, and audio.

Session-layer functions coordinate communication interactions between applications.

Reliable transport-layer functions include» Multiplexing» Connection synchronization» Flow control» Error recovery» Reliability through windowing

Page 78: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Physical and Data Link Layers

Page 79: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Physical and Data-Link Standards

The data link layer provides data transport across a physical link. To do so, the data link layer handles physical addressing, network topology, line discipline, error notification, orderly delivery of frames , and optional flow control.

The physical layer specifies the electrical, mechanical, procedural, and functional requirements for activating, maintaining, and deactivating the physical link between end systems.

These requirements and characteristics are codified into standards.

Page 80: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

LAN Data-Link Sublayers

Network LLC

Data Link MAC Physical

Logical Link Control

Media Access Control

MAC Frame 802.2 LLC Packet or datagram

Page 81: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

LAN Data-Link Sublayers LLC refers upward to higher-layer software

functions. MAC refers downward to lower-layer

hardware functions. LAN protocols occupy the bottom two layers

of OSI reference model: the physical layer and data link layer. The IEEE 802 committee subdivided the data link layer into two sublayers: » The logical link control (LLC) sublayer» The media access control (MAC) sublayer

Page 82: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

LAN Data-Link Sublayers

The LLC sublayer provides for environments that need connectionless or connection-oriented services and the data link layer.

The MAC sublayer provides access to the LAN medium in an orderly manner.

Page 83: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

LLC Sublayer Functions

Enable upper layers to gain independence over LAN media access.

Allow service access points (SAPs) from interface sublayers to upper-layer functions.

Provide optional connection, flow control, and sequencing services.

Page 84: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Summary

Internetworking evolved to support current and future applications

The OSI reference model organizes network functions into seven layers

Data flows from upper-level user applications to lower-level bits transmitted over network media

Peer-to-peer functions use encapsulation and de-encapsulation at layer interfaces

Most network manager tasks configure the lower three layers

Page 85: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Examples

Page 86: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

R R

R RR

R

Router

Router

Router

HTTP and Web Browsing

HTTP Client

Link builder

Minicomputer

HTTP Server

Request

Response

Page 87: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

HTTP and Web Browsing

Request: http://www.commm.utoronto.ca/infocom/index.html

Event Message content1.User selects document.2. Network Software of client locates the server host and establishes a two-way connection.3. HTTP client sends message requesting GET/INFOCOM/INDEX.HTML http/1.0 document.4. HTTP daemon listening on TCP port 80 interprets message.5. HTTP daemon sends a result code and a http/1.1 200 OK description of the information that the client Server: Apache/1.2.5 FrontPage

3.0.4 will receive. Content-Length: 414

Content-Type: text/html6. HTTP daemon reads the file and sends the <html> <title> requested file through the TCP port. <title> IEEE Infocom ‘pp –The Future is

now..7. HTTP daemon disconnects the connection.8. Text is displayed by client browser, which interprets the HTML format.

Page 88: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Domain Name System (DNS)

The DNS is a distributed database that resides in multiple machines on the Internet and is used to convert between names and network addresses.

The DNS protocol is used to manage the communication between DNS clients and servers

The DNS clients are called resolvers. The programs that store the

information about the domain name space are called name servers.

Page 89: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Name Servers

The domain database is divided up into parts called zones, which are distributed among various name servers.

The name server that handles a particular zone is said to have authority over that zone.

89

Page 90: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Resolvers

Resolvers are clients that access name servers, and interface user programs to the DNS.

Programs running on a host that need information from the domain name space use the resolver.

The resolver is located on the same host as the program that requests the resolver’s services.

90

Page 91: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

A name server can be authoritative over multiple zones as well.

A zone contains the domain names and data that a domain contains, except for domain names and data that are delegated elsewhere.

91

Page 92: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

kfupm

ccse itc

ee ri

kfupm zone

kfupm domain

itc zone +

domain

ccse

zon

e +

dom

ain

92

Page 93: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Nameserver

“.”name server

saname server

edu.saname server

kfupm.edu.saname server

“.”

sa

edu

kfupmResolver

reso

lver

que

ry

answer

query for address of

www.kfupm.edu.sa

referral to sa

name server

address of

www.kfupm.edu.sa

93

Page 94: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

DNS Query and Response Example

Steps to resolve the name www.commm.utoronto.ca

Event Message content1. Application requests name resolution.2. Resolver composes query message. Header: OPCODE=SQUERY

Question: QNAME=tesla.comm.toronto.edu.,QCLASS=IN, QTYPE=A

3. Resolver sends UDP datagram encapsulating the query message. 3. DNS server looks up address and prepares Header: OPCODE=SQUERY,

RESPONSE, AA a response message. Question: QNAME=tesla.comm.toronto.edu.,

QCLASS=IN, QTYPE=AAnswer: tesla.comm.toronto.edu., 86400

IN A 128.100.11.56

4. DNS sends UDP datagram encapsulating the response message.

Page 95: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Simple Mail Transfer Protocol (SMTP)

A mail client application interacts with a local SMTP sever to initiate the delivery of an email message.» The user prepares an email message that includes

– Recipient’s email address,– Subject line, and– a body

» When the user clicks send, the mail application– Prepares a file with above information and additional

information specifying format (e.g. plain ASCII or MIME extensions to encode non-ASCII data)

– Resolve the name of the local SMTP server using DNS– Then perform the following steps

Page 96: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Steps in sending e-mail using SMTP

Event Message content1. The mail application establishes a TCP connection (port 25) to its local SMTP server

2. SMTP daemon issues the following message to 220 tesla.com.utoronto.edu ESMTP the client indicating its readiness to receive mail. Sendmail 8.9.0/8.9.0; Thu, 2 Jul 2000

05:07:59 –0400 (DT)

3. Client sends a HELO message and identifies itself. HELO bhaskara.com.utoronto.edu.ca

4. SMTP daemon issues a 250 message, indicating 250 tesla.com.utoronto.edu Hello the client may proceed. bhaskara.com [128.100.10.91],

pleased to meet you

5. Client sends sender’s address MAIL FROM: <[email protected]>

6. If successful, SMTP daemon replies with a 250 <[email protected]> … 250 message. Sender ok

Page 97: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Steps in sending e-mail using SMTP(contd.)

Event Message content7. Client sends recipient’s address. RCPT TO: [email protected]. A 250 message is returned 250 <[email protected]> …

Recipient ok 9. Client sends a DATA message requesting DATA permission to send the mail message.10. Daemon sends a message giving the client 354 Enter mail, end with ‘’.’’ on a line permission to send. by itself

11. Client sends the actual text of the message Hi, please …. 12. Daemon indicates that message is accepted 250 FAA00803 Message accepted for

delivery for delivery. A message ID is returned

13. Client indicates that the mail session is over. QUIT14. Daemon confirms the end of the session 221 tesla.comm.toronto.edu

closing connection

Note: Local SMTP server then repeats this process with the destination.

Page 98: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Conceptual Model of a Mail System

Outgoing mail

spool area

Mailboxes forincoming mail

Client(background

transfer)

Server(to accept

mail)

UserInter-face

TCP connectionUser

sends mail

User reads mail

for outgoing mail

for incoming mail

TCP connection

Alias expansion

and forwarding

Alias database

Page 99: Computer Networks Sadiq M. Sait, Ph.D. sadiq@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum and Minerals Dhahran,

Summary

The examples clearly indicate that a protocol is solely concerned with the interaction between two peer processes, that is, the client and the server.

Application layer protocols operate by using the communication services provided by the TCP and UDP protocols.

Actually, both TCP and UDP operate by using the connectionless service of IP.