12 ethernet slides

17
Broadcast Networks Broadcast Networks Particularly Ethernet Fall 2009 CS 150: Introduction to Computing 1

Upload: dung-dang

Post on 20-Apr-2015

108 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: 12 Ethernet Slides

Broadcast NetworksBroadcast Networks

Particularly Ethernet

Fall 2009 CS 150: Introduction to Computing 1

Page 2: 12 Ethernet Slides

Switched vs BroadcastSwitched vs. Broadcast

Switch

Fall 2009 CS 150: Introduction to Computing 2

Page 3: 12 Ethernet Slides

Ethernet (IEEE 802 3)Ethernet (IEEE 802.3)

• Multiple access networkN d d d i f h d li k– Nodes send and receive frames over a shared link

• Carrier Sense Multiple Access with Collision Detection (CSMA/CD)– CSMA: all nodes can distinguish between an idle and

busy link– CD: nodes listen as they transmit and can therefore

detect hen f ame it is t ansmitting has inte fe ed detect when frame it is transmitting has interfered with a frame transmitted by another node

• Evolved philosophically from the Aloha packet radio network (both mediate access to a radio network (both mediate access to a shared medium—for Aloha it was the atmosphere, for Ethernet a coaxial cable).

Fall 2009 CS 150: Introduction to Computing 3

Page 4: 12 Ethernet Slides

Ethernet (802 3)Ethernet (802.3)

• DEC Intel Zerox joined forces to define • DEC, Intel, Zerox joined forces to define 10Mbps Ethernet standard in 1978. – 100Mbps and 1Gps Ethernet are designed for point-

to point switched network so not the “true” ethernet to-point switched network, so not the “true” ethernet algorithm.

• IEEE Standard 802.3 is the “official” protocol, though not every Ethernet follows this standard (slight differences in certain packet header fields, etc). header fields, etc).

Fall 2009 CS 150: Introduction to Computing 4

Page 5: 12 Ethernet Slides

Physical PropertiesPhysical Properties

• Implemented on coaxial cable of up to 500 Implemented on coaxial cable of up to 500 meters in length

• Hosts connect by “tapping” into it. Taps at least 2 5 meters apart– Taps at least 2.5 meters apart

• Transceiver is small device directly attached to tap– Detects when line is idle and drives signal when host

is transmitting

• All protocol logic implemented in the adaptor (i.e. the network card), not transceiver

Fall 2009 CS 150: Introduction to Computing 5

Page 6: 12 Ethernet Slides

Ethernet Transceiver and AdaptorEthernet Transceiver and Adaptor

TransceiverTransceiver

Ethernet CableAdaptor

Fall 2009 CS 150: Introduction to Computing 6

Page 7: 12 Ethernet Slides

Multiple Ethernet SegmentsMultiple Ethernet Segments

• Multiple Ethernet segments can be joined together by repeaterstogether by repeaters– No more than four repeaters between any two hosts

(so Ethernet has a total reach of only 2500 meters).– Like single Ethernet each host hears every message Like single Ethernet, each host hears every message

sent on network

• An Ethernet is limited, regardless of whether repeaters used to 1024 hostsrepeaters used to 1024 hosts

• Again, any signal is heard by everyone– Terminators attached to end of each segment absorb

signal and keep if from reflecting back and signal and keep if from reflecting back and interfering with trailing signals

Fall 2009 CS 150: Introduction to Computing 7

Page 8: 12 Ethernet Slides

All hosts in thesame collision domain

Fall 2009 CS 150: Introduction to Computing 8

Page 9: 12 Ethernet Slides

Frame FormatFrame Format

• 64 bit preamble for synchronization (unseen by host)by host)

• 48 bit address fields for both destination and source

• Type field (to which higher level protocol should this frame be delivered)

Fall 2009 CS 150: Introduction to Computing 9

Page 10: 12 Ethernet Slides

Frame Format (cont )Frame Format (cont.)

• Minimum of 46 and maximum of 1500 bytes of • Minimum of 46 and maximum of 1500 bytes of data– Minimum required so frames long enough for

collision detectioncollision detection

• 32 bit CRC (cyclic redundancy check)• 802.3 format slightly different (16 bit length 802.3 format slightly different (16 bit length

field replaces the type field)– Software kludged so that it can handle either

Fall 2009 CS 150: Introduction to Computing 10

Page 11: 12 Ethernet Slides

AddressesAddresses

• Typically written in hex notationTypically written in hex notation– Ex. 8:0:2b:e4:b1:2

• Every Ethernet Adaptor in world has unique Ethernet addressEthernet address– Burned into ROM at factory– Each manufacturer has different prefix

E AMD sta ts ith 080020• Ex. AMD starts with x080020

• Each frame transmitted on Ethernet received by every adaptor

Fall 2009 CS 150: Introduction to Computing 11

Page 12: 12 Ethernet Slides

Adaptor Accepts:Adaptor Accepts:

• Frames addressed to its own address• Frames addressed to the broadcast address (all

1 )1s)• Frames addressed to a multicast address (first

bit 1) if instructed to listen for that address by bit 1) if instructed to listen for that address by host

• All frames, if it is in promiscuous mode

• It passes to host only the frames that it accepts

Fall 2009 CS 150: Introduction to Computing 12

Page 13: 12 Ethernet Slides

Transmitter AlgorithmTransmitter Algorithm

• When adaptor has frame to send and line is • When adaptor has frame to send and line is idle, it transmits frame immediately– Upper bound of 1500 bytes ensures that no adaptor

can occupy the line for too longcan occupy the line for too long

• If adaptor has frame to send and line is busy, it waits for line to go idle then transmits gimmediately– Well, all adaptors wait 9.6μs after one frame before

sending nextsending next

Fall 2009 CS 150: Introduction to Computing 13

Page 14: 12 Ethernet Slides

Transmitter Algorithm (cont )Transmitter Algorithm (cont.)

• It is possible for two or more adaptors to b i t itti t ti ( lli i )begin transmitting at same time (a collision)

• If collision occurs, both adaptors transmit a 32 bit jamming sequence, then stop transmitting.bit jamming sequence, then stop transmitting.– So in minimal case an adaptor sends 96 bits: 64 bit

preamble and 32 bit jamming sequence (this is called a runt frame)called a runt frame)

– Runt frame only occurs if senders are near. In worst case they may need to send as many as 512 bits (64) bytes past preamble to detect collision (thus the (64) bytes past preamble to detect collision (thus the 46 data byte miminum: 14 bytes of header plus 46 bytes of data plus 4 byte CRC = 64 bytes).

– Why 512 bits?!

Fall 2009 CS 150: Introduction to Computing 14

Why 512 bits?!

Page 15: 12 Ethernet Slides

512 Bits…

A d f t ti t

Worst case scenario:

A sends frame at time t

A’s frame arri es at BA’s frame arrives at Bat time t+d

B b i t itti tB begins transmitting attime t+d and collides withA’s frame

B’s runt (32 bits) arrives atA at time t +2d

Fall 2009 CS 150: Introduction to Computing 15

Host A must transmit for 2d to be sure it detects all possible collisions!

Page 16: 12 Ethernet Slides

512 Bits (cont )512 Bits (cont.)

• A maximally configured Ethernet is 2500 A maximally configured Ethernet is 2500 meters long

• Has max of 4 repeatersR d t i d l h b d t i d t b • Round trip delay has been determined to be 51.2μs long, which on 10Mbps Ethernet is 512 bits

• Bottom line: limits placed on Ethernet are designed to limit latency on the network, and thus allow the access algorithm to work gsomewhat efficiently

Fall 2009 CS 150: Introduction to Computing 16

Page 17: 12 Ethernet Slides

Ethernet SuccessEthernet Success

• Extremely easy to administer and maintain• Extremely easy to administer and maintain– No switches that can fail– No routing or configuration tables to maintain– Easy to add new hosts

• Inexpensive– Cable is cheapCable is cheap– Only additional cost is network adapter for each host

Fall 2009 CS 150: Introduction to Computing 17