Physical and Data-Link Layers in Networking

physical and data link layers n.w
1 / 10
Embed
Share

Explore the concepts of the Physical and Data-Link layers in networking, including the specifications, protocols, and frames used for communication between devices. Learn about MAC addresses, Ethernet transmission, and the layered abstraction model applied in networking systems.

  • Networking
  • Data-Link Layer
  • Physical Layer
  • MAC Address
  • Ethernet

Uploaded on | 1 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Physical and Data-Link Layers David Ferry CSCI 3500 Operating Systems Saint Louis University St. Louis, MO 63103 1

  2. Recall: Layered Abstraction Application to Application Application Application Userspace Protocol to Protocol Presentation Presentation Session Session Entity to Entity Transport Transport Process to Process Kernel Space Network Network Interface to Interface Data-Link Data-Link Hardware to Hardware Physical Physical Physical Connection Each layer has a logical connection to its corresponding layer Data originates at the application layer and makes it s way up and down the stack as necessary CSCI 3500 - Operating Systems 2

  3. Physical Layer Specifies the physical communication medium, such as: Wire size, twists per inch Connectors Voltages Radio frequencies Timings Representation of a bit Example: 10BASE-T stands for a 10 Megabit baseband transmission over twisted pair wiring 8-pin ethernet cable +/- 2.5-volt signaling CSCI 3500 - Operating Systems 3

  4. Data-Link Layer Uses the physical layer to communicate between devices Examples: Ethernet, 802.11 Wi-Fi, GSM voice/data Each device is a distinct communication endpoint identified via MAC addresses: MAC (Media Access Control) Address: Identifies a device that can send/receive over the medium Some media can have many devices: e.g. Wi-Fi or Ethernet when using a hub 6 bytes- e.g. 1A:2B:3C:4D:5E:6F This ID is only used for signaling, any device can change its MAC address whenever it wants CSCI 3500 - Operating Systems 4

  5. Data-Link Frames Data-Link question: How do I send a frame of data from one device to another? Ethernet Frame: Preamble Frame Start MAC Destination MAC Source Ethertype Payload CRC 7 bytes 1 byte 6 bytes 6 bytes 2 bytes Up to 1500 bytes 4 bytes Preamble: 56 alternating 1 s and 0 s Frame start: unique start byte Ethertype: specifies type of payload CRC: ensures data integrity CSCI 3500 - Operating Systems 5

  6. Ethernet Transmission Protocol Frames are sent under the Carrier Sense Multiple Access with Collision Detection protocol, or CSMA/CD for short 1. Ready frame for transmission 2. Wait for an idle medium 3. Transmit and monitor for collision 4. If collision: 1. Send jamming signal 2. If exceeds max_retries then abort 3. Otherwise retransmit with random exponential backoff CSCI 3500 - Operating Systems 6

  7. Exponential Backoff Problem: When do we try and retransmit after a collision? Can t retry immediately- why? Adding a random delay helps reduce number of repeat collisions for a small number of devices. What if a channel is very busy and many collisions could occur? Exponential backoff clears the congestion rapidly. E.g.: 1. First collision wait 10-20us 2. Second collision wait 20-100us 3. Third collision wait 100-1000us, etc. CSCI 3500 - Operating Systems 7

  8. Ensuring Data Integrity Problem: How to ensure that the message received is the message that was intended to be sent? The electronic world is a noisy place- bit flips, etc. regularly happen. Easiest possible algorithm: transmit the same message two, three, or more times and compare for accuracy Why not use this? The CRC is a hash function: The hash is not stable- flipping even one bit of an input leads to a different hash outcome The hash is fast to compute in hardware, unlike our cryptographic hashes we used earlier in the course CSCI 3500 - Operating Systems 8

  9. CRC Procedure 1. After the frame has been readied, the sender computes the CRC check value appends it to the frame 2. The frame is transmitted 3. After the frame is received, the receiver re-computes the CRC check value 4. If the two values match, then the frame is very highly likely to be intact (small chance of hash collisions) 5. If they do not match, the frame is discarded CSCI 3500 - Operating Systems 9

  10. What next? Application to Application Application Application Protocol to Protocol Presentation Presentation Session Session Entity to Entity Transport Transport Process to Process Network Network Interface to Interface Data-Link Data-Link Hardware to Hardware Physical Physical Physical Connection We have seen how two machines directly connected via the same medium can exchange messages. What if they re not on the same medium? E.g. what if A and C want to talk via a shared friend called B? CSCI 3500 - Operating Systems 10

Related


More Related Content