Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSC581 Communication Networks II Chapter 6a: Local Area Network (Ethernet - 802.3) Dr. Cheer-Sun Yang.

Similar presentations


Presentation on theme: "CSC581 Communication Networks II Chapter 6a: Local Area Network (Ethernet - 802.3) Dr. Cheer-Sun Yang."— Presentation transcript:

1 CSC581 Communication Networks II Chapter 6a: Local Area Network (Ethernet - 802.3) Dr. Cheer-Sun Yang

2 2 Motivation Up to this point, we’ve talked about point-to-point communication. We may 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.

3 3 Motivation(cont’d) Traditionally, LAN is considered a broadcast network, while WAN is considered a switched network. After ATM, a cell switching network, is introduced to connect LANs, the taxonomy cannot be used. To support LAN, data link layer is split into Medium Access (MAC) Sublayer and Logical Link Control (LLC) Sublayer.

4 4 Topics LAN protocol stack: general discussion on MAC and LLC MAC: Contention Protocols and Contention-Free Protocols Contention Protocols: ALOHA (pure ALOHA and slotted ALOHA), CSMA(p-persistent), CSMA- CD Contention-Free Protocols: reversation systems, polling, Token-Ring (next set of lecture slides)

5 5 Multiple Access vs. Point-to- Point Multiple hosts are involved Sharing communication media –channelization schemes or contention free protocols : static and collision-free –MAC schemes or contention protocols

6 Copyright 2000 McGraw-Hill Leon- Garcia and Widjaja Communication Networks 6 1 2 3 4 5 M Shared Multiple Access Medium  Figure 6.1

7 Copyright 2000 McGraw-Hill Leon- Garcia and Widjaja Communication Networks 7 Medium Sharing Techniques Static Channelization Dynamic Medium Access Control Scheduling Random Access Figure 6.2

8 8 Medium Access Satellite communications Multidrop telephone line Ring network: token ring, or FDDI Multidrop bus: Ethernet or token bus Wireless LAN

9 Copyright 2000 McGraw-Hill Leon- Garcia and Widjaja Communication Networks 9 Satellite Channel = f in = f out Figure 6.3

10 Copyright 2000 McGraw-Hill Leon- Garcia and Widjaja Communication Networks 10 Multidrop telephone lines Inbound line Outbound line Figure 6.4

11 Copyright 2000 McGraw-Hill Leon- Garcia and Widjaja Communication Networks 11 Ring networks Multitapped Bus Figure 6.5

12 Copyright 2000 McGraw-Hill Leon- Garcia and Widjaja Communication Networks 12 Figure 6.6

13 13 Delay-Bandwidth Product What happens when a collision occurs? What effect will delaying have on efficiency? How long will a station need to detect collision after a transmission?

14 Copyright 2000 McGraw-Hill Leon- Garcia and Widjaja Communication Networks 14 A transmits at t = 0 Distance d meters t prop = d / seconds AB B transmits before t = t prop and detects collision shortly thereafter AB A B A detects collision at t = 2 t prop Figure 6.7

15 Copyright 2000 McGraw-Hill Leon- Garcia and Widjaja Communication Networks 15 Transfer Delay Load E[T]/E[X]   ma x 1 1 Figure 6.8

16 Copyright 2000 McGraw-Hill Leon- Garcia and Widjaja Communication Networks 16 Transfer Delay Load E[T]/E[X]   ma x 1 1 a a a > a Figure 6.9

17 17 LAN Structure NIC: Network Interface Card –handling medium access and addressing –each has a physical address of 48 bits (type ifconfig/all on a DOS Command Prompt) LLC Sublayer: IEEE 802.2 MAC Sublayer: IEEE 802.3(Ethernet), 802.4(Token Bus), 802.5(Token Ring), 802.11(Wireless), FDDI

18 Copyright 2000 McGraw-Hill Leon- Garcia and Widjaja Communication Networks 18 Data Link Layer 802.3 CSMA-CD 802.5 Token Ring 802.2 Logical Link Control Physical Layer MAC LLC 802.11 Wireless LAN Network Layer Physical Layer OSI IEEE 802 Various Physical Layers Other LANs Figure 6.11

19 Copyright 2000 McGraw-Hill Leon- Garcia and Widjaja Communication Networks 19 PHY MAC PHY MAC PHY MAC Unreliable Datagram Service Figure 6.12

20 Copyright 2000 McGraw-Hill Leon- Garcia and Widjaja Communication Networks 20 PHY MAC PHY MAC PHY MAC Reliable Packet Service LLC A C A C Figure 6.13

21 Copyright 2000 McGraw-Hill Leon- Garcia and Widjaja Communication Networks 21 (a) RAM ROM Ethernet Processor (b) Figure 6.10

22 22 802 Physical Layer Design Issues Encoding/decoding Preamble generation/removal Bit transmission/reception Transmission medium and topology

23 23 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)

24 24 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

25 25 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

26 26 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

27 27 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)

28 28 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

29 29 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

30 30 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.

31 Copyright 2000 McGraw-Hill Leon- Garcia and Widjaja Communication Networks 31 (a) (b) transceivers Figure 6.55

32 32 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

33 33 Hub and Switch An Ethernet hub is a repeater. An Ethernet switch is a bridge.

34 Copyright 2000 McGraw-Hill Leon- Garcia and Widjaja Communication Networks 34 (a) (b) High-Speed Backplane or Interconnection fabric Single collision domain Figure 6.56

35 Copyright 2000 McGraw-Hill Leon- Garcia and Widjaja Communication Networks 35 Ethernet Switch Server 100 Mbps links 10 Mbps links Figure 6.57

36 Copyright 2000 McGraw-Hill Leon- Garcia and Widjaja Communication Networks 36 Destination SAP Address Source SAP Address Information 1 byte 1 Control 1 or 2 Destination SAP Address Source SAP Address I/G 7 bits1 C/R 7 bits 1 I/G = Individual or group addressC/R = Command or response frame Figure 6.14

37 Copyright 2000 McGraw-Hill Leon- Garcia and Widjaja Communication Networks 37 LLC Header IP Data MAC Header FCS LLC PDU IP Packet Figure 6.15

38 Copyright 2000 McGraw-Hill Leon- Garcia and Widjaja Communication Networks 38 Preamble SD Destination Address Source Address Type Information Pad FCS 7 12 or 6 24 64 to 1518 bytes Synch Start frame Ethernet Frame Figure 6.53

39 Copyright 2000 McGraw-Hill Leon- Garcia and Widjaja Communication Networks 39 Preamble SD Destination Address Source Address Length Information Pad FCS 7 12 or 6 24 64 to 1518 bytes Synch Start frame 0 Single address 1 Group address Destination address is either single address or group address (broadcast = 111...111) Addresses are defined on local or universal basis 2 46 possible global addresses 0 Local address 1 Global address 802.3 MAC Frame Figure 6.52

40 Copyright 2000 McGraw-Hill Leon- Garcia and Widjaja Communication Networks 40 AA AA 03 Information MAC Header FCS 802.3 Frame LLC PDU SNAP Header Type ORG SNAP PDU 3 2 111 Figure 6.54

41 41 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 6.3)

42 42 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.

43 43 Contention Protocols Pure ALOHA Slotted ALOHA Carrier Sense Multiple Access (CSMA) Persistent and non-persistent CSMA CSMA with Collision Detection (CSMA/CD)

44 44 Collision-Free Protocols A Bit-Map Protocol: reservation protocol Polling Token Passing Ring

45 45 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)

46 46 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?)

47 Copyright 2000 McGraw-Hill Leon- Garcia and Widjaja Communication Networks 47 t t0t0 t 0 -X t 0 +X t 0 +X+2t prop t 0 +X+2t prop  Vulnerable period Time-out Backoff period Retransmission if necessary First transmission Retransmission Figure 6.16

48 Copyright 2000 McGraw-Hill Leon- Garcia and Widjaja Communication Networks 48 Ge -G Ge -2G G S 0.184 0.368 Figure 6.17

49 49 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) for Poisson distribution. (e = 2.7818…)

50 50 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. So P 0 = Pr[no frames are generated in 2 time slots] = e -G * e –G = e –2G

51 51 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%

52 52 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?)

53 Copyright 2000 McGraw-Hill Leon- Garcia and Widjaja Communication Networks 53 t (k+1)X kX t 0 +X+2t prop  t 0 +X+2t prop Figure 6.18 Vulnerable period Time-out Backoff period Retransmission if necessary

54 54 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. So P 0 = Pr[no frames are generated in one time slots] = e -G

55 55 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%

56 56 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

57 57 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)

58 58 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.

59 59 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.

60 60 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.

61 61 P-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.

62 62 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. Smaller values of p => fewer collision.

63 Copyright 2000 McGraw-Hill Leon- Garcia and Widjaja Communication Networks 63 A Station A begins transmission at t=0 A Station A captures channel at t=t prop Figure 6.19

64 Copyright 2000 McGraw-Hill Leon- Garcia and Widjaja Communication Networks 64 sensing Figure 6.20

65 Copyright 2000 McGraw-Hill Leon- Garcia and Widjaja Communication Networks 65 Non-Persistent CSMA 0.81 0.51 0.14 S G 0.01 0.1 1 Figure 6.21 - Part 1

66 Copyright 2000 McGraw-Hill Leon- Garcia and Widjaja Communication Networks 66 1-Persistent CSMA 0.53 0.45 0.16 S G 0.01 0.1 1 Figure 6.21 - Part 2

67 67 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?

68 68 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.

69 69 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

70 70 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

71 71 CSMA/CD Operation

72 Copyright 2000 McGraw-Hill Leon- Garcia and Widjaja Communication Networks 72 A begins to transmit at t=0 A B B begins to transmit at t= t prop -  B detects collision at t= t prop A B A B A detects collision at t= 2 t prop -  It takes 2 t prop to find out if channel has been captured Figure 6.22

73 73 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, 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.

74 74 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.

75 75 Efficiency of 802.3(p.363) P: the probability that a frame is sent without a collision P s: the probability that a station sends The probability of a collision = 1 – P. The probability of a transmission requiring exactly N attempts = = N-1 collisions followed by a success = N * P s * ( 1- P s ) N - 1

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

77 77 Efficiency of 802.3 The probability of a transmission requiring exactly N attempts =P = N * P s * ( 1- P s ) N – 1 dP/dP s = N(1-P s ) N-1 + N P s (N-1)(1-P s ) N-2 = N (1-P s ) N-2 [1- P s – P s (N –1) ] Let dP/dP s = 0 => P s = 1/N

78 78 Efficiency of 802.3 How many time slots has passed before a frame is sent successfully?

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

80 80 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

81 81 The Efficiency of 802.3 The contention period = = (1-p)/p

82 82 The Efficiency of 802.3 The contention period (C) = (1/p) –1 0 <= p <= 1 (p: the successful rate) If p -> 1 C -> 0 If p -> 0, C = large We’ve found that when P s =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).

83 Copyright 2000 McGraw-Hill Leon- Garcia and Widjaja Communication Networks 83 Probability of 1 successful transmission: framecontentionframe P success is maximized at p=1/n: n P max Figure 6.23

84 84 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.

85 85 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 rate F = number of bits in a frame T = slot time So U =

86 Copyright 2000 McGraw-Hill Leon- Garcia and Widjaja Communication Networks 86  E[T] M=16 M=8 M=4 M=2 M=1 Figure 6.50

87 Copyright 2000 McGraw-Hill Leon- Garcia and Widjaja Communication Networks 87 a = 0.01 a = 0.1 a = 0.2 Figure 6.51

88 Copyright 2000 McGraw-Hill Leon- Garcia and Widjaja Communication Networks 88 Aloh a Slotted Aloha 1-P CSMA Non-P CSMA CSMA/CD a  max Figure 6.24

89 89 Contention Free Protocols * Reservation Systems * Polling * Token Passing Ring

90 Copyright 2000 McGraw-Hill Leon- Garcia and Widjaja Communication Networks 90 time 1 frame Reservation interval Data Transmissions rd d d rd d d 1 frame r= 1 2 3M Each station has own minislot for making reservations Figure 6.25

91 Copyright 2000 McGraw-Hill Leon- Garcia and Widjaja Communication Networks 91 t r 3 5r 3 5 r35 8 r35 8 r3 (a) Negligible Propagation Delay t r 3 5r 3 5 r35 8 r35 8 r3 8 Non-Negligible Propagation Delay (b) Figure 6.26

92 Copyright 2000 McGraw-Hill Leon- Garcia and Widjaja Communication Networks 92 Shared inbound line Outbound line Central Controller (a) (b) (c) Central Controller Figure 6.27

93 93 Required Reading Section 6.1, 6.2, 6.3, 6.4.1, 6.4.2, 6.6.1


Download ppt "CSC581 Communication Networks II Chapter 6a: Local Area Network (Ethernet - 802.3) Dr. Cheer-Sun Yang."

Similar presentations


Ads by Google