Download presentation
Presentation is loading. Please wait.
Published byJohnathan Powers Modified over 9 years ago
1
Layer 2 functionality – bridging and switching BSAD 141 Dave Novak Sources: Network+ Guide to Networks, Dean 2013
2
Overview Layer 2 functionality Error detection Bridges Broadcast and collision domains How bridges work Types of bridges Switches Types of switches Buffering
3
Layer 2 functionality Layer 1 functionality simply addresses the transmission of modulated signals over the media Layer 2 functionality begins to incorporate aspects of network management Recognition of frame formats MAC addressing Some error checking
4
Layer 2 functionality Recall from Lecture 2 on the OSI model NIC is both logical and physical boundary between layers 1 and 2 Converts bits to frames and vice versa Error detection in bit to frame conversion Error detection in media access (NIC converting bits to frames) defined at layer 2
5
Layer 2 Errors Interference can cause: Random data to appear Transmitted data to be lost or to be corrupted in some manner Digital and analog transmission is susceptible to interference Bits may be altered, lost, or the sequence of bits might be rearranged – this creates errors in the message
6
Layer 2 Errors There are three basic data link layer error detection technologies 1) Parity bits and parity checking 2) Checksum 3) Cyclic redundancy check (CRC)
7
Parity bits and parity checking Most basic error check Sending node adds a bit to each character (typically 7 bits / character in RS-232) Two types of parity 1) Even 2) Odd
8
Parity bits and parity checking Example: Using EVEN parity – the sender sets the parity bit to either 1 or 0 whichever makes the total number of 1 bits (including parity) even If character is 0010101, the parity bit is set to ____ Receiver checks the parity
9
Checksum The sender treats data as sequence of binary integers and computes the sum Receiver checks the sum Data in BinaryChecksum Value 00011 01015 00113 Total9
10
Cyclic redundancy check (CRC) We’ll say this is the most complex layer 2 error checking technique Software algorithm to determine whether or not data were received correctly Simple to implement, easy to analyze, and effective in detecting common errors Does not verify integrity of sender, just correctness http://en.wikipedia.org/wiki/Cyclic_redundancy_ch eckhttp://en.wikipedia.org/wiki/Cyclic_redundancy_ch eck
11
Higher Layer Switches We are discussing layer 2 functionality using specific hardware examples Distinctions between modern network hardware blurring Modern networking devices don’t work neatly and exclusively at single layer of OSI Higher layer switches also work at layers 3 (network) and 4 (transport) of OSI Perform advanced filtering, performance analysis, and security
12
Bridging Technique used to connect networks at data link layer Hubs connect networks at ______________ Adding another hub is analogous to adding more ports to an existing hub or extending a bus topology network All packets forwarded to all devices on network No management capabilities
13
Bridging A bridge is a physical device Computer with two NICs Special device with two ports
14
Bridging Incorporates concept of basic management via frame filtering If LAN segment is congested Break LAN into 2 segments and bridge them together
15
Frame/Packet filtering Layer 2 devices read MAC source and destination address of all frames Can’t go any higher in OSI Can’t read or interpret data in payload Bridge discards frame and does not forward if receiver is located on same segment as sender Bridge copies frame and forwards it to the appropriate segment if receiver is on separate segment
16
Bridges and concept of collision domain Collision Domain Add hub to LAN Add device to port on existing hub Separate segments of a bridged LAN form two separate collision domains Improve performance by reducing collisions
17
Bridges and concept of broadcast domain Broadcast Domain Unicast Multicast
18
Bridges and concept of broadcast domain Standard way to locate device Broadcast message asking for IP address
19
Bridges and concept of broadcast domain Bridges do NOT create separate broadcast domains Bridge relays broadcasts to both segments of bridged LAN Important conceptual idea: A shared broadcast domain is needed for devices to remain part of same LAN or subnet
20
Adaptive / Transparent Bridging Learn locations of computers on different segments Store information in a table that might contain: MAC address, NetBIOS name, segment ID Starts with no information in the table Create table of devices on each segment
21
Adaptive / Transparent Bridging Bridge performs 2 calculations when frame arrives 1) Examine source / destination MAC address and add source address to list 2) Forward frame if needed
22
How a bridge works
23
Bridges learn computer locations quickly Computers tend to be fairly active The longer the bridge is run without rebooting, the more efficient the operation Permits simultaneous use of each segment Can optimize performance (parallelism)
24
How a bridge works To improve performance computers that communicate often should be located on same segment Why? (think about locality of reference…)
25
Spanning Tree Algorithm (STA) STAs are frame forwarding decision algorithms If a cycle of bridges/switches is present, broadcast will cycle infinitely (infinite loop) STA prevents infinite loops Protocol selects single forwarding path on LAN Detect circular patterns and modify way devices work together Routers DO NOT forward broadcasts
26
Discuss 3 bridging functions 1) Local Bridge 2) Translation Bridge 3) Remote Bridge
27
Local Bridge Standard device used to connect network segments of the same type ( use the same data link protocols or LAN technology ) For example, Ethernet Very simple Does not modify data in headers, just reads the MAC address and either passes the frame on or discards it
28
Translation Bridge Device used to connect network segments of different types ( use different data link protocols or LAN technology ) For example, Ethernet to token ring More complicated Strips frame from packets received from one type LAN segment and repackages them in frame suitable for other LAN segment Recall frame formats are different depending on the underlying data link protocols (LAN technologies used)
29
Translation Bridge Ethernet Frame AB CDEFG A = Preamble (7 B) B = Start of Frame Delimiter (1 B) C = Destination Address (6 B) D = Source Address (6 B) E = Ethertype / length (2 B) F = Data and Pad (46 – 1500 B) G = Frame Check (4 B) AB CDEF G HI A = Preamble (8 B) B = Start Delimiter (1 B) C = Frame Control (1 B) D = Destination Address (6 B) E = Source Address (6 B) F = Data (variable) G = Frame Check (4 B) H = End Delimiter (4 b) I = End of Frame Sequence (12 b) FDDI Frame
30
Remote Bridge Device used to connect network segments at distant locations using some type of WAN link For example, connect two remote Ethernet segments using a leased telephone line Could function as either local or translation bridge, but main purpose is to limit traffic on WAN link
31
Switching Data link functionality fundamental to LANs A switch generally replaces a bridge in modern switched Ethernet networking Allow multiple users to exchange information simultaneously without slowing each other down Promotes parallelism
32
Switching Allow different nodes to communicate directly with each other Physically resembles a hub Important conceptual issue: Hub simulates shared media with bus topology functionality Switch simulates a bridged LAN with one computer per segment
33
Switching Forward data out a single port Recall how this is different from a hub Physical star topology can support: Logical star Logical bus Logical ring Functionally, these logical topologies are quite different!
34
Switching
35
Functionally converts a shared network medium to a dedicated network medium Creates a separate collision domain for two devices communicating along a dedicated path Forward broadcasts to all ports Do NOT forward multicast or unicast to all ports No device on the switched network receives packets that are addressed to other devices
36
Legacy Ethernet (Hub example) Physical Star / Logical Bus Before switching, Ethernet supported only half duplex transmission Hub forwards electrical signals on all ports, so only one node can use the media at a time – each node communicates directly with all other nodes on the network. The hub is just a conduit or connection point that links the nodes together (functionally a bus). Node 4 sends a message destined for Node 3, the hub forwards the packets out all ports, effectively tying up the media and preventing simultaneous (full duplex) communication Node 3 will receive the frames, read the MAC address and “accept” the message All other nodes will also receive the frames, but will read the MAC address and discard the message – as the MAC address is associated with Node 3 N 1 N 4N 5N 6 N 3N 2 Hub
37
Switched Ethernet (Switch example) Physical Star / Logical Star With switching, Ethernet supports full duplex transmission Each node communicates directly with the switch, as opposed to directly with the other nodes on the LAN. Information travels from node to switch and from switch to node simultaneously. Node 4 sends a message destined for Node 3 to the switch. At the same time, Node 2 can send message destined for Node 3 to the switch. The switch will only forward the message out the port connected directly to Node 3. Node 3 could be communicating with other nodes at the same time Switches provide a collision free environment. Each node has a dedicated connection to itself N 1 N 4N 5N 6 N 3N 2 Switch
38
Simplified switch example How it works The switch contains a lookup table that maps the MAC address to a specific output port Ports 4, 5, 6 MAC addressOutgoing Port E3-21-OK-8P-00-0CPort 1 F4-34-IJ-8L-00-0CPort 2 The switch “knows” A6-43-IK-0P-00-12 (Node 4) is attached to Port 4. If Node 4 is sending a message to E3-21-OK-8P-00-0C (Node 1), the switch knows the message must be sent out Port 1 N 1 N 4N 5N 6 N 3N 2 Switch Ports 1, 2, 3 E3-21-OK-8P-00-0C Port 1 Port 2 A6-43-IK-0P-00-12 Port 4
39
Switching If a new node is added to a switch, how does the switch add the new MAC address to its lookup table?
40
Switching Another advantage of switches is that each device / node attached to a switch has dedicated full bandwidth of the LAN Example
41
Switching on Enterprise networks What are the implications associated with replacing the backbone switch with a backbone router with respect to the broadcast domain? How would you describe the backbone design you see in this figure?
42
Switch functionality 1) Cut Through 2) Store and forward
43
Cut Through Switches Forwards frame immediately by reading MAC destination address in frame header No additional processing (no error checking) – forwards packets out appropriate destination port w/o delay Doesn’t wait for entire message stream to arrive before forwarding Relatively inexpensive
44
Store and Forward Switches Waits for entire message stream to arrive before forwarding to destination While in memory, switch performs basic layer 2 error checking on frames Requires buffering to store frames Can be shared memory buffer ( shared by all ports on switch ) Can be bus architecture memory ( individual memory buffers for each port )
45
Buffer Say our bridge buffer holds six frames LAN link 100Mbps: Incoming frames Satellite or leased link 1.5 Mbps: outgoing frames 3 frames are currently buffered Buffer is full, additional frames are dropped and must eventually be resent Frames arrive, but buffer is full
46
Summary Layer 2 functionality Error detection Bridging Broadcast and collision domains How bridges work Types of bridges Switching Types of switches Buffering
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.