DOC PREVIEW
Stanford CS 144 - Lecture 10 - Physical and Link Layers

This preview shows page 1-2-15-16-17-32-33 out of 33 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Lecture 10: Physical and Link LayersAdministrative• Exams will be back by Monday• Lab 4 is, um, a lot of work• Real due date versus extension dateTopics Today• Physical layer: chips versus bits• Link layer• Media access control (MAC)• Ethernet• MPLSProtocol LayeringSessionTransportNetworkLinkPhysicalPresentationApplication7654321Protocol LayeringSessionTransportNetworkLinkPhysicalPresentationApplication7654321Physical Layer (Layer 1)• Responsible for specifying the physical medium- Category 5 cable (Cat5): 8 wires, twisted pair, RJ45 jack- WiFi wireless: 2.4GHz• Responsible for specifying the signal- 100BASE-T: 5-level pulse amplitude modulation (PAM-5)- 802.11b: Binary and quadrature phase shift keying(BPSK/QPSK)• Responsible for specifying the bits- 100BASE-T: 4-to-6 bit-to-chip encoding, 3 chip symbols- 802.11b: Barker code (1-2Mbps), complementary codekeying (5.5-11Mbps)Specifying the signal• Chips versus bits- Chips: data (in bits) at the physical layer- Bits: data above the physical layer• Physical layer states the analog signal/chipmapping- On-off keying (OOK): voltage of 0 is 0, +V is 1- PAM-5: 000 is 0, 001 is +1, 010 is -1, 011 is -2, 100 is +2- Frequency shift keying (FSK)- Phase shift keying (PSK)- Don’t worry about this too much now: we’ll cover it ingreater depth when we look at wirelessManchester Encoding• Map a 0 bit to 01 in chips• Map a 1 bit to 10 in chips- E.g., 1100 → 10100101- E.g., 0110 → 011010015.5.2 CSMA/CD: Ethernet’s Multiple Access ProtocolNodes in an Ethernet LAN are interconnected by a broadcast channel, so that whenan adapter transmits a frame, all the adapters on the LAN receive the frame. As wementioned in Section 5.3, Ethernet uses a CSMA/CD multiple access algorithm.Summarizing our discussion from Section 5.3, recall that CSMA/CD employs thefollowing mechanisms:1. An adapter may begin to transmit at any time; that is, no slots are used.2. An adapter never transmits a frame when it senses that some other adapter istransmitting; that is, it uses carrier sensing.3. A transmitting adapter aborts its transmission as soon as it detects that anotheradapter is also transmitting; that is, it uses collision detection.4. Before attempting a retransmission, an adapter waits a random time that is typ-ically small compared with the time to transmit a frame.These mechanisms give CSMA/CD much better performance than slottedALOHA in a LAN environment. In fact, if the maximum propagation delay betweenstations is very small, the efficiency of CSMA/CD can approach 100 percent. Butnote that the second and third mechanisms listed above require each Ethernetadapter to be able to (1) sense when some other adapter is transmitting, and (2) de-tect a collision while it is transmitting. Ethernet adapters perform these two tasks bymeasuring voltage levels before and during transmission.Each adapter runs the CSMA/CD protocol without explicit coordination withthe other adapters on the Ethernet. Within a specific adapter, the CSMA/CD proto-col works as follows:1. The adapter obtains a network-layer PDU from its parent node, prepares anEthernet frame, and puts the frame in an adapter buffer.460 CHAPTER 5 ■ Link Layer and Local Area NetworksFigure 5.24  Manchester encodingBit streamManchesterencodingBinaryencodingTime1000100111102-068 C05 pp4 6/14/02 3:01 PM Page 460Encoding Motivations• DC balancing (same number of 0s and 1s)• Synchronization• Can recover from some chip errors• Can constrain analog signal patterns to makesignal more robust• Higher encoding → fewer bps, more robust• Lower encoding → more bps, less robustPhysical Layer Encoding• Break bits up into symbols, encode symbols intochips• Example: 802.15.4 uses a 32-to-4 chip-to-bitencoding001100100001000011111 1 0 1 1 0 0 1 1 1 0 0 0 0 1 1 0 1 0 1 0 0 1 0 0 0 1 0 1 1 1 01 1 1 0 1 1 0 1 1 0 0 1 1 1 0 0 0 0 1 1 0 1 0 1 0 0 1 0 0 0 1 00 0 1 0 1 1 1 0 1 1 0 1 1 0 0 1 1 1 0 0 0 0 1 1 0 1 0 1 0 0 1 00 0 1 0 0 0 1 0 1 1 1 0 1 1 0 1 1 0 0 1 1 1 0 0 0 0 1 1 0 1 0 11 1 0 0 1 0 0 1 0 1 1 0 0 0 0 0 0 1 1 1 0 1 1 1 1 0 1 1 1 0 0 0Bits ChipsSymbolsPhysical Layer Frames• Usually minimalist: “here’s N bytes”- Start symbol/preamble- Length field- Payload (link layer frame)Pre L DataLink Layer Responsibilities• Single-hop addressing (e.g., Ethernet addresses)• Media access control- Link-layer congestion control- Collision detection/collision avoidance• Single-hop acknowledgementsEthernet: 802.3• Dominant wired LAN technology- 10BASE5 (vampire taps)- 10BASE-T, 100BASE-TX, 1000BASE-T• Frame format:PreambleType/LenPayload7 x 10101010SFD10101011Src6 bytes 2 bytes 46-1500 bytesCRC4 bytesGap96 ns,960 ns,9600 nsPhysical Link LinkLayer 3Dest6 bytesEthernet Addressing• Each Ethernet card has a unique 48-bit ID- Example: bramble- Example: market• 24-bit organizationally unique identifier, 24-bit ID- 0x000000-0x000009: Xerox- 0x0007e9: Intel (market.scs)- 0x001372: Dell (bramble09)- http://standards.ieee.org/regauth/oui/oui.txtMedia Access Control (MAC)• Link layer regulates access to a shared, physicalmedium• If everyone talks at once, no-one hears anything• Need to control when nodes send packets, toprevent collisions• Variety of approaches- Time Division Multiple Access (TDMA)- Carrier Sense Multiple Access, Collision Detection(CSMA/CD)- Carrier Sense Multiple Access, Collision Avoidance(CSMA/CA)- Request-to-send, clear-to-send (RTS/CTS)MAC Goals• Be able to use all of the link capacity• One node can get 100%• Multiple nodes can each get a share, don’t collideConceptual Model of Wired Media AccessNetwork ANetwork BTDMA• Divide time into slots, each device is allowed totransmit in some number of slots• No collisions, when everyone transmits, link isfully utilized• Single node cannot use all of the capacity (1n)TimeCSMA• Node senses the channel for activity• Transmits if it thinks the channel is idle• CSMA/CD: can detect if there is a collision, andback off- Randomized- Grows exponentially on consecutive collisions C- rand (0, 2C) · 512 bit times- Drop when C grows large (in practice)Collision Detect• Collision detection constrains maximum wirelength and minimum frame length• At least one node must detect a collision• Hypothetical: propagation time is zero- Can there be collisions?- RX/TX turnaround timeViolating Timing ConstraintsTimeCollisionDetectNo CollisionDetect!Ethernet Efficiency• One node can use full link


View Full Document

Stanford CS 144 - Lecture 10 - Physical and Link Layers

Documents in this Course
IP Review

IP Review

22 pages

Load more
Download Lecture 10 - Physical and Link Layers
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture 10 - Physical and Link Layers and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture 10 - Physical and Link Layers 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?