Data Communication and Computer Networking Part # 2
1. jndqadar@gmail.comjndqadar@gmail.com
Packet Switching, Layer ModelsPacket Switching, Layer Models
and Protocol Suitesand Protocol Suites
JUNAID QADARJUNAID QADAR
MSC ELECTRONICSMSC ELECTRONICS
Department of ElectronicsDepartment of Electronics
UNIVERSITY OF PESHAWARUNIVERSITY OF PESHAWAR
2. 22
OutlineOutline
Packet vs. circuit switchingPacket vs. circuit switching
Layered tasksLayered tasks
Internet protocol suitesInternet protocol suites
ISO's OSI modelISO's OSI model
3. 33
Communication:Communication: App's ViewpointApp's Viewpoint
Two network applications interact as ifTwo network applications interact as if
there is a dedicate pipe connecting themthere is a dedicate pipe connecting them
But what's going on underneath?But what's going on underneath?
What is inside the "cloud"?What is inside the "cloud"?
InternetInternet
AA
AppApp
BB
AppApp
4. 55
Circuit vs. Packet SwitchingCircuit vs. Packet Switching
Dedicated circuitsDedicated circuits
Circuit switchingCircuit switching
Telephone switchesTelephone switches
establish circuitsestablish circuits
for communicationfor communication
Packet switchingPacket switching
Data are put intoData are put into
packetspackets
Each stamped withEach stamped with
sourcesource andand destinationdestination
addressesaddresses
RoutersRouters know where toknow where to
forward packetsforward packets
telephone
switch
RouterPacket
5. 66
Layered TasksLayered Tasks
Computer networks are complex systemsComputer networks are complex systems
Tasks involve varieties of hardware andTasks involve varieties of hardware and
software components, and protocolssoftware components, and protocols
Networking task is divided into severalNetworking task is divided into several
subtasks, or layerssubtasks, or layers
6. 77
Real World ExampleReal World Example
Communication between managers of twoCommunication between managers of two
companiescompanies
Communicate
7. 88
What Actually HappensWhat Actually Happens
Communication takes place thru many layersCommunication takes place thru many layers
Logical communication
Secretary:
types a letter
Delivery boy:
drops the letter
Secretary:
reads and reports
the message
Delivery boy:
takes the letter
Post office:
Processes and routes the letter
Postal truck
8. 1111
Internet Layer ModelInternet Layer Model
The Internet Protocol StackThe Internet Protocol Stack
Application LayerApplication Layer
Transport LayerTransport Layer
Network LayerNetwork Layer
Data Link LayerData Link Layer
Physical LayerPhysical Layer
User
Transmission
Medium
Hardware
Software
9. 1212
Application LayerApplication Layer
The only layer to interact with userThe only layer to interact with user
Responsible for providing services to the userResponsible for providing services to the userResponsible for providing services to the userResponsible for providing services to the user
SMTP HTTP FTP SMTP HTTP FTP
Data
Data H5
Application
Layer
to Transport from Transport
Data H5
Data
Logical communication
10. 1313
Transport LayerTransport Layer
Duties/servicesDuties/services
Port addressingPort addressing
Segmentation and reassemblySegmentation and reassembly
Connection controlConnection control
Flow control (end-to-end)Flow control (end-to-end)
Error control (end-to-end)Error control (end-to-end)
Responsible for delivery of a messageResponsible for delivery of a message
from one process to anotherfrom one process to another
Responsible for delivery of a messageResponsible for delivery of a message
from one process to anotherfrom one process to another
12. 1515
Network LayerNetwork Layer
Duties/servicesDuties/services
Logical addressingLogical addressing
RoutingRouting
Responsible for the delivery of packetsResponsible for the delivery of packets
from the original source to the destinationfrom the original source to the destination
Responsible for the delivery of packetsResponsible for the delivery of packets
from the original source to the destinationfrom the original source to the destination
15. 1818
Data Link LayerData Link Layer
Duties/servicesDuties/services
FramingFraming
Physical addressingPhysical addressing
Flow control (hop-to-hop)Flow control (hop-to-hop)
Error control (hop-to-hop)Error control (hop-to-hop)
Access controlAccess control
Responsible for transmitting framesResponsible for transmitting frames
from one node to the nextfrom one node to the next
Responsible for transmitting framesResponsible for transmitting frames
from one node to the nextfrom one node to the next
16. 1919
Data Link LayerData Link Layer
Data Link
Layer
Data
from Network
to Physical
Data
to Network
from Physical
Data H2 Data H2
(frame)
T2 T2
17. 2020
Data Link LayerData Link Layer
3B
A3, 3B, 82, 9F, ... are physical addressesA3, 3B, 82, 9F, ... are physical addresses
9F 82 A3
Data 9FT2 A3
Data
H2
18. 2121
Data Link LayerData Link Layer
Network 1
Network 6
Network 5
1.1 1.2
6.6
B1
6.3
5.7
5.2
Network 3
3.8
3.3
Data 1.15.7
97 32
25
79
62
54
74
12
88
Data 1.15.7 2597
Data 1.15.7 6279
Data 1.15.7 7454
R1
R3
R2
19. 2222
Physical LayerPhysical Layer
Duties/servicesDuties/services
Physical characteristics of interfacesPhysical characteristics of interfaces
and mediaand media
Representation of bitsRepresentation of bits
Data rate (transmission rate)Data rate (transmission rate)
Synchronization of bitsSynchronization of bits
Responsible for transmitting individual bitsResponsible for transmitting individual bits
from one node to the nextfrom one node to the next
Responsible for transmitting individual bitsResponsible for transmitting individual bits
from one node to the nextfrom one node to the next
21. 2424
The Big PictureThe Big Picture
L5 data H5
L4 data H4
L3 data H3
L2 dataT2 H2
0111011010101001010101001
L5 data H5
L4 data H4
L3 data H3
L2 dataT2 H2
0111010101010010101010101
5
4
3
2
1
5
4
3
2
1
Transmission medium
23. 262626
Protocol SuitesProtocol Suites
A set of protocols must be constructedA set of protocols must be constructed
to ensure that the resulting communicationto ensure that the resulting communication
system issystem is completecomplete andand efficientefficient
Each protocol should handle a part ofEach protocol should handle a part of
communication not handled by othercommunication not handled by other
protocolsprotocols
How can we guarantee that protocolsHow can we guarantee that protocols
work well together?work well together?
Instead of creating each protocol in isolation,Instead of creating each protocol in isolation,
protocols are designed in complete,protocols are designed in complete,
cooperative sets calledcooperative sets called suitessuites oror familiesfamilies
25. 2828
OSI ModelOSI Model
OSI –OSI – OOpenpen SSystemsystems
IInterconnectionnterconnection
Developed by theDeveloped by the IInternationalnternational
SStandardstandards OOrganizationsrganizations
(ISO)(ISO)
Two additional layersTwo additional layers
Presentation layerPresentation layer
Session layerSession layer
7.Application Layer7.Application Layer
6.Presentation Layer6.Presentation Layer
5.Session Layer5.Session Layer
4.Transport Layer4.Transport Layer
3.Network Layer3.Network Layer
2.Data Link Layer2.Data Link Layer
1.Physical Layer1.Physical Layer
User
Transmission
Medium
26. 2929
Session LayerSession Layer
Duties/servicesDuties/services
Interaction managementInteraction management
Simplex, half-duplex, full-duplexSimplex, half-duplex, full-duplex
Session recoverySession recovery
Responsible for establishing, managing andResponsible for establishing, managing and
terminating connections between applicationsterminating connections between applications
Responsible for establishing, managing andResponsible for establishing, managing and
terminating connections between applicationsterminating connections between applications
27. 3030
Presentation LayerPresentation Layer
Duties/servicesDuties/services
Data translationData translation
EncryptionEncryption
DecryptionDecryption
CompressionCompression
Responsible for handling differences inResponsible for handling differences in
data representation to applicationsdata representation to applications
Responsible for handling differences inResponsible for handling differences in
data representation to applicationsdata representation to applications