DOC PREVIEW
Stanford CS 144 - Physical and Link Layers

This preview shows page 1-2-3-4-5-6 out of 18 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 18 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 18 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 18 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 18 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 18 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 18 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Physical and Link LayersCS144 Review Session 6November 6th, 2008Roger LiaoBased on slides by Ben NhamOutline• Physical layer– Encoding of signals– Chips vs. bits•Link layer•Link layer– Communication through shared medium– Hubs vs. switchesSignaling bits on a link• Most electrical and optical networks signal bits using two distinct voltage/power levels.Coding schemes•Multilevel encoding•Frequency division multiplexing•High speed links use a selection of complicated techniques to squeeze maximum data-rate from maximum data-rate from link•Capacity – maximum data rate of a linkManchester Encoding• Synchronous digital systems need a clock to trigger sampling of data• Manchester encoding allows us to encode the clock with the data stream–The preamble to the Ethernet frame is used to –The preamble to the Ethernet frame is used to synchronize the sender clock with the receiver clock• In Manchester encoding:– Transmitter samples data on edge of clock (usually rising edge)– If we sample a 1, it is encoded by a rising edge– If we sample a 0, it is encoded by a falling edgeManchester Encoding Question• Suppose a 10Mbps NIC sends into a link an infinite stream of zeros using Manchester encoding. The signal emerging from the clkdatasignal emerging from the adapter will have how many transitions per second?- 2 transitions per bit time- Bit times occur at clock frequency of 10MHz- Transitions occur at 20 MHzencodingChips and Bits• Chips – 1’s and 0’s at physical layer• Bits – Actual data• Encoded for:– Clock encoding– Error detection–Error correction• Example• Straw man example 1– Duplicate bits– Bits: 101– Chips: 110011– Now we can detect one bit errors (100011 –invalid!)–Error correction• Straw man example 2– Triplicate bits– Bits: 101– Chips: 111000111– Now we can correct one bit errors (101000111 – guess that the second bit is flipped)• In reality the physical layer does more efficient encodings but gets similar benefitsArbitration of Shared Resources• General systems problem– I have a shared resource that only one person can use at a time– How do I arbitrate access to it?•Shared CPU, multiple processes need it –OS scheduler•Shared CPU, multiple processes need it –OS scheduler• Shared radio spectrum, multiple broadcasters –frequency division multiplexing• One Ethernet coax, multiple clients connected to it –CSMA/CD– Other ways of sharing a medium, e.g. Token Ring, Aloha, etc. in bookCSMA/CD in the Classroom• We are students sharing the air in this room, and develop the following protocol to arbitrate access to it:–Before I talk, I see if anyone else is talking– If anyone else is talking, don’t talk– If no one else is talking, start talking– If I start talking and sense that someone else has started talking, stop talking, and start talking some random time that increases exponentially to hope that no one is talking thenCSMA/CD in Ethernet• We are nodes sharing this Ethernet wire, and develop the following protocol to arbitrate access to it:– Before I send, I sense the wire to see if anyone else is sending–If anyone else is sending, don’t send–If anyone else is sending, don’t send– If no one else is sending, start sending– If I start sending and sense that someone else has started sending, stop sending, and start sending after waiting some random time that increases exponentially, to hope that no one is sending then– This is why CSMA/CD is known as an “exponential backoff” algorithmCSMA/CD Network Size RestrictionTo ensure that a packet is transmitted without a collision, a host must be able to detect a collision before it finishes transmitting a packet.t=0t=PROP--t=PROPt=2PROP-AB“Line is idle”t=PROP-“Line is idle”Credit: CS244a Handout 10PROPPROPt=2PROP-Events:t=0: Host A starts transmitting a packet.t=PROP--: Just before the first bit reaches Host B, Host B senses the line to be idle and starts to transmit a packet.t=PROP-: A collision takes place near Host B.t=PROP: Host B receives data whilst transmitting, andso detects the collision.t=2PROP-: Host A receives data whilst transmitting, and so detects the collision.Length Limitation of CSMA/CD• There is a minimum size frame needed to be able to detect collisions:– Transmission Delay > 2 * Propagation Delay– Transmission Delay = MinSize / TransferRate–MinSize= TransferRate* 2 * Propagation Delay–MinSize= TransferRate* 2 * Propagation Delay• Longer wire = larger prop delay = larger MinSize• Faster transfer rate = larger MinSize– Serious problem with Gigabit Ethernet and higher– Punt problem by saying that everyone is using switched networks anyway and not going to get collisionsRouters, Switches, and Hubs• Routers are network layer devices– Modify IP datagram (decrement TTL)– Hosts and other routers must be aware of them•Switches and hubs are link layer devices•Switches and hubs are link layer devices– Only care about frames, don’t modify IP datagram– Transparent to networkHubs• Operate as a repeater– Broadcast an incoming frame to all ports, except for the ingress port– Like having a longer Ethernet cable that all the hosts tap intotap into– All ports are on single collision domain!• Advantages: simple, restores signal, potentially fast since we don’t have to buffer or examine frame• Disadvantages: poor bandwidth due to collisionsHub Question 1• A 10-port hub is connected to 10 hosts using gigabit links. What is the maximum aggregate transfer rate of data flowing through this network?network?– All ports are part of the same collision domain--only one device can send at a time– Therefore, peak bandwidth is one gigabitHub Question 2• Recall that 100Mbps Ethernet restricts cable lengths to 100m. Suppose we want to connect two hosts which are 1000m apart. Can we use 10 100m cables with 9 hubs in series to accomplish 100m cables with 9 hubs in series to accomplish this?– No. Since all ports are on same collision domain, max network diameter (1km) is too large to meet the TRANSP > 2 * PROP constraint of CSMA/CD– In reality, the IEEE standard limits number of hubs in series and specifies maximum network diameterSwitches• Must store and examine frame before forwarding• Simple learning protocol—no configuration– Given incoming frame (MACsrc, MACdst) on port x:– Add (MACsrc, x) to switch table–Look up port for


View Full Document

Stanford CS 144 - Physical and Link Layers

Documents in this Course
IP Review

IP Review

22 pages

Load more
Download 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 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 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?