Local area networks

Katia Jaffr`es-Runserand Gentian Jakllari {kjr,jakllari}-at-n7.fr

Toulouse INP - ENSEEIHT

D´epartement Sciences du Num´erique 1`ereann`ee

INP ENSEEIHT T 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 are relatively close to each other – a local network ?

1SN - Local area networks 2 Local area networks

NOT a dedicated wire per communication It doesn’t scale: for N devices, we need N(N − 1)/2 wires.

1

1 source: 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 Different situations may occur: I No one else is transmitting data for the complete transmission duration. → 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 be understood: there is a collision ! /

Shared access networks

What happens if a device sends its message whenever needed?

1SN - Local area networks 5 I Another device transmits a message during the transmission → The messages are superimposed (destructively) and can’t be understood: there is a collision ! /

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 transmission duration. → The message is received properly by the destination . ,

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 transmission duration. → 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 be understood: there is a collision ! /

1SN - Local area networks 7 Using a Medium Access Control protocol a.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 bandwidth on average.

Bandwidth The amount of data that can be passed along a in a given period of time.

Shared access networks

Collisions Have of course to be mitigated. But how?

1SN - Local area networks 8 Bandwidth The amount of data that can be passed along a communication channel in a given period of time.

Shared access networks

Collisions Have of course to be mitigated. But how? Using a Medium Access Control protocol a.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 bandwidth on average.

1SN - Local area networks 9 Shared access networks

Collisions Have of course to be mitigated. But how? Using a Medium Access Control protocol a.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 bandwidth on average.

Bandwidth The amount of data that can be passed along a communication channel in a given period of time.

1SN - Local area networks 10 MAC protocol and

MAC protocol Decides when each device can transmit its messages on the shared channel (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 methods MAC 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 Access I Stations contend with each other without any centralized coordination I Collisions are the norm I A specific algorithm for resolving contention/reducing collisions once they happen I resolve collisions : detect a collision and do something to fix it I reduce collisions : reduce the odds for a collision to happen

1SN - Local area networks 13 Channel access methods

Deterministic Access I 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 allocation I Distributed : nodes agree by exchanging messages

1SN - Local area networks 14 Channel access methods

Deterministic Access I 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-frequency blocks (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 access Lecture 2: Random channel access Lecture 3: Ethernet and switched Ethernet Lecture 4: WiFi - Distributed Coordination Function (DCF)

Part 2: Deterministic channel access Lecture 5: WiFi (PCF) Lecture 6: Token Ring

1SN - Local area networks 17 Lecture 2: Random channel access.

ALOHA Carrier 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 7 campuses of the Univ. of Hawai’i, located on 4 different islands, to share computer resources on the main campus I The first user terminals went into operation in June 1971 I The 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 2 N. 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 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 overall performance.

ALOHA networks

ALOHA networks I Key decision: Use the direct form of transmitting user information in a single high-speed packet burst in a shared wireless channel I Driven by the need for a simple design; throughput computed several weeks after the decision I Cost of memory for a packet buffer of 88 bytes was about $300 I Channel access philosophy : let collisions happen, detect when they occur and then try again. I Any station can send data at any time I If, while transmitting, any data is received concurrently, then there is a collision – will need to try again.

1SN - Local area networks 20 ALOHA networks

ALOHA networks I Key decision: Use the direct form of transmitting user information in a single high-speed packet burst in a shared wireless channel I Driven by the need for a simple design; throughput computed several weeks after the decision I Cost of memory for a packet buffer of 88 bytes was about $300 I Channel access philosophy : let collisions happen, detect when they occur and then try again. I Any station can send data at any time I 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 overall performance.

1SN - Local area networks 21 ALOHA networks

Vulnerability period The message transmitted at time t experiences a collision if any other message overlaps partially with its transmission.

Sender A Sender B Fail Sender C Success

T

t−T t t+T time

Vulnerability period 2T

If all messages have equal length T , then the vulnerability period is of size 2T .

1SN - Local area networks 22 ALOHA networks

Throughput achieved by ALOHA It can be derived as follow: I Suppose that the number of transmission attempts per frame duration T follows a Poisson distribution of mean G. G k e−G Thus the probability of having k attempts during T is: k! I The probability of having no collision for the vulnerability period of 2T is given by e−2G I Thus, the throughput is the number G of attempts during T that don’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 is D = 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 ALOHA Idea: reduce the vulnerability period duration by synchronizing transmissions Sender A Sender B Fail Success Sender C Clock node

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 ALOHA As 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 E to get a message through increases exponentially with G :

k=∞ X G E = kPk = e k=1

with Pk the probability to transmit a message after k attempts given by −G −G k−1 Pk = e (1 − e ) .

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 made in average.

1SN - Local area networks 27 I Listen before speaking, I If someone speaks, defer transmission to a later date.

Carrier sense The node has to sense the channel to detect an ongoing transmission.

May collisions still happen then ?

Towards better random access

Become a bit more polite

1SN - Local area networks 28 Carrier sense The node has to sense the channel to detect an ongoing transmission.

May collisions still happen then ?

Towards better random access

Become a bit more polite

I Listen before speaking, I If someone speaks, defer transmission to a later date.

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 sense The 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

CSMA A.k.a. Carrier Sense Multiple Access is a family of protocols where a node wanting to transmit a message : I Senses the channel I If the channel is busy, then she defers transmission I 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.

AB tp = 5ms Collision at time 9

A 0 Collision at time 5 B 4 ms

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 period In CSMA, the vulnerability period is the duration for the 1st bit to travel until the end of line and back, i.e.

T = 2tp

A starts A B at time 0 B at end of line

Message almost A B at B at time t_p at time tp But B starts − collision !

A B at time T=2tp A detects collision

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 channel I If the channel is busy, then wait for end of ongoing transmission I If the channel is idle, then transmit immediately (with probability 1).

→ persistently listens while transmitting to detect idle state as soon as possible.

1SN - Local area networks 35 1-persistent CSMA

Issue with 1-persistent CSMA

AB C tp = 0ms

wait for idle A 0 Collision :−( wait for idle B 4 ms

C

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 node Here, the sender doesn’t actively listen to detect the end of an ongoing transmission.

I Sense the channel I If the channel is busy, then wait a random time and sense channel again I If the channel is idle, then transmit immediately

→ No persistent listening during transmission

1SN - Local area networks 37 Non-persistent CSMA

Example

AB C tp = 0ms

wait for 7ms 5ms A 0

wait 3ms 7ms 3ms B

C

Collisions are less likely to occur here, but time may be lost after the end of the ongoing transmission. Peak throughput is a much better: ' 81.5%.

1SN - Local area networks 38 p-persistent CSMA

Algorithm for a ready node A 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 duration T = 2tp). 1. Sense the channel I 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 to step 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

∞ X E[k] = kp(1 − p)k = 1/p k=1 slots to send a message if channel is constantly idle.

1SN - Local area networks 40 Non-persistent vs. persistent

p-persistent

Non-persistent Sense channel

wait Sense channel 1 slot Yes Wait ... Busy?

No Yes Busy? Send message with probability p No

Send message No Send?

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 with throughput S for non-persistent and p-persistent schemes.

3 L. Kleinrock and F. Tobagi, ” 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/CD A 1-persistent CSMA with an advanced collisions detection (CD) mechanism. I 1-persistent CSMA: low peak throughput S but fast channel access in average. I Improve throughput with CD thanks to I Detection of collision at sender I Stop transmission if collision is detected I Random back-off duration before new transmission attempt.

Will be detailed in Ethernet lecture.

1SN - Local area networks 44 Advanced CSMA protocols

CSMA/CA A p-persistent CSMA with an advanced collisions avoidance (CA) mechanism made for wireless systems. I p-persistent CSMA: larger peak throughput S but slower channel access time in average. I Reduce channel access time with CA operations: I Detection of collision at receiver I Acknowledgement message to notify sender I 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 access A CSMA where the contention resolution procedure elects the highest priority message. I Each message gets a unique identifier (ID) representative of its priority. 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 access How 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 1 I Dominant → bit value 0

1SN - Local area networks 47 CSMA/CR

Bit-level contention resolution For each transmitted bit, sender checks whether it stayed unchanged.

1. Emission of one bit

2. Propagation E1 3. Reflexion

4. Reception of same bit

If bit unchanged, then sender keeps sending, else it stops.

1. Emission of one recessive bit

1 E1 3. Reflexion

0 3. Channel adds both signals 0 E2 0 AND 1 = 0 4. E1 hears 0 instead of bit 1 2. E2 sends a dominant bit

E2 keeps sending and E1 stops.

1SN - Local area networks 48 CSMA/CR

Priority with contention resolution Each node sends its ID (i.e. priority) in the header of the message, with big-endian encoding (most significant bit first).

0 0 0 1 Frame ID 1 wins − continues its emission Frame ID 1 [0 0 0 1]

Stops − Lost contentiont Frame ID 10 [1 0 1 0]

Stops − Lost contention Frame ID 3 [0 0 1 1]

Highest priority message never waits. Others wait for higher priority messages 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 for the 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 standard in 1983 I Originally 2.94 Mbps, the latest reaches 100 Gbps I Standardized, open to multiple vendors, became quickly fast and cheap I CSMA/CD: Ethernet’s medium access control (MAC) policy I CS = Carrier Sensing Send only if medium is idle I MA = Multiple Access I 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 solutions I 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 (originally 2Mbps) 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 interface A 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 topology I Distance of any node to the hub must be < 100 meters I 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

Overview Most popular packet-switched LAN technology I Maximum bus length : 2500 meters divided into 500 meter segments with 4 repeaters I Bus and start topologies are possible I Hosts attach to network via Ethernet transceiver or hub (or switch) detects line state (idle/busy) and sends/receives signals I Hubs are used to facilitate shared connections I Network layer packets are transmitted over Ethernet after encapsulation I A broadcast protocol by nature I Any signal can be received by all I 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 format There are two MAC frame format versions: for Ethernet II (legacy DIX commercial version) and for the IEEE802.3 standard.

Dest Src Type / Preamble DATA / LLC+DATA CRC Address Address Length

64 bits 48 bits 48bits 16 bits Up to 1500 bytes 32 bits

I Preamble is a sequence of 7 bytes, each set to “10101010” Used to synchronize the receiver before actual data is sent and delimit the start of a frame I In Ethernet II: “Type” field is a demultiplexing key used to determine which higher layer protocol the frame should be delivered to. I In the IEEE802.3 standard, this field holds the length of DATA in bytes. 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 adapter Example: f8:1e:df:e4:9b:9b Each 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 attention to what other nodes might be doing I In CSMA/CD, the device listens to the line before (CSMA) and during 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 CSMA I Try again later: Back-off mechanism

1SN - Local area networks 59 Medium Access Control (MAC) Protocol

CSMA/CD State Diagram

Packet?

Yes No

Sense Idle Detect Send Carrier Collision Yes Discard Packet Jam channel attempts< 16 b=Backoff() wait(b) attempts ++

attempts == 16

1SN - Local area networks 60 Medium Access Control (MAC) Protocol

Remember collisions Collisions 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 there was a collision?

1SN - Local area networks 61 Medium Access Control (MAC) Protocol

Vulnerability period How can station A know that a collision took place?

A starts A B at time 0 B at end of line

Message almost A B at B at time t_p at time tp But B starts − collision !

A B at time T=2tp A detects collision

I A’s message collides with B’s message at time tp I B’s message reaches A at time 2tp.

1SN - Local area networks 62 Medium Access Control (MAC) Protocol

Ensure minimum message size

So, station A must still be transmitting (and thus listening) at time 2tp to 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 hosts I At 10Mbps it takes 0.1µs to transmit one bit, so 512 bits (64bytes) take 51.2µs to send I So Ethernet frames must be at least 64 bytes long 14 bytes of header, 46 bytes of data and 4 bytes of CRC I Padding is used if data less 46 bytes I Send jamming signal after collision to insure all hosts see collision I 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 is finished. I Then it backs off for a random amount of time and tries again if channel 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 host I Broadcast address I Address to multicast to which host belongs to I All frames if host is in promiscuous mode

1SN - Local area networks 65 Ethernet MAC Protocol

Exercise Two 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 by each host 2. Assume that the binary exponential backoff provides a backoff value of ‘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 100Mbps Has 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 loads Utilization over 30 % is considered heavy Network capacity is wasted by collisions I Most networks are limited to about 200 hosts Specification allows for up to 1024 I Most networks are much shorters I Transport layer flow control helps reduce load (number of back to back 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 sender I Longer links Collisions take longer to observe, more wasted bandwidth I 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

Ethernet Hub Hub

Bridge / Switch Router IP

X25 network Token Ring 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 routing protocol

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 to handle 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 each station i.e. 1 segment per station I Segments connect to a switch, which connects many of these segments 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

Backbone Switch

Switch Switch Switch

A X Z E

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 sends the 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 packets waiting for service. Switches can support today hundreds of dedicated segments

Very scalable !

1SN - Local area networks 77 Switched Ethernet

Ethernet switch Each port is isolated and builds its own collision domain

HUB SWITCH

CSMA/CD CSMA/CD Full duplex Full duplex A A A A

CSMA/CD CSMA/CD Full duplex Full duplex B B B B CSMA/CD CSMA/CD Full duplex Full duplex C C C C CSMA/CD CSMA/CDD DFull duplex Full duplex D D Highspeed Backbone

Input buffers Output buffers

1SN - Local area networks 78 Switched Ethernet

Ethernet switch Overall design goal: Complete Transparency

“Plug and play”

Should be self-configuring, without hardware or software changes Should 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 frames A 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 address port: outgoing port number of bridge age: age timing of entry (in seconds) I As a packet comes in the switch, it reads the destination address and 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 addresses Forwarding tables are set automatically with a simple heuristic: I The source field of frames that arrive on a port tells which hosts are reachable from this port I Learning algorithm I For each frame received, the source stores the source field in the forwarding database together with the port where the frame was received I All entries are deleted after some time (default is ∼15s)

1SN - Local area networks 81 1SN - Local area networks 82