Unit 3: Local Area Network
Unit 3: Local Area Network
Unit 3: Local Area Network
Logical Link
Control
Medium Access
Layer
Data Link
Control
to Physical Layer
Medium Access Protocols
Random Access
• Each station has the right to the medium without being controlled by
any other station
• Collision, a access conflict, if more than one station tries to send
ALOHA
(Abramson's Logic of Hiring Access )
• The basic idea is applicable to any system in which uncoordinated users
are competing for the use of single shared channel.
• Two versions: Pure & Slotted.
• Differences
• They differ w.r.t. whether or not time is divided up into discrete slots into
which frames must fit.
• Pure ALOHA does not require global time synchronization; slotted ALOHA
does.
ALOHA cont…
• The basic idea is simple: let users transmit whenever they have data to be
sent.
• There will be collisions, of course, and colliding frames will be destroyed.
• Due to Feedback Property of broadcasting A sender can always find out
whether or not its frames was destroyed by listening to the channel.
• If the frame was destroyed, the sender just waits for some time & sends it
again.
• Systems in which multiple users share a common channel in a way that can
lead to conflicts are widely known as contention systems.
Pure ALOHA
• In this case, we’ve made the frames all the same length because the throughput of
ALOHA systems is maximized by having a uniform size rather than allowing variable
length frames.
• Whenever two frames try to occupy the channel at the same time, there will be a
collision & both will be garbled.
• If the first bit of a new frame overlaps with just the last bit of a frame almost finished,
both frames will be totally destroyed, & both will have to be retransmit later.
If a frame is damaged, the sender waits a random amount of time and sends it again.
Contention systems: If multiple users in a system share a common channel in a way that
can lead to conflicts, the system is called contention system.
What is the efficiency of Pure ALOHA?
Frame time: the amount of time needed to transmit a fixed-length frame.
Infinite users.
New frames are generated according to a Poisson distribution with a mean number of N
frames per frame time.
Throughput is avg rate of successful message delivery over a communication channel, measured in
bits/sec.
In pure ALOHA, frames are transmitted at completely arbitrary
times
What is the efficiency of an ALOHA Channel??
• What fraction of all transmitted frames escape collisions under these chaotic
circumstances?
• Lets consider an infinite collection of interactive users sitting at their
computers (stations).
• A User is always in one of the two states:
(a) Typing (b) Waiting
Initially all users are in typing state. When a line is finished, the user stops
typing, waiting for a response.
The station then checks the channel to see if it was successful
• If YES, the user sees the reply & goes back to typing
• If NO, the user continues to wait & the frame is retransmitted over & over
until it has been successfully sent.
• Let the “frame time” denote the amount of time needed to transmit the
standard fixed-length frame( i.e. the frame length divided by the bit rate).
• Assume that the infinite population of users generate new frames
according to Poisson distribution.
• If N>1, the user community is generating frames at a higher rate than the
channel can handle, & nearly every frame will suffer a collision.
• In addition to the new frames, the stations also generate retransmission of
frames that previously suffered collisions.
A frame will not suffer a collision if no other frames are sent within
one frame time of its start
Data Communications,
12-44
Kwangwoon University
Persistence Strategy
• Nonpersistent strategy
– Reduces the chance of collision
– Reduces the efficiency of the network
• 1-persistent
– Increases the chance of collision
• p-persistent
– Reduces the chance of collision and improves the
efficiency by combining the other two strategies.
I. 1-Persistent Protocol
• When a station has data to send, it first listens to the channel to see if anyone else is
transmitting at that moment. If the channel is busy, the station waits until it becomes idle.
• When the station detects an idle channel, it transmits a frame.
• If a collision occurs, the station waits a random amount of time and starts all over again.
The protocol is called 1-persistent because the station transmits with a probability of 1
when it finds the channel idle.
• The propagation delay has an important effect on the performance of the protocol.
• There is a small chance that just after a station begins sending, another station will
become ready to send and sense the channel.
• If the first station's signal has not yet reached the second one, the latter will sense an idle
channel and will also begin sending, resulting in a collision.
• The longer the propagation delay, the more important this effect becomes, and the worse
the performance of the protocol.
• 1-Persistent Protocol is far better than pure
ALOHA because both stations have the
decency to desist from interfering with the
third station's frame. Intuitively, this
approach will lead to a higher performance
than pure ALOHA. Exactly the same holds for
slotted ALOHA.
II. Non Persistent CSMA.
• In this protocol, a conscious attempt is made to be less greedy than
in the previous one.
• Before sending, a station senses the channel. If no one else is
sending, the station begins doing so itself.
• However, if the channel is already in use, the station does not
continually sense it for the purpose of seizing it immediately upon
detecting the end of the previous transmission.
• Instead, it waits a random period of time and then checks the
channel again and if free use it for transmission.
Difference
• Non-Persistent algorithm leads to better
channel utilization but longer delays than 1-
persistent CSMA.
P- Persistent CSMA
• It applies to slotted channels and works as follows :
• When a station becomes ready to send, it senses the channel.
• If it is idle, it transmits with a probability p.
• With a probability q = 1 - p, it defers until the next slot.
• If that slot is also idle, it either transmits or defers again, with probabilities p and q.
• This process is repeated until either the frame has been transmitted or another station
has begun transmitting.
• In the latter case, the unlucky station acts as if there had been a collision (i.e., it waits a
random time and starts again).
• If the station initially senses the channel busy, it waits until the next slot and applies
the above algorithm.
Figure shows the computed throughput versus offered traffic for all three
protocols, as well as for pure and slotted ALOHA.
• Persistent and non persistent CSMA protocols
are clearly an improvement over ALOHA
because they ensure that no station begins to
transmit when it senses the channel busy.
• Another improvement is for stations to abort
their transmissions as soon as they detect a
collision.
CSMA with Collision Detection
• if two stations sense the channel to be idle and begin transmitting
simultaneously, they will both detect the collision almost immediately.
• Rather than finish transmitting their frames, which are irretrievably
garbled anyway, they should abruptly stop transmitting as soon as the
collision is detected.
• Quickly terminating damaged frames saves time and bandwidth. This
protocol, known as CSMA/CD (CSMA with Collision Detection) is widely
used on LANs in the MAC sublayer.
• In particular, it is the basis of the popular Ethernet, LAN
CSMA/CD (Collision Detection)
CSMA/CD: Flow Diagram
CSMA/CD: Energy Level & Throughput
• Energy level during transmission, idleness, or collision
Note
In the first interval, only stations 1, 3, and 4 have made reservations. In the second
interval, only station 1 has made a reservation.
Reservation
• In the reservation method, a station needs to make a
reservation before sending data.
• Time is divided into intervals. In each interval a reservation
frame precedes the data frames sent in that interval.
If there are N stations in the system, there are exactly N
reservation mini slots in the reservation frame. Each mini
slot belongs to a station. When a station needs to send a
data frame, it makes a reservation in its own mini slot. The
stations that have made reservations can send their data
frames after the reservation frame
Polling
(ask)
Token Passing
• ROUTER
NETWORK LAYER
• BRIDGE
DLL • SWITCH
• HUB
PHYSICAL LAYER • REPEATER
Network Devices
• Provide transport for the data that needs to be
transferred between end-user devices.
• Extend cable connections
• Concentrate connections
• Convert Data Formats
• Manage data transfer
• Each topology and network architecture has its
limits.
• Beyond a point networks networks can not be
expanded by simple adding more servers or
cabling
• Connectivity devices are the basic building
blocks of network expansion
Devices to Expand the Network
•Repeaters
•Bridges
•Switches
•Routers
•Gateway
Repeaters
• A repeater can be used to increase the length of your network by
eliminating the effect of attenuation on the signal.
• It connects two segments of the same network, overcoming the
distance limitations of the transmission media.
• Some repeaters also serve as transmission media adapters,
connecting two different types of media.
• Repeaters can connect segments that have the same access method.
(CSMA/CD, Token Passing, Polling, etc.)
• Disadvantages
• Repeaters do not filter data
• Its use is inappropriate when there is a heavy network traffic.
A repeater operates only in the physical layers
A repeater connects segments of a LAN
The repeater is a two-port device that extends the LANs’ physical length
Function of a Repeater
A repeater is a regenerator, not an amplifier
Hubs
• A hub is used as a central point of connection
among media segments.
• Hubs that are plugged into electric power are called Active
Hubs. It regenerates or amplifies the signal before they are
retransmitted.
• Drawback: The noise is also regenerated
• A hub that merely connects different cables on a network &
provide no signal regeneration is called a Passive Hub. It
functions only as a connection point for the signals . The
signal pass through a passive hub without regeneration or
amplification. is just a connector.
• TOPOLOGY
• Usually refers to the physical layout of network cable & devices.
• When all stations are connected to a central hub, the topology is known as
a star, because of its appearance.
Hubs are physical-layer repeaters
twisted pair
hub
Interconnecting with hubs
Backbone hub interconnects LAN segments
Extends max distance between nodes
But individual segment collision domains become one large collision
domain
Can’t interconnect 10BaseT & 100BaseT
hub
hub
hub hub
Advantages of Hubs
• Function
A network hub provides simple connectivity for a home network that
doesn't need complex switching to manage high rates of traffic.
• Cost
A simple network hub is significantly less expensive than a switch or
router. Some cost less than $30.
• Shared Internet Access
A network hub allows a single Internet connection to be shared among
multiple computers.
Advantages cont…
• Scalability
Network hubs may have four, five, eight or 16 ports to which computers
can be connected. Many network hubs also have an "uplink" port which
allows the user to connect multiple hubs so that more computers can be
connected to the network.
• Network Monitoring
Because network hubs transmit all data received to all connected devices,
they allow easy, inexpensive monitoring of the entire network.
Disadvantage of Hubs
20% of LAN
traffic travels
between LANs
Bridges
Advantages & Disadvantages of Bridging
• Transparent bridges
– A bridge in which the stations are completely unaware of the bridge’s
existence
– Three criteria for a transparent bridge
• Frames must forward from one station to another
• The forwarding table is automatically made by learning frame movements
in the network
• Loops in the system must be prevented
switch
collision
domain
hub
hub hub
B’ A’
Institutional network
mail server
to external
network
router web server
switch
IP subnet
hub
hub hub
Advantages of Switches
• Switches increase available network bandwidth.
• With switches there is reduced workload on individual
computers.
• Switches increase network performance.
• There are fewer frame collisions because switches create
collision domains for each connection.
• Switches have an unlimited number of ports and connect
directly to workstations.
Disadvantages of Switches
• Switches are significantly more expensive then
Bridges.
• Network connectivity problems can be difficult
to trace through a switch.
• Broadcast traffic maybe troublesome.
Router
• A router is a three-layer device that routes packets based on
their logical addresses (host-to-host addressing). A router
normally connects LANs and WANs in the Internet
and has a routing table that is used for making decisions
about the route. The routing tables are normally dynamic
and are updated using routing protocols.
• Provide filtering & network traffic control over LANs & MANs.
• Can connect multiple segments & networks.
Networks connected by Routers are called internetworks
because they create a larger network of interconnected,
smaller networks.
Router cont…
Data
Access
Control End Frame
Destination
Delimiter Status
Address
Access within a Token Ring
Example: Station 2 sends to station 1
1. Station 2 waits for free token
(transmission authorization, 3-Byte-
Token).
2. Station 2 changes free token into an
occupied one (occupied token =
frame header).
Afterwards, station 2 sends the
frame. (Station 2 may send further
frames, if the token holding timer
(default 10 ms) is not exceeded)
3. Station 2 terminates the frame and
waits until the frame passed the
whole ring and arrives again.
4. Station 1 copies the frame. Station 2
removes it from the ring and
produces a new, free token.
Token Passing
Token Passing
Token Passing
Token Passing
Token Bus(802.4)
Token messages are used for passing on the sending permission from station
ID to station nextID.
Data messages contain the data to be sent
Having the token, a station is allowed to send a message. After this (or if
nothing is to be sent) the token is passed on.
Traffic on the bus e.g.:
T5,17 → M17 → T17,21 → M21 → T21,22 → T22,42 → T42,63 → M63 → T63,149 → T149,5
→ M5 → T5,17 → …
High overhead for token exchange: 512 Bit times for each token message (a full
small size Ethernet frame)! In contrast to that, in Token Ring networks only one
bit is to be switched from 0 to 1, i.e. only one bit time for a token message.
Thus, the number of participating stations should be low, or the number of
masters should be low, you can tolerate very many slaves
Token Bus Frame Format
Token Bus vs. Token Ring
• The token bus operates on the same principle as the token ring. The
stations are organized into a ring and a token passes among them. A
station wanting to send something must wait for the token to arrive.
• The stations communicate via a common bus in an Ethernet.
• Generally, a station receives a token from its predecessor and sends
a token to its successor.
• Token bus stations must know their predecessor and successor.