1 / 26

CENG415 – Communication Networks

CENG415 – Communication Networks. Lectures 20 Data Link Layer - Ethernet. Ethernet. Ethernet is the most commonly used protocol for local networks Created in 1978 by DEC, Intel, and Xerox Standardized by the IEEE (RFC 802.3) Read the history from the book

branxton
Download Presentation

CENG415 – Communication Networks

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CENG415 – Communication Networks Lectures 20 Data Link Layer - Ethernet

  2. Ethernet Ethernet is the most commonly used protocol for local networks Created in 1978 by DEC, Intel, and Xerox Standardized by the IEEE (RFC 802.3) • Read the history from the book Ethernet uses BUS technology (one single cable to which nodes (computers) attach

  3. Physical properties Versions: 10Mbps, 100Mbps (fast Ethernet), 1000Mbps (Gigabit Ethernet). • Cable: Coax, up to 500m. • Taps: At least 2.5m apart. • Transceiver: Detect idle line, drive signal on TX, receive signal on RX. • Repeater:Amplifies and forwards electric signals. No more than 4 between any two hosts determines a maximum reach of 2500m.(5 cables of 500m connected with 4 repeaters) • Terminators:Placed at the end of a segment to avoid signals from bouncing back. • Medium:Broadcast. • Maximum number of hosts:1024.(2500 / 2.5) ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ Host Repeater

  4. Ethernet - characteristics • While one computer transmits info, all other computers must wait • The most interesting aspect of Ethernet is the mechanism used to coordinate transmission • An Ethernet network doesn’t have a centralized controller that tells each computer how to take turns using the shared cable • Distributed coordination scheme called Carrier Sense Multiple Access (CSMA)* * Will be described later

  5. Ethernet Frame • When a frame is put on the wire, it is received by all NICs • The NIC picks up only the frames addressed to itself • Destination address matches with his MAC address • Broadcast address: all bits 1 • Multicast address: first bit 1, but not all • The adaptor only passes to hosts the frames it accepts unless it is in promiscuous mode. * Destination address first to allow the NIC to know ASAP if the frame need to be delivered or discarded

  6. Preamble Fact: hardware can detect a change in voltage more easily then a fixed one Manchester Encoding: uses rising and falling edges to encode data • Ethernet uses Manchester Encoding • It is important so that sender and receiver agree on the bit slot (transmission clock rate)

  7. Preamble • 8 bytes • Each of the first seven bytes of the preamble is 10101010 • The last byte is 10101011 • The first seven bytes of the preamble serve to "wake up" the receiving adapters and to synchronize their clocks to that of the sender's clock • At the receiver side: • NIC senses the cable for current • Current is there: synchronize clock according to the sender clock (preamble) • Data received 10101011  End of preamble  Start of Data • No current  End of frame

  8. Ethernet – Sender side 1-persistent protocol • Sender has frame to transmit • Sender listens to the medium • If line is busy, wait until free • Transmit frame immediately p-persistent protocol • Sender has frame to transmit • Sender listens to the medium • If line is busy, wait until free • Transmit frame immediately with probability p, defer to another host with probability q=1-p. Question: What happens when more than one host decides to transmit at the same time?

  9. MAC protocols - Recall Three broad classes: • Channel Partitioning • divide channel into smaller “pieces” (time slots, frequency, code) • allocate piece to node for exclusive use • Random Access • channel not divided, allow collisions • “recover” from collisions • “Taking turns” • Nodes take turns, but nodes with more to send can take longer turns

  10. CSMA / CD • CSMA Cannot prevent all possible conflicts • Interference between two signals is called collision • Collision does not harm the hardware • Collision is allowed • Ethernet standard requires the sender to monitor signals on the cable (collision detection CD) • When collision is detected • Stop and wait for the Ether to idle • After the Ether is idle • Select a random number between 0 and d (delay) • Wait (back off) • When random number time out, restart transmission • If collision occurs again, the delay is doubled (exponential back off)

  11. CSMA / CD Host A listens and finds the bus idle. Host A starts TX. Host B starts TX. Host A detects collision. Host B completes TX. Host A backs off. COLLISION! Host B backs off. time Host B listens and finds the bus idle. Host B detects collision. Host B listens and finds the bus idle. Host B starts TX.

  12. Collision detection • collisions detected within short time • colliding transmissions aborted, reducing channel wastage • easy in wired LANs: measure signal strengths, compare transmitted, received signals • When a host detects a collision, it first transmits a 32-bit jamming sequence (plus preamble) and then stops the transmission (a total of 96 bits) • The objective of Jam sequence is to make sure that all other transmitters are aware of collision • If collision is far, more than 32-bit are needed • Ethernet’s shortest frame size is chosen to be 512 bits…

  13. Ethernet Efficiency The efficiency of an Ethernet can be determined using a relatively simple formula Example: • cable is 300 meters long, so τ is 300/(300*106) • Packet is 1000 bytes long, bandwidth 10 Mbps • a = 0.00125 • ρ = 1/(1+6.44*0.00125) = 0.99 • If bandwidth  Efficiency  where τ: end-to-end propagation time (length / Speed) T: transmission time of a packet (Size / bandwidth)

  14. Ethernet Type Field • Two bytes • Permits Ethernet to "multiplex" network-layer protocols • hosts can use other network-layer protocols besides IP • A host may support multiple network layer protocols, and use different protocols for different applications • When the Ethernet frame arrives at adapter B, it needs to know to which network-layer protocol it should pass the contents of the data field • Example: the ARP protocol has its own type number (0x806)

  15. Ethernet Star Topology • Bus topology popular through mid 90s • Now star topology prevails • Connection choices: hub or switch hub or switch

  16. twisted pair hub Ethernet Technologies • 10Base2: thin coaxial cable in a bus topology. Transmission rate is 10Mbps (2 for 200m the maximum distance between two nodes without repeaters) • 10BaseT: which uses twisted-pair cooper wire in a star topology and has a transmission rate of 10 Mbps (T for twisted 10 for the speed) • 100 m max distance between nodes and hub

  17. Gigabit Ethernet • Gigabit Ethernet is an extension to the highly successful 10 Mbps and 100 Mbps Ethernet standards • Offers a raw data rate of 1000 Mbps • Full compatibility with the installed base of Ethernet equipment. • The standard for Gigabit Ethernet is IEEE 802.3z • Uses the standard Ethernet frame format • Allows for point-to-point links as well as shared broadcast channels. • Point-to-point links use switches • broadcast channels use hubs "buffered distributors" • Uses CSMA/CD for shared broadcast channels. In order to have acceptable efficiency, the maximum distance between nodes must be severely restricted. • Allows for full-duplex operation at 1000 Mbps in both directions for point-to-point channels.

  18. Interconnectors • Repeater: to connected two Ether cables • bits coming from one link go out to the other links • at the same rate • no frame buffering • Collision transmitted also • Bridge: electronic device (processor, memory …) • Bridges are repeaters and more • Help isolate the problems • Discard frames with errors • Frame filtering • Bridge knows if he needs to send a frame from one segment to another

  19. Bridge – Self learning Example: consider the following LAN Segment 1 Segment 2 X Y Z Bridge A B C

  20. Planning a Bridged Network • Performance on a bridged network can be maximized by attaching a set of computers that interact frequently to the same segment • In addition to filtering, bridges perform buffering (frames might arrive faster than they can be processed) • Cycles in a bridged network • If all bridges are functional, a broadcasting frame will cycle forever in the network Bridge Bridge Bridge Bridge

  21. Distributed Spanning Tree • To prevent the problem of infinite loops. A bridged network must not allow both of the following conditions to occur simultaneously • All bridges forward all frames • The bridged network contains a cycle of bridged segments At boot time: bridges perform a computation know as DST (distributed spanning tree) algorithm to determine which bridges will not forward frames DST Algorithm Applies on a network with N nodes (bridges) and M edges Objective is to select N-1 edge such that: • There is a path between each pair of nodes

  22. x z w u y v DST algorithm • Step 1: • Set S={a node selected Randomly} , U=N/S • Step 2: • Select any edge (a, b) such that a  S and b  U • Add b to S • Step 3: • Repeat step 2 until the number of chosen edges = the number of nodes -1 Example: S= {u} U={v, w, x, y, z} S={u, w} U={v, x, y, z} S={u, w, y} U={v, x, z} S={u, w, y, z} U={v, x} S={u, w, x, y, z} U={v} S={u, v, w, x, y, z} U=

  23. Interconnectors • 4 ports Hub or Switch • Hub: connectors are repeaters • Switch: connectors are bridges C C C C C C connector C

  24. LAB: Bridge learning • Consider the following network • The objective is to see how bridgesswitch learn how to route frames • When starting this network • ARP tables on hosts are empty arp –a to verify • Learning in Switch is empty (except for the router)

  25. LAB: Bridge learning • From PC0 ping PC3 • From PC3 ping PC0 • Check the ARP table of PC0 and PC3 • Check the mac-address-table of the Switch

  26. LAB: Bridge learning • Switch to simulation mode • From PC0 ping PC3 • Notice the ICMP message goes directly from PC0 to PC3 • Complete the ping (realtime mode) • From the client screen of the switch clean the mac-address-table clear mac-address-table dynamic • Back to simulation mode • From PC0 ping PC3 • Notice the behavior of the Bridge

More Related