Presentation is loading. Please wait.

Presentation is loading. Please wait.

Advanced Computer Networks

Similar presentations


Presentation on theme: "Advanced Computer Networks"— Presentation transcript:

1 Advanced Computer Networks
CS716 Advanced Computer Networks By Dr. Amir Qayyum 1

2 Lecture No. 10

3 Ethernet MAC – CSMA/CD Multiple access Carrier sense
Nodes send and receive frames over a shared link Carrier sense Nodes can distinguish between an idle and busy link Collision detection A node listens as it transmits to detect collision

4 If line is idle (no carrier sensed)
CSMA/CD MAC Algorithm If line is idle (no carrier sensed) Send immediately Upper bound message size of ~1500 bytes Must wait 9.6µs between back-to-back frames

5 CSMA/CD MAC Algorithm If line is busy (carrier sensed) …
Wait until the line becomes idle and then transmit immediately Called 1-persistent (special case of p-persistent) If collision detected Stop sending data and jam signal Try again later

6 start transmission at time 0 start transmission at time T
Collision Detection my-machine your-machine start transmission at time 0 start transmission at time T almost there at time T collision !!! How to ensure that my-machine knows about the collision?

7 Constraints on Collision Detection
In our example, consider my-machine’s message reaches your-machine at T your-machine’s message reaches my-machine at 2T Thus, my-machine must still be transmitting at 2T

8 Constraints on Collision Detection
Specifics of IEEE 802.3 bounds 2T to 51.2 microseconds packet must be at least 64B long Jam after the collision, for 32 bits, then stop transmitting frame (runt frame of 96 bits) ensures that all hosts notice collision

9 Ethernet Min. Frame Size
RTT on a maximally configured Ethernet of 2500m, with 4 repeaters is about 51.2 μs 2500m / 2 x 108 m/s = 12.5 us 2 x 12.5 = 25 us + repeater delays 51.2 μs on 10 Mbps corresponds to 512 bits (64 bytes) Therefore, the minimum frame length for Ethernet is 64 bytes (header +46 bytes data)

10 start transmission at time 0 start transmission at time T
Collision Detection my-machine your-machine start transmission at time 0 start transmission at time T almost there at time T collision my-machine notices collision before transmission ends at 2T

11 Retry After the Collision
How long should a host wait to retry after a collision ? Binary exponential backoff maximum backoff doubles with each failure (exponential) after N failures, pick an N-bit number 2N discrete possibilities from 0 to maximum

12 Retry After the Collision
Delay and try again algorithm 1st time: 0 or 51.2us 2nd time: 0, 51.2, or 102.4us 3rd time51.2, 102.4, or 153.6us nth time: k x 51.2us, for randomly selected k=0..2n - 1 Give up after several tries (usually 16)

13 Binary Exponential Backoff
choices after 1 collision choices after 2 collisions Ts 2Ts 3Ts time time of last collision Why used fixed time slots ? How long slots should be ?

14 Binary Exponential Backoff
Ts is 51.2 microseconds for IEEE 802.3 Consider that k hosts collide each picks random number from 0 to 2( N-1) if minimum value is unique all other hosts see busy line remember that Ethernet RTT < 51.2 microseconds

15 Binary Exponential Backoff
Consider that k hosts collide if minimum value is not unique hosts in minimum value slot collide again following slot idle consider next smallest backoff value

16 Ethernet Frame Reception
Sender handles all access control Receiver simply pulls frames from network Ethernet controller/card sees all frames selectively passes frames to host processor

17 Ethernet Frame Reception
Acceptable frames addressed to host, or; to multicast address to which host belongs or; to a broadcast address anything if in promiscuous mode (packet sniffing and tcpdump requirement)

18 Ethernet Collision Detection
Bus topology Ethernets Transceiver handles Carrier detection Collision detection Jamming after a collision Transceiver sees voltage sum Outgoing signal + Incoming signal Looks for voltages impossible for local alone Attenuation can prevent detection Limits segment length

19 Ethernet Collision Detection
Hub topology Ethernets Controller/card handles carrier detection Hub handles Collision detection Jamming after a collision Detect transmission activity on each line If more than 1 line (host) active Assert collision to all lines Continue until no lines active Attenuation is less critical

20 Experience With Ethernet
Number of hosts limited to 200 in practice, standard allows 1024 Range much shorter than 2.5 km limit in standard Round-trip time is typically 5 or 10 μs, not 50μs

21 Experience With Ethernet
Higher-level flow control (i.e., TCP) limits load 30% maximum load recommended Large packets recommended Star topologies easier to administer than Bus Failure isolation, node addition w/o complex topology (Backwards) Compatibility more important than elegance or raw performance (1 > 0)

22 Token Ring

23 Token Ring Overview Token Ring network “was” a candidate to replace Ethernet; used in some MAN backbones 16Mbps IEEE (based on earlier 4Mbps IBM ring) 100Mbps Fiber Distributed Data Interface (FDDI)

24 Token Ring Rationale Why emulate a shared medium with point-to-point links? Why a shared medium? convenient broadcast capabilities switches are costly Why emulation? simpler MAC algorithm: only have 2 wires fairer access arbitration fully digital (802.3 collision detection requires analog)

25 Data flows in a particular direction
IBM Token Ring – IEEE 802.5 Data flows in a particular direction a node receives frames from its upstream neighbor a node forwards frames to its downstream neighbor

26 IBM Token Ring – IEEE 802.5 Ring is viewed as a single shared medium
each node is allowed to transmit according to some distributed algorithm for medium access all nodes see all frames; destination saves a copy of frame as it flows past The term “token” indicates the way the access to shared channel is managed

27 Token Ring State Diagram
No token (pass frames along) get token release token Token (insert new frames)

28 Token in a Token Ring Token is a special bit pattern that rotates around the ring A node must capture token before transmitting A node releases token after done transmitting Immediate release- token follows last frame (FDDI) Delayed release – after last frame returns to sender

29 Token Release oken T T oken Frame Frame (a) immediate release
(b) delayed release

30 Remove your frame when it comes back around
Token in a Token Ring Remove your frame when it comes back around Transmit another frame or re-insert the token Stations get round-robin service as the token circulates around the ring

31 Review Lecture 10 CSMA/CD MAC algorithm
Constraints on collision detection Min frame size – RTT 51.2us Retries after collision Binary exp backoff: Min value unique Frame reception: acceptable frames Bus and Hub topology: CD handle Exp: nodes, dist, RTT, 30% load, largeframe

32 Review Lecture 10 Token Ring MAN backbone IBM, token ring, FDDI Rationale: emulate shared med p2p links Directional data flow Shared med: see all frames, distr MAC algo Token – special bit pattern Capture and release – round robin service When a node receives a claim frame, it compares the bid with its own bid If its bid is higher, it updates TTRT & forward the frame If its bid is lower, it replaces with its own claim frame If bids are equal, higher address node wins


Download ppt "Advanced Computer Networks"

Similar presentations


Ads by Google