Review Medium Access Control Sublayer What is the
Review: Medium Access Control Sublayer – What is the problem to be addressed in this sublayer? – Protocols that allow collision • Pure ALOHA • Slotted ALOHA • CSMA/CD – Collision 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 load • Behave like the bitmap scheme under heavy load.
• Limited contention protocols: – adaptive tree walk protocol • trick: 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 slot – how do we do it » treat 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.
Example: 0 2 1 3 A 4 B C* 6 5 D E* F* G H* Slot 0: C*, E*, F*, H* (all nodes under node 0 can try), conflict slot 1: C* (all nodes under node 1 can try), C sends slot 2: E*, F*, H*(all nodes under node 2 can try), conflict slot 3: E*, F* (all nodes under node 5 can try), conflict slot 4: E* (all nodes under E can try), E sends slot 5: F* (all nodes under F can try), F sends slot 6: H* (all nodes under node 6 can try), H sends.
• Ethernet: – Invented at Xerox by Robert Metcalfe (founder of 3 Com) and Dave Boggs – background: • 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 cycles • Factory automation: many computers on factory floor • Need local area networks to link the computers
• Ethernet: – Use shared medium instead of switched-based – cost: one adaptor/machine + link – performance: all hosts sharing one link. – first Ethernet: • 3 Mbps – PDP-11 0. 25 MIPS, 0. 1 Mbps peak – no all computers transmit at peak all the time meaning, easily support up to 100 computers at that time – Now: – 500 MHz Pentium, around 200 MIPS, 100 Mbps – 10 Mbps 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 approach • try the luck and re-transmit if there is a collision (contention based protocol) – need algorithm to reduce the probability of collision • Ethernet uses CSMA/CD + binary exponential backoff to reduce the probability of collisions
• CSMA/CD + binary exponential backoff – sense before send (CSMA) – abort sending upon detecting collision (CD). – adjust retransmission interval (binary exponential backoff) • each time slot to be 51. 2 us • first 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 parameters – Bandwidth: 10 Mbps • Propagation Delay: limit the frame size. • Physical medium – thin cable/thick cable/twisted pair/fiber 10 Base 5 500 meters thick (cable) Ethernet 100 nodes/seg 10 Base 2 200 meters thin (cable) Ethernet 30 nodes/seg 10 Base. T 100 meters twist pair 1024 nodes/seg 10 Base. F 2000 meters fiber optics 1024 nodes/seg 10 Base 5/10 Base 2, cable connected to each machine 10 Base. T -- connecting to a hub 10 Base. F -- 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. 5 km apart and separated by 4 repeaters. • frame format | Preamble | Start| Dst Addr | Src Addr | length | Data |Pad |Checksum| 7 1 2/6 2 0 -1500 0 -46 – Header: 14 Bytes, CRC: 4 Bytes – Minimum data (+ pad) length: 46 Bytes – Maximum data length: 1500 Bytes 4
• Minimum frame size = ? ? • Why? To run CSMA/CD, each frame must be large enough to detect collision. – 2 * max propagation delay? » standard: 2500 m, 500 m per segment, 4 repeaters. » speed of light: 3*10^8 m/s » speed of signal propagation: 2*10^8 m/s » propagation delay: about 25 us (on wire) +25 us in repeaters, total delay = 51. 2 us » How 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: b 1 • Ethernet Switch: Increase the bandwidth, segments connected by switch have different collision domain. – Ethernet switch: data link layer device – Ethernet hub (repeater): physical layer device – Fast Ethernet • Keep everything in Ethernet, make the clock faster 100 Mbps. • What are the problems? – Cable » 100 Base-T 4 100 m category 3 UTP, 4 lines. » 100 Base-Tx 100 m category 5 twisted pair » 100 Base-Fx 2000 m Fiber optic
• What are the problems? – Cable – CSMA/CD? • minimum frame size = 64 byte = 512 bits, • 5. 12 us using 100 Mbps transmission rate. • What can you do about this? – Increase the minimum frame size. – Reduce cable length – Faster 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 1 Gbps. • Cable: mainly fiber optics. • CSMA/CD domain – Shortening 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.
- Slides: 15