Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Scheduling approaches to MAC About random access: –Simple and easy to implement –In low-traffic, packet transfer has low-delay –However, limited throughput.

Similar presentations


Presentation on theme: "1 Scheduling approaches to MAC About random access: –Simple and easy to implement –In low-traffic, packet transfer has low-delay –However, limited throughput."— Presentation transcript:

1 1 Scheduling approaches to MAC About random access: –Simple and easy to implement –In low-traffic, packet transfer has low-delay –However, limited throughput and in heavier traffic, packet delay has no bound. A station of bad luck may never have a chance to transfer its packet. Scheduling approach: – provides orderly access to shared medium so that every station has chance to transfer

2 2 Scheduling approach—reservation protocol The time line has two kinds of periods: –Reservation interval of fixed time length –Data transmission period of variable frames. Suppose there are M stations, then the reservation interval has M minislots, and each station has one minislot. Whenever a station wants to transfer a frame, it waits for reservation interval and broadcasts reservation bit in its minislot. By listening to the reservation interval, every station knows which stations will transfer frames, and in which order. The stations having reserved for their frame transfer their frames in that order After data transmission period, next reservation interval begins.

3 3 Reservation protocol Reservation interval Frames-transmission

4 4 Scheduling approach—polling protocol Stations take turns accessing the medium: –At any time, only one station has access right to transfer into medium –After this station has done its transmission, the access right is handed over (by some mechanism) to the next station. –If the next station has frame to transfer, it transfers the frame, otherwise, the access right is handed over to the next next station. –After all stations are polled, next round polling from the station 1 begins.

5 5 Centralized polling vs. distributed polling Centralized polling: a center host which polls the stations one by one Distributed polling: station 1 will have the access right first, then station 1 passes the access right to the next station, which will passes the access right to the next next station, …

6 6 t polling messages packet transmissions … M Figure 6.28 Interaction of polling messages and transmissions in polling systems

7 7 Figure 6.30 Token-passing rings – a distributed polling network Station interfaces: are connected to form a ring by point-to-point lines Stations: are attached to the ring by station interfaces. Note: point-to-point lines, not a shared bus. Station interfaces have important functions. Token: a small frame, runs around the ring, whichever gets the token, it has the right to transmit data frames. The information flows in one direction. token

8 8 listen mode 1 bit delay transmit mode delay to station from station input from ring output to ring Figure 6.30 Token-passing rings – a distributed polling system Two modes of interface: 1. Listen mode, like a repeater but with some delay, because every arriving bit will be copied into a 1-bit buffer and then copied out. While in the buffer, the bit can be monitored, i.e., inspected and even modified. Therefore, 1-bit delay 2. Transmit mode: transmit frames from its attached station When monitoring, if it finds the passing bits are a data frame with its attached station as destination, then it catches the frame, i.e., copy the bits into its station (may refrain from outputting them). If it finds the passing bits are free token, then if the station has information to send, it will change the token to busy (set one bit to 1) and change to transmit mode. to stationfrom station

9 9 Removing a frame A transmitted frame needs to be removed (absorbed). Who removes it? Choice one: destination station Choice two: transmitting station itself. Choice two is preferred because the destination can insert ACK into the frame and transmitter will get the ACK from its own transmitted frame.

10 10 d d d d d d d d d d d d d d d a)b)c) Busy token Free token Figure 6.31 Approaches to token reinsertion: a). multitoken, b). single token, c)single packet a ). The free token is inserted immediately after the last bit of data frame is sent b). Insert the free token after the last bit of busy token is received c). Insert the free token after the last bit of data frame is received. Generally: when a station seizes the token, it can only transmit limited number of frames or limited time interval to avoid occupying too long.

11 11 Comparison of scheduling & random access Scheduling –Methodical orderly access: dynamic form of time division multiplexing, round-robin (only) when the stations have information to send. –Less variability in delay, supporting applications with stringent delay requirement. In high load, performance is good. E.g., token-ring may reach nearly 100 percent of performance when all stations have plenty of information to send. –Some channel bandwidth carries explicit scheduling information Random access –Chaotic, unordered access –If rich bandwidth and light load, random access has low delay, otherwise, delay is undeterminably large. –Quite a lot bandwidth is used in collision to alert stations of the presence of other transmissions.

12 12 Channelization Suppose M stations generate steady flow of information Divide shared medium into M channels so that each station is allocated one channel Four channelization mechanisms: –FDMA –TDMA –WDMA –CDMA

13 13 A1A1 A2A2 B1B1 B2B2 C2C2 C1C1 A2A2 B1B1 B2B2 C2C2 C1C1 (a) (b) A1A1 Shared Line Dedicated Lines Figure 5.43 Time-Division Multiplexing (TDM)

14 MUX b1 2...b frame Figure 4.4 T-1 carrier system uses TDM to carry 24 digital signals in telephone system

15 15 A C B f C f B f A f W W W (a) Individual signals occupy W Hz (b) Combined signal fits into channel bandwidth Figure 4.2 Frequency-Division Multiplexing (FDM)

16 16 MUX deMUX 1, 2, n Figure n Optical fiber 1 2 n Wavelength-division multiplexing (WDM)

17 17 CDMA (Code-division multiple access) Transmissions from different stations occupy entire frequency band at the same time Different codes are used to separate different transmissions A code is a unique binary pseudorandom sequence (such as c 1,c 2,…,c G ) (each c i is a +1 or –1 signal) A binary bit b (i.e., +1 signal) is spread by multiplying it with the code at the sender (which is a sequence of binary information) At the receiver, the received binary string is multiplied by the same code to get back original bit.

18 18 CDMA (cont.) Since: –b  (c 1 +c 2 +…+c G ) at the sender –The received information is multiplied by c 1,c 2,…,c G to get b  (c 1 2 +c 2 2 +…+c G 2 ) = b  1=b. –Due to each c i 2 =1 no matter c i =1 or –1 –So the receiver gets back b. However, if a different code d 1,d 2,…,d G is used: –The multiplication will be c 1  d 1 +c 2  d 2 +…+c G  d G –Since c i and d i are independent, there will be equal number of +1 and –1, so the result will be 0, –Thus the b can not be obtained.

19 19 CDMA (cont.) In order for different codes are randomized, the sequence length G must be long enough. G is called spreading factor. Using LSFR (Left-Shift-Feedback- Register).

20 20 Channelization: CDMA Code Division Multiple Access –Channels determined by a code used in modulation and demodulation Stations transmit over entire frequency band all of the time! Time W Frequency 1 2 3

21 21  Binary information R 1 bps W 1 Hz Unique user binary random sequence Digital modulation Radio antenna Transmitter from one user R >> R 1 bps W >> W 1 Hz  CDMA Spread Spectrum Signal User information mapped into: +1 or -1 for T sec. Multiply user information by pseudo- random binary pattern of G “chips” of +1’s and -1’s Resulting spread spectrum signal occupies G times more bandwidth: W = GW 1 Modulate the spread signal by sinusoid at appropriate f c

22 22 Signal and residual interference Correlate to user binary random sequence Signals from all transmitters Digital demodulation Binary information  CDMA Demodulation Recover spread spectrum signal Synchronize to and multiply spread signal by same pseudo-random binary pattern used at the transmitter In absence of other transmitters & noise, we should recover the original +1 or -1 of user information Other transmitters using different codes appear as residual noise

23 23 R0R0 R1R1 R2R2 g(x) = x 3 + x g0g0 g2g2 g3g3 The coefficients of a primitive generator polynomial determine the feedback taps TimeR 0 R 1 R Sequence repeats from here onwards output Pseudorandom pattern generator Feedback shift register with appropriate feedback taps can be used to generate pseudorandom sequence

24 24 Channelization in Code Space Each channel uses a different pseudorandom code Codes should have low cross-correlation –If they differ in approximately half the bits the correlation between codes is close to zero and the effect at the output of each other’s receiver is small As number of users increases, effect of other users on a given receiver increases as additive noise CDMA has gradual increase in BER due to noise as number of users is increased Interference between channels can be eliminated if codes are selected so they are orthogonal and if receivers and transmitters are synchronized –Shown in next example

25 25 Example: CDMA with 3 users Assume three users share same medium Users are synchronized & use different 4-bit orthogonal codes: {-1,-1,-1,-1}, {-1, +1,-1,+1}, {-1,-1,+1,+1}, {-1,+1,+1,-1}, +1+1 User 1 x +1 User 2 x User 3 x +1 Shared Medium + Receiver

26 26 Channel 1: 110 -> > (-1,-1,-1,-1),(-1,-1,-1,-1),(+1,+1,+1,+1) Channel 2: 010 -> > (+1,-1,+1,-1),(-1,+1,-1,+1),(+1,-1,+1,-1) Channel 3: 001 -> > (+1,+1,-1,-1),(+1,+1,-1,-1),(-1,-1,+1,+1) Sum Signal: (+1,-1,-1,-3),(-1,+1,-3,-1),(+1,-1,+3,+1) Channel 1 Channel 2 Channel 3 Sum Signal Sum signal is input to receiver

27 27 Example: Receiver for Station 2 Each receiver takes sum signal and integrates by code sequence of desired transmitter Integrate over T seconds to smooth out noise x Shared Medium + Decoding signal from station 2 Integrate over T sec

28 28 Sum Signal: (+1,-1,-1,-3),(-1,+1,-3,-1),(+1,-1,+3,+1) Channel 2 Sequence: (-1,+1,-1,+1),(-1,+1,-1,+1),(-1,+1,-1,+1) Correlator Output: (-1,-1,+1,-3),(+1,+1,+3,-1),(-1,-1,-3,+1) Integrated Output: -4, +4, -4 Binary Output: 0, 1, 0 Sum Signal Channel 2 Sequence Correlator Output Integrator Output Decoding at Receiver 2 X =

29 29 W1=W1=0 W2=W2= W4=W4= W8=W8= Walsh Functions Walsh functions are provide orthogonal code sequences by mapping 0 to -1 and 1 to +1: each row is a code, rows are orthogonal. Walsh matrices constructed recursively as follows: W 2n = W n W n W n c

30 30 LAN bridges Repeater: used to connect two or more networks at physical layer Bridge: used to connected two or more networks at data link or MAC layer Router: used to connect two or more networks at network layer Gateway: connect two or more networks at higher layers.

31 31 LAN bridges’ functions Bridges are generally used to connect LANs by –Extending a LAN which reach saturation, called bridged/extended LAN –Connect different departments’ LANs, these LANs Use different network layer protocols, bridges are fine because bridges operate at data link layer which supports different network layer protocols Located in different building, bridges are fine because bridges can be connected by point-to-point link Are different LANs: bridges need to have ability to convert between different frame format –Security is big problem in LAN, why? So bridges need to have some ability of dealing with security issue such as filtering frames, controlling flow of frames in and out. –Bridge is better than repeater when connect two exact same LANs because bridge has the ability to reduce traffic by confining local traffic. –Bridge will monitor MAC address of frames so it can not be in physical layer –Bridge have no routing ability so it is not in network layer.

32 32 Bridge Network Physical Network LLC Physical LLC MAC Figure 6.80 Bridges generally connect the same types of LANs, so they generally operate at MAC layer. Interconnection by a bridge

33 33 Figure 6.79 A bridged LAN Port #1 Port #2

34 34 Three type bridges Transparent bridges: means that stations are completely unaware of the presence of bridges. Used in Ethernet LANs. No burden in stations, bridges take care of all connection related functions. Source routing bridge: used in token-ring and FDDI LANs. Burden on stations. Source station needs to give route to the destination. Bridges just forward frames based on the route in the frame. Mixed-media bridges: used to interconnect LANs of different types. These bridges have abilities of converting between LANs.

35 35 Transparent bridges Three basic functions: –Forwards frames from one LAN to another –Learns where stations are attached to the LAN –Prevents loops in the topology A transparent bridge is configured in “promiscuous” mode

36 36 Forwarding and forwarding table of bridges MAC addressPort 1.Port is a physical interface, a bridge have two or more ports 2.For every station in bridged LAN, the port number indicates which part (direction) of the bridge this station is attached to. 3.When a frame comes to a bridge, the bridge will forward to the port corresponding to the MAC address in the table, which is the destination physical address in the frame. 4. Question: how to establish forwarding table? Manually set up by administrator. Good? No, automatically set up by self learning

37 37 Bridge learning When a bridge receives a frame, it searches through the forwarding table: 1. For source address, if not found, adds source address along coming port # into table 2. For destination address, if found, forwards the frame to the corresponding port, except the corresponding port # being same as the coming port # 3. otherwise (not found), floods the frame to all ports except the coming port

38 38 Bridge1 S1S2 Bridge 2 S3S4 S5 Address Port port 1port 2port 1port 2 LAN1LAN2LAN3 S11 1 S32 1 S42 2 S21 Figure S1->S52.S3->S23.S4->S3 4.S2->S1 Any problem with it?

39 39 LAN topology is dynamic Life is never static in real world. The bridged LAN change constantly. Add station:Easy, learn again. Move station: When find same MAC address, but coming from a different port, update the port number. Remove station: Timer, associate every entry (a station) in forwarding table a timer, when timer times out, remove the entry from the table. Moreover, when receiving a frame with a source MAC address, if its entry is already in the table, then refresh the timer. Any more problem?

40 40 Bridge1 S1S2 Bridge 2 S3S4 S5 port 1port 2port 1port 2 LAN1LAN2LAN3 Figure 6.85 S1->S5 Bridge3 Loop in the topology will cause flooding forever

41 41 Spanning tree to break loop Main idea: maintain a spanning tree to include all stations but disable some ports automatically. Thus, remove loop. Assumptions: unique LAN IDs, unique bridge IDs, and unique port IDs. The lowest ID is used to break a tie.

42 42 Steps of spanning tree 1.Select a root bridge which is the bridge with the lowest bridge ID. 2.For each bridge except the root bridge, determine the root port which is the port with least-cost path (& lowest ID) to root bridge. 3.For each LAN, select a designated bridge, which is the bridge offering the least-cost path (& lowest ID) from the LAN to root bridge. The port connecting the LAN and the designated bridge is called a designate port. 4.All root ports and designated ports are put into forwarding table. These are only ports that are allowed to forward frames. The other ports are placed into a “blocking” state.

43 43 (1) (2) (3) Figure 6.86

44 44 Figure 6.87

45 45 Source routing bridges Putting burden on end stations, bridges are mainly responsible for forwarding. Each station determines the route to the destination and put the routing information in the header of the frame. Source routing information is inserted only when source and destination are in different LANs and is indicated by I/G bit in source address.

46 46 Routing Control Route Designator-1 Route Designator-2 Route Designator-m Destination Address Source Address Routing Information Data FCS 2 bytes Figure 6.88 Frame format for source routing 1.Control field contains type of frame, routing information and length of it. 2. Designator contains a 12-bit LAN number and a 4-bit bridge number 3. The highest bit in source address indicates whether it is source routing. Question: how to find the route in the first place?

47 47 Route discovery in source routing Source broadcasts a single-route broadcast frame with no route designator, which will arrive the destination eventually -Spanning tree algorithm may be used to confine flooding. Whenever a bridge gets the frame, it inserts its number and out-going LANs number into the frame and forwards to the out-going LAN. (The first bridge also inserts its in-coming LAN number into it). When the destination gets the frame, it replies with a broadcast of “all- route broadcast” frame with no route designator.. The bridges inserts its ID and out-going LAN number and forwards to the out-going LAN (only for this LAN whose number was not recorded in the frame to prevent loop yet). The source will get returned frames with all possible routes, so source can select best one (maybe cache it)

48 48 Figure 6.89 Interconnection with source routing bridges * * * * Suppose B1, B3, B4,B6 are part of spanning tree Assume that S1 wants to send a frame to S3

49 49 LAN1B1 B3 B4 LAN3B6LAN5 LAN4 Figure 6.90 Routes followed by single-route broadcast frames LAN2

50 50 LAN5 B6 B7 LAN3 LAN4 B2 B3 B5 LAN1 B1LAN2 B3 B4 LAN4 B5 B7 LAN2 B1 B4 LAN1 B2 LAN4 B5 B7 LAN4 B4 B7 LAN2 B1 B3 LAN1 B2 B4 B5 LAN2 B1 B3 LAN3 B2 B5 B6 LAN1 B1 LAN1 B2LAN3 B3 B5 B6 LAN3 B3 B2 B6 LAN1 LAN2 B1LAN2 B3 B4 B1 B4 LAN1 B2 Figure 6.91 Routes followed by all-routes broadcast frames

51 51 Mixed-media bridges Such as connect Ethernet and token-ring networks Convert between two address representations Ethernet has maximum size of 1500 bytes but token- ring has no explicit limit. Drop frame if it is too long because bridges do not do segmentation Token-ring has three status bits A, C and E, but no these bits in Ethernet, so no conversion for them Different transmission rate, so bridges need buffer to store extra frame temporarily.

52 52 IEEE LAN standards LLC CSMA-CD (I.e., Ethernet) –Frame length 64 –1518 (or client data: 46— 1500) token-bus token-ring –FDDI (Fiber Distributed Data Interface) wireless networks

53 53 Ethernet --history 1970s, Robert Metcalfe etc. Xerox, connecting workstations 1980s, DEC, Intel, Xerox, “DIX” Ethernet standard 10Mpbs The basis for IEEE standard, “thick” coaxial cable in and “DIX” Ethernet differ in one header field definition. Expended to “thin” coaxial, twisted-pair, optical fiber. 1995: 100Mbps, 1998: 1Gbps, 2002: 10Gbps.

54 54 Ethernet -- basis Bus based coaxial cable CDMA-CD with 1-persistent Minislot time: two propagation delays 10Mbps, 2500 meters, 4 repeaters (Truncated) binary exponential backoff algorithm Three periods and performance

55 55 Ethernet --backoff (Truncated) binary exponential backoff algorithm –Whenever collision, wait for B minislots –B is determined as followed: After 1th collision, B is selected from 0 to 1 After 2th collision, B is selected from 0 to 3 After 3th collision, B is selected from 0 to 7 … After nth collision, B is selected from 0 to –2 n -1 if n<10 and if n<=16, otherwise, give up.

56 56 Ethernet--performance Three periods: idle, contention, transmission During saturation, no idle period –A L/R transmission period –A t prop period for finding the end of transmission –A contention period of B minislots, in average B=e=2.71. So performance is: – (L/R)/(L/R+ t prop +2e t prop )=1/(1+(1+2e) t prop R/L)= –1/(1+(1+2e)a)=1/(1+6.44a), where a= t prop R/L.

57 57 Ethernet--performance Why B=e in average? Suppose n stations and each station transmits during a contention period with probability p, –The probability that one station transmits successfully is P success =np(1-p) n-1. –For maximum throughput, p should be selected to maximize P success, i.e., p=1/n. –So P success max =n(1/n)(1-1/n) n-1 =(1-1/n) n-1  1/e. Since probability of success in one minislot is P success max, the average number of minislots that elapse until a station captures the channel is –1/ P success max =e.

58 58 IEEE MAC Frame Preamble SD Destination address Source address Length Information Pad FCS bytes SynchStart frame MAC Frame Every frame transmission begins “from scratch” Preamble helps receivers synchronize their clocks to transmitter clock 7 bytes of generate a square wave Start frame byte changes to Receivers look for change in 10 pattern

59 59 IEEE MAC Frame Preamble SD Destination address Source address Length Information Pad FCS bytes SynchStart frame 0 Single address 1 Group address Destination address single address group address broadcast = Addresses local or global Global addresses first 24 bits assigned to manufacturer; next 24 bits assigned by manufacturer Cisco C 3COM C 0 Local address 1 Global address MAC Frame

60 60 IEEE MAC Frame Preamble SD Destination address Source address Length Information Pad FCS bytes SynchStart frame MAC Frame Length: # bytes in information field Max frame 1518 bytes, excluding preamble & SD Max information 1500 bytes: 05DC Pad: ensures min frame of 64 bytes FCS: CCITT-32 CRC, covers addresses, length, information, pad fields NIC discards frames with improper lengths or failed CRC

61 61 DIX Ethernet II Frame Structure DIX: Digital, Intel, Xerox joint Ethernet specification Type Field: to identify protocol of PDU in information field, e.g. IP, ARP Framing: How does receiver know frame length? –physical layer signal, byte count, FCS Preamble SD Destination address Source address Type InformationFCS bytes SynchStart frame Ethernet frame

62 62 IEEE Physical Layer (a) transceivers (b) 10base510base210baseT10baseFX MediumThick coaxThin coaxTwisted pairOptical fiber Max. Segment Length500 m200 m100 m2 km TopologyBus Star Point-to- point link Table 6.2 IEEE Mbps medium alternatives Thick Coax: Stiff, hard to work with T connectors flaky Hubs & Switches!

63 63 Ethernet Hubs & Switches (a) Single collision domain (b) High-Speed backplane or interconnection fabric Twisted Pair Cheap Easy to work with Reliable Star-topology CSMA-CD Twisted Pair Cheap Bridging increases scalability Separate collision domains Full duplex operation

64 64 a =.01 a =.1 a =.2 Ethernet Scalability CSMA-CD maximum throughput depends on normalized delay- bandwidth product a=t prop /X=t prop R/L x10 increase in bit rate = x10 decrease in X To keep a constant need to either: decrease t prop (distance) by x10; or increase frame length x10

65 65 Fast Ethernet IEEE 802.3u 100Mbps CSMA-CD is sensitive to a, since rate increases 10 times, to keep same performance with Ethernet, ??? Either increase the frame size 10 times (to 640 bytes) or reduce maximum Distance 10 times (250 meters). The final decision is to keep the frame size and procedure unchanged but To define a set of physical layers based on hub (start) topology involving Twisted-pair and optical fiber.

66 66 Fast Ethernet Two modes: –All incoming lines are logically connected to a single collision domain and CSMA-CD is used –Incoming frames are buffered and then switched internally within the hub, CSMA-CD is not used but use multiplexing and switching. Fast Ethernet is deployed in departmental networks –Aggregate traffic from shared 10Mbps LANs –Provide greater bandwidth to a server –Provide greater bandwidth to certain users.

67 67 Gigabit Ethernet 802.3z, 1998, 1Gbps. Frame size extended to 512 bytes. Moreover frame bursting: a burst of small frames. Preserve the frame structure but operate primarily in a switched mode.

68 68 Fast Ethernet 100baseT4100baseT100baseFX Medium Twisted pair category 3 UTP 4 pairs Twisted pair category 5 UTP two pairs Optical fiber multimode Two strands Max. Segment Length 100 m 2 km TopologyStar Table 6.4 IEEE Mbps Ethernet medium alternatives To preserve compatibility with 10 Mbps Ethernet: Same frame format, same interfaces, same protocols Hub topology only with twisted pair & fiber Bus topology & coaxial cable abandoned Category 3 twisted pair (ordinary telephone grade) requires 4 pairs Category 5 twisted pair requires 2 pairs (most popular) Most prevalent LAN today

69 69 Gigabit Ethernet Table 6.3 IEEE Gbps Fast Ethernet medium alternatives 1000baseSX1000baseLX1000baseCX1000baseT Medium Optical fiber multimode Two strands Optical fiber single mode Two strands Shielded copper cable Twisted pair category 5 UTP Max. Segment Length 550 m5 km25 m100 m TopologyStar Slot time increased to 512 bytes Small frames need to be extended to 512 B Frame bursting to allow stations to transmit burst of short frames Frame structure preserved but CSMA-CD essentially abandoned Extensive deployment in backbone of enterprise data networks and in server farms

70 70 10 Gigabit Ethernet Table 6.5 IEEE Gbps Ethernet medium alternatives 10GbaseSR10GBaseLR10GbaseEW10GbaseLX4 Medium Two optical fibers Multimode at 850 nm 64B66B code Two optical fibers Single-mode at 1310 nm 64B66B Two optical fibers Single-mode at 1550 nm SONET compatibility Two optical fibers multimode/single- mode with four wavelengths at 1310 nm band 8B10B code Max. Segment Length 300 m10 km40 km300 m – 10 km Frame structure preserved CSMA-CD protocol officially abandoned LAN PHY for local network applications WAN PHY for wide area interconnection using SONET OC- 192c Extensive deployment in metro networks anticipated

71 71 Typical Ethernet Deployment

72 72 IEEE Ring LAN Unidirectional ring network 4 Mbps and 16 Mbps on twisted pair –Differential Manchester line coding Token passing protocol provides access Fairness Access priorities  Breaks in ring bring entire network down Reliability by using star topology

73 73 Star Topology Ring LAN Stations connected in star fashion to wiring closet –Use existing telephone wiring Ring implemented inside equipment box Relays can bypass failed links or stations

74 74 Token frame format SDFCAC Destination address Source address InformationFCS 14 ED FS 1 Data frame format Token Frame Format SDACED P P PT M R R R Access control PPP=priority; T=token bit M=monitor bit; RRR=reservation T=0 token; T=1 data Starting delimiter J, K nondata symbols (line code) J begins as “0” but no transition K begins as “1” but no transition 00 J K 0 Ending delimiter I = intermediate-frame bit E = error-detection bit IE J K 1

75 75 Frame control FF = frame type; FF=01 data frame FF=00 MAC control frame ZZZZZZ type of MAC control F Z Z Z Frame status A = address-recognized bit xx = undefined C = frame-copied bit ACx AC SDFCAC Destination address Source address InformationFCS 14 ED FS 1 Data frame format Data Frame Format Addressing 48 bit format as in Information Length limited by allowable token holding time FCS CCITT-32 CRC

76 76 Other Ring Functions Priority Operation –PPP provides 8 levels of priority –Stations wait for token of equal or lower priority –Use RRR bits to “bid up” priority of next token Ring Maintenance –Sending station must remove its frames –Error conditions Orphan frames, disappeared token, frame corruption Active monitor: a station responsible for error corrections. –MAC control frames and protocol are needed. Beacon frames for detecting neighbors and broken links. Election protocol.

77 77 Ring Latency & Ring Reinsertion M stations b bit delay at each station –b=2.5 bits (using Manchester coding) Ring Latency: –  ’ = d/ + Mb/R seconds –  ’R = dR/ + Mb bits Example –Case 1: R=4 Mbps, M=20, 100 meter separation Latency = 20x100x4x10 6 /(2x10 8 )+20x2.5=90 bits –Case 2: R=16 Mbps, M=80 Latency = 840 bits

78 A A A A A A A t = 0, A begins frame t = 90, return of first bit t = 400, transmission of last bit A t = 490, last bit received, reinsert token t = 0, A begins frame t = 400, transmit last bit t = 840, arrival first frame bit t = 1240, last bit received, reinsert token (b) High Latency (840 bit) Ring (a) Low Latency (90 bit) Ring Efficiency=400/490=82% Efficiency=400/1240=32% results in low efficiency. Reinsert token after frame return (400: frame length)

79 A A A A A A A t = 0, A begins frame t = 90, return of first bit t = 210, return of header A t = 400, last bit enters ring, reinsert token t = 0, A begins frame t = 400, transmit last bit t = 840, arrival first frame bit t = 960, last bit of header received, reinsert token (b) High Latency (840 bit) Ring (a) Low Latency (90 bit) Ring (suppose header=120 bits) Efficiency=400/400=100% Efficiency=400/960=42% Reinsert token immediately after completion of frame transmission: no idle period, 100%.

80 80 Fiber Distributed Data Interface (FDDI) Token ring protocol for LAN/MAN Counter-rotating dual ring topology 100 Mbps on optical fiber Up to 200 km diameter, up to 500 stations Station has 10-bit “elastic” buffer to absorb timing differences between input & output Max frame 40,000 bits km gives ring latency of 105,000 bits FDDI has option to operate in multitoken mode

81 81 A E D C B X Dual ring becomes a single ring

82 82 SD Destination Address Source Address Information FCS 84 ED FC FS 1 PRE Preamble SDFC ED Token Frame Format PRE Frame control Data Frame Format CLFFZZZZ C = synch/asynch L = address length (16 or 48 bits) FF = LLC/MAC control/reserved frame type CLFFZZZZ = or denotes token frame FDDI Frame Format

83 83 Timed Token Operation Two traffic types –Synchronous –Asynchronous All stations in FDDI ring agree on target token rotation time (TTRT) Station i has S i max time to send synch traffic Token rotation time is less than 2*TTRT if –S 1 + S 2 + … + S M-1 + S M < TTRT –FDDI guarantees access delay to synch traffic Station Operation Maintain Token Rotation Timer (TRT): time since station last received token When token arrives, find Token Holding Time –THT = TTRT – TRT –THT > 0, station can send all synchronous traffic up to S i + THT-S i asynchronous traffic. –THT < 0, station can only send synchronous traffic up to S i As ring activity increases, TRT increases and asynch traffic throttled down


Download ppt "1 Scheduling approaches to MAC About random access: –Simple and easy to implement –In low-traffic, packet transfer has low-delay –However, limited throughput."

Similar presentations


Ads by Google