Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Data Link Layer (Ethernet)

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 37

DATA

LINK

LAYER (Ethernet)

The parameter a
The number of packets sent by a source

before the farthest station receives the first bit

Performance metrics of CSMA/CD


Normalized throughput fraction of link capacity used to carry non-retransmitted packets example
with no collisions, 1000 packets/sec with a particular scheme and workload, 250 packets/sec => goodput = 0.25

Mean delay amount of time a station has to wait before it successfully transmits a packet
depends on the load and the characteristics of the medium

Performance metrics
Stability with heavy load, is all the time spent on resolving contentions? => unstable with a stable algorithm, throughput does not decrease with offered load if infinite number of uncontrolled stations share a link, then instability is guaranteed but if sources reduce load when overload is detected, can achieve stability Fairness no single definition no-starvation: source eventually gets a chance to send

Performance metrics
Stability with heavy load, is all the time spent on resolving contentions? => unstable with a stable algorithm, throughput does not decrease with offered load if infinite number of uncontrolled stations share a link, then instability is guaranteed but if sources reduce load when overload is detected, can achieve stability Fairness no single definition no-starvation: source eventually gets a chance to send

Centralized access schemes Reservation-based schemes comparison

When a is large(mainly for satellite links), cant

use a distributed scheme for packet mode (too many collisions) Instead master coordinates access to link using reservations Some time slots devoted to reservation messages

Stations contend for a minislot (or own one)

can be smaller than data slots => minislots

Master decides winners and grants them access to

link Packet collisions are only for minislots, so overhead on contention is reduced

Link Layer
5.1 Introduction and

services 5.2 Error detection and correction 5.3Multiple access protocols 5.4 Link-Layer Addressing 5.5 Ethernet

5.6 Hubs and switches

5.7 PPP
5.8 Link Virtualization:

ATM

What should we know?


Ethernet frame structure
Ethernet algorithm Various Ethernet technologies

Link Layer: Introduction


Some terminology:
hosts and routers are nodes

link

(bridges and switches too) communication channels that connect adjacent nodes along communication path are links

2-PDU is a frame, encapsulates

wired links wireless links LANs

datagram

data-link layer has responsibility of transferring datagram from one node to adjacent node over a link
10

Link layer: context


Datagram transferred by

transportation analogy

different link protocols over different links:

e.g., Ethernet on first link, frame relay on intermediate links, 802.11 on last link

trip from Princeton to Lausanne limo: Princeton to JFK plane: JFK to Geneva train: Geneva to Lausanne

tourist = datagram transport segment =

Each link protocol provides

different services

e.g., may or may not provide reliable data transfer over link

communication link transportation mode = link layer protocol travel agent = routing algorithm

11

Link Layer Services


Framing encapsulate datagram into frame, adding header, trailer Link access:

channel access if shared medium physical addresses used in frame headers to identify source, dest different from IP address!

Reliable delivery seldom used on low bit error link (fiber, some twisted pair) wireless links: high error rates

12

Link Layer Services (more)


Flow Control:

pacing between adjacent sending and receiving nodes. Similar to transport-layer flow control? when do we need it?
errors caused by signal attenuation, noise. receiver detects presence of errors: signals sender for retransmission or drops frame

Error Detection:

Error Correction:

receiver identifies and corrects bit error(s) without resorting to retransmission with half duplex, both ends of link can transmit, but not at same time
13

Half-duplex and full-duplex

Adaptors Communicating
datagram sending node

link layer protocol


physical link frame bus adapter

receiving node

frame

adapter

link layer implemented in receiving side adaptor (a.k.a. NIC) looks for errors, reliable transfer, flow control, etc Ethernet card, PCMCI extracts datagram, passes card, 802.11 card to receiving node sending side: adapter is semi encapsulates datagram in autonomous a frame adds error checking bits, link & physical layers reliable data transfer, flow control, etc.

14

LAN Addresses
32-bit IP address:

network-layer address

used to get datagram to destination network

LAN (or MAC or physical) address:


used to get datagram from one interface to

another physically-connected interface (same network) 48 bit MAC address (for most LANs) burned in the adapter ROM

15

Link layer: context


Datagram transferred by

transportation analogy

different link protocols over different links:

e.g., Ethernet on first link, frame relay on intermediate links, 802.11 on last link

trip from Princeton to Lausanne limo: Princeton to JFK plane: JFK to Geneva train: Geneva to Lausanne

tourist = datagram transport segment =

Each link protocol provides

different services

e.g., may or may not provide reliable data transfer over link

communication link transportation mode = link layer protocol travel agent = routing algorithm

16

LAN Addresses
Each adapter on LAN has unique LAN address

17

LAN Address (more)


MAC address allocation administered by

IEEE manufacturer buys portion of MAC address space (to assure uniqueness) MAC flat address => portability

IP hierarchical address NOT portable depends on network to which one attaches

can move LAN card from one LAN to another

ARP protocol translates IP address to MAC

address

18

Ethernet is a local area technology, with networks traditionally operating within a single building, connecting devices in close proximity. At most, Ethernet devices could have only a few hundred meters of cable between them, making it impractical to connect geographically dispersed locations.

Modern advancements have increased these distances considerably, allowing Ethernet networks to span tens of kilometers.

19

20

Ethernet Terminology
Medium - Ethernet devices attach to a common

medium that provides a path along which the electronic signals will travel. Historically, this medium has been coaxial copper cable, but today it is more commonly a twisted pair or fiber optic cabling. Segment - We refer to a single shared medium as an Ethernet segment. Node - Devices that attach to that segment are stations or nodes. Frame - The nodes communicate in short messages called frames, which are variably sized chunks of information.
21

Ethernet Frame Structure


Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame

Preamble: 7 bytes with pattern 10101010 followed by one byte with pattern 10101011 used to synchronize receiver, sender clock rates

22

Ethernet Frame Structure (more)


Addresses: 6 bytes, frame is received by all

adapters on a LAN and dropped if address does not match Type: indicates the higher layer protocol, mostly IP but others may be supported such as Novell IPX and AppleTalk) CRC: checked at receiver, if error is detected, the frame is simply dropped

23

Ethernet: uses CSMA/CD


A: sense channel, if idle
then { transmit and monitor the channel;
If detect another transmission then { abort and send jam signal; update # collisions; delay as required by exponential backoff algorithm; goto A } else {done with the frame; set collisions to zero}
}

else {wait until ongoing transmission is over and goto A}


24

25

Ethernet
The most widely used LAN

Standard is called IEEE 802.3


Also, on collision, place a

Uses CSMA/CD with exponential backoff

that all stations are aware of collision and can increment timeout range a small =>time wasted in collision is around 50 microseconds Ethernet requires packet to be long enough that a collision is detected before packet transmission completes (a <= 1)

jam signal on wire, so

Max packet size is 1500 bytes

packet should be at least 64 bytes long for longest allowed segment

26

Evaluating Ethernet
Pros easy to setup requires no configuration

Problems at heavy loads, users see large delays because of backoff nondeterministic service doesnt support priorities

But, very successful because problems only at high load can segment LANs to reduce load

27

Unreliable, connectionless service


Connectionless: No handshaking between sending

and receiving adapter. Unreliable: receiving adapter doesnt send ACKs or NACKs to sending adapter

28

Ethernet uses CSMA/CD


multiple nodes attached to the

link share the channel, that is, multiple access no slots adapter doesnt transmit if it senses that some other adapter is transmitting, that is, carrier sensing transmitting adapter aborts when it senses that another adapter is transmitting, that is, collision detection

Before attempting a

retransmission, adapter waits a random time, that is, random access

Similar effect if, with probability p, sends a frame

Need to listen to the

channel and detect collision

29

Ethernet CSMA/CD algorithm


1. Adaptor gets datagram from the 4. If adapter detects another node and creates frame transmission while transmitting, aborts and sends 48-bit jam 2. If adapter senses channel idle signal (+ 96 bit times), it starts to transmit frame. If it senses 5. After aborting, adapter enters channel busy, waits until channel exponential backoff: after the idle (+ 96 bit times) and then mth collision, adapter chooses a transmits K at random from {0,1,2,,2m-1}. Adapter waits Likely collisions after wait? K*512 bit times and returns to 3. If adapter transmits entire Step 2 frame without detecting another transmission, the adapter is done with frame !

Can collisions still occur?

Similarity between this exponential backoff and TCPs congestion control mechanisms (rate-halving and backoff when consecutive timeout)
30

Ethernets CSMA/CD (more)


Jam Signal: make sure all Exponential Backoff: other transmitters are Goal: adapt retransmission aware of collision; 48 bits; attempts to estimated Bit time: 0.1 microsec for 10 current load Mbps Ethernet ; heavy load: random wait e.g. 1K bit time is about 100 will be longer. microsecs first collision: choose K from {0,1}; delay is K x 512 bit transmission times. after second collision: choose K from {0,1,2,3 after ten collisions, choose K from {0,1,2,3,4,,1023}
Remember each node sends a frame with probability p?
31

A fairness problem
New node has initial m=0, but the other

100 nodes are in exponential backoff (m =5,6,7).


Unfairness, the new node usually grabs the channel first A selfish node always acts like a new node

32

Ethernet CSMA/CD efficiency


tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame

efficiency

1 5t prop / ttrans

Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity

?
33

Ethernet Technologies: 10Base2


10: 10Mbps; 2: under 200 meters max cable length
thin coaxial cable in a bus topology

repeaters used to connect up to multiple segments

repeater repeats bits it hears on one interface to

its other interfaces: physical layer device only!

34

Star topology
Bus topology popular through mid 90s Now star topology prevails Connection choices: hub or switch (more later)

hub or switch

35

10BaseT and 100BaseT


10/100 Mbps rate; latter called fast ethernet T stands for Twisted Pair

Nodes connect to a hub: star topology; 100m max distance

between nodes and hub

nodes hub
Hubs are essentially physical-layer repeaters:

bits coming in one link go out all other links no frame buffering no CSMA/CD at hub: adapters detect collisions

36

Gigabit Ethernet
Star topology with a hub or switch at its center

use standard Ethernet frame format

allows for point-to-point links (using switches) and

shared broadcast channels (using hubs) in shared mode, CSMA/CD is used; short distances between nodes to be efficient

full-duplex at 1 Gbps for point-to-point channels

but hubs are here Buffered Distributors

10Gbps now. 100Gbps possible? E.g. Lucents recent 100Gbps Ethernet-over-optical.

37

You might also like