Professional Documents
Culture Documents
Communications
Tenth Edition
by William Stallings
CHAPTER 12
Ethernet
2
Traditional Ethernet
Earliest was ALOHA
3
CSMA/CD Precursors
➢ Carrier Sense Multiple Access (CSMA)
⚫ Station listens to determine if there is another
transmission in progress
⚫ If idle, station transmits
station retransmits
⚫ Utilization far exceeds ALOHA
4
5
Nonpersistent CSMA
If the medium is idle,
transmit; otherwise, go to Disadvantage:
step 2 Capacity is wasted because
the medium will generally
remain idle following the end
of a transmission even if there
are one or more stations
waiting to transmit
7
P-Persistent CSMA
➢ A compromise to try and reduce collisions and idle time
➢ P-persistent CSMA rules:
1. If medium is idle, transmit with probability p, and
delay one time unit with probability (1–p)
2. If medium is busy, listen until idle and repeat step 1
3. If transmission is delayed one time unit,
repeat step 1
➢ Issue of choosing effective value of p to avoid instability
under heavy load
8
Value of p?
➢ Have n stations waiting to send
➢ At end of transmission, expected number of stations is
np
⚫ If np>1 on average there will be a collision
➢ Repeated transmission attempts mean collisions are
likely
➢ Eventually all stations will be trying to send, causing
continuous collisions, with throughput dropping to zero
➢ To avoid catastrophe np<1 for expected peaks of n
⚫ If heavy load expected, p must be small
⚫ Smaller p means stations wait longer
9
Description of CSMA/CD
4.
1. 2. 3.
After
If a collision is
If the medium transmitting
If the detected,
is busy, the jamming
medium is transmit a brief
continue to signal, wait a
idle, jamming signal
listen until the random
transmit; to assure that all
channel is idle, amount of
otherwise, stations know
then transmit time, referred
go to step 2 that there has
immediately to as the
been a collision
backoff, then
and cease
attempt to
transmission
transmit again
10
A B C D
TIME t0
A's transmission
C's transmission
Signal on bus
TIME t1
A's transmission
C's transmission
Signal on bus
TIME t2
A's transmission
C's transmission
Signal on bus
TIME t3
A's transmission
C's transmission
Signal on bus
reports error
➢ 1-persistent algorithm with binary exponential backoff is
efficient over wide range of loads
➢ Backoff algorithm has last-in, first-out effect
13
Collision Detection
On twisted pair
On baseband bus
(star-topology)
15
0 Network (7 bits) Host (24 bits) Class A
1 1 1 0 Multicast Class D
17
Subnets and Subnet Masks
➢ Allows arbitrary complexity of internetworked LANs
within organization
➢ Insulate overall internet from growth of network numbers
and routing complexity
➢ Site looks to rest of internet like single network
➢ Each LAN assigned subnet number
➢ Host portion of address partitioned into subnet number
and host number
➢ Local routers route within subnetted network
➢ Subnet mask indicates which bits are subnet number
and which are host number
18
Table 14.2
IPv4 Addresses and Subnet Masks
Binary Representation Dotted Decimal
IP address 11000000.11100100.00010001.00111001 192.228.17.57
Subnet mask 11111111.11111111.11111111.11100000 255.255.255.224
Bitwise AND of address 11000000.11100100.00010001.00100000 192.228.17.32
and mask (resultant
network/subnet number)
Subnet number 11000000.11100100.00010001.001 1
Host number 00000000.00000000.000 00000.00011001 25
(a) Dotted decimal and binary representations of IPv4 address and subnet masks
B
A
IP Address: 192.228.17.57
IP Address: 192.228.17.33 Host number: 25
Host number: 1
Rest of
R1
Internet Net ID/Subnet ID: 192.228.17.64
Subnet number: 2
LAN Y C
IP Address: 192.228.17.65
Host number: 1
R2
D
IP Address: 192.228.17.97
Host number: 1