Title: Scheduling approaches to MAC
1Scheduling approaches to MAC
- About random access
- Simple and easy to implement
- In low-traffic, packet transfer has low-delay
- However, limited throughput and in heavier
traffic, packet delay has no bound. A station of
bad luck may never have a chance to transfer its
packet. - Scheduling approach
- provides orderly access to shared medium so that
every station has chance to transfer
2Scheduling approachreservation protocol
- The time line has two kinds of periods
- Reservation interval of fixed time length
- Data transmission period of variable frames.
- Suppose there are M stations, then the
reservation interval has M minislots, and each
station has one minislot. - Whenever a station wants to transfer a frame, it
waits for reservation interval and broadcasts
reservation bit in its minislot. - By listening to the reservation interval, every
station knows which stations will transfer
frames, and in which order. - The stations having reserved for their frame
transfer their frames in that order - After data transmission period, next reservation
interval begins.
3Reservation protocol
Frames-transmission
Reservation interval
0 1 2 3 4 5 6 7
0 1 2 3 4 5 6 7
1
1
1
1
3
5
1
1
3
7
4Scheduling approachpolling protocol
- Stations take turns accessing the medium
- At any time, only one station has access right to
transfer into medium - After this station has done its transmission, the
access right is handed over (by some mechanism)
to the next station. - If the next station has frame to transfer, it
transfers the frame, otherwise, the access right
is handed over to the next next station. - After all stations are polled, next round polling
from the station 1 begins.
5Centralized polling vs. distributed polling
- Centralized polling a center host which polls
the stations one by one - Distributed polling station 1 will have the
access right first, then station 1 passes the
access right to the next station, which will
passes the access right to the next next station,
6Interaction of polling messages and transmissions
in polling systems
polling messages
2
1
4
5
3
1
2
M
t
packet transmissions
Figure 6.28
7Station interfaces are connected to form a
ring by point-to-point
lines
Stations are attached to the ring
by station interfaces.
token
Note point-to-point lines, not a shared bus.
Token a small frame, runs around the ring,
whichever gets the token, it has the
right to transmit data frames.
The information flows in one direction.
Station interfaces have important functions.
Token-passing rings a distributed polling
network
Figure 6.30
8Two modes of interface 1. Listen mode, like a
repeater but with some delay, because every
arriving bit will be copied into a 1-bit buffer
and then copied out. While in the buffer, the
bit can be monitored, i.e., inspected and even
modified. Therefore, 1-bit delay
2.
Transmit mode transmit frames from its attached
station
When monitoring, if it finds the passing bits
are a data frame with its attached station as
destination, then it catches the frame, i.e.,
copy the bits into its station (may refrain from
outputting them).
If it finds the passing bits are free token,
then if the station has information to send,
it will change the token to busy (set one bit
to 1) and change to transmit mode.
listen mode
transmit mode
1 bit delay
input from ring
output to ring
delay
to station
to station
from station
from station
Token-passing rings a distributed polling system
Figure 6.30
9Removing a frame
A transmitted frame needs to be removed
(absorbed). Who removes it?
Choice one destination station Choice two
transmitting station itself.
Choice two is preferred because the destination
can insert ACK into the frame and transmitter
will get the ACK from its own transmitted frame.
10a). The free token is inserted immediately after
the last bit of data frame is sent b). Insert
the free token after the last bit of busy token
is received c). Insert the free token after the
last bit of data frame is received.
Generally when a station seizes the token, it
can only transmit limited number of frames or
limited time interval.to avoid occupying too long.
d
a)
b)
c)
d
d
d
d
Free token
Busy token
Approaches to token reinsertion a). multitoken,
b). single token, c)single packet
Figure 6.31
11Comparison of scheduling random access
- Scheduling
- Methodical orderly access
- Less variability in delay, supporting
applications with stringent delay requirement. In
high load, performance is good. E.g., token-ring
may reach nearly 100 percent of performance when
all stations have plenty of information to send. - Some channel bandwidth carries explicit
scheduling information - Random access
- Chaotic, unordered access
- If rich bandwidth and light load, random access
has low delay, otherwise, delay is undeterminably
large. - Quite a lot bandwidth is used in collision to
alert stations of the presence of other
transmissions.
12LAN bridges
- Repeater used to connect two or more networks at
physical layer - Bridge used to connected two or more networks at
data link or MAC layer - Router used to connect two or more networks at
network layer - Gateway connect two or more networks at higher
layers.
13LAN bridges functions
- Bridges are generally used to connect LANs by
- Extending a LAN which reach saturation, called
bridged/extended LAN - Connect different departments LANs, these LANs
- Use different network layer protocols, bridges
are fine because bridges operate at data link
layer which supports different network layer
protocols - Located in different building, bridges are fine
because bridges can be connected by
point-to-point link - Are different LANs bridges need to have ability
to convert between different frame format - Security is big problem in LAN, why?
- So bridges need to have some ability of dealing
with security issue such as filtering frames,
controlling flow of frames in and out. - Bridge is better than repeater when connect two
exact same LANs because bridge has the ability to
reduce traffic by confining local traffic. - Bridge will monitor MAC address of frames so it
can not be in physical layer - Bridge have no routing ability so it is not in
network layer.
14Bridges generally connect the same types of
LANs, so they generally operate at MAC layer.
Network
Network
Bridge
LLC
LLC
MAC
MAC
MAC
MAC
Physical
Physical
Physical
Physical
Interconnection by a bridge
Figure 6.80
15A bridged LAN
Port 1
Port 2
Figure 6.79
16Three type bridges
- Transparent bridges means that stations are
completely unaware of the presence of bridges.
Used in Ethernet LANs. No burden in stations,
bridges take care of all connection related
functions. - Source routing bridge used in token-ring and
FDDI LANs. Burden on stations. Source station
needs to give route to the destination. Bridges
just forward frames based on the route in the
frame.
- Mixed-media bridges used to interconnect LANs of
- different types. These bridges have abilities of
converting - between LANs.
17Transparent bridges
- Three basic functions
- Forwards frames from one LAN to another
- Learns where stations are attached to the LAN
- Prevents loops in the topology
- A transparent bridge is configured in
promiscuous mode
18Forwarding and forwarding table of bridges
- Port is a physical interface, a bridge have two
or more ports - For every station in bridged LAN, the port number
indicates - which part (direction) of the bridge this
station is attached to. - When a frame comes to a bridge, the bridge will
forward to the - port corresponding to the MAC address in
the table, which is the - destination physical address in the frame.
- 4. Question how to establish forwarding table?
No, automatically set up by self learning
Manually set up by administrator. Good?
19Bridge learning
When a bridge receives a frame, it searches
through the forwarding table
1. For source address, if not found, adds source
address along coming port into table
2. For destination address, if found, forwards
the frame to the corresponding port, except
the corresponding port being same as the coming
port
3. otherwise (not found), floods the frame to
all ports except the coming port
20S1
S2
S5
S3
S4
1.S1-gtS5
2.S3-gtS2
3.S4-gtS3
4.S2-gtS1
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
Any problem with it?
Figure 6.85
21LAN topology is dynamic
Life is never static in real world. The bridged
LAN change constantly.
Add station
Easy, learn again.
Move station
When find same MAC address, but coming from a
different port, update the port number.
Timer, associate every entry (a station) in
forwarding table a timer, when timer times out,
remove the entry from the table. Moreover, when
receiving a frame with a source MAC address, if
its entry is already in the table, then refresh
the timer.
Remove station
Any more problem?
22Loop in the topology will cause flooding forever
S1
S2
S5
S3
S4
S1-gtS5
LAN1
LAN2
LAN3
Bridge1
Bridge 2
port 1
port 2
port 1
port 2
Bridge3
Figure 6.85
23Spanning tree to break loop
- Main idea maintain a spanning tree to include
all stations but disable some ports
automatically. Thus, remove loop. - Assumptions unique LAN IDs, unique bridge IDs,
and unique port IDs. The - lowest ID is used to break a tie.
24Steps of spanning tree
- Select a root bridge which is the bridge with the
lowest bridge ID. - For each bridge except the root bridge, determine
the root port which is the port with least-cost
path ( lowest ID) to root bridge. - For each LAN, select a designated bridge, which
is the bridge offering the least-cost path (
lowest ID) from the LAN to root bridge. The port
connecting the LAN and the designated bridge is
called a designate port. - All root ports and designated ports are put into
forwarding table. These are only ports that are
allowed to forward frames. The other ports are
placed into a blocking state.
25(1)
(2)
(3)
(2)
(1)
(2)
(1)
(2)
Figure 6.86
26Figure 6.87
27Source routing bridges
- Putting burden on end stations, bridges are
mainly responsible for forwarding. - Each station determines the route to the
destination and put the routing information in
the header of the frame. - Source routing information is inserted only when
source and destination are in different LANs and
is indicated by I/G bit in source address.
28Frame format for source routing
- Control field contains type of frame, routing
information and length of it.
2. Designator contains a 12-bit LAN number and a
4-bit bridge number
3. The highest bit in source address indicates
whether it is source routing.
Routing
Route
Route
Route
Control
Designator-1
Designator-2
Designator-m
2 bytes
2 bytes
2 bytes
2 bytes
Destination
Routing
Source
Data
FCS
Address
Address
Information
Question how to find the route in the first
place?
Figure 6.88
29Route discovery in source routing
- Source broadcasts a single-route broadcast frame
with no route designator, which will arrive the
destination eventually - -Spanning tree algorithm may be used
to confine flooding. - Whenever a bridge gets the frame, it inserts its
number and out-going LANs number into the frame
and forwards to the out-going LAN. (The first
bridge also inserts its in-coming LAN number into
it). - When the destination gets the frame, it replies
with a broadcast of all-route broadcast frame
with no route designator.. - The bridges inserts its ID and out-going LAN
number and forwards to the out-going LAN (only
for this LAN whose number was not recorded in the
frame to prevent loop yet). - The source will get returned frames with all
possible routes, - so source can select best one (maybe cache it)
30Interconnection with source routing bridges
Suppose B1, B3, B4,B6 are part of spanning tree
Figure 6.89
31Routes followed by single-route broadcast frames
LAN3
B6
LAN5
B3
LAN1
B1
B4
LAN4
Figure 6.90
32Routes 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
Figure 6.91
33Mixed-media bridges
- Such as connect Ethernet and token-ring networks
- Convert between two address representations
- Ethernet has maximum size of 1500 bytes but
token-ring has no explicit limit. Drop frame if
it is too long because bridges do not do
segmentation - Token-ring has three status bits A, C and E, but
- no these bits in Ethernet, so no conversion
for them - Different transmission rate, so bridges need
buffer to store extra frame temporarily.
34IEEE LAN standards
- 802.2 LLC
- 802.3 CSMA-CD (I.e., Ethernet)
- Frame length 64 1518 (or client data 461500)
- 802.4 token-bus
- 802.5 token-ring
- FDDI (Fiber Distributed Data Interface)
- 802.11 wireless networks