to 1-31-06 p. 1 spring 2006 ee 5304/eets 7304 internet protocols tom oh dept of electrical...
TRANSCRIPT
TO 1-31-06 p. 1
Spring 2006
EE 5304/EETS 7304 Internet Protocols
Tom OhDept of Electrical Engineering
LANs, 802.3 CSMA/CD,Ethernet, 802.5 token ring
TO 1-31-06 p. 2
Administrative Issues
Thanks for your student information.
Ashfaaq Poonawala is our TA for EE5304/EETS7304 this semester.
We will have our first test on Feb. 28, but I will be traveling that week. Mr. Poonawala will be proctoring the first test (2hrs.)
DVD and Distance learning students:
If you don’t have a proctor, please ask Gary to assign a proctor you.
You don’t need to turn in your homework.
TO 1-31-06 p. 3
Administrative Issues
I have posted lecture slides in PPT format.
I will post download and installation instruction for cygwin sometime this week. Cygwin will be used for x emulator for OPNET. You also need to install putty. Cygwin and putty are used to provide access to OPNET tool from remote site.
TO 1-31-06 p. 4
Outline
LANs
Text Book (Comer): Ch. 8.5 and 8.6: pg. 105- pg. 110
ALOHA, slotted ALOHA
CSMA
Text Book (Comer): Ch. 8.7 CSMA: pg. 110
IEEE 802.3 CSMA/CD (Ethernet)
Text Book (Comer): Ch. 8.8 CSMA/CD: pg. 110- pg. 111
IEEE 802.5 Token ring
Text Book (Comer): Ch. 8.11 and 8.12: pg. 114-pg. 117
TO 1-31-06 p. 5
LANs in General
Small number of stations (eg, tens - hundreds)
Diameter of a few kilometers (e.g., building)
High bandwidth of several Mb/s or more
Single (private) ownership
Homogeneous user community
Random contention for a shared medium (coax, optic fiber, radio) follows a medium access control (MAC) protocol
TO 1-31-06 p. 6
LANs (cont)
Why not fixed-assignment multiple access?
Each station could use separate frequency bands (FDM) or time slots (TDM)
No contention but inefficient because LAN data is typically bursty
Topology is usually bus or dual bus, ring or dual ring, star
Logical topology can be different from physical topology Most wired LANs are Ethernet (bus)
TO 1-31-06 p. 7
Dual bus
Bus Ring
Dual ring
Star
TO 1-31-06 p. 8
MAC Protocols
MAC protocol is a sublayer in data link layer to regulate how shared medium is shared by multiple stations
For LANs, data link layer = logical link control (LLC) sublayer + medium access control (MAC) sublayer
data link
physical
LLC
MAC
network
- defines how stationsaccess the sharedmedium
TO 1-31-06 p. 9
MAC Protocols (cont)
LLC sublayer builds on MAC sublayer to provide medium-independent communication service to higher layers (makes MAC sublayer transparent)
LLC can provide appearance of connectionless or connection-oriented service
Connectionless service treats each message independently
• No connection setup and no sequential order Connection-oriented service requires connection setup
and preserves sequential order of messages
TO 1-31-06 p. 10
IEEE 802 Standards for LANs (ieee802.org)
802.1 LAN/MAN architectures, LAN interworking, network management, higher protocol layers
802.2 LLC (logical link control)
802.3 CSMA/CD (carrier sense multiple access/collision detection) - Ethernet
802.4 Token bus
802.5 Token ring
TO 1-31-06 p. 11
IEEE 802 (cont)
802.6 DQDB (distributed queue dual bus) metropolitan area network
802.7 Technical advisory on broadband cable
802.8 Technical advisory on optic fiber and optical LANs
802.9 Report on voice/data integration
802.10 Standard for interoperable LAN security (SILS)
802.11 Wireless LANs
TO 1-31-06 p. 12
IEEE 802 (cont)
802.12 Study of demand priority
802.13 Not used
802.14 Data over cable TV (cable modems, hybrid fiber/coax)
802.15 Wireless personal area networks (WPANs)
802.16 Broadband wireless access (wireless MANs)
802.17 Resilient packet ring (RPR)
802.18 Radio regulatory technical advisory
802.19 Coexistence technical advisory
TO 1-31-06 p. 13
ALOHA
1970s U Hawaii built UHF ground packet radio connecting computers on various island campuses using very simple random access protocol
Any station will transmit a frame whenever they have data regardless of other stations - “free for all”
If any frames overlap, they are destroyed (collision) Stations will wait for a random time before trying again Loss of frame detected by no ACK within a timeout period
TO 1-31-06 p. 14
ALOHA (cont)
Throughput is very low due to simplicity
A performance analysis calculates throughput = 1/2e = 0.184 (fraction of time spent in successful frames)
Slotted ALOHA is a modification to increase efficiency
Time is divided into time slots = T All stations are synchronized (eg, by periodic
synchronization pulse) Any station with data must wait until next time slot to
transmit Throughput increases to 1/e = 0.368
TO 1-31-06 p. 15
ALOHA (cont)
TO 1-31-06 p. 16
Carrier Sense Multiple Access (CSMA)
High rate of collisions in ALOHA is due to stations ignoring other stations
With carrier sensing, stations listen to channel before attempting to transmit -- “listen before talk”
If channel is idle, frame is transmitted If channel is busy, station will back off to transmit later
Improves over ALOHA because no stations will transmit when channel is busy
Collisions occur only if two stations begin nearly at same time
TO 1-31-06 p. 17
CSMA (cont)
Family of CSMA protocols defined by rules for backing off with varying degrees of persistence
1-persistent CSMA: stations are most aggressive P-persistent CSMA: persistence depends on probability p Non-persistent CSMA: stations are not that aggressive
TO 1-31-06 p. 18
TO 1-31-06 p. 19
CSMA/CD (CSMA with Collision Detection)
While transmitting a frame, a station will listen for a collision and abort immediately -- “listen while talk”
More efficient than CSMA with no collision detection, where entire frames are transmitted even in collisions
After collision, stations back off for random time and retry
Maybe series of collisions until one station successfully grabs the channel
TO 1-31-06 p. 20
CSMA/CD (cont)
3 alternating states: (1) transmission (2) contention (3) idle
frame
transmission idle time
frame
contention:series of time
slots for collisions
frametime
TO 1-31-06 p. 21
CSMA/CD (cont)
Performance depends on time to detect collision (assume transmissions can be aborted immediately)
If T is worst-case propagation delay between any two stations, then collision detection time is 2T
station A
A begins transmit
timestation B
B begins transmit just before signal reaches B
A detects collision after 2T
signal signal
TO 1-31-06 p. 22
CSMA/CD (cont)
Assume
N = number of stations 2T = length of collision time slots F = time to transmit frame (F > 2T, otherwise collisions are not
detected) P = probability a station will transmit in idle time slot
After successful frame, there is contention period of series of collision time slots (multiple attempts) or idle (no attempts), ended by a successful frame (exactly one attempt)
TO 1-31-06 p. 23
CSMA/CD (cont)
Find (exactly 1 attempt in time slot)
Maximum occurs when P = 1/N, then
Mean length of contention period:
Pr(j slots with collisions or idle followed by one transmission) =
P Pr1
NP P N( )1 1
PN
N
1
1
11
( )1 1 1 P Pj
TO 1-31-06 p. 24
CSMA/CD (cont)
Maximum utilization is
Note util. will be small if T is large relative to F
fram e tim e
fram e tim e con ten tion period
F
FP
PT
_
_ _
1
21
1
TO 1-31-06 p. 25
IEEE 802.3 CSMA/CD
802.3 CSMA/CD is used in Ethernet, the predominant wired LAN
802.3 is family of CSMA/CD from 1-1000 Mb/s
Utilization can be reduced by collisions Frames are designed to be long to maintain decent
utilization Also, chance of repeated collisions is reduced by binary
exponential backoff
TO 1-31-06 p. 26
Binary Exponential Backoff
Contention time slots = 2T = nominally 512 bit times
After first collision, each station randomly choose 1 slot in next 2 slots and tries again
After 2nd collision, randomly choose 1 slot in next 4 slots and try again
After n-th collision, randomly choose 1 slot in next 2n slots
After each collision, another collision becomes less likely
Adjusts dynamically to appropriate level of traffic, improves stability
TO 1-31-06 p. 27
Binary Exponential Backoff (cont)
X
collisions
tries in oneof 2 slots
Example X X
tries in oneof 4 slots
tries in oneof 8 slots
TO 1-31-06 p. 28
802.3 Frame Format
Preamble = 7 bytes of 10101010 to synchronize receiver’s clock
Start of frame (SOF) = 10101011 (byte)
Preamble SOFDest.
AddressLength Data Pad CRC
Bytes 7 1 2 or 6 2 Variable 0-64 4
SourceAddress
2 or 6
TO 1-31-06 p. 29
802.3 Frame Format (cont)
Destination/Source addresses (2 or 6 bytes)
2-byte addresses are locally administered 6-byte addresses are local or global
Length (2 bytes) = length of data field
Data = 0-1500 bytes
Pad = filler to make frame at least 64 bytes (excluding preamble and SOF)
Minimum length to ensure collision detection
CRC = error detection using a CRC code
TO 1-31-06 p. 30
Ethernet
3 Mb/s Ethernet invented by Xerox to connect 100 workstations on a 1-km cable
Currently 60-90 percent of LANs are Ethernet
1982 Ethernet version 2 (“Blue book”) is official standard, a slight variant of 802.3 CSMA/CD (standardized 1985)
2-byte “Type” field instead of “Length” field indicates the network layer protocol
8 bytes of “Preamble” (instead of 7 bytes + SOF)
TO 1-31-06 p. 31
Some Types of Ethernet
Example notation: 10Base5 = 10 Mb/s rate, baseband (no modulation), 500 meter length limit
10Base2 “thin Ethernet” uses 3/16-inch (cheaper) coax cable
10Base5 “thick or standard Ethernet” uses 3/8-inch coax cable
10BaseT uses unshielded twisted pair (cheap) cable - approved as 802.3i (1990)
10Broad36 uses CATV coax cable
10BaseFP uses optic fiber in passive star
TO 1-31-06 p. 32
Fast Ethernet
Accelerated to 100 Mb/s to compete with FDDI but keeping advantages of low cost and simplicity of Ethernet
100BaseTX: twisted pair cable in passive star
100BaseFX: optic fiber in passive star
Gigabit Ethernet accelerated to 1 Gb/s (IEEE 802.3z)
TO 1-31-06 p. 33
Ethernet Hubs and Switches
Hub is central collection point of cables for passive star topology
Switch performs store-and-forwarding of frames similar to packet switch or bridges
Hub
TO 1-31-06 p. 34
IEEE 802.5 Token Ring
Rings are fair with bounded access delay
Token is small packet circulating around ring, either free or busy
Token format:
Starting delimiter (1 byte): start of token Access control (1 byte): control fields Ending delimiter (1 byte): end of token
TO 1-31-06 p. 35
Token Format
Accesscontrol
SD
Bytes 11
ED
1
Tokenbit
PriorityMonitorbit
Reservation
-Token bit: free or busy-Monitor bit: a station serving as token monitor will set this bit for a busy token, then watches for a token that is always busy, changes busy token to free-Priority (3 bits): used to transmit data frames with priorities-Reservation (3 bits): used to reserve tokens (complicated)
TO 1-31-06 p. 36
802.5 Token Ring (cont)
Basic operation:
Station can transmit only by grabbing free token, change to busy token, transmit frame after it
Station with destination address will read frame Frame circulates back to sender, deletes it, generates free
token Next station on ring has first opportunity to grab free token
TO 1-31-06 p. 37
802.5 Frame Format
Access control: same as “access control” field in token
Frame control: indicates data frame or type of control frame
Accesscontrol
Dest.Address
DataFramecontrol
CRC
Bytes 1 2 or 6 Variable1 4
SourceAddress
2 or 6
EOF
1
SOF
1
Framestatus
1
TO 1-31-06 p. 38
802.5 Frame Format (cont)
Frame status:
A bit: destination station sets to 1 if frame was read C bit: destination station sets to 1 if frame was copied Sender looks at A and C bits when frame returns A=0, C=0: destination is down A=1, C=0: destination up but frame not accepted A=1, C=1: destination up and frame accepted
(equivalent to Ack)
TO 1-31-06 p. 39
Token Ring Performance
Define
Cycle = data frame followed by token
T1 = average time to transmit data frame
T2 = average time to pass a token
C = T1 + T2 = average time for a cycle
1 = frame transmission time (normalized)
a = propagation time around ring (normalized)
Throughput
TO 1-31-06 p. 40
Performance (cont)
Case 1: a < 1
t=0: Frame begins around ring
Time
t=a: Start of frame reaches around ring
t=1: Station finishes transmission, releases token
t=1+a/N: Token gets to next station
TO 1-31-06 p. 41
Token Ring Performance
a < 1:
t=0: start to transmit frame
t=a: sender receives leading edge of frame
t=1: sender completes transmission of frame
t=1+ (a/N): token goes to next station
--> S can be high for large N
TO 1-31-06 p. 42
Performance (cont)
Case 1: a > 1
t=0: Frame begins around ring
Time
t=1: Station finishes transmission, releases token
t=a+a/N: Token gets to next station
t=a: Start of frame reaches around ring, station releases token
TO 1-31-06 p. 43
Token Ring Performance
a > 1:
t=0: start to transmit frame
t=1: sender completes transmission of frame
t=a: sender gets leading edge of frame, frees token
t=a+ (a/N): token goes to next station
--> S goes to 1/a for large N, a problem for high-speed rings
TO 1-31-06 p. 44
Wrap Up
Carrier sensing in CSMA improves on ALOHA
Collision detection in CSMA/CD allows stations to abort quickly during collisions
Utilization depends on frame transmission time and roundtrip propagation delay
802.3 is CSMA/CD with binary exponential backoff
802.5 token ring guarantees fairness and access delay
Utilization depends on frame transmission time and propagation delay