tecnologie e protocolli per internet 1

59
1 Tecnologie e Protocolli per Internet 1 Prof. Stefano Salsano e-mail: [email protected] AA2011/12 – Blocco 1 2 Obiettivi del corso (tecnologie e protocolli di accesso) Obiettivi del corso (tecnologie e protocolli di accesso) Conoscere le alternative per le reti di accesso. Acquisire una buona conoscenza di: » tecnologie ethernet switched per LAN cablate » IEEE 802.11 per Wireless LAN » (architetture di rete per l’accesso xDSL)

Upload: others

Post on 14-Apr-2022

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Tecnologie e Protocolli per Internet 1

1

Tecnologie e Protocolli per Internet 1

Prof. Stefano Salsanoe-mail: [email protected]

AA2011/12 – Blocco 1

2

Obiettivi del corso(tecnologie e protocolli di accesso)

Obiettivi del corso(tecnologie e protocolli di accesso)

• Conoscere le alternative per le reti di accesso.

• Acquisire una buona conoscenza di:

» tecnologie ethernet switched per LAN cablate

» IEEE 802.11 per Wireless LAN

» (architetture di rete per l’accesso xDSL)

Page 2: Tecnologie e Protocolli per Internet 1

3

Obiettivi del corso(tecnologie e protocolli di trasporto)

Obiettivi del corso(tecnologie e protocolli di trasporto)

• Conoscere le architetture delle reti di trasporto numeriche per la telefonia e per i dati e la loro evoluzione.

• Acquisire una conoscenza delle problematiche del trasporto di IP sulle dorsali di rete e della tecnologia MPLS.

• Comprendere le architetture e i protocolli per il trasporto della Voce su IP, sia dal punto di vista della segnalazione che dal punto di vista del trasporto dei flussi audio.

4

Argomenti (tecnologie e protocolli di accesso) Argomenti (tecnologie e protocolli di accesso)

» General approach

» Layer 2 data networking issues� Switched ethernet networks

� LAN virtualization

� Dynamic IP configuration

» Technologies

» Switched ethernet

» WLANs

» Other (briefly and always in progress) : xDSL

RingraziamentoMolte delle slides della parte di reti di accesso sono tratte da quelle del

dal corso del prof. Giuseppe Bianchi (AA 2007-08)

Page 3: Tecnologie e Protocolli per Internet 1

5

• Ethernet/802.3» Mario Baldi, Pietro Nicoletti, “Switched LAN”, Mc Graw Hill, 2002

» Selected parts» O’Reilly, Ethernet, the definitive guide, 2000

» Complement

• Parti relative a protocolli legati a IP:» Varie RFC su www.ietf.org

• 802.11» Matthew Gast, “802.11 Wireless Networks, the definitive guide”,

O’Reilly, 2005

Parti da studiare: verranno specificate di volta in volta a lezione

Materiale (tecnologie e protocolli di accesso) Materiale (tecnologie e protocolli di accesso)

6

L’informazione scambiata nelle moderne reti (numeriche) è in forma digitale,

cioè come sequenza di cifre binarie 1 o 0 (bit=BInary digiT).

� Informazione intrinsecamente digitale → Dati

� Informazione digitalizzata proveniente da sorgenti analogiche

A/DTras-

duttore0 1 0 0 1 1 1 1 0 1 0

t

V

0 1 0 0 1 1 1 1 0 1 0

Rete TLC

D/ARipro-duttore

0 1 0 0 1 1 1 1 0 1 0

t

V

Rete TLC 0 1 0 0 1 1 1 1 0 1 0

La Natura Digitale dell’InformazioneLa Natura Digitale dell’Informazione

Page 4: Tecnologie e Protocolli per Internet 1

7

• Vi sono fondamentalmente due modalità per trasferire l’informazione digitale attraverso la rete

modalità a circuito

modalità a pacchetto

Trasferimento dell’informazione digitale nella reteTrasferimento dell’informazione digitale nella rete

Orientata alla connessione

Orientata alla connessione

Senza connessione

8

Trend importantiTrend importanti

• Migrazione delle reti verso il modo di trasferimento a pacchetto ed in particolare verso IP (reti “All-IP”)

• Crescita esponenziale del traffico IP» Peer-to-peer» Video

Page 5: Tecnologie e Protocolli per Internet 1

9

10

Page 6: Tecnologie e Protocolli per Internet 1

11

12

Rete di accesso / Rete di trasportoRete di accesso / Rete di trasporto

PSTN/ISDN ADSL

Rete diaccessoin rame

Rete diaccessocellulare

Fixedwireless

acces

Rete diaccessoin fibra

LAN

WLAN

Rete ditrasporto

GSMUMTS

Rete diaccessoWi-Max

Page 7: Tecnologie e Protocolli per Internet 1

13

Rete di accesso / Rete di trasportoRete di accesso / Rete di trasporto

Rete diaccesso

Rete ditrasporto

NO ! SI !

Nell’accesso alle reti telefoniche,mentre nelle LAN c’è commutazione!

14

Rete di accesso / Rete di trasportoRete di accesso / Rete di trasporto

• In genere, nelle reti di accesso sono prevalenti le funzioni di concentrazione e distribuzione

• Nelle reti di trasporto si effettua la commutazione, oltre naturalmente alla multiplazione e demultiplazione

• In genere, nelle reti di accesso la “banda”(*) è una risorsa limitata (ad es. nelle reti cellulari le frequenze disponibili sono assegnate su licenza) o “costosa” (ad esempio costo di realizzazione di una rete di accesso capillare in fibra ottica)

• Nelle reti di trasporto la “banda” è relativamente meno costosa, perché le fibre ottiche già installate offrono una grande capacità trasmissiva

(*) Nel gergo delle reti si utilizza il termine banda per indicare capacità trasmissiva

Page 8: Tecnologie e Protocolli per Internet 1

15

Rete di accesso / Rete di trasportoRete di accesso / Rete di trasporto

• Per un operatore i costi legati alle reti di trasporto sono principalmente costi legati all’esercizio e alla manutenzione della rete (“Operation and maintenance”). In gergo finanziario si chiamano OPEX (Operational Expenditures).

• I costi legati alle reti di accesso sono invece principalmente legati agli investimenti necessari per realizzare la rete di accesso. In gergo finanziario si chiamano CAPEX (Capital Expenditures).

16

Attualmente, le infrastrutture delle reti di trasporto (cioè le fibre ottiche) sono in

larga misura già disponibili. Le spese che vengono sostenute sono spese “di

operazione e manutenzione” e vengono in generale divise tra una molteplicità di

utenti.

Le infrastrutture di molte reti di accesso sono invece in via di realizzazione o sono

state realizzate di recente. Questo comporta forti investimenti per gli operatori.

In genere si devono sostenere spese per ogni singolo utente cui si vuole offrire

servizio.

Ad esempio per la rete di accesso ADSL è necessario comprare per ogni utente

un modem ADSL lato centrale e uno a casa dell’utente. Per una rete di accesso in

Fibra Ottica (es. Fastweb) è necessario scavare per portare la fibra fino a casa

dell’utente. Per le reti di accesso cellulari, è necessario installare le stazioni radio

base (e gli apparati per collegarle) che coprano in modo adeguato il territorio.

Page 9: Tecnologie e Protocolli per Internet 1

17

Broadband Access TechnologyBroadband Access Technology

• Fixed Access» xDSL» Cable Modem» Fiber Optic» Giga Ethernet» Satellite» Free-Space Optic» Fixed Wireless: WLL, LMDS, MMDS, WiMAX» Power Line….

• Mobile Access» GPRS/UMTS/HSDPA» Bluetooth» WLAN» WiMax» ….

18

Broadband access, USA(fixed networks, very old stats)

10

20

30

40

50

Cable

DSL

Fixed wireless

Satellite

Fiber200520042003200220012000

Broadbandhouseholds

(millions)

CableDSL

Fixed wirelessSatellite

Fiber

Total (millions)

3.74 7.76 11.42 15.81 19.43 22.421.25 2.96 6.61 10.07 14.06 17.750.02 0.25 0.66 1.25 2.22 4.200.00 0.00 0.19 0.55 1.11 1.870.00 0.00 0.01 0.06 0.19 0.475.00 10.97 18.89 27.73 37.01 46.72

(numbers may not total due to rounding)

0

Source: Forrester Research, 2000

Page 10: Tecnologie e Protocolli per Internet 1

19

Evolving Wireless Communications 2004-2006Evolving Wireless Communications 2004-2006

Source: M. DSource: M. Dèècina, 2004cina, 2004

MobileFiMobileFi

802.20802.20

UMTSUMTS

10 kbit/s10 kbit/s 100 kbit/s100 kbit/s 1 Mbit/s1 Mbit/s 10 Mbit/s10 Mbit/s 100 Mbit/s100 Mbit/s

UltraWideBandUltraWideBand

802.15.3802.15.3BluetoothBluetooth

802.15.1802.15.1

1 1 Gbit/sGbit/s

ZigBeeZigBee

802.15.4802.15.4

EDGEEDGEGPRSGPRSGSMGSM

1 kbit/s1 kbit/s

CABLECABLE

REPLACEMENTREPLACEMENT

HOME, OFFICEHOME, OFFICE

PUBLIC ACCESSPUBLIC ACCESS

CITY,CITY,

SUBURBSSUBURBS

COUNTRY,COUNTRY,

REGIONREGION

WIDEWIDE

Range

Range

Bit RateBit Rate

EDEDED HSDPAHSDPA

PANPAN

WLANWLAN

WMANWMAN

WANWAN

WiWi--FiFi

802.11b802.11b802.11a/g/n802.11a/g/n

WiMAXWiMAX

802.16a/e802.16a/e

LIMITED

LIMITED

FULL

FULL

Mobility

Mobility

20

Gigabit Ethernetring

routerIP

PoP

switchEthernet

switch Eth with optical

long reach GbE

• Dual optical fibre

• Gigabit Ethernet

• Reach up to 10 km

Business

cabinet

Eth 10 Mbit/s(VDSL)

Low density area

building

Eth 10/100 Mbit/sover UTP5alternative

Eth 10 Mbit/sover (VDSL)

PBX

Copper pair

GEthernet to the BuildingGEthernet to the Building

Page 11: Tecnologie e Protocolli per Internet 1

21

Rete di accesso / Rete di trasportoRete di accesso / Rete di trasporto

Rete diaccesso

Rete ditrasporto

NO ! SI !

Nell’accesso alle reti telefoniche,mentre nelle LAN c’è commutazione!

22

Ethernet as Access NetworkEthernet as Access Network

• “Traditional” Access network:» No switching involved

• Switched Ethernet LANs/MANS» Switching involved

Page 12: Tecnologie e Protocolli per Internet 1

23

• Introduzione ad Ethernet

Dove siamo ?Dove siamo ?

24

Ethernet AncestorsEthernet Ancestors

• Late 1960: ALOHA network» Norman Abramson, University of Hawaii» Application: radio network among islands

» Distribuded, uncoordinated network!» First random access mechanism

» (Pure aloha / Slotted aloha)

Page 13: Tecnologie e Protocolli per Internet 1

25

The original idea for Ethernet was to allow two or more hosts to use the same

medium with no interference between the signals. This problem of multiple

user access to a shared medium was studied in the late 1960s at the

University of Hawaii. A system called Alohanet was developed to allow

various stations on the Hawaiian Islands structured access to the shared

radio frequency band in the atmosphere. The concept was to employ a pure

“random” access mechanism, i.e. transmit randomly and hope the signal goes

through. Interesting enough, such a system, later on called ALOHA, has an

18% throughput. The throughput can be eventually doubled if transmissions

are attempted at discrete instant of times (slotted aloha). This work later

formed the basis for the Ethernet access method known as CSMA/CD.

26

Birth of EthernetBirth of Ethernet

• May 22, 1973: Ethernet memo » Bob Metcalfe (Xerox Palo Alto Research Center)» Carrier Sense Multiple Access with Collision Detection and expo backoff» 3 mbps speed

Original Metcalfe drawing

June 1976 presentation at

National Computer Conference

US Patent 4.063.220

“Multipoint Data Communication

System with Collision Detection”

end 1977

1978: US Patent for

Ethernet Repeater

Page 14: Tecnologie e Protocolli per Internet 1

27

The first LAN in the world was the original version of Ethernet. Robert Metcalfe and his

coworkers at Xerox designed it more than thirty years ago.

[quoting from Ethernet – The definitive guide”]: “In late 1972, Metcalfe and his Xerox

PARC colleagues developed the first experimental Ethernet system to interconnect the

Xerox Alto, a personal workstation with a graphical user interface. The experimental

Ethernet was used to link Altos to one another, and to servers and laser printers. The signal

clock for the experimental Ethernet interface was derived from the Alto's system clock,

which resulted in a data transmission rate on the experimental Ethernet of 2.94 Mbps.

Metcalfe's first experimental network was called the Alto Aloha Network. In 1973 Metcalfe

changed the name to "Ethernet," to make it clear that the system could support any

computer--not just Altos--and to point out that his new network mechanisms had evolved

well beyond the Aloha system. He chose to base the name on the word "ether" as a way of

describing an essential feature of the system: the physical medium (i.e., a cable) carries bits

to all stations, much the same way that the old "luminiferous ether" was once thought to

propagate electromagnetic waves through space. Thus, Ethernet was born.”

28

Ethernet StandardizationEthernet Standardization

• 1979: Metcalfe start-up - 3COM• 1980: DIX Ethernet Standard

» DIX = Digital-Intel-Xerox vendor consortium» Interoperable products from the three founding

companies

• 1982: Xerox relinquish “Ethernet” trademark• 1985: IEEE 802.3

» Ethernet becomes an IEEE 802 standard» 10 Mbps (10BASE5 thick coaxial)» 802.3 supplement a (1985):

� 10BASE2 thin coax

» Minor modifications vs DIX standard» Path towards worldwide interoperability

Ethernet standard: the world’s FIRST open, multi-vendor standard!

Quoting Metcalfe: “the invention of Ethernet as an open, non-proprietary,

industry-standard local network was perhaps even more significant

than the invention of Ethernet technology itself”

Thick-RG213

Thin-RG58

Page 15: Tecnologie e Protocolli per Internet 1

29

Connection to coaxial cable (historical)

Controller

transceiver

transceivercable

Thick Cable

Needs external TAP

(transceiver)

Controller Controller

Wall, …

May support Internal TAP

(on board transceiver)

Thin Cable

15-pin AUIconnector

30

A note on Ethernet terminologyA note on Ethernet terminology

speed Signal method medium

• Speed» 10 / 100 / 1000 / 10G

• Signal method» Base / broad

» Broad = RF modulated on coax� only one case: 10BROAD36, now obsolete

• Medium» Old notation: 2 / 5 = 200/500 mt (thin/thick coax)» More recent notation: T / Tx / T4 / T2 / FX / X / CX / SX / LX

» Depends on which specific twisted pair category & fibre category;» Different labels (e.g. T, TX, T4, T2) accounts for different encoding

details

EXAMPLE: 100Base-T, 1000Base-LX, …

Page 16: Tecnologie e Protocolli per Internet 1

31

Ethernet and OSIEthernet and OSI

L7 Applicazione

L6 Presentazione

L5 Sessione

L4 Trasporto

L3 Rete

L2 Collegamento

L1 Fisico Media specifications

Physical signalling

sublayers

Media Access Control

(MAC) sublayer

Logical Link Control

(LLC) sublayer

Ethernet

specific

32

Ethernet and PHY (selected+simplified)Ethernet and PHY (selected+simplified)

Page 17: Tecnologie e Protocolli per Internet 1

33

IEEE 802 project

LAN / MAN Standards Committee (LMSC)

802.3 802.5

802.2 Logical Link Control

802.11

NETWORKLAYER

DATA LINKLAYER

PHYSICALLAYER

LLC

MAC

CSMA/CD TOKENRING

WLAN

UnifiedUnified interface interface withwith network network layerlayer

802.15

802.1 Bridging

WPAN

34

IEEE 802 standardsIEEE 802 standards

• ACTIVE WORKING & TECHNICAL ADVISORY GROUPS» 802.1 High Level Interface (HILI)» 802.3 CSMA/CD

» 802.11 Wireless LAN (WLAN)

» 802.15 Wireless Personal Area Network (WPAN)

» 802.16 Broadband Wireless Access (BBWA) » 802.17 Resilient Packet Ring (RPR)

» 802.18 Radio Regulatory Technical Advisory Group» 802.19 Coexistence Technical Advisory Group

» 802.20 Mobile Wireless Access

» 802.21 Media Independent Handover

• HIBERNATING WORKING GROUPS (standards published, but inactive)» 802.2 Logical Link Control (LLC)

» 802.5 Token Ring» 802.12 Demand Priority

• DISBANDED WORKING GROUPS (all standards withdrawn or did not publish a standard)

» 802.4 Token Bus» 802.6 Metropolitan Area Network (MAN)

» 802.7 BroadBand Technical Adv. Group (BBTAG)

» 802.8 Fiber Optics Technical Adv. Group (FOTAG)» 802.9 Integrated Services LAN (ISLAN) Working Group

» 802.10 Standard for Interoperable LAN Security (SILS) Working Group

» 802.14 Cable-TV Based Broadband Communication Network Working Group

Page 18: Tecnologie e Protocolli per Internet 1

35

FDCBA E

FDCB EA

wrong!wrong!

• Multiple Access shared transmission medium» thick / thin coaxial cable

Traditional Ethernet topology: bus

36

Twisted Pair revolutionTwisted Pair revolution

• 1990: 802.3i » 10BASE-T twisted pair

» Invented by SynOptics Communications

• Reuse structured cabling system standards

» Overcomes management and installation problems from coaxial cabling

» Ethernet market takes-off!!

• Alternatives» UTP (Unshielded)» FTP (Foiled)

» 1 shield for all the cable» STP (Shielded):

» One shield per pair

Page 19: Tecnologie e Protocolli per Internet 1

37

Twisted Pair: star topology(no TAP allowed)

Twisted Pair: star topology(no TAP allowed)

• Initially: HUB» broadcasts signal on all links

» Logically behaves as a bus

» Only one tx at a time

• Then: SWITCH » Repeats signal on specifically

addressed link

» Bridging function» Many tx-rx pairs at a time

» More bw!

FDCBA E

HUBHUB

FDCBA E

SWITCHSWITCH

38

Fiber Optics enters into playFiber Optics enters into play

• 1987: FOIRL (802.3d)» Fiber Optic Inter-Repeater Link» Point-to-point segment to link remote ethernet

segments (via repeaters)» No direct PC-Ethernet connection until

10BASE-F

• 1993: 10BASE-F (802.3j)» three specifications

» 10BASE-FB for active fiber hubs � scarce success

» 10BASE-FP for passive fiber hubs� never built!

» 10BASE-FL extends FOIRL specification � the only one deployed

Page 20: Tecnologie e Protocolli per Internet 1

39

Ethernet for higher speedsEthernet for higher speeds

• 1995: 100BASE-T Fast Ethernet (802.3u)» 100 Mbps on twisted pair» As well as on any other media» Auto-Negotiation capabilities

» 10/100 products

• 1997: full duplex standard (802.3x)» Simultaneously transmit and receive (2x speed increase)

• 1998: 1000BASE-X Gigabit Ethernet (802.3z)» Over fiber and short copper cable

• 1999: 1000BASE-T Gigabit Ethernet (802.3ab)» Over Twisted Pair» 10/100/1000 auto-negotiation

• 2002 (july): 10 GigaEthernet (802.ae)• 2010 (june) 40 GbE 100GbE (802.3ba)

Many people though Ethernet could not go faster than 10 Mbps… instead:

40

Ethernet Evolution at a glanceEthernet Evolution at a glance

Page 21: Tecnologie e Protocolli per Internet 1

41

• Introduzione ad Ethernet» Ethernet basics

Dove siamo ?Dove siamo ?

42

Ethernet/802.3 frameEthernet/802.3 frame

preamble Ethernet/802.3 LLC/DATA FCS

8 bytes 14 bytes 46-1500 bytes 4 bytes

Source addressLengthor typeDestination address

6 bytes 6 bytes 2 bytes

LLC+data

(explicit PAD)

Data (≥46 but no PAD)

payload

Length or typetypeFrame type

802.3ETHERNETMain Differences

64-1518 bytes

Page 22: Tecnologie e Protocolli per Internet 1

43

PreamblePreamble

• 8 bytes» 7 bytes preamble

» 7 x (10101010)» Last byte: SFD (Start Frame Delimiter)

» (10101011)

• Devised for 10 Mbps systems» For synchronization

• Not useful for 100/1000 systems» Maintained for backward compatibility

1 0 1 0 1 0 1 1SFD

bit sequence

Manchester

Encoding

(10 Mbps)

44

Frame Check SequenceFrame Check Sequence

•FCS» 4 bytes = 32 bits CRC

» Order: [x31…x0]» calculated on frame only (not on preamble…)

» Of course!!

Page 23: Tecnologie e Protocolli per Internet 1

45

48 bit addresses48 bit addresses

• Typically referred to as» Interface address» Hardware address» MAC address» “Ethernet” address (not properly!)

• First bit:» 0 = physical address of an interface

» Unicast address» 1 = group address

• Second bit:» 0 = globally administered address

» Assigned by the manifacturer» 1 = locally administered address

» Can be configured through driver

First 24 bits: OUI

(Organization Unique Identifier)

(unique for each vendor)

Typically written in hex

e.g.: F0-11-00-4F-A2-1C

Each byte transmitted

from LSB to MSB

0000.1111.1000.1000.0000.0000.

1111.0010.0100.0101. 0011.1000

0F-11-00-F4-2A-1C

mcast addresses: start with 1

(first octet LSB!)

Why destination first? Station who does not match dest may ignore rest of frame!

46

ExamplesExamples

Individual unicast: xy-xx-xx-xx-xx-xx � y multiple of 4

802.3 & 802.4: transmitted from LSB to MSB

802.5 & FDDI: transmitted from MSB to LSB

Page 24: Tecnologie e Protocolli per Internet 1

47

• 2 bytes• In original ethernet: frame type

» Used for demultiplexing upper layer proto» Eg: 0x0800=IP

• In 802.3: length OR type» If>1500 (more precisely, ≥ 0x0600 = 1536) ���� frame type» Else LLC payload size (≤1500)

» Demultiplexing provided by LLC» If <46, remaining octets are PAD (padding)

Length/TypeLength/Type

Ethernet and 802.3 frames may (do!) coexist on the same network.

Recognized via length / frame type field.

48

LLC headerLLC header

DSAP SSAP ctrl Protocol OUI Protocol

preamble Ethernet/802.3 LLC/DATA FCS

8 bytes 14 bytes 46-1500 bytes 4 bytes

1 byte 3 bytes 2 bytes

64-1518 bytes

1 byte1 byte

………46-1492 bytes

SNAP (SubNetwork Access Protocol)• DSAP=SSAP (typically)• Control: depends on service type. Typically:

» service type = connectionless unreliable» ctrl=0x03 (unnumbered information)

• Demultiplexing:» DSAP, SSAP used only for ISO-OSI standards» other protocols (including IP!) require SNAP addesses, in this case

DSAP=SSAP=0xAA

Page 25: Tecnologie e Protocolli per Internet 1

49

LLC Header for an IP packetLLC Header for an IP packet

0xAA 0xAA 0x03 0x000000 0x0800

1 byte 3 bytes 2 bytes1 byte1 byte

………46-1492 bytes

• DSAP=SSAP:» 0xAA (use SNAP extension)

• Control:» 0x03 (unnumbered information)

• Protocol OUI (Organization Unique Identifier:» 0x000000 (Internet – IETF protocols)

» Non-zero values for Novell, IBM, Digital, Apple, etc protocols

• Protocol» 0x0800 (IP)

50

• Introduzione ad Ethernet» Ethernet basics» Medium Access Control (MAC): Carrier Sense Multiple Access

with Collision Detection (CSMA / CD)

Dove siamo ?Dove siamo ?

Page 26: Tecnologie e Protocolli per Internet 1

51

Role of MAC (CSMA/CD)Role of MAC (CSMA/CD)

• three functions: » Transmit/receive data frames » Decode data frames and check them for valid addresses

» before passing them to the upper layers of the OSI model » Detect errors within data frames or on the network

52

Carrier Sense Multiple AccessCarrier Sense Multiple Access

1. Listen before talking

1. Station ready to

transmit a frame

2. Listen for at least

an Inter Frame Spacing

(channel must be

idle meanwhile)

3. Transmit frame

Ethernet Notation = Inter Packet Gap (IPG)

802.3 Notation = Inter Frame Spacing (IFS)

Minimum: 96 bits (@ 10 Mbps = 9.6 µµµµs)

IFS

Page 27: Tecnologie e Protocolli per Internet 1

53

Carrier Sense Multiple AccessCarrier Sense Multiple Access

2. If channel detected busy: defer

2. Listen

4. Defer

1. Frame

ready 3. Busy

Detect5. Listen

for ≥ IFS

(similar defer situation if channel immediately busy)

54

Collision DetectionCollision Detection

3. Listen while talking

• If collision detected:

» Continue to transmit other 32 bits of signal(Collision Enforcement Jam Signal)

» If detected during the preamble, continue transmitting preamble AND other 32 jam bits

» End transmission» Generate backoff interval, after which retry transmission

» Backoff: r x 51.2 µµµµs, 0 ≤ r < 2k, k=min(10,n), n=retry #» Slot-time = 64 bytes = 512 bits (@ 10 Mbps = 51.2 µµµµs)

» Abort tx after 16 unsuccessful retries

Page 28: Tecnologie e Protocolli per Internet 1

55

Summary of operationSummary of operation

Source: Cisco CCNA

56

Collision detection in practiceCollision detection in practice

•Media dependent•On fiber or twisted pair:

» Point-to-point links» Collision detected by the simultaneous occurrence of activity

on both transmit and receive paths

•On Coax:» Monitor average DC voltage» When more than 1 station transmits, voltage gets greater than

given threshold

Page 29: Tecnologie e Protocolli per Internet 1

57

Why collisions occur?Why collisions occur?

distance d (m)

prop delay d/200 µµµµs

Speed of EM signal in cable: ~200.000 km/s � 200m/µs

IFS

time

IFSStart tx

Detect collision

Start tx

Detect

collision Collision occurs if stations access the channel

in instants of time which differ for less than their

propagation delay

58

Network diameterNetwork diameter

• Essential condition: » a station must be able to detect a

collision» Otherwise lots of problems

» station would think the frame to be successfully delivered…

• Shortest possible frame:» 6+6+2+46+4 = 64 bytes =

= 512 bits (excl preamble)

• Condition on network diameter:

» a collision MUST be detected on shortest possible frame

» Bound on maximum RTT

Stations placed at opposite network edges

RTT=2 x prop

must be lower

than 512 bits

64 bytes

512 bits

frame

@ 10 Mbps: 512/10 [µs] = 2d [m] / 200 [m/µs] � d= 5120 [m]

Page 30: Tecnologie e Protocolli per Internet 1

59

Network diameterNetwork diameter

Let• Tmin [us] : minimum duration of the transmission of a frame• Lmin [bit] : minimum frame lenght• C [Mb/s] : transmission bit rate• v [m/us] : propagation speed• d [m] : maximum distance

Tmin = Lmin / C > RTT = 2 * d /v

60

Backoff slot-timeBackoff slot-time

•Set to 512 bits» as minimum frame size» As maximum RTT

•guarantees that a transmitting station in previous backoff slot will be ALWAYS detected

•A station transmitting for 512 bits (64bytes) will acquire for sure the channel

» No “late collisions” possible» Unless misconfigurations occur…

Page 31: Tecnologie e Protocolli per Internet 1

61

How does backoff works?How does backoff works?

IFS

IFSjam

jam

Extracts 0 in (0,1)

“Immediately” reschedules tx

Extracts 1 in (0,1)

Waits for a 51.2 µµµµs slot-time

IFS

IFS IFS

62

More on network diameterMore on network diameter

• Safe condition to allow collisiondetection

» add 32 bits jam time » extra time for processing» From standard:

» Maximum RTT=46.38 µµµµs

• Phy media have max len» Fiber: 2000m» Coax: 500m» Thin coax: 185m» drop cable: 50m

» Transceiver cable» Fiber to coax

• repeaters introduce delay• Etc……

• RESULT (for example) » 2800 mt max diameter in case of

» 3x500m coax » + 1000m total fiber» + 6 drop

Page 32: Tecnologie e Protocolli per Internet 1

63

• Introduzione ad Ethernet» Ethernet basics» Medium Access Control (MAC): Carrier Sense Multiple Access

with Collision Detection (CSMA / CD)» Repeaters, Hubs, Switches

Dove siamo ?Dove siamo ?

64

RepeaterRepeater

• Physical layer device• Provides the “3-R” functions:

» Re-Shaping» Restores the proper signal waveform

» Re-Timing» Restores the proper impulse duration

» Re-Transmitting• Retransmits collisions, too

» Actually, regenerates (extending them to 96 bits) 010101… jam sequences

• Automatic “partitioning”» Protect network from faulty segments» If 30+ consecutive frame tx failures detected, disconnect the link

Page 33: Tecnologie e Protocolli per Internet 1

65

Multiport Repeaters (Hubs)Multiport Repeaters (Hubs)

• Slang name: HUBS• Essential for BASE-T and BASE-F• Star / tree topology

» But logically acts as a bus!

• No loops allowed (rings)» Otherwise signal would travel forever!

• Collision domain» Maximum propagation distance between end

nodes

66

Star == BusStar == Bus

Page 34: Tecnologie e Protocolli per Internet 1

67

Repeaters and preambleRepeaters and preamble

• 802.3 repeater:» Preable fully restored» But this adds extra delay (up to 16 bits per repeater)» Moreover since synchronization delay is NOT constant (a second frame might synchronize

faster than a first one), IFS can reduce» IFS illegal below 47 bits

frame R frame

• Part of preamble needed for synchronization• Ethernet repeater:

» “consumed” part of preamble is NOT regenerated» limit on number of repeaters crossed

frame Rframe frameframe

68

5-4-3 rule5-4-3 rule

• Ethernet/IEEE 802.3 rule on the number» Segments» Repeaters» Populated (user) segments vs unpopulated (link) segments

» Unpopulated: point-to-point link segments used to connect 2 repeaters

• Rule: between any two nodes on the network, therecan only be

» a maximum of five segments» connected through four repeaters» only three of the five segments may contain user connections.

Page 35: Tecnologie e Protocolli per Internet 1

69

Per chi è interessato, a questo link si discute in dettaglio della configurazione di

una ethernet multi segmento e dei vincoli da rispettare:

http://www.ethermanage.com/ethernet/ch13-ora/ch13.html

In particolare si chiarisce il significato della regola 5-4-3, che costituisce in effetti

una semplificazione delle regole effettive

70

Stackable RepeatersStackable Repeaters

Special connector

(approx up to 30 cm)

Stacked Repeaters

act as a SINGLE repeater

device!

Page 36: Tecnologie e Protocolli per Internet 1

71

Modular hubs (chassis)Modular hubs (chassis)

•Expand by adding more boards in slotsavailable

» Minor issue: must buy from same vendor» Major issue: power failure implies failure for all ports (many!!)

72

PhotosPhotos

8, 16, 24 10/100 ports (stackable) Hubs Modular chassis hub

42 10 Base-T RJ45 Port

2 Fiber Ports.

Page 37: Tecnologie e Protocolli per Internet 1

73

Network diameter for Fast Ethernet andGigabit Ethernet

Network diameter for Fast Ethernet andGigabit Ethernet

• Tmin [us] : minimum duration of the transmission of a frame• Lmin [bit] : minimum frame lenght

• C [Mb/s] : transmission bit rate• v [m/us] : propagation speed• d [m] : maximum distance

• Fast ethernent (100-BaseT) C= 100 Mb/s se L=64 byte (512 bit)Tmin = 5,12 us , d = 512 m

• GB ethernent (1000-BaseT) C= 1000 Mb/s se L=64 byte (512 bit)Tmin = 0,512 us , d = 51,2 m => viene ritenuta troppo piccolo, quindi la lunghezza minima viene estesa a 512 bytes (4096 bit)Tmin = 4,096 us , d = 409,6 m

Tmin = Lmin / C > RTT = 2 * d /v

74

Giga Ethernet – Carrier ExtensionGiga Ethernet – Carrier Extension

• Minimum frame size set equal to larger slot time of giga-ethernet

» 512 bytes = 4096 bits» Extension achieved with external padding» Frame structure left unchanged for backward compatibility

Page 38: Tecnologie e Protocolli per Internet 1

75

Giga Ethernet – Frame burstingGiga Ethernet – Frame bursting

• Optional feature: Burst Mode» transmit series of frames without relinquishing control of the

transmission medium.

» Achieves collision-free transmission for frames following the first one

» Transmitting station fills the interframe spacing interval with extension bits

» readily distinguished from data bits at the receiving stations» maintain the detection of carrier in the receiving stations (does

not allow the medium to assume an idle condition between frames)

» Necessary condition for bursting: first frame has been successfully transmitted

» Upper bound: burstLimit = 65536 bits

76

Channel Capture Effect / 1Channel Capture Effect / 1

For simplicity: we are neglecting detailed timing issues

Assumption: station with “many” frames in the tx buffer

P1

IFS

jam P1

P1

IFS

jam

r=0

P1 jam

P2 jam

New frame:

No backoff!

r=1

After second collision, station B will be at the SECOND retry (due to its backoff choice), and will

compete with station A at FIRST retry.

Psucc(A) = ½ * ¾ + ½ * ½ =5/8

Psucc(B) = ¼ * ½ = 1/8

r in (0,1)

r in (0,3)

A gets unfair advantage!

A

B

Page 39: Tecnologie e Protocolli per Internet 1

77

Channel Capture Effect / 2Channel Capture Effect / 2

• Unlucky stations get more and more unlucky!!» Following previous example:

» P(win at first try) 1/4 vs 1/4» P(win at second try) = 1/8 vs 5/8» P(win at third try) = 1/16 vs 13/16» P(win at fourth try = 1/32 vs 29/32» … !!! …

• Result: if you start losing collisions, you will end up losing all the remaining ones

» At the 16th retry, frame will dropped» ONLY AT THIS POINT station will restart with no backoff

» Again fair competition» Consequence: extremely high access delay variance

» Packet Starvation Effect

78

Numerical resultsNumerical results

From Whetten et al, http://www.ethermanage.com/ethernet/papers.html

• Solution to channel capture:» Some solutions proposed (e.g. BLAM – Binary Logarithmic Arbitration

Method)» Download: http://www.ethermanage.com/ethernet/papers.html

» Not standardized, despite proposals» Adds complexity» Backward compatibility» Concerns: is capture a practical issue at all? (e.g. in normal load)

Page 40: Tecnologie e Protocolli per Internet 1

79

• Introduzione ad Ethernet» Ethernet basics» Medium Access Control (MAC): Carrier Sense Multiple Access

with Collision Detection (CSMA / CD)» Repeaters, Hubs, Switches

» Bridges and Switches

Dove siamo ?Dove siamo ?

80

Bridge vs SwitchBridge vs Switch

• Functional differences:» None!» Switch = Bridge

• Marketing issues» Bridge: traditional name; may give the flavour of:

» Very low number of ports (typically 2)» Goal: interconnect LANs

» Switch: more appealing name; gives the flavour of » Many ports (goal: to “switch” between end-user links)» May support many additional functions than “just” bridging

• Implementation issues» Bridge:

» store & Forward operation» Software implementation

» Switch: » may use cut-through operation(faster)» Hardware switching operation implementation

Difference: basically a marketing/implementation issue

For us: BRIDGE == (Layer 2) SWITCH

Page 41: Tecnologie e Protocolli per Internet 1

81

Bridging in the 80’sgoal: limit collision domain

Bridging in the 80’sgoal: limit collision domain

LAN 1 LAN 2BridgeA

B D

E

C

• Bridge: terminates a collision domain!• LANs: not necessarily Ethernet• “Transparent” bridging

» Bridging interfaces are NOT directly addressed at MAC level» they are intermediary

82

Bridging and network extensionBridging and network extension

S1 S2

S3

S4

S5

S6

S7

BRIDGE

HUB 1HUB 1

HUB 2

Segment 110 Mbit/s (shared)

Segment 210 Mbit/s (shared)

10 Mbit/s (dedicated)

Page 42: Tecnologie e Protocolli per Internet 1

83

Protocol stackProtocol stack

• Operate at OSI layer 2 (datalink)» Higher layers unaware

• May interconnect LANs with different PHY and MAC

layers3-7

MAC1

PHY1

LLC

layers3-7

MAC2

PHY2

LLC

MAC1

PHY

MAC2

PHY2

Relay

LAN 1 LAN 2

84

Bridging specified in 802.1DBridging specified in 802.1D

802.3 802.5 FDDI

FDDI

802.2 Logical Link Control

ISO 8802.2

802.11

LLC

MAC

CSMA/CD TOKENRING

Wireless

BridgingBridging notnot specificspecific forfor 802.3 (common 802.3 (common forfor allall 802)802)

ISO

8802.3

ISO

8802.5

ISO

9314

ISO

8802.11

AnyLAN

802.12

ISO

8802.12

802.1D Bridging

Page 43: Tecnologie e Protocolli per Internet 1

85

Bridge in the 90’s and 00’sBridge in the 90’s and 00’s

HUBMulti-portrepeater SWITCH

Shared bandwidth Per-pair dedicated bandwidth

• Collapsed Backbone» Backbone collapsed into center

device» star/tree topology» Versus shared bus

• Suitable for structured cabling• Two links per port

» 2 x twisted pair (or fiber): » Transmit; receive

86

Broadcast domain vs collision domainBroadcast domain vs collision domain

SwitchHUB

HUB

Without Switching

LANCollisionDomain

Broadcast Domain

With switching

Switch

CollisionDomain

CollisionDomain

CollisionDomain

CollisionDomain

Broadcast Domain

Page 44: Tecnologie e Protocolli per Internet 1

87

Micro-segmentationMicro-segmentation

• Bridge segments network intodistinct parts

» Low number• Switched LAN

» Many more segments» Limit: one segment per user

» The most frequent case!

» Incoming frame switched to appropriate output line

» Unused lines can switch other traffic

» More than one station can transmit at a time

» Multiply capacity of LAN

88

Hub disadvantage (solved by switch)Hub disadvantage (solved by switch)

10 Mbps100 Mbps100 Mbps100 Mbps

100 Mbps

????

Obviously

Impossible!

10 Mbps100 Mbps100 Mbps100 Mbps

????

Obviously

Impossible!

Possible with

10/100 switches

HUB

must downgrade to lowest supported ratein full analogy with bus situation!

Page 45: Tecnologie e Protocolli per Internet 1

89

Switch advantages: full-duplexing(optional feature)

Switch advantages: full-duplexing(optional feature)

• Bus, hubs: shared medium» Require only one station to transmit at a time» Half-duplex» CSMA/CD operation

• Switch: dedicated connection» A connection is dedicated

» between two swicthing ports» Between PC and switch port

» Point-to-point transmission media• Obvious extension: move to full duplexing (802.3x)!

» Transmit and receive on two separate links» Which can operate IN PARALLEL!!

» Double the link capacity» No more need for CSMA/CD

» No collision possible, as no more stations to collide with…!» No more limits on maximum segment length (just technical limits)

90

• Introduzione ad Ethernet» Ethernet basics» Medium Access Control (MAC): Carrier Sense Multiple Access

with Collision Detection (CSMA / CD)» Repeaters, Hubs, Switches

» Bridges and Switches» Bridge/Switch operation

Dove siamo ?Dove siamo ?

Page 46: Tecnologie e Protocolli per Internet 1

91

Bridge/Switch operation

PADPreamble +

SFDData

LEN ortype

FCSDEST SRC

lookup• Store & Forward:

» read frame (memorize into onboard buffer)» Check CRC

» Discard frame if � CRC fails� too short (<64 bytes, “runt”) � too long (>1518 bytes, “giant”)

» Look up destination into forwarding (switching) table

» Forward packet to outgoing port• Cut-through

» Just read first few bytes (until destination address)» Don’t do any check» Look up forwarding table and select destination» forward frame while receiving it

92

Forwarding databaseForwarding database

• Mapping between MAC addressesand ports

» Ports: module/port-#

• Static entries:» Configured by sysadmin» Permanent database

• Dinamic entries:» “Learned”» Expire after ageing process reaches

upper value» E.g. 300 seconds» configurable

Dest MAC Address Ports Age

----------------- ----- ---

00-00-08-11-aa-01 1/1 1

00-b0-8d-13-1a-f1 1/7 4

a8-11-06-00-0b-b4 2/3 0

08-01-00-00-a7-64 2/4 1

00-ff-08-10-44-01 2/6 5

Page 47: Tecnologie e Protocolli per Internet 1

93

Address Learning /1Address Learning /1

STA 1

00-11-22-33-44-01

STA 2

08-55-66-77-88-02

STA 3

08-aa-bb-cc-dd-03

00-11-22-33-44-01 P1

08-55-66-77-88-02 P1

08-aa-bb-cc-dd-03 P2

08-01-02-f1-f2-04 P3

P1

P2

STA 4

08-01-02-f1-f2-04

• Frame arrives at port X» Hence it has come from LAN

attached to port X

• SRC address used to update forwarding DB

» SRC MAC ���� Port

P3

94

Address Learning /2Address Learning /2

STA 1

00-11-22-33-44-01

STA 2

08-55-66-77-88-02

STA 3

08-aa-bb-cc-dd-03

00-11-22-33-44-01 P1 5

08-55-66-77-88-02 P1 7

08-aa-bb-cc-dd-03 P2 0

08-01-02-f1-f2-04 P3 6

08-00-0f-cc-cc-a2 P1 0

P1

P2

STA 4

08-01-02-f1-f2-04

• Incoming frame whose SRCaddr not in forwarding DB:

» Create new entry» Ageing-time=0

• Incoming frame whose SRCaddr already in forwarding DB:

» Refresh ageing-time» Ageing-time=0

P3

08-00-0f-cc-cc-a2

Page 48: Tecnologie e Protocolli per Internet 1

95

Address Learning /3Address Learning /3

STA 1

00-11-22-33-44-01

STA 2

08-55-66-77-88-02

STA 3

08-aa-bb-cc-dd-03

00-11-22-33-44-01 P1 5

08-55-66-77-88-02 P1 7

08-aa-bb-cc-dd-03 P2 4

08-01-02-f1-f2-04 P3 6

08-00-0f-cc-cc-a2 P1 2

08-00-0f-cc-cc-a2 P2 0

P1

P2

STA 4

08-01-02-f1-f2-04

• Incoming frame whose SRCaddr already in forwarding DB but associated to different port:

» Update associated port» Refresh ageing time

P3

08-00-0f-cc-cc-a2

96

Frame forwardingFrame forwarding

• Very first operation performed by the bridge/switch upon frame reception» Before learning

PADPreamble +

SFDData

LEN ortype

FCSDEST SRC

1. Frame OK?» CRC check» Only for Store & Forward

2. Incoming port enabled(in forwarding state)?

» Switch port may be disabled» e.g. to isolate malfunctioning stations/LANs

3. If DEST is NOT in forwarding DB» broadcast frame (flooding)

» forward frame to all ports EXCEPT incoming one4. If DEST is in forwarding DB

» Check whether DEST port = incoming port» If YES, discard packet (dest on same LAN of src)» If NO, forwards packet to output port

� Unless output port blocked

Port X

Port Y

Flooding occurs also for broadcast frames (obvious) and for multicast frames (unless more sophisticated policies are set)

Page 49: Tecnologie e Protocolli per Internet 1

97

Example / 1start-up

Example / 1start-up

P1

P2

P3

• Initial state: forwarding DB = empty

98

Example / 2STA 1 ���� STA 2

Example / 2STA 1 ���� STA 2

00-11-22-33-44-01 P1 0

P1

P2

P3

• STA 1 transmits frame to STA 2• Flooding occurs (STA2 not registered in DB)• Bridge learns STA1=P1

STA 1

00-11-22-33-44-01

Page 50: Tecnologie e Protocolli per Internet 1

99

Example / 3STA 2 ���� STA 1

Example / 3STA 2 ���� STA 1

00-11-22-33-44-01 P1 2

00-aa-bb-cc-dd-02 P3 0

P1

P2

P3

• STA 2 may respond» depends on involved protocol/app rules (e.g. TCP handshake)

• transmits frame to STA 1• Destination selected• Bridge learns STA2=P3

STA 1

00-11-22-33-44-01

STA 2

00-aa-bb-cc-dd-02

100

Example / 4STA 3 ���� STA 1

Example / 4STA 3 ���� STA 1

00-11-22-33-44-01 P1 12

00-aa-bb-cc-dd-02 P3 10

08-80-f0-00-ff-03 P1 0P1

P2

P3

• STA 3 on LAN 1 transmits to STA 1• Frame arrives to STA1 on LAN 1

» But arrives also to Bridge• Bridge discards frame (STA1 on same port of incoming frame)

» This operation is referred to as FILTERING FUNCTION• Bridge learns STA3=P1

STA 1

00-11-22-33-44-01

STA 2

00-aa-bb-cc-dd-02

STA 3

08-80-f0-00-ff-03

Page 51: Tecnologie e Protocolli per Internet 1

101

Example / 5STA 1 moves; STA 1 ���� STA 3

Example / 5STA 1 moves; STA 1 ���� STA 3

00-11-22-33-44-01 P1 13

00-aa-bb-cc-dd-02 P3 11

08-80-f0-00-ff-03 P1 1

00-11-22-33-44-01 P2 0P1

P2

P3

• STA 1 moves on LAN 2 • Then transmits to STA 3• Frame arrives to Bridge on P2, and forwarded to P1

» According to forwarding DB information• Bridge learns that STA 1 moved

» Deletes previous entry with P1» Adds new entry with P2

STA 1

00-11-22-33-44-01

STA 2

00-aa-bb-cc-dd-02

STA 3

08-80-f0-00-ff-03

102

Example / 6STA 2 moves; STA 1 ���� STA 2

Example / 6STA 2 moves; STA 1 ���� STA 2

00-aa-bb-cc-dd-02 P3 13

08-80-f0-00-ff-03 P1 3

00-11-22-33-44-01 P2 2P1

P2

P3

• STA 2 moves on LAN 1 • STA 1 transmit frame to STA 2• Frame forwarded on old port P3!!

» Bridge will learn only when STA2 will transmit first frame» OR when ageing time will expire

» and STA2 ���� P3 entry will be removed from forwarding DB

STA 1

00-11-22-33-44-01

STA 2

00-aa-bb-cc-dd-02

STA 3

08-80-f0-00-ff-03

???

Page 52: Tecnologie e Protocolli per Internet 1

103

Why a station should move?Fault-tolerant architectures!

Why a station should move?Fault-tolerant architectures!

P1

P2

Link 1 Link 2

As link 1 fails, server switches on link 2 ���� server MOVES from original port P2 to new port P1 !!

(need to reduce ageing time – but trade-off required: too short ageing time, too much burden on switch)

(effective solution: i) periodically send “advertisement” frames ii) send frame after switching to link 2)

104

Topologia di una rete ethernet switchedTopologia di una rete ethernet switched

• È necessario avere una topologia ad albero : sono vietati i cicli (loop) (lo stesso accadeva per gli hub!)

SWITCH SWITCH SWITCH

SWITCH

• Nella topologia rappresentata sopra non è possibile aggiungere il collegamento indicato con “X”

Page 53: Tecnologie e Protocolli per Internet 1

105

Il requisito sulla topologia indicato nella slide precedente è necessario per il

funzionamento di una rete ethernet switched. D’altra parte una topologia ad

albero non è molto affidabile, perché un problema su uno qualunque dei

collegamenti separa la rete in due parti non comunicanti. Sarebbe molto utile

poter avere dei percorsi alternativi per collegare gli switch creando però dei cicli

(loop) nella topologia.

Le reti ethernet risolvono il problema consentendo a livello fisico dei collegamenti

tra switch che creano percorsi alternativi, ma disabilitando tali collegamenti a

livello logico.

In particolare gli switch utilizzano un protocollo, detto “spanning-tree” protocol

che consente automaticamente di disabilitare un insieme di collegamenti in modo

che i rimanenti formino una topologia ad albero (cioè priva di cicli). Inoltre tale

protocollo verifica in modo continuo che i collegamenti scelti siano operativi e in

caso di guasto di un collegamento seleziona un nuovo insieme di collegamenti che

garantiscano la connettività di tutta la rete.

106

A note on technical implementation - CAMA note on technical implementation - CAM

• A forwarding Database is typically realized in hardware for maximumspeed/scalability

• Technology of choice: Content Addressable Memories (CAMs)» Used also in current high-range routers for very fast & scalable address

lookup

• Software-based lookup (search): o(Log n);

• Hardware-based CAM lookup: O(1)» Massively parallel comparison circuitry added to every cell of the hardware

memory» Search result in just 1 memory cycle!!

For details refer to:

http://en.wikipedia.org/wiki/Content-addressable_memoryhttp://www.eecg.toronto.edu/~pagiamt/cam/references.html

Page 54: Tecnologie e Protocolli per Internet 1

107

CAM architectureCAM architecture

108

• Introduzione ad Ethernet» Ethernet basics» Medium Access Control (MAC): Carrier Sense Multiple Access

with Collision Detection (CSMA / CD)» Repeaters, Hubs, Switches

» Bridges and Switches» Autonegotiation

Dove siamo ?Dove siamo ?

Page 55: Tecnologie e Protocolli per Internet 1

109

AutonegotiationAutonegotiation

• 802.3-2002-part2, clause 28» Formerly 802.3u, drafted in 1994» Original specification for 10/100 Mbps

» More recently extended for 1000 Mbps

• What is autonegotiation» Mechanism run independently at each link end

1. Detect various modes that exist in the device on the other end of the wire2. Advertise to the other end device its own abilities3. Goal: automatically configure the highest performance mode of

interoperation. o Speedo Line Codingo Half/Full duplexingo Extras

• See also http://en.wikipedia.org/wiki/Autonegotiation

110

NLP and FLP burstsNLP and FLP bursts

• Normal Link Pulses (NLP)» 10Base-T idea;» In the absence of data, periodically transmit link integrity pulses to run-time

determine if the link is operational» 1 NLP every 16 +/- 8 ms

• Fast Link Pulses (FLP)» Instead of a single NLP pulse, transmit a 16-bit codeword» Coded with pulse position» Carrying the information about the device capabilities

• Once negotiation completed, get back to NLP transmission

16 +/- 8 ms

NLP

16 +/- 8 ms

FLP

Page 56: Tecnologie e Protocolli per Internet 1

111

FLP wordingFLP wording

… … …

17 clock pulses; in the 16 intermediate spaces:

- pulse = bit 1

- no pulse = bit 0

1 001 1

112

FLP codingFLP coding

• Selector field (5 bits)» 00001 for 802.3» Other sequences for other standards

• Technology ability field (8 bits)» Specify capabilities (e.g. 10Base-T, 100Base-T4, 100BaseTx+fullduplex, etc)

• RF = Remote Fault (1 bit)» Allow to signal that a fault occured on the other side» Fault can be specified in “Next Page”

• Ack (1 bit)» Notifies that a device has successfully received the FLP

• NP = Next Page» Notifies that a device is “next page” capable, i.e. it wishes to exchange

additional data» Each following page transmitted until explicitly ack-ed

Page 57: Tecnologie e Protocolli per Internet 1

113

Negotiation processNegotiation process

• If both link partners capable of auto-negotiation:» Select best technology among that available

» First 100Base-T full duplex

» …

» Last 10BaseT half duplex

• If only one link partner capable of auto-negotiation:» Adapt to available technology on the other side

» This process is called “parallel detection”

114

• Introduzione ad Ethernet» Ethernet basics» Medium Access Control (MAC): Carrier Sense Multiple Access

with Collision Detection (CSMA / CD)» Repeaters, Hubs, Switches

» Bridges and Switches» Autonegotiation

» Store & Forward vs. Cut-through

Dove siamo ?Dove siamo ?

Page 58: Tecnologie e Protocolli per Internet 1

115

Store & forward vs cut-through latencyStore & forward vs cut-through latency

• 1518 bytes frame

» Assume full 8 bytes preamble received» S&F @ 10 mbps ≥ 1526*8/10 µµµµs = 1222 µµµµs» C-T @ 10 mbps ≥ 14*8/10 µµµµs = 11.2 µµµµs

» S&F @ 100 mbps ≥ 122 µµµµs» C-T @ 100 mbps ≥ 1.1 µµµµs

» S&F @ 1 Gbps ≥ 12.2 µµµµs» C-T @ 1 Gbps ≥ 0.1 µµµµs

» Not a real problem at high rate

116

S&F vs C-T: adaptive feature(typically configurable – example: Intel “Express” switch)

Max=1000:

=0.6%

=0.4%

=5%

=10%

Page 59: Tecnologie e Protocolli per Internet 1

117

S&F vs CT: Fragment-free modeS&F vs CT: Fragment-free mode

• Compromise between cut-through and store-and-forward» Reads first 64 bytes

» includes the frame (+LLC) header» Then starts send packet

» before the entire data field is read and the FCS is checked. • Advantages:

» Verify reliability of header information (addresses, frame type, LLC header information) » Detects & discards runts & collisions

» A runt is “The frame that remains after a collision on a CSMA/CD medium such as Ethernet. Runts are undersize packets, smaller than what the network protocol calls for, such as 64 bytes in Ethernet. Electrical interference or faulty wiring can also produce a runt.” (definition taken from http://www.answers.com/topic/runt)

PADPreamble +

SFDData

LEN ortype

FCSDEST SRC

Cut-through Store & ForwardFragment-free

118

Further issues with C-TFurther issues with C-T

• Cut-through possible only if source and destinationports have same bit rate

» Symmetric switching.

• Different rates ���� buffering necessary ���� S&F only» Asymmetric switching

• Asymmetric switching typical in client/server environments

» More bandwidth dedicated to the server port to prevent a bottleneck