COMPUTER COMMUNICATION AND NETWORKS 3(3-0). Protocols The OSI model Functions of the layers.

46
COMPUTER COMMUNICATION COMPUTER COMMUNICATION AND NETWORKS AND NETWORKS 3(3-0) 3(3-0)

Transcript of COMPUTER COMMUNICATION AND NETWORKS 3(3-0). Protocols The OSI model Functions of the layers.

COMPUTER COMMUNICATION COMPUTER COMMUNICATION

AND NETWORKSAND NETWORKS 3(3-0)3(3-0)

ProtocolsProtocols The OSI modelThe OSI model Functions of the layersFunctions of the layers

ProtocolsProtocols

To communicate, entities must agree To communicate, entities must agree on protocol.on protocol.

Protocol is a set of rules that govern Protocol is a set of rules that govern communication.communication.

The layered functionality of the The layered functionality of the different protocols in the OSI Mode is different protocols in the OSI Mode is called a Protocol Stackcalled a Protocol Stack

StandardsStandards

standards that allow computers to standards that allow computers to connect to one another and enable connect to one another and enable computers and peripheral devices to computers and peripheral devices to exchange information with as little exchange information with as little error as possibleerror as possible

The first Ethernet standard was The first Ethernet standard was published in 1980.published in 1980.

Network ProtocolsNetwork Protocols

• A communication protocol is a set of rules that specify the format and meaning of messages exchanged between computers across a network.

• A set of related protocols that are designed for compatibility are called protocol suite.

Human and Computer ProtocolsHuman and Computer Protocols

Hi

Hi

Got thetime?

2:00<data>

time

Human Protocol Computer Protocol

Web client

Web server

openconnection

OK

send me data

Protocols and StandardsProtocols and Standards

•By one company or Organization•Close Standard

•Industry standard •Open standard•Free of Charge•Changes are Hard sometimes

LayeringLayering What is it?What is it? Building complex systems is hard!Building complex systems is hard!

• Approach: “Divide and conquer”.Approach: “Divide and conquer”.• Split job into smaller jobs, or Split job into smaller jobs, or layerslayers..

Analogy to other fields.Analogy to other fields.• Building a house: digging, foundation, Building a house: digging, foundation,

framing, etc.framing, etc.• Car assembly line…Car assembly line…

Basic idea: each step dependent on the Basic idea: each step dependent on the previous step but does not need to be aware previous step but does not need to be aware of how the previous step was done.of how the previous step was done.

Analogy: Air Travel The problem: air travel.The problem: air travel. Decomposed into series of steps:Decomposed into series of steps:

Arrival at airport

Check-in

Boarding

Takeoff

Departure from airport

Baggage claim

Deplane

Landing

Traveling

More on the air travel analogy…

Arrival

Check-in

Boarding

Takeoff

Dep

art

ing

air

port

Departure

Baggage claim

Deplane

Landing

Arr

ivin

g a

irport

Traveling

intermediate air traffic sites

Airplane routing Airplane routing

Layered Protocol Design

• Layering model is a solution to the problem of complexity in network protocols

• The model divides the network protocols into layers, each of which solves part of the network communication problem– Each layer has its own protocol!

• Each layer implements a service to the layer above– Relying on services provided by the layers

below.

LayersLayers

Layers are the different components that Layers are the different components that need to be designed/implemented when need to be designed/implemented when designing/implementing networks.designing/implementing networks.

Each layer responsible for a set of Each layer responsible for a set of functions.functions.

Top layer relies on Top layer relies on servicesservices provided by provided by bottom layer.bottom layer.

Layer makes it service available to higher Layer makes it service available to higher layer through an layer through an interfaceinterface..

The OSI ModelThe OSI Model

OSI stands for Open Systems OSI stands for Open Systems InterconnectionInterconnection

It is a model that covers all aspects It is a model that covers all aspects of network communicationof network communication

Purpose is to open communication Purpose is to open communication between different systems without between different systems without requiring changes to the underlying requiring changes to the underlying hardware and softwarehardware and software

The OSI Model (cont.)The OSI Model (cont.) It is a layered framework for the design of network systemsIt is a layered framework for the design of network systems Please Do Not Touch Steve’s Pet AlligatorPlease Do Not Touch Steve’s Pet Alligator All People Seem To Need Data ProcessingAll People Seem To Need Data Processing Please Do Not Throw Sausage Pizza AwayPlease Do Not Throw Sausage Pizza Away

The OSI Model (cont.)The OSI Model (cont.)

Each layer has its Each layer has its own set of well-own set of well-defined functionsdefined functions

Layers Layers communicate and communicate and interact with the interact with the layers immediately layers immediately above and belowabove and below

The OSI Model (cont.)The OSI Model (cont.)

Each layer in the Each layer in the sending machine sending machine adds its information adds its information in the form of in the form of header and trailer.header and trailer.

Each layer in the Each layer in the receiving machine receiving machine gets information gets information related to it and related to it and passes the rest to passes the rest to upper layers.upper layers.

Data Name at Different OSI model layersData Name at Different OSI model layers

ApplicationApplication PresentationPresentation SessionSession TransportTransport NetworkNetwork Data Link Data Link PhysicalPhysical

MessageMessage PacketsPackets PacketsPackets Datagram and segmentDatagram and segment DatagramDatagram FramesFrames BitsBits

Functions of the layersFunctions of the layers

1:Physical Layer1:Physical Layer• Coordinates the functions required to transmit a bit Coordinates the functions required to transmit a bit

stream over a physical medium.stream over a physical medium.• Deals with the mechanical and electrical specs of the Deals with the mechanical and electrical specs of the

mediummedium• Defines the procedures that physical devices had to Defines the procedures that physical devices had to

perform for trans. to occurperform for trans. to occur

Functions of the layers (cont.)Functions of the layers (cont.)

Physical layer concerns with the following;Physical layer concerns with the following;• Physical characteristics of interfaces and Physical characteristics of interfaces and

mediamedia• Representation of bitsRepresentation of bits• Data rate (the transmission rate)Data rate (the transmission rate)• Synchronization of bitsSynchronization of bits• Line configurationLine configuration• Physical topologyPhysical topology• Transmission modeTransmission mode

Functions of the layers (cont.)Functions of the layers (cont.)Data Link LayerData Link Layer

This layer breaks the input data into frames, transmits the frames This layer breaks the input data into frames, transmits the frames sequentially, and processes the acknowledged frames sent back by sequentially, and processes the acknowledged frames sent back by the receiver. It adds a header and trailer to the frames it creates.the receiver. It adds a header and trailer to the frames it creates.

It makes it to appear error free to upper layerIt makes it to appear error free to upper layer

Data Link Layer is Sub dividedData Link Layer is Sub divided MAC (Media Access Control)MAC (Media Access Control) LLC (Logical Link Control)LLC (Logical Link Control)

Functions of the layers (cont.)Functions of the layers (cont.)

Data link layer responsibilities are;Data link layer responsibilities are;• FramingFraming• Physical addressingPhysical addressing• Flow controlFlow control• Error controlError control

It Adds a header and trailer to the frames its It Adds a header and trailer to the frames its createscreates

MEDIA ACCESS CONTROLMEDIA ACCESS CONTROL It is responsible for physical addressing and access to the It is responsible for physical addressing and access to the

network media, only one device at a time may transmit on network media, only one device at a time may transmit on any type of media..any type of media..

AddressingAddressing ContentionContention Deterministic Deterministic

AddressingAddressing The Data Link layer is responsible for the The Data Link layer is responsible for the

physical addresses of devices on the network. Every device physical addresses of devices on the network. Every device on a network has a hard-coded address attached to it.on a network has a hard-coded address attached to it.

Example Example The address for Ethernet card would be The address for Ethernet card would be 00-AA-00-59-65-71.00-AA-00-59-65-71.

Contention Contention Any device can transmit whenever Any device can transmit whenever it needs to. It allows equal access to the network it needs to. It allows equal access to the network media, but at the expense of possible collisions. media, but at the expense of possible collisions. Collisions occur when two devices try to transmit Collisions occur when two devices try to transmit at the same time and disrupt each other’s at the same time and disrupt each other’s signaling. Devices listen for other signals on the signaling. Devices listen for other signals on the media before transmitting. Collisions are not media before transmitting. Collisions are not totally eliminated, but they are kept down to totally eliminated, but they are kept down to manageable form. It is called CSMA (Carrier manageable form. It is called CSMA (Carrier Sense Multiple Access.Sense Multiple Access.

It has two typesIt has two types CSMA/CDCSMA/CD A stands for Carrier Sense Multiple A stands for Carrier Sense Multiple

Access/Collision Detection.Access/Collision Detection. CSMA/CACSMA/CA A stands for Carrier Sense Multiple A stands for Carrier Sense Multiple

Access/Collision AvoidanceAccess/Collision Avoidance

DeterministicDeterministic

Unlike a contention-based network, Unlike a contention-based network, where devices are free to transmit where devices are free to transmit whenever they want, a deterministic whenever they want, a deterministic network network

The two types of deterministic The two types of deterministic networks are token passing and networks are token passing and pollingpolling

LOGICAL LINK CONTROLLOGICAL LINK CONTROL

The Logical Link Control (LLC) sublayer of The Logical Link Control (LLC) sublayer of the Data Link layer establishes and the Data Link layer establishes and maintains data link connections between maintains data link connections between network devices. It is responsible for any network devices. It is responsible for any flow control and error correction found in flow control and error correction found in this layerthis layer

The following are connection services the The following are connection services the LLC sublayer suppliesLLC sublayer supplies

Unacknowledged connectionless serviceUnacknowledged connectionless service Connection-oriented serviceConnection-oriented service

Functions of the layers (cont.)Functions of the layers (cont.) 3:Network Layer3:Network Layer

• The third layer of the OSI model is the Network The third layer of the OSI model is the Network layer. This layer is responsible for routing layer. This layer is responsible for routing information from one network device to another. information from one network device to another. The Network layer decides what path data will The Network layer decides what path data will take if the destination device is located on take if the destination device is located on another network. another network.

Functions of the layers (cont.)Functions of the layers (cont.)

Network layer responsibilities are;Network layer responsibilities are;

• RoutingRouting One of the functions of the network layer is to route One of the functions of the network layer is to route

the packets to their final destination in an the packets to their final destination in an internetwork environment.internetwork environment.

Functions of the layers (cont.)Functions of the layers (cont.)

SWITCHING: DatagramSWITCHING: Datagram switching describes switching describes how data is forwarded across an inter network. how data is forwarded across an inter network. There are three main methodsThere are three main methods

Circuit Switching:Circuit Switching: In circuit switching, a In circuit switching, a dedicated connection is made between the two dedicated connection is made between the two communicating devices. Two advantages of this communicating devices. Two advantages of this method are no congestion (because the link is method are no congestion (because the link is dedicated) and almost no channel-access delay. dedicated) and almost no channel-access delay. The disadvantages are inefficient use of the The disadvantages are inefficient use of the media and a possible long wait to establish a media and a possible long wait to establish a connection.connection.

Network LayerNetwork Layer Message SwitchingMessage Switching: With message switching the : With message switching the

data is sent from device to device in whole across data is sent from device to device in whole across the network. This is also known as store and the network. This is also known as store and forward. Devices must store all the information as forward. Devices must store all the information as it is sent in whole. The media is used more it is sent in whole. The media is used more efficiently with this method, and congestion can be efficiently with this method, and congestion can be controlled. controlled.

Packet Switching:Packet Switching: A combination of circuit A combination of circuit switching and message switching. With packet switching and message switching. With packet switching, data is broken into small pieces and switching, data is broken into small pieces and routed from device to device. Devices that forward routed from device to device. Devices that forward the data only need to keep the information in the data only need to keep the information in memory instead of in physical storage, because memory instead of in physical storage, because data was splitdata was split

Functions of the layers (cont.)Functions of the layers (cont.)

4:Transport Layer4:Transport Layer• Responsible for the source to destination Responsible for the source to destination

delivery of the entire message.delivery of the entire message.• Ensures that whole message arrives in order.Ensures that whole message arrives in order.

Functions of the layers (cont.)Functions of the layers (cont.)

Transport layer responsibilities are;Transport layer responsibilities are;• Service-point addressingService-point addressing

Not only from computer-to-computer connection, but Not only from computer-to-computer connection, but also from process to process, so it gets the entire also from process to process, so it gets the entire message to correct process(running program) on that message to correct process(running program) on that computerscomputers

• Segmentation and reassemblySegmentation and reassembly Divided into transmittable segments with a unique Divided into transmittable segments with a unique

sequence numbersequence number

• Connection controlConnection control Can be connectionless or connection orientedCan be connectionless or connection oriented

• Flow controlFlow control• Error controlError control

Transport LayerTransport Layer Provide acknowledgment of successful Provide acknowledgment of successful

transmissiontransmission Flow controlFlow control

• Partition data into packets and assign each Partition data into packets and assign each one a sequence numberone a sequence number

• Provide service to assemble the received Provide service to assemble the received packets back into their original orderpackets back into their original order

• Error detection and correctionError detection and correction Lowest layer to which application Lowest layer to which application

programs are typically writtenprograms are typically written

Functions of the layers (cont.)Functions of the layers (cont.)

5:Session Layer5:Session Layer• Is the network dialog controller which Is the network dialog controller which

establishes, maintains and synchronizes the establishes, maintains and synchronizes the interaction between communicating systems.interaction between communicating systems.

Functions of the layers (cont.)Functions of the layers (cont.)

Session layer responsibilities are;Session layer responsibilities are;• Manage who can transmit data at a certain Manage who can transmit data at a certain

time and for how longtime and for how long• SynchronizationSynchronization

Adds checkpoints into a stream of data.Adds checkpoints into a stream of data.

Session LayerSession Layer

Enable data exchange between Enable data exchange between application to applicationapplication to application• EstablishmentEstablishment• SynchronizationSynchronization• Re-establishmentRe-establishment

Functions of the layers (cont.)Functions of the layers (cont.)

6:Presentation Layer6:Presentation Layer• Concerned with the syntax of the information Concerned with the syntax of the information

exchanged between two systems.exchanged between two systems.

Functions of the layers (cont.)Functions of the layers (cont.)

Presentation layer responsibilities are;Presentation layer responsibilities are;• TranslationTranslation

Changes information into a stream of bits which is a Changes information into a stream of bits which is a common format for different systems.common format for different systems.

• EncryptionEncryption The sender transforms the original information to The sender transforms the original information to

another form and receiver transforms the message to another form and receiver transforms the message to its original form for privacy reasons.its original form for privacy reasons.

• CompressionCompression Data compression reduces the number of bits to be Data compression reduces the number of bits to be

retransmitted, it is important at the transmission of retransmitted, it is important at the transmission of multimedia data.multimedia data.

Functions of the layers (cont.)Functions of the layers (cont.)

7:Application Layer7:Application Layer• Enables the user whether human or software Enables the user whether human or software

to access the network and provides user to access the network and provides user interfaces.interfaces.

Functions of the layers (cont.)Functions of the layers (cont.)

Application layer responsibilities are;Application layer responsibilities are;• Network Virtual TerminalNetwork Virtual Terminal

Is a software version of the physical terminal and Is a software version of the physical terminal and allows a user to log on to a remote host.allows a user to log on to a remote host.

• File transfer,access and management(FTAM)File transfer,access and management(FTAM) Allows a user to access files in a remote computer Allows a user to access files in a remote computer

and to manage or control them.and to manage or control them.

• Mail servicesMail services Provides the basis for email forwarding and storage.Provides the basis for email forwarding and storage.

Application LayerApplication Layer

Dictate the semantics of how requests for Dictate the semantics of how requests for services are made, such as requesting a file or services are made, such as requesting a file or checking for email.checking for email.

The container for all applications and protocolsThe container for all applications and protocols• Telnet, HTTP, POP, SMTP, Finger, FTP, etc.Telnet, HTTP, POP, SMTP, Finger, FTP, etc.

Virtually all distributed systems are applicationsVirtually all distributed systems are applications In Java, almost all network software written will In Java, almost all network software written will

be for the application.be for the application.

OSI LayersOSI Layers A typical message as it appears on the network.A typical message as it appears on the network.

2-2

Functions of the layers (cont.)Functions of the layers (cont.)

Layer Function Protocols Network Components

Application User Interface

used for applications specifically written to run over the network allows access to network services that support applications; directly represents the services that directly support user applications handles network access, flow control and error recovery Example apps are file transfer-mail,           

DNS; FTP; SMTP; TELNET; etc

Gateway

Presentation

Translation

Translates from application to network format and vice-versa all different formats from all sources are made into a common uniform format that the rest of the OSI model can understand responsible for protocol conversion, character conversion,data encryption / decryption, expanding graphics commands, data compression sets standards for different systems to provide seamless communication from multiple protocol stacks not always implemented in a network protocol

  Gateway Redirector

Session "syncs and sessions"

establishes, maintains and ends sessions across the network responsible for name recognition (identification) so only the designated parties can participate in the session provides synchronization services by planning check points in the data stream => if session fails, only data after the most recent checkpoint need be transmitted manages who can transmit data at a certain time and for how long Examples are interactive login and file transfer connections, the session would connect and re-connect if there was an interruption; recognize names in sessions and register names in history

NetBIOS Mail Slots

Gateway

Transportpackets; flow

control & error-handling

additional connection below the session layer manages the flow control of data between parties across the network divides streams of data into chunks or packets; the transport layer of the receiving computer reassembles the message from packets "train" is a good analogy => the data is divided into identical units provides error-checking to guarantee error-free data delivery, with on losses or duplications provides acknowledgment of successful transmissions; requests retransmission if some packets don’t arrive error-free provides flow control and error-handling

TCP, NetBIOS / NetBEUIATP

Gateway Advanced Cable TesterBrouter

Networkaddressing;

routing

translates logical network address and names to their physical address (e.g. computername ==> MAC address) responsible for

oaddressing odetermining routes for sending omanaging network problems such as packet switching, data congestion and routing

if router can’t send data frame as large as the source computer sends, the network layer compensates by breaking the data into smaller units. At the receiving end, the network layer reassembles the data think of this layer stamping the addresses on each train car

IP; ARP; RARP, ICMP; RIP; OSFP; IGMP;IPXNWLinkNetBEUIOSIDDPDECnet

Brouter RouterFrame Relay DeviceATM SwitchAdvanced Cable Tester

Data Linkdata frames to

bits

turns packets into raw bits 100101 and at the receiving end turns bits into packets. handles data frames between the Network and Physical layers the receiving end packages raw data from the Physical layer into data frames for delivery to the Network layer responsible for error-free transfer of frames to other computer via the Physical Layer this layer defines the methods used to transmit and receive data on the network. It consists of the wiring, the devices use to connect the NIC to the wiring, the signaling involved to transmit / receive data and the ability to detect signaling errors on the network media

Logical Link Control error correction and flow

control manages link control and

defines SAPs 802.1 OSI Model 802.2 Logical Link Control

Bridge SwitchISDN RouterIntelligent HubNICAdvanced Cable Tester

Media Access Control communicates with the

adapter card controls the type of media being used: 802.3 CSMA/CD (Ethernet) 802.4 Token Bus (ARCnet) 802.5 Token Ring 802.12 Demand Priority

Physicalhardware; raw bit

stream

transmits raw bit stream over physical cable defines cables, cards, and physical aspects defines NIC attachments to hardware, how cable is attached to NIC defines techniques to transfer bit stream to cable

IEEE 802 IEEE 802.2 ISO 2110 ISDN

Repeater MultiplexerHubs Passive Active TDROscilloscopeAmplifier