15
Review: Medium Access Control Sublayer – What is the problem to be addressed in this sublayer? – Protocols that allow collision • Pure ALOHA • Slotted ALOHA • CSMA • CSMA/CD – Collision free protocols: • bitmap method, binary countdown and token

Lect13 Ethernet (1)

Embed Size (px)

DESCRIPTION

ppt

Citation preview

  • Review: Medium Access Control SublayerWhat is the problem to be addressed in this sublayer?Protocols that allow collisionPure ALOHASlotted ALOHACSMACSMA/CDCollision free protocols:bitmap method, binary countdown and token

  • Collision free protocols: Token pass.There is only one token in the network.The token is passed through every node in the network.Only the node that has the token can transfer data.

  • Limited contention protocols: collision based protocols (ALOHA,CSMA/CD) are good when the network load is low.collision free protocols (bit map, binary countdown) are good when load is high.How about combining their advantages -- limited contention protocols.Behave like the ALOHA scheme under light loadBehave like the bitmap scheme under heavy load.

  • Limited contention protocols: adaptive tree walk protocoltrick: dynamic partition the stations into groups and limit the contention for each slot.under light load, every one tries for each slot like ALOHA under heavy load, only a small group can try for each slothow do we do ittreat stations as the leaves of a binary tree.first slot, all stations (under the root node) can try to get the slot.if no conflict, repeat.if conflict, use depth first search to traverse the tree, only nodes of a sub-tree get to try for the next slot.

  • 01Example:23456ABC*DE*F*GH*Slot 0: C*, E*, F*, H* (all nodes under node 0 can try), conflictslot 1: C* (all nodes under node 1 can try), C sendsslot 2: E*, F*, H*(all nodes under node 2 can try), conflictslot 3: E*, F* (all nodes under node 5 can try), conflictslot 4: E* (all nodes under E can try), E sendsslot 5: F* (all nodes under F can try), F sendsslot 6: H* (all nodes under node 6 can try), H sends.

  • Ethernet: Invented at Xerox by Robert Metcalfe (founder of 3Com) and Dave Boggsbackground:ARPANet in late 60's, linking computers at different sites to central mainframe computers.By early 70's, the cost of computers went down, introduction of mini-computers PDP, which means each school can have more than one computer! Applications: share printers, share files, share cyclesFactory automation: many computers on factory floorNeed local area networks to link the computers

  • Ethernet: Use shared medium instead of switched-basedcost: one adaptor/machine + linkperformance: all hosts sharing one link.first Ethernet: 3 MbpsPDP-11 0.25 MIPS, 0.1 Mbps peakno all computers transmit at peak all the time meaning, easily support up to 100 computers at that time Now: 500MHz Pentium, around 200MIPS, 100Mbps10Mbps cannot support as many machines.

  • Medium Access Problem: multiple stations may transmit on the medium at the same time, which may result in collisions Two solutions guarantee that only one station transfers at one time: (contention free protocol) FDDI, token ring, token bus use the first approachtry the luck and re-transmit if there is a collision (contention based protocol)need algorithm to reduce the probability of collisionEthernet uses CSMA/CD + binary exponential backoff to reduce the probability of collisions

  • CSMA/CD + binary exponential backoffsense before send (CSMA)abort sending upon detecting collision (CD).adjust retransmission interval (binary exponential backoff)each time slot to be 51.2 usfirst collision, retransmission interval = random number between [0,1]second collision, interval = random number between [0,1,2,3]kth collision, interval = random number between [0, 2^k-1]upper bound 1023 slots.

  • Important design parametersBandwidth: 10 MbpsPropagation Delay: limit the frame size.Physical mediumthin cable/thick cable/twisted pair/fiber

    10Base5 500 meters thick (cable) Ethernet 100 nodes/seg10Base2 200 meters thin (cable) Ethernet 30 nodes/seg10BaseT 100 meters twist pair 1024 nodes/seg10BaseF 2000 meters fiber optics 1024 nodes/seg10Base5/10Base2, cable connected to each machine 10BaseT -- connecting to a hub10BaseF -- between building Connecting

  • Multiple segments can be connected through the repeaters (hubs). All segments connected by the repeaters are in the same collision domain. constraint: no two transceivers may be 2.5km apart and separated by 4 repeaters.frame format

    | Preamble | Start| Dst Addr | Src Addr | length | Data |Pad |Checksum| 7 1 2/6 2/6 2 0-1500 0-46 4 Header: 14 Bytes, CRC: 4 Bytes Minimum data (+ pad) length: 46 Bytes Maximum data length: 1500 Bytes

  • Minimum frame size = ??Why? To run CSMA/CD, each frame must be large enough to detect collision. 2 * max propagation delay? standard: 2500m, 500m per segment, 4 repeaters.speed of light: 3*10^8m/s speed of signal propagation: 2*10^8m/s propagation delay: about 25us (on wire) +25 us in repeaters, total delay = 51.2usHow many bytes do we need in each frame?Maximum frame size = ?Why?larger is better for bandwidth utilization

  • How to find out your Ethernet address: "arp/usr/sbin/arp xi --> xi (128.186.121.41) at 8:0:20:92:43:b1 Ethernet Switch: Increase the bandwidth, segments connected by switch have different collision domain.Ethernet switch: data link layer deviceEthernet hub (repeater): physical layer deviceFast EthernetKeep everything in Ethernet, make the clock faster 100Mbps. What are the problems? Cable100Base-T4 100m category 3 UTP, 4 lines. 100Base-Tx 100m category 5 twisted pair 100Base-Fx 2000m Fiber optic

  • What are the problems? CableCSMA/CD?minimum frame size = 64byte = 512 bits,5.12us using 100Mbps transmission rate.What can you do about this?Increase the minimum frame size.Reduce cable lengthFaster Ethernet:Reduce the cable length by a factor of 10, maximum length = 200 meters (100-Base-T, 100 meter cable).Full duplex mode: point to point connection, no contention. No CSMA/CD needed, can have longer cable.

  • Gigabit Ethernet: make it even faster at 1Gbps.Cable: mainly fiber optics. CSMA/CD domainShortening the cable? 20 meters Alternative: increase the minimum frame size to 512 bytes, CSMA/CD domain 200 meters (not much error margin)Experimental studies say that typical frame size are 200 - 300 bytes. backward compatibility: carrier extension -- short packet, stuff extra bits to make to 512 bytes improve performance: packet bursting -- transmit a burst of small frames, only the first one need carrier extension.