Download presentation
Presentation is loading. Please wait.
Published byToby Washington Modified over 9 years ago
1
Link Layer MAC Dr. Mozafar Bag-Mohammadi University of Ilam
2
Contents 1. Multiple Access Protocols 2. Local Area Network (LAN) 3. Ethernet 4. Hubs, Bridges, and Switches
3
1.Multiple Access Links and Protocols Three types of “ links ” : r point-to-point (single wire, e.g. PPP, SLIP) r broadcast (shared wire or medium; e.g, Ethernet, Wavelan, etc.)
4
Multiple Access protocols r single shared communication channel r two or more simultaneous transmissions by nodes: interference m only one node can send successfully at a time r multiple access protocol: m distributed algorithm that determines how stations share channel, i.e., determine when station can transmit m type of protocols: synchronous or asynchronous information needed about other stations robustness (e.g., to channel errors) performance
5
Multiple Access Control Protocols Three broad classes: r Channel Partitioning m divide channel into smaller “pieces” (time slots, frequency, code) m allocate piece to node for exclusive use m TDMA, FDMA, CDMA r Random Access m allow collisions m “recover” from collisions m CSMA, ALOHA r Taking turns m tightly coordinate shared access to avoid collisions m Token ring Goal: efficient, fair, simple, decentralized
6
Random Access protocols r When node has frame to send m transmit at full channel data rate R. m no a priori coordination among nodes two or more transmitting nodes -> “ collision ”, r random access MAC protocol specifies: m how to detect collisions m how to recover from collisions (e.g., via delayed retransmissions) r Examples of random access MAC protocols: m slotted ALOHA m ALOHA m CSMA and CSMA/CD
7
CSMA: Carrier Sense Multiple Access CSMA: listen before transmit: r If channel sensed idle: transmit entire packet r If channel sensed busy, defer transmission
8
CSMA/CD (Collision Detection) CSMA/CD: carrier sensing m collisions detected within short time m colliding transmissions aborted, reducing channel wastage m persistent or non-persistent retransmission r collision detection: m easy in wired LANs: measure signal strengths, compare transmitted, received signals m difficult in wireless LANs: receiver shut off while transmitting
9
CSMA/CD collision detection
10
MAC Address (more) r MAC address allocation administered by IEEE r manufacturer buys portion of MAC address space (to assure uniqueness) r Analogy: (a) MAC address: like Social Security Number (b) IP address: like postal address r MAC flat address => portability m can move LAN card from one LAN to another r IP hierarchical address NOT portable m depends on network to which one attaches
11
IEEE 802 Standards r IEEE 802 is a family of standards for Local Area Network (LAN), which defines an LLC and several MAC sublayers
12
Ethernet r Speed: 10Mbps -10 Gbps r Standard: 802.3, Ethernet II (DIX) r Most popular physical layers for Ethernet: 10Base5 Thick Ethernet: 10 Mbps coax cable 10Base2 Thin Ethernet: 10 Mbps coax cable 10Base-T 10 Mbps Twisted Pair 100Base-TX 100 Mbps over Category 5 twisted pair 100Base-FX 100 Mbps over Fiber Optics 1000Base-FX1Gbps over Fiber Optics 10000Base-FX10Gbps over Fiber Optics (for wide area links)
13
Bus Topology r 10Base5 and 10Base2 Ethernets has a bus topology
14
r Starting with 10Base-T, stations are connected to a hub in a star configuration Star Topology
15
Frame format Dest addr 644832 CRCPreamble Src addr TypeBody 1648
16
Ethernet uses CSMA/CD A: sense channel, if idle then { transmit and monitor the channel; If detect another transmission then { abort and send jam signal; update # collisions; delay as required by exponential backoff algorithm; goto A } else {done with the frame; set collisions to zero} } else {wait until ongoing transmission is over and goto A}
17
Ethernet ’ s CSMA/CD (more) Jam Signal: make sure all other transmitters are aware of collision; 48 bits; Exponential Backoff: r Goal: adapt retransmission attempts to estimated current load m heavy load: random wait will be longer r first collision: choose K from {0,1}; delay is K x 512 bit transmission times after second collision: choose K from {0,1,2,3} … after ten or more collisions, choose K from {0,1,2,3,4, …,1023}
18
5. 1 Interconnecting LANs Q: Why not just one big LAN? r Limited amount of supportable traffic: on single LAN, all stations must share bandwidth r limited length: 802.3 specifies maximum cable length large “ collision domain ” (can collide with many stations) 4. Hubs, Bridges and Switches
19
Hubs r Physical Layer devices: essentially repeaters operating at bit levels: repeat received bits on one interface to all other interfaces r Hubs can be arranged in a hierarchy (or multi-tier design), with backbone hub at its top
20
Hubs (more) r Each connected LAN referred to as LAN segment r Hubs do not isolate collision domains: node may collide with any node residing at any segment in LAN r Hub Advantages: m simple, inexpensive device m Multi-tier provides graceful degradation: portions of the LAN continue to operate if one hub malfunctions m extends maximum distance between node pairs (100m per Hub)
21
Hub limitations r single collision domain results in no increase in max throughput m multi-tier throughput same as single segment throughput r individual LAN restrictions pose limits on number of nodes in same collision domain and on total allowed geographical coverage r cannot connect different Ethernet types (e.g., 10BaseT and 100baseT)
22
Ethernet Hubs vs. Ethernet Switches r An Ethernet switch is a packet switch for Ethernet frames Buffering of frames prevents collisions. Each port is isolated and builds its own collision domain r An Ethernet Hub does not perform buffering: Collisions occur if two frames arrive at the same time. HubSwitch
23
Bridges r Link Layer devices: operate on Ethernet frames, examining frame header and selectively forwarding frame based on its destination r Bridge isolates collision domains since it buffers frames r When frame is to be forwarded on segment, bridge uses CSMA/CD to access segment and transmit
24
Bridges (more) r Bridge advantages: m Isolates collision domains resulting in higher total max throughput, and does not limit the number of nodes nor geographical coverage m Can connect different type Ethernet since it is a store and forward device m Transparent: no need for any change to hosts LAN adapters
25
Bridges: frame filtering, forwarding r frame filtering m same-LAN-segment frames not forwarded onto other LAN segments r forwarding: m how to know which LAN segment on which to forward frame? m looks like a routing problem (more shortly!)
26
Interconnection with Backbone Bridge
27
Interconnection Without Backbone r Not recommended for two reasons: - single point of failure at Computer Science hub - all traffic between EE and SE must path over CS segment
28
Bridge Filtering r bridges learn which hosts can be reached through which interfaces: maintain filtering tables when frame received, bridge “ learns ” location of sender: incoming LAN segment m records sender location in filtering table r filtering table entry: m (Node LAN Address, Bridge Interface, Time Stamp) m stale entries in Filtering Table dropped (TTL can be 60 minutes)
29
Bridges Spanning Tree r for increased reliability, desirable to have redundant, alternate paths from source to dest r with multiple simultaneous paths, cycles result - bridges may multiply and forward frame forever r solution: organize bridges in a spanning tree by disabling subset of interfaces Disabled
30
Bridges vs. Routers r both store-and-forward devices m routers: network layer devices (examine network layer headers) m bridges are Link Layer devices r routers maintain routing tables, implement routing algorithms r bridges maintain filtering tables, implement filtering, learning and spanning tree algorithms
31
Routers vs. Bridges Bridges + and - + Bridge operation is simpler requiring less processing bandwidth - Topologies are restricted with bridges: a spanning tree must be built to avoid cycles - Bridges do not offer protection from broadcast storms (endless broadcasting by a host will be forwarded by a bridge)
32
Routers vs. Bridges Routers + and - + arbitrary topologies can be supported, cycling is limited by TTL counters (and good routing protocols) + provide firewall protection against broadcast storms - require IP address configuration (not plug and play) - require higher processing bandwidth r bridges do well in small (few hundred hosts) while routers used in large networks (thousands of hosts)
33
Ethernet Switches r Popular LAN device r layer 2 (frame) forwarding, filtering using LAN addresses Switching: A-to-B and A ’ -to-B ’ simultaneously, no collisions r large number of interfaces r often: individual hosts, star- connected into switch m Ethernet, but no collisions!
34
Ethernet Switches (more) Shared
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.