local area netowrks 1
TRANSCRIPT
-
8/7/2019 Local Area Netowrks 1
1/80
Medium Access Control
Protocols and Local AreaNetworks
Part I: Medium Access Control
-
8/7/2019 Local Area Netowrks 1
2/80
Chapter Overview
Broadcast Networks All information sent to all
users
No routing
Shared media Radio
Cellular telephony
Wireless LANs
Copper & Optical
Ethernet LANs
Cable Modem Access
Medium Access Control To coordinate access to
shared medium
Data link layer since directtransfer of frames
Local Area Networks
High-speed, low-costcommunications betweenco-located computers
Typically based onbroadcast networks
Simple & cheap
Limited number of users
-
8/7/2019 Local Area Netowrks 1
3/80
Multiple Access Communications
Shared media basis for broadcast networks Inexpensive: radio over air; copper or coaxial cable
M users communicate by broadcasting into medium
Key issue: How to share the medium?
12
3
4
5M
Shared multipleaccess medium
-
8/7/2019 Local Area Netowrks 1
4/80
Medium sharing techniques
Static
channelization
Dynamic medium
access control
Scheduling Random access
Approaches to Media Sharing
Partition medium
Dedicatedallocation to users
Satellitetransmission
Cellular Telephone
Polling: take turns
Request for slot intransmissionschedule
Token ring
Wireless LANs
Loosecoordination
Send, wait, retry ifnecessary
Aloha
Ethernet
-
8/7/2019 Local Area Netowrks 1
5/80
Satellite Channel
uplink fin downlink fout
Channelization: Satellite
-
8/7/2019 Local Area Netowrks 1
6/80
Inbound line
Outbound lineHost
computer
Stations
Scheduling: Polling
1 2 3M
Poll 1
Data from 1
Poll 2
Data from 2
Data to M
-
8/7/2019 Local Area Netowrks 1
7/80
Ring networks
Scheduling: Token-Passing
token
Station that holds token transmits into ring
tokenData to M
-
8/7/2019 Local Area Netowrks 1
8/80
Multitapped Bus
Random Access
Transmit when ready
Crash!!
Transmissions can occur; need retransmission strategy
-
8/7/2019 Local Area Netowrks 1
9/80
Two stations are trying to share a common medium
Two-Station MAC Example
Atransmitsat t= 0
Distance dmeterstprop= d / seconds
A B
A B
B does nottransmit beforet= tprop& Acaptureschannel
Case 1
B transmitsbefore t= tpropand detectscollision soonthereafter
A B
A B
A detectscollision at
t= 2 tprop
Case 2
-
8/7/2019 Local Area Netowrks 1
10/80
Efficiency of Two-Station Example
Each frame transmission requires 2tpropof quiet time Station B needs to be quiet tprop before andafter time when
Station A transmits
Rtransmission bit rate
L bits/frame
aLRtRtL
L
propprop 21
1
/21
1
2max
+=
+=
+==Efficiency
RL
ta
prop
/
=
NormalizedDelay-Bandwidth
Product
dbits/secon21
1
2/R
atRL
LR
propeff +
=
+
==putMaxThrough
Propagation delay
Time to transmit a frame
-
8/7/2019 Local Area Netowrks 1
11/80
Typical MAC Efficiencies
CSMA-CD (Ethernet) protocol:
Token-ring network
a= latency of the ring (bits)/average frame length
Two-Station Example:
a21
1
+=Efficiency
a44.61
1
+
=Efficiency
a+=1
1Efficiency
If a
-
8/7/2019 Local Area Netowrks 1
12/80
MAC protocol features
Delay-bandwidth product
Efficiency
Transfer delay
Fairness
Reliability
Capability to carry different types of traffic
Quality of service
Cost
-
8/7/2019 Local Area Netowrks 1
13/80
Medium Access Control
Protocols and Local AreaNetworks
Random Access
-
8/7/2019 Local Area Netowrks 1
14/80
ALOHA
Wireless link to provide data transfer between maincampus & remote campuses of University of Hawaii Simplest solution: just do it
A station transmits whenever it has data to transmit If more than one frames are transmitted, they interfere with
each other (collide) and are lost If ACK not received within timeout, then a station picks random
backoff time (to avoid repeated collision)
Station retransmits frame after backoff time
tt0t0-X t0+X t0+X+2tprop t0+X+2tprop + B
Vulnerableperiod
Time-out
Backoff period B
First transmission Retransmission
-
8/7/2019 Local Area Netowrks 1
15/80
ALOHA Model
Definitions and assumptions Xframe transmission time (assume constant)
S: throughput (average # successful frame transmissions perXseconds)
G: load (average # transmission attempts per X sec.)
Psuccess: probability a frame transmission is successful
successGPS =
XX
frame
transmission
Prior interval
Any transmission thatbegins duringvulnerable periodleads to collision
Success if no arrivalsduring 2X seconds
-
8/7/2019 Local Area Netowrks 1
16/80
Abramsons Assumption
What is probability of no arrivals in vulnerable period? Abramson assumption: Effect of backoff algorithm is that
frame arrivals are equally likely to occur at any time interval
Gis avg. # arrivals per Xseconds (1 frame transmission time)
Divide Xinto nintervals of duration =X/n p =probability of arrival in interval, then
G = n p since there are nintervals in Xseconds
==
=
==
nas)1(p)-(1
intervals]2ninarrivals0[seconds]2Xinarrivals0[
222n Gn
success
e
n
G
PPP
-
8/7/2019 Local Area Netowrks 1
17/80
Throughput of ALOHA
Gsuccess GeGPS
2
==
0
0.020.04
0.06
0.08
0.1
0.12
0.14
0.16
0.18
0.2
0
0.00
7812
5
0.01
5625
0.03
125
0.06
25
0.12
50.
25 0.5 1 2 4
G
S
Collisions are meansfor coordinating
access Max throughput ismax= 1/2e (18.4%)
Bimodal behavior:
Small G, SG
Large G, S0
Collisions cansnowball and dropthroughput to zero
e-2= 0.184
-
8/7/2019 Local Area Netowrks 1
18/80
Slotted ALOHA
Time is slotted in X seconds slots Stations synchronized to frame times Stations transmit frames in first slot after frame arrival Backoff intervals in multiples of slots
t(k+1)XkX
t0+X+2tprop+ BVulnerable
period
Time-out
Backoff period B
t0+X+2tprop
Only frames that arrive during prior X seconds collide
-
8/7/2019 Local Area Netowrks 1
19/80
Throughput of Slotted ALOHA
Gnn
success
Gen
GGpG
GPGPGPS
==
=
==
)1()1(
intervals]ninarrivalsno[seconds]Xinarrivalsno[
0
0.05
0.1
0.15
0.2
0.25
0.3
0.35
0.4
0.
01563
0.
03125
0.
0625
0.
125
0.
25
0.
5 1 2 4 8
Ge-G
Ge-2G
G
S0.184
0.368
-
8/7/2019 Local Area Netowrks 1
20/80
Carrier Sensing Multiple Access (CSMA)
A
Station A beginstransmission at
t= 0
A
Station A captureschannel at t= tprop
A station senses the channel before it starts transmission If busy, either wait or schedule backoff (different options)
If idle, start transmission
Vulnerable period is reduced to tprop(due to channel captureeffect)
When collisions occur they involve entire frame transmission times
If tprop>X (or if a>1), no gain compared to ALOHA or slottedALOHA
-
8/7/2019 Local Area Netowrks 1
21/80
Transmitter behavior when busy channel is sensed 1-persistent CSMA (most greedy)
Start transmission as soon as the channel becomes idle
Low delay and low efficiency
Non-persistent CSMA (least greedy) Wait a backoff period, then sense carrier again
High delay and high efficiency
p-persistent CSMA (adjustable greedy)
Wait till channel becomes idle, transmit with prob. p; orwait one mini-slot time & re-sense with probability 1-p
Delay and efficiency can be balanced
CSMA Options
Sensing
-
8/7/2019 Local Area Netowrks 1
22/80
0
0.1
0.2
0.3
0.4
0.5
0.6
0.0
2
0.0
3
0.0
6
0.1
3
0.2
5
0. 5 1 2 4 8
16
32
64
0.53
0.45
0.16
S
G
a =0.01
a =0.1
a = 1
1-Persistent CSMA Throughput
Better than Aloha& slotted Aloha
for small a
Worse than Alohafor a > 1
a = tprop/ X
CSMA ith C lli i D t ti
-
8/7/2019 Local Area Netowrks 1
23/80
CSMA with Collision Detection(CSMA/CD)
Monitor for collisions & abort transmission Stations with frames to send, first do carrier sensing
After beginning transmissions, stations continuelistening to the medium to detect collisions
If collisions detected, all stations involved stoptransmission, reschedule random backoff times, andtry again at scheduled times
In CSMA collisions result in wastage of X seconds spent
transmitting an entire frame CSMA-CD reduces wastage to time to detect collision
and abort transmission
-
8/7/2019 Local Area Netowrks 1
24/80
CSMA/CD reaction time
It takes2 tpropto find out if channel has been captured
A begins totransmit at
t= 0
A B B begins totransmit att= tprop-;
B detectscollision att= tprop
A B
A B
A detectscollision att= 2 tprop-
-
8/7/2019 Local Area Netowrks 1
25/80
CSMA-CD Application: Ethernet
First Ethernet LAN standard used CSMA-CD 1-persistent Carrier Sensing
R = 10 Mbps
tprop = 51.2 microseconds 512 bits = 64 byte slot
accommodates 2.5 km + 4 repeaters
Truncated Binary Exponential Backoff
After nth collision, select backoff from {0, 1,, 2k 1},where k=min(n, 10)
M i Th h t f R d
-
8/7/2019 Local Area Netowrks 1
26/80
Maximum Throughput for RandomAccess MACs
0
0.2
0.4
0.6
0.8
1
0.01 0.1 1
ALOHA
Slotted ALOHA
1-P CSMA
Non-P CSMA
CSMA/CD
a
max
For small a: CSMA-CD has best throughput
For larger a: Aloha & slotted Aloha better throughput
-
8/7/2019 Local Area Netowrks 1
27/80
Scheduling
Medium Access Control
Protocols and Local AreaNetworks
-
8/7/2019 Local Area Netowrks 1
28/80
Scheduling for Medium Access Control
Schedule frame transmissions to avoid collision inshared medium
More efficient channel utilization
Less variability in delays
Can provide fairness to stations
Increased computational or procedural complexity
Two main approaches
Reservation
Polling
-
8/7/2019 Local Area Netowrks 1
29/80
Reservations Systems
Centralized systems: A central controller acceptsrequests from stations and issues grants to transmit
Frequency Division Duplex (FDD): Separate frequency bandsfor uplink & downlink
Time-Division Duplex (TDD): Uplink & downlink time-share the
same channel
Distributed systems: Stations implement a decentralizedalgorithm to determine transmission order
Central
Controller
-
8/7/2019 Local Area Netowrks 1
30/80
tr 3 5 r 3 5 r 3 5 8 r 3 5 8 r 3
8
Example
Initially stations 3 & 5 have reservations to transmit frames
Station 8 becomes active and makes reservation
Cycle now also includes frame transmissions from station 8
-
8/7/2019 Local Area Netowrks 1
31/80
Polling Systems
Centralized polling systems: A central controllertransmits polling messages to stations according to acertain order
Distributed polling systems: A permit for frametransmission is passed from station to station accordingto a certain order
A signaling procedure exists for setting up order
Central
Controller
-
8/7/2019 Local Area Netowrks 1
32/80
Application: Token-Passing Rings
Free Token = Poll
Listen mode
Delay
Input
fromring
Output
toring
Ready station looks for free token
Flips bit to change free token to busy
Transmit mode
Delay
To device From device
Ready station inserts its frames
Reinserts free token when done
token
Frame Delimiter is TokenFree = 01111110Busy = 01111111
-
8/7/2019 Local Area Netowrks 1
33/80
Methods of Token Reinsertion
Ring latency: number of bits that canbe simultaneously in transit on ring
Multi-token operation
Free token transmitted immediatelyafter last bit of data frame
Single-token operation
Free token inserted after last bit of thebusy token is received back
Transmission time at least ring latency
If frame is longer than ring latency,equivalent to multi-token operation
Single-Frame operation Free token inserted after transmitting
station has received last bit of its frame
Equivalent to attaching trailer equal toring latency
Busy tokenFree token
Frame
Idle Fill
-
8/7/2019 Local Area Netowrks 1
34/80
Application Examples
Single-frame reinsertion IEEE 802.5 Token Ring LAN @ 4 Mbps
Single token reinsertion
IBM Token Ring @ 4 Mbps
Multitoken reinsertion
IEEE 802.5 and IBM Ring LANs @ 16 Mbps
FDDI Ring @ 50 Mbps
All of these LANs incorporate token priority mechanisms
-
8/7/2019 Local Area Netowrks 1
35/80
Comparison of MAC approaches
Aloha & Slotted Aloha Simple & quick transfer at very low load
Accommodates large number of low-traffic bursty users
Highly variable delay at moderate loads
Efficiency does not depend on a
CSMA-CD
Quick transfer and high efficiency for low delay-bandwidthproduct
Can accommodate large number of bursty users
Variable and unpredictable delay
-
8/7/2019 Local Area Netowrks 1
36/80
Comparison of MAC approaches
Reservation On-demand transmission of bursty or steady streams
Accommodates large number of low-traffic users withslotted Aloha reservations
Can incorporate QoS Handles large delay-bandwidth product via delayed grants
Polling
Generalization of time-division multiplexing
Provides fairness through regular access opportunities
Can provide bounds on access delay
Performance deteriorates with large delay-bandwidthproduct
-
8/7/2019 Local Area Netowrks 1
37/80
Medium Access Control
Protocols and Local AreaNetworks
Part II: Local Area Networks
-
8/7/2019 Local Area Netowrks 1
38/80
What is a LAN?
Local area means: Private ownership
freedom from regulatory constraints of WANs
Short distance (~1km) between computers
low cost very high-speed, relatively error-free communication complex error control unnecessary
Machines are constantly moved Keeping track of location of computers a chore
Simply give each machine a unique address Broadcastall messages to all machines in the LAN
Need a medium access control protocol
-
8/7/2019 Local Area Netowrks 1
39/80
Typical LAN Structure
RAM
RAMROM
EthernetProcessor
TransmissionMedium
Network InterfaceCard (NIC)
Unique MACphysical address
-
8/7/2019 Local Area Netowrks 1
40/80
MAC Sub-layer
Data linklayer
802.3CSMA-CD
802.5Token Ring
802.2 Logical link control
Physicallayer
MAC
LLC
802.11Wireless
LAN
Network layer Network layer
Physicallayer
OSIIEEE 802
Various physical layers
OtherLANs
-
8/7/2019 Local Area Netowrks 1
41/80
Logical Link Control Layer
PHY
MAC
PHY
MAC
PHY
MAC
Unreliable Datagram Service
PHY
MAC
PHY
MAC
PHY
MAC
Reliable frame service
LLCLLC LLC
A C
A C
IEEE 802.2: LLC enhances service provided by MAC
-
8/7/2019 Local Area Netowrks 1
42/80
Logical Link Control Services
Type 1: Unacknowledged connectionless service Unnumbered frame mode of HDLC
Type 2: Reliable connection-oriented service
Asynchronous balanced mode of HDLC
Type 3: Acknowledged connectionless service
Additional addressing
A workstation has a single MAC physical address Can handle several logical connections, distinguished by
their SAP (service access points).
-
8/7/2019 Local Area Netowrks 1
43/80
43
Layer 2 addressing
-
8/7/2019 Local Area Netowrks 1
44/80
44
LAN Addresses and ARP
Each adapter on LAN has unique LAN address
Broadcast address =FF-FF-FF-FF-FF-FF
= adapter
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN(wired orwireless)
-
8/7/2019 Local Area Netowrks 1
45/80
45
LAN Address (more)
MAC address allocation administered by IEEE manufacturer buys portion of MAC address space (to
assure uniqueness)
analogy:
(a) MAC address: like Social Security Number
(b) IP address: like postal address
MAC flat address portability
can move LAN card from one LAN to another
IP hierarchical address NOT portable
address depends on IP subnet to which node is attached
-
8/7/2019 Local Area Netowrks 1
46/80
46
ARP: Address Resolution Protocol
Each IP node (host,router) on LAN has ARPtable
ARP table: IP/MAC
address mappings forsome LAN nodes
< IP address; MAC address; TTL>
TTL (Time To Live): timeafter which address
mapping will be forgotten(typically 20 min)
Question:how to determineMAC address of B
knowing Bs IP address?
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
137.196.7.23
137.196.7.78
137.196.7.14
137.196.7.88
-
8/7/2019 Local Area Netowrks 1
47/80
47
ARP protocol: Same LAN A wants to send datagram to
B, and Bs MAC address notin As ARP table.
A broadcasts ARP querypacket, containing B's IPaddress
dest MAC address = FF-FF-FF-FF-FF-FF
all machines on LANreceive ARP query
B receives ARP packet,replies to A with its (B's)MAC address
frame sent to As MACaddress (unicast)
A caches (saves) IP-to-MACaddress pair in its ARP tableuntil information becomes old(times out)
soft state: information that
times out (goes away)unless refreshed
ARP is plug-and-play:
nodes create their ARPtables without intervention
from net administrator
-
8/7/2019 Local Area Netowrks 1
48/80
Medium Access Control
Protocols and Local AreaNetworks
Ethernet
-
8/7/2019 Local Area Netowrks 1
49/80
A bit of history
1970 ALOHAnet radio network deployed in Hawaiian islands 1973 Metcalf and Boggs invent Ethernet, random access in wired net 1979 DIX Ethernet II Standard 1985 IEEE 802.3 LAN Standard (10 Mbps) 1995 Fast Ethernet (100 Mbps) 1998 Gigabit Ethernet
2002 10 Gigabit Ethernet Ethernet is the dominant LAN standard
Metcalfs Sketch
-
8/7/2019 Local Area Netowrks 1
50/80
IEEE 802.3 MAC: Ethernet
MAC Protocol: CSMA/CD
Slot Timeis the critical system parameter upper bound on time to detect collision
upper bound on time to acquire channel upper bound on length of frame segment generated by
collision
quantum for retransmission scheduling
max{round-trip propagation, MAC jam time}
Truncated binary exponential backoff for retransmission n: 0 < r < 2k, where k=min(n,10)
Give up after 16 retransmissions
-
8/7/2019 Local Area Netowrks 1
51/80
IEEE 802.3 Original Parameters
Transmission Rate: 10 Mbps Min Frame: 512 bits = 64 bytes
Slot time: 512 bits/10 Mbps = 51.2 sec
51.2 sec x 2x105 km/sec =10.24 km, 1 way
5.12 km round trip distance Max Length: 2500 meters + 4 repeaters
Each x10 increase in bit rate, must be accompanied by
x10 decrease in distance
-
8/7/2019 Local Area Netowrks 1
52/80
IEEE 802.3 MAC Frame
Preamble SDDestination
addressSourceaddress
Length Information Pad FCS
7 1 6 6 2 4
64 - 1518 bytesSynch Startframe
802.3 MAC Frame
Every frame transmission begins from scratch
Preamble helps receivers synchronize their clocksto transmitter clock
7 bytes of 10101010 generate a square wave
Start frame byte changes to 10101011
Receivers look for change in 10 pattern
-
8/7/2019 Local Area Netowrks 1
53/80
IEEE 802.3 MAC Frame
Preamble SDDestination
addressSourceaddress
Length Information Pad FCS
7 1 6 6 2 4
64 - 1518 bytesSynch Startframe
MAC address: Six bytes (48 bits) single address (unicast)
first 24 bits assigned to manufacturer (OUI);next 24 bits assigned by manufacturer
Cisco: 00-00-0C3COM: 02-60-8C
multicast address = 01 00 5e broadcast = 111...111 (FF:FF:FF:FF:FF:FF)
802.3 MAC Frame
-
8/7/2019 Local Area Netowrks 1
54/80
IEEE 802.3 MAC Frame
Preamble SDDestination
addressSourceaddress
Length Information Pad FCS
7 1 6 6 2 4
64 - 1518 bytesSynch Startframe
802.3 MAC Frame
Length: # bytes in information field
Max frame 1518 bytes, excluding preamble & SD
Max information 1500 bytes: 05DC
Pad: ensures min frame of 64 bytes
FCS: CCITT-32 CRC, covers addresses, length,information, pad fields
NIC discards frames with improper lengths or failed CRC
-
8/7/2019 Local Area Netowrks 1
55/80
IEEE 802.3 Physical Layer
(a) transceivers (b)
10base5 10base2 10baseT 10baseFX
Medium Thick coax Thin coax Twisted pair Optical fiber
Max. Segment Length 500 m 200 m 100 m 2 km
Topology Bus Bus StarPoint-to-
point link
Table 6.2 IEEE 802.3 10 Mbps medium alternatives
Thick Coax: Stiff, hard to work with
Thin Coax: T connectors flaky
-
8/7/2019 Local Area Netowrks 1
56/80
Fast Ethernet
100baseT4 100baseT 100baseFX
MediumTwisted pair category 3
UTP 4 pairs
Twisted pair category 5
UTP two pairs
Optical fiber multimode
Two strands
Max. Segment
Length
100 m 100 m 2 km
Topology Star Star Star
Table 6.4 IEEE 802.3 100 Mbps Ethernet medium alternatives
To preserve compatibility with 10 Mbps Ethernet:
Same frame format, same interfaces, same protocols
Hub topology only with twisted pair & fiber
Bus topology & coaxial cable abandoned
Category 3 twisted pair (ordinary telephone grade) requires 4 pairs
Category 5 twisted pair requires 2 pairs (most popular)
Most prevalent LAN today
-
8/7/2019 Local Area Netowrks 1
57/80
Gigabit EthernetTable 6.3 IEEE 802.3 1 Gbps Fast Ethernet medium alternatives
1000baseSX 1000baseLX 1000baseCX 1000baseT
Medium
Optical fiber
multimode
Two strands
Optical fiber
single mode
Two strands
Shieldedcopper cable
Twisted paircategory 5
UTP
Max. SegmentLength
550 m 5 km 25 m 100 m
Topology Star Star Star Star
Slot time increased to 512 bytes
Small frames need to be extended to 512 B
Frame bursting to allow stations to transmit burst of short frames
Frame structure preserved but CSMA-CD essentially abandoned
Extensive deployment in backbone of enterprise data networks andin server farms
-
8/7/2019 Local Area Netowrks 1
58/80
10 Gigabit Ethernet
Table 6.5 IEEE 802.3 10 Gbps Ethernet medium alternatives
10GbaseSR 10GBaseLR 10GbaseEW 10GbaseLX4
Medium
Two opticalfibersMultimode at850 nm
64B66B code
Two optical fibers
Single-mode at1310 nm
64B66B
Two optical fibers
Single-mode at1550 nmSONET
compatibility
Two optical fibersmultimode/single-mode with fourwavelengths at1310 nm band
8B10B code
Max. SegmentLength
300 m 10 km 40 km 300 m 10 km
Frame structure preserved
CSMA-CD protocol officially abandoned LAN PHY for local network applications
WAN PHY for wide area interconnection using SONET OC-192c
Extensive deployment in metro networks anticipated
-
8/7/2019 Local Area Netowrks 1
59/80
Medium Access Control
Protocols and Local AreaNetworks
LAN Bridges and Switches
-
8/7/2019 Local Area Netowrks 1
60/80
Hub
Station StationStation
Two TwistedPairs
Hubs, Bridges & Routers
Interconnecting Hubs Repeater: Signal regeneration
All traffic appears in both LANs
Bridge/Switch: MAC address filtering
Local traffic stays in own LAN
Routers: Internet routing All traffic stays in own LAN
Hub
Station Station Station
Two TwistedPairs
?
HigherScalability
-
8/7/2019 Local Area Netowrks 1
61/80
Switch vs. Hub
Hub
All Stations share thebandwidth
Collision happens
Half Duplex Operation
Used for packetsniffing today
Switch
Each station has thefull bandwidth
No collision
Full Duplex Operation
Used widely today
-
8/7/2019 Local Area Netowrks 1
62/80
Bridge
Network
Physical
Network
LLC
PhysicalPhysicalPhysical
LLC
MAC MACMAC MAC
Bridge Operation
Common case involves LANs of same type
Bridging is done at MAC level
-
8/7/2019 Local Area Netowrks 1
63/80
Interconnection of IEEE LANs withcomplete transparency
Use table lookup, and
discard frame, if source &destination in same LAN
forward frame, if source &destination in different LAN
use flooding, if destinationunknown
Use backward learning to build table
observe source address of arrivingLANs
handle topology changes byremoving old entries
Transparent Bridges
Bridge
S1 S2
S4
S3
S5 S6
LAN1
LAN2
-
8/7/2019 Local Area Netowrks 1
64/80
B1
S1 S2
B2
S3 S4 S5
Port 1 Port 2 Port 1 Port 2
LAN1 LAN2 LAN3
Address Port Address Port
-
8/7/2019 Local Area Netowrks 1
65/80
B1
S1 S2
B2
S3 S4 S5
Port 1 Port 2 Port 1 Port 2
LAN1 LAN2 LAN3
Address Port
S1 1
Address Port
S1 1
S1S5
S1 to S5 S1 to S5 S1 to S5 S1 to S5
-
8/7/2019 Local Area Netowrks 1
66/80
B1
S1 S2
B2
S3 S4 S5
Port 1 Port 2 Port 1 Port 2
LAN1 LAN2 LAN3
Address Port
S1 1
S3 1
Address Port
S1 1
S3 1
S3S2
S3S2
S3S2 S3S2S3S2 S3S2
-
8/7/2019 Local Area Netowrks 1
67/80
B1
S1 S2
B2
S3 S4 S5
Port 1 Port 2 Port 1 Port 2
LAN1 LAN2 LAN3
S4 S3
Address Port
S1 1
S3 2
S4 2
Address Port
S1 1
S3 1
S4 2
S4S3
S4
S3
S4S3S4S3
-
8/7/2019 Local Area Netowrks 1
68/80
B1
S1 S2
B2
S3 S4 S5
Port 1 Port 2 Port 1 Port 2
LAN1 LAN2 LAN3
Address Port
S1 1
S3 2
S4 2
S2 1
Address Port
S1 1
S3 1
S4 2
S2S1
S2S1
S2S1
-
8/7/2019 Local Area Netowrks 1
69/80
Adaptive Learning
In a static network, tables eventually store alladdresses & learning stops
In practice, stations are added & moved all
the time Introduce timer (minutes) to age each entry &
force it to be relearned periodically
If frame arrives on port that differs from frame
address & port in table, update immediately
-
8/7/2019 Local Area Netowrks 1
70/80
Avoiding Loops
LAN1
LAN2
LAN3
B1 B2
B3
B4
B5
LAN4
(1)
(2)
(1)
-
8/7/2019 Local Area Netowrks 1
71/80
Spanning Tree Algorithm1. Select a root bridgeamong all the bridges.
root bridge = the lowest bridge ID.2. Determine the root portfor each bridge except the
root bridge root port = port with the least-cost path to the root bridge
3. Select a designated bridgefor each LAN designated bridge = bridge has least-cost path from the
LAN to the root bridge. designated portconnects the LAN and the designated
bridge
4. All root ports and all designated ports are placedinto a forwarding state. These are the only portsthat are allowed to forward frames. The other portsare placed into a blocking state.
-
8/7/2019 Local Area Netowrks 1
72/80
LAN1
LAN2
LAN3
B1 B2
B3
B4
B5
LAN4
(1)
(2)
(1)
(1)
(1)
(1)
(2)
(2)
(2)
(2)
(3)
-
8/7/2019 Local Area Netowrks 1
73/80
LAN1
LAN2
LAN3
B1 B2
B3
B4
B5
LAN4
(1)
(2)
(1)
(1)
(1)
(1)
(2)
(2)
(2)
(2)
(3)
Bridge 1 selected as root bridge
-
8/7/2019 Local Area Netowrks 1
74/80
LAN1
LAN2
LAN3
B1 B2
B3
B4
B5
LAN4
(1)
(2)
(1)
(1)
(1)
(1)
(2)
(2)
(2)
(2)
(3)
Root port selected for everybridge except root port
R
R
R
R
-
8/7/2019 Local Area Netowrks 1
75/80
LAN1
LAN2
LAN3
B1 B2
B3
B4
B5
LAN4
(1)
(2)
(1)
(1)
(1)
(1)
(2)
(2)
(2)
(2)
(3)
Select designated bridgefor each LAN
R
R
R
R
D
D
D D
-
8/7/2019 Local Area Netowrks 1
76/80
S R i B id
-
8/7/2019 Local Area Netowrks 1
77/80
Source Routing Bridges
To interconnect IEEE 802.5 token rings Each source station determines route to destination
Routing information inserted in frame
Routingcontrol
Route 1designator
Route 2designator
Route mdesignator
Destinationaddress
Sourceaddress
Routinginformation
Data FCS
2 bytes 2 bytes 2 bytes 2 bytes
Vi t l LAN
-
8/7/2019 Local Area Netowrks 1
78/80
Physical
partition
Logical partition
Bridge
or
switch
VLAN 1 VLAN 2 VLAN 3
S17
2 3 4 5 61
8
9 Floor n 1
Floor n
Floor n+ 1
S2
S3
S4
S5
S6
S7
S8
S9
Virtual LAN Partitioning a local area network into smaller layer-2 subnets
Devices on two different VLANs operate as if they are on twoseparate LANs.
o You will need alayer 3 device (e.g.router) tocommunicatebetween twoVLANs.
P P t VLAN
-
8/7/2019 Local Area Netowrks 1
79/80
Logical partition
Bridge
or
switch
VLAN 1 VLAN 2 VLAN 3
S17
2 3 4 5 61
8
9 Floor n 1
Floor n
Floor n+ 1
S2
S3
S4
S5
S6
S7
S8
S9
Per-Port VLANs
Bridge only forwards frames to outgoing ports associated with same VLAN
T d VLAN
-
8/7/2019 Local Area Netowrks 1
80/80
Tagged VLANs
More flexible than Port-based VLANs Insert VLAN tag after source MAC address in each
frame
VLAN protocol ID + tag
VLAN-aware bridge forwards frames to outgoing portsaccording to VLAN ID
VLAN ID can be associated with a port statically throughconfiguration or dynamically through bridge learning
IEEE 802.1q