Top Banner
CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000
65

CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

Jan 11, 2016

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

CSC 335 Data Communications

and Networking

Lecture 7: Local Area Networking

Dr. Cheer-Sun Yang

Fall 2000

Page 2: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

Motivation

• Up to this point, we’ve talked about point-to-point communication.

• We many need to connect many computers together.

• Local Area Network(LAN): if they are located in a relatively close geographic area.

• Metropolitan Area Network (MAN) : extends over entire city

• Wide Area Network (WAN) : extends across public switching network.

Page 3: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

LAN Applications (1)

• Personal computer LANs– Low cost– Limited data rate

• Back end networks and storage area networks– Interconnecting large systems (mainframes and large

storage devices)• High data rate• High speed interface• Distributed access• Limited distance• Limited number of devices

Page 4: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

LAN Applications (2)

• High speed office networks– Desktop image processing– High capacity local storage

• Backbone LANs– Interconnect low speed local LANs– Reliability– Capacity– Cost

Page 5: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

LAN Architecture

• Topologies

• Protocol architecture– Physical Layer– Media access control– Logical Link Control

Page 6: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

Topologies

• Bus: A single communication line, typically a twisted pair, coaxial cable, or optical fiber, represents the primary medium.

• Ring: packets can only be passed from one node to it’s neighbor.

• Star: A hub or a computer is used to connect to all other computers.

• Tree: no loop exists (logical connection).

Page 7: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

LAN Topologies

Page 8: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

Frame Transmission - Bus LAN

Page 9: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

Ring Topology

• Repeaters joined by point to point links in closed loop– Receive data on one link and retransmit on another– Links unidirectional– Stations attach to repeaters

• Data in frames– Circulate past all stations– Destination recognizes address and copies frame– Frame circulates back to source where it is removed

• Media access control determines when station can insert frame

Page 10: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

Frame Transmission

Ring LAN

Page 11: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

Star Topology

• Each station connected directly to central node– Usually via two point to point links

• Central node can broadcast– Physical star, logical bus– Only one station can transmit at a time

• Central node can act as frame switch

Page 12: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

Bus and Tree• Multipoint medium• Transmission propagates throughout medium • Heard by all stations

– Need to identify target station• Each station has unique address

• Full duplex connection between station and tap– Allows for transmission and reception

• Need to regulate transmission– To avoid collisions– To avoid hogging

• Data in small blocks - frames

• Terminator absorbs frames at end of medium

Page 13: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

Protocol Architecture

• Protocol layering (IEEE 802.X)– Physical Layer– Media access control (MAC) Sublayer– Logical link control (LLC)

Page 14: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

IEEE 802.X

• IEEE 802.3 : Ethernet LAN

• IEEE 802.4 : Token Bus LAN

• IEEE 802.5 : Token Ring LAN

• Other Ring Networks: FDDI, Slotted Rings.

• IEEE 802.6 : Distributed Queue Dual Bus (DQDB) MAN standard.

Page 15: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

IEEE 802 vs. OSI

Fig 6.4

Page 16: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

LAN Protocols in Context

Page 17: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

802 Physical Layer Design Issues

• Encoding/decoding

• Preamble generation/removal

• Bit transmission/reception

• Transmission medium and topology

Page 18: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

802 Physical Layer

• Required hardware for connecting a PC to Ethernet directly:– Transceiver

– Attachment Unit Interface (AUI) cable

– Network Interface Card (NIC) also known as Network Adapter

• Required hardware for connecting a PC to a remote computer: modem (with the help of PPP)

Page 19: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

Bus LANs

• Signal balancing– Signal must be strong enough to meet receiver’s

minimum signal strength requirements

– Give adequate signal to noise ration

– Not so strong that it overloads transmitter

– Must satisfy these for all combinations of sending and receiving station on bus

– Usual to divide network into small segments

– Link segments with amplifies or repeaters

Page 20: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

Transmission Media• Twisted pair– Not practical in shared bus at higher data rates

• Baseband coaxial cable– Used by Ethernet

• Broadband coaxial cable– Included in 802.3 specification but no longer made

• Optical fiber– Expensive– Difficulty with availability– Not used

• Few new installations– Replaced by star based twisted pair and optical fiber

Page 21: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

Baseband Coaxial Cable

• Uses digital signaling• Manchester or Differential Manchester encoding• Entire frequency spectrum of cable used• Single channel on cable• Bi-directional• Few kilometer range• Ethernet (basis for 802.3) at 10Mbps• 50 ohm cable

Page 22: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

10Base5

• Ethernet and 802.3 originally used 0.4 inch diameter cable at 10Mbps

• Max cable length 500m• Distance between taps a multiple of 2.5m

– Ensures that reflections from taps do not add in phase

• Max 100 taps• 10Base5

Page 23: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

10Base2• Cheapernet• 0.25 inch cable

– More flexible

– Easier to bring to workstation

– Cheaper electronics

– Greater attenuation

– Lower noise resistance

– Fewer taps (30)

– Shorter distance (200m)

Page 24: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

Cable Specifications for 802.3

• 10BaseT: 10 Mbps, baseband, unshield twisted

• 10Base2: 10Mbps, Cat. 2 coaxial• 10Base5: 10 Mbps, Cat. 5, Cat. 5e coaxial• 100BaseTX: 100 Mbps, twisted cable (Fast

Ethernet)• 10Broad36: maximum segment length 3600

meters

Page 25: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

Gigabit Ethernet

• 1000Base-SX– Short wavelength, multimode fiber

• 1000Base-LX– Long wavelength, Multi or single mode fiber

• 1000Base-CX– Copper jumpers <25m, shielded twisted pair

• 1000Base-T– 4 pairs, cat 5 UTP

• Signaling - 8B/10B

Page 26: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

Connectors

• T-connector: used to form a bus topology

• RJ-45 connectors: for connecting a PC to another PC, Ethernet, or hub.– Cross-over: a direct connection to another PC– Straight-through: connection with the Ethernet

jack or hub.

Page 27: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

Repeaters

• Transmits in both directions• Joins two segments of cable• No buffering• No logical isolation of segments• If two stations on different segments send at

the same time, packets will collide• Only one path of segments and repeaters

between any two stations

Page 28: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

Media Access Control Sublayer

• Assembly of data into frame with address and error detection fields

• Disassembly of frame– Address recognition

– Error detection

• Govern access to transmission medium– Not found in traditional layer 2 data link control

– Also known as Contention protocols (section 3.4)

Page 29: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

Collision vs. Contention

• When the communication link is used by one station to transmit a frame, another station connecting to the same link tries to send a packet– collision

• Contention: accessing the medium with the consideration that a collision may occur.

• Contention Protocols: the protocol is designed to deal with collision using contention.

• Collision-free Protocols: the protocol is designed so that collision will not occur.

Page 30: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

Contention Protocols

• Pure ALOHA

• Slotted ALOHA

• Carrier Sense Multiple Access (CSMA)

• Persistent and non-persistent CSMA

• CSMA with Collision Detection (CSMA/CD)

Page 31: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

Collision-Free Protocols

• A Bit-Map Protocol: reservation protocol

• Binary Countdown

Page 32: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

Pure Aloha• Packet Radio• When station has frame, it sends• Station listens (for max round trip time)plus small

increment• If ACK, fine. If not, retransmit• If no ACK after repeated transmissions, give up• Frame check sequence (as in HDLC)

Page 33: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

Pure Aloha(cont’d)

• If frame OK and address matches receiver, send ACK

• Frame may be damaged by noise or by another station transmitting at the same time (collision)

• Any overlap of frames causes collision• Max utilization 18% (WHY?)

Page 34: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

The Efficiency of Pure Aloha

G = the traffic measured as the average number of frames generated per slot

S = the success rate, success frame / slot

= G e –2G (pure Aloha)

S = G e –G (slotted Aloha)

S = Pr[no frame is generated]= e -G

Pr[k frames are generated] = G k e –G / k !

This is called a probability distribution function(pdf) forPoisson distribution. (e = 2.7818…)

Page 35: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

The Efficiency of Pure Aloha

= G e –2G (pure Aloha)S = G * P 0

If there is no negative acknowledgement frame received after sending out one frame, the transmission is successful. SoP0 = Pr[no frames are generated in 2 time slots] = e -G * e –G

= e –2G

Page 36: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

The Efficiency of Pure Aloha

S = G * P 0= G e –2G (pure Aloha)

We need to find the value of G such that S is maximized.S’ = G (-2) e –2G + e –2G = (1 – 2G) * e –2G

Let S’ = 0 => G = ½ When G = ½, S = 1/ 2e = 0.184 = 18%

Page 37: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

Slotted ALOHA

• A computer is not allowed to send until the beginning of the next slot.

• Time in uniform slots equal to frame transmission time

• When a frame is allowed to be transmitted, there is no collision.

• Need central clock (or other sync mechanism)• Transmission begins at slot boundary• Max utilization 37% (WHY?)

Page 38: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

The Efficiency of Slotted Aloha

= G e –G (slotted Aloha)S = G * P 0

If there is no other frame received after sending out one frame, the transmission is successful. SoP0 = Pr[no frames are generated in one time slots] = e -G

Page 39: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

The Efficiency of Slotted Aloha

S = G * P 0= G e –G (slotted Aloha)

We need to find the value of G such that S is maximized.S’ = G (-1) e –G + e –G = (1 –G) * e –G

Let S’ = 0 => G = 1 When G = 1, S = 1/ e = 0.368 = 37%

Page 40: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

Carrier Sense Multiple Access (CSMA) Protocols

• Protocols in which stations listen for a carrier (i.e., a transmission) and act accordingly are called carrier sense protocols.– 1-persistent CSMA– Non-persistent CSMA– p-persistent CSMA

Page 41: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

CSMA

• Propagation time is much less than transmission time

• All stations know that a transmission has started almost immediately

• First listen for clear medium (carrier sense)

Page 42: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

If Busy?

• If medium is idle, transmit

• If busy, listen for idle then transmit immediately

• No ACK then retransmit

• If two stations are waiting, it is called a collision.

Page 43: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

1-persistent CSMA

• When a station has data to send, it first listens to the channel to see if anyone else is transmitting at that moment.

• If the channel is busy, the station waits until it becomes idle.

• The station retransmits with a probability of 1 when it finds that the channel is idle.

Page 44: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

Non-persistent CSMA

• When a station has data to send, it first listens to the channel to see if anyone else is transmitting at that moment.

• If the channel is busy, the station waits until it becomes idle.

• The station does not keep trying. It waits for a random number of time and retries.

Page 45: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

Non-persistent CSMA

• This applies to slotted channels. When a station has data to send, it first listens to the channel to see if anyone else is transmitting at that moment.

• If the channel is idle, it transmits with a probability p. With a probability of 1-p, it defers until the next slot.

• If the next slot is also idle, it transmits or defers again with probability p and q.

Page 46: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

CSMA

• Max utilization depends on propagation time (medium length) and frame length. Longer frame and shorter propagation gives better utilization.

• Collisions still can be a problem, especially with p-persistent CSMA.

• One way to reduce the frequency of collision with CSMA is to lower the probability that a station will send when a previous is done. (Fig. 3.26)

• Smaller values of p => fewer collision.

Page 47: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

Any Other Way?

• Is there another way to improve the successful rate?

• Yes if there is a way to detect collision prior to transmission.

• Why is this faster?

Page 48: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

Collisions with and without Detection

• Without collision detection, a station must send and then wait for 2 time slots before another attempt to send.

• With collision detection, a station can stop transmission if collision detection requires less time than sending a frame.

Page 49: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

Collision Detection

• On baseband bus, collision produces much higher signal voltage than signal

• Collision detected if cable signal greater than single station signal

• Signal attenuated over distance• Limit distance to 500m (10Base5) or 200m

(10Base2)• For twisted pair (star-topology) activity on more

than one port is collision• Special collision presence signal

Page 50: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

CSMA/CD

• With CSMA, collision occupies medium for duration of transmission

• Stations listen while transmitting

• If medium idle, transmit• If busy, listen for idle, then transmit• If collision detected, jam then ease transmission• After jam, wait random time then start again

– Binary exponential back off

Page 51: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

CSMA/CDOperation

Page 52: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

Binary Exponential Back Off

• If a station’s frame collides for the first time, wait 0 or 1 time slot (chosen randomly) before trying again.

• If it collides a second time, wait 0, 1, 2, or 3 slots (again, chosen randomly).

• After a third collision, wait anywhere from 0 to 2 n –1 slots if n <= 10, if n > 10, wait between 0 to 1024 (2 10) slots.

• After 16 collisions, give up. Further recovery is up to the upper layer, such as a user.

Page 53: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

IEEE 802.3 Frame Format

Page 54: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

Frame Format (802.3)

• Start of frame delimiter: 10101011• Destination address• Source address• Data length field• Data field• Pad field: the data field must be at least 46 octets.• Frame check sequence: using 32-bit CRC.

Page 55: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

Efficiency of 802.3(p.375)

P: the probability that a frame is sent without a collisionPs: the probability that a station sendsThe probability of a collision = 1 – P.The probability of a transmission requiring exactly N attempts == N-1 collisions followed by a success= N * Ps * ( 1- Ps) N - 1

Page 56: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

Efficiency of 802.3(p.376-377)

We would like to know under what conditions the largest number of frames are sent successfully.

Page 57: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

Efficiency of 802.3(p.375)

The probability of a transmission requiring exactly N attempts =P= N * Ps * ( 1- Ps) N – 1

dP/dPs = N(1-Ps)N-1 + N Ps (N-1)(1-Ps)N-2

= N (1-Ps) N-2 [1- Ps – Ps (N –1) ]Let dP/dPs = 0 => Ps = 1/N

Page 58: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

Efficiency of 802.3

How many time slots has passed before a frame is sent successfully?

Page 59: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

The Efficiency of 802.3

The contention period = the number of time slots passed before a successful transmission

Page 60: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

The Efficiency of 802.3

Assume that the probability of a success in each attempt = p.The probability of a collision = 1 – p.The probability of a transmission requiring exactly i+1 attempts = P(i+1)

= i collisions followed by a success= p (1- p) i

Page 61: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

The Efficiency of 802.3

The contention period

=

= (1-p)/p

0

2)1/(*i

i xxxiGiven

0

2/)1(**)1(*i

i pppppi

Page 62: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

The Efficiency of 802.3

The contention period (C)

= (1/p) –1

0 <= p <= 1 (p: the successful rate)If p -> 1 C -> 0If p -> 0, C = largeWe’ve found that when Ps=1/N, p is maximized.So, C = (1-1/N)1-N -1 when p is maximized. If N->large, C = 2.718 – 1 = 1.718 (close to 2).

Page 63: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

The Utilization Rate of Ethernet

The percent utilization (U) does not depend on the number of stations in practice. A station will try to send regardless of how many other stations there are. The previous result often is used as benchmarks against which measures are made to estimate efficiency.

Page 64: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

The Utilization Rate of Ethernet

The percent utilization (U) is defined as the amount of time spent on transmitting a frame as a percentage of the total time spent on contending and transmitting. Assume:R = transmission rateF = number of bits in a frameT = slot timeSo U = %100*

*CTRF

RF

Page 65: CSC 335 Data Communications and Networking Lecture 7: Local Area Networking Dr. Cheer-Sun Yang Fall 2000.

Required Reading

• Section 6.1, 3.4, 6.2