Ethernet CSMA

Ethernet CSMA PowerPoint PPT Presentation

  • Uploaded on
  • Presentation posted in: General

IEEE802.3 Medium Access Control. Random Access Stations access medium randomly ContentionStations contend for time on mediumWhat were the precursors for CSMA/CD?. ALOHA. Packet RadioWhen station has frame, it sendsStation listens (for max round trip time)plus small incrementIf ACK, fine.

Download Presentation

Ethernet CSMA

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript

1. Ethernet (CSMA/CD) Carriers Sense Multiple Access with Collision Detection IEEE 802.3

2. IEEE802.3 Medium Access Control Random Access Stations access medium randomly Contention Stations contend for time on medium What were the precursors for CSMA/CD?

3. ALOHA Packet Radio When station has frame, it sends Station listens (for max round trip time)plus small increment If ACK, fine. If not, retransmit If no ACK after repeated transmissions, give up Frame check sequence (as in HDLC) If frame OK and address matches receiver, send ACK Frame may be damaged by noise or by another station transmitting at the same time (collision) Any overlap of frames causes collision Max utilization 18%

4. Slotted ALOHA Time in uniform slots equal to frame transmission time Need central clock (or other sync mechanism) Transmission begins at slot boundary Frames either miss or overlap totally Max utilization 37%

5. CSMA Propagation time is much less than transmission time All stations know that a transmission has started almost immediately First listen for clear medium (carrier sense) If medium idle, transmit If two stations start at the same instant, collision Wait reasonable time (round trip plus ACK contention) No ACK then retransmit Max utilization depends on propagation time (medium length) and frame length Longer frame and shorter propagation gives better utilization

6. Nonpersistent CSMA If medium is idle, transmit; otherwise, go to 2 If medium is busy, wait amount of time drawn from probability distribution (retransmission delay) and repeat 1  Random delays reduces probability of collisions Consider two stations become ready to transmit at same time While another transmission is in progress If both stations delay same time before retrying, both will attempt to transmit at same time Capacity is wasted because medium will remain idle following end of transmission Even if one or more stations waiting Nonpersistent stations deferential

7. 1-persistent CSMA To avoid idle channel time, 1-persistent protocol used Station wishing to transmit listens and obeys following:  If medium idle, transmit; otherwise, go to step 2 If medium busy, listen until idle; then transmit immediately 1-persistent stations selfish If two or more stations waiting, collision guaranteed Gets sorted out after collision

8. P-persistent CSMA Compromise that attempts to reduce collisions Like nonpersistent And reduce idle time Like1-persistent Rules: If medium idle, transmit with probability p, and delay one time unit with probability (1 – p) Time unit typically maximum propagation delay If medium busy, listen until idle and repeat step 1 If transmission is delayed one time unit, repeat step 1 What is an effective value of p?

9. Value of p? Avoid instability under heavy load n stations waiting to send End of transmission, expected number of stations attempting to transmit is number of stations ready times probability of transmitting np If np > 1, on average there will be a collision Repeated attempts to transmit almost guaranteeing more collisions Retries compete with new transmissions Eventually, all stations trying to send Continuous collisions; zero throughput So n p < 1 for expected peaks of n If heavy load expected, p small However, as p made smaller, stations wait longer At low loads, this gives very long delays

10. CSMA Picture HERE

11. CSMA/CD With CSMA, collision occupies medium for duration of transmission, stations do not listen Stations listen while transmitting using CD Ethernet uses 1.0 persistent CSMA/CD If idle, transmit, otherwise step 2 If busy, listen until idle, then transmit immediately If collision detected, jam then cease transmission After jam, wait random time then start from step 1

12. CSMA/CD Operation

13. Which Persistence Algorithm? IEEE 802.3 uses 1-persistent Both nonpersistent and p-persistent have performance problems 1-persistent (p = 1) seems more unstable than p-persistent Greed of the stations But wasted time due to collisions is short (if frames long relative to propagation delay With random backoff, unlikely to collide on next tries To ensure backoff maintains stability, IEEE 802.3 and Ethernet use binary exponential backoff

14. Binary Exponential Backoff Attempt to transmit repeatedly if repeated collisions First 10 attempts, mean value of random delay doubled Value then remains same for 6 further attempts After 16 unsuccessful attempts, station gives up and reports error As congestion increases, stations back off by larger amounts to reduce the probability of collision. 1-persistent algorithm with binary exponential backoff efficient over wide range of loads Low loads, 1-persistence guarantees station can seize channel once idle High loads, at least as stable as other techniques Backoff algorithm gives last-in, first-out effect Stations with few collisions transmit first

15. Collision Detection On baseband bus, collision produces much higher signal voltage than signal Collision detected if cable signal greater than single station signal Signal attenuated over distance Limit distance to 500m (10Base5) or 200m (10Base2) because the attenuated signal may be so weakened that is does not exceed single transmitter voltage. For twisted pair (star-topology) activity on more than one port is collision Special collision presence signal

16. 100BASE-T4 100-Mbps over lower-quality Cat 3 UTP Taking advantage of large installed base Cat 5 optional Does not transmit continuous signal between packets Useful in battery-powered applications Can not get 100 Mbps on single twisted pair Data stream split into three separate streams Each with an effective data rate of 33.33 Mbps Four twisted pairs used Data transmitted and received using three pairs Two pairs configured for bidirectional transmission NRZ encoding not used Would require signaling rate of 33 Mbps on each pair Does not provide synchronization Ternary signaling scheme (8B6T)

18. 100BASE-T Options

20. Distributed Coordination Function DCF sublayer uses CSMA If station has frame to transmit, it listens to medium If medium idle, station may transmit Otherwise must wait until current transmission complete No collision detection Not practical on wireless network Dynamic range of signals very large Transmitting station cannot distinguish incoming weak signals from noise and effects of own transmission DCF includes delays Amounts to priority scheme Interframe space

22. Interframe Space Single delay known as interframe space (IFS) Using IFS, rules for CSMA: Station with frame senses medium If idle, wait to see if remains idle for one IFS. If so, may transmit immediately If busy (either initially or becomes busy during IFS) station defers transmission Continue to monitor until current transmission is over Once current transmission over, delay another IFS If remains idle, back off random time and again sense If medium still idle, station may transmit During backoff time, if becomes busy, backoff timer is halted and resumes when medium becomes idle To ensure stability, binary exponential backoff used

23. IEEE 802.11 Medium Access Control Logic

24. Priority Use three values for IFS SIFS (short IFS): Shortest IFS For all immediate response actions (see later) PIFS (point coordination function IFS): Midlength IFS Used by the centralized controller in PCF scheme when issuing polls DIFS (distributed coordination function IFS): Longest IFS Used as minimum delay for asynchronous frames contending for access

25. SIFS Use - ACK Station using SIFS to determine transmission opportunity has highest priority In preference to station waiting PIFS or DIFS time SIFS used in following circumstances: Acknowledgment (ACK): Station responds with ACK after waiting SIFS gap No collision detection so likelihood of collisions greater than CSMA/CD MAC-level ACK gives efficient collision recovery SIFS provide efficient delivery of multiple frame LLC PDU Station with multiframe LLC PDU to transmit sends out MAC frames one at a time Each frame acknowledged after SIFS by recipient When source receives ACK, immediately (after SIFS) sends next frame in sequence Once station has contended for channel, it maintains control of all fragments sent

26. SIFS Use – CTS Clear to Send (CTS): Station can ensure data frame will get through by issuing RTS Destination station should immediately respond with CTS if ready to receive All other stations hear RTS and defer Poll response: See Point coordination Function (PCF)

27. PIFS and DIFS PIFS used by centralized controller Issuing polls Takes precedence over normal contention traffic Frames using SIFS have precedence over PCF poll DIFS used for all ordinary asynchronous traffic

28. IEEE 802.11 MAC Timing Basic Access Method

29. Point Coordination Function (PCF) Alternative access method implemented on top of DCF Polling by centralized polling master (point coordinator) Uses PIFS when issuing polls PIFS smaller than DIFS Can seize medium and lock out all asynchronous traffic while it issues polls and receives responses E.g. wireless network configured so number of stations with time-sensitive traffic controlled by point coordinator Remaining traffic contends for access using CSMA Point coordinator polls in round-robin to stations configured for polling When poll issued, polled station may respond using SIFS If point coordinator receives response, it issues another poll using PIFS If no response during expected turnaround time, coordinator issues poll

30. Superframe Point coordinator would lock out asynchronous traffic by issuing polls Superframe interval defined During first part of superframe interval, point coordinator polls round-robin to all stations configured for polling Point coordinator then idles for remainder of superframe Allowing contention period for asynchronous access At beginning of superframe, point coordinator may seize control and issue polls for given period Time varies because of variable frame size issued by responding stations Rest of superframe available for contention-based access At end of superframe interval, point coordinator contends for access using PIFS If idle, point coordinator gains immediate access Full superframe period follows If busy, point coordinator must wait for idle to gain access Results in foreshortened superframe period for next cycle

31. IEEE 802.11 MAC Timing PCF Superframe Construction

33. IPv4 Address Formats

34. IP Addresses - Class A 32 bit global internet address Network part and host part Class A Start with binary 0 All 0 reserved 01111111 (127) reserved for loopback Range 1.x.x.x to 126.x.x.x All allocated

35. IP Addresses - Class B Start 10 Range 128.x.x.x to 191.x.x.x Second Octet also included in network address 214 = 16,384 class B network addresses each supporting 64K stations All allocated

36. IP Addresses - Class C Start 110 Range 192.x.x.x to 223.x.x.x Second and third octet also part of network address 221 = 2,097,152 network addresses each supporting 256 users Nearly all allocated See IPv6 Subnets and Subnet Masks Allow arbitrary complexity of internetworked LANs within organization Insulate overall internet from growth of network numbers and routing complexity Site looks to rest of internet like single network Each LAN assigned subnet number Host portion of address partitioned into subnet number and host number Local routers route within subnetted network Subnet mask indicates which bits are subnet number and which are host number

39. CSC 311

40. Routing Using Subnets

43. IP v6 - Version Number IP v 1-3 defined and replaced IP v4 - current version IP v5 - streams protocol IP v6 - replacement for IP v4 During development it was called IPng Next Generation

44. Why Change IP? Address space exhaustion Two level addressing (network and host) wastes space Network addresses used even if not connected to Internet Growth of networks and the Internet Extended use of TCP/IP Single address per host Requirements for new types of service

45. IPv6 Enhancements (1) Expanded address space 128 bit Improved option mechanism Separate optional headers between IPv6 header and transport layer header Most are not examined by intermediate routes Improved speed and simplified router processing Easier to extend options Address autoconfiguration Dynamic assignment of addresses

46. IPv6 Enhancements (2) Increased addressing flexibility Anycast - delivered to one of a set of nodes Improved scalability of multicast addresses Support for resource allocation Replaces type of service Labeling of packets to particular traffic flow Allows special handling e.g. real time video

47. IPv6 Structure

48. Extension Headers Hop-by-Hop Options Require processing at each router Routing Similar to v4 source routing Fragment Authentication Encapsulating security payload Destination options For destination node

49. IP v6 Header

50. IP v6 Header Fields (1) Version 6 Traffic Class Classes or priorities of packet Still under development See RFC 2460 Flow Label Used by hosts requesting special handling Payload length Includes all extension headers plus user data

51. IP v6 Header Fields (2) Next Header Identifies type of header Extension or next layer up Source Address Destination address

52. IPv6 Addresses 128 bits long Assigned to interface Single interface may have multiple unicast addresses Three types of address

54. Types of address Unicast Single interface Anycast Set of interfaces (typically different nodes) Delivered to any one interface the “nearest” Multicast Set of interfaces Delivered to all interfaces identified

55. IPv6 Extension Headers

56. Hop-by-Hop Options Next header Header extension length Options Pad1 Insert one byte of padding into Options area of header PadN Insert N (?2) bytes of padding into Options area of header Ensure header is multiple of 8 bytes Jumbo payload Over 216 = 65,535 octets Router alert Tells router that contents of packet is of interest to router Provides support for RSPV (chapter 16)

57. Fragmentation Header Fragmentation only allowed at source No fragmentation at intermediate routers Node must perform path discovery to find smallest MTU of intermediate networks Source fragments to match MTU Otherwise limit to 1280 octets

58. Fragmentation Header Fields Next Header Reserved Fragmentation offset Reserved More flag Identification

59. Routing Header List of one or more intermediate nodes to be visited Next Header Header extension length Routing type Segments left i.e. number of nodes still to be visited

60. Destination Options Same format as Hop-by-Hop options header

  • Login