Olumfonoon Babol Computer networks course Chapter 4 Medium
Olum-fonoon Babol Computer networks course Chapter 4 Medium Access Control (MAC( Fall 2005 By: H. Veisi
Overview q In broadcast networks (Multi-access/random-access channels) ¥ The key issue is how to determine who gets to use the channel when there is competition for it. ¥ MAC=Protocol to determine who goes next on channel ¥ It’s important for LANs, WANs are point-to-point. q The Channel Allocation Problem: ¥ Static Channel Allocation in LANs and MANs Ø FDM and TDM ¥ Dynamic Channel Allocation in LANs and MANs Computer networking, Olum-Fonoon Babol H. Veisi Fall 2005 Page 2
Static channel allocation (1( q The traditional (phone) way of allocating a single channel is Frequency Division Multiplexing. FDM works fine for limited and fixed number of users. q Inefficient to divide into fixed number of chunks. May not all be used, or may need more. Doesn't handle burstly traffics of computer systems. q From queuing theory (Poisson distribution for C and T): ¥ T = mean time delay for a channel ¥ C = capacity (Bits/Sec. ) ¥ λ = arrival rate (Frames/Sec. ) ¥ 1/μ = mean length of a frame Computer networking, Olum-Fonoon Babol 1 T = -----m. C - l H. Veisi Fall 2005 Page 3
Static channel allocation (2( q Example: ¥ C=100 Mbps, 1/μ =10000 Bits, λ =500 Fps Ø T=200 Micro Sec. q If divide this channel into N sub-channels, each with capacity C/N. Input rate on each of the N channels is λ/N. So: 1 N T(FDM) = --------- = NT μ(C/N) - λ/N μC - λ ¥ N times worse for FDM Ø In example for N=10 => T=2 Mili Sec. q Same arguments can apply for TDM Computer networking, Olum-Fonoon Babol H. Veisi Fall 2005 Page 4
Dynamic channel allocation (1( q Assumptions (1): ¥ Station Model: Assumes that each of N "stations" (packet generators, Terminal) independently produce frames. The probability of producing a packet in the interval Δt is λ. Δt where λ is the constant arrival rate. That station generates no new frame until that previous one is transmitted. ¥ Single Channel Assumption: There's only one channel; all stations are equivalent and can send and receive on that channel. ¥ Collision Assumption: If two frames overlap in any way timewise, then that's a collision. Any collision is an error, and both frames must be retransmitted. Collisions are the only possible error. Computer networking, Olum-Fonoon Babol H. Veisi Fall 2005 Page 5
Dynamic channel allocation (2( q Assumptions (2): ¥ Continuous/ Slotted Time: There's no "big clock in the sky" governing transmission. Time is not in discrete chunks. Frame transmission can begin at any instant. Alternatively, in slotted, frame transmissions always begin at the start of a time slot. Any station can transmit in any slot (with a possible collision. ) ¥Carrier/No-Carrier Sense: Stations can tell a channel is busy before they try it. NOTE - this doesn't stop collisions. LANs have this, satellite networks don't. Computer networking, Olum-Fonoon Babol H. Veisi Fall 2005 Page 6
Multiple Access Protocols: ALOHA ¥Developed in Hawaii in the 1970 s. PURE ALOHA: ¥ Every station transmits whenever it wants to. ¥ Colliding frames are destroyed. The sender knows if its frame got destroyed using feedback property, and if so waits a random time and then retransmits. ¥ ANY overlap is a collision. ¥ Best efficiency if frames are same size. ¥ A contention system: Multiple users share a common channel that can lead to conflict. Computer networking, Olum-Fonoon Babol H. Veisi Fall 2005 Page 7
PURE ALOHA (2( q Pure ALOHA: frames are transmitted at completely arbitrary times. q What is the efficiency of ALOHA? Computer networking, Olum-Fonoon Babol H. Veisi Fall 2005 Page 8
PURE ALOHA (3( q Frame time: Time needed to transmit a standard, fixed-length frame = Frame length divided by bit-rate q N= Mean No. of frame per frame-time and infinite users ¥ if N>1: All frames suffer a collision ¥ if <0 N<1: Expected frame rate q G = Load= N + frames retransmitted due to previous collisions. q P 0 = Transmission succeeding = probability that a frame does NOT suffer collision. ¥ Throughput, S = P 0. G Computer networking, Olum-Fonoon Babol H. Veisi Fall 2005 Page 9
PURE ALOHA (4( q Vulnerable period for the shaded frame: Computer networking, Olum-Fonoon Babol H. Veisi Fall 2005 Page 10
PURE ALOHA (5( q Probability that k frames are generated during a given frame time (Poisson distribution): Pr[k] = G k. e-G -------k! q Probability of no traffic initiated during the vulnerable period: P 0 = e-2 G so: ¥ Throughput per frame time is: S = G. e-2 G q Max. channel utilization: G=0. 5, S=1/2 e=18% Computer networking, Olum-Fonoon Babol H. Veisi Fall 2005 Page 11
SLOTTED ALOHA q Slotted ALOHA: q Doubles efficiency by dividing time into discrete intervals. Sends occur only at the start of a slot time. Vulnerable period is 1/2 of pure Aloha case, so: S = G. e-G q Best throughput is at G = 1 , S = 37% Computer networking, Olum-Fonoon Babol H. Veisi Fall 2005 Page 12
ALOHA q Throughput versus offered traffic for ALOHA systems Computer networking, Olum-Fonoon Babol H. Veisi Fall 2005 Page 13
CSMA Protocols (1( q Carrier Sense Multiple Access (CSMA) ¥ 37% utilization is low yet! ¥ Stations can listen for a carrier and there is no transmission send it’s data. q Persistent and non-persistent: ¥ persistent: When channel is found to be busy, keep monitoring to find THE instant when it becomes free. ¥ non-persistent: When channel is found to be busy, don't keep monitoring to find THE instant when it becomes free. Instead, wait a random time and then sense again. Computer networking, Olum-Fonoon Babol H. Veisi Fall 2005 Page 14
CSMA Protocols (2( 1 -persistent CSMA ¥ Station listens. If channel idle, it transmits. If collision, wait a random time and try again. If channel busy, wait until idle. ¥ If station wants to send AND channel == idle then do send. ¥ Propagation delay has an important effect on transmission. ¥ Success here depends on transmission time - how long after the channel is sensed as idle will it stay idle (there might in fact be someone else's request on the way. ) Non-persistent CSMA (equivalent to 0 -persistent CSMA) ¥ Same as above EXCEPT, when channel is found to be busy, don't keep monitoring to find THE instant when it becomes free. Instead, wait a random time and then sense again. ¥ Leads to better utilization Computer networking, Olum-Fonoon Babol H. Veisi Fall 2005 Page 15
CSMA Protocols (3( p-persistent CSMA ¥ For slotted time channels ¥ If ready to send AND channel == idle then send with probability p and with prob. q = 1 - p defers to the next slot. ¥ Example: Ø 0. 5 -persistent , 0. 01 -persistent ¥ Lower probability is better for higher frame transmission per frame-time Computer networking, Olum-Fonoon Babol H. Veisi Fall 2005 Page 16
CSMA Protocols (4( q Comparison of the channel utilization versus load for various random access protocols. Higher load Computer networking, Olum-Fonoon Babol H. Veisi Fall 2005 Page 17
CSMA with Collision detection q CSMA with Collision detection (CD) = CSMA/CD ¥ CSMA protocols are clearly improved over ALOHA ¥ CSMA protocols can improve if stations abort their transmission as soon as they detect a collision. ¥ Used with LANs. ¥In CSMA/CD, when a station detects a collision, it stops sending, even if in mid-frame. Waits a random time and then tries again. Computer networking, Olum-Fonoon Babol H. Veisi Fall 2005 Page 18
CSMA/CD (2( q CSMA/CD can be in one of three states: 1 -Contention, 2 -transmission, 3 -idle. Computer networking, Olum-Fonoon Babol H. Veisi Fall 2005 Page 19
CSMA with Collision detection q CSMA with Collision detection (CD) = CSMA/CD ¥ What is contention interval- how long must station wait after it sends until it knows it got control of the channel? It's twice the time to travel to the furthest station. q Collision-free protocols: ¥ Bit-map protocol ¥ Binary countdown Computer networking, Olum-Fonoon Babol H. Veisi Fall 2005 Page 20
IEEE standards for LAN q IEEE 802. 2: Describes the upper part of the data link layer, the LLC (Logical Link Control). ¥ Hide the differences between the various kinds of MAC protocols by providing a single format to network layer ¥ IEEE 802. 2 standard q Descriptions of the physical and lower part of the DLL are (MAC): ¥ IEEE 802. 3 ¥ IEEE 802. 4 ¥ IEEE 802. 5 CSMA/CD LAN Token Bus Token Ring Computer networking, Olum-Fonoon Babol H. Veisi Fall 2005 Page 21
Ethernet (1( q Ethernet ¥ LAN standard (IEEE 802. 3) ¥ 1 -persistent CSMA/CD + Binary Exponential Back-off q Architecture of the original Ethernet. Computer networking, Olum-Fonoon Babol H. Veisi Fall 2005 Page 22
Ethernet (2( q Ethernet Cabling (1) ¥ 10 Base=10 Mbps, Base-band signaling Computer networking, Olum-Fonoon Babol H. Veisi Fall 2005 Page 23
Ethernet (3( q Ethernet Cabling (2) (a) 10 Base 5, (b) 10 Base 2, (c) 10 Base-T. Transceiver: Electronic circuits that handle carrier detection and collision detection Computer networking, Olum-Fonoon Babol H. Veisi Fall 2005 Page 24
Ethernet (4( q Ethernet Cabling (3) ¥ In Binary coding there's no way to distinguish a 0 bit from nothing-happening. Need to know when is middle of bit WITHOUT a clock => Manchester Encoding In Manchester: Ø Bit 1= High-Low Ø Bit 0= Low-High Ø Used in Ethernet Differential Manchester Ø Bit 1 indicated by absence of transition at the start of interval Ø Better noise immunity Ø Used in Token ring Computer networking, Olum-Fonoon Babol H. Veisi Fall 2005 Page 25
Ethernet (5( q Ethernet Cabling (4) ¥ Manchester Encoding Computer networking, Olum-Fonoon Babol H. Veisi Fall 2005 Page 26
Ethernet (6( q Ethernet MAC Protocol DIX Ethernet IEEE 802. 3. ¥ Preamble == 7 bytes of 1010 for synchronization ¥ SOF: Start of Frame == 1 byte of 10101011 for compatibility with 802. 4 and 802. 5 ¥ Dest. Add. == 6 bytes of mac address Ø multicast Ø Broadcast ¥ ¥ ¥ Source Ad. Length/Type Data Pad Checksum == (47 th bit=1) sending to a group of stations. == (dest. = all 1's) to all stations on network == == == 6 bytes of MAC address number of bytes of data/Type of protocol comes down from network layer ensures 64 bytes from Dest. Add. addr thru checksum. 4 bytes of CRC. Computer networking, Olum-Fonoon Babol H. Veisi Fall 2005 Page 27
Ethernet (7( q 1500 data byte restrict Max. frame length to 1526 bytes q Also need Min. frame length! length Why? To distinguish valid frames from garbage (Made by collision) need at-least 64 byte frame. Ø If data in frame is less than 46 [=64 -18] the Pad field is used to filled out frame to Min. frame length. To prevented a station from completing the transmission of a short frame before the first bit has reached the far-end of the cable, where it may collide Ø Transmitter need 2τ time to detect noise of collision, where τ is propagation time of a frame to reach another end of cable. Computer networking, Olum-Fonoon Babol H. Veisi Fall 2005 Page 28
Ethernet (8( q Collision detection can take as long as 2τ ¥ For a 10 Mbps LAN with max. length of 2500 meters and 4 repeaters the round-trip time= τ ≈ 50 μsec. So Min. frame length=500 bits => 64 bytes ¥ As the network speed goes up, the Min. frame length must go up or Max. length of cable come down. Computer networking, Olum-Fonoon Babol H. Veisi Fall 2005 Page 29
Ethernet (9( q Binary exponential back-off algorithm: ¥ Determine how randomize is done when collision occurs. ¥ After a collision, station waits 0 or 1 slot. If it collides again while doing this send, it picks a time of 0, 1, 2, 3 slots. If again it collides the wait is 0 to 23 -1 times. ¥ In general after i collisions an random number between 0 and 2 i-1 is chosen and that number of slots is skipped. ¥ Max time is 210 -1 (or equal to 10 collisions. ) After 10 collisions, an error is reported. ¥ Slot is determined by the worst case times; 500 meters + 4 repeaters = 512 bit times = 51. 2 μsec. ¥ Algorithm adapts to number of stations. Computer networking, Olum-Fonoon Babol H. Veisi Fall 2005 Page 30
Ethernet (10( q Ethernet Performance (1) ¥ Channel efficiency depends on Ø Ø Ø F: Frame length, B: Network Bandwidth, L: Cable Length, C: Speed of signal propagation, e: optimal number of contention slots per frame. § T= Time for transmission a frame = F/B § τ = is propagation time of a frame thru cable = L/C § A= Probability that a station acquires the channel in a slot with contention, Optimum=1/e T 1 channel efficiency = ----------------------T+2 τ/A 1 + 2 BLe/c. F Computer networking, Olum-Fonoon Babol H. Veisi Fall 2005 Page 31
Ethernet (10( q Ethernet Performance ¥ Efforts focus on improving both B and L, both of which will decrease efficiency. ¥ In all theatrical researches on performance evaluation of Ethernet, it’s assumed that traffic is Poisson but in real data they are not Poisson, but self similar. ¥ Efficiency of Ethernet at 10 Mbps with 512 -bit slot times: Computer networking, Olum-Fonoon Babol H. Veisi Fall 2005 Page 32
Fast Ethernet q IEEE 802. 3 u: An addendum of existing 802. 3 (1995) q Idea: keep all old frame formats, interfaces and procedural rules but just reduce bite time from 100 nsec. to 10 nsec. ¥ Commonly use twisted pair cabling ¥ 100 Base-T 4: Use Ternary (3 -level) signaling and UTP-Cat 3 cabling ¥ 100 Base-TX: Use 4 B/5 B (use 5 bits for transmit 4 bits) signaling and UTP-Cat 5 cabling Computer networking, Olum-Fonoon Babol H. Veisi Fall 2005 Page 33
Gigabit Ethernet (1( q IEEE 802. 3 z: Another addendum of existing 802. 3 (1998) ¥ Goal: make 10 times faster + Compatible with existing Ethernet standard ¥ Support unacknowledged datagram service in both unicast and multicast ¥ Configuration is point-to-point rather than multi-drop (Use Hub or Switch) Computer networking, Olum-Fonoon Babol H. Veisi Fall 2005 Page 34
Gigabit Ethernet (2( q Two different modes: ¥ Full-Duplex: Ø Allows traffic in both directions at same time Ø Is used when there is a switch connect to computer or other switches Ø All lines are buffered Contention is impossible CSMA/CD is not used ¥ Half-Duplex Ø When computers connect to Hub rather than Switches Ø Don’t buffer frames, is just like classic Ethernet Need CSMA/CD protocol Reduce length of cable ¥ Carrier Extension: Tell hardware to add its own padding to extend frame length to 512 bytes. Computer networking, Olum-Fonoon Babol H. Veisi Fall 2005 Page 35
Gigabit Ethernet (3( ¥ Frame Bursting: Allow a sender to transmit a concatenated sequence of frames in a single transmission. Ø This is efficient and perfect over carrier extention q Cabling ¥ Use 8 B/10 B signaling for Fiber optic ¥ Use different encoding for 1000 Base-T Computer networking, Olum-Fonoon Babol H. Veisi Fall 2005 Page 36
Repeaters, Hubs, Bridges, Switches, Routers and Gateways (1) q User generate some data: ¥ ¥ Data are passed to Transport layer and adds a header, i. e. TCP header The resulting unit passes down to Network layer, adds headers, IP packet Then goes to DLL which adds its own header (CRC) Resulting frame given to Physical layer These devices operate in different layers Computer networking, Olum-Fonoon Babol H. Veisi Fall 2005 Page 37
Repeaters, Hubs, Bridges, Switches, Routers and Gateways (2) q Physical layer: ¥ Repeaters: Ø Analog devices that are connected two cable segments, Amplifying incoming signal from one side and send out other. Ø Don’t understand frames, packets or headers, Just understand Volt Ø In classic Ethernet, to extend max. cable length from 500 meters to 2500 meters, 4 repeaters was allowed. ¥ Hubs: Ø Has a number of input lines that it joins electrically. Frames arriving on any of the lines are send out on all others. Ø If two frames arrive at the same time Collision occurs Ø Are like repeater and don’t understand frames, but usually don’t amplify incoming signal Computer networking, Olum-Fonoon Babol H. Veisi Fall 2005 Page 38
Repeaters, Hubs, Bridges, Switches, Routers and Gateways (3) q Data Link Layer: ¥ Bridges: Ø Connect two or more LANs. Ø Use des. Add. In frame header to determine destination ¥ Switches: Ø Are like Bridges and use des. Add. To find the route. Ø Used to connect individual computers need more number of ports, each port has own collision domain. Ø Store & Forward: Get entire a frame then transmit Ø Cut-through-switches: start forwarding the frame as soon as the des. Add. Field has come in. Computer networking, Olum-Fonoon Babol H. Veisi Fall 2005 Page 39
Repeaters, Hubs, Bridges, Switches, Routers and Gateways (4) q Network layer: ¥ Routers: Ø When a packet comes into, the frame header and trailer are stripped off and packet located in the frame’s payload field is passed routing software. q Transport and Application layer: ¥ Transport gateway: Ø Connect two computers that use different connectionoriented transport protocols. Ø Ex. TCP/IP and ATM ¥ Application gateway: Ø Understand the format and content of data and translate message from one format to another one. Computer networking, Olum-Fonoon Babol H. Veisi Fall 2005 Page 40
Virtual LAN (1( q Logical rather than physical configuration in hubbed or switched Ethernet q Reasons? ¥ Security, Load, Broadcast, Computer networking, Olum-Fonoon Babol H. Veisi Fall 2005 Page 41
Virtual LAN (2( q In VLAN: How many VLANs there will be? Which computer will be on which VLAN? What the VLANs will be called? ¥ Four physical LANs organized into two VLANs, gray and white, by (a) two bridges. (b) by switches. Computer networking, Olum-Fonoon Babol H. Veisi Fall 2005 Page 42
Summary Computer networking, Olum-Fonoon Babol H. Veisi Fall 2005 Page 43
Computer networking, Olum-Fonoon Babol H. Veisi Fall 2005 Page 44
ATM (1( q ATM (Asynchronous Transfer Mode) ¥ Is underlying mechanism. Transmits in small fixedsize cells. ¥ A connection-oriented network ¥ Use virtual circuits and small, fixed-size packets (Cells) Computer networking, Olum-Fonoon Babol H. Veisi Fall 2005 Page 45
ATM (2( q Packet (cell) switching is dramatic change for phone companies. q ATM is connection oriented; make connecting request first; then all cells follow the same path. q Target is 155 Mbps and 622 Mbps. Allows TV transmission. Computer networking, Olum-Fonoon Babol H. Veisi Fall 2005 Page 46
ATM (3( q ATM Reference Model: q 3 layers: 1 - Physical layer : Ø Physical medium (voltage, bit timing, …. ) 2 - ATM layer : Ø deal with cells and transports it + establish/release virtual circuits + congestion control 3 - ATM adaptive layer : Ø Segment large cells and resemble after transmission Computer networking, Olum-Fonoon Babol H. Veisi Fall 2005 Page 47
ATM (4( q ATM Reference Model : Computer networking, Olum-Fonoon Babol H. Veisi Fall 2005 Page 48
ATM (5( q Comparisons to other models : Computer networking, Olum-Fonoon Babol H. Veisi Fall 2005 Page 49
- Slides: 49