Download presentation
Presentation is loading. Please wait.
1
CS4470 Computer Networking Protocols
12/31/2018 CS Computer Networking Protocols 5. Data Link Layer 3 Huiping Guo Department of Computer Science California State University, Los Angeles
2
Outline Overview of data link layer LANs Framing Error detection
12/31/2018 Outline Overview of data link layer Framing Error detection LANs Topologies Ethernet Extended LANs 5. Link CS4470
3
LAN Distance Limitations
LANs use shared medium - Ethernet, token ring Why limit the length of LANs Fare Access CSMA/CD –with minimum frame size, if propagation delay too long we won’t detect collision while transmitting Hardware is engineered to emit a fixed amount of electrical power An electrical signal gradually becomes weaker as it travels along a copper wire. 5. Link CS4470
4
LAN Distance Limitations
Standards set a maximum distance for LANs 10BaseT 100m per segment 10Base m per segment 10Base m per segment Can extend distances Repeaters/Hubs Bridges/Switches 5. Link CS4470
5
Repeaters A bidirectional, analog amplifier that retransmits analog signals Simply copy signals between segments Do not understand frame formats or addresses Act on bits One repeater can effectively double the length of an LAN segment, e.g. 100m to 200m 5. Link CS4470
6
Hubs Hubs act as repeaters Connect multiple LAN segments hub
5. Link CS4470
7
Limits on Repeaters/Hubs
Can't extend Ethernet with repeaters infinitely At most 4 repeaters CSMA/CD requires low delay if medium is too long, CSMA/CD won't work Run into the problem of not being able to detect collisions while transmitting the frame 5. Link CS4470
8
Limits on Repeaters/Hubs
12/31/2018 Limits on Repeaters/Hubs Repeaters/Hubs don’t understand frames Don’t distinguish between signals that correspond to a valid frame and other electrical signals If a collision or electrical interference occurs on one segment, repeaters cause the same problem to occur on all other segments Even two computers are in the different LAN segments, they cannot transmit at the same time Aside from hubs, bridges are used today in favor of repeaters 5. Link CS4470
9
Bridges A device that connects two LANs Act on frames
List to traffic on each segment When it receives a frame from LAN1, it checks the destination address In LAN1? Discard! In LAN2? Go to 3) The frame arrived intact? Yes! Forward it to LAN2 No! discard 5. Link CS4470
10
Bridge Operation 5. Link CS4470
11
Advantages of Bridges They help isolate problems
Don’t forward interference signals in one segment to another Don’t forward collisions from one segment to another Only forward complete and correct frames 5. Link CS4470
12
Frame filtering A bridge doesn’t forward a frame unless necessary
How to determine whether to forward a frame? A bridge receives a frame from LAN1 Checks the destination address If the destination address is in LAN1, discard the frame If not, forward the frame on the other segment 5. Link CS4470
13
Frame filtering (cont.)
How does a bridge know which computers are attached to which segment? Adaptive learning Bridges can learn automatically No configurations required 5. Link CS4470
14
Bridge Learning Algorithm
Receive some data packet on some input port Look at the packet’s source MAC address. If it’s not a broadcast address then: Lookup address in internal lookup table If not in the table, store it in the table using the address and the port it is on If it is in the table, change the entry if it’s on a different port 5. Link CS4470
15
Bridge Operation Example
5. Link CS4470
16
Exercise Four LANs are connected by three bridges. Each bridge maintains two tables which describe what stations are in each LAN. Initially, all the tables are empty. 5. Link CS4470
17
Exercise Show how the tables of the four bridges change after each of the following events happen in sequence. A sends a frame to B A sends a frame to F F sends a frame to A E sends a frame to I G sends a frame to H H sends a BROADCAST frame. D sends a frame to G G sends a frame to D H sends a frame to C A moves to LAN3 and then sends a frame to B 5. Link CS4470
18
5. Link CS4470 Actions Bridge 1 Bridge 2 Bridge 3 LAN 1 LAN 2 LAN2
a.A sends a frame to B A A b. A sends a frame to F c. F sends a frame to A F F A,F d. E sends a frame to I F,E A F, E A,F,E e. G sends a frame to H F,E,G A,G F, E A,F,E G f. H sends a BROADCAST frame. F,E,G,H A,G,H G,H g. D sends a frame to G F,E,G,H,D A,G, H,D A,F,E,D G,H h. G sends a frame to D A,G, H,D A,F,E,D i. H sends a frame to C F,E,G,H,D F, E j. A moves to LAN3 and then sends a frame to B F,E,G,H,D,A G, H,D F, E,A 5. Link CS4470
19
Multiple LANs 5. Link CS4470
20
Multiple Bridges Anything wrong with this picture? 5. Link CS4470
21
A cycle of bridges Bridged LANs contain a loop and all bridges forward broadcast frames frames flow around the cycle forever Computers on all segments receive an infinite number of copies How to prevent this? A bridged network must NOT allow both of the following conditions to occur simultaneously All bridges forward all broadcast frames The bridged network contains a cycle of bridged segments. 5. Link CS4470
22
A cycle of bridges A network is managed by more than one administrator
In such a setting, it is possible that no single person knows the entire configuration of the network A bridge that closes a loop might be added without anyone knowing Loops are built into the network on purpose Redundancy is provided to make the network more immune o failure Bridges must be able to handle loops Run a distributed spanning tree algorithm 5. Link CS4470
23
Switches Switches are similar to bridges
They both operate at the link layer They both know frame addresses The two terms are often used interchangeably 5. Link CS4470
24
Combining switches and hubs
5. Link CS4470
25
Switch example Suppose C sends a frame to D
address interface 1 2 3 A B E G 1 2 3 hub hub hub A I D F B G C H E Switch receives frame from from C notes in the switch table that C is on interface 1 because D is not in table, switch forwards frame into interfaces 2 and 3 frame received by D 5. Link CS4470
26
Switch example Suppose D replies back with frame to C.
address interface 1 2 3 A B E G C 1 2 3 hub hub hub A I D F B G C H E Switch receives frame from from D notes in switch table that D is on interface 2 because C is in table, switch forwards frame only to interface 1 frame received by C 5. Link CS4470
27
Switches and Bridges? Most switches act just like a bridge
Segments traffic Typically implements spanning tree algorithm Has more ports than a bridge 5. Link CS4470
28
Hub vs. Bridge vs. Switch A B C D E F hub A B C A B C D E F switch
5. Link CS4470
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.