toulouse inp - enseeiht
TRANSCRIPT
Local area networks
Katia Jaffres-Runser and Gentian Jakllari{kjr,jakllari}-at-n7.fr
Toulouse INP - ENSEEIHT
Departement Sciences du Numerique1ere annee
ENSEEIHTINPT O U L O U S E
1SN - Local area networks 1
Lecture 1: Introduction to local area networks
Central question for this class :
How to create a network for devices that arerelatively close to each other – a local network ?
1SN - Local area networks 2
Local area networks
NOT a dedicated wire per communicationIt doesn’t scale: for N devices, we need N(N − 1)/2 wires.
1
1source: https://cedarandthistle.files.wordpress.com/2013/09/messy_cables.jpg
1SN - Local area networks 3
Local area networks
Share the wire !All devices have to share the same wire.
I In this case, the communication is by nature ***in broadcast***mode
Each transmitted bit is received by all other nodes on the channel
1SN - Local area networks 4
Shared access networks
What happens if a device sends its message whenever needed?
Different situations may occur:
I No one else is transmitting data for the complete transmissionduration.→ The message is received properly by the destination ,.
I Another device transmits a message during the transmission→ The messages are superimposed (destructively) and can’t beunderstood:
there is a collision /!
1SN - Local area networks 5
Shared access networks
What happens if a device sends its message whenever needed?Different situations may occur:
I No one else is transmitting data for the complete transmissionduration.→ The message is received properly by the destination ,.
I Another device transmits a message during the transmission→ The messages are superimposed (destructively) and can’t beunderstood:
there is a collision /!
1SN - Local area networks 6
Shared access networks
What happens if a device sends its message whenever needed?Different situations may occur:
I No one else is transmitting data for the complete transmissionduration.→ The message is received properly by the destination ,.
I Another device transmits a message during the transmission→ The messages are superimposed (destructively) and can’t beunderstood:
there is a collision /!
1SN - Local area networks 7
Shared access networks
CollisionsHave of course to be mitigated. But how?
Using a Medium Access Control protocola.k.a. MAC protocol.These are rules enforced so as to:
I Avoid collisions or re-transmit data if a collision occurs,
I Offer each node a fair access to the channel.Each device on the network gets a fair share of channel bandwidthon average.
BandwidthThe amount of data that can be passed along a communication channelin a given period of time.
1SN - Local area networks 8
Shared access networks
CollisionsHave of course to be mitigated. But how?
Using a Medium Access Control protocola.k.a. MAC protocol.These are rules enforced so as to:
I Avoid collisions or re-transmit data if a collision occurs,
I Offer each node a fair access to the channel.Each device on the network gets a fair share of channel bandwidthon average.
BandwidthThe amount of data that can be passed along a communication channelin a given period of time.
1SN - Local area networks 9
Shared access networks
CollisionsHave of course to be mitigated. But how?
Using a Medium Access Control protocola.k.a. MAC protocol.These are rules enforced so as to:
I Avoid collisions or re-transmit data if a collision occurs,
I Offer each node a fair access to the channel.Each device on the network gets a fair share of channel bandwidthon average.
BandwidthThe amount of data that can be passed along a communication channelin a given period of time.
1SN - Local area networks 10
MAC protocol and channel access method
MAC protocolDecides when each device can transmit its messages on the sharedchannel (or who speaks next).There are numerous MAC protocols available:
I For wired networks:Ethernet, switched Ethernet, HDLC, Token Ring, Token Bus, CAN,AFDX, FDDI, etc...
I For wireless networks:WiFi, Bluetooth, ZigBee, WiMax, GSM, LTE, etc...
1SN - Local area networks 11
MAC protocol and channel access method
Channel access methodsMAC protocols follow different approaches for sharing the channel.Each type is called a channel access method.
1SN - Local area networks 12
Channel access methods
Random AccessI Stations contend with each other without any centralized
coordinationI Collisions are the norm
I A specific algorithm for resolving contention/reducing collisions oncethey happenI resolve collisions : detect a collision and do something to fix itI reduce collisions : reduce the odds for a collision to happen
1SN - Local area networks 13
Channel access methods
Deterministic AccessI There is no contention – stations agree in advance
I There are no collisions
I Different ways to agreeing, resulting in different MAC protocols :I Centralized : a unique entity decides on resource allocationI Distributed : nodes agree by exchanging messages
1SN - Local area networks 14
Channel access methods
Deterministic AccessI Different ways to executing the agreement
I Circuit-like: TDMA, FDMA, ...I Packet based: Polling, Token passing
I Remember from telephony:
Either we share time (TDMA), frequencies (FDMA), time-frequencyblocks (FTDMA), orthogonal codes (CDMA), or space (SDMA).
1SN - Local area networks 15
This course
This course introduces
*** the main channel access methods ***
and illustrates them with
*** state-of-the-art MAC protocols.***
1SN - Local area networks 16
Outline for the rest of this class
Lecture 1: Introduction to local area networks
Part 1: Random channel accessLecture 2: Random channel accessLecture 3: Ethernet and switched EthernetLecture 4: WiFi - Distributed Coordination Function (DCF)
Part 2: Deterministic channel accessLecture 5: WiFi (PCF)Lecture 6: Token Ring
1SN - Local area networks 17
Lecture 2: Random channel access.
ALOHACarrier Sense Multiple Access
1SN - Local area networks 18
ALOHA networks
ALOHA: The origin of random access2
I Developed in the late 60’s by Norman Abramson et al to allow the 7campuses of the Univ. of Hawai’i, located on 4 different islands, toshare computer resources on the main campus
I The first user terminals went into operation in June 1971I The communication protocol was implemented by a special-purpose
piece of equipment – the terminal control unit (TCU)I Compare it to a wifi card...
I A user terminal was attached to the TCU
2N. Abramson, ”The AlohaNet - surfing for wireless data [History of Communications],” in IEEE Communications Magazine, vol.
47, no. 12, pp. 21-25, Dec. 2009.
1SN - Local area networks 19
ALOHA networks
ALOHA networksI Key decision: Use the direct form of transmitting user information
in a single high-speed packet burst in a shared wireless channelI Driven by the need for a simple design; throughput computed several
weeks after the decisionI Cost of memory for a packet buffer of 88 bytes was about $300
I Channel access philosophy : let collisions happen, detect when theyoccur and then try again.I Any station can send data at any timeI If, while transmitting, any data is received concurrently, then there is
a collision – will need to try again.
How to try again ?Re-send data after a random duration called the Backoff period
I Avoids repeated collisions.
I The way this random choice is made influences the overallperformance.
1SN - Local area networks 20
ALOHA networks
ALOHA networksI Key decision: Use the direct form of transmitting user information
in a single high-speed packet burst in a shared wireless channelI Driven by the need for a simple design; throughput computed several
weeks after the decisionI Cost of memory for a packet buffer of 88 bytes was about $300
I Channel access philosophy : let collisions happen, detect when theyoccur and then try again.I Any station can send data at any timeI If, while transmitting, any data is received concurrently, then there is
a collision – will need to try again.
How to try again ?Re-send data after a random duration called the Backoff period
I Avoids repeated collisions.
I The way this random choice is made influences the overallperformance.
1SN - Local area networks 21
ALOHA networks
Vulnerability periodThe message transmitted at time t experiences a collision if any othermessage overlaps partially with its transmission.
Success
T
timet t+Tt−T
Vulnerability period 2T
Sender C
Sender B
Sender A
Fail
If all messages have equal length T , then the vulnerability period is ofsize 2T .
1SN - Local area networks 22
ALOHA networks
Throughput achieved by ALOHAIt can be derived as follow:
I Suppose that the number of transmission attempts per frameduration T follows a Poisson distribution of mean G .Thus the probability of having k attempts during T is: G ke−G
k!
I The probability of having no collision for the vulnerability period of2T is given by e−2G
I Thus, the throughput is the number G of attempts during T thatdon’t experience any collision :
D = G · e−2G
1SN - Local area networks 23
Throughput for ALOHA
Maximum throughout is obtained for a load G = 0.5, that isD = 0.5/e ' 0.184.I Very low! Only 18% of frames don’t collide at best.
1SN - Local area networks 24
Slotted ALOHA
Increase the efficiency of ALOHAIdea: reduce the vulnerability period duration by synchronizingtransmissions
Clock node
Success
Fail
Sender A
Sender C
Sender B
Slot
Vulnerability period T
I All nodes are synchronized on a given slot duration of size T
I A transmission can only start at slot begin.→ vulnerability period is reduced to T .
1SN - Local area networks 25
Slotted ALOHA
Efficiency of slotted ALOHAAs vulnerability period is reduced to T , the throughput increases to:
D = G · e−G
with e−G the odds of experiencing 0 attempts during T for load G .
The number of transmissions Eto get a message through increases exponentially with G :
E =k=∞∑k=1
kPk = eG
with Pk the probability to transmit a message after k attempts given byPk = e−G (1− e−G )k−1.
1SN - Local area networks 26
Slotted ALOHA vs pure ALOHA
Here, peak utilization is of 1/e, ' 36.8% if one attempt per slot is madein average.
1SN - Local area networks 27
Towards better random access
Become a bit more polite
I Listen before speaking,
I If someone speaks, defer transmission to a later date.
Carrier senseThe node has to sense the channel to detect an ongoing transmission.
May collisions still happen then ?
1SN - Local area networks 28
Towards better random access
Become a bit more polite
I Listen before speaking,
I If someone speaks, defer transmission to a later date.
Carrier senseThe node has to sense the channel to detect an ongoing transmission.
May collisions still happen then ?
1SN - Local area networks 29
Towards better random access
Become a bit more polite
I Listen before speaking,
I If someone speaks, defer transmission to a later date.
Carrier senseThe node has to sense the channel to detect an ongoing transmission.
May collisions still happen then ?
1SN - Local area networks 30
Carrier Sense Multiple Access
CSMAA.k.a. Carrier Sense Multiple Access is a family of protocols where anode wanting to transmit a message :
I Senses the channelI If the channel is busy, then she defers transmissionI If the channel is idle, then she transmits
Whenever a node starts transmitting, it sends the complete message.
1SN - Local area networks 31
Carrier Sense Multiple Access
Can collisions still happen?CSMA is very sensitive to propagation delay.
B
A
A Btp = 5ms
0
4 ms
Collision at time 5
Collision at time 9
During 5ms the channel is seen as free for other nodes.Node A can only see the collision after 2.tp (round-trip duration).
1SN - Local area networks 32
Carrier Sense Multiple Access
Vulnerability periodIn CSMA, the vulnerability period is the duration for the 1st bit to traveluntil the end of line and back, i.e.
T = 2tp
A detects collision
BA
BA
B
B at end of line
Message almost
But B starts − collision !
at B at time t_p
A starts
at time 0
at time tp
at time T=2tp
A
1SN - Local area networks 33
Carrier Sense Multiple Access
Several variants of CSMA exist:
I 1-persistent CSMA
I non-persistent CSMA
I p-persistent CSMA
I CSMA/CD (collision detection)
I CSMA/CA (collision avoidance)
I CSMA/CR (collision resolution)
1SN - Local area networks 34
1-persistent CSMA
Algorithm for a ready-to-transmit node
I Sense the channelI If the channel is busy, then wait for end of ongoing transmissionI If the channel is idle, then transmit immediately (with probability 1).
→ persistently listens while transmittingto detect idle state as soon as possible.
1SN - Local area networks 35
1-persistent CSMA
Issue with 1-persistent CSMA
B
A
A B
0
4 ms
tp = 0msC
C
wait for idle
wait for idleCollision :−(
Peak throughput is a bit better than for slotted ALOHA: ' 52.9%
1SN - Local area networks 36
Non-persistent CSMA
Algorithm for a ready-to-transmit nodeHere, the sender doesn’t actively listen to detect the end of an ongoingtransmission.
I Sense the channelI If the channel is busy, then wait a random time and sense channel
againI If the channel is idle, then transmit immediately
→ No persistent listening during transmission
1SN - Local area networks 37
Non-persistent CSMA
Example
B
A
A B
0
tp = 0msC
C
wait for 7ms
wait 3ms 7ms
5ms
3ms
Collisions are less likely to occur here, but time may be lost after the endof the ongoing transmission.Peak throughput is a much better: ' 81.5%.
1SN - Local area networks 38
p-persistent CSMA
Algorithm for a ready nodeA compromise between 1-persistent CSMA and non-persistent CSMA.Assume channels are slotted (but not globally synchronized).A slot is long enough to detect for sure a collision (i.e. of durationT = 2tp).
1. Sense the channelI If the channel is idle, then transmit with probability p
I If message not transmitted, then wait for one slot and go to step 1.
I If the channel is busy, then wait until channel becomes idle and go tostep 1.
1SN - Local area networks 39
p-persistent CSMA
Performance
I Collisions are reduced, the peak throughput increases:
For p = 0.1, S ' 79.1%For p = 0.03, S ' 82.7%
I But with lower p, the longer it takes to actually send a message.For given p, it takes
E [k] =∞∑k=1
kp(1− p)k = 1/p
slots to send a message if channel is constantly idle.
1SN - Local area networks 40
Non-persistent vs. persistent
Non-persistent
Yes
Sense channel
Busy?
Send message
No
Wait ...
p-persistent
No
Sense channel
Busy?
Send?
wait
1 slot
No
Yes
Send message with
probability p
Yes
1SN - Local area networks 41
Performance of CSMA
Superiority of p-persistent/non-persistent over 1-persistent in terms of S.
a = propagation delay / transmission delay.
1SN - Local area networks 42
Performance of CSMA3
But delay to transmit a message successfully increases exponentially withthroughput S for non-persistent and p-persistent schemes.
3L. Kleinrock and F. Tobagi, ”Packet Switching in Radio Channels: Part I - Carrier Sense Multiple-Access Modes and Their
Throughput-Delay Characteristics,” in IEEE Transactions on Communications, vol. 23, no. 12, pp. 1400-1416, December 1975.1SN - Local area networks 43
Advanced CSMA protocols
CSMA/CDA 1-persistent CSMA with an advanced collisions detection (CD)mechanism.
I 1-persistent CSMA: low peak throughput S but fast channel accessin average.
I Improve throughput with CD thanks toI Detection of collision at senderI Stop transmission if collision is detectedI Random back-off duration before new transmission attempt.
Will be detailed in Ethernet lecture.
1SN - Local area networks 44
Advanced CSMA protocols
CSMA/CAA p-persistent CSMA with an advanced collisions avoidance (CA)mechanism made for wireless systems.
I p-persistent CSMA: larger peak throughput S but slower channelaccess time in average.
I Reduce channel access time with CA operations:I Detection of collision at receiverI Acknowledgement message to notify senderI Random back-off duration before new transmission attempt, with
back-off freeze.
Will be detailed in WiFi lecture.
1SN - Local area networks 45
Advanced CSMA protocols
CSMA/CR for priority-based channel accessA CSMA where the contention resolution procedure elects the highestpriority message.
I Each message gets a unique identifier (ID) representative of itspriority. The lower the ID, the higher the priority.I If two messages of different IDs are sent concurrently, the one with
the lowest ID wins channel access.I The sender of the lower priority message defers transmission until
channel gets idle again.
Runs on any car you’re driving...
1SN - Local area networks 46
Advanced CSMA protocols
CSMA/CR for priority-based channel accessHow does it work ?
I All senders are synchronized at bit-level.
I A bit can either be recessive or dominant.Dominant bit wins over recessive bit.
I Logical values
I Recessive → bit value 1I Dominant → bit value 0
1SN - Local area networks 47
CSMA/CR
Bit-level contention resolutionFor each transmitted bit, sender checks whether it stayed unchanged.
4. Reception of same bit
E1
1. Emission of one bit
2. Propagation
3. Reflexion
If bit unchanged, then sender keeps sending, else it stops.
instead of bit 1
E1
E2
3. Reflexion
1
1. Emission of one recessive bit
2. E2 sends a dominant bit
4. E1 hears 0 0
0 3. Channel adds both signals 0 AND 1 = 0
E2 keeps sending and E1 stops.
1SN - Local area networks 48
CSMA/CR
Priority with contention resolutionEach node sends its ID (i.e. priority) in the header of the message, withbig-endian encoding (most significant bit first).
Frame ID 1 wins − continues its emission
tFrame ID 10
Frame ID 3
Frame ID 1[0 0 0 1]
[0 0 1 1]
[1 0 1 0]
1000
Stops − Lost contention
Stops − Lost contention
Highest priority message never waits. Others wait for higher prioritymessages to be transmitted first.Throughput is limited by the maximum length of the wire.
1SN - Local area networks 49
Lecture 3: Ethernet
Ethernet and Switched Ethernet
1SN - Local area networks 50
Ether4+net
History
I Developed by Bob Metcalfe and others at Xerox PARC in mid-1970s
4In the 19th century, luminiferous aether or ether, was the postulated medium forthe propagation of light
1SN - Local area networks 51
Ethernet
History
I Rooted in Aloha packet radio network
I Introduced in 1973, first products in 1980, became an IEEE standardin 1983
I Originally 2.94 Mbps, the latest reaches 100 Gbps
I Standardized, open to multiple vendors, became quickly fast andcheap
I CSMA/CD: Ethernet’s medium access control (MAC) policyI CS = Carrier Sensing
Send only if medium is idleI MA = Multiple AccessI CD = Collision Detection
Stop sending immediately if collision is detected
1SN - Local area networks 52
IEEE LAN Standards
I The goal of the standardization is to create vendor-neutral solutionsI In part in response to IBM’s dominance in the 70’s
I IEEE LAN standards define the MAC and physical layers
I IEEE 802.3 CSMA/CD - Ethernet standard, 10 Mbps (originally2Mbps)
I IEEE 802.3u standard for 100Mbps Ethernet
I IEEE 802.3z standard for 1Gbps Ethernet
1SN - Local area networks 53
Ethernet technologies
10Base2
I “10” means 10Mbps; “2” means under 200 meters (actually 185m)
I Thin coaxial cable in a bus topology
I Repeaters used to connect different segments
I Repeater repeats bits it hears on one interface to its other interfaceA physical layer device only!
1SN - Local area networks 54
Ethernet technologies
10BaseT / 100BaseT
I “10”for 10Mbps (“100” for 100Mbps); “T” for Twisted pair
I Hub(s) connected by twisted pair facilitate star topologyI Distance of any node to the hub must be < 100 metersI Hub repeats the bits it hears on one interface on all other interfaces
Physical layer device as well !
Backbone Hub
Hub
Hub
Hub
1SN - Local area networks 55
Ethernet
OverviewMost popular packet-switched LAN technology
I Maximum bus length : 2500 meters divided into 500 metersegments with 4 repeaters
I Bus and start topologies are possibleI Hosts attach to network via Ethernet transceiver or hub (or switch)
detects line state (idle/busy) and sends/receives signalsI Hubs are used to facilitate shared connections
I Network layer packets are transmitted over Ethernet afterencapsulation
I A broadcast protocol by natureI Any signal can be received by allI All hosts on Ethernet are competing for access to medium
Problem: Distributed algorithm that provides a fair access
1SN - Local area networks 56
Ethernet II / IEEE802.3 protocols
Frame formatThere are two MAC frame format versions: for Ethernet II (legacy DIXcommercial version) and for the IEEE802.3 standard.
DATA / LLC+DATAPreambleDest
Address
Src
Address
64 bits 48 bits 48bits 16 bits Up to 1500 bytes
CRC
32 bits
Type /
Length
I Preamble is a sequence of 7 bytes, each set to “10101010”Used to synchronize the receiver before actual data is sent anddelimit the start of a frame
I In Ethernet II: “Type” field is a demultiplexing key used to determinewhich higher layer protocol the frame should be delivered to.
I In the IEEE802.3 standard, this field holds the length of DATA inbytes. LLC header stores the equivalent of Type field then.
1SN - Local area networks 57
Addresses
I Globally unique, 48-bit unicast address assigned to each adapterExample: f8:1e:df:e4:9b:9bEach manufacturer gets their own address range
I Broadcast : all 1s
I Contrast with IP addresses ...
1SN - Local area networks 58
Medium Access Control (MAC) Protocol
CSMA/CD
I In ALOHA, decisions to transmit are made without paying attentionto what other nodes might be doing
I In CSMA/CD, the device listens to the line before (CSMA) andduring sending (CD)
I Perform 1-persistent CSMA:I If channel is idle, send message immediately.I If channel is busy, wait until idle and transmit packet after waiting a
short Inter-Frame space (IFS) of 9.6 µs.
I AND collision detection (CD) : while sending, detect collision.I If collision, stop sending and jam signal: → increases throughput
compared to 1-persistent CSMAI Try again later: Back-off mechanism
1SN - Local area networks 59
Medium Access Control (MAC) Protocol
CSMA/CD State Diagram
Yes
Carrier
Sense
Discard
Packet
Detect
Collision
Jam channel
b=Backoff()
wait(b)
attempts ++
No
Yes
attempts == 16
Packet?
SendIdle
attempts< 16
1SN - Local area networks 60
Medium Access Control (MAC) Protocol
Remember collisionsCollisions are caused when two stations transmit at the same time if:
I Both stations found line to be idle
I Both had been waiting for a busy line to become idle
How can we be sure that both stations will eventually know that therewas a collision?
1SN - Local area networks 61
Medium Access Control (MAC) Protocol
Vulnerability periodHow can station A know that a collision took place?
A detects collision
BA
BA
B
B at end of line
Message almost
But B starts − collision !
at B at time t_p
A starts
at time 0
at time tp
at time T=2tp
A
I A’s message collides with B’s message at time tpI B’s message reaches A at time 2tp.
1SN - Local area networks 62
Medium Access Control (MAC) Protocol
Ensure minimum message sizeSo, station A must still be transmitting (and thus listening) at time 2tpto detect a collision
I IEEE 802.3 specifies a max value of 2tp to be 51.2µs.I Relates to the maximum distance of 2500m between hostsI At 10Mbps it takes 0.1µs to transmit one bit, so 512 bits (64bytes)
take 51.2µs to sendI So Ethernet frames must be at least 64 bytes long
14 bytes of header, 46 bytes of data and 4 bytes of CRCI Padding is used if data less 46 bytes
I Send jamming signal after collision to insure all hosts see collisionI 48 bits signal
1SN - Local area networks 63
Truncated Exponential Backoff algorithm
Basic idea:
I If a collision is detected, each station waits until its slot of 51.2µs isfinished.
I Then it backs off for a random amount of time and tries again ifchannel is idle.
I Backoff Time = Random() x SlotTime (51.2µs)I First collision: choose Random() from {0,1}I Second collision: choose Random() from {0,1,2,3}I nth time: choose Random() from {0, . . . , 2n − 1}I Max value for Random()=1023 (i.e. n = 10) – Truncated !I Give up and drop packet after several tries (usually 16)
1SN - Local area networks 64
Ethernet MAC Protocol
MAC algorithm from the receiver side
I Sender handles all access control
I Receiver simply reads frames with acceptable address:I Address to hostI Broadcast addressI Address to multicast to which host belongs toI All frames if host is in promiscuous mode
1SN - Local area networks 65
Ethernet MAC Protocol
ExerciseTwo hosts A and B are connected to a 10Mbps Ethernet LAN.
I At t = 0, A sends a 520 byte frame.
I At t = 5× 10−6s, B sends a 64 byte frame.
The propagation delay from A to B is 9× 10−6s.
1. Show on a temporal diagram the time the collision is detected byeach host
2. Assume that the binary exponential backoff provides a backoff valueof ‘1’ to host A and a ‘0’ to host B.Give the sequence of frame exchanges on a temporal diagram.
1SN - Local area networks 66
Fast and Gigabit Ethernet
Fast Ethernet 100MbpsHas technology very similar to 10Mbps Ethernet
I Uses different PHY layer encoding
I Many NIC’s (Network Interface Controllers) are 10/100 capable
Gigabit Ethernet 1000Mbps
I Compatible with lower speeds
I Uses standard framing and CSMA/CD
I Distances are very limited
I Typically used for backbone and inter-router connectivity
1SN - Local area networks 67
Experiences with Ethernet
Ethernet works best under light loadsUtilization over 30 % is considered heavyNetwork capacity is wasted by collisions
I Most networks are limited to about 200 hostsSpecification allows for up to 1024
I Most networks are much shorters
I Transport layer flow control helps reduce load (number of back toback packets)
I Ethernet is fast, inexpensive and easy to administer
1SN - Local area networks 68
IEEE 802.3 MAC Parameters
1SN - Local area networks 69
Limitations of Ethernet
Ethernet Problems
I Pretty low peak utilization
I Peak throughput worst with:I More hosts
More collisions needed to identify single senderI Longer links
Collisions take longer to observe, more wasted bandwidthI Efficiency is improved by avoiding these conditions of course.
But we need larger networks, with more hosts ....
Legacy 802.3/Ethernet not used anymore !
1SN - Local area networks 70
LAN switching and bridges
Switched Ethernet
1SN - Local area networks 71
Interconnection devices
There are several types of devices to interconnect networks
Bridge / Switch
HubHub
X25 network
Router
Token Ring
Ethernet
IP
Gateway
1SN - Local area networks 72
Interconnection devices
Ethernet Hub
I Interconnects Ethernet segments
I PHY layer interconnection device:just copies the bits received on the output port
I Collisions are propagated - just extends the broadcast domain
Bridge / LAN switch
I Interconnects two or more LANs together
I DLC layer interconnection device:Interconnects identical or dissimilar networks
I Switch is often used in the context of Ethernet interconnection.
1SN - Local area networks 73
Interconnection devices
Routers
I NETwork layer interconnection device:Typically interconnects IP networks
I Decides on routes for packets by implementing the IP routingprotocol
Gateway
I A more generic term for routers
I NETwork layer device as well
I Often designates devices that interconnect different layer 3 protocols
1SN - Local area networks 74
Switched Ethernet
Legacy Ethernet suffers from low peak utilization because it has tohandle collisions on the shared medium
To improve Ethernet efficiency, current LANs use a ’Switched Ethernet’technology (legacy Ethernet is rarely used nowadays)
I It replaces the shared medium with a dedicated segment for eachstationi.e. 1 segment per station
I Segments connect to a switch, which connects many of thesesegments in a star topology
I Each segment is full duplex
No collisions anymore on a segment !→ up to 100% utilization per segment
1SN - Local area networks 75
Switched Ethernet
Architecture example
Z
Switch
Switch
Switch
Switch
Backbone
E
A X
1SN - Local area networks 76
Switched Ethernet
Ethernet switch
I Looks similar to a hub but no shared medium
I Processes and sends data in a more sophisticated way than a hub
I The switch reads the destination address of the packet and sendsthe packet only to the port the destination is reachable at(NO broadcast as for a hub)
I Thus, for each output port, there is a buffer that stores packetswaiting for service.
Switches can support today hundreds of dedicated segments
Very scalable !
1SN - Local area networks 77
Switched Ethernet
Ethernet switchEach port is isolated and builds its own collision domain
B
CSMA/CD
CSMA/CD
CSMA/CD
CSMA/CD
Full duplex Full duplex
Full duplex Full duplex
CSMA/CD
CSMA/CD
CSMA/CD
CSMA/CD
Full duplex Full duplex
C
D
C
D
C
D
Full duplex Full duplex
C
D
HUB
Hig
hspeed B
ackbo
ne
SWITCH
Input buffers Output buffers
AA AA
B BB
1SN - Local area networks 78
Switched Ethernet
Ethernet switchOverall design goal: Complete Transparency
“Plug and play”
Should be self-configuring, without hardware or software changesShould not impact operation of existing LANs
Main parts for understanding bridges:
1. Forwarding of Frames
2. Learning of Addresses
1SN - Local area networks 79
Switched Ethernet
(1) Forwarding of framesA switch relies on a MAC forwarding table (or switching table)
I It stores entries of the form:
{ MAC address - output port - age}
MAC address: host name or group addressport: outgoing port number of bridgeage: age timing of entry (in seconds)
I As a packet comes in the switch, it reads the destination addressand looks in the table for its output port.
I If no entry exists in the table?I It floods the packet on all output ports (except its incoming port).
1SN - Local area networks 80
Switched Ethernet
(2) Learning of MAC addressesForwarding tables are set automatically with a simple heuristic:
I The source field of frames that arrive on a port tells which hosts arereachable from this port
I Learning algorithmI For each frame received, the source stores the source field in the
forwarding database together with the port where the frame wasreceived
I All entries are deleted after some time (default is ∼15s)
1SN - Local area networks 81
1SN - Local area networks 82