Overview of Computer Networks Course
Overview of Computer Networks Course
Computer Network
(CSE 3034)
Syllabus :
Introduction(Chapter 1)
The Physical Layer(Chapter 2)
The Data Link Layer(Chapter 3)
The Medium Access Control Sublayer(Chapter 4)
The Network Layer(Chapter 5)
The Transport layer(Chapter 6)
The Application layer(Chapter 7)
Network security(Chapter 8)
S‘O’A ITER
Introduction
What is Computer Network? S‘O’A ITER
Computer Network :
Formed by merging of computers and communication technology.
• Business Applications
• Home Applications
• Mobile Users
• Social Issues
S‘O’A ITER
Uses of Computer Network (cont.)
Business Applications
Goals of Networks in this application :
Resource sharing : Programs, equipment, and especially data available to anyone on the network
without regard to the physical location of the resource and the user
Client :
Simpler computer systems used by employees
of an organization/company/individual being
A network with two clients and one server connected to the same network.
S‘O’A ITER
Uses of Computer Network (cont.)
Business Applications
Communication in client – server model :
Client process : Sending message over the network to server & waits reply from server
Server process : Performs the requested work or looks up the requested data and sends back a reply to client.
S‘O’A ITER
Uses of Computer Network (cont.)
Home Applications
• Video conferencing/chating
• Instant Messaging (Whats app,Twitter)
• Telelearning
• Social Networking:
• Facebook
Person - to – person communication often goes by the name of peer - to - peer communication
S‘O’A ITER
Uses of Computer Network (cont.)
Home Applications
Example :
BitTorrent
Sharing Music and Videos (Napster)
Email, etc.
There is no generally accepted taxonomy into which all computer networks fit, but
two dimensions stand out as important: transmission technology and scale.
Multicast transmission
Network Hardware (cont.) S‘O’A ITER
Point to point network
Unicast transmission
Network Hardware (cont.) S‘O’A ITER
Classification of network based on size of the network:
Computer networks are also
classified based on the size, no. of
machines and distance among
machines of a network.
Categorized as static or dynamic based on the channel allocation strategy among the users wants to
transmit their data.
Static :
Uses a round-robin algorithm (i.e. each machine is allowed to broadcast only when its time slot comes up)
Wastage of channel capacity (a drawback)
Dynamic :
Centralized (a bus arbitration unit used to determine who goes next)
Decentralized (each machine must decide for itself whether to transmit)
Network Hardware (cont.) S‘O’A ITER
Metropolitan Area Network (MAN)
Covers a city
Ex : Cable television network
( Initially for TV signal transmission,
currently for internet along with TV
transmission)
Concept : A large antenna was placed
on top of a nearby hill or big building
and then signal is piped to the
subscribers' houses.
A metropolitan area network based on cable TV
Network Hardware (cont.) S‘O’A ITER
Wide Area Network (WAN)
Spans a large geographical area, often a country or continent.
Establish communication link between two machines (say host computers) belonging to two
different networks.
Major constituents of such a network
Host : Owned by customers
Communication subnet : Owned by the network service providers
High bandwidth wireless MANs are also being available in certain cities. A standard for it, called IEEE
802.16, has also been developed.
Note : Almost all wireless networks hook up to the wired network at some point to provide the
internet service.
Network Hardware (cont.) S‘O’A ITER
Home network
Properly not categorized as a form of computer network.
Smart home and IoT (a possibility).
Requires smart devices that are capable to communicate with each other and (or) access internet.
Home networking has some fundamentally different properties than other network types.
The network software structure plays an important role in the operation of the
network.
• Protocol hierarchies
• Design issues for the layers
• Connection-oriented versus connectionless service
• Service primitives
• Relationship of services to protocols
Network Software S‘O’A ITER
Protocol Hierarchies
A stack of layers or levels, each one built upon the one below it.
Number of layers, the name of each layer, the contents of each layer, and the
function of each layer differ from network to network.
Lower layer provides service to higher layers.
interaction/conversation between n layer of a machine with n layer of another
machine carried following a set of rules and convention (normally known as
protocol).
Network Software (cont.) S‘O’A ITER
Protocol Hierarchies
Protocol – An agreement between the communicating parties on how communication is to
proceed.
Peers – Entities comprising corresponding layers on different machines (e.g. hardware devices).
No data is directly transferred from layer n on one machine to layer n on another machine.
• Each Layer passed data and control information to the layer immediately below it until the
lowest layer is reached.
• Below layer 1 is the physical medium through which actual communication occurs.
Peer
Virtual Communication
Physical Communication
Network Architecture:
• A set of layers and protocols.
• The specification of the network architecture must contain enough information to
allow an implementation of the program or the hardware for each layer so that it will
obey appropriately the protocol.
Protocol Stack:
• The list of protocols used by a certain system – one protocol per layer.
Network Software (cont.) S‘O’A ITER
An analogy example: Protocol Hierarchies
Layer3 :
Two philosophers having no common language want to
communicate with each other.
Layer2:
Each philosophers engages a translator.
Layer1:
Each translator takes the help of a secretary to transmit
the message using the medium (e.g. Fax ).
Layers can offer two different types of service to the layers above them.
• Connection-oriented
• Connectionless
Reliability :
• Accompanies an acknowledgement from the receiver to the sender after reception ensuring
the information transmitted has not been lost.
• In certain cases the unreliable service is also acceptable since acknowledgment introduces
overhead and delays.
Network Software (cont.) S‘O’A ITER
Connection-Oriented Service
Modeled after telephone system: Pickup-the-phone, Dial the number, Talk, Hang-up
In connection oriented service
• Establishes a connection,
• Uses a connection (sender pushes objects in at one end and the receiver takes them out at the
other end).
• Releases the connection
• In some cases when connection is established, the sender, receiver, and a subnet conduct a
negotiation about the parameters to be used:
Maximum message size,
• Each one is routed through the intermediate nodes inside the system independent of all the
subsequent messages.
• Possibility of arrival of second message prior to first message at the receiving end.
First, the server executes LISTEN to indicate that it is prepared to accept incoming
connections. After executing the primitive, the server process is blocked until a request for
connection appears.
Next, the client process executes CONNECT to establish a connection with the server. The
client process is suspended until there is a response.
The next step is for the server to execute RECEIVE to prepare to accept the first request.
Then the client executes SEND to transmit its request followed by the execution of RECEIVE
to get the reply.
After receiving the reply from server, If the client has additional requests, it can make them
now. If it is done, it can use DISCONNECT to terminate the connection.
Network Software (cont.) S‘O’A ITER
Service primitives
If the protocol stack is located in the operating system, the primitives are normally system calls.
4. The server will execute RECEIVE to prepare to accept the first request.
• Server does this immediately upon being released from the LISTEN, before
acknowledgment can get back to the client.
• The RECEIVE is a blocking call.
5. The client will execute SEND to transmit its request (3) followed by RECEIVE to
get the reply.
• The arrival of the request packet at the Server unblocks it so it can handle the
request.
• After the server has done the work it will issue a SEND to return the answer to the
client (4).
• The arrival of the this packet unblocks the client which can now inspect the answer.
• If further request are required it can make them now.
Network Software (cont.) S‘O’A ITER
Service primitives
6. When the client is done it executed DISCONNECT to terminate the connection (5).
• Initial DICONNECT is a blocking call, suspending the client and sending a packet to the server
saying that the connection is no longer needed.
• When the server gets the packet it also issues a DISCONNECT of its own, acknowledging the
client and releasing the connection (6).
• When the server’s packet gets back to the client machine, the client process is released and
the connection is broken.
Network Software (cont.) S‘O’A ITER
Service primitives
Note : However, in the case where the number of information packets to be communicated are very
less and/or the loss of information is acceptable the system can make use of service primitives
associated to a connectionless service.
Network Software (cont.) S‘O’A ITER
Relationship of Services to Protocols
A service is a set of primitives (operations) that a layer provides to the layer above it.
• Services relate to interfaces between layers
• The service defines what operations the layer is prepared to perform on behalf of its users, but it
does not say anything at all about how these operation are implemented.
A protocol is a set of rules governing the format and meaning of the packets, or messages
that are exchanged by the peer entities within a layer.
• Protocols relate to the packets send between peer entities on different machines.
• They are free to change their protocols at will, provided they do not change the service visible to
their users.
Network Software (cont.) S‘O’A ITER
Relationship of Services to Protocols
Structure of
OSI reference model.
Reference Models(cont.) S‘O’A ITER
The OSI Reference Model
Physical Layer:
Concerned with transmitting raw bits over a communication channel.
Converts data from the upper layers into ‘1’s and ‘0’s for transmission over media.
Defines how data is encoded onto the media to transmit the data.
Defined on this layer: Cable standards, wireless standards, and fiber optic standards.
Copper wiring, fiber optic cable, radio frequencies, anything that can be used to
transmit data is defined on the Physical layer of the OSI Model.
Design issues :
• Ensuring that when one side sends a 1 – bit of information it is received as 1-bit (not as 0-bit or 2-or
more- bits).
• What type of signal should be used to represent “1” and “0”?
• How many nano seconds a bit lasts?
• Whether transmission can occur simultaneously in both direction?
• How many pins the network connector has?
• What each pin is used for?
Reference Models(cont.) S‘O’A ITER
The OSI Reference Model
Data Link Layer:
Transforms the raw data bits to a data frame (few hundred/thousand bits)
Responsible for sequential transmission of frames from node to node or computer to
computer
In reliable service the receiver confirms correct receipt of each frame by sending back an
acknowledgment frame.
Protocols defined include Ethernet Protocol and Point-to-Point Protocol (PPP)
Two sub layers: Logical Link Control (LLC) and the Media Access Control (MAC)
o Logical Link Control (LLC)
–Flow control, Error control
o Media Access Control (MAC)
–Determines which computer has access to the network media at any given time
–Determines where one frame ends and the next one starts, called frame
synchronization
Reference Models(cont.) S‘O’A ITER
The OSI Reference Model
Network Layer:
• Controls the operation of the subnet.
• Responsible for moving (or routing) packets (data) from one end of the network to the
other, called end-to-end communications.
• Determines how packets to be routed from source (in one network) to destination (in
another network).
o Static table (rarely changed)
o Dynamic table (Often changed to avoid failed components) : Route can be determined at
the start of each conversion (or) new route for each packet depending on network load.
• Responsible for congestion handling : If too many packets are present in the subnet at
the same time, they will get in each other’s way forming bottlenecks.
• Deals with quality of service (i.e. jitter, transit time, delay etc.)
• Handles the issues raised due to different physical addresses of machines belonging to
different networks.
Reference Models(cont.) S‘O’A ITER
The OSI Reference Model
Network Layer types :
In datagram networks
Provides both routing and data forwarding
In connection-oriented network
Separate data plane and control plane
Data plane only forwards and schedules data (touches every byte)
Control plane responsible for routing, call establishment, call-teardown (doesn’t touch data bytes)
In Internet
Network layer is provided by Internet Protocol
Found in all end-systems and intermediate systems
Packet-forwarding, routing, scheduling
Unique IP addresses
Reference Models(cont.) S‘O’A ITER
The OSI Reference Model
Transport Layer:
Accepts data from higher levels and splits it into smaller segments that can be sent to network layer.
Also, reassembles data segments into data for the use of higher layers.
Puts segments in correct order (called sequencing ), so they can be reassembled in correct order at
destination.
Concerned with the reliability of the transport of sent data.
May use a connection-oriented protocol such as TCP to ensure destination has received segments.
May use a connectionless protocol such as UDP to send segments without assurance of delivery.
It is a true end-to-end layer; it carries data all the way form the source to the destination.
o In the lower layers (i.e. 1 to 3), the protocols are between each machine and its immediate
neighbours (may be routers), and not between the ultimate source and destination machines.
Reference Models(cont.) S‘O’A ITER
The OSI Reference Model
Session Layer:
Allows users on different machines to establish sessions between them.
Services:
Dialog control - Keeping track of whose turn is it to transmit
Token management – Preventing two parties from attempting the same critical operation
simultaneously
Synchronization – Check pointing long transmissions to allow them to pick up form where
they left off in the event of a crash and subsequent recovery.
Establishes, manages, and terminates connections
Provides duplex, half-duplex, or simplex communications between devices
Internet – doesn’t have a standard session layer
Reference Models(cont.) S‘O’A ITER
The OSI Reference Model
Presentation Layer:
Concerned with the syntax and semantics of the information transmitted.
Since different computer may deal with different data representations a standard encoding is
done, thus handles three primary tasks:
–Translation , –Compression , –Encryption
Ex : ASCII
Internet
–no standard presentation layer
Application Layer:
Contains all services or protocols needed by application software or operating system to
communicate on the network
Example : HTTP (Hyper Text Transfer Protocol), which is the basis for the World Wide Web.
Reference Models(cont.) S‘O’A ITER
The TCP/IP Reference Model
Proposed earlier to OSI model.
Used in ARPANET(grandparent of all wide area computer) and it’s successor the internet
(Also used in private networks)
Designed to support/interconnect different types of network (e.g. interconnection of radio
network and computer network).
Four protocol layers :
• Host-to-network/link
• Internet
• Transport
• Application
Design criteria:
• Network be able to survive loss of subnet hardware without existing conversations being
broken off.
• Applications with divergent requirements were supported ranging from file transfer to
real-time speech transmission.
Reference Models(cont.) S‘O’A ITER
The TCP/IP Reference Model
(or)
(old) (new)
Note :
When TCP/IP is compared to OSI it can be seen that the host-to-network layer is equivalent to the
combination of physical and data link layer. Also, the internet layer is equivalent to the network layer, and
the application layer is roughly doing the job of the session, presentation, and application layers
Reference Models(cont.) S‘O’A ITER
The TCP/IP Reference Model
Link Layer :
• Describes what links such as serial lines and classic Ethernet must do to meet the needs of this
connectionless internet layer.
• It is not actual layer in the classical sense of the term rather is an interface between hosts and
transmission links.
Internet Layer :
• Permit hosts to inject packets into any network and have them travel independently to the destination
(potentially on a different network).
• The packets may arrive in a completely random order from the original and the higher layer must
rearrange them – if in-order of delivery is desired.
(An analogy example : Letters dropped in the post box in sequence may not reach in the same sequence)
Application Layer :
Define the rules when implementing specific network applications.
Applications simply include any session and presentation functions that they require.
Rely on the underlying layers to provide accurate and efficient data delivery.
Typical protocols:
o FTP – File Transfer Protocol (For file transfer)
o Telnet – Remote terminal protocol (For remote login on any other computer on the network )
o SMTP – Simple Mail Transfer Protocol (For mail transfer )
o HTTP – Hypertext Transfer Protocol (For Web browsing)
Reference Models(cont.) S‘O’A ITER
The TCP/IP Reference Model
Protocols are better hidden and can be replaced relatively Protocols are not hidden and can not be replaced easily as the
easily as the technology changes. technology changes (e.g. Replacing IP with a different protocol
is virtually impossible).
The reference model was devised before the corresponding The protocols came first, and the model was really just a
protocols were invented. description of the existing protocols since the protocols fit
perfectly.
Example networks S‘O’A ITER
The computer networks that are functioning in the current scenario are associated
with so many attributes like size, technology, goals etc.
Internet
• ARPANET
• NSFNET
Connection oriented network : ATM
Ethernet
Wireless LANs: 802.11
Example networks (cont.) S‘O’A ITER
The Internet
Never be considered as a single network rather than a vast collection of different
networks that use certain common protocols and provide certain common services.
Not planned by anyone and not controlled by anyone.
Revolutionized many aspects of our daily lives.
People use internet for various reasons.
History :
• ARPANET
• NSFNET
Example networks (cont.) S‘O’A ITER
ARPANET
Following several years, ARPA (Advanced Research Projects Agency) is created to find the solution
related to design of the command and control network.
In 1967, Lary Roberts (director of ARPA) presented an idea (Wesley clark) in the form of paper
related to building of a packet switched subnet, where each host has it’s own router.
Following to this, the practical implementation of a network is determined by Roberts with a name
ARPANET.
A consulting firm named BBN had contracted to make practical implementation of ARPANET.
o Built subnet
o Wrote the subnet software
o Transmission line leased from telephone companies.
Example networks (cont.) S‘O’A ITER
ARPANET
Concept :
Subnet consists of minicomputers called IMPs (Interface Message Processors).
56-kbps transmission lines.
Each IMP connected to at least two other IMPs.
Datagram subnet (if some lines and IMPs were destroyed, messages could be automatically rerouted
along alternative paths).
Each node consists of an IMP and a host, in the same room, connected by a short wire.
A host can send messages of up to 8063 bits to its IMP.
IMPs break these up into packets of at most 1008 bits and forward them independently toward the
destination.
Each packet was received in its entirety before being forwarded.
Store-and-forward packet-switching network.
Example networks (cont.) S‘O’A ITER
ARPANET
Software :
Subnet software : required at the IMP end of the host-IMP connection
• IMP-IMP protocol
• Source IMP to destination IMP protocol
Host software : Required at the host end of the host-IMP connection
• Host-host protocol
• Application software
Use of DNS :
Increase in scale of network Difficulty in identifying hosts
Development of DNS (Domain Name system).
Host names mapped to IP addresses.
DNS is still used in internet.
Example networks (cont.) S‘O’A ITER
NSFNET
Late 1970’s : NSF (the U.S. National Science Foundation) had taken a response to design a
successor to the ARPANET.
Open to all university research groups.
Initial step to built a backbone network to connect its six supercomputer centres.
Each supercomputer was attached with a microcomputer called a fuzzball.
Fuzzballs were connected with 56-kbps leased lines and formed the subnet.
TCP/IP was used from the beginning.
Regional networks also connected to the backbone getting the financial support from NSF.
• Allow users at thousands of universities, research labs, libraries, and museums to access any of the
supercomputers and to communicate with one another.
Combined structure of backbone and regional networks named as NSFNET.
NSFNET was also connected with ARPANET through link between fuzzball and IMP.
Example networks (cont.) S‘O’A ITER
NSFNET
X.25 ( 1970s) and frame delay (1980s) : works on synchronous transmission characteristics.
In early 1990s, ATM (Asynchronous Transfer Mode) network designed to work with asynchronous
transmission system.
Merging of voice, data, cable television and many more signals into a single integrated system that
could do everything for everyone.
Initially not happened due to bad timing, technology and implementation, however later on, found to
be successful.
Example networks (cont.) S‘O’A ITER
Connection-Oriented Network: ATM
ATM Virtual Circuits:
Set up packet transmission prior to sending of data from source host to destination host.
Routers in the path followed by set up packet make an entry to their routing table indicating path
information till the end of the data transmission.
Connection between two hosts through subnet/routers van be temporary/permanent and is
referred as ATM virtual circuit.
A virtual circuit in
ATM network
Example networks (cont.) S‘O’A ITER
Connection-Oriented Network: ATM
Connection identifier, ATM cell, Information flow
Each connection, temporary or permanent, has a unique connection identifier.
The information in ATM is transmitted in the form of small, fixed-size packets called cells.
The cells are 53 bytes long, of which 5 bytes are header and 48 bytes are payload.
An ATM cell
Part of the header is the connection identifier to identify the source and destination host for a
packet.
Helps the router to know how to route each incoming cell.
Cells transmitted in a sequence order.
Most common speeds for ATM networks are 155 Mbps and 622 Mbps.
Example networks (cont.) S‘O’A ITER
The ATM Reference Model
ATM has its own reference model, different from the OSI model and also different from the TCP/IP
model.
Three layers, the physical, ATM, and ATM adaptation layers with a flexibility for an user defined upper
layer(s) above that.
Before transmitting, a computer first listened to the cable to see if someone else
was already transmitting.
If so, the computer held back and wait until the current transmission finished.
Avoids interfering with existing transmissions, giving a much higher efficiency.
(ALOHANET : Not possible to sense the transmission line.)
Still a possibility of simultaneous transmission ?
Can be resolved with random wait time which can be doubled if still collision chance
is there.
Example networks (cont.) S‘O’A ITER
Ethernet
Ethernet as IEEE standard :
Following to success in implementation of Ethernet the speed enhanced to 10 Mbps in 1978.
In 1983, considered as IEEE 802.3 standard.
In the due course of time with the improvement in technology it provides higher speed (100 Mbps).
Other IEEE standards for LAN : IEEE 802.4, IEEE 802.5
802.4 : Token bus introduced by General motors, BUS topology
802.5 : Token ring introduced by IBM, RING topology
Token : A short packet and is used to make a turn for a computer being allowable for transmission of
its data.
A computer could only send if it possessed the token, thus avoiding collisions.
In due course of time 802.4 has vanished from sight .
802.5 had its existence and still in use at some IBM site (popular in the name IBM token ring).
In the war of LAN, Ethernet has taken the highest utility in compare to others like token bus and token ring.
Example networks (cont.) S‘O’A ITER
Wireless LANs: 802.11
To equip both the office and the notebook computers with short-range radio transmitters
and receivers and to allow them to communicate.
Issue in the beginning : Some systems faces problem because of technical incompatibility
between devices.
Example: A computer equipped with a brand X radio could not work in a room equipped with a
brand Y base station.
Issue solved through standardisation of Wireless LAN (IEEE 802.11).
Popular in the term WIFI.
Example networks (cont.) S‘O’A ITER
Wireless LANs: 802.11
The range of a single radio may not cover the entire system
Example networks (cont.) S‘O’A ITER
Problems encountered during implementation of Wireless LANs: 802.11
Multipath fading:
A radio signal can be reflected off solid objects.
Same signal may be received multiple times (along multiple paths).
May lead to interference what is called multipath fading.
Example networks (cont.) S‘O’A ITER
Problems encountered during implementation of Wireless LANs: 802.11
Compatibility with software :
Software is not aware of mobility of computer system compatible with other device.
Example :
Many word processors have a list of printers that users can choose from to print a file. When the computer on
which the word processor runs is taken into a new environment, the built-in list of printers becomes invalid.
Hand off:
A notebook computer moving from the
range of one ceiling-mounted base station
into the range of a different base station,
requires hand off.
The initial standard (i.e. 802.11 in 1997) ran at either 1 Mbps or 2 Mbps.
(Frequency hopping and signal spreading technology)
802.11a and 802.11b (1999)
Besides these 802.11g (2003) is also used currently in some networks that employs OFDM transmission.
Computer Network
(CSE 3034)
➢ Information can be transmitted on wires in the form of variation in voltage or current with
time (say f(t)).
➢ Signal behaviour can be modelled and analysed mathematically.
Fourier Analysis:
➢ A time-varying periodic signal can be represented as a series of frequency components
(harmonics): Normally termed as Fourier series
The function can be reconstructed; that is, if the period, T, is known and the amplitudes are
given.
Note :
A data signal that has a finite duration thus can be
handled by just imagining that it repeats the entire
pattern over and over forever (i.e., the interval from T to
2T is the same as from 0 to T, etc.).
Theoretical Basis for Data Communication (cont.)
Bandwidth limited signal
➢ The range of frequencies that a medium can pass
without loosing one-half of the power contained
in that signal is called its bandwidth.
➢ At the signal level, bandwidth is also considered as
cut-off frequency (HZ).
➢ For data transmission it is bits/sec.
Lost!
2 harmonics
Lost!
4 harmonics
Lost!
8 harmonics
Lost!
Bandwidth
Having less
bandwidth
(harmonics) degrades
the signal
Theoretical Basis for Data Communication (cont.)
Bandwidth limited signal
Let a bit rate is 𝑏 bits/sec.
Time to send 8 bits is 8/𝑏 sec.
The frequency of the first harmonics
is 𝑏/8 Hz.
The voice-grade line, has cut off
frequency just above 3000 Hz. This
restriction means that the number of
the highest harmonic passed through
is roughly 3000/(𝑏/8) or 24000/𝑏,
(the cut-off is not sharp).
Theoretical Basis for Data Communication (cont.)
Maximum Data Rate of a Channel
➢ Two theorems.
• Nyquist
• Shannon
➢ Nyquist theorem : For noiseless channel
➢ Shannon’s theorem : For noisy channel
Theoretical Basis for Data Communication (cont.)
Maximum Data Rate of a Channel
Nyquist theorem
• If an arbitrary signal passes through a low-pass filter of bandwidth H, the
filtered signal can be completely reconstructed by making only 2H (exact)
samples per second.
• Relates the data rate to the bandwidth (H) and number of signal levels (V)
on a noiseless channel.
Max. data rate = 2H log2V bits/sec
• Ex : A noiseless 3-kHz channel cannot transmit binary (i.e., two-level)
signals at a rate exceeding 6000 bps.
Solution
Q2. Television channels are 6 MHz wide. How many bits/sec can be sent if four-level digital
signals are used? Assume a noiseless channel.
Answer :
Q3. If a binary signal is sent over a 3-kHz channel whose signal-to-noise ratio is 20 dB, what is the
maximum achievable data rate?
Answer :
Max. data rate = H log2(1 + S/N) bits/sec
However according to Nyquist theorem with this data rate the signal can’t be reconstructed at the
receiving end.
• Magnetic media
• Twisted pairs
• Coaxial cable
• Fiber optics
Guided transmission media (cont.)
Magnetic media
Example :
For a bank with many gigabytes of data to be backed up daily on a second machine (so the bank
can continue to function even in the face of a major flood or earthquake), it is likely that no other
transmission technology can even begin to approach magnetic tape for performance.
Guided transmission media (cont.)
Twisted Pair
➢ One of the oldest and still most common transmission media.
➢ Consists of two insulated copper wires(typically about 1 mm thick) twisted together in a
helical form, just like a DNA molecule.
➢ Effectively less radiation from each wire.
(Two wires in parallel can act as antenna, when twisted waves from different twists cancel out)
➢ Low cost.
➢ Adequate performance.
➢ Most common application of the twisted pair is the telephone system.
➢ Can run several kilometres without amplification, but for longer distances, repeaters are
needed.
➢ More than one twisted pairs can run in parallel for a substantial distance being bundled
together and encased in a protective sheath.
➢ Can be used for transmitting either analog or digital signals.
➢ Bandwidth depends on the thickness of the wire and the distance travelled.
(several megabits/sec can be achieved for a few kilometres)
Guided transmission media (cont.)
Types :
Twisted Pair
➢UTP (unshielded twisted pair)
•Category 3 :
o Two insulated wires gently twisted together and four such pairs grouped in a
plastic sheath
o 16 MHz
•Category 5 :
o Similar to category 3, but more twists per centimeter.
o Less crosstalk.
o Better-quality signal over longer distances
o More suitable for high-speed computer communication.
(a) Category 3 UTP. (b) Category 5 UTP.
o 100 MHz.
➢STP (shielded twisted pair) : Not popularly used, bulky than UTP
(a) Three examples of a light ray from inside a silica fiber impinging on the air/silica boundary at different angles.
(b) Light trapped by total internal reflection.
Guided transmission media (cont.)
Fiber Optics
Multi mode Vs Single mode:
➢ Multiple light ray can incident at different angles (but above critical angle), to transmit from one
end of the transmission medium to other through reflection.
➢ Fiber used with this property is called a multimode fiber.
➢ If the fiber's diameter is reduced to a few wavelengths of light, the light can propagate only in a
straight line, without bouncing.
➢ Fiber used with this property is called a singlemode fiber.
➢ Single-mode fibers are more expensive but are widely used for longer distances.
Guided transmission media (cont.)
Fiber Optics
Fiber Cables:
Core : Thin glass fiber at the center through which the light propagates that carries the information.
• 50 microns in diameter for multimode.
• 8 to 10 microns in diameter for singlemode.
Cladding : The core is surrounded by a glass cladding with a lower index of refraction than the core, to
keep all the light in the core.
Jacket : Thin plastic jacket to protect the cladding.
Sheath : Fibers are typically grouped in bundles, protected by an outer sheath.
(a) Side view of a single fiber. (b) End view of a sheath with three fibers.
Optical fiber
Guided transmission media (cont.)
Fiber Optics
Connection between fibers:
Three different ways.
▪ They can terminate in connectors and be plugged into fiber sockets.
▪ Mechanical splices just lay the two carefully-cut ends next to each other in a special sleeve and
clamp them in place.
▪ Two pieces of fiber can be fused (melted) to form a solid connection.
For all three kinds of splices, reflections can occur at the point of the splice (i.e. attenuation/loss).
Guided transmission media (cont.)
Fiber Optics
Light source and comparison:
1. Light emitting diode (LED).
2. Semiconductor LASER.
• Radio Transmission
• Microwave Transmission
(a) In the VLF, LF, and MF bands, radio waves follow the curvature of the earth.
(b) In the HF band, they bounce off the ionosphere.
Wireless Transmission(cont.)
Microwave Transmission
• The signals (or waves)above 100 MHz that travels in nearly straight line.
• Mostly uses parabolic antenna to achieve higher S/N ratio.
• Requires carefully alignment between transmission and Reception antennas.
• Before fiber optics, for decades these microwaves formed the heart of the long-
distance telephone transmission system.
• Since the microwaves travel in a straight line, if the towers are too far apart, the earth
will get in the way and thus requires repeater in between.
• Suffers from low penetration capability through buildings.
• Possibility of multipath fading due to reflected wave(delayed version of transmitted
wave).
Wireless Transmission(cont.)
Infrared and Millimetre Waves
Wireless:
+ Easy and inexpensive to deploy
+ Naturally supports mobility
+ Naturally supports broadcast
− Transmissions interfere and must be managed
− Signal strengths hence data rates vary greatly
Wires/Fiber:
+ Easy to engineer a fixed data rate over point-to-point links
− Can be expensive to deploy, esp. over distances
− Doesn’t readily support mobility or broadcast
Public Switched Telephone Network (PSTN)
When the distances between computers are large or there are many computers to
communicate with each other, the cables may have to pass through a public road or other
public right of way.
Issues :
▪ Costs of running private cables are usually prohibitive.
▪ Stringing private transmission lines across (or underneath) public property is also illegal.
Solution to the issues :
▪ Rely on the existing telecommunication facilities (i.e. PSTN).
PSTN :
➢ Initially designed to provide voice communication service.
➢ Acceptable for data communication with lower magnitude of performance.
(e.g. A cable running between two computers can transfer data at 109 bps, In contrast, a dial-up
line has a maximum data rate of 56 kbps)
➢ Trade off between speed and data communication services.
Note : In the due course of time with the use of advanced technology the performance w.r.t data communication
through dial up service has also been enhanced.
Public Switched Telephone Network (cont.)
Structure of the Telephone System
➢ Soon after the commercialization of telephone instrument (in 1876), there was a high
demand of interconnection between a pair of telephones in different houses in cities.
➢ Within a year, the cities were covered with wires (for making connections between a
pair of phones) passing over houses and trees in a wild jumble.
Fully-interconnected network.
➢ It became immediately obvious that the model of connecting every telephone to
every other telephone, as shown in above figure, was not going to work.
Public Switched Telephone Network (cont.)
Structure of the Telephone System
➢ Formation of Bell Telephone Company, which opened its first switching office in 1878.
➢ The company ran a wire to each customer's house or office.
➢ Establishment of call between two customers takes place through the switching office.
(i.e. an operator makes the connection between caller and callee manually using a jumper wire.)
Centralized switch.
Two-level hierarchy.
Public Switched Telephone Network (cont.)
Structure of the Telephone System
Three major parts of the telephone system to provide connection between two customers.
▪ The switching offices.
▪ The wires between the customers and the switching offices.
▪ The long-distance connections between the switching offices.
This basic Bell System model has remained essentially intact for over 100 years.
Case 3 : The caller and callee do not have a toll office in common.
➢ Communication established with the help of higher level in hierarchy (i.e. high bandwidth
Inter toll trunks)
The computer to computer communication through telephone system involves both analog
and digital transmission.
The use of both analog and digital transmission for a computer to computer call.
The Local Loop: Modems, ADSL and Wireless(cont.)
➢ Though the computer works with digital data comprising of less error, due to the
imperfectness of transmission line the received signal in a telephone system may not be
equal to the transmitted signal.
➢ Transmission lines suffer from three major problems: attenuation, delay distortion, and
noise.
Attenuation:
• Loss of energy due to transmission over a distance (i.e. distance dependent).
• Loss of energy due to transmission of multiple frequency component in a signal (i.e. frequency dependent).
• Usually recovered by the use of amplifiers and equalizers.
Delay distortion:
• Caused due to transmission of multiple frequency component at different speeds.
Noise:
• Unwanted energy from sources other than transmitter (e.g. thermal noise, cross talk and impulse noise).
• Thermal noise : Caused by the random motion of the electrons in a wire and is unavoidable.
• Crosstalk : Caused by inductive coupling between two wires that are closed to each other.
• Impulse noise : Caused by spikes in the power line.
The Local Loop: Modems, ADSL and Wireless(cont.)
Modems
➢ Short form for Modulator-Demodulator.
➢ Modulation in transmitting end and demodulation in receiving end.
Why modulation ?
▪ Square waves used in digital signals have a wide frequency spectrum and thus are subject to
strong attenuation and delay distortion.
▪ Baseband (DC) signalling found unsuitable except at slow speeds and over short distances.
▪ Solution : AC signalling (e.g. use of sine wave of 1-2 KHz to carry digital signal).
▪ Carrier signal changes its characteristics (i.e. amplitude, frequency or phase) according to
baseband signal – Modulation.
The Local Loop: Modems, ADSL and Wireless(cont.)
Modems
Amplitude Modulation : ASK (Amplitude Shift Keying )
• Change in amplitude of carrier based on amplitude of
baseband.
• For Binary signal two different amplitudes are used.
Frequency Modulation : FSK (Frequency Shift keying)
• Change in frequency of the carrier based on
amplitude of baseband.
• For binary signal two different frequencies are used.
Phase Modulation : PSK (Phase shift Keying)
• Phase of the carrier changes based on amplitude of
baseband signal.
• For binary signal two (00 and 1800)/four phase angles
(450, 1350, 2250, or 3150) are used depending on no.
of bits transmitted per time interval.
• Ex : BPSK, QPSK (a) A binary signal. (b) Amplitude modulation.
(c) Frequency modulation. (d) Phase modulation.
The Local Loop: Modems, ADSL and Wireless(cont.)
Modems
Concept of Bandwidth, Baud rate, Symbol rate, bit rate :
The data transmission rate in the channel can be associated with various terminologies such as
bandwidth, baud rate, symbol rate and bit rate.
Bandwidth : Property of transmission medium which represents the range of frequencies that pass
through it with minimum attenuation (measured in Hz).
Baud rate : The number of samples/sec made to be transmitted.
Symbol rate : The amount of information sample(i.e. symbol) transmitted per second.
(If each sample denotes one piece of information is a symbol, then baud rate is same as symbol rate)
Bit rate : Amount of information sent over the channel and is equal to the number of symbols/sec times
the number of bits/symbol.
(Note : The modulation technique decides the no. of bits to be used to represent a symbol(e.g. in QPSK each symbol is
represented by 2 bits))
Example :
If the baud rate is 2400 and each symbol is represented by 1 bit (‘0’ or ‘1’), then bit rate is 2400 bps.
If the baud rate is 2400 and each symbol is represented by 2 bits, then bit rate is 4800 bps.
The Local Loop: Modems, ADSL and Wireless(cont.)
Modems
➢ All advanced modems use a combination of modulation techniques to transmit multiple
bits per baud.
➢ Often multiple amplitudes and multiple phase shifts are combined to transmit several
bits/symbol.
QPSK (Quadrature PSK):
4 combinations, 2 bits/symbol.
QAM 16 :
16 combinations, 4 bits/symbol.
QAM 64 :
64 combinations, 6 bits/symbol.
Question.
A modem constellation diagram has data points at the following coordinates: (1, 1), (1, -1), (-1, 1), and (-
1, -1). How many bps can a modem with these parameters achieve at 1200 baud?
Answer :
4 combinations – 2 bits/symbol
Baud rate = Symbol rate = 1200
Bit rate = 1200 X 2 = 2400 bps
The Local Loop: Modems, ADSL and Wireless(cont.)
Modems
Questions on data rate and modulation:
Question 1.
A modem constellation diagram has data points at the following coordinates: (0, 1) and (0, 2).
Does the modem use phase modulation or amplitude modulation?
Solution :
The two points indicates a phase shift of 00 with two different amplitudes. So the modulation used is
only amplitude modulation.
Question 2.
In a constellation diagram, all the points lie on a circle cantered on the origin. What kind of modulation
is being used?
Solution :
All the points lie on the circle, which means all points are at equal distant from origin. However, the
angle of each point with respect to +ve X axis drawn from origin are different, that means the points
differs in phase. Since frequency modulation is not used in constellation diagram, the kind of
modulation specified here is phase modulation.
The Local Loop: Modems, ADSL and Wireless(cont.)
Modems
Modulation supporting to error correction :
➢ Even a small amount of noise in the detected amplitude or phase can result in an error.
➢ Higher speeds modems do error correction by adding extra bits to each sample.
➢ Modulation process allows the data bits along with correction (say parity)bits : Ex- Trellis Coded
Modulation
Modems using this type modulation :
V.32
• 32 constellation points
• 4 data bits and 1 parity bit per symbol
V.32 bis
• 128 constellation points
• 6 data bits and 1 parity bit per symbol
(a) (b)
(a) V.32 for 9600 bps.
(b) V.32 bis for 14,400 bps.
The Local Loop: Modems, ADSL and Wireless(cont.)
Modems
Some faster modems :
• V.90 offers 56kbps download and 33.6 kbps upload speeds.
• In uploading, the analog signal must be sampled at the switching stations which means the
data rate for uploading is limited to 33.6 as earlier. But, there is no sampling in the
downloading, hence no noise , hence no Shannon’s limit (theoretically at least).
• Beyond V.90 is V.92 in which the upload speed can be at 48kbps.
The Local Loop: Modems, ADSL and Wireless(cont.)
Modems
All modern modems allow traffic in both directions at the same time (by using
different frequencies for different directions).
Ans : Oil can flow in either direction, but not both ways at once. So, half-duplex.
▪ As more and more wavelengths are being discovered in a single fiber, WDM is getting denser
and now the name DWDM (dense WDM) is being used.
Trunks and Multiplexing (cont.)
Time Division Multiplexing
• WDM : applicable only on optical fiber and not on copper, but a lot of copper is there and
also analog.
• FDM : used on copper and microwave but requires analog circuitry and may not be
suitable for computer.
❖Uses Codecs
Trunks and Multiplexing (cont.)
Time Division Multiplexing
CODEC : PCM (Pulse Code Modulation) :
➢ Uses 8000 samples/sec or one sample/125 μsec.
(Satisfies Nyquist criteria as telephone channel bandwidth is 4000 Hz)
➢ All the time intervals (a pulse) within the telephone system are multiples of 125 μsec.
➢ Technique is known as PCM.
➢ Each sample is represented in the form of a 8-bit number.
In Delta Modulation :
➢ Compare the current sample and previous one with a difference in ± 1.
➢ For difference of +1, transmits 1 & for difference of -1 transmits 0.
➢ If signal changes too fast then information is lost.
Trunks and Multiplexing (cont.)
Time Division Multiplexing
Delta modulation
Trunks and Multiplexing (cont.)
Time Division Multiplexing
Predictive Encoding :
Answer :
Computer Network
(CSE 3034)
• Consists of having the source machine send independent frames to the destination machine
without having the destination machine acknowledge them.
• No logical connection is established beforehand or released afterward.
• If a frame is lost due to noise on the line, no attempt is made to detect the loss or recover from
it in the data link layer.
• Service is appropriate when the error rate is very low so that recovery is left to higher layers.
• Acceptable for real-time traffic, such as voice, in which late data are worse than bad data
• Example: Ethernet, Voice over IP, etc.
ITER S`O´A
Data Link Layer Design Issues (cont.)
Services Provided to the Network Layer
Acknowledged Connectionless Service :
• Each frame send by the Data Link layer is acknowledged and the sender knows if a specific
frame has been received or lost.
• Typically the protocol uses a specific time period that if has passed without getting
acknowledgment it will re-send the frame.
• This service is useful for commutation when an unreliable channel is being utilized (e.g., 802.11
WiFi).
• Network layer does not know frame size of the packets and other restriction of the data link
layer. Hence it becomes necessary for data link layer to have some mechanism to optimize the
transmission.
ITER S`O´A
Data Link Layer Design Issues (cont.)
Services Provided to the Network Layer
Acknowledged Connection Oriented Service :
• Source and Destination establish a connection first.
• Each frame sent is numbered
▪ Data link layer guarantees that each frame sent is indeed received.
▪ It guarantees that each frame is received only once and that all frames are received in the correct order.
• Examples:
▪ Satellite channel communication, Long-distance telephone communication, etc.
➢ The physical layer deals with transmission of raw bit stream and doesn’t give guarantee of
error free transmission.
➢ Errors could be:
• Number of received bits does not match number of transmitted bits (deletion or insertion)
• Bit Value
➢ Data link layer takes the responsibility to detect errors and if possible, to correct errors.
• It breaks up the bit stream into discrete frames and computes a checksum which it includes with
each frame.
• Braking up the bit stream into frames is more difficult than it seems.
ITER S`O´A
Data Link Layer Design Issues (cont.)
Framing
Framing Methods :
➢ Character count
➢ Flag bytes with byte stuffing
➢ Starting and ending flags with bit stuffing
➢ Physical layer coding violations
ITER S`O´A
Data Link Layer Design Issues (cont.)
Framing
Character count :
➢ Uses the first field in the frame's header to indicate the length of the frame, so that the receiver knows
how big the current frame is and can determine where does a frame ends.
➢ Trouble in the algorithm:
• Receiver loses synchronization when
the count become garbled due to
transmission error.
• The receiver will think that the frame
contains fewer (or more) characters
than it actually does.
Note : Many data link protocols use a combination of a character count with one of the other methods for
extra safety.
ITER S`O´A
Data Link Layer Design Issues (cont.)
Framing
Q1. The following character encoding is used in a data link protocol:
A: 01000111; B: 11100011; FLAG:01111110; ESC: 11100000
Show the bit sequence transmitted (in binary) for the four-character in a frame: A B ESC FLAG
when each of the following framing methods are used:
(a) Character count.
(b) Flag bytes with byte stuffing.
(c) Starting and ending flag bytes, with bit stuffing.
Q2. A bit string, 0111101111101111110, needs to be transmitted at the data link layer. What
is the string actually transmitted after bit stuffing?
A2 : The bit string actually transmitted is 011110111110011111010.
ITER S`O´A
Data Link Layer Design Issues (cont.)
Framing
Q3. The following data fragment occurs in the middle of a data stream for which the byte-
stuffing algorithm is used: A B ESC C ESC FLAG FLAG D. What is the output after stuffing?
A3 : The output after stuffing is A B ESC ESC C ESC ESC ESC FLAG ESC FLAG D.
ITER S`O´A
Data Link Layer Design Issues (cont.)
Error control
• After solving the marking of the frame with start and end the data link layer must handle
eventual errors in transmission.
✓Ensuring that all frames are delivered to the network layer at the destination and in proper
order.
• Unacknowledged connectionless service: it is fine for the sender to output frames regardless of
its reception.
• Reliable connection-oriented service: it is not fine.
• Usual way to ensure reliable delivery is to include acknowledgement (i.e. special control frames)
to the sender.
o Positive acknowledgement : frame has arrived safely.
o Negative acknowledgement : something wrong during transmission, so need retransmission
I. A timer is required to be set so that if the data frame or the acknowledgement is lost then the sender
is aware of the problem when the timer runs out.
II. Sequence numbers required to be associated with frames to ensure the passing of frames to the
destination network layer, exactly once in the right order if frames are received more than once.
ITER S`O´A
Data Link Layer Design Issues (cont.)
Flow control
➢ Important when the sender is running on a fast powerful computer and receiver is
running on a slow low-end machine.
➢ Two approaches:
1. Feedback-based flow control : Can be taken care at the data link layer
• Receiver gives feedback on the data it can accept and gives permission to send data
➢ Transmission errors: common on local loops (because of analog signalling), wireless links.
➢ Two basic strategies for dealing with errors.
• Error correction : Include enough redundant information along with each block of data sent,
to enable the receiver to deduce what the transmitted data must have been.
▪ Applicable to wireless channel , where retransmission can be faulty.
▪ Uses error correction codes.
Ex : Hamming code
• Error detection : Include only enough redundancy to allow the receiver to deduce that an
error occurred, but not which error, and have it request a retransmission.
▪ Applicable to reliable transmission channel such as optical fiber (requires retransmission)
▪ Uses error detection codes.
Ex : Cyclic Redundancy Code
ITER S`O´A
Error Detection and Correction (cont.)
Example :
• Transmitted: 10001001
• Received: 10110001
XOR operation gives number of bits that are different.
• XOR: 00111000
• Number of bit positions in which two codewords differ is called Hamming Distance. It shows that two
codes are d distance apart, and it will require d errors to convert one into the other.
Note :
• All 2m possible data messages are legal.
• All 2n possible codewords are not treated as legal as far as the hamming distance and check bits are
concerned.
ITER S`O´A
Error Detection and Correction(cont.)
Error correction code
Design of an error correction code requires a significant no. of check bits and has a lower limit defined by
the relation
(m + r + 1) ≤ 2r , where ‘r’ indicates no. of check bits for m message bits.
Example : Hamming code (can be used to correct single error)
➢ Bits of the codeword : b1 b2 b3 b4 ….
➢ Check bits: The bits that are powers of 2 (p1, p2, p4, p8, p16, …).
➢ The rest of bits (m3, m5, m6, m7, m9, …) are filled with m data bits.
➢ Check bits are considered as parity bits for subset(i.e. some collection of bits) of the codeword
(e.g. p1 is the parity bit for all data bits in positions whose binary representation includes a 1 in the
least significant position excluding 1 (3, 5, 7, 9, 11 and so on))
➢ Data bits are checked by adding together parity bits for its position; e.g., 3 = 1 + 2, 5 = 1 + 4, 6 = 2 + 4,
7 = 1 + 2 + 4, 9 = 1 + 8, 10 = 2 + 8, 11 = 1 + 2 + 8, …
ITER S`O´A
Error Detection and Correction(cont.)
Hamming code
Error correction :
➢ When a codeword arrives the receiver initializes a counter to ‘0’.
➢ After codeword arrives, it examines each check bit k for correct parity value.
• If correct the codeword is accepted.
• If incorrect, it adds k to the counter and after all check gives the no. of incorrect data bit.
(e.g. in a (11, 7) codeword, if check bits 1, 2, and 8 are in error, the inverted data bit is 11)
➢ Recomputing the parity sums (error syndrome) gives the position of the error to flip, or 0 if there is no error.
Example :
1 2 3 4 5 6 7 8 9 10 11 12
1 0 1 0 0 1 0 0 1 1 1 1 12-BIT CODEWORD
1 - 1 - 0 - 0 - 1 - 1 - (EVEN PARITY)
- 0 1 - - 1 0 - - 1 1 - (EVEN PARITY)
- - - 0 0 1 0 - - - - 1 (EVEN PARITY)
- - - - - - - 0 1 1 1 1 (EVEN PARITY)
Example : The polynomial code, also known as a CRC (Cyclic Redundancy Check)
ITER S`O´A
Error Detection and Correction(cont.)
Polynomial (or CRC) code
➢ Bit strings are represented as polynomials with coefficients of 0 and 1(i.e. bit value) only.
➢ A k-bit frame is regarded as the coefficient list for a polynomial with k terms ranging from xk-1 to x0.
Example:
110001: 1x5 + 1x4 + 0x3 + 0x2 + 0x1 + 1x0
➢ Uses modulo 2 arithmetic(i.e. both addition and subtraction are equivalent to exclusive OR)
➢ The sender and receiver must agree upon a generator polynomial, G(x), in advance.
➢ Both high- and low-order bits in the generator polynomial must be 1.
➢ CRC is computed for a frame of length m- bits (i.e. M(x)) using G(x) known as check summed frame,
such that M(x) is longer than the G(x).
➢ The resulting check summed frame must be divisible by G(x).
➢ When the receiver gets a check summed frame it divides it by G(x).
▪ If the result is not equal to zero it means that there has been transmission error.
ITER S`O´A
Error Detection and Correction(cont.)
Polynomial (or CRC) code
Algorithm for computing the checksum:
1. Let r be the degree of G(x). Append r
zero bits to the low-order end of the
frame so it now contains m+r bits and
corresponds to the polynomial xr M(x)
2. Divide the bit string corresponding to
Example:
G(x) into the bit string corresponding to Frame: 1101011111
xr M(x) using modulo 2 division. Generator: x4+x+1
Channel: Noiseless
No frames are lost, duplicated, or corrupted.
Protocols :
▪ An Unrestricted Simplex Protocol
▪ A Simplex Stop-and-Wait Protocol
ITER S`O´A
Elementary data link protocols (cont.)
Library procedures:
Continued →
ITER S`O´A
Elementary data link protocols (cont.)
Protocol Definitions
(ctd.)
ITER S`O´A
Elementary data link protocols (cont.)
packet
frame (4 fields)
Control information
(Frame header)
ITER S`O´A
Elementary data link protocols (cont.)
An Unrestricted Simplex Protocol
▪ Simplest Protocol (called as utopia) Communication using (Flow Diagram)
▪ Unidirectional in which data frames are traveling in only Simplest Protocol
one direction-from the sender to receiver.
▪ Both transmitting and receiving network layers are always
ready.
▪ The receiver can immediately handle any frame it receives
with a processing time that is small enough to be
negligible.
▪ The data link layer of the receiver immediately removes
the header from the frame and hands the data packet to
network layer.
0
▪ In other words, the receiver can never be fill out with 0
incoming frames.
▪ Unrealistic and resembles to connectionless
▪ Relies on higher layer for error handling
ITER S`O´A
Elementary data link protocols (cont.)
An Unrestricted Simplex Protocol
Runs at sender
machine
Runs at receiver
machine
Elementary data link protocols (cont.) ITER S`O´A
Runs at sender
machine
Runs at receiver
machine
Sliding Window Protocols
• In most practical situations, there is a need for transmitting data in both
directions.
• One way of achieving full-duplex data transmission is to have two separate
communication channels and use each one for simplex data traffic (in
different directions).
• If this is done, we have two separate physical circuits, each with a
''forward'' channel (for data) and a ''reverse'' channel (for
acknowledgements).
• In both cases the bandwidth of the reverse channel is almost entirely
wasted. In effect, the user is paying for two circuits but using only the
capacity of one.
Sliding Window Protocols
Improvement…
• A better idea is to use the same circuit for data in both directions.
• In this model the data frames from A to B are intermixed with the
acknowledgement frames from A to B.
• By looking at the kind field in the header of an incoming frame, the
receiver can tell whether the frame is data or acknowledgement.
Sliding Window Protocols
Piggybacking
• When a data frame arrives, instead of immediately sending a separate
control frame, the receiver restrains itself and waits until the network
layer passes it the next packet.
• The acknowledgement is attached to the outgoing data frame (using
the ack field in the frame header).
• In effect, the acknowledgement gets a free ride on the next outgoing
data frame.
• The technique of temporarily delaying outgoing acknowledgements
so that they can be hooked onto the next outgoing data frame is
known as piggybacking.
Sliding Window Protocols
Piggybacking
• The principal advantage of using piggybacking over having distinct
acknowledgement frames is a better use of the available channel
bandwidth.
• The ack field in the frame header costs only a few bits, whereas a separate
frame would need a header, the acknowledgement, and a checksum.
• However, piggybacking introduces a complication not present with
separate acknowledgements. How long should the data link layer wait for
a packet onto which to piggyback the acknowledgement?
• If a new packet arrives quickly, the acknowledgement is piggybacked
onto it; otherwise, if no new packet has arrived by the end of this time
period, the data link layer just sends a separate acknowledgement frame.
Sliding Window Protocols
P P D P D D D 7-BIT CODEWORD
P - D - D - D (EVEN PARITY)
- P D - - D D (EVEN PARITY)
- - - P D D D (EVEN PARITY)
• For example, the message 1101 would be sent as 1010101, since:
1 2 3 4 5 6 7
1 0 1 0 1 0 1 7-BIT CODEWORD
1 - 1 - 1 - 1 (EVEN PARITY)
- 0 1 - - 0 1 (EVEN PARITY)
- - - 0 1 0 1 (EVEN PARITY)
Problem
11 11110
Problem
Application
Transport
Network
Link
Physical
MAC is here
Multiple Access Protocols
ALOHA »
CSMA (Carrier Sense Multiple Access) »
Multiple Access Protocols (Cont.)
ALOHA
Applicable to any system in which uncoordinated users are competing for the use of a
single shared channel
Collision
Collision Time
Thus, 𝑆 = 𝐺𝑒 −2𝐺
t0 - t t0 t0 + t Time
Vulnerable
o A starts sending to B.
o C senses and finds the channel is free so starts sending to B.
o A and C are hidden to each other so can’t sense each other’s status.
o Both of their data's gets interfered at B.
Case II : Exposed node problem - Senders who can sense each other but still transmit safely (to different receivers)
o There is an ongoing transmission from B to A.
o C can sense it since in the range of B and so thinks not to transmit.
o Absolutely not face any problem if C transmits to D since B and D
are not in either’s range.
o B and C are exposed terminals when transmitting to A and D.
Multiple Access Protocols(Cont.)
Wireless LAN Protocols
Problems to note :
Before starting a transmission, a station really wants to know whether there is activity around the
receiver.
With a wire, only one transmission can take place at once anywhere in the system though all signals can
propagate to all stations.
In a system based on short-range radio waves, multiple transmissions can occur simultaneously if they
all have different destinations and these destinations are out of range of one another.
Two protocols :
1. MACA
2. MACAW
Multiple Access Protocols(Cont.)
Wireless LAN Protocols
MACA (Multiple Access with Collision Avoidance)
An early protocol designed for wireless LANs .
Basic idea :
Sender to simulate the receiver into outputting a short frame.
Nearby stations can detect this transmission and avoid transmitting for the duration of the upcoming (larger) data
frame.
Example :
• A initiates by sending Request To Send (RTS- a short frame
say of 30 bytes indicating the data length) to station B.
• B replies with a Clear To Send (CTS- contains the data
length being copied from RTS) frame.
• After reception of the CTS frame A begins transmission.
• Any station hearing the RTS from A (i.e. C and E)must remain
silent long enough for the CTS to be transmitted back to A
without conflict.
• Any station hearing the CTS from B(i.e. D and E) must (a) A sending an RTS to B. (b) B responding with a CTS to A.
remain silent during the upcoming data transmission.
• Still collisions are possible (e.g C and B sends RTS to A simultaneously). Requires random waiting time for retransmission
following to collision.
Multiple Access Protocols(Cont.)
Wireless LAN Protocols
MACAW (MACA for Wireless)
Fine tuned MACA to improve its performance.
Introduces an ACK frame after each successful data frame.
Includes CSMA to sense any nearby station has transmitted RTS to the destined node of itself.
Runs the back off algorithm separately for each data stream (source-destination pair), rather than for
each station.
Adds a mechanism for stations to exchange information about congestion.
Ethernet
Many of the designs for personal, local, and metropolitan area networks have been
standardized under the name of IEEE 802.
A few have survived but many have not.
The most important of the survivors are 802.3 (Ethernet) and 802.11 (wireless LAN).
Two kinds of Ethernet exist:
1. Classic Ethernet, which solves the multiple access problem using the
techniques such as CSMA.
• Original form and ran at rates from 3 to 10 Mbps.
2. Switched Ethernet, in which devices called switches are used to connect different
computers.
• The today’s Ethernet and runs at
• 100 Mbps (fast Ethernet)
• 1000 Mbps (gigabit Ethernet)
• 10,000 Mbps (10 gigabit Ethernet
Ethernet(Cont.)
Classical Ethernet physical layer
History and standard :
Bob Metcalfe with David Boggs designed and implemented the first local area network in 1976 in
Xerox Palo Alto Lab.
It used a ingle long thick coaxial cable.
Speed 3 Mbps.
Named this as Ethernet.
Successfully designed and later drafted as DIX standard in 1978 by Xerox, DEC, Intel with a 10 Mbps.
With a minor change, the DIX standard became the IEEE 802.3 standard in 1983.
If each station transmits during a contention slot with probability p, the probability A that some
station acquires the channel :
∞
𝑗−1
1
𝑗𝐴 1 − 𝐴 =
𝐴
𝑗=0
Duration of each slot is 2t, the mean contention interval w= 2t/A (Max w=2t𝑒with poptimum)
Ethernet(Cont.)
Ethernet Performance
channel efficiency:
If the mean frame takes P sec to transmit, when many stations have frames to send channel efficiency (E)
can be expressed as
𝑃
𝐸=
𝑃 + 2𝜏/𝐴
The longer the cable the longer the contention interval; This is why the Ethernet standard specifies the
maximum cable length.
Thus, considering
For the optimal case e contention slots per frame and using P = F/B
Frame length F
1
Network bandwidth B 𝐸=
1 + 2𝐵𝐿𝑒/𝑐𝐹
The cable length L
Speed of signal propagation c
When the term 2𝐵𝐿𝑒/𝑐𝐹>> 0 the network efficiency becomes very low.
o Increasing BL; Bandwidth and/or Length of the cable reduces the efficiency.
o This is contrary to the design criteria to have largest possible bandwidth and longest connections.
o Classic Ethernet implemented in this manner is not the best system for these applications
Ethernet(Cont.)
Switched Ethernet
Long cable architecture of classic Ethernet often
suffers from problems associated with finding
breaks or loose connections.
Replaced with a different kind of wiring pattern
in which each station has a dedicated cable
running to a central hub.
A hub simply connects all the attached wires
electrically, as if they were soldered together.
Advantage :
Reuse of spare twisted pair cable.
Cable breaks can be detected easily. Maintenance becomes easier
Adding or removing a station is simpler.
Limitation :
Maximum cable run from hub is upto 100m or 200m(high quality cat 5 cable)
Do not increase capacity. As more and more stations are added, each station gets a decreasing
share of the fixed capacity.
Leads to development and use of switched Ethernet
Ethernet(Cont.)
Switched Ethernet
Looks appropriate to handle the increased load in LAN
efficiently as compared to hub.
Switch :
From outside looks like a hub typically with 4 to 48 ports each
with a standard RJ-45 connector for a twisted-pair cable.
Ports are interconnected through a high speed backplane.
Similarity with hub :
o Easy to add or remove a new station by plugging or unplugging a
wire.
o Easy to find most faults since a flaky cable or port will usually
affect just one station.
Operation of switch:
• After receiving data frame through a port output frames to the
ports for which those frames are destined.
• The destination port then transmits the frame on the wire so that
it reaches the intended station.
• None of the other ports even knows the frame exists.
Ethernet(Cont.)
Switched Ethernet
Handling collision in switch and hub
Hub :
All stations are in the same collision domain.
Uses CSMA/CD for scheduling transmission.
Switch :
Each port has its own independent collision domain.
Doesn’t effect other port’s transmission if occurs at the same time.
Full duplex transmission possible without the use of CSMA/CD.
Only half duplex transmission requires CSMA/CD.
Important to note :
A switch improves performance over a hub.
Since there are no collisions, the capacity is used more efficiently.
Multiple frames can be sent simultaneously(by different stations).
Includes buffering to handle multiple frames reaching at the same output port simultaneously.
A switch also gives security benefits to the traffic.
With a hub, every computer that is attached can see the traffic sent between all of the other computers.
With a switch, traffic is forwarded only to the ports where it is destined.
Ethernet(Cont.)
Fast Ethernet
With time it seemed that data expanded to fill the bandwidth available for their
transmission.
In Ethernet switches, the maximum bandwidth of a single computer was limited by the cable that
connected it to the switch port.
Data rate of switched Ethernet required to increase.
The work was done quickly (by standards committees’ norms), and the result, 802.3u, was
approved by IEEE in June 1995.
Technically, 802.3u is not a new standard, but an addendum to the existing 802.3 standard (to
emphasize its backward compatibility).
This strategy is used a lot. Since practically everyone calls it fast Ethernet, rather than 802.3u.
Basic Idea :
Keep all the old frame formats, interfaces, and procedural rules, but reduce the bit time from 100 nsec
to 10 nsec.
Still detect collisions on time by just reducing the maximum cable length by a factor of 10.
Ethernet(Cont.)
Fast Ethernet
Structure :
All fast Ethernet systems use hubs and switches with a specific choice of cables as per requirement.
All of the 802.11 techniques use short-range radios to transmit signals in either the 2.4-GHz or
the 5-GHz ISM frequency bands license free.
Signals may get interfered with the use of devices such as microwave oven, cordless phones and
many more mostly in 2.4 GHz band.
5 GHz can be better for short range applications due to the higher frequency.
All of the transmission methods also define multiple rates and uses rate adaptation based on
current conditions.
(i.e. If the wireless signal is weak, a low rate can be used. If the signal is clear, the highest rate can be
used)
Wireless LANS(Cont.)
The 802.11 Physical Layer
More on transmission techniques :
802.11b :
uses spread spectrum method and supports rates of 1, 2, 5.5, and 11 Mbps. (Initially 1 to 2 Mbps but later it enhanced
to 11 Mbps)
Uses barker sequence (since of less autocorrelation between spectrum sequences) with BPSK and QPSK modulation for
lower speed (i.e.1 and 2 Mbps respectively).
Uses CCK (Complementary Code Keying) technique to construct code representing each baud as 4 bit/8 bit to enhance
data rate (i.e. 5.5/11 Mbps respectively).
802.11a :
Supports rates up to 54 Mbps in the 5-GHz ISM band.
Uses OFDM technique with 52 subcarriers (i.e. 48 against data and 4 against synchronization)for transmission.
Bits undergoes binary convolutional coding for error correction.
Can run at eight different rates, ranging from 6 to 54 Mbps.
802.11g :
Comes after the lifting of rule in U.S. (i.e. 2.4 GHz ISM band transmission can’t use techniques other than spread
spectrum) in 2002 and approved by IEEE in 2003.
Copies the OFDM modulation methods of 802.11a but operates in the narrow 2.4-GHz ISM band along with 802.11b.
802.11n :
Ratified in 2009 and employs MIMO (Multiple Input Multiple Output) communication technique.
Uses up to four antennas to transmit up to four streams of information at the same time and separated at the receiver
through multiple antennas.
Wireless LANS(Cont.)
The 802.11 MAC Sublayer Protocol
802.11 tries to avoid collisions with a protocol called CSMA/CA (CSMA with Collision Avoidance).
CSMA/CA conceptually same as CSMA/CD meant for Ethernet as far as a station wants to transmit
(i.e. channel sensing before sending and exponential back off to avoid collisions).
A station that has a frame to send, starts with a random backoff (except in the case that it has not used
the channel recently and the channel is idle).
The station waits until the channel is idle, by sensing that there is no signal for a short period of time and
counts down idle slots, pausing when frames are sent.
It sends its frame when the counter reaches 0. If the frame gets through, the destination immediately
sends a short acknowledgement.
Lack of an acknowledgement is inferred to indicate an error, whether a collision or otherwise.
In this case, the sender doubles the backoff period and tries again, continuing with exponential backoff as
in Ethernet until the frame has been successfully transmitted or the maximum number of retransmissions
has been reached.
Wireless LANS(Cont.)
The 802.11 MAC Sublayer Protocol
Example:
Station A is the first to send a frame.
While A is sending, stations B and C become ready to
send.
They see that the channel is busy and wait for it to
become idle.
Shortly after A receives an acknowledgement, the
channel goes idle.
However, rather than sending a frame right away and
colliding, B and C both perform a back off.
C picks a short back off, and thus sends first.
B pauses its countdown while it senses that C is using
the channel, and resumes after C has received an
acknowledgement. Sending a frame with CSMA/CA.
B soon completes its back off and sends its frame.
Wireless LANS(Cont.)
The 802.11 MAC Sublayer Protocol
Difference from Ethernet :
Starting backoffs early helps to avoid collisions.
Avoidance is worthwhile because collisions are expensive, as the entire frame is transmitted even
if one occurs.
Acknowledgements are used to infer collisions because collisions cannot be detected.
Mode of operation:
DCF (Distributed Coordination Function) :
Each station acts independently, without any kind of central control.
PCF (Point Coordination Function) :
The access point controls all activity in its cell, just like a cellular base station.
Wireless LANS(Cont.)
The 802.11 MAC Sublayer Protocol
Handling the hidden & exposed node problem :
Source : Incapability of channel sensing due to limited Transmission range
To reduce ambiguities about which station is sending, 802.11 defines
channel sensing to consist of both physical sensing and virtual sensing.
Physical sensing : Simply checks the medium to see if there is a valid signal.
Virtual sensing : Each station keeps a logical record of when the channel is in
use by tracking the NAV (Network Allocation Vector).
NAV : The hidden terminal problem
• Each frame carries a NAV field that says how long the sequence of which this
frame is part will take to complete.
• Stations that overhear this frame know that the channel will be busy for the
period indicated by the NAV, regardless of whether they can sense a physical
signal.
• For example, the NAV of a data frame includes the time needed to send an
acknowledgement. All stations that hear the data frame will defer during
the acknowledgement period, whether or not they can hear the
acknowledgement.
The exposed terminal problem
Wireless LANS(Cont.)
The 802.11 MAC Sublayer Protocol
An optional RTS/CTS mechanism uses the NAV to prevent terminals from sending frames at the same time
as hidden terminals.
Example: Transmission of data from A to B
Assumptions : (i) C is within range of A (and possibly within range of B ) (ii) D is a station within range of B but not within range of A.
Protocol operation :
1. A begins by sending a RTS frame to B.
2. Upon receipt of RTS, B answers A with a CTS frame.
3. Upon receipt of CTS, A sends its frame and starts an ACK timer.
4. Upon correct receipt of the data frame, B sends an ACK frame.
5. If A’s ACK timer expires before the ACK gets back to it, it is
treated as a collision and the whole protocol is run again after a
backoff.
Virtual channel sensing using CSMA/CA
Role of NAV :
C is within range of A, so it may receive the RTS frame.
From the information provided in the RTS request, it can estimate how long the sequence will take, including the final
ACK and so it desists from transmitting anything until the exchange is completed.
It does so by updating its record of the NAV to indicate that the channel is busy.
D does not hear the RTS, but it does hear the CTS since within range of B and so it also updates its NAV.
Wireless LANS(Cont.)
The 802.11 MAC Sublayer Protocol
Depending on needs of real operation several other mechanisms are included.
1. Reliability :
In contrast to wired networks, wireless networks are noisy and unreliable due to interference from other
devices in ISM band.
Use of acknowledgements and retransmissions is of little help if the probability of getting a frame
through is small.
Possible strategies to improve successful transmission :
Lower the transmission rate -- If too many frames are lost, a station can lower the rate.
Send shorter frames -- If the probability of any bit being in error is p, the probability of an n-bit frame being received
entirely correctly is (1 − p)n.
Ex : Assume p = 10 -4
If the frame length is of 12,144 bits, then probability of receiving a full Ethernet frame correctly is less than 30%.
if the frames are only a third as long (4048 bits) two thirds of them will be received correctly.
In summary, if a frame is too long, it has very little chance of getting through undamaged and will probably have to
be retransmitted.
Wireless LANS(Cont.)
The 802.11 MAC Sublayer Protocol
Fragment burst :
To deal with the problem of noisy channels, 802.11 allows
frames to be fragmented into smaller pieces, called
fragments, each with its own checksum.
The fragments are individually numbered and
acknowledged using a stop-and-wait protocol (i.e., the
sender may not transmit fragment k + 1 until it has
received the acknowledgement for fragment k).
Once the channel has been acquired using RTS and CTS,
multiple fragments can be sent in a row, as shown in
Fig. sequence of fragments is called a fragment burst.
The NAV mechanism keeps other stations quiet only
until the next acknowledgement.
Fragmentation increases the throughput by restricting
retransmissions to the bad fragments rather than the
entire frame.
All of the above discussion applies to the 802.11 DCF
mode.
Wireless LANS(Cont.)
The 802.11 MAC Sublayer Protocol
2. Power saving :
Battery life is always an issue with mobile wireless devices.
To deal with this issue 802.11 supports power management while operating in PCF mode.
Goal : Clients need not waste power when they have neither information to send nor to receive.
Basic mechanism : Use of beacon frame and polling by AP.
Beacons are periodically broadcasted by the AP (e.g. every 100 or 1000msec) indicating its presence.
Also contains system parameters and the time, how long until the next beacon.
Besides, AP also does polling form clients to know whether it has the data to transmit/receive.
If client has data to transmit then responds to poll and transmit to AP following which goes to sleep mode.
Receive Process :
Clients can intimate AP when it enters to power-save mode.
In this mode, the client can doze and the AP will buffer traffic intended for it.
To check for incoming traffic, the client wakes up for every beacon, and checks a traffic map that is sent as part of
the beacon.
This map tells the client if there is buffered traffic for it.
If so, the client sends a poll message to the AP, which then sends the buffered traffic.
The client can then go back to sleep until the next beacon is sent.
Wireless LANS(Cont.)
The 802.11 MAC Sublayer Protocol
3. Quality of service:
Applications such as VoIP takes the attention of 802.11 to focus on quality of service by giving different priority
to different traffics.
802.11 supports coexistence of DCF and PCF for such kind of need.
Works by extending CSMA/CA with carefully defined intervals between frames.
After a frame has been sent, a certain amount of idle time is required before any station may send a frame.
Different time intervals are defined for different kinds of frames.
DIFS (DCF Inter Frame Spacing) : Meant for regular DCF data frames
SIFS (Short Inter Frame Spacing) : Meant for short frames such as RTS, CTS, fragments.
AIFS (Arbitration Inter Frame Spacing) : Meant for different priority frames
EIFS (Extended Inter Frame Spacing) : Meant for unknown/bad frame
Wireless LANS(Cont.)
The 802.11 MAC Sublayer Protocol
More on inter frame spacing:
DIFS (DCF Inter Frame Spacing) :
Interval between regular data frame.
Any station may attempt to acquire the channel to send a new
data frame after the medium has been idle for DIFS.
SIFS (Short Inter Frame Spacing) :
The shortest interval among all.
Allows the parties in a single dialog the chance to go first.
Examples : ACK, RTS, CTS, Fragments
AIFS (Arbitration Inter Frame Spacing) :
Used by AP for sending priority based traffic.
EX :
o AIFS1: AP will wait for a shorter interval before it sends the voice
traffic, and thus send it before regular traffic.
o AIFS4: AP will wait for a longer interval before it sends regular
traffic the opportunity to transmit first.
EIFS (Extended Inter Frame Spacing) : Inter frame spacing in 802.11
Used only by a station that has just received a bad or unknown
frame, to report the problem.
Wireless LANS(Cont.)
The 802.11 Frame Structure
802.11 standard defines three different classes of frames in the air: data, control, and management.
Data frame :
Frame control : Size 2 bytes and made up of 11 subfields
Protocol version : Set to ‘00’ - allow two versions of 802.11 protocol to operate at the same time in the same cell.
Type : Indicates (data, control, management)
EX : Type -‘10’, Subtype – ‘0000’ indicates a regular data frame
Subtype : (e.g. RTS or CTS).
To DS and From DS : ‘1’ - Indicate whether the frame is going to or coming from the network using APs (i.e. distribution
system)
More fragments : ‘1’ – Means more fragments will follow after it
Retry : ‘1’ - Retransmission of a frame sent earlier
Power management : ‘1’ - Sender is going into power-save mode
More data : ‘1’ – More data frames to come for receiver
Protected : ‘1’ – Encrypted frame body
Order : ‘1’ – Higher layer to expect frame to arrive in sequence
Format of the 802.11 data frame
Wireless LANS(Cont.)
The 802.11 Frame Structure
Data frame :
Duration :
Tells how long the frame and its acknowledgement will occupy the channel(in microseconds).
Present in other frames (i.e. control and management)
o In management indicates the NAV.
Address :
Data frames involving AP uses all 3 fields.
1st address – Receiver (AP /station)
2nd address – Sender (AP/station)
3rd address – Distant point/station for which AP acts as relay.
Sequence :
A number associated with frames to check duplicity.
Of the 16 bits available
o 4 identify the fragment
o 12 carry a number that is advanced with each new transmission
Data : Contains the payload, up to 2312 bytes.
Check sequence : 32-bit CRC Format of the 802.11 data frame
Wireless LANS(Cont.)
The 802.11 Frame Structure
Control frame :
Short in size.
Contains the Frame control, Duration, and Frame check sequence fields.
May have only one address and no data portion.
Most of the key information is conveyed with the Subtype field (e.g., ACK, RTS and CTS).
Management frame :
Similar to that of data frames, except without one of the base station addresses, because
management frames are restricted to a single cell.
Wireless LANS(Cont.)
Data Link Layer Switching
Many organizations have multiple LANs and wish to connect them.
Requires the use of Repeaters, Hubs, Bridges, Switches, Routers, and Gateways
Possible reasons why a single organization may end up with multiple LANs.
• First, many university and corporate departments have their own LANs, primarily to connect their own personal
computers, workstations, and servers. Since the goals of the various departments differ, different departments choose
different LANs, without regard to what other departments are doing.
• Second, the organization may be geographically spread over several buildings separated by considerable distances.
• Third, it may be necessary to split what is logically a single LAN into separate LANs to accommodate the load.
• Fourth, in some situations, a single LAN would be adequate in terms of the load, but the physical distance between the
most distant machines is too great (e.g., more than 2.5 km for Ethernet).
• Fifth, there is the matter of reliability. On a single LAN, a defective node that keeps outputting a continuous stream of
garbage can cripple the LAN.
• Sixth, bridges can contribute to the organization's security. Most LAN interfaces have a promiscuous mode, in which all
frames are given to the computer, not just those addressed to it. Spies and busybodies love this feature.
Wireless LANS(Cont.)
Data Link Layer Switching
Repeaters, Hubs, Bridges, Switches, Routers, and Gateways :
All of these devices are in common use.
Operate in different layers. Why?
Different devices use different pieces of information to decide how to
switch.
A typical scenario :
• The user generates some data to be sent to a remote machine.
Which device is in which layer
• Those data are passed to the transport layer, which then adds a
header (for example, a TCP header) and passes the resulting unit
down to the network layer. The network layer adds its own
header to form a network layer packet (e.g., an IP packet).
• Then the packet goes to the data link layer, which adds its own
header and checksum (CRC) and gives the resulting frame to the
Frames, packets, and headers
physical layer for transmission, for example, over a LAN.
Wireless LANS(Cont.)
Data Link Layer Switching
Repeaters
These are analog devices that work with signals on the cables to which they are connected.
A signal appearing on one cable is cleaned up, amplified, and put out on another cable.
Repeaters do not understand frames, packets, or headers.
They understand the symbols that encode bits as volts.
Example :
In classic Ethernet four repeaters are used for boosting the signal to extend the maximum cable length from
500 meters to 2500 meters.
Hubs
A hub has several input lines that it joins electrically.
Frames arriving on any of the lines are sent out on all the others.
If two frames arrive at the same time, they will collide.
All the lines coming into a hub must operate at the same speed.
Differ from repeaters in that they do not (usually) amplify the incoming
signals and are designed for multiple input lines.
Like repeaters, hubs are physical layer devices that do not examine the link layer
addresses or use them in any way.
Wireless LANS(Cont.)
Data Link Layer Switching
Bridge
Connects two or more LANs.
When a frame arrives, the bridge extracts the destination address from the
frame header and looks it up in a table to see where to send the frame.
The bridge only outputs the frame on the port where it is needed and can
forward multiple frames at the same time.
It also offer the input lines may run at different speeds, possibly
even with different network types using a buffer.
Limitation -- Used for connection between same kind of LAN.
Switches
Switches are modern bridges by another name with more ports.
Most often used to connect individual computers.
Wireless LANS(Cont.)
Data Link Layer Switching
Router
When a packet comes into a router, the frame header and trailer are stripped off and the packet located in
the frame’s payload field is passed to the routing software.
This software uses the packet header to choose an output line.
For an IP packet, the packet header will contain a 32-bit (IPv4) or 128-bit (IPv6) address.
Used for connection between different kinds of LAN.
Transport gateways
These connect two computers that use different connection-oriented transport protocols.
For example, suppose a computer using the connection-oriented TCP/IP protocol needs to talk to a
computer using a different connection-oriented transport protocol called SCTP.
The transport gateway can copy the packets from one connection to the other, reformatting them as
need be.
Application gateways
It understand the format and contents of the data and can translate messages from one format to
another.
• An email gateway could translate Internet messages into SMS messages for mobile phones.