Published on

  • Be the first to comment

  • Be the first to like this

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • The Link Layer / Continued On Friday, we began our look at the link layer. We identified the basic services associated with the link layer and explored its error detection/correction capabilities. Today, we list the multiple access control protocols available in the link layer. Then we continue with a survey of Local area network (LAN) addressing and the address resolution protocol – ARP. We also take a close look at Ethernet the standard protocol for most local area network environments and, further, look at some of the hardware associated with LAN implementations.
  • Enough about error detection; I hope you get the idea of its necessity and the fact that there are a number of ways to accomplish it. Multiple Access Protocols Our next topic addresses the need to examine traffic that flows over a given link but which interconnects many nodes, all of which are capable of sending packets onto the link at any given time and in potential conflict with one another.
  • Recall, there are two types of network links Point-to-point / single sender & single receiver at opposite ends of a given link and Broadcast links, which comprise the more commonly found Traditional Ethernet Shared wireless / 802.11 Satellite transmitted
  • This second environment is our focus for the next few minutes. A shared broadcast channel implies conflict or interference Requires implementation of a multiple access protocol which Determines how nodes share the channel and exactly when they can safely transmit Control communications use the same channel So what characteristics does such a protocol need?
  • Ideally, a multiple access protocol Enables a node to transmit when necessary using the full bandwidth of the channel If there are multiple nodes, each should be able to transmit with an average rate of R/M at worst Decentralized to reduce overhead and improve efficiency Easy and inexpensive to implement
  • There are three classes of Multiple Access Control Protocols, that is to say there are three ways engineers have attempted to solve the problem Channel partitioning Divide channel into small pieces Allocate pieces to each sharing node Random access, which Allows collisions But then must be able to recover from these collisions Taking turns which employs a rigidly controlled sharing of the channel in order to avoid collisions in the first place
  • Taking each of these approaches individually, let’s begin by looking at Channel Partitioning Early in the course – Chapter 1 introduced us to two distinct methods of sharing channel bandwidth. One was Time division multiple access (TDMA) Characteristics from the slide itself Wasted bandwidth
  • We also saw how the frequency could be equally allocated in FDMA / Frequency Division Multiple Access Again with some interesting results And again with wasted bandwidth
  • CDMA / Code Division Multiple Access A third method – CDMA – seeks to improve the use of available bandwidth; it does so Allowing multiple users to coexist and Transmit simultaneously with minimal interference Details of how CDMA works are explained in the text CDMA hampered by two different issues Codes are not easily defined Strength of sender signals must be consistent Neither problem is easy to solve
  • Moving on to Random Access protocols Characteristics of this class are If a node has something to send, it just sends it This approach results in collisions Protocol, therefore, must Detect when collisions occur and Proceed to recover from them Some common Random Access MAC protocols include ALOHA & Slotted ALOHA CSMA
  • Slotted ALOHA is perhaps the easiest to understand, so we’ll look, in detail, at it Some assumptions All frames are the same size Time is divided into equal increments, what time is required to transmit a single frame Nodes are synchronized All nodes detect all collisions Operationally Send while you can philosophy If a collision occurs, try again in the next slot
  • Visually, slotted ALOHA might take on this appearance in a scaled back example. As you can see, there are both advantages and disadvantages. Pros / these are characteristics that we wanted our protocol to possess Cons / Nodes will refrain from transmitting if they detect a collision, which can hamper the overall efficiency of the protocol’s operation Let’s take a closer look at the efficiency issue.
  • Determination of the efficiency of Slotted ALOHA is great fun and a bit of real mathematics How does one go about finding this p* that maximizes the expression Np(1 – p) N-1 ? Notes on p 13a
  • Unslotted, also known as pure, ALOHA Uses no synchronization Frame arrives  it gets transmitted This increases the probability of a collision occurrence
  • Using the same procedure we employed for finding p* as well as the limit process, it can be shown that pure ALOHA has an efficiency of 1/2e.
  • A third random access protocol, known as CSMA, employs the tactic of Listen before transmitting If channel is busy, delay At an appropriate later time, listen again
  • Note: collisions can still occur because of propagation delays in the channel We’d like to be able to avoid the wasted time if there was some way to do so
  • So, a modification to CSMA, with collision detection provides an improvement Colliding transmissions are detected and aborted This strategy works well in a hard-wired environment, but not so well in wireless LANs
  • Taking Turns And yet another category of protocols for multiple access was brought into being. This final class of MAC protocols is known as taking turns and it attempts to incorporate the best aspects of channel partitioning and random access.
  • To do so, it uses polling or, in another manifestation, token passing. Characteristics of polling Uses a master node Not widely implemented for obvious reasons Characteristics of token passing No master is required Just as much overhead Many of the same concerns These protocols were once in wide use in early networks.
  • The examination of each method and protocol points to no clear winner. As we will see later today and some tomorrow, the implementation of specific LAN technologies will provide some clearer insight.
  • We’ll next take a quick look at LAN addresses and the Address Resolution Protocol
  • LAN Addresses We have seen so far that, by use of a broadcast channel, a frame is sent to each node of the LAN. Seems like a bit of wasted effort, but it is necessary. Furthermore Proper receipt is accomplished by If the destination address matches the receiving node’s address, the node extracts the network-layer datagram and sends it up the protocol stack. If the addresses are not the same, the node simply discards the frame In this section, we explore some of the LAN technologies that support such action.
  • 32-bit address / recall the IP address configuration designed to get the datagram to the destination network Using the address mask Network layer There is another piece to this addressing magic / MAC address also commonly called by other names – LAN address, physical address, and even Ethernet address Enables delivery from one interface adaptor to another within a given network Uses this MAC address A 48-bit address Permanently stored in the ROM of the NIC
  • (continued) Each node, by way of its adaptor interface has a unique address { Go through the steps to show how one finds the local host MAC address. }
  • Characteristics of MAC addresses Allocation of MAC addresses is administered by IEEE A manufacturer of NICs purchases an address space (usually in the range of multiples of 224 addresses for some nominal fee) and burns one address from that range into the ROM during manufacturing of a single NIC. Analogy / see above The address goes with the adaptor card as opposed to The IP address which is not portable
  • It would be fair to ask why is such a flat address structure necessary if an IP address already uniquely identifies a node. Some networks use other addressing protocols IPX / Novell DECnet This design ensures adaptability It also completes the addressing hierarchy Application name / host name Network layer / IP address Link Layer / LAN address
  • Address Resolution Protocol A method is needed to translate between the address understood at the two layers Translation is accomplished by use of the ARP table Resident in each host Uses a triple / 3-tuple < IP address, LAN address, ttl >
  • Functioning of the ARP protocol First there is a need to send MAC address not in A’s ARP table A broadcasts B’s IP address in the form of an ARP query to all machines in the LAN B receives the ARP packet; replies with its MAC address to A A caches the MAC address Note: ARP is a plug-and-play process
  • Suppose the datagram is being sent beyond the boundaries of the LAN Since the IP address of B is known to R, A seeks assistance from the router which contains an interface to both LANs. The router contains an ARP table for each interface.
  • So, even though there are a few more discrete steps in the process, functionally the protocol works in a consistent way. { Trace the steps. }
  • Ethernet Clearly Ethernet is the dominant link layer technology of the Internet As recently as the early 90s, there was still a fair amount of competition Token ring / IBM FDDI / Fiber Distributed Data Interface ATM / Asynchronous Transfer Mode Reasons it won Cheap Simple Robust
  • The Ethernet Frame Structure This frame structure is universal regardless of whether it is running on Coaxial cable Copper wire Or whether it runs at 10 Mbps 100 Mbps 1 Gbps Components consist of Preamble / 8 bytes 10101010 10101010 10101010 10101011 used to wake up the receiver and synchronize the clock rates of the sender and receiver; different last two bits  ‘here comes the real stuff’
  • Components of the Ethernet frame (continued) Addresses / these are the LAN (MAC) addresses Type / supports IPX / Novell AppleTalk Others Data CRC / preamble bits not included in the error checking
  • Ethernet is Connectionless service that is Unreliable Data streams are passed to the network layer TCP will handle the gaps If TCP not used, gaps will happen
  • Ethernet employs CSMA/CD; recall that Transmission occurs only when it senses no other adaptor broadcasting An abort occurs when a collision is detected Followed by a random amount of wait time
  • Efficiency / we define the efficiency of Ethernet to be the long run fraction of time during which frames are being transmitted on the channel without collisions when there is a large number of active nodes, with each node having a large number of frames to send. As t prop  0, eff  1 this should support our intuition that if propagation delay is very small, colliding node messages will abort immediately without wasting the channel As t trans gets very large, again eff is good, i.e. goes to 1 this is also intuitive because when a frame grabs a channel, it will hold on to the channel for a very long time; thus the channel will be doing productive work
  • Ethernet technologies 10Base2 / the old Ethernet coax 10 Mbps Max 200 meter cable length Bus topology Use of repeaters Physical layer device only Legacy status
  • 10BaseT / 100BaseT Prefix number is the transmission rate in Mbps T / twisted pair cable Nodes are connected in a star topology Use of Hubs as repeaters
  • Gigabit Ethernet Uses standard frame format Shared broadcast channels Buffered distribution Full duplex capability And 10 Gbit is not far away
  • Hubs, Bridges, & Switches Our examination of the link layer would be incomplete without a discussion of the devices required for connecting LANs.
  • There are three types of devices we’ll discuss Hubs Bridges Switches
  • Hubs Characteristics Simplest way to interconnect LAN segments Can be used as a signal booster Drawback / segment collisions interplay across the entire domain No type crossovers without special interface devices 10BaseT ↔ 100BaseT Physical layer devices
  • Because a hub is a physical layer device there are additional constraints imposed at the physical level There is an upper limit on the number of nodes within a collision domain. There is also a maximum allowable distance between two hosts that are in the same collision domain. Finally, if a multiple-tier design is employed, there is a limit to the number of tiers that can be used. ‘ You can’t stack more than 3 hubs in a collision domain.’
  • Bridges Characteristics Link layer device (level 2) Full-fledged packet switch Forwards Ethernet frames Processes frame header Uses CSMA/CD Transparent to host devices Plug-and-play capable
  • Traffic isolation is an important part of a Bridge’s work Divides a LAN into segments Each of which becomes its own collision domain A segment-specific frame will not be forwarded to a different LAN segment Even though the several segments comprise a single LAN
  • When forwarding to a different LAN segment does become necessary, standard routing algorithms are employed.
  • Forwarding (continued) Each bridge contains a table < LAN address, Bridge IF No., Time Stamp > Bridges are smart devices Receipt of a fresh frame  processing Storing of sender information into bridge table
  • The filtering / forwarding algorithm is fairly straightforward A frame is received Table index is searched for MAC address if found then if on segment then drop else forward on interface # in table else flood { send frame to all interfaces except that one from which it originally arrived }
  • This example illustrates the algorithm implementation { Go through each specific step }
  • { Continue the steps of the example. }
  • The configuration / placement of a bridge within the LAN does make a difference This option is clearly not the best for the two reasons given.
  • This one is much better.
  • Reviewing the features of a bridge Isolates collision domains Removes the ceiling on number of nodes and geographical constraints Transparent Plug-and-play Minimizes configuration overhead
  • Bridges versus Routers It is useful to compare the bridge to the router as an interconnection device, noting both devices store and forward packets. Bridges Routers Link layer Network layer using LAN addresses using IP addresses Bridge Tables Routing Tables Implement Filtering Routing algorithms Smart device Employs Spanning-tree algorithms
  • Bridges { more specifically } Advantages Simpler / fewer packets to process Bridge tables are self-learning Disadvantages All traffic is confined to a spanning tree No protection from broadcast storms
  • Specific Router +s / -s Advantages Broader support of arbitrary technologies Protection against broadcast storms Disadvantages Not plug-and-play, i.e. they must be IP address configured Traffic is much more dense Summary Bridges excel in small networks / O(100s) Routers have the edge in large networks / O(1000s)
  • Ethernet Switches Characteristics Essentially a multiple-interface bridge Layer-2 operation ( the link layer }, i.e. uses LAN addresses to filter and forward Eliminates collisions by providing dedicated access to each host Still maintains all the advantages of Ethernet
  • Characteristics (continued) Employs cut-through switching, which is essentially an improvement in the efficiency of moving a packet from the input port through the switching fabric to the output port Frame portion is sent in absence of the entire frame Improves latency problems a bit Also supports the interconnection of multi-type interfaces
  • A typical setup / not much different from the Centre College configuration
  • A summary comparison of the devices we’ve talked about this morning.
  • Tomorrow, we’ll wrap up the loose ends.
  • web.centre.edu

    1. 1. CSC 250 Introduction to Networking Fundamentals Class Meeting 11
    2. 2. Chapter 5 outline <ul><li>5.1 Introduction and services </li></ul><ul><li>5.2 Error detection and correction </li></ul><ul><li>5.3Multiple access protocols </li></ul><ul><li>5.4 LAN addresses and ARP </li></ul><ul><li>5.5 Ethernet </li></ul><ul><li>5.6 Hubs, bridges, and switches </li></ul><ul><li>5.7 Wireless links and LANs </li></ul><ul><li>5.8 PPP </li></ul><ul><li>5.9 ATM </li></ul><ul><li>5.10 Frame Relay </li></ul>
    3. 3. Multiple Access Links and Protocols <ul><li>Two types of “links”: </li></ul><ul><li>point-to-point </li></ul><ul><ul><li>PPP for dial-up access </li></ul></ul><ul><ul><li>point-to-point link between Ethernet switch and host </li></ul></ul><ul><li>broadcast (shared wire or medium) </li></ul><ul><ul><li>traditional Ethernet </li></ul></ul><ul><ul><li>upstream HFC </li></ul></ul><ul><ul><li>802.11 wireless LAN </li></ul></ul>
    4. 4. Multiple Access protocols <ul><li>single shared broadcast channel </li></ul><ul><li>two or more simultaneous transmissions by nodes: interference </li></ul><ul><ul><li>only one node can send successfully at a time </li></ul></ul><ul><li>multiple access protocol </li></ul><ul><li>distributed algorithm that determines how nodes share channel, i.e., determine when node can transmit </li></ul><ul><li>communication about channel sharing must use channel itself! </li></ul><ul><li>what to look for in multiple access protocols: </li></ul>
    5. 5. Ideal Mulitple Access Protocol <ul><li>Broadcast channel of rate R bps </li></ul><ul><li>1. When one node wants to transmit, it can send at rate R. </li></ul><ul><li>2. When M nodes want to transmit, each can send at average rate R/M </li></ul><ul><li>3. Fully decentralized: </li></ul><ul><ul><li>no special node to coordinate transmissions </li></ul></ul><ul><ul><li>no synchronization of clocks, slots </li></ul></ul><ul><li>4. Simple </li></ul>
    6. 6. MAC Protocols: a taxonomy <ul><li>Three broad classes: </li></ul><ul><li>Channel Partitioning </li></ul><ul><ul><li>divide channel into smaller “pieces” (time slots, frequency, code) </li></ul></ul><ul><ul><li>allocate piece to node for exclusive use </li></ul></ul><ul><li>Random Access </li></ul><ul><ul><li>channel not divided, allow collisions </li></ul></ul><ul><ul><li>“ recover” from collisions </li></ul></ul><ul><li>“ Taking turns” </li></ul><ul><ul><li>tightly coordinate shared access to avoid collisions </li></ul></ul>
    7. 7. Channel Partitioning MAC protocols: TDMA <ul><li>TDMA: time division multiple access </li></ul><ul><li>access to channel in &quot;rounds&quot; </li></ul><ul><li>each station gets fixed length slot (length = pkt trans time) in each round </li></ul><ul><li>unused slots go idle </li></ul><ul><li>example: 6-station LAN, 1,3,4 have pkt, slots 2,5,6 idle </li></ul><ul><li>TDM (Time Division Multiplexing): channel divided into N time slots, one per user; inefficient with low duty cycle users and at light load. </li></ul><ul><li>FDM (Frequency Division Multiplexing): frequency subdivided. </li></ul>
    8. 8. Channel Partitioning MAC protocols: FDMA <ul><li>FDMA: frequency division multiple access </li></ul><ul><li>channel spectrum divided into frequency bands </li></ul><ul><li>each station assigned fixed frequency band </li></ul><ul><li>unused transmission time in frequency bands go idle </li></ul><ul><li>example: 6-station LAN, 1,3,4 have pkt, frequency bands 2,5,6 idle </li></ul><ul><li>TDM (Time Division Multiplexing): channel divided into N time slots, one per user; inefficient with low duty cycle users and at light load. </li></ul><ul><li>FDM (Frequency Division Multiplexing): frequency subdivided. </li></ul>frequency bands time
    9. 9. Channel Partitioning (CDMA) <ul><li>CDMA (Code Division Multiple Access) </li></ul><ul><li>unique “code” assigned to each user; i.e., code set partitioning </li></ul><ul><li>used mostly in wireless broadcast channels (cellular, satellite, etc) </li></ul><ul><li>all users share same frequency, but each user has own “chipping” sequence (i.e., code) to encode data </li></ul><ul><li>encoded signal = (original data) X (chipping sequence) </li></ul><ul><li>decoding: inner-product of encoded signal and chipping sequence </li></ul><ul><li>allows multiple users to “coexist” and transmit simultaneously with minimal interference (if codes are “orthogonal”) </li></ul>
    10. 10. Random Access Protocols <ul><li>When node has packet to send </li></ul><ul><ul><li>transmit at full channel data rate R. </li></ul></ul><ul><ul><li>no a priori coordination among nodes </li></ul></ul><ul><li>two or more transmitting nodes -> “collision”, </li></ul><ul><li>random access MAC protocol specifies: </li></ul><ul><ul><li>how to detect collisions </li></ul></ul><ul><ul><li>how to recover from collisions (e.g., via delayed retransmissions) </li></ul></ul><ul><li>Examples of random access MAC protocols: </li></ul><ul><ul><li>slotted ALOHA </li></ul></ul><ul><ul><li>ALOHA </li></ul></ul><ul><ul><li>CSMA, CSMA/CD, CSMA/CA </li></ul></ul>
    11. 11. Slotted ALOHA <ul><li>Assumptions </li></ul><ul><li>all frames same size </li></ul><ul><li>time is divided into equal size slots, time to transmit 1 frame </li></ul><ul><li>nodes start to transmit frames only at beginning of slots </li></ul><ul><li>nodes are synchronized </li></ul><ul><li>if 2 or more nodes transmit in slot, all nodes detect collision </li></ul><ul><li>Operation </li></ul><ul><li>when node obtains fresh frame, it transmits in next slot </li></ul><ul><li>no collision, node can send new frame in next slot </li></ul><ul><li>if collision, node retransmits frame in each subsequent slot with prob. p until success </li></ul>
    12. 12. Slotted ALOHA <ul><li>Pros </li></ul><ul><li>single active node can continuously transmit at full rate of channel </li></ul><ul><li>highly decentralized: only slots in nodes need to be in sync </li></ul><ul><li>simple </li></ul><ul><li>Cons </li></ul><ul><li>collisions, wasting slots </li></ul><ul><li>idle slots </li></ul><ul><li>nodes may be able to detect collision in less than time to transmit packet </li></ul>
    13. 13. Slotted Aloha efficiency <ul><li>Suppose N nodes with many frames to send, each transmits in slot with probability p </li></ul><ul><li>prob that 1st node has success in a slot = p(1-p) N-1 </li></ul><ul><li>prob that any node has a success = Np(1-p) N-1 </li></ul><ul><li>For max efficiency with N nodes, find p* that maximizes Np(1-p) N-1 </li></ul><ul><li>For many nodes, take limit of Np*(1-p*) N-1 as N goes to infinity, gives 1/e = .37 </li></ul>Efficiency is the long-run fraction of successful slots when there’s many nodes, each with many frames to send At best: channel used for useful transmissions 37% of time!
    14. 14. Pure (unslotted) ALOHA <ul><li>unslotted Aloha: simpler, no synchronization </li></ul><ul><li>when frame first arrives </li></ul><ul><ul><li>transmit immediately </li></ul></ul><ul><li>collision probability increases: </li></ul><ul><ul><li>frame sent at t 0 collides with other frames sent in [t 0 -1,t 0 +1] </li></ul></ul>
    15. 15. Pure Aloha efficiency <ul><li>P(success by given node) = P(node transmits) . </li></ul><ul><li>P(no other node transmits in [p 0 -1,p 0 ] . </li></ul><ul><li>P(no other node transmits in [p 0 -1,p 0 ] </li></ul><ul><li>= p . (1-p) N-1 . (1-p) N-1 </li></ul><ul><li>= p . (1-p) 2(N-1) </li></ul><ul><li>… choosing optimum p and then letting n -> infty ... </li></ul><ul><li> = 1/(2e) = .18 </li></ul>Even worse !
    16. 16. CSMA (Carrier Sense Multiple Access) <ul><li>CSMA : listen before transmit: </li></ul><ul><li>If channel sensed idle: transmit entire frame </li></ul><ul><li>If channel sensed busy, defer transmission </li></ul><ul><li>Human analogy: don’t interrupt others! </li></ul>
    17. 17. CSMA collisions collisions can still occur: propagation delay means two nodes may not hear each other’s transmission collision: entire packet transmission time wasted spatial layout of nodes note: role of distance & propagation delay in determining collision probability
    18. 18. CSMA/CD (Collision Detection) <ul><li>CSMA/CD: carrier sensing, deferral as in CSMA </li></ul><ul><ul><li>collisions detected within short time </li></ul></ul><ul><ul><li>colliding transmissions aborted, reducing channel wastage </li></ul></ul><ul><li>collision detection: </li></ul><ul><ul><li>easy in wired LANs: measure signal strengths, compare transmitted, received signals </li></ul></ul><ul><ul><li>difficult in wireless LANs: receiver shut off while transmitting </li></ul></ul><ul><li>human analogy: the polite conversationalist </li></ul>
    19. 19. “Taking Turns” MAC protocols <ul><li>channel partitioning MAC protocols: </li></ul><ul><ul><li>share channel efficiently and fairly at high load </li></ul></ul><ul><ul><li>inefficient at low load: delay in channel access, 1/N bandwidth allocated even if only 1 active node! </li></ul></ul><ul><li>Random access MAC protocols </li></ul><ul><ul><li>efficient at low load: single node can fully utilize channel </li></ul></ul><ul><ul><li>high load: collision overhead </li></ul></ul><ul><li>“ taking turns” protocols </li></ul><ul><ul><li>look for best of both worlds! </li></ul></ul>
    20. 20. “Taking Turns” MAC protocols <ul><li>Polling: </li></ul><ul><li>master node “invites” slave nodes to transmit in turn </li></ul><ul><li>concerns: </li></ul><ul><ul><li>polling overhead </li></ul></ul><ul><ul><li>latency </li></ul></ul><ul><ul><li>single point of failure (master) </li></ul></ul><ul><li>Token passing: </li></ul><ul><li>control token passed from one node to next sequentially. </li></ul><ul><li>token message </li></ul><ul><li>concerns: </li></ul><ul><ul><li>token overhead </li></ul></ul><ul><ul><li>latency </li></ul></ul><ul><ul><li>single point of failure (token) </li></ul></ul>
    21. 21. Summary of MAC protocols <ul><li>What do you do with a shared media? </li></ul><ul><ul><li>Channel Partitioning, by time, frequency or code </li></ul></ul><ul><ul><ul><li>Time Division,Code Division, Frequency Division </li></ul></ul></ul><ul><ul><li>Random partitioning (dynamic), </li></ul></ul><ul><ul><ul><li>ALOHA, S-ALOHA, CSMA, CSMA/CD </li></ul></ul></ul><ul><ul><ul><li>carrier sensing: easy in some technologies (wire), hard in others (wireless) </li></ul></ul></ul><ul><ul><ul><li>CSMA/CD used in Ethernet </li></ul></ul></ul><ul><ul><li>Taking Turns </li></ul></ul><ul><ul><ul><li>polling from a central site, token passing </li></ul></ul></ul>
    22. 22. Chapter 5 outline <ul><li>5.1 Introduction and services </li></ul><ul><li>5.2 Error detection and correction </li></ul><ul><li>5.3Multiple access protocols </li></ul><ul><li>5.4 LAN addresses and ARP </li></ul><ul><li>5.5 Ethernet </li></ul><ul><li>5.6 Hubs, bridges, and switches </li></ul><ul><li>5.7 Wireless links and LANs </li></ul><ul><li>5.8 PPP </li></ul><ul><li>5.9 ATM </li></ul><ul><li>5.10 Frame Relay </li></ul>
    23. 23. LAN technologies <ul><li>Data link layer so far: </li></ul><ul><ul><li>services, error detection/correction, multiple access </li></ul></ul><ul><li>Next: LAN technologies </li></ul><ul><ul><li>addressing </li></ul></ul><ul><ul><li>Ethernet </li></ul></ul><ul><ul><li>hubs, bridges, switches </li></ul></ul><ul><ul><li>802.11 </li></ul></ul><ul><ul><li>PPP </li></ul></ul><ul><ul><li>ATM </li></ul></ul>
    24. 24. LAN Addresses and ARP <ul><li>32-bit IP address: </li></ul><ul><li>network-layer address </li></ul><ul><li>used to get datagram to destination IP network (recall IP network definition) </li></ul><ul><li>LAN (or MAC or physical or Ethernet) address: </li></ul><ul><li>used to get datagram from one interface to another physically-connected interface (same network) </li></ul><ul><li>48 bit MAC address (for most LANs) burned in the adapter ROM </li></ul>
    25. 25. LAN Addresses and ARP Each adapter on LAN has unique LAN address
    26. 26. LAN Address (more) <ul><li>MAC address allocation administered by IEEE </li></ul><ul><li>manufacturer buys portion of MAC address space (to assure uniqueness) </li></ul><ul><li>Analogy: </li></ul><ul><li>(a) MAC address: like Social Security Number </li></ul><ul><li>(b) IP address: like postal address </li></ul><ul><li>MAC flat address => portability </li></ul><ul><ul><li>can move LAN card from one LAN to another </li></ul></ul><ul><li>IP hierarchical address NOT portable </li></ul><ul><ul><li>depends on IP network to which node is attached </li></ul></ul>
    27. 27. Recall earlier routing discussion <ul><li>Starting at A, given IP datagram addressed to B: </li></ul><ul><li>look up net. address of B, find B on same net. as A </li></ul><ul><li>link layer send datagram to B inside link-layer frame </li></ul>B’s MAC addr A’s MAC addr A’s IP addr B’s IP addr IP payload datagram frame frame source, dest address datagram source, dest address A B E
    28. 28. ARP: Address Resolution Protocol <ul><li>Each IP node (Host, Router) on LAN has ARP table </li></ul><ul><li>ARP Table: IP/MAC address mappings for some LAN nodes </li></ul><ul><li>< IP address; MAC address; TTL> </li></ul><ul><ul><li>TTL (Time To Live): time after which address mapping will be forgotten (typically 20 min) </li></ul></ul>Question: how to determine MAC address of B knowing B’s IP address?
    29. 29. ARP protocol <ul><li>A wants to send datagram to B, and A knows B’s IP address. </li></ul><ul><li>Suppose B’s MAC address is not in A’s ARP table. </li></ul><ul><li>A broadcasts ARP query packet, containing B's IP address </li></ul><ul><ul><li>all machines on LAN receive ARP query </li></ul></ul><ul><li>B receives ARP packet, replies to A with its (B's) MAC address </li></ul><ul><ul><li>frame sent to A’s MAC address (unicast) </li></ul></ul><ul><li>A caches (saves) IP-to-MAC address pair in its ARP table until information becomes old (times out) </li></ul><ul><ul><li>soft state: information that times out (goes away) unless refreshed </li></ul></ul><ul><li>ARP is “plug-and-play”: </li></ul><ul><ul><li>nodes create their ARP tables without intervention from net administrator </li></ul></ul>
    30. 30. Routing to another LAN <ul><li>walkthrough: send datagram from A to B via R </li></ul><ul><li>assume A know’s B IP address </li></ul><ul><li>Two ARP tables in router R, one for each IP network (LAN) </li></ul><ul><li>In routing table at source Host, find router </li></ul><ul><li>In ARP table at source, find MAC address E6-E9-00-17-BB-4B, etc </li></ul>A R B
    31. 31. <ul><li>A creates datagram with source A, destination B </li></ul><ul><li>A uses ARP to get R’s MAC address for </li></ul><ul><li>A creates link-layer frame with R's MAC address as dest, frame contains A-to-B IP datagram </li></ul><ul><li>A’s data link layer sends frame </li></ul><ul><li>R’s data link layer receives frame </li></ul><ul><li>R removes IP datagram from Ethernet frame, sees its destined to B </li></ul><ul><li>R uses ARP to get B’s physical layer address </li></ul><ul><li>R creates frame containing A-to-B IP datagram sends to B </li></ul>A R B
    32. 32. Ethernet <ul><li>“ dominant” LAN technology: </li></ul><ul><li>cheap $20 for 100Mbs! </li></ul><ul><li>first widely used LAN technology </li></ul><ul><li>Simpler, cheaper than token LANs and ATM </li></ul><ul><li>Kept up with speed race: 10, 100, 1000 Mbps </li></ul>Metcalfe’s Ethernet sketch
    33. 33. Ethernet Frame Structure <ul><li>Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame </li></ul><ul><li>Preamble: </li></ul><ul><li>7 bytes with pattern 10101010 followed by one byte with pattern 10101011 </li></ul><ul><li>used to synchronize receiver, sender clock rates </li></ul>
    34. 34. Ethernet Frame Structure <ul><li>Addresses: 6 bytes </li></ul><ul><ul><li>if adapter receives frame with matching destination address, or with broadcast address (eg ARP packet), it passes data in frame to net-layer protocol </li></ul></ul><ul><ul><li>otherwise, adapter discards frame </li></ul></ul><ul><li>Type: indicates the higher layer protocol, mostly IP but others may be supported such as Novell IPX and AppleTalk) </li></ul><ul><li>CRC: checked at receiver, if error is detected, the frame is simply dropped </li></ul>
    35. 35. Unreliable, connectionless service <ul><li>Connectionless: No handshaking between sending and receiving adapter. </li></ul><ul><li>Unreliable: receiving adapter doesn’t send acks or nacks to sending adapter </li></ul><ul><ul><li>stream of datagrams passed to network layer can have gaps </li></ul></ul><ul><ul><li>gaps will be filled if app is using TCP </li></ul></ul><ul><ul><li>otherwise, app will see the gaps </li></ul></ul>
    36. 36. Ethernet uses CSMA/CD <ul><li>No slots </li></ul><ul><li>adapter doesn’t transmit if it senses that some other adapter is transmitting, that is, carrier sense </li></ul><ul><li>transmitting adapter aborts when it senses that another adapter is transmitting, that is, collision detection </li></ul><ul><li>Before attempting a retransmission, adapter waits a random time, that is, random access </li></ul>
    37. 37. CSMA/CD efficiency <ul><li>T prop = max prop between 2 nodes in LAN </li></ul><ul><li>t trans = time to transmit max-size frame </li></ul><ul><li>Efficiency goes to 1 as t prop goes to 0 </li></ul><ul><li>Goes to 1 as t trans goes to infinity </li></ul><ul><li>Much better than ALOHA, but still decentralized, simple, and cheap </li></ul>
    38. 38. Ethernet Technologies: 10Base2 <ul><li>10: 10Mbps; 2: under 200 meters max cable length </li></ul><ul><li>thin coaxial cable in a bus topology </li></ul><ul><li>repeaters used to connect up to multiple segments </li></ul><ul><li>repeater repeats bits it hears on one interface to its other interfaces: physical layer device only! </li></ul><ul><li>has become a legacy technology </li></ul>
    39. 39. 10BaseT and 100BaseT <ul><li>10/100 Mbps rate; latter called “fast ethernet” </li></ul><ul><li>T stands for Twisted Pair </li></ul><ul><li>Nodes connect to a hub: “star topology”; 100 m max distance between nodes and hub </li></ul><ul><li>Hubs are essentially physical-layer repeaters: </li></ul><ul><ul><li>bits coming in one link go out all other links </li></ul></ul><ul><ul><li>no frame buffering </li></ul></ul><ul><ul><li>no CSMA/CD at hub: adapters detect collisions </li></ul></ul><ul><ul><li>provides net management functionality </li></ul></ul>hub nodes
    40. 40. Gbit Ethernet <ul><li>use standard Ethernet frame format </li></ul><ul><li>allows for point-to-point links and shared broadcast channels </li></ul><ul><li>in shared mode, CSMA/CD is used; short distances between nodes to be efficient </li></ul><ul><li>uses hubs, called here “Buffered Distributors” </li></ul><ul><li>Full-Duplex at 1 Gbps for point-to-point links </li></ul><ul><li>10 Gbps now ! </li></ul>
    41. 41. Chapter 5 outline <ul><li>5.1 Introduction and services </li></ul><ul><li>5.2 Error detection and correction </li></ul><ul><li>5.3Multiple access protocols </li></ul><ul><li>5.4 LAN addresses and ARP </li></ul><ul><li>5.5 Ethernet </li></ul><ul><li>5.6 Hubs, bridges, and switches </li></ul><ul><li>5.7 Wireless links and LANs </li></ul><ul><li>5.8 PPP </li></ul><ul><li>5.9 ATM </li></ul><ul><li>5.10 Frame Relay </li></ul>
    42. 42. Interconnecting LAN segments <ul><li>Hubs </li></ul><ul><li>Bridges </li></ul><ul><li>Switches </li></ul><ul><ul><li>Remark: switches are essentially multi-port bridges. </li></ul></ul><ul><ul><li>What we say about bridges also holds for switches! </li></ul></ul>
    43. 43. Interconnecting with hubs <ul><li>Backbone hub interconnects LAN segments </li></ul><ul><li>Extends max distance between nodes </li></ul><ul><li>But individual segment collision domains become one large collision domian </li></ul><ul><ul><li>if a node in CS and a node EE transmit at same time: collision </li></ul></ul><ul><li>Can’t interconnect 10BaseT & 100BaseT </li></ul>
    44. 44. Limitation with Hubs <ul><li>Maximum nodes in a collision domain </li></ul><ul><li>Maximum host-to-host distance within a collision domain </li></ul><ul><li>Maximum number of tiers in a multiple-tier design </li></ul>
    45. 45. Bridges <ul><li>Link layer device </li></ul><ul><ul><li>stores and forwards Ethernet frames </li></ul></ul><ul><ul><li>examines frame header and selectively forwards frame based on MAC dest address </li></ul></ul><ul><ul><li>when frame is to be forwarded on segment, uses CSMA/CD to access segment </li></ul></ul><ul><li>transparent </li></ul><ul><ul><li>hosts are unaware of presence of bridges </li></ul></ul><ul><li>plug-and-play, self-learning </li></ul><ul><ul><li>bridges do not need to be configured </li></ul></ul>
    46. 46. Bridges: traffic isolation <ul><li>Bridge installation breaks LAN into LAN segments </li></ul><ul><li>bridges filter packets: </li></ul><ul><ul><li>same-LAN-segment frames not usually forwarded onto other LAN segments </li></ul></ul><ul><ul><li>segments become separate collision domains </li></ul></ul>LAN (IP network) bridge collision domain collision domain = hub = host LAN segment LAN segment
    47. 47. Forwarding <ul><li>How do determine to which LAN segment to forward frame? </li></ul><ul><li>Looks like a routing problem... </li></ul>
    48. 48. Self learning <ul><li>A bridge has a bridge table </li></ul><ul><li>entry in bridge table: </li></ul><ul><ul><li>(Node LAN Address, Bridge Interface, Time Stamp) </li></ul></ul><ul><ul><li>stale entries in table dropped (TTL can be 60 min) </li></ul></ul><ul><li>bridges learn which hosts can be reached through which interfaces </li></ul><ul><ul><li>when frame received, bridge “learns” location of sender: incoming LAN segment </li></ul></ul><ul><ul><li>records sender/location pair in bridge table </li></ul></ul>
    49. 49. Filtering/Forwarding <ul><li>When bridge receives a frame: </li></ul><ul><li>index bridge table using MAC dest address </li></ul><ul><li>if entry found for destination then{ </li></ul><ul><li>if dest on segment from which frame arrived then drop the frame </li></ul><ul><li>else forward the frame on interface indicated </li></ul><ul><li>} </li></ul><ul><li>else flood </li></ul>forward on all but the interface on which the frame arrived
    50. 50. Bridge example <ul><li>Suppose C sends frame to D and D replies back with frame to C. </li></ul><ul><li>Bridge receives frame from C </li></ul><ul><ul><li>notes in bridge table that C is on interface 1 </li></ul></ul><ul><ul><li>because D is not in table, bridge sends frame into interfaces 2 and 3 </li></ul></ul><ul><li>frame received by D </li></ul>
    51. 51. Bridge Learning: example <ul><li>D generates frame for C, sends </li></ul><ul><li>bridge receives frame </li></ul><ul><ul><li>notes in bridge table that D is on interface 2 </li></ul></ul><ul><ul><li>bridge knows C is on interface 1, so selectively forwards frame to interface 1 </li></ul></ul>
    52. 52. Interconnection without backbone <ul><li>Not recommended for two reasons: </li></ul><ul><ul><li>- single point of failure at Computer Science hub </li></ul></ul><ul><ul><li>- all traffic between EE and SE must path over CS segment </li></ul></ul>
    53. 53. Backbone configuration Recommended !
    54. 54. Some bridge features <ul><li>Isolates collision domains resulting in higher total max throughput </li></ul><ul><li>limitless number of nodes and geographical coverage </li></ul><ul><li>Can connect different Ethernet types </li></ul><ul><li>Transparent (“plug-and-play”): no configuration necessary </li></ul>
    55. 55. Bridges vs. Routers <ul><li>both store-and-forward devices </li></ul><ul><ul><li>routers: network layer devices (examine network layer headers) </li></ul></ul><ul><ul><li>bridges are link layer devices </li></ul></ul><ul><li>routers maintain routing tables, implement routing algorithms </li></ul><ul><li>bridges maintain bridge tables, implement filtering, learning and spanning tree algorithms </li></ul>
    56. 56. Routers vs. Bridges <ul><li>Bridges + and - </li></ul><ul><li>+ Bridge operation is simpler requiring less packet processing </li></ul><ul><li>+ Bridge tables are self learning </li></ul><ul><li>- All traffic confined to spanning tree, even when alternative bandwidth is available </li></ul><ul><li>- Bridges do not offer protection from broadcast storms </li></ul>
    57. 57. Routers vs. Bridges <ul><li>Routers + and - </li></ul><ul><li>+ arbitrary topologies can be supported, cycling is limited by TTL counters (and good routing protocols) </li></ul><ul><li>+ provide protection against broadcast storms </li></ul><ul><li>- require IP address configuration (not plug and play) </li></ul><ul><li>- require higher packet processing </li></ul><ul><li>bridges do well in small (few hundred hosts) while routers used in large networks (thousands of hosts) </li></ul>
    58. 58. Ethernet Switches <ul><li>Essentially a multi-interface bridge </li></ul><ul><li>layer 2 (frame) forwarding, filtering using LAN addresses </li></ul><ul><li>Switching: A-to-A’ and B-to-B’ simultaneously, no collisions </li></ul><ul><li>large number of interfaces </li></ul><ul><li>often: individual hosts, star-connected into switch </li></ul><ul><ul><li>Ethernet, but no collisions! </li></ul></ul>
    59. 59. Ethernet Switches <ul><li>cut-through switching: frame forwarded from input to output port without awaiting for assembly of entire frame </li></ul><ul><ul><li>slight reduction in latency </li></ul></ul><ul><li>combinations of shared/dedicated, 10/100/1000 Mbps interfaces </li></ul>
    60. 60. Not an atypical LAN (IP network) Dedicated Shared
    61. 61. Summary comparison
    62. 62. Chapter 5 outline <ul><li>5.1 Introduction and services </li></ul><ul><li>5.2 Error detection and correction </li></ul><ul><li>5.3Multiple access protocols </li></ul><ul><li>5.4 LAN addresses and ARP </li></ul><ul><li>5.5 Ethernet </li></ul><ul><li>5.6 Hubs, bridges, and switches </li></ul><ul><li>5.7 Wireless links and LANs </li></ul><ul><li>5.8 PPP </li></ul><ul><li>5.9 ATM </li></ul><ul><li>5.10 Frame Relay </li></ul>