Title: Module 8 LAN Part II
1Module 8LAN Part II
2- Textbook sections
- LG Section 6.6.2 Token-Ring and IEEE 802.5 LAN
Standard - LG Section 6.7.1 Transparent Bridges
- LG Section 6.7.2 Source Routing Bridges
- Topics
- Token-Ring (IEEE802.5)
- Overview
- Frame Format
- Priority Access Mechanism
- Ring Maintenance
- Ring Latency and Efficiency
- Transparent Bridges
- Overview
- Bridge Learning Packet filtering/Forwarding
- Spanning Tree
- Source Routing Bridges
31. Token Ring (IEEE 802.5) - Overview
- Introduction
- Token ring resolves collision problem by
requiring that stations take turns sending data.
- Each station may transmit only during its turn
and may send only one frame during each turn.
The mechanism that coordinates this rotation is
called token passing. - A token is a simple placeholder frame that is
passed from station to station around the ring.
A station may send data only when it has
possession of the token. - Access method
- Token passing (more details later)
- Addressing
- Six-byte physical address, which is imprinted on
the NIC card similar to Ethernet addresses - Electrical specification
- Signaling Differential Manchester encoding
- Data Rate Up to 16 Mbps
- Frame Format (more detail later)
- Considerations (more detail later)
41. Token Ring (IEEE 802.5) - Overview
- Token Passing Mechanism
- Free Token
- Whenever the network is unoccupied, it circulates
a simple three-byte token - This token is passed from Network Interface Card
(NIC) to NIC in sequence until it encounters a
station with data to send - Station with data to send
- It waits for the token to enter its network
board. If the token is free, the station may
then send a data frame. It keeps the token and
sets a bit inside its NIC as a reminder that it
has done so.
51. Token Ring (IEEE 802.5) - Overview
- Receiving station
- The data frame proceeds around the ring, being
regenerated by each station. Each intermediate
station examines the destination address. - If it finds that the frame is addressed to
another station then it relays the data frame to
its neighbor. - The intended recipient recognized its own
address, copies the message, check for errors,
and change four bits in the last byte of the
frame to indicate address recognized and frame
copied - The full packet then continues around the ring
until it returns to the sending station. - Token release (by the sending station)
- The sending station receives the frame and
recognizes itself in the source address field.
It then examines the address-recognized bits. If
they are set, it knows the frame was received. - The sending station then discard the used data
frame and release the token back to the ring.
6Token Passing Mechanism
7Token Passing Mechanism
8Token Passing Mechanism
9Token Passing Mechanism
101. Token Ring (IEEE 802.5) - Overview
- Advantages and disadvantages of token rings
- Advantages Fairness
- Disadvantages Consequences of a fault
- The entire network will fail if there is a break
in any transmission link or a failure in the
mechanism that relays a signal from one
point-to-point link to the next. - Remedy
- Star topology (LG Figure 6.58)
11LG Figure 6.58 Token-ring network implemented
using a star topology
Reliability is provided by relays that can
bypass the wires of stations that are deemed to
have failed (for example station E).
12LG Figure 6.61 IEEE 802.5 Token and data frame
structure
ED
SD
AC
Token Frame Format
Data Frame Format
1
1
4
2 or 6
1
2 or 6
1
1
Destination Address
Source Address
Information
AC
FS
SD
FCS
FC
ED
Starting delimiter
J K 0 J K 0
0
0
J, K non-data symbols (line code)
Access control
PPP Priority T Token bit M Monitor bit RRR
Reservation
P P P
T
M
R R R
FF frame type ZZZZZZ control bit
Frame control
Z Z Z Z Z Z
F F
I intermediate-frame bit E
error-detection bit
Ending delimiter
J K 1 J K 1
I
E
Frame status
A address-recognized bit xx undefined C
frame-copied bit
A
C
x x
A
C
x x
13- Starting delimiter (SD) field
- Alerts each station of the arrival of a token (or
data frame). This field includes signals that
distinguish the byte from the rest of the frame
by violating the differential Manchester encoding
scheme used elsewhere in the frame. - J violation has the same polarity as the
trailing element of the preceding symbol, but has
no transition in the middle - K violation has the opposite polarity as the
trailing element of the preceding symbol, but has
no transition in the middle. - To avoid an accumulating dc component, non-data
component are normally transmitted as a pair of J
and K symbols. - Access control (AC) field Includes four
subfields. - PPP subfield priority The IEEE 802.5 standard
allows the token ring to operated with a priority
access mechanism. To transmit a frame of a given
priority, a station must wait to capture a token
of equal or lower priority. - RRR subfield reservation The station can
reserve a token of the desired level by setting
the RRR field in passing frames to the level of
priority of its frame if the RRR level is lower
than the priority the station is seeking. - The priority bits (PPP) and the reservation bits
(RRR) work together to provide a priority access
mechanism
141. Token Ring (IEEE 802.5) Frame Format
- T subfield T 0 indicates a token frame, and T
1 indicates a data frame - M subfield The monitor bit is used by a
designated monitor station to identify and remove
orphan frames that are not removed from the
ring by their sending station. (details later) - Frame control field
- This field indicates whether a frame contains
data or control information. FF01 indicates a
data frame and the Z bits are ignored. FF00
indicates a control frame and the Z bits indicate
the type of control frame - Ending delimiter (ED) field
- I bit indicates the last frame in a sequence of
frames exchanges between two stations - E bit indicates that a station interface has
detected an error such as a line code violation
or a frame check sequence error.
151. Token Ring (IEEE 802.5) Frame Format
- Frame status (FS) field
- This field allows the receiving station to convey
transfer status information to the sending
station. - A 1 indicates that the destination address was
recognized by the receiving station - C 1 indicates that the frame was copied onto
the receiving stations buffer - Receiving station sets A and C bits. Sending
station examines A and C bits. - Setting A C bits
- When a frame arrives at the interface of the
receiving station, the interface turns on the A
bit as it passes through - If the interface copies the frame to the
receiving station, it turns on the C bit.
161. Token Ring (IEEE 802.5) Frame Format
- Frame status (FS) field
- Examining A C bits
- When the sending station drain the frame from the
ring, it examine the A and C bits - A 0 , and C 0 receiving station not
present or not powered up - A 1, and C 0 receiving station present
but frame not accepted - A 1, and C 1, receiving station present
and frame copied. - The A, C bits come at the beginning of the field
and are repeated in the fifth and sixth bits.
This repetition is for the purpose of preventing
errors and is necessary because the field
contains information inserted after the frame
leaves the sending station. It therefore cannot
be included in the CRC and so has no error
checking performed on it.
171. Token Ring (IEEE 802.5) Priority Access
Mechanism
- Priority access mechanism
- To transmit a frame of a given priority, a
station must wait to capture a token of equal or
lower priority - The station can reserve a token of the desired
level by setting the RRR field in passing frames
to the level of priority of its frame if the RRR
level is lower than the priority the station is
seeking - When the token arrives at a station that has a
frame of higher or equal priority, the token is
removed and a data frame is inserted into the
ring. The RRR field in the data frame is set to
0, and the priority field is kept at the same
value as the token frame. - When the station is done transmitting its frames,
it issues a token at the reserved priority level.
181. Token Ring (IEEE 802.5) Priority Access
Mechanism
- The priority access mechanism is a little
confusing and non-intuitive at first. The basic
rules are - To capture the token
- Any station wishing to capture the token can only
do so if the current priority of the token is
lower than its priority. - To reserve the token
- If the priority of the token is higher than the
priority of the station, the station may set the
priority reservation to request a lower priority,
but only if another station has not already set
the priority reservation to a higher value than
this stations priority - To reset the token priority
- Any station that raises the priority of the token
must lower the priority back down to its original
value the next time it sees a free token. This
makes sure that everybody gets a chance to talk
eventually.
191. Token Ring (IEEE 802.5) Priority Access
Mechanism
- An example of the priority access mechanism
201. Token Ring (IEEE 802.5) Priority Access
Mechanism
- An example of the priority access mechanism
(continue)
211. Token Ring (IEEE 802.5) Priority Access
Mechanism
- An example of the priority access mechanism
(continue)
221. Token Ring (IEEE 802.5) Priority Access
Mechanism
- An example of the priority access mechanism
(continue)
231. Token Ring (IEEE 802.5) Ring Maintenance
- Monitor station
- Token rings have a designated monitor station to
ensure the health of the ring. - Any station on the ring can become the monitor
station - There are defined procedures by which the monitor
is elected when the ring is first connected or on
the failure of the current monitor station - Functions performed by the monitor station
- Insert additional delay into the ring if
necessary - Ensure there is a token in the ring
- Use a timer to detect a missing token. (timer
equal to the maximum possible token rotation
time) - For example, a token may vanish because a failure
occurred in the station that was holding the
token.
241. Token Ring (IEEE 802.5) Ring Maintenance
- Check for corrupted or orphaned frames (without
monitor stations intervention, these frames
could circulate forever on the ring) - Corrupted frames are the ones having checksum
errors or invalid formats. - An orphaned frame is one that was transmitted
correctly onto the ring, but whose parent died
for example, the sending station went down before
it could remove the frame from the ring. - Approach Use the monitor bit (M) in the access
control field. This is 0 on transmission and set
to 1 the first time the frame passes the monitor
station. If the monitor sees a frame with this
bit sets, it knows the frame is going by for the
second time and the monitor station drains the
frame off the ring.
251. Token Ring (IEEE 802.5) Ring Latency and
Efficiency
- Ring latency and its impact on ring efficiency
- The ring latency is defined as the time that it
takes for a bit to travel around the ring and is
given by - ring latency propagation delay total station
interface delay - t d/v (Mb)/R in seconds
- where
- d total length of the links around the ring
- v propagation speed in the medium (typical
2108 meters/second) - M number of stations of the ring
- b interface delay incurred at each station
between when the interface receives a frame and
forwards it along the outgoing link (typical
value is 2.5) - R bit rate (typically between 4Mbps to 16
Mbps) - Ring latency can also be expressed in bits
- tR dR/v (Mb)
-
261. Token Ring (IEEE 802.5) Ring Latency and
Efficiency
- Token reinsertion approaches
- Single-token operation
- Single-packet operation
- Multi-token operation
-
27LG Figure 6.59 Ring latency and token reinsertion
strategies
(a) Low Latency Ring
A
A
A
A
t90, return of first bit
t400, transmit last bit
t490, reinsert token
t0, A begins frame
(b) High Latency Ring
A
A
A
A
t0, A begins frame
t840, return of first bit
t1240, reinsert token
t400, last bit of frame enters ring
28LG Figure 6.60 Reinsert token after header of
frame returns
(a) Low Latency Ring
A
A
A
A
t400, last bit enters ring, reinsert token
t90, return of first bit
t210, return of header
t0, A begins frame
(b) High Latency Ring
A
A
A
A
t400, transmit last bit
t840, arrival first frame bit
t960, reinsert token
t0, A begins frame
292. Transparent Bridges
- Bridges
- Three functions
- Address learning
- Based on the sender address
- Packet filtering/forwarding/flooding
- Based on the destination address
- Loop avoidance
302. Transparent Bridges
- Packet forwarding/filtering
- Filtering
- If the destination device is on the same segment
as the frame, the bridge blocks the frame from
going on to other segments. - Forwarding
- If the destination device is on a different
segment, the bridge forwards the frame to the
appropriate segments. - Flooding
- If the destination address is unknown to the
bridge, the bridge forwards the frame to all
segments except the one on which it was received.
312. Transparent Bridges - Bridge Learning Packet
Filtering/Forwarding
- Algorithm of build forwarding tables and
forwarding frames - When the bridge receives a frame, the source
address is compared to the forwarding table. If
the source address in not there, the source
address and port number of the frame are added to
the forwarding table. - The bridge then compares the destination address
with the forwarding table - If the destination address is in the table and is
on the same segment as the source address, the
frame is discarded. This filtering helps to
reduce network traffic and isolate segments of
the network. - If the destination address is in the table and
not in the same segment as the source address,
the bridge forwards the frame out of the
appropriate port to reach the destination
address. - If the destination address is not in the table,
the bridge forwards the packet to all of its
ports, except the one on which the frame
originated
32LG Figure 6.81Initial configuration
S5
S1
S2
S3
S4
LAN1
LAN2
LAN3
B1
B2
port 1
port 2
port 1
port 2
Address Port
Address Port
33LG Figure 6.82 S1 sends a frame to S5
S1
S2
S5
S3
S4
S1 S5
LAN1
LAN2
LAN3
B1
B2
port 1
port 2
port 1
port 2
Address Port
Address Port
S1
1
S1
1
34LG Figure 6.83 S3 sends a frame to S2
S1
S2
S5
S3
S4
S3 S2
LAN1
LAN2
LAN3
B1
B2
port 1
port 2
port 1
port 2
Address Port
Address Port
S1
1
S1
1
S3
2
1
S3
35LG Figure 6.84 S4 sends a frame to S3
S5
S1
S2
S3
S4
S4 S3
LAN1
LAN2
LAN3
B1
B2
port 1
port 2
port 1
port 2
Address Port
Address Port
S1
1
S1
1
S3
2
S3
1
2
S4
2
S4
36LG Figure 6.85 S2 sends a frame to S1
S1
S2
S5
S3
S4
S2 S1
LAN1
LAN2
LAN3
Bridge1
Bridge 2
port 1
port 2
port 1
port 2
Address Port
Address Port
S1
1
S1
1
S3
2
S3
1
2
S4
2
S4
S2
1
372. Transparent Bridges - Bridge Learning Packet
Filtering/Forwarding
- Collision/broadcast domains
- Collision domain A group of devices connected to
the same physical media such that if two devices
access the media at the same time, the result is
a collision of the two signals - Broadcast domain A group of devices in the
network that receive one anothers broadcast
messages - Bridges reduce collisions
- Bridges reduce collisions by giving each segment
its own collision domain - Bridges do not stop broadcast messages
- Because a bridge learns all the station
destinations by listening to source addresses, it
will never learn the broadcast address.
Therefore, all broadcasts will always be flooded
to all the segments on the bridge. All segments
in a bridged environment are therefore considered
to be in the same broadcast domain
382. Transparent Bridges Spanning Tree
- Multiply redundant paths exist between LAN
segments - To improve fault tolerance
- Side effect frames can cycle and multiply
within the interconnected LAN - Bridges dynamically selected a subset of the LAN
interconnections that provides a loop-free path
from any LAN to any other LAN using the spanning
tree algorithm - Even after the spanning tree has been
established, the algorithm continues to run in
order to automatically detect topology changes
and update the tree. The distributed algorithm
used for constructing the spanning tree was
invented by Perlman.
392. Transparent Bridges Spanning Tree
Two LAN segments are connected by two bridges
Segment 1
Segment 2
402. Transparent Bridges Spanning Tree
- Example Two LANs connected by two bridges
- Initially, host B has not sent out any packet,
so neither bridge knows to which segment host B
is connected. - Host A sends a packet to host B
- One of the bridge, say Br1, receives the packet
first and, not knowing where host B is, forwards
the packet to segment 2. - The packet goes to its destination (host B), but,
at the same time, Br2 receives the packet via
segment 2. - The packet source address is host A, and its
destination address is host B. Br2 erroneously
assumes that host A is connected to segment 2 and
updates its table accordingly. Because it does
not have any information about host B. Br2
forwards the packet to segment 1.
412. Transparent Bridges Spanning Tree
- Example Two LANs connected by two bridges
(continues) - 5. The packet is then received for the second
time by Br1. Br1 thinks it is a new packet from
host A and, because it has no information about
host B. Br1 forwards the packet to segment2. - 6. Now Br2 receives the packet once again, and
the cycle will repeat endlessly.
422. Transparent Bridges Spanning Tree
- Concept
- The spanning tree algorithm is used in data
structure to create a tree out of a graph - A tree should include all nodes with minimum
number of lines connected to nodes - A node has to be selected as the root
- Trees are not unique. However, we are interested
in one spanning tree where each node has the
shortest path to the roots
432. Transparent Bridges Spanning Tree
- Spanning tree algorithm
- Root bridge
- Select a root bridge among all the bridges in the
bridged LAN. The root bridge is the bridge with
the lowest bridge ID - Root port
- Determine the root port for each bridge except
the root bridge in the bridged LAN - The root port is the port with the least-cost
path to the root bridge. - In case of ties the root port is the one with
lowest port ID - Cost is assigned to each LAN according to some
criteria. (One criteria could be to assign higher
costs to lowest speed LANs) - A path cost is the sum of the costs along the
path from one bridge to another
442. Transparent Bridges Spanning Tree
- Spanning tree algorithm
- Designated bridge
- Select a designated bridge for each LAN. The
designated bridge is the bridge that offers the
least-cost path from the LAN to the root bridge. - In case of ties the designated bridge is the one
with the lowest bridge ID - The port that connects the LAN and the designated
bridge is called a designated port
45LG Figure 6.86 Sample topology
(1)
(2)
(3)
(2)
(1)
(2)
(1)
(2)
463. Source Routing Bridges
- Source route bridging is a methods whereby one
end host locates another end host by discovering
available paths. Once all paths to the
destination are known, the source host choose the
route to use. Paths are determined by sending
explore frames - Tradeoff
- Transparent bridges have the advantage of being
easy to install. On the other hand, they do not
make optimal use of the bandwidth, since they
only use a subset of the topology (the spanning
tree) - Background
- A split within the 802 committee
- The CSMA/CD and token bus people chose the
transparent bridge - The ring people (with encouragement from IBM)
preferred a scheme called source routing.
473. Source Routing Bridges
- Description
- Source routing assumes that the sender of each
frame knows whether or not the destination is on
its own LAN - When sending a frame to a different LAN, the
source sets the high-order bit of the source
address to 1, to mark it - Source includes in the frame header the exact
path that the frame will follow
483. Source Routing Bridges
- Frame header
- Source address field When sending a frame to a
different LAN, the source sets the high-order bit
of the source address to 1 - Routing control field (2 bytes)
- Types of frame
- Length of the routing information field
- Direction of the route given by the route
designator fields - Largest frame supported over the path
- Route designator field (2 bytes)
- 12-bit LAN number
- 4-bit bridge number
49LG Figure 6.88 Frame format for source routing
Routing
Route-1
Route-2
Route-m
Control
Designator
Designator
Designator
2 bytes
2 bytes
2 bytes
2 bytes
Destination
Routing
Source
Data
FCS
Address
Address
Information
503. Source Routing Bridges
- Route discovery procedure
- Single-route broadcast frame first the station
broadcasts a special frame. The frame visits
every LAN in the bridged LAN exactly once,
eventually reaching the destination station. - Upon receipt of this frame, the destination
station responds with another special frame,the
all-route broadcast frame, which generates all
possible routes back to the source station. - To prevent all-route broadcast frames from
circulating in the network, a bridge first checks
whether the outgoing LAN number is already
recorded in the route designator field. The
bridge will not forward the frame if the outgoing
LAN number is already recorded - After collecting all routes, the source station
chooses the best route and saves it.
51LG Figure 6.89 LAN interconnection with source
routing bridges
52LG Figure 6.90 Route followed by single-route
broadcast frames
LAN3
B6
LAN5
B3
LAN1
B1
B4
LAN4
53LG Figure 6.91 Routes followed by all-routes
broadcast frames
B3
B2
LAN1
B1
LAN2
B5
LAN4
B4
B7
LAN1
B1
B2
LAN3
B6
B3
LAN2
B5
B4
LAN4
B7
B1
LAN1
B2
B4
LAN2
LAN4
B5
B3
LAN5
B7
B3
LAN1
B5
B1
B2
LAN3
B6
B4
LAN2
LAN1
B1
B2
B3
LAN3
B5
B7
LAN4
B6
B3
B2
LAN1
B1
LAN2
B4
LAN1
LAN3
B5
B1
B2
B3
LAN2
B4
B6