special course in computer science: local networks
TRANSCRIPT
Lecture 5 4.4.2012
Special Course in Computer Science: Local Networks
Roadmap of the Course So far Basic telecom concepts General study of LANs LAN topologies Flow and error control Medium access methods Logical link control
Today Ethernet
Ethernet
Ethernet IEEE 802.3 Most widely used LAN protocol (wired networks) More than 35 years of use (1976) Started at 10 Mbps (1978) Nowadays 100Mbps – 10Gbps Classic Ethernet or Switched Ethernet
Architecture of the original Ethernet
CSMA / CD Stations abort transmission as soon as they detect a
collision => saves time and bandwidth Model At t0 some station finished transmission Any other station may start transmitting => collisions may
occur After a detected collision, stations wait a random time and
start sending again, sensing the channel first
CSMA/CD 2 Minimum time to detect a collision Time needed for a signal to propagate from a station to
another Worst case scenario τ – the time needed for a signal to propagate between
farthest stations It takes 2τ until a station is certain it seized the channel (if
transmits for 2τ without hearing a collision, then it is sure) A sending station must continually monitor the
channel To listen for noise bursts indicating a collision
Collision detection
Ethernet MAC
1-persistent CSMA/CD Station with frame to transmit Back-off factor k set to 0 Station monitors medium, waiting for idle channel If channel free: station waits IFG time and sends frame
IFG: time needed to send 96 bits (= 9.6 microsecs for 10Mbps) If channel busy, station continues to monitor medium Channel monitored during transmission If collision detected in the first 512 bits, transmission stops and
jam signal (32 bits) sent Station increments back-off factor k If k < 10, station waits another back-off time before sensing channel again Back-off-time = r × slot-time
r – random integer between 0 and 2k -1 k incremented at each collision, max 10
After that station should give up sending frame
Ethernet layers
MAC sub-layer in Ethernet Functions Responsible for the CSMA/CD operation Frames data received from upper layers (LLC) and
passes them on to lower layers (PLS)
Fields in Ethernet MAC frame Preamble: 7 bytes (56bits), each 10101010 Alert the receiver to the coming frame Enable synchronization in input timing Added at the PhL => not theoretically part of the
frame Start of Frame Delimiter: 1 byte: 10101011 Signals the beginning of a frame Last synchronization chance “11” bits say the destination address follows
Fields in Ethernet MAC frame 2
Destination address: 6 bytes Physical address of the destination station(s)
Source address: 6 bytes Physical address of the source station
Length/type: 2 bytes If value < 1518 then length, else PDU type
Data: minimum 46 bytes, maximum 1500 CRC: 4 bytes of error detection info (CRC-32)
Addressing Each Ethernet device has a NIC, which provides a 6-
byte physical address In hexadecimal notation
Address transmission
Unicast and multicast addresses Source address always unicast Destination addresses can be unicast or multicast or
broadcast Unicast: one recipient only First transmitted bit 0
Multicast: several recipients (group of addresses) First transmitted bit 1
Broadcast: recipients are all stations 48 1-bits
Unicast and multicast illustration
Globally and locally unique addresses Addresses should be unique Globally/locally
Globally unique Unique for all LANs Have to follow some IEEE rules About 7 × 1013 such addresses Second transmitted bit is 0
Locally unique Second transmitted bit is 1 Administrators should ensure the addresses in a LAN are
unique
Illustration of unique addresses
Minimum frame length
Main reason for minimum length To prevent station from completing the transmission
of a short frame before first bit has even reached the far end of the cable (where it may collide with another frame) If it completes transmission without hearing jam during
transmission, then it assumes all went well To be able to detect collision, a frame has to have the
length of at least 2τ 802.3 spec: 10Mbps, max length of 2500 m, 4 repeaters: round
trip time (incl. repeaters): 50 microsecs => shortest frame 500 bits, for safety 512 bits => 64 bytes => 46 bytes for data
Collision detection (again)
How long to listen for collisions? Slot time = round trip time + jam signal time 512 bits => in 10Mbps it is 51.2 microsecs If station has sent 512 bits and did not hear any
collision, it can assume no collision Signal reaches end of cable in less than half slot
time Collision can only occur during the first half of the
slot time and if it has, it can be sensed by the sender during the slot time
=> sender should listen for collision only during the first 512 bits
Maximum network length Maxlength = propagation speed × SlotTime/2 Maxlength = 2 × 108 × 51.2 × 10-6 / 2 = 5120 m Delays Repeaters, interfaces, time for jam signal
Max length for tradition Ethernet: 2500 m (48% of
the above theoretical calculation)
Maximum frame length
Physical layer
Sub-layers in PhL Physical Layer Signaling (PLS) Common for all implementations Encodes and decodes data at 10Mbps Uses Manchester encoding
Attachment Unit Interface (AUI) May be present or not in implementations Specification defining the interfaces between PLS and MAU Intended to allow for a medium-independent interface
between PLS and MAU Designed for thick Ethernet – the first
PLS
AUI
4 types of AUI Signals Each carried over a TP cable Transmit data Carries data from NIC to transceiver Manchester encoding used
Receive data Carries data from transceiver to NIC Manchester encoding used
Collision presence Sent from transceiver to NIC if there is collision on the line
Power Transceiver power provided by NIC (12V)
AUI Signals Illustration
AUI connector
AUI cable
Transceiver Both transmitter and receiver Also known as MAU (medium attachment unit) Medium dependent Creates the appropriate signal for each particular
medium There is a MAU for each medium type used in
10Mbps Ethernet Can be external or internal
Transceiver functions
MDI Medium dependent interface Needed to connect the transceiver to the medium Piece of hardware
Ethernet implementations
Ethernet cabling 10 10 Mbps Base baseband signaling 5 how many 100-meter units (can support
signals of up to 500 meters)
10Base5 (thick Ethernet) First Ethernet specification Bus topology External transceiver connected via a tap to a thick
coaxial cable Maximum 5 segments, each 500 m, 100
stations/segment
10Base2 (thin Ethernet) Second cable historically Much cheaper and easier to install, thinner Bus topology with internal transceiver, or P2P connection via external transceiver Maximum 5 segments, each 185 meters, 30
stations/segment
10Base-T (twisted pair Ethernet) Developed as the previous cables had problems
with detecting cable breaks Star topology using a hub Either external or internal transceiver Segments of 100 m, 2 stations/segment Adding/removing stations is simple, easy
maintenance Became quickly dominant
10Base-F(L) (fiber link Ethernet) Cable is fiber optic Star topology with hub, external fiber-optic
MAU (transceiver) MAU connected to hub by 2 fiber optics They are unidirectional
2000-meter segments More expensive alternative, excellent noise
immunity “The” solution for between-building cabling
Ethernet evolution ideas Bridged Ethernet Separated collision domains
Switched Ethernet Full-duplex Ethernet MAC control Pause packet
Bridges Devices controlling traffic management Divide a network into segments and relay frames
between separate segments of same type Filter traffic Effects on an Ethernet LAN Raising bandwidth Separating collision domains
Bridge illustration
Raising bandwidth 2 stations each with
heavy traffic share the medium in an 10Mbps Ethernet
In average each gets 5 Mbps bandwidth
Bridges separate net into segments Independent segments,
bandwidth-wise
Separate collision domains
Switched Ethernet Extends the bridged Ethernet idea (layer-two) Switch: N-port bridge with additional
mechanisms for faster handling N stations, N segments Bandwidth is shared between each station and the
switch Collision domain divided into N domains
Switched LAN illustration
Full-duplex Ethernet Half-duplex Ethernet 10Base5 and 10Base2 A station can either send/receive, but not at the
same time Due to CSMA/CD principle
Full-duplex Ethernet Capacity of each domain increases to 20Mbps
Full-duplex switched Ethernet
No more CSMA/CD Possible in full-duplex Ethernet Each station connected to the switch Via 2 separate links Each link is a point-to-point dedicated path Stations/switch can send/receive without worrying
about collisions No more need for CS or CD These functions are turned off
MAC control motivation Classical Ethernet designed connectionless At MAC sublayer No explicit flow/error control, no ACK/NAK Error sources Frame corrupted during transmission, detected with CRC Frame lost due to collision, detected with CSMA/CD
Full-duplex switched Ethernet, error sources Frame corrupted, detected with CRC Frame lost due to switch buffer being full => undetected by
sender !!
New sublayer In full-duplex switched Ethernet: there is need
for explicit ACK An extra sublayer is added, optionally
How does it work MAC control sublayer inserts special control
packets between data packets Encapsulated in MAC frames in the normal way Minimum length required for these frames (<= 46
bytes)
Encapsulation of a MAC control frame into a MAC frame
Fields of the MAC frame carrying a MAC control frame
Destination address Device at the other link end: 01-08-C2-00-00-01 This is a multicast address Blocked by all bridges/switches => does not pass link boundary Recognized by stations having MAC control, ignored by others
Source address Type/length: fixed, 0x8808 Payload: MAC control packet, 46 bytes FCS: frame control sequence (4-byte CRC)
The PAUSE packet The only MAC control packet defined Used for slowing down the flow between devices Not designed to solve long, continuous congestion Stop-start flow control
A device sends a PAUSE packet to ask the other device to stop sending frames for a period of time
Station receiving PAUSE starts a timer and stops sending data packets (it can still send its own PAUSE packets)
When timer expires, station resumes sending data Latest PAUSE packet the most significant Period of time is multiplied by time slot
Fast Ethernet, IEEE 802.3u
Fast Ethernet MAC Sublayer The idea of the 10-to-100-Mbps evolution: keep the
MAC sublayer untouched Same MAC method: CSMA/CD (or none needed, for full
duplex!) Same frame format Same maximum and minimum length Same addressing
Changes: slot time (in seconds) and maximum network length (collision domain)
Fast Ethernet slot time and network length
How many bits in a slot? still 512 To avoid changes in minimum frame length
Bit interval one tenth shorter (10 ns) => slot time = 512 × 10-8 = 5.12 μs
Collisions detected 10 times earlier Max network length: theoretically 512 m, in practice
250 m
Auto-negotiation New feature of Fast Ethernet Allows two devices to negotiate the mode and
data rate Designed for Allowing incompatible devices to connect to each
other Allowing devices to have multiple capabilities Allowing stations to check hubs capabilities
Auto-negotiation 2 Permissible between two hubs or a hub and a
station at a link’s ends (p2p link) Concerns only that link, not the network
Can occur only during link initialization Uses special frame format and signaling Each device at the end of the link advertises
its capabilities to the other Decision based on common capabilities Hierarchy of common capabilities defined
Auto-negotiation example
Auto-negotiation message format Selector field: 5-bit field defining the LAN type Ethernet type: 10000
Technology ability field: 8-bit field, each bit defining support for a different technology A device advertising its capabilities sets one/more of
these bits
Technology ability fields
Bit Supported Technology
0 10Base-T
1 10Base-T full duplex
2 100Base-TX
3 100Base-TX full duplex
4 100Base-T4
5 Pause operation
6 Reserved
7 Reserved
More on fields Remote fault field 1-bit field, when set, signals a fault has occurred
Acknowledge field 1-bit field, when set, signals a message was successfully
received Next page field 1-bit field, when set, signals another message is coming Next message can define the error reason
Fast Ethernet physical layer
Reconciliation Common to all implementations Replaces the PLS sublayer in 10Mbps Ethernet Encoding and decoding are done in the PHY sublayer
(transceiver) Encoding in Fast Ethernet is medium-dependent
Responsible for passing 4-bit format data to MII
MII (medium independent interface) Replaces AUI, improved interface Features Can work with both 10 and 100 Mbps data rate Parallel data path, 4 bits at the time, between
reconciliation and PHY sublayers Management functions added
MII illustration
MII signals Transmit data 4 wires: called TX data, 4 bits at a time Another wire: TX-clock, used to synchronize PHY
and reconciliation sublayers 25 Mhz
Another wire: TX-enable, used to send an enable signal to inform PHY that data is sent
Another wire: TX-error, used by a repeater when received data is in error; stations do not use this wire
MII signals 2 Receive data 4 wires: RX data, 4 bits at a time Another wire: RX-clock, used to synchronize PHY
and reconciliation sublayers 25 Mhz
Another wire: RX-valid, used to show that the data received from the medium is valid
Another wire: RX-error, used when data received from medium is in error
MII Signals 3 Control signals (2) Carrier sense: shows that the carrier was sensed Collision detect: shows that a collision was detected Used only with half-duplex operations
Management signals Power
MII Signals illustration
MII Connector
MII Cable
PHY and MDI PHY sublayer (transceiver) Encoding and decoding (function moved from PLS
layer to PHY layer) External or internal
MDI sublayer Connects the transceiver to the medium Hardware piece, implementation specific
Fast Ethernet implementation
100Base-TX 2 twisted-pair cables (5-UTP) One to hub, one from hub
Physical star topology Logical topology Star: for half-duplex mode (CSMA/CD needed) Bus: for full-duplex mode
Transceiver: either external or internal
100Base-TX illustration
Transceiver In Fast Ethernet responsible for Transmitting Receiving Detecting collisions Encoding/decoding data
Encoding/decoding Block encoding: 4B/5B Method: MLT-3 (three levels, multiline transmission)
Encoding/decoding in 100Base-TX
MLT-3 MLT-3 similar to NRZ-I, but with 3 signal levels Signal transition from one level to the next
signals a 1 bit No transition at beginning of 0 bit
100Base-FX 2 fiber optic cables in physical star topology Logical topology Star: half-duplex mode Bus: full-duplex mode
Transceiver: either external or internal
100Base-FX illustration
100Base-FX encoding/decoding
NRZ-I encoding
100Base-T4 Most buildings already wired with 3-UTP =>
100Base-TX not cost efficient 100Base-T4 uses 4 pairs of 3-UTP (or higher) Encoding and decoding more complex 3-level encoding used : 8B/6T (eight binary/six
ternary)
8B/6T Each block of 8-bit data encoded as units of ternary
signals (+1, -1, 0 V) 8-bit codes: 256=28
6-symbol ternary codes: 729=36
Encoding designed to keep synchronization and transparency
Transmission with four wires
Gigabit Ethernet 1Gbps=1000Mbps data rate, IEEE 802.3z
Gigabit Ethernet: MAC sublayer Goal: to keep MAC sublayer untouched At 1Gbps some changes were needed in the
access method
Half-duplex approaches Use CSMA/CD When a hub is used The hub does not buffer incoming frames Collisions are possible
Maximum length in network dependent on minimum frame size
3 methods defined Traditional Carrier extension Frame bursting
Traditional half-duplex How many bits in a slot? still 512 To avoid changes in minimum frame length
Bit interval one hundredth shorter (1 ns) => slot time = 512 × 10-9 = 0.512 μs
Collisions detected 100 times earlier Max network length: theoretically 51,2 m, in
practice 25m Length not suitable
Carrier extension half-duplex Extension in frame size => longer network Minimum length defined as 512 bytes (8 times
longer) A station is forced to add extra padding to any
frame smaller than 4096 bits Maximum network length: 200 m (8 times
longer) 100 m from hub to station
Padding added by sending hardware, removed by receiving hardware
Carrier extension illustration
Frame bursting Carrier extension very inefficient Different approach: frames are sent together, as
one long frame Padding added between the frames so that the
channel is not idle Non-transmitting stations are “fooled” into
considering a large frame is transmitted
Frame bursting 2 First frame as in carrier extension, max length
determined by this frame, if it goes through If no collision, station sends rest of the frames,
i.e. the burst frame Length maximum 8192 bytes minus last frame
Full-duplex MAC No CSMA/CD needed Almost all Gigabit Ethernet implementations use this
access method When a switch is present
Gigabit Ethernet physical layer
Sublayers Reconciliation Sends 8-bit parallel data to PHY via GMII
PHY Only internal; encodes/decodes
GMII Exists on NIC only => logical interface Operates at 1000Mbps Specifies a parallel data path
Gigabit Ethernet implementations
1000Base-X
Transceiver in 1000Base-X Internal Encoding: 8B/10B + NRZ
1000Base-T 4 5-UTP wires
Transceiver in 1000Base-T Encoding: 4D-
PAM5 (4 dimensional, 5-level pulse amplitude modulation)
Each code is modulated using 5 levels of PAM
Ethernet continues to evolve 2002, 2004, 2006: 802.3ae, 10 Gigabit Ethernet Standards for fiber, STP and UTP
10Gbps: prodigious speed Inside data centers Exchanges to connect high-end routers, switches,
servers Long-distance, high-bandwidth trunks between
offices: MAN based on Ethernet and fiber Full duplex (no CSMA/CD) Autonegotiation
X Gigabit Ethernet 10 Gigabit Ethernet is being deployed where needed
40/100 Gigabit Ethernet is under development (since 2007)
IEEE 802.3 Ethernet 1976: XEROX PARC Experimental Ethernet, 2.94
Mbps 1978: DEC, Intel, XEROX (DIX) DIX Ethernet, 10
Mbps 1983: IEEE 802.3 standard 1995: IEEE 802.3u Fast Ethernet, 100 Mbps 1997: IEEE 802.3x full duplex mode 1998: IEEE 802.3z Gigabit Ethernet, 1 – 2 Gbps 2002: IEEE 802.3ae 10 Gigabit Ethernet
What network do we use at ÅA? Gigabit Ethernet, 1Gbps Category 5 UTP cables + some optic fiber as part
of the backbone About 10 switches
Ethernet retrospective Used for over more than 35 years: rare phenomenon Simple and flexible => reliable, cheap, easy to maintain Interworks easily with TCP/IP, the dominant transport-
network layer protocol (they are connectionless) Able to evolve in certain essential ways
Speeds have gone up by several orders of magnitude Hubs and switches have been introduced The above changes did not require changing the software
Carrier-grade Ethernet Let network providers offer Ethernet-based services to customers
from MAN / WAN (2009)
Exercises regarding Ethernet I Solve the following exercises from the textbook
Chapter 10: 7-13, 23, 25, 26, 28, 29 Chapter 11: 1-8, 12-13, 19-22
II The word BLUE needs to be broadcast onto a 10Base5 Ethernet LAN. This LAN has 4 stations with addresses 44-AA-C1-23-45-32, 46-56-21-1A-DE-F4, 48-32-21-21-4D-34, 7C-AA-C1-23-45-32. Assume the first station (44…) transmits the info to the others. Show the MAC frame. Then show the communication between LLCs, if the frame is received fine by station 2 (46…), is damaged when arrives at station 3 (48…) and the acknowledgement for the well-received frame is lost from station 4 (7C…) to station 1.
III Assume the above LAN where stations 1, 3, 4 have simultaneously data to transmit. What is a possible scenario for a successful transmission? What happens if station 2 crashes? Any difference if the LAN was a 10Base-FL?
IV How many frames per second can gigabit Ethernet handle? Take into consideration all relevant cases.
V In 100Base-TX the clock runs at 125 Mhz, even though Fast Ethernet is supposed to deliver only 100 Mbps. What is the reason behind this?