Data Comm Jul18
Data Comm Jul18
Ashish Kuvelkar
Hardware Technology Development Group
C-DAC, Pune
© 2017, HTDG,C-DAC 1
Why we are studying this?
• Data communication is a vital need for computing
elements
• Computing elements are diversified in design
resulting in heterogeneous platforms
– Protocol stacks perform important tasks of binding
them together
• Networking standards help in interoperability
© 2012, HTDG,C-DAC 2
What will be covered
• Topologies
• Network Architecture
– OSI Model
• Physical layer protocols
• Data link layer protocols
– LAN
– WAN
• TCP/IP Suite
© 2012, HTDG,C-DAC 3
Prerequisites
• Knowledge of
– Data communication basics
– Serial transmissions
– Programming in C
© 2012, HTDG,C-DAC 5
Introduction
• What is Data Communication
– electronic transmission of information that has
been encoded digitally
– It concerns the transmission of digital messages to
devices external to the message source.
• A communications channel is a pathway over which
information can be conveyed.
• It may be defined by a physical wire that connects
communicating devices,
– or by a radio, laser, or other radiated energy
source
© 2012, HTDG,C-DAC 6
Introduction
• As a rule, the maximum permissible transmission rate
of a message is
– directly proportional to signal power
– inversely proportional to channel noise.
• The aim of any communications system is
– to provide the highest possible transmission rate
– at the lowest possible power
– with the least possible noise.
© 2012, HTDG,C-DAC 7
A brief History
Generation Time Application Technology
Frame
Emergence Through Voice Circuit switched PSTN
70’s over copper wire
Data Serial link over copper,
Modem
Entertainment Broadcast RF
© 2012, HTDG,C-DAC 8
A brief History
Generation Time Frame Application Technology
Convergence Through 90’s Web, Fast packet switching
Multimedia over fiber,
IP based global internet,
Switched satellite
network
Internet 2000+ Mobile, Wireless access network
Ubiquitous All optical network
Widely deployed
Transoceanic FO cable
© 2012, HTDG,C-DAC 9
Pervasive Computing Pyramid
Server
Store & Process
Information
Workstation
Edit & Manage
Information
Devices
Create & Access
Information
© 2012, HTDG,C-DAC 11
Few Examples
• Stand alone embedded systems
– Digital watch
– Calculator
– Digital Thermometer
• Enhancing feature of Stand alone systems
– Home Security system
– LCD projector
– Digital Diary
• Adding embedded system to a communicating device
– Caller ID phone
– Manageable Ethernet Switch
© 2012, HTDG,C-DAC 12
Few Examples (contd.)
• Embedded system with an inherent link
– USB Thumb drive
– Printer
– Digital Camera
– PDA
• Systems that connect to multiple communication links
– Mobile Phone
– USB to RS-232 converter
– Ethernet to Wireless Router
– GPS
© 2012, HTDG,C-DAC 13
Types of links
• Wired
• Wireless
• Special Purpose
© 2012, HTDG,C-DAC 14
Types of links
• Wired
– Point to Point, low speed, short distance
• RS-232
• RS-422
– High speed, Medium distance (LAN)
• Ethernet
• ATM
– Point to Point, Low speed, Large Distance(WAN)
• X.25, Frame relay
• DSL, ADSL
© 2012, HTDG,C-DAC 15
Types of links (contd)
• Wireless
– Short distance
• IrDA, Bluetooth
– Medium Distance
• Wireless Ethernet
– Long Distance
• Microwave, VSAT
• Special purpose
– CAN for automobile and industrial application
– IEEE-488 instrumentation bus
© 2012, HTDG,C-DAC 16
Communication
• Similarity between People-People communication
and Computer-Computer communication
• Types of communications
– One to one
• Private
• Public
– One to many
– Many to one
– Many to Many
© 2012, HTDG,C-DAC 17
Attributes
• Understanding
– Language
– Speed/Accent
– Error correction
• Privacy
• Medium
© 2012, HTDG,C-DAC 18
Computer Communication
• Only one can talk, many can listen
• Many talking can be a transient phase
• Arbitration authority
• Understanding
– Protocols
– Data Rates/Interfaces
– CRCs and checksums
• Privacy
– Encryption,Tunneling
• Distance, speed and media are related
• Standards
© 2012, HTDG,C-DAC 19
Building a Computer Network
• What is a Network
– Set of serial lines to attach terminals to Mainframe?
– Telephone Network?
– Cable TV Network?
• How is computer network different?
– Generality
• Carry different types of data
• Ever growing range of applications
© 2012, HTDG,C-DAC 20
Fundamental Characteristics
• Delivery
– Data should be delivered to correct destination
– Data should be received only by the intended
device or user
• Accuracy
– Data should be delivered accurately
– Data altered during communication become
unusable for the receiver
© 2012, HTDG,C-DAC 21
Fundamental Characteristics
• Timelessness
– Data should be delivered in timely manner
– Data delivered late, may be useless
• Jitter
– Jitter is variation is packet arrival time
– Uneven delays affect isochroous type of traffic
© 2012, HTDG,C-DAC 22
Requirements
• Expectations from network depend on perspective
– Application Programmer
• Services, application would need
– Guaranteed delivery of message in time
– Network designer
• Cost effective components
• Efficient usage of network resources
– Network provider
• Easy to administer and manage
• Accounting
© 2012, HTDG,C-DAC 23
Driver and Constraints
• Applications are the whole point of doing networking
Ideal Network
Host A Host B
Network
Application Application
Bandwidth
=
Delay = 0
© 2012, HTDG,C-DAC 24
Limiting Constraints
• Real world constraints make it difficult to provide high
performance paths to applications
– Speed of light
– Channel capacity
– Switching speed
– Cost and feasibility
– Heterogeneity
– Policy and administration
© 2012, HTDG,C-DAC 25
Connectivity
• Private network
– Limited network that connects selected machines
– For reasons of privacy and security
• Public networks
– Designed to grow in way, that they have potential
to connect all computers in the world (scale)
• Links
– Connect two or more nodes
– Point-to-point or multiple access (topology)
© 2012, HTDG,C-DAC 27
Topology
• It is the shape or physical connectivity of the network.
• Goals when establishing topology
– Provide maximum possible reliability to assure
proper receipt of all traffic
– Route the traffic across the least cost path within
the network.
– Give the end user the best possible response time
and throughput
• Each topology has advantages & disadvantages
© 2012, HTDG,C-DAC 28
Types of Topologies
• Star
– Easy to install
– Central element, a hub or a switch
– Localisation of problem
– Hub is the weakest element
• Bus
– Easy to expand, shorter cables
– Single conversation, all station can
hear every transmission
– Bus is the weakest element
© 2012, HTDG,C-DAC 29
Types of Topologies
• Ring
– Deterministic
– Dual path, redundant
– Poor scalability
• Line
– Open ring
• Tree
– Mesh network with no redundancy
– Provides a concentration point for control
and error resolution and potential
bottleneck
© 2012, HTDG,C-DAC 30
Types of Topologies
• Mesh
– Multiple paths are available
– Reconfiguration possible
– Multiple hops
– Wiring complicated
• Fully connected network
– Extended mesh network
– Fast, no hops
– Poor scalability
© 2012, HTDG,C-DAC 31
Circuit Switched
– A circuit is a defined path between two endpoints.
– A dedicated physical path is established through
the network and is held for as long as
communication is necessary.
– Circuit switched networks are stateful and can be
described in terms of endpoints and a path.
– Data travels over the circuit and arrives in
sequence.
– Normally used by telephone systems
© 2012, HTDG,C-DAC 33
Packet switched
– Packet switched networks are stateless.
– They have endpoints, but the path varies for
individual packets based on conditions.
– Data moves in small blocks called packet
– Each packet has destination address
– When received, message is assembled in order
– Usually “store and forward” strategy is used
© 2012, HTDG,C-DAC 34
Network Architecture
• Requirements
– Cost-effective, fair, robust, high-performance
connectivity
– Evolve to accommodate changes
• Layering
– When system becomes complex, level of
abstraction are introduced
– The services provided at higher layer are
implemented in terms of services provided by
lower layer
© 2012, HTDG,C-DAC 35
Layering
Application Programs
Application Programs
Process-Process channel
Host-host Connectivity
Hardware
Hardware
Request-reply Message
Process - Process
channel Channel
stream channel
Host-host Connectivity
Hardware
© 2012, HTDG,C-DAC 38
Service and Peer interface
Host 1 Host 2
Protocol Protocol
Peer
Interface
© 2012, HTDG,C-DAC 39
Peer Interfaces
• Except for hardware level, peer-peer communication
is indirect, through lower level
• The suite of protocols that make up a network system
is represented using protocol graphs
– Nodes correspond to protocols
– Edges correspond to “depend on” relation
• “Protocol” is used in two ways
– Abstract interface (aka. Protocol specification)
• Service and peer interface
– Module that implements these two interfaces
© 2012, HTDG,C-DAC 40
Protocol
• A protocol defines what is communicated, how it is
communicated and when it is communicated
• Syntax – Format or structure of data and order in
which it is presented
• Semantics – meaning of each section of bits. How
they are to be interpreted and what action is to be
taken
• Timing – When to send responses,
acknowledgements etc.
© 2012, HTDG,C-DAC 41
Protocol Graph
Host 1 Host 2
File Video File Video
Application Application Application Application
HHP HHP
© 2012, HTDG,C-DAC 42
Encapsulation
• Message coming from an upper layer is treated as a
string of bytes
• A layer has responsibility of delivering it to its peer
• So a header is attached to the message before it is
passed on to the lower layer
– Small data structure, few byte to few dozen bytes
– Communicates control information to the peer
• Encapsulation is repeated at every layer of graph
• At destination the corresponding header are stripped
and the payload is passed to upper layer
© 2012, HTDG,C-DAC 43
Encapsulation
Host 1 Host 2
Application Application
Program Program
Data Data
RRP RRP
RRP Data RRP Data
HHP HHP
© 2012, HTDG,C-DAC 44
Protocol Graph
TCP UDP
IP
© 2012, HTDG,C-DAC 45
Performance
• Measured in two fundamental ways
– Bandwidth( also called throughput)
– Latency (also called delay)
• Bandwidth – number of bits that can be transmitted
over the network in certain period of time
– Ethernet : 10 million bits in a second
0.1 usec to transmit a bit
• Latency – how long it takes for a message to travel
from one end of network to the other
• In some situations, Round Trip Time is important
© 2012, HTDG,C-DAC 50
Performance (contd.)
• Latency has three components
– Speed-of-light propagation delay
– Time required to transmit a bit of data
• Network bandwidth and packet size
– Queuing delay
Latency = Propagation + Transmit + Queue
Transmit = size/bandwidth
© 2012, HTDG,C-DAC 51
Performance (contd.)
• Bandwidth and latency combine to define
performance characteristics of a given link of channel
• Their relative importance depends on application
– Client that sends 1 byte message and gets 1 byte
reply is latency bound
– A client that requests 25MB image is bandwidth
bound
© 2012, HTDG,C-DAC 52
OSI Architecture
© 2012, HTDG,C-DAC 53
Standards Organizations
International
Telecommunications
Union (ITU)
International Standards
Organization (ISO) CCITT
© 2012, HTDG,C-DAC 54
OSI Model
• OSI model is a seven layer standard
© 2012, HTDG,C-DAC 55
Open System Interconnection
• The idea is to provide a modular framework, allowing
diverse entities to communicate with each other
• A buggy implementation of a layer can be changed
without changing other layers since interfaces are
well-defined
• There were already quite a few implementations
before the OSI model was proposed
• All implementations follow the layered model, but the
layer-boundaries are fuzzy, sometimes even merging
layers
© 2012, HTDG,C-DAC 57
OSI Physical Layer
• Concerned with transmission of unstructured bit
stream over physical medium
– How many volts for 0, how many for 1?
– Number of bits of second to be transmitted.
– Synchronization of bits
– Standardized protocol dealing with electrical,
mechanical and signaling interfaces.
• Line configuration
© 2012, HTDG,C-DAC 59
OSI Physical Layer
• Physical Topology
• Transmission mode
– Simplex
– Half Duplex
– Full Duplex
© 2012, HTDG,C-DAC 60
OSI Data link Layer
• Provides for the reliable transfer of information across
the physical link
– Makes Physical layer appear error free to upper
layers
• Consists of two sub-layers:
– Logical Link Control (LLC) defines how data is
transferred over the cable and provides data link
service to the higher layers.
– Medium Access Control (MAC) defines who can
use the network when multiple computers are
trying to access it simultaneously (i.e. Token
passing, Ethernet [CSMA/CD]).
© 2012, HTDG,C-DAC 62
Responsibilities of Data Link Layer
• Framing – Bits arrived from Physical layer are
grouped together into frames
• Physical Addressing – Headers identify source and
destination of the frames
• Flow Control – Comes into effect when receiver is
unable to cope up with rates of the sender
• Error Control – Mechanisms for detection of errors
and re-transmission
• Access Control – To find the ‘right’ time to send data
© 2012, HTDG,C-DAC 63
OSI Network Layer
• Concerned with the transmission of packets.
• Responsible for
– establishing,
– maintaining, and
– terminating connections
© 2012, HTDG,C-DAC 65
Responsibilities of Network Layer
• Logical addressing
– Comes handy when packets cross local network
boundaries
– Contained in the header of Network Layer
• Routing
– Delivery of data from source to destination
– Choosing the best path at given point of time
© 2012, HTDG,C-DAC 66
OSI Transport Layer
• Transport is responsible for
– creating and
– maintaining the
basic end-to-end connection between communicating
open systems,
• It ensures that
– the bits delivered to the receiver are the same
– as the bits transmitted by the sender;
– in the same order
– without modification, loss or duplication
© 2012, HTDG,C-DAC 68
OSI Transport Layer
• Transport Layer protocols include the capability to
acknowledge the receipt of a packet; if no
acknowledgement is received, the Transport Layer
protocol can retransmit the packet or time-out the
connection and signal an error
• Transport protocols can also mark packets with
sequencing information so that the destination
system can properly order the packets if they’re
received out-of-sequence
© 2012, HTDG,C-DAC 69
Responsibilities of Transport Layer
• Service-point addressing – process to process
communication running on a pair of computers
• Segmentation and Reassembly - information to be
sent is broken into individual packets that are sent
and reassembled into a complete message by the
Transport Layer at the receiving node
• Connection control – connection less or connection
oriented
• Flow Control – End to end flow control
• Error Control – process to process error control
© 2012, HTDG,C-DAC 70
OSI Transport Layer
• Example: TCP/IP
– Defines two standard transport protocols: TCP
and UDP
– TCP implements a reliable data-stream protocol
• connection oriented
– UDP implements an unreliable data-stream
• connectionless
© 2012, HTDG,C-DAC 71
OSI Session Layer
• Provides the control structure for communication
between applications
• Establishes, manages, and terminates connections
(sessions) between cooperating applications
• Not found in TCP/IP model
• In TCP/IP,its characteristics are provided by the TCP
protocol. (Transport Layer)
© 2012, HTDG,C-DAC 73
OSI Presentation Layer
• Provides independence to the application processes
from differences in data representation (syntax)
• Handles data format information for networked
communications. This is done by converting data into
a generic format that could be understood by both
sides.
• Not found in TCP/IP model
• In TCP/IP, this function is provided by the Application
Layer.
e.g. Multipurpose Internet Mail Extensions (MIME)
© 2012, HTDG,C-DAC 75
Responsibilities of Presentation Layer
• Translation
– Interoperability between different encoding
schemes between communicating systems. Like,
conversion of an EBCDIC-coded text file to an
ASCII-coded file.
• Encryption
– sensitive information is encrypted before sending
and decrypted by the receiver
• Compression
– Compression is used to conserve limited
bandwidth, useful for multimedia transmissions
© 2012, HTDG,C-DAC 76
OSI Application Layer
• It is the top layer of the reference model.
• It provides a set of interfaces for applications to
obtain access to networked services as well as
access to the kinds of network services that support
applications directly.
• Examples
TCP/IP - FTP,SMTP,TELNET,DNS,SNMP
© 2012, HTDG,C-DAC 78
TCP/IP Architecture Dominance
• TCP/IP protocols matured quicker than similar OSI
protocols
– When the need for interoperability across
networks was recognized, only TCP/IP was
available and ready to go
• OSI model is unnecessarily complex
– Accomplishes in seven layers what TCP/IP does
with fewer layers
© 2012, HTDG,C-DAC 79
OSI Architecture
© 2012, HTDG,C-DAC 80
Physical Layer
© 2012, HTDG,C-DAC 81
Data Encoding Techniques
• Binary data needs to be encoded before it can be
sent over the link
• 1 and 0 correspond to
– Two different voltage levels on copper link
– Different power levels on optical link
• Encoding is handled by signaling component on NIC
• Encoding schemes
– NRZ
– NRZI
– Manchester
– 4B/5B
© 2012, HTDG,C-DAC 82
Encoding strategies
Bits 0 0 1 0 1 1 1 1 0 1 0 0 0 0 1 0
NRZ
NRZI
Clock
Manch-
ester
© 2012, HTDG,C-DAC 83
NRZ
• Obvious thing to do
– Map ‘low’ level to 0
– Map ‘high’ level to 1
• Problem
– Consecutive 1s means signal stays high for long
– Receiver and sender clocks are not precisely
synchronised
– Clock recovery at receiver becomes difficult
© 2012, HTDG,C-DAC 84
NRZI
• Transition from current signal level to encode ‘1’
• Stay at current level to encode ‘0’
• This solves the problem of consecutive 1s but does
nothing for consecutive 0s
© 2012, HTDG,C-DAC 85
Manchester
• Clock is merged with signal
• Transmits EXOR of clock with NRZ data
• Encoding
– ‘0’ as low to high transition
– ‘1’ as high to low transition
• Clock can be very easily recovered at receiver
• But it doubles the signal transitions
– Encoding efficiency becomes 50%
© 2012, HTDG,C-DAC 86
4B/5B
• Attempts to address inefficiency of Manchester
encoding without suffering from the problem of
having extended duration of high or low signals
• Idea is to insert extra bits into bit streams to break
long sequence of 0s or 1s
• 4 bits of data is encoded into 5 bit code
• 5 bits codes are so selected that each has no more
than one leading and two trailing 0s, resulting in not
more than three consecutive 0’s
• Resulting codes are transmitted using NRZI
• Efficiency is 80%
© 2012, HTDG,C-DAC 87
4B/5B codes
© 2012, HTDG,C-DAC 88
Data Link Layer
© 2012, HTDG,C-DAC 89
IEEE 802
• IEEE 802 refers to a family of IEEE standards dealing
with LANs and MANs
• IEEE 802 standards deal with networks carrying
variable-size packets.
• The number 802 was simply the next free number
IEEE could assign
– 802 is sometimes associated with the date the first
meeting was held — February 1980.
• The services and protocols specified in IEEE 802
map to the lower two layers - Data Link and Physical
– IEEE 802 splits the OSI Data Link Layer into two
sub-layers named Logical Link Control (LLC) and
Media Access Control (MAC)
© 2012, HTDG,C-DAC 90
Some members of 802 family
Name Protocol
IEEE 802.1 Bridging and Network Management
IEEE 802.2 Logical link control
IEEE 802.3 Ethernet
IEEE 802.4 Token bus
IEEE 802.5 MAC layer for a Token Ring
IEEE 802.6 Metropolitan Area Networks
IEEE 802.15 Wireless PAN
IEEE 802.15.1 Bluetooth
IEEE 802.15.4 ZigBee
IEEE 802.16 Broadband Wireless Access (WiMAX )
© 2012, HTDG,C-DAC 91
Ethernet
© 2012, HTDG,C-DAC 92
A Brief History
• In late 1972, Robert Metcalfe and his Xerox PARC
colleagues developed the first experimental Ethernet
system.
• The network was called Alto Aloha Network.
• The experimental Ethernet was used to link Altos to
one another, and to servers and laser printers.
• Data transmission rate on the experimental Ethernet
was 2.94 Mbps.
• In 1973 Metcalfe changed the name to "Ethernet," to
make it clear that the system could support any
computer.
© 2012, HTDG,C-DAC 93
Ethernet Sketch by Bob
© 2012, HTDG,C-DAC 94
Ethernet standards over years
Standard Year Description
© 2012, HTDG,C-DAC 98
802.3 Layers ( For 100 Mbps )
Application Logical Link Control
Presentation Media Access Control
Session
Transport
Network Phy
Data Link
Physical
MII: Media Independent Interface PCS: Physical Coding Sublayer
PMA: Physical Medium Attachment PMD: Physical Medium Dependent