2 ethernet grundlagen - securitysecurity.hsr.ch/.../vorlesungsunterlagen/02-ethernet.pdf ·...
TRANSCRIPT
Steffen/Stettler, 20.09.2013, 2-Ethernet.ppt 1
Computernetze 1 (CN1)
Prof. Dr. Andreas Steffen
Institute for Internet Technologies and Applications
2 Ethernet Grundlagen
Steffen/Stettler, 20.09.2013, 2-Ethernet.ppt 2
Lesestoff im Ethernet Buch
• Kapitel 2 Ethernet, Seiten 31-83
2.1 Die Geschichte des Ethernet
2.2 Der Physical Layer
2.3 10Base5
2.4 10Base2
2.6 10BaseT
2.7 10BaseF
2.8 Das Manchester-Kodierungsverfahren
2.9 Media Access Control (MAC)
• Kapitel 6 Ethernet Internals, Seiten 208-214
6.2 Power over Ethernet
• Selbststudium
Erarbeiten Sie als Vorbereitung für die Übung 2 selbstständig das Thema “Media Access Control” mit Hilfe von Kapitels 2.9 des Ethernet Buchs und des Kapitels 2.4 dieses Foliensatzes.
Steffen/Stettler, 20.09.2013, 2-Ethernet.ppt 3
Wie es begann...
• 1972 stoss Robert Metcalfe auf ein Paper von Norman Abramson, welches das Aloha Random Access System der Universität Hawaii beschrieb.
• Ausgehend von Aloha erfand er am Xerox Palo Alto Research Center (PARC) das robuste CSMA/CD* Protokoll, mit dem mehrere Teilnehmer fast kollisionsfrei auf ein „shared-medium“ zugreifen können.
• 1976 stellte er sein Protokoll unter dem Namen Ethernet an einer Konferenz vor.
• 1979 gründete er die Firma 3Com. * Carrier Sense Multiple Access with Collision Detection
Steffen/Stettler, 20.09.2013, 2-Ethernet.ppt 6
IEEE 802
• LAN standardization is done
• by the IEEE (Institute of Electrical and Electronical Engineers)
• The IEEE LAN/MAN standards committee 802 was founded in February 1980
• OSI Data Link Layer (Layer 2)
• was originally designed for point-to-point line communication
• but LAN is multipoint line, shared media
• Therefore OSI Layer 2 had to be split into two sublayers
• Logical Link Control (LLC)
• Media Access Control (MAC)
Steffen/Stettler, 20.09.2013, 2-Ethernet.ppt 7
• Verbindungsverwaltung • Connect request, indication, response, confirm, etc. • Synchronisation von gemeinsamen Zählern, etc.
• Fehlererkennung und evtl. Korrektur • Vorwärtsfehlerkorrektur
Erkennen+Rückmelden+Wiederholung (ARQ), etc.
• Flusssteuerung / Flow Control • Achtung: nur für das nächste Segment
• Erstellen von Rahmen / Frames • Ethernet, Token Ring, FDDI, ATM etc. • Layer 2 Addressierung dieser Frames
• Zugriffsverfahren • Wie teile ich mir ein gemeinsames Medium mit anderen
Kommunikationspartnern ?
Logical Link
Control (LLC)
Media Access Control (MAC)
Aufgaben der Schicht 2
Steffen/Stettler, 20.09.2013, 2-Ethernet.ppt 8
IEEE 802 Working Groups
IEEE
Standard Boards
IEEE 802
LAN/MAN
Standard Committee
P802.3bm
40 Gb/s and 100 Gb/s
Operation over Fiber
Optic Cables
802.1
Higher Layer
LAN Protocols
Working Group
802.11
Wireless LAN
Working Group
802.24
Smart Grid
Technical
Advisory Group
802.3
Ethernet
Working Group
P802.3bq
40GBASE-T
P802.3bk
Extended Ethernet
Passive Optical
Networks (EPON)
P802.3bj
100 Gb/s
Backplane &
Copper Cable
Steffen/Stettler, 20.09.2013, 2-Ethernet.ppt 9
IEEE 802 Active Working Groups
• 802.1 Higher Layer LAN Protocols Working Group
• 802.3 Ethernet Working Group
• 802.11 Wireless LAN Working Group
• 802.15 Wireless Personal Area Network Working Group
• 802.16 Broadband Wireless Access Working Group (WiMAX)
• 802.18 Radio Regulatory Technical Advisory Group
• 802.19 Wireless Coexistence Working Group
• 802.21 Media Independent Handoff Working Group
• 802.22 Wireless Regional Area Networks Working Group
• 802.24 Smart Grid Technical Advisory Group
Steffen/Stettler, 20.09.2013, 2-Ethernet.ppt 10
IEEE 802 Inactive and Disbanded Working Groups
• 802.2 Logical Link Control Working Group Inactive
• 802.4 Token Bus Working Group Disbanded
• 802.5 Token Ring Working Group Inactive
• 802.6 Metropolitan Area Network Working Group Disbanded
• 802.7 Broadband Technical Advisory Group Disbanded
• 802.8 Fiber Optic Technical Advisory Group Disbanded
• 802.9 Integrated Services LAN Working Group Disbanded
• 802.10 Security Working Group Disbanded
• 802.12 Demand Priority Working Group Inactive
• 802.14 Cable Modem Working Group Disbanded
• 802.17 Resilient Packet Ring Working Group Inactive
• 802.20 Mobile Broadband Wireless Access WG Inactive
• 802.23 Emergency Services Working Group Disbanded
Steffen/Stettler, 20.09.2013, 2-Ethernet.ppt 11
Computernetze 1 (CN1)
2.2 Ethernet Physical Layer (PHY)
Steffen/Stettler, 20.09.2013, 2-Ethernet.ppt 12
Ethernet IEEE 802.3 Overview
Fiber
Twisted Pair
Coax
Rarely used
10GBase-T
802.3an-2006
40/100Gbps
802.3ba-2010
Steffen/Stettler, 20.09.2013, 2-Ethernet.ppt 13
Logical Link Control LLC
MAC Control (optional)
Media Access Control MAC
PLS
AUI
PMA (MAU)
MDI
Medium
Reconciliation Reconciliation Reconciliation
PCS
PMA
PMD
GMII
MDI
PLS
AUI
PMA
MII
MDI
PCS
PMA
PMD
MII
MDI
Medium Medium Medium
Data Link Layer
PHY
1-10 Mbit/s 10 Mbit/s 100 Mbit/s 1000 Mbit/s
AUI...Attachment Unit Interface, PLS...Physical Line Signaling, MDI...Medium Dependent Interface,
PCS...Physical Coding Sublayer, MII...Media Independent Interface, GMII...Gigabit Media Independent Interface,
PMA...Physical Medium Attachment, MAU...Medium Attachment Unit, PMD...Physical Medium Dependent
Ethernet Technology Overview
Steffen/Stettler, 20.09.2013, 2-Ethernet.ppt 14
PHY Sublayers
• Physical Line Signaling (PLS) serves as an abstraction layer between MAC and PHY and provides
• Data encoding/decoding (Manchester)
• Signalling of media states (busy, free, collision occurred etc.)
• Attachment Unit Interface (AUI) to connect with PMA
• Several new coding techniques demand for a Media Independent Interface (MII) that serves as an interface between MAC and PHY
• hides coding issues from the MAC layer
• MII: often a mechanical connector for a wire; GMII is an interface specification between MAC-chip and PHY-chip upon a circuit board
• one independent specification for all physical media
• supports several data rates (10/100/1000 Mbits/s)
• 4 bit (GMII: 8 bit) parallel transmission channels to the physical layer
• Today coding is done through a media-dependent Physical Coding Sublayer (PCS) below the MII.
Steffen/Stettler, 20.09.2013, 2-Ethernet.ppt 15
PHY Sublayers
• Physical Coding Sublayer (PCS)
• encapsulates MAC-frame between special PCS delimiters
• 4B/5B or 8B/10B encoding respectively
• appends idle symbols
• Physical Medium Attachment (PMA)
• interface between PCS and PMD
• (de) serializes data for PMD (PCS)
• Physical Medium Dependent (PMD)
• serial transmission of the codegroups
• specification of the various connectors (MDI)
Steffen/Stettler, 20.09.2013, 2-Ethernet.ppt 16
10Base5
• Introduced in 1980 as part of the original IEEE 802.3 standard.
• Transmits 10 Mbps over a single thick coaxial cable bus.
• The primary benefit of 10Base5 was its length: up to 500m without a repeater.
• 10Base5 uses Manchester encoding.
• The thick and sturdy cable was difficult to install and was therefore called Thick Net or due to its color Yellow Cable.
Steffen/Stettler, 20.09.2013, 2-Ethernet.ppt 17
10Base2 I
• Introduced in 1985.
• Installation is easier then 10Base5 because of its lighter size and greater flexibility. Therefore it was called Thin Net or Cheaper Net.
• 10Base2 also uses Manchester encoding.
• Computers on the LAN are linked together by an uninterrupted chain of coaxial cable lengths.
• These lengths are attached by BNC connectors to a T-shaped connector on the NIC.
• Each 10Base2 segment may be up to 185 meters long and may accommodate up to 30 stations.
Steffen/Stettler, 20.09.2013, 2-Ethernet.ppt 18
10Base2 II
1. Termination of each end of the coax should be 50 Ohms.
2. Minimum distance between taps is 0.5 meters.
3. Each station must be connected within four centimeters of the thin coaxial cable.
4. Maximum segment length is 185 meters.
5. Link segments between repeaters should have a total of only two attachments, the repeaters themselves.
Steffen/Stettler, 20.09.2013, 2-Ethernet.ppt 19
10Base-T I
• Introduced in 1990.
• 10base-T uses cheap and easy to install Cat 3 Unshielded Twisted Pair (UTP) copper cable rather than coaxial cable.
• The UTP cable is plugged into a central connection device that contains the shared bus => Hub.
• Preferred Topologies: Star and Extended Star.
• Originally 10Base-T was a half-duplex protocol, but full-duplex features were added later.
• 10Base-T also uses Manchester encoding.
• Due to their high attenuation 10Base-T links can have unrepeated lengths of up to 100 m.
Steffen/Stettler, 20.09.2013, 2-Ethernet.ppt 20
10Base-T II
• UTP cable uses RJ-45 connectors with eight pins.
• Cat 3 cable is adequate for use in 10Base-T networks, although Cat 5e or better is strongly recommended for any new cable installations.
• All four pairs of wires are used either with the straight-through T568-A or the cross-over T568-B cable pinout arrangement.
Pin
2
1
4
3
6
5
7
8
Signal
TD+ (Transmit Data)
TD- (Transmit Data)
RD+ (Receive Data)
a (reserved for POTS)
b (reserved for POTS)
RD- (Receive Data)
unused
unused
Steffen/Stettler, 20.09.2013, 2-Ethernet.ppt 21
Power-over-Ethernet (IEEE 802.3af PoE)
PSE Power Sourcing Equipment PD Powered Device
1
2
3
6
1
2
3
6
Pair 3
Pair 2
PD PSE
350 mA
13.0 W@PD 48 V DC
Alternative A
4
5
7
8
4
5
7
8
48 V DC
Pair 1
Pair 4
1
2
1
2
Pair 3
3
6
3
6
Pair 2
350 mA
13.0 W@PD
Alternative B
PD PSE
Steffen/Stettler, 20.09.2013, 2-Ethernet.ppt 22
Power-over-Ethernet (IEEE 802.3at PoE+)
PSE Power Sourcing Equipment PD Powered Device
1
2
3
6
1
2
3
6
Pair 3
Pair 2
PD PSE
600 mA
25.5 W@PD 53 V DC
Alternative A
4
5
7
8
4
5
7
8
53 V DC
Pair 1
Pair 4
1
2
1
2
Pair 3
3
6
3
6
Pair 2
600 mA
25.5 W@PD
Alternative B
PD PSE
Steffen/Stettler, 20.09.2013, 2-Ethernet.ppt 23
Power-over-Ethernet (IEEE 802.3at PoE+)
PSE Power Sourcing Equipment PD Powered Device
1
2
3
6
1
2
3
6
Pair 3
Pair 2
PD PSE
600 mA
25.5 W@PD 53 V DC
Alternative A
4
5
7
8
4
5
7
8
53 V DC
Pair 1
Pair 4
1
2
1
2
Pair 3
3
6
3
6
Pair 2
600 mA
25.5 W@PD
Alternative B
PD PSE
Steffen/Stettler, 20.09.2013, 2-Ethernet.ppt 24
Energy-Efficient-Ethernet (IEEE 802.3az EEE)
• In 2005 all Network Interface Controllers (NICs) in the US used 5.3 TWh (600 MW)
• EEE introduces a Low Power Idle (LPI) sleep signal
• Transmitter sends LPI in place of Idle for a period Ts to indicate that the link can go to sleep and then stops signaling.
• Periodically, the transmitter sends a refresh signal for a time Tw so that the link does not remain quiescent for too long.
• To resume the transmitter sends normal Idle signals. After a time Tw the link is active.
Steffen/Stettler, 20.09.2013, 2-Ethernet.ppt 25
Computernetze 1 (CN1)
2.3 Ethernet Frame Synchronisation
Steffen/Stettler, 20.09.2013, 2-Ethernet.ppt 26
0 1 0 1 1 1 0 0 1 0 1 1 0 0
10Mb/s-Ethernet: Manchester Code
"0" = fallende Flanke in Bitmitte (H->L) "1" = ansteigende Flanke in Bitmitte (L->H)
T=Bitdauer
Steffen/Stettler, 20.09.2013, 2-Ethernet.ppt 27
1 0 1 0 1 0 1 0 1 0 1 0 1 1
10Mb/s-Ethernet: Frame-Synchronisation
Bitmitte Frame Start
• Präambel bestehend aus einer 1-0-1-0-… Sequenz ermöglicht die Synchronisation auf die Bitmitte.
• Das erste Auftreten von 1-1 kündigt den Start der Nutzdaten an.
Steffen/Stettler, 20.09.2013, 2-Ethernet.ppt 28
IEEE 802.3 Ethernet Frame Präambel
10101010 10101010 10101010 10101010 10101010 10101010 10101010 10101011
7 Bytes
Präambel
1 Byte
SFD
SFD Start-of-Frame Delimiter
Steffen/Stettler, 20.09.2013, 2-Ethernet.ppt 29
Computernetze 1 (CN1)
2.4 Ethernet Media Access Control (MAC)
Steffen/Stettler, 20.09.2013, 2-Ethernet.ppt 30
Half-Duplex Transmission
• Historically Ethernet was a half-duplex technology.
• Using half-duplex, a host could either transmit or receive at one time, but not both.
• Host checks the network to see whether data is being transmitted before it transmits data.
• If the network is already in use, the transmission is delayed.
• Only ONE host can transmit at a time.
Steffen/Stettler, 20.09.2013, 2-Ethernet.ppt 31
Carrier Sense Multiple Access / Collision Detection
1. Listen to the medium
2. Sending if medium is free,
else waiting for a random time
and try again
3. The amplitude of the signal
increases because a collision
occurs.
4. The nodes stop transmitting
for a random period of time,
which is different for each
device.
Steffen/Stettler, 20.09.2013, 2-Ethernet.ppt 33
CSMA/CD Collision Handling
• Abortion of current transmission by all stations involved
• Emission of a Jam-signal (32 bit) • to make sure that every station can recognize the collision
• collision is spread to a minimum length
• Generation of a random backoff timeout value • truncated binary exponential backoff algorithm (the more often a
collision occurs the larger is the range for the random number)
• After expiration of the timeout a retransmission is attempted
• Number of retransmission trials is limited to 16 • after 16 collisions in a sequence a error is signaled to the higher layer
Steffen/Stettler, 20.09.2013, 2-Ethernet.ppt 34
Truncated Binary Exponential Backoff Algorithm
Runde 0: 0
t pcollision = 1 (3 hosts)
pcollision = 1 (3 hosts)
pcollision = ¼ (2 hosts)
Runde 1: 0 1
t
Runde 2: t 0 1 2 3
slot time
Steffen/Stettler, 20.09.2013, 2-Ethernet.ppt 35
Signalausbreitung auf Koaxialkabel
Raum
T1 = Lmax/v
Lmax, v = 0.2 m/ns
T1
T1
Tmax = 2T1 = 2Lmax / v Lmax = vTmax / 2
Late Collision
Collision
Zeit
A B C
Steffen/Stettler, 20.09.2013, 2-Ethernet.ppt 36
Collision Window und Kollisionsdomäne
• Worst-Case Betrachtung • Um eine Kollision zuverlässig detektieren zu können, muss die
minimale Dauer eines Ethernet Frames grösser als die doppelte einfache Signallaufzeit, d.h. dem Round Trip Delay (RTD) sein.
• Diese maximale Zeit Tmax nennt man Collision Window.
• 10 Mbit/s und 100 Mbit/s Ethernet definieren eine minimale Frame-Grösse von 512 Datenbits (64 Bytes).
• Maximale Ausdehnung einer Kollisionsdomäne • 10 BASE: Tmax = 512·100 ns = 51.2 μs Lmax 2000 m
• 100 BASE: Tmax = 512·10 ns = 5.12 us Lmax 200 m
• Werden diese Längen überschritten, können Late Collisions auftreten.
Steffen/Stettler, 20.09.2013, 2-Ethernet.ppt 37
Full-Duplex Transmission
• Allows transmission of a packet and the reception of a different packet at the same time.
• Host can transmit immediately without checking the network first.
• The connection is considered point-to-point and is collision free.
• Full-duplex Ethernet offers 100% of the bandwidth in both directions.
Requires a dedicated connection to a switched port.
X X