Title: The Data-Link Layer: Ethernet, ARP and LANs
1The Data-Link LayerEthernet, ARP and LANs
- Based on slides from the Computer Networking A
Top Down Approach Featuring the Internet by
Kurose and Ross
2The Data Link Layer
- Our goals
- Understand principles behind data link layer
services - Sharing a broadcast channel multiple access.
- Link layer addressing.
- Interconnection of different LAN segments.
- Instantiation and implementation of various link
layer technologies
3Link Layer Introduction
- Some terminology
- hosts and routers are nodes
- communication channels that connect adjacent
nodes along communication path are links - wired links
- wireless links
- LANs
- layer-2 packet is a frame, encapsulates datagram
data-link layer has responsibility of
transferring datagram from one node to adjacent
node over a link
4Link layer context
- transportation analogy
- trip from Princeton to Lausanne
- limo Princeton to JFK
- plane JFK to Geneva
- train Geneva to Lausanne
- tourist datagram
- transport segment communication link
- transportation mode link layer protocol
- travel agent routing algorithm
- Datagram transferred by different link protocols
over different links - e.g., Ethernet on first link, frame relay on
intermediate links, 802.11 on last link - Each link protocol provides different services
- e.g., may or may not provide rdt over link
5Physical Media
- physical link
- Transmitted data bit propagates across link.
- guided media
- signals propagate in solid media (e.g. copper,
fiber). - unguided media
- signals propagate freely (e.g. radio bands).
- The physical Layer defines the representation
of bits. - Its also provides protection by both detecting
and correcting corrupted bits (See how it works).
6Physical Media (Examples)
- Twisted Pair (TP)
- Two insulated copper wires. May be shielded or
not. - Category 3
- Traditional phone wires. Supports 10-Mbps
Ethernet. - Category 5
- Supports 100Mbps Ethernet (Fast-Ethernet).
7Physical Media (Examples)
- Coaxial cable
- Two concentric shielded wires.
- Baseband
- single channel on cable.
- broadband
- multiple channel on cable.
- common uses for 10-Mbps Ethernet and TV cables.
8Physical Media (Examples)
- Fiber
- Glass fiber carrying light pulses.
- Single mode or multi mode.
- High point-to-point speed.
- Very low error rate (caused by low fibers
attenuation). - Secured.
- Common used for 100-Mbps Ethernet and 1000-Mbps
Ethernet (Gigabit Ethernet).
9Physical Media (Examples)
- Many more
- Radio bands (WiFi, high bit error rate).
- Microwave (Requires hosts in light of sight).
- Satellite (very slow RTT).
10Link Layer Services
- Recall that we're actually considering the MAC
layer in the IEEE 802 model. - Framing (Frame structure)
- encapsulate datagram into frame, adding header,
trailer - Link Access (The protocol)
- Addressing
- Introduces MAC addresses used in frame headers
to identify hosts (actually NICs) who are part of
the network. - Different for IP addresses!
- Channel Access
- Defines the set of rules which allows the hosts
to use the (possibly shared) medium.
11Link Layer Services
- Flow Control
- pacing between adjacent sending and receiving
nodes - Error Detection
- errors caused by signal attenuation, noise.
- receiver detects presence of errors
- signals sender for retransmission or drops frame
- Error Correction
- receiver identifies and corrects bit error(s)
without resorting to retransmission - Half-duplex and full-duplex
- with half duplex, nodes at both ends of link can
transmit, but not at same time - RDT
- Offers some reliability between the hosts (Why is
this redundant?).
12Link Layer Services
datagram
rcving node
link layer protocol
sending node
adapter
adapter
- receiving side
- looks for errors, rdt, flow control, etc
- extracts datagram, passes to rcving node
- adapter is semi-autonomous
- link physical layers
- link layer implemented in adaptor (aka NIC)
- Ethernet card, PCMCI card, 802.11 card
- sending side
- encapsulates datagram in a frame
- adds error checking bits, rdt, flow control, etc.
13Link Types
- Broadcast
- Traditional Ethernet and its predecessors.
- Upstream HFC.
- 802.11 wireless LAN.
- Well focus on Broadcast media.
- Three types of links
- point-to-point (P2P)
- PPP for dial-up access.
- Point-to-point link between Ethernet switch and
host. - Switched Networks
- ATM (used for WAN).
14Multiple Access protocols
- single shared broadcast channel
- two or more simultaneous transmissions by nodes
interference - collision if node receives two or more signals at
the same time - Multiple ACcess (MAC) Protocol
- distributed algorithm that determines how nodes
share channel, i.e., determine when node can
transmit - communication about channel sharing must use
channel itself! - no out-of-band channel for coordination
15Human Analogy
- Rules for party conversation
- "Give everyone a chance to speak."
- "Don't speak until you are spoken to."
- "Don't monopolize the conversation."
- "Raise your hand if you have a question."
- "Don't interrupt when someone is speaking."
- "Don't fall asleep when someone else is talking
16MAC Protocols measures
- Assume a shared medium with a channel rate of R
bpsec. - Efficient
- When one node wants to transmit it ca send at
rate R. - Fair
- When N users want to transmit, each can send at
average rate R/N. - Decentralized
- No special node uses to coordinate transmission
(no leader). - No synchronization of clocks or slots.
- Fault tolerant.
- Simple
- Should be very fast and implemented in NICs
firmware.
17MAC Protocol Types
- Three broad classes
- Channel Partitioning
- Divide channel into smaller pieces (Time-Slots,
Frequancy-Bands or by code). - allocate piece to a node for exclusive its use.
- Random Access
- Channel not divided, allow collisions.
- Recover from collisions.
- Taking turns
- Nodes take turns, but nodes with more to send can
take longer turns. - Might uses a leader to coordinate the turns.
18Channel Partitioning MAC protocols TDMA
- TDMA (Time Division Multiple Access)
- Access the channel in "rounds.
- Each station gets fixed length slot (length
packets trans time) in each round. Each slot
called a Time-Slot. - Unused slots go idle.
- Example 6-station LAN, 1,3,4 have packtes,
slots 2,5,6 idle
19Channel Partitioning MAC protocols FDMA
- FDMA (Frequency Division Multiple Access)
- Channel spectrum divided into frequency bands.
- Each station assigned fixed frequency band.
- Unused transmission time in frequency bands go
idle. - example 6-station LAN, 1,3,4 have packets,
frequency bands 2,5,6 idle
time
frequency bands
20TDM / FDM summary
- FDM Enables the division of a channel with
capacity C bits per seconds to N sub-channels,
each gets a different frequency range and
capacity of C/N. - TDM The division of channel to N sub-channels,
each gets C/N capacity, by giving the entire
channel to each of the N stations for 1/N of the
time. - ? The division makes each sub channel less busy,
but the overall waiting time is bigger by a
factor of N compared to having one channel
(Little theorem).
21Channel Partitioning MAC protocols CDMA
- Code Division Multiple Access (CDMA)
- used in several wireless broadcast channels
(cellular, satellite, etc) standards - unique code assigned to each user i.e., code
set partitioning - all users share same frequency, but each user has
own chipping sequence (i.e., code) to encode
data - encoded signal (original data) X (chipping
sequence) - decoding inner-product of encoded signal and
chipping sequence - allows multiple users to coexist and transmit
simultaneously with minimal interference (if
codes are orthogonal)
22Random Access MAC Protocols
- From here on, well focus on Random Access MAC
protocols. - When node has packet to send
- Transmit at full channel data rate R.
- No a priori coordination among nodes
- Two or more transmitting nodes ? collision.
- Random access MAC protocol specifies
- How to detect collisions
- How to recover from collisions.
- Examples of random access MAC protocols
- ALOHA.
- slotted ALOHA.
- CSMA/CD (Ethernet).
- CSMA/CA (Wireless).
23Aloha Protocol
- Invented at the 70s in Hawaii.
- Intended for Radio networks, but suitable for
every network where the station can listen to the
channel while broadcasting, and determine whether
others also transmit. - Basic idea every station may transmit when it
wants to. If collision is detected between
frames, back off and try again later. - If two frames are broadcast at the same time on
the channel, a collision occurs and the both need
to retransmit.
24Aloha Protocol
- All hosts
- Transmit on one frequency (fT).
- Receive on other frequency (fR).
- There is a central node which repeats whatever it
receives from fT frequency on the other fR
frequency. - The central node used as a repeater.
- Collisions are detected by the hosts
- Receiving corrupted data (host knows what should
be received).
25Aloha Protocol
- Accept a new frame arrives
- Transmit immediately and listen If a collision
occurred, wait a random time, and repeat to
stage 2. Otherwise, go back to stage 1 to
handle a new frame.
26Aloha Protocol
- Simple.
- Robust against failure of a host.
- Distributed (excluding the central node, which
uses as a repeater). - High load implicates low utilization of the
channel and high delays.
27Aloha - efficiency
Efficiency is the long-run fraction of
successful transmissions when there are many
nodes, each with many frames to send
- Only 18...
- Suppose there are n stations, and the probability
that a station starts transmitting in a time unit
is p. - Then The probability that exactly one node
transmits in a time unit is
28Aloha - efficiency
Efficiency is the long-run fraction of
successful transmissions when there are many
nodes, each with many frames to send
- Only 18...
- Maximize the utilization function by
differentiation yields maximum point at
with utilization of .
- Trivial improvement
- Why be vulnerable for 2 time units?
- Synchronize, and use slotted time. May transmit
only at integer times
29Slotted Aloha
- Assumptions
- all frames same size
- time is divided into equal size slots, time to
transmit 1 frame - nodes start to transmit frames only at beginning
of slots - nodes are synchronized
- if 2 or more nodes transmit in slot, all nodes
detect collision
- Operation
- when node obtains fresh frame, it transmits in
next slot - no collision, node can send new frame in next
slot - if collision, node retransmits frame in each
subsequent slot with prob. p until success
30Slotted Aloha
- Pros
- single active node can continuously transmit at
full rate of channel - highly decentralized only slots in nodes need to
be in sync - simple
- Cons
- collisions, wasting slots
- idle slots
- nodes may be able to detect collision in less
than time to transmit packet - clock synchronization
31Slotted Aloha - efficiency
- For max efficiency with N nodes, find p that
maximizes Np(1-p)N-1 - For many nodes, take limit of Np(1-p)N-1 as N
goes to infinity, gives 1/e .37
Efficiency is the long-run fraction of
successful slots when there are many nodes, each
with many frames to send
- Suppose N nodes with many frames to send, each
transmits in slot with probability p - prob that node 1 has success in a slot
p(1-p)N-1 - prob that any node has a success Np(1-p)N-1
-
At best channel used for useful transmissions
37 of time!
32Aloha - Summary
- Very popular at the beginning of time (i.e., 70s
to 80s). - Very simple to handle.
- Lots and lots of basic probabilities calculations
for students! - Major problem Nodes dont check whats going on
in the channel, each acting on its own. No
manners!
33CSMA (Carrier Sense Multiple Access)
- CSMA listen before transmit
- Protocol
- Listen to the channel
- If channel sensed idle, transmit entire frame
- If channel sensed busy, defer transmission by.
- 1-Persistent CSMAWait until channel is quiet
and transmit immediately. If collision occurs,
wait a random time and listen again (go to 1). - Non-Persistent CSMAWait a random time and
listen again (go to 1). - They differ only by the treatment of 1st
transmission. - CSMA human analogy dont interrupt others!
34CSMA/CD (Collision Detection)
- CSMA/CD carrier sensing, deferral as in CSMA
- When transmitting, try to sense if there is a
collision. - collisions detected within short time.
- colliding transmissions aborted, reducing channel
wastage. - collision detection
- easy in wired LANs measure signal strengths,
compare transmitted, received signals. - difficult in wireless LANs receiver shut off
while transmitting. - human analogy the polite conversationalist
35CSMA/CD Minimum Packet Size
36Ethernet uses CSMA/CD
- No slots
- adapter doesnt transmit if it senses that some
other adapter is transmitting, that is, carrier
sense - transmitting adapter aborts when it senses that
another adapter is transmitting, that is,
collision detection
- Before attempting a retransmission, adapter waits
a random time, that is, random access
37Unreliable, connectionless service
- Connectionless No handshaking between sending
and receiving adapter. - Unreliable receiving adapter doesnt send acks
or nacks to sending adapter - stream of datagrams passed to network layer can
have gaps - gaps will be filled if app is using TCP
- otherwise, app will see the gaps
38Ethernets CSMA/CD (more)
- Jam Signal make sure all other transmitters are
aware of collision 48 bits - Bit time .1 microsec for 10 Mbps Ethernet for
K1023, wait time is about 50 msec -
- Exponential Backoff
- Goal adapt retransmission attempts to estimated
current load - heavy load random wait will be longer
- first collision choose K from 0,1 delay is K?
512 bit transmission times - after second collision choose K from 0,1,2,3
- after ten collisions, choose K from
0,1,2,3,4,,1023
See/interact with Java applet on AWL Web
site highly recommended !
39802.3 CSMA/CD (Ethernet) Algorithm
40Ethernet CSMA/CD algorithm
- 1. Adaptor receives datagram from net layer
creates frame - 2. If adapter senses channel idle, it starts to
transmit frame. If it senses channel busy, waits
until channel idle and then transmits - 3. If adapter transmits entire frame without
detecting another transmission, the adapter is
done with frame !
- 4. If adapter detects another transmission while
transmitting, aborts and sends jam signal - 5. After aborting, adapter enters exponential
backoff after the mth collision, adapter chooses
a K at random from 0,1,2,,2m-1. Adapter waits
K?512 bit times and returns to Step 2 -
41Ethernet Minimum Packet Size
42 Summary of MAC protocols
- What do you do with a shared media?
- Channel Partitioning, by time, frequency or code
- Time Division, Frequency Division, Code Division
- Random partitioning (dynamic),
- ALOHA, S-ALOHA, CSMA, CSMA/CD
- carrier sensing easy in some technologies
(wire), hard in others (wireless) - CSMA/CD used in Ethernet
- CSMA/CA used in 802.11 (Wireless).
43LAN technologies
- Data link layer so far
- MAC protocols. The random protocol approach.
- Next LAN technologies
- Addressing
- Ethernet
- Hubs, bridges and switches
44MAC Addresses and ARP
- 32-bit IP address
- network-layer address
- used to get datagram to destination IP subnet
- MAC (or LAN or physical or Ethernet) address
- used to get datagram from one interface to
another physically-connected interface (same
network) - 48 bit MAC address (for most LANs) burned in the
adapter ROM, but can be modified.
45LAN Addresses and ARP
Each adapter on LAN has unique LAN address
Broadcast address FF-FF-FF-FF-FF-FF
adapter
46LAN 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
- depends on IP subnet to which node is attached
47ARP Address Resolution Protocol
- Each IP node (Host, Router) on LAN has ARP table
- ARP Table IP/MAC address mappings for some LAN
nodes - lt IP address MAC address TTLgt
- TTL (Time To Live) time after which address
mapping will be forgotten (typically 20 min)
237.196.7.78
1A-2F-BB-76-09-AD
237.196.7.23
237.196.7.14
LAN
71-65-F7-2B-08-53
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
237.196.7.88
48ARP protocol Same LAN (network)
- A caches (saves) IP-to-MAC address pair in its
ARP table until information becomes old (times
out) - soft state information that times out (goes
away) unless refreshed - ARP is plug-and-play
- nodes create their ARP tables without
intervention from net administrator
- A wants to send datagram to B, and Bs MAC
address not in As ARP table. - A broadcasts ARP query packet, containing B's IP
address - Dest MAC address FF-FF-FF-FF-FF-FF
- all machines on LAN receive ARP query
- B receives ARP packet, replies to A with its
(B's) MAC address - frame sent to As MAC address (unicast)
49Routing to another LAN
- walkthrough send datagram from A to B via R
- assume A knows B IP
address - Two ARP tables in router R, one for each IP
network (LAN) - In routing table at source Host, find router
111.111.111.110 - In ARP table at source, find MAC address
E6-E9-00-17-BB-4B, etc
A
R
B
50- A creates datagram with source A, destination B
- A uses ARP to get Rs MAC address for
111.111.111.110 - A creates link-layer frame with R's MAC address
as dest, frame contains A-to-B IP datagram - As adapter sends frame
- Rs adapter receives frame
- R removes IP datagram from Ethernet frame, sees
its destined to B - R uses ARP to get Bs MAC address
- R creates frame containing A-to-B IP datagram
sends to B
A
R
B
51Ethernet
- dominant wired LAN technology, developed at the
70s - cheap 20 for 100Mbs!
- first widely used LAN technology
- Simple, cheap.
- Kept up with speed race 10 Mbps 10 Gbps
Metcalfes Ethernet sketch
52Ethernet topology Through the Years
- Now star topology prevails
- Connection choices hub or switch (more later)
- Fast Ethernet 100 Mb/s
- Gigabit Ethernet 1Gbps
- Shared Bus with CSMA/CD
- Bus maximal length 500 m.
- Transmission rate 10Mb/s.
Through the years the only common is The Frame
53Ethernet Frame Structure
- Sending adapter encapsulates IP datagram (or
other network layer protocol packet) in Ethernet
frame - Preamble
- 7 bytes with pattern 10101010 followed by one
byte with pattern 10101011 - used to synchronize receiver, sender clock
rates what is the length, in clock ticks, of one
bit.
Type/ length length or type of frame
54Ethernet Frame Structure (more)
- Addresses 6 bytes
- if adapter receives frame with matching
destination address, or with broadcast address
(eg ARP packet), it passes data in frame to
net-layer protocol - otherwise, adapter discards frame
- MAC addresses, also called Physical addresses
- Type indicates the higher layer protocol (mostly
IP but others may be supported such as Novell IPX
and AppleTalk) - CRC checked at receiver, if error is detected,
the frame is simply dropped. Before CRC there is
a padding field for the CRC to pad to 64 bytes.
55Ethernet Technology 10Base2
- 10 10Mbps 2 under 200 meters max cable length
- thin coaxial cable in a bus topology
- repeaters used to connect up to multiple segments
- repeater repeats bits it hears on one interface
to its other interfaces physical layer device
only!
56Ethernet technology 100BaseT
- 10/100 Mbps rate latter called fast ethernet
- T stands for Twisted Pair
- Nodes connect to a hub star topology 100 m
max distance between nodes and hub
57Ethernet technology 100BaseT
- Problem must keep minimal packet size when
bandwidth increases. - With fixed cable length and propagation speed,
must - increase minimal size proportionally to bandwidth
increase! - E.g. 100Mb/s, 1500m of cable prop remains 6µs,
minimal - size becomes 1200 bits.
- Solutions
- Cable length limited to 100m.
- Prevent collisions by Ethernet Switches
(later). - Max distance from node to Hub is 100 meters
58Gbit Ethernet
- use standard Ethernet frame format.
- allows for point-to-point links and shared
broadcast channels. - in shared mode, CSMA/CD is used short distances
between nodes to be efficiency. - uses hubs, called here Buffered Distributors
- Full-Duplex at 1 Gbps for point-to-point links.
- 10 Gbpsec now!
59Hubs
- Q Why not just one big LAN?
- Limited amount of supportable traffic on single
LAN, all stations must share bandwidth - limited length 802.3 (Ethernet) specifies
maximum cable length - large collision domain (can collide with many
stations) - limited number of stations 802.5 (token ring)
have token passing delays at each station
60Hubs (Multiport repeaters, Bus in a box)
- Physical Layer devices essentially repeaters
operating at bit levels repeat received bits on
one interface to all other interfaces - Cant interconnect 10BaseT 100BaseT (because
segments dont share the same rate). - Hubs can be arranged in a hierarchy (or
multi-tier design), with backbone hub at its top
61Hubs (Multiport repeaters, Bus in a box)
- Each connected LAN referred to as LAN segment
- Hubs do not isolate collision domains node may
collide with any node residing at any segment in
LAN - Extends max distance between nodes, but all the
segments become one large collision domain. - Hub Advantages
- simple, inexpensive device
- Multi-tier provides graceful degradation
portions of the LAN continue to operate if one
hub malfunctions - extends maximum distance between node pairs (100m
per Hub) -
62Bridges
- Link Layer devices operate on Ethernet frames,
examining frame header and selectively forwarding
frame based on its destination - Bridge isolates collision domains since it
buffers frames - When frame is to be forwarded on segment, bridge
uses CSMA/CD to access segment and transmit - Store and forward element. So different types of
Ethernet types can be connected. - Transparent no need for any change to hosts LAN
adapters - Forwarding is selective do not always flood. All
connected segments can work independently in
parallel!
63Bridge Filtering
- bridges learn which hosts can be reached through
which interfaces maintain filtering tables - when frame received, bridge learns location of
sender incoming LAN segment - records sender location in filtering table
- filtering table entry
- (Node LAN Address, Bridge Interface, Time Stamp)
- stale entries in Filtering Table dropped (TTL can
be 60 minutes)
64Bridge Operation
- bridge procedure(in_MAC, in_port,out_MAC)
- lookup in filtering table (out_MAC) receive
out_port - if (out_port not valid) / no entry found for
destination / - then flood / forward on all but the
interface on which
the frame arrived/ - if (in_port out_port) /destination is on LAN
on which frame was received / - then drop the frame
- Otherwise (out_port is valid) /entry found for
destination / - then forward the frame on interface indicated
-
65Bridge Learning example
- Suppose C sends frame to D and D replies back
with frame to C
- C sends frame, bridge has no info about D, so
floods to both LANs - bridge notes that C is on port 1
- frame ignored on upper LAN
- frame received by D
66Bridge Learning example
C 1
- D generates reply to C, sends
- bridge sees frame from D
- bridge notes that D is on interface 2
- bridge knows C on interface 1, so selectively
forwards frame out via interface 1
67What will happen with loops?Incorrect learning
68What will happen with loops?Frame looping
C
2
2
C,??
C,??
1
1
A
69What will happen with loops?Frame looping
B
2
2
B,2
B,1
1
1
A
70Introducing Spanning Tree
- Allow a path between every LAN without causing
loops (loop-free environment) - Bridges communicate with special configuration
messages (BPDUs) - Standardized by IEEE 802.1D
- Note redundant paths are good, active redundant
paths are bad (they cause loops)
71How to Construct a Spanning Tree?
- Bridges run a distributed spanning tree
- Algorithm
- Select what ports (and bridges) should actively
forward frames - Finding the root flooding
- Building a tree Bellman-Ford Algorithm
- Can combine efficiently
- Standardized in IEEE 802.1 specification
72Spanning Tree Requirements
- Each bridge is assigned a unique identifier
- A broadcast address for bridges on a LAN
- A unique port identifier for all ports on all
bridges - MAC address
- Bridge id port number
73Spanning Tree ConceptsRoot Bridge
- The bridge with the lowest bridge ID value is
elected the root bridge - One root bridge chosen among all bridges
- Every other bridge calculates a path to the root
bridge
74Spanning Tree ConceptsPath Cost
- A cost associated with each port on each bridge
- default is 1
- The cost associated with transmission onto the
LAN connected to the port - Can be manually or automatically assigned
- Can be used to alter the path to the root bridge
75Spanning Tree ConceptsRoot Port
- The port on each bridge that is on the path
towards the root bridge - The root port is part of the lowest cost path
towards the root bridge - If port costs are equal on a bridge, the port
with the lowest ID becomes root port
76Spanning Tree ConceptsRoot Path Cost
- The minimum cost path to the root bridge
- The cost starts at the root bridge
- Each bridge computes root path cost independently
based on their view of the network
77Spanning Tree Concepts Designated Bridge
- Only one bridge on a LAN at one time is chosen
the designated bridge - This bridge provides the minimum cost path to the
root bridge for the LAN - Only the designated bridge passes frames towards
the root bridge
78Example Spanning Tree
B8
B3
B5
- Protocol operation
- Picks a root
- For each LAN, picks a designated bridgethat is
closest to the root. - All bridges on a LANsend packets towards the
root via the designated bridge.
B7
B2
B1
B6
B4
79Example Spanning Tree
B8
Spanning Tree
B3
B5
B1
root port
B7
B2
B2
B4
B5
B7
B1
Root
B8
Designated Bridge
B6
B4
80Spanning Tree AlgorithmAn Overview
- 1. Determine the root bridge among all bridges
- 2. Each bridge determines its root port
- The port in the direction of the root bridge
- 3. Determine the designated bridge on each LAN
- The bridge which accepts frames to forward
towards the root bridge - The frames are sent on the root port of the
designated bridge
81Spanning Tree AlgorithmSelecting Root Bridge
- Initially, each bridge considers itself to be the
root bridge - Bridges send BDPU frames to its attached LANs
- The bridge and port ID of the sending bridge
- The bridge and port ID of the bridge the sending
bridge considers root - The root path cost for the sending bridge
- Best one wins
- (lowest root ID/cost/priority)
82Spanning Tree AlgorithmSelecting Root Ports
- Each bridge selects one of its ports which has
the minimal cost to the root bridge - In case of a tie, the lowest uplink (transmitter)
bridge ID is used - In case of another tie, the lowest port ID is used
83Spanning Tree AlgorithmSelect Designated Bridges
- Initially, each bridge considers itself to be the
designated bridge - Bridges send BDPU frames to its attached LANs
- The bridge and port ID of the sending bridge
- The bridge and port ID of the bridge the sending
bridge considers root - The root path cost for the sending bridge
- 3. Best one wins
- (lowest ID/cost/priority)
84Forwarding/Blocking State
- Root and designated bridges will forward frames
to and from their attached LANs - All other ports are in the blocking state
85Ethernet Switches
- layer 2 (frame) forwarding, filtering using LAN
addresses - Switching A-to-B and A-to-B simultaneously, no
collisions - large number of interfaces
- often individual hosts, star-connected into
switch - Ethernet, but no collisions!
- Confused with Ethernet bridges
86Ethernet Switches
- cut-through switching frame forwarded from
input to output port without awaiting for
assembly of entire frame - slight reduction in latency
- combinations of shared/dedicated, 10/100/1000
Mbps interfaces - Offers VLANS (Virtual LANs).
- Nowadays routers are actually combined with
Ethernet switches.
87Ethernet Switches (more)
Dedicated
Shared
88Summary comparison
89Road-Map and Keywords
- IEEE 802 Model compared to the OSI.
- LLC, MAC.
- Physical Media
- Coax, Twisted Pairs, Fibers.
- Link Types
- Point-to-point, Broadcast, Switched.
- Different MAC protocol approaches
- Channel Partitioning, Random Access, Taking
Turns. - Portioning MAC protocols
- TDMA, FDMA, CDMA.
- Random Access MAC protocols
- Aloha, Slotted Aloha.
- LAN technology Ethernet Protocol
- MAC Addresses, Frame Structure, ARP,
- LAN interconnect
- Hubs Bridges and Ethernet Switches.
90IEEE 802 Model Compared to the OSI
- The Data-Link and Physical layers in the OSI
model are divided to other layers according to
the IEEE 802 model
IEEE 802.1 Higher Levels Interface
Higher Layers
IEEE 802.2 Logical Link Control (LLC)
Data-Link Layer
IEEE 802.3 CSMA/CD Medium Access Control
IEEE 802.11 Wireless Medium Access Control
IEEE 802.5 Token Ring Medium Access Control
CSMA/CD Medium
Wireless Medium
Token Ring Medium
Physical Layer
OSI
IEEE 802
91IEEE 802 Model Compared to the OSI
- The LLC provides common interface for common LAN
functionality. - There are various media which offer different
methods for communication (OSI so called Physical
layer). - Each LAN technology uses different MAC (Medium
Access Control) method to use its corresponding
medias. - What kind of medias do we have?
- What kind of corresponding MAC protocols do we
have?