communications, standards & protocols © prof. aiman hanna department of computer science...

56
Communications, Standards & Communications, Standards & Protocols Protocols © Prof. Aiman Hanna © Prof. Aiman Hanna Department of Computer Science Department of Computer Science Concordia University Concordia University Montreal, Canada Montreal, Canada

Upload: clara-adams

Post on 25-Dec-2015

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

Communications, Standards & Communications, Standards & ProtocolsProtocols

© Prof. Aiman Hanna© Prof. Aiman HannaDepartment of Computer Science Department of Computer Science

Concordia University Concordia University Montreal, CanadaMontreal, Canada

Page 2: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

22

H H istory of Communicationsistory of Communications For 1000s of years through auditory & For 1000s of years through auditory &

visual sensesvisual senses

• Visual senses: Visual senses: Face to face Face to face Reading messages/letters/symbols/sketchesReading messages/letters/symbols/sketches Seeing visual signals (smoke, fire, ..etc).Seeing visual signals (smoke, fire, ..etc). ……

• Auditory senses: Auditory senses: Direct listening Direct listening Listening through messengers Listening through messengers ......

Page 3: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

33

H H istory of Communications istory of Communications (continue...)(continue...)

Drastic change inDrastic change in 18371837 The invention of the The invention of the telegraphtelegraph by Samuel Morse by Samuel Morse Characters of a message were translated into long Characters of a message were translated into long

and short electrical impulses and short electrical impulses These impulses were then transmitted over a copper These impulses were then transmitted over a copper

wirewire The association between the characters and the The association between the characters and the

impulses was called impulses was called Morse CodeMorse Code

18761876: The Magical invention of : The Magical invention of TelephonyTelephony by by Alexander Graham BellAlexander Graham Bell

Bell showed that voice can be converted directly into Bell showed that voice can be converted directly into electrical energyelectrical energy

This energy can then be transmitted over a wire This energy can then be transmitted over a wire using continuously varying voltagesusing continuously varying voltages

Page 4: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

44

H H istory of Communications istory of Communications (continue...)(continue...)

SwitchboardsSwitchboards Early telephones required a pair of wires that connects Early telephones required a pair of wires that connects

telephones at both endstelephones at both ends That changed with the invention of the switchboard, a That changed with the invention of the switchboard, a

switching device that connected lines between two phonesswitching device that connected lines between two phones Establishing connections was activated through an operator Establishing connections was activated through an operator

at the switchboardat the switchboard

Page 5: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

55

H H istory of Communications istory of Communications (continue...)(continue...)

1945: ENIAC1945: ENIAC EElectronic lectronic NNumerical umerical IIntegrator ntegrator AAnd nd CCalculator alculator The 1The 1stst electronic computer electronic computer Designed for computing ballistics for World War IIDesigned for computing ballistics for World War II Although did not play a direct role in communication, it did Although did not play a direct role in communication, it did

show that calculations and decision making could be done show that calculations and decision making could be done electronically electronically

1947: 1947: TheThe TransistorTransistor

Allowed smaller and affordable computers to be built Allowed smaller and affordable computers to be built Computers applications developed during the 1960s made Computers applications developed during the 1960s made

routing and processing telephone calls economically routing and processing telephone calls economically possiblepossible

The increased utilization of computers by businesses The increased utilization of computers by businesses resulted in a growing need to transfer information between resulted in a growing need to transfer information between these computers as wellthese computers as well

Page 6: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

66

H H istory of Communications istory of Communications (continue...)(continue...)

Electronic Communications - Electronic Communications - The massive need in relatively short timeThe massive need in relatively short time

The 1The 1stst form of communication between systems were done through form of communication between systems were done through magnetic magnetic tapestapes

Information were copied from on system into a tape; which is transferred to Information were copied from on system into a tape; which is transferred to another system, possibly a remote oneanother system, possibly a remote one

The development of the Personal Computer (PC) in the 1980s was a The development of the Personal Computer (PC) in the 1980s was a milestone in electronic communication milestone in electronic communication

The infusion of millions of PCs into, virtually, everywhere created a further The infusion of millions of PCs into, virtually, everywhere created a further massive need to make information easily accessiblemassive need to make information easily accessible

At this point it was clear that the need for electronic communication was no At this point it was clear that the need for electronic communication was no longer a luxury, rather a necessity and a mustlonger a luxury, rather a necessity and a must

1990s: 1990s: TheThe World Wide Web (WWW)World Wide Web (WWW) & The& The Internet Internet

WWW is WWW is applicationapplication that enabled information from around the world to that enabled information from around the world to become easily accessible from one’s desk. become easily accessible from one’s desk.

The Internet is an electronic network of computers that includes nearly The Internet is an electronic network of computers that includes nearly every university, government, and research facility in the world, as well as every university, government, and research facility in the world, as well as many commercial sitesmany commercial sites

The Internet started with four interconnected computers in 1969 and was The Internet started with four interconnected computers in 1969 and was known as ARPAnet known as ARPAnet

Page 7: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

77

F F orms of Communicationsorms of Communications Transferring data between computers is just one form of Transferring data between computers is just one form of

communication communication Transferring television signals is just another exampleTransferring television signals is just another example TV antennas are becoming less common; cable TV and TV antennas are becoming less common; cable TV and

direct reception via satellite dishes are becoming more direct reception via satellite dishes are becoming more popular todaypopular today

Satellite Transmission Broadcast Tower

Broadcast Television Reception

Page 8: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

88

F F orms of Communications orms of Communications (continue...)(continue...)

Other communications applications use Other communications applications use local area local area networksnetworks (LANs) and (LANs) and wide are networkswide are networks (WANs) (WANs) systems that allow communication over short (LAN) systems that allow communication over short (LAN) or long (WAN) distances. or long (WAN) distances.

Once connected to LANs or WANs, users can send or Once connected to LANs or WANs, users can send or receive data files, log into remote machine, send receive data files, log into remote machine, send Electronic MailsElectronic Mails (E-mails), or connect to the (E-mails), or connect to the InternetInternet

Other forms of communications include: Other forms of communications include: • Facsimile machines (Facsimile machines (FaxFax))• Voice and video communications over computersVoice and video communications over computers• Teleconferencing / Videoconferencing Teleconferencing / Videoconferencing • Cellular telephonesCellular telephones• Peer-to-peer networkingPeer-to-peer networking

Page 9: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

99

Okay!Okay! Let us Connect, Let us Connect, but what about:but what about:

SecuritySecurity Performance Performance Medium of communication Medium of communication Ease of useEase of use Cost and cost-effectiveness Cost and cost-effectiveness

After all, is there a law?After all, is there a law?

Page 10: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

1010

C C omputer Networksomputer Networks A network is a system connecting different devices, such as A network is a system connecting different devices, such as

PCs, printers, scanners, ..etc. PCs, printers, scanners, ..etc. A PC may be dedicated to manage a disk drive containing A PC may be dedicated to manage a disk drive containing

shared files; such a PC is referred to as shared files; such a PC is referred to as file serverfile server Often, a network covers a small geographical area (up to Often, a network covers a small geographical area (up to

few kilometers), such a network is referred to as few kilometers), such a network is referred to as LANLAN A network that connects large areas, such as state, A network that connects large areas, such as state,

country, or the world, is referred to as country, or the world, is referred to as WANWAN Now, with many users connecting to a network it is Now, with many users connecting to a network it is

significant to avoid conflicts as well as provide service to all significant to avoid conflicts as well as provide service to all of them with a minimal delayof them with a minimal delay

Connections to the network hence must be made in a way Connections to the network hence must be made in a way that achieves such requirementsthat achieves such requirements

The connection strategy is referred to as The connection strategy is referred to as NetworkNetwork TopologyTopology

The best topology depends on the network needsThe best topology depends on the network needs

Page 11: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

1111

N N etwork Topologies etwork Topologies Common Bus TopologyCommon Bus Topology Star Topology Star Topology Ring Topology Ring Topology Fully Connected TopologyFully Connected Topology Tree TopologyTree Topology Combined Topology Combined Topology

Page 12: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

1212

C C ommon Bus Topology ommon Bus Topology

Simply known as Simply known as Bus TopologyBus Topology or or Linear Bus Linear Bus TopologyTopology

TerminatorsTerminators are placed at both ends are placed at both ends

Page 13: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

1313

C C ommon Bus Topology ommon Bus Topology Collision is possible Collision is possible A collision results on A collision results on noisenoise The interfaces detect the noise on the bus, stop transmission, The interfaces detect the noise on the bus, stop transmission,

wait for a random amount of time then attempt transmission wait for a random amount of time then attempt transmission againagain

This process is called This process is called Carrier Sense Multiple Access with Carrier Sense Multiple Access with Collision DetectionCollision Detection (CSMA/CD) (CSMA/CD)

The The EthernetEthernet (original configuration) is an example of a (original configuration) is an example of a common bus network common bus network

Advantages Advantages DisadvantagesDisadvantages

Page 14: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

1414

S S tar Topology tar Topology

The central component is commonly called The central component is commonly called hubshubs or or switchesswitches

Advantages Advantages DisadvantagesDisadvantages

Page 15: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

1515

R R ing Topology ing Topology

The ring can either be The ring can either be unidirectional unidirectional or or bidirectional (dual)bidirectional (dual) IBM’s IBM’s Token RingToken Ring network is an example of a ring network is an example of a ring

topology, where a token (sequence of bits) is passed between topology, where a token (sequence of bits) is passed between the devices. the devices.

AdvantagesAdvantages DisadvantagesDisadvantages

Page 16: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

1616

F F ully Connected Topology ully Connected Topology

A direct link is there between each pair of A direct link is there between each pair of devices in the network; this design is extreme devices in the network; this design is extreme

AdvantagesAdvantages DisadvantagesDisadvantages

Page 17: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

1717

T T ree Topology ree Topology

Combines characteristics of linear bus and star Combines characteristics of linear bus and star topologies topologies

Allows for the expansion of an existing network Allows for the expansion of an existing network

Advantages Advantages DisadvantagesDisadvantages

Page 18: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

1818

C C ombined Topologies ombined Topologies

Used by many computer networks Used by many computer networks Groups of specialized users may need to have a separate LANGroups of specialized users may need to have a separate LAN Different LANs are connected through bridges/switchesDifferent LANs are connected through bridges/switches

Page 19: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

1919

S S tandardstandards Computers have different architecture, understand different Computers have different architecture, understand different

languages, store data in different formats, …etc., so how languages, store data in different formats, …etc., so how can they communicate then! can they communicate then!

For communication to occur, the system must use, and For communication to occur, the system must use, and agree upon, a agree upon, a protocolprotocol to communicate to communicate

A A protocolprotocol is a set of rules that define an exact format and is a set of rules that define an exact format and rules for communication between systems rules for communication between systems

If two system agree to follow a protocol, but different If two system agree to follow a protocol, but different protocol, they might as well follow none!protocol, they might as well follow none!

If all systems agree to follow one same protocol, then this If all systems agree to follow one same protocol, then this protocol would become a standardprotocol would become a standard

Fortunately, there is a standard; BUTFortunately, there is a standard; BUT Unfortunately, there are few of themUnfortunately, there are few of them Through the years, different goals and ideas have cause Through the years, different goals and ideas have cause

this creation of various standardsthis creation of various standards In general, there are two types of standards: In general, there are two types of standards: De facto De facto

standardsstandards, and standards through standards organizations, and standards through standards organizations De facto standards are those who exist by virtue of their De facto standards are those who exist by virtue of their

widespread use, such as many of IBM productswidespread use, such as many of IBM products

Page 20: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

2020

S S tandards Organizationstandards Organizations Few standards organizations are important to the field of Few standards organizations are important to the field of

computer networks and data communication computer networks and data communication Such organizations are:Such organizations are:

• ANSIANSI: American National Standards Institute : American National Standards Institute ((www.ansi.orgwww.ansi.org) – ASCII, FDDI, …) – ASCII, FDDI, …

• IECIEC: International Electrotechnical Commission : International Electrotechnical Commission ((www.iec.chwww.iec.ch) – JPEG, … ) – JPEG, …

• ITUITU: International Telecommunication Union : International Telecommunication Union ((www.itu.intwww.itu.int) - X.25, …) - X.25, …

• EIAEIA: Electronic Industries Association : Electronic Industries Association ((www.eia.orgwww.eia.org) – optical cables, wires, …) – optical cables, wires, …

• IETFIETF: Internet Engineering Task Force : Internet Engineering Task Force ((www.ietf.orgwww.ietf.org) – the next-generation Internet protocol) – the next-generation Internet protocol

• IEEEIEEE: Institute of Electrical and Electronics Engineers : Institute of Electrical and Electronics Engineers ((www.ieee.orgwww.ieee.org) – journals, 802 LAN Standard, …) – journals, 802 LAN Standard, …

• ISOISO: International Standards Organization : International Standards Organization ((www.iso.orgwww.iso.org) – OSI, …) – OSI, …

• NIST: National Institute of Standards and Technology NIST: National Institute of Standards and Technology ((www.nist.govwww.nist.gov) – DES, …) – DES, …

• IBM: International Business Machines IBM: International Business Machines ((www.ibm.comwww.ibm.com) – SNA, EBCDIC, …) – SNA, EBCDIC, …

Page 21: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

2121

O O pen Systems & the OSI pen Systems & the OSI ModelModel Open SystemOpen System: : A set of protocols that would allow any A set of protocols that would allow any

two different systems to communicate regardless of two different systems to communicate regardless of their underlying architecturetheir underlying architecture

The The Open System Interconnect (OSI)Open System Interconnect (OSI) Model: Model:

• Introduced by ISOIntroduced by ISO• Employs 7 layers, where each layer performs Employs 7 layers, where each layer performs

specific functions and communicate with the one specific functions and communicate with the one above and below itabove and below it

• Higher layers deal more with the user applications, Higher layers deal more with the user applications, services and activities services and activities

• Lower layers deal more with the actual transmission Lower layers deal more with the actual transmission of informationof information

• Advantages of layered modelAdvantages of layered model

Page 22: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

2222

O O pen System Interconnect pen System Interconnect (OSI)(OSI)

Page 23: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

2323

O O pen System Interconnect pen System Interconnect (OSI) (OSI) (continue...)(continue...)

Page 24: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

2424

O O verview of OSIverview of OSILayer 7: The Application LayerLayer 7: The Application Layer::

Interfaces directly with the user. At this layer:Interfaces directly with the user. At this layer:

• Communication partners are identifiedCommunication partners are identified

• Quality of service is identifiedQuality of service is identified

• User authentication and privacy are consideredUser authentication and privacy are considered

• This layer provides application services such as This layer provides application services such as file file transferstransfers & & e-maile-mail

• TelnetTelnet and and FTPFTP are examples of applications that are examples of applications that exist entirely in the application levelexist entirely in the application level

Page 25: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

2525

O O verview of OSIverview of OSILayer 6: The Presentation LayerLayer 6: The Presentation Layer::

• Responsible for presenting data in a format that the Responsible for presenting data in a format that the user can understanduser can understand

• Provides data encryption for security reasonsProvides data encryption for security reasons

• Sometimes, this layer is referred to as the Sometimes, this layer is referred to as the Syntax Syntax LayerLayer

Page 26: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

2626

O O verview of OSIverview of OSILayer 5: The Session LayerLayer 5: The Session Layer: :

• Allows applications on two different computers to Allows applications on two different computers to establish a establish a sessionsession, or in other words, a , or in other words, a logical logical connectionconnection

• A A sessionsession is established when the communication is established when the communication start and ended when the communication endsstart and ended when the communication ends

• This layer also handles This layer also handles errorerror recovery recovery

• The session layer allows the insertion of The session layer allows the insertion of checkpointscheckpoints in the middle of the stream in the middle of the stream

• This layer also bracketsThis layer also brackets ([…], perform it as ([…], perform it as atomicatomic))

Page 27: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

2727

O O verview of OSIverview of OSILayer 4: The Transport LayerLayer 4: The Transport Layer::

• Lowest layer that deals with end-to-end Lowest layer that deals with end-to-end communication; lower layers deal with the network communication; lower layers deal with the network itselfitself

• A computer may be connected to several networks; A computer may be connected to several networks; this layers determines which network to use for this layers determines which network to use for communication depending on many factorscommunication depending on many factors

• Ensures complete data transferEnsures complete data transfer

• Provides end-to-end Provides end-to-end error recoveryerror recovery, and , and flow flow controlcontrol

Page 28: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

2828

O O verview of OSIverview of OSI Layer 3: The Network LayerLayer 3: The Network Layer::

• Deals with Deals with routingrouting strategies strategies

• In specific, this layer controls the In specific, this layer controls the communication communication subnetsubnet (the collection of transmission media and (the collection of transmission media and switching elements over that media required for switching elements over that media required for routing and data transmission)routing and data transmission)

• Provides Provides congestion controlcongestion control

• May also contain billing and accounting routines – May also contain billing and accounting routines – information need to bill users based on their use of information need to bill users based on their use of the networkthe network

Page 29: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

2929

O O verview of OSIverview of OSILayer 2: The Data Link LayerLayer 2: The Data Link Layer: :

• Supervises the flow of information between adjacent Supervises the flow of information between adjacent network nodesnetwork nodes

• Uses Uses error detectionerror detection or or correctioncorrection techniques to ensure techniques to ensure that a transmission is error-freethat a transmission is error-free

• Controls how much information is sent at a time in order Controls how much information is sent at a time in order to avoid both congestion and long delaysto avoid both congestion and long delays

• The data link layer is divided into two sublayers: The The data link layer is divided into two sublayers: The Media Access ControlMedia Access Control ( (MACMAC) layer and the ) layer and the Logical Logical Link ControlLink Control ( (LLCLLC) layer. ) layer.

• The MAC sublayer controls how a computer on the The MAC sublayer controls how a computer on the network gains access to data and permission to transmit network gains access to data and permission to transmit data. data.

• The LLC layer controls flow control and error checking The LLC layer controls flow control and error checking

Page 30: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

3030

O O verview of OSIverview of OSI Layer 1: The Physical LayerLayer 1: The Physical Layer: :

• Transmits data bits over a networkTransmits data bits over a network

• Concerns with the physical, or electrical, aspects of Concerns with the physical, or electrical, aspects of data communication data communication

• For example, it concern with the communication For example, it concern with the communication medium. Is it copper cable, optical fiber, medium. Is it copper cable, optical fiber, satellite, ...etc.satellite, ...etc.

• Does Does notnot concern with the meaning of the data it concern with the meaning of the data it transmits; just receive the data from the data link transmits; just receive the data from the data link layer and deliver it to the data link layer without any layer and deliver it to the data link layer without any analysis of this dataanalysis of this data

Page 31: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

3131

O O verview of OSIverview of OSI

Layer Functions

7. Application User services such as e-mail, file transfer, ...

6. Presentation Translate data format, encrypt and decrypt data

5. Session Synchronize communicating users, error recovery, bracket operations

4. Transport Determine network, may assemble and reassemble packets

3. Network Determine routes, manages billing information

2. Data Link Detect or correct errors

1. Physical Transmits physical data

Brief Comparisons of the 7 LayersBrief Comparisons of the 7 Layers

Page 32: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

3232

C C onnection Strategiesonnection StrategiesComputers must be connected to communicate, Computers must be connected to communicate,

however however the traversal of information though the network is a the traversal of information though the network is a

design issuedesign issue

Figure 1.13 page 25Figure 1.13 page 25

Page 33: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

3333

C C onnection Strategies onnection Strategies (continue...)(continue...) There are 3 strategies:There are 3 strategies:

• Circuit SwitchingCircuit Switching

• Message SwitchingMessage Switching

• Packet SwitchingPacket Switching

Page 34: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

3434

C C onnection Strategies onnection Strategies (continue...)(continue...) Circuit Switching:Circuit Switching:

• Once a connection is made, it is maintained until Once a connection is made, it is maintained until the communication terminatesthe communication terminates

• In a telephone network, dialing the number makes In a telephone network, dialing the number makes the connectionthe connection

• In a computer system, the user enters appropriate In a computer system, the user enters appropriate commands to connect to a specified locationcommands to connect to a specified location

Figure 1.14 page 26Figure 1.14 page 26

Page 35: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

3535

C C onnection Strategies onnection Strategies (continue...)(continue...) Circuit Switching (continue):Circuit Switching (continue):

• Circuit switching requires that the route be Circuit switching requires that the route be determined and that the connection is made determined and that the connection is made before any information is transmittedbefore any information is transmitted

• The connection is then maintained until the The connection is then maintained until the communication terminatescommunication terminates

Page 36: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

3636

C C onnection Strategies onnection Strategies (continue...)(continue...) Message Switching:Message Switching:

• MessageMessage: unit of information: unit of information• A route is established when a message is to be sent A route is established when a message is to be sent • A sending node attach the message along with the destination address, A sending node attach the message along with the destination address,

chooses a route, then forwards it to the first node in that routechooses a route, then forwards it to the first node in that route• The message, in its entirety, is temporarily stored at that node, while The message, in its entirety, is temporarily stored at that node, while

logic is working the next node in the following possible route logic is working the next node in the following possible route • Once the following node is known the message is routed to itOnce the following node is known the message is routed to it• This is know as This is know as Store-and-ForwardStore-and-Forward

Figure 1.15 page 27Figure 1.15 page 27

Page 37: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

3737

C C onnection Strategies onnection Strategies (continue...)(continue...) Comparison between Circuit & Message SwitchingComparison between Circuit & Message Switching

Circuit SwitchingCircuit Switching Message SwitchingMessage SwitchingNo store-and-forward; No store-and-forward; intermediate nodes act as intermediate nodes act as switches switches

Connection must be established Connection must be established prior to communication prior to communication

Route is dedicated to the Route is dedicated to the connectionconnection

Store-and-forward; this results in Store-and-forward; this results in a delay which makes this strategy a delay which makes this strategy unsuitable for telephone networksunsuitable for telephone networks

No connections are needed prior No connections are needed prior to communication; messages are to communication; messages are sent and can be retrieved later onsent and can be retrieved later on

No route is dedicated; that is No route is dedicated; that is different communications can different communications can utilize the same route, which utilize the same route, which results in higher utilizationresults in higher utilization

Page 38: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

3838

C C onnection Strategies onnection Strategies (continue...)(continue...) Packet Switching:Packet Switching:

• A message is divided into smaller units, called A message is divided into smaller units, called packetspackets

• Each packet contains its destination address (or other indicators Each packet contains its destination address (or other indicators to where it should go)to where it should go)

• Packets are then sent, possibly through different routesPackets are then sent, possibly through different routes• At the destination, packets are reassembled to from the original At the destination, packets are reassembled to from the original

message message

Figure 1.16 page 28 (datagram in fact) Figure 1.16 page 28 (datagram in fact)

Page 39: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

3939

C C onnection Strategies onnection Strategies (continue...)(continue...) Packet Switching (continue):Packet Switching (continue):

• Similar to message switching, no connection is Similar to message switching, no connection is maintainedmaintained

• The small size of the packets reduces buffering The small size of the packets reduces buffering problems and long delaysproblems and long delays

• Packet switching has two common routing methods:Packet switching has two common routing methods: DatagramDatagram Virtual CircuitVirtual Circuit

Page 40: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

4040

L L ayers of the OSI Modelayers of the OSI Model Physical Layer:Physical Layer:

• Deals with the transmission media and how signals Deals with the transmission media and how signals are transmitted are transmitted

• Examples of transmission media include twisted Examples of transmission media include twisted pair, coaxial cable, optical fiber, microwave, pair, coaxial cable, optical fiber, microwave, satellite, infrared, radio waves satellite, infrared, radio waves

• The choice of the media depends on many factors The choice of the media depends on many factors including interference chances, digital or analog including interference chances, digital or analog signals, ..etc.signals, ..etc.

Page 41: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

4141

L L ayers of the OSI Modelayers of the OSI Model (continue...)(continue...)

Data Link Layer:Data Link Layer:• Makes sure that the physical layer works correctlyMakes sure that the physical layer works correctly

• Two nodes may try to send information over the same Two nodes may try to send information over the same link at the same time; this is referred to as link at the same time; this is referred to as ContentionContention

• Contention is handled by Contention is handled by Collision DetectionCollision Detection• Contention can be avoided by using Contention can be avoided by using Carrier Sense Carrier Sense

MultipleMultiple AccessAccess with with Collision Detection Collision Detection (CSMA/CD)(CSMA/CD)

• CSMA/CD avoids contention but does not eliminate itCSMA/CD avoids contention but does not eliminate it

Page 42: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

4242

L L ayers of the OSI Modelayers of the OSI Model (continue...)(continue...)

Data Link Layer Data Link Layer (continue):(continue):

• Token PassingToken Passing is another contention scheme that is another contention scheme that prevents collisionprevents collision

• A A tokentoken is a bit stream that traverses between nodes is a bit stream that traverses between nodes

• Token network often use token passing Token network often use token passing

• What happen if the token is lost?What happen if the token is lost?

• Token passing is not limited to token networks; any Token passing is not limited to token networks; any topology may number the nodes and pass the token topology may number the nodes and pass the token among these nodes in orderamong these nodes in order

Page 43: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

4343

L L ayers of the OSI Modelayers of the OSI Model (continue...)(continue...)

Data Link Layer Data Link Layer (continue):(continue):

• Data is sent over the physical link from one node and received Data is sent over the physical link from one node and received by another, however have they arrived correctlyby another, however have they arrived correctly

• The data link layer performs The data link layer performs error detectionerror detection and if errors are and if errors are detection then it performs detection then it performs error correctionerror correction

Figure 1.17 page 31

Page 44: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

4444

L L ayers of the OSI Modelayers of the OSI Model (continue...)(continue...)

Data Link Layer Data Link Layer (continue):(continue):• Parity BitParity Bit is one of the simplest methods for error is one of the simplest methods for error

detection detection • An additional bit is attached to each sequence of An additional bit is attached to each sequence of

data bitsdata bits• Even parityEven parity or or odd parityodd parity• What is the problem with Parity Bit technique? What is the problem with Parity Bit technique?

Figure 1.18 page 31

Page 45: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

4545

L L ayers of the OSI Modelayers of the OSI Model (continue...)(continue...) Network Layer:Network Layer:

• Contains algorithms to find out the best route (cost, Contains algorithms to find out the best route (cost, efficiency, ..) between two pointsefficiency, ..) between two points

• This is not usually an easy task since it needs to respond to This is not usually an easy task since it needs to respond to changing conditions changing conditions

• A good route may attract a lot of traffic, ending it in being A good route may attract a lot of traffic, ending it in being congestedcongested

• Detouring can be used in order to take a better route. Is that Detouring can be used in order to take a better route. Is that always good? always good?

Figure 1.19 page 32

Page 46: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

4646

L L ayers of the OSI Modelayers of the OSI Model (continue...)(continue...)

Transport Layer:Transport Layer:• This layer, and the three layers above it, provide user services This layer, and the three layers above it, provide user services • They execute at the sending and receiving nodes to ensure They execute at the sending and receiving nodes to ensure

information arrival at the destination as well as acknowledgment information arrival at the destination as well as acknowledgment to the sending nodeto the sending node

Figure 1.20 page 33

Page 47: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

4747

L L ayers of the OSI Modelayers of the OSI Model (continue...)(continue...) Transport Layer Transport Layer (continue):(continue):

• Provides reliable and efficient communication Provides reliable and efficient communication

• In practice, networks are unreliable; data can be lost or delayedIn practice, networks are unreliable; data can be lost or delayed

• This layer insulates the session layer from many details of the This layer insulates the session layer from many details of the networknetwork

• TCPTCP (Transport Control Protocol) is one of the most famous (Transport Control Protocol) is one of the most famous transport layer protocolstransport layer protocols

Page 48: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

4848

L L ayers of the OSI Modelayers of the OSI Model (continue...)(continue...) Transport Layer Transport Layer (continue):(continue):

• Transport functions include Transport functions include multiplexingmultiplexing, , bufferingbuffering and and connection management connection management

• MultiplexingMultiplexing: Several transport users share a single node; for : Several transport users share a single node; for example three users may connect to the same node (login, example three users may connect to the same node (login, download a file, and view a website)download a file, and view a website)

• The transport layer ensures that the proper data is routed to The transport layer ensures that the proper data is routed to the appropriate userthe appropriate user

Figure 1.21 page 34

Page 49: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

4949

L L ayers of the OSI Modelayers of the OSI Model (continue...)(continue...)

Transport Layer Transport Layer (continue):(continue):BufferingBuffering: it may occur at either the destination or the : it may occur at either the destination or the

sourcesource

• Data received from the session layer is broken into Data received from the session layer is broken into Transport Protocol Data Units (TPDUs)Transport Protocol Data Units (TPDUs)

Page 50: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

5050

L L ayers of the OSI Modelayers of the OSI Model (continue...)(continue...)

Transport Layer Transport Layer (continue):(continue):

Connection ManagementConnection Management: the protocol by which the transport : the protocol by which the transport establishes and releases connections establishes and releases connections

• Two-Way HandshakeTwo-Way Handshake may seem easy, but will it always work? may seem easy, but will it always work?

Figure 1.22 page 35

Page 51: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

5151

L L ayers of the OSI Modelayers of the OSI Model (continue...)(continue...)

Session LayerSession Layer::• Contains the protocols necessary for establishing and maintaining a connection, Contains the protocols necessary for establishing and maintaining a connection,

or or sessionsession, between end users, between end users• Well, then what did the transport layer do?!Well, then what did the transport layer do?!

Figure 1.23 page 36

Page 52: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

5252

L L ayers of the OSI Modelayers of the OSI Model (continue...)(continue...)

Session Layer Session Layer (continue):(continue): • NoteNote: do not interpret the figure as a form of multiplexing; a transport : do not interpret the figure as a form of multiplexing; a transport

connection serves only one session at a time. A second session can use connection serves only one session at a time. A second session can use the transport connection when the 1the transport connection when the 1stst one is finished one is finished

Figure 1.24 page 37

Page 53: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

5353

L L ayers of the OSI Modelayers of the OSI Model (continue...)(continue...)

Presentation LayerPresentation Layer::• Computers do not speak the same language; language here Computers do not speak the same language; language here

refers to the way refers to the way informationinformation is represented is represented

• There is a difference between There is a difference between datadata and information and information

• A problem exists because different computers may have A problem exists because different computers may have different ways to represent the same informationdifferent ways to represent the same information

• For example, integers may have different sizes (sometimes, For example, integers may have different sizes (sometimes, transformation is impossible), 2-D array can be stored based on transformation is impossible), 2-D array can be stored based on rows or columns, rows or columns,

• Thus, it is not enough to provide effective data communication; Thus, it is not enough to provide effective data communication; rather, effective communication of information is needed rather, effective communication of information is needed

• The presentation layer performs that taskThe presentation layer performs that task

• Data encryptionData encryption and and data compressiondata compression can also be performed can also be performed at this layerat this layer

Page 54: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

5454

L L ayers of the OSI Modelayers of the OSI Model (continue...)(continue...) Presentation Layer Presentation Layer (continue):(continue):

Figure 1.26 page 39

Figure 1.25 page 38

Page 55: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

5555

L L ayers of the OSI Modelayers of the OSI Model (continue...)(continue...)

Application LayerApplication Layer::• Communicates directly with user/user Communicates directly with user/user

applicationsapplications• Contains network applications, such as:Contains network applications, such as:

FTP, FTP, Telnet, ETelnet, EE-mail, E-mail, Virtual terminal,Virtual terminal, … …

Page 56: Communications, Standards & Protocols © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

5656

I I nternet Layersnternet Layers• The Internet has a The Internet has a

similar, not similar, not identical layers to identical layers to the ones of the OSI the ones of the OSI

• The lower 4 layers The lower 4 layers roughly correspond roughly correspond to the lower 4 to the lower 4 layers of OSIlayers of OSI

• Functionality of the Functionality of the highest 3 layers of highest 3 layers of OSI are either OSI are either omitted, or omitted, or incorporated in the incorporated in the 55thth layer of the layer of the InternetInternet

• Layer 4: TCP or Layer 4: TCP or UDPUDP

• Layer 5: HTTP, FTP, Layer 5: HTTP, FTP, ..etc..etc

Figure 1.29 page 43