1 Data Link Layer Lecture 23 Imran Ahmed University of Management & Technology.

Slides:



Advertisements
Similar presentations
Interconnection: Switching and Bridging CS 4251: Computer Networking II Nick Feamster Fall 2008.
Advertisements

Communication Networks Recitation 3 Bridges & Spanning trees.
Part 2: Preventing Loops in the Network
Connecting LANs: Section Figure 15.1 Five categories of connecting devices.
CS 4700 / CS 5700 Network Fundamentals Lecture 7: Bridging (From Hub to Switch by Way of Tree) Revised 1/14/13.
CPSC 441 TUTORIAL TA: FANG WANG HUBS, SWITCHES AND BRIDGES Parts of the slides contents are courtesy of the following people: Jim Kurose, Keith Ross:
1 Computer Networks Internetworking Devices. 2 Repeaters Hubs Bridges –Learning algorithms –Problem of closed loops Switches Routers.
1 Version 3 Module 8 Ethernet Switching. 2 Version 3 Ethernet Switching Ethernet is a shared media –One node can transmit data at a time More nodes increases.
CSEE W4140 Networking Laboratory Lecture 8: LAN Switching Jong Yul Kim
1 LAN switching and Bridges Relates to Lab 6. Covers interconnection devices (at different layers) and the difference between LAN switching (bridging)
1 K. Salah Module 4.3: Repeaters, Bridges, & Switches Repeater Hub NIC Bridges Switches VLANs GbE.
CSE390 Advanced Computer Networks Lecture 7: Bridging (From Hub to Switch by Way of Tree) Based on slides from D. Choffnes Northeastern U. Revised Fall.
Introduction to Computer Networks 09/23 Presenter: Fatemah Panahi.
1 25\10\2010 Unit-V Connecting LANs Unit – 5 Connecting DevicesConnecting Devices Backbone NetworksBackbone Networks Virtual LANsVirtual LANs.
1 LAN switching and Bridges Relates to Lab 6. Covers interconnection devices (at different layers) and the difference between LAN switching (bridging)
DataLink Layer1 Ethernet Technologies: 10Base2 10: 10Mbps; 2: 200 meters (actual is 185m) max distance between any two nodes without repeaters thin coaxial.
Layer 2 Switch  Layer 2 Switching is hardware based.  Uses the host's Media Access Control (MAC) address.  Uses Application Specific Integrated Circuits.
Connecting LANs, Backbone Networks, and Virtual LANs
Introduction to IT and Communications Technology Justin Champion C208 – 3292 Ethernet Switching CE
T. S. Eugene Ngeugeneng at cs.rice.edu Rice University1 COMP/ELEC 429 Introduction to Computer Networks Lecture 8: Bridging Slides used with permissions.
Connecting LANs, Backbone Networks, and Virtual LANs
1 CS 4396 Computer Networks Lab LAN Switching and Bridges.
CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001.
1 © 2003, Cisco Systems, Inc. All rights reserved. CCNA 3 v3.0 Module 7 Spanning-Tree Protocol Cisco Networking Academy.
1 CISCO NETWORKING ACADEMY PROGRAM (CNAP) SEMESTER 1/ MODULE 8 Ethernet Switching.
Network Devices.
Review: –Ethernet What is the MAC protocol in Ethernet? –CSMA/CD –Binary exponential backoff Is there any relationship between the minimum frame size and.
1 Kyung Hee University Chapter 15 Connecting LANs, Backbone Networks, and Virtual LANs.
Multiplexing FDM & TDM. Multiplexing When two communicating nodes are connected through a media, it generally happens that bandwidth of media is several.
15.1 Chapter 15 Connecting LANs, Backbone Networks, and Virtual LANs Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or.
Computer Networks 15-1 Connecting Devices. Connecting Device We divide connecting devices into five different categories based on the layer in which they.
Computer Networks 15-1 Chapter 15. Connecting LANs, Backbone Networks, and Virtual LANs 15.1 Connecting devices 15.2 Backbone networks 15.3 Virtual LANs.
T. S. Eugene Ngeugeneng at cs.rice.edu Rice University1 COMP/ELEC 429 Introduction to Computer Networks Scaling Broadcast Ethernet Some slides used with.
Cisco 3 - Switching Perrine. J Page 16/4/2016 Chapter 4 Switches The performance of shared-medium Ethernet is affected by several factors: data frame broadcast.
Sem1 - Module 8 Ethernet Switching. Shared media environments Shared media environment: –Occurs when multiple hosts have access to the same medium. –For.
STORE AND FORWARD & CUT THROUGH FORWARD Switches can use different forwarding techniques— two of these are store-and-forward switching and cut-through.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Connecting Devices CORPORATE INSTITUTE OF SCIENCE & TECHNOLOGY, BHOPAL Department of Electronics and.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Chapter 16 Connecting LANs, Backbone Networks, and Virtual LANs.
M. Veeraraghavan (originals by J. Liebeherr) 1 Need for Routing in Ethernet switched networks What do bridges do if some LANs are reachable only in multiple.
1 Version 3.0 Module 7 Spanning Tree Protocol. 2 Version 3.0 Redundancy Redundancy in a network is needed in case there is loss of connectivity in one.
ICS 156: Networking Lab Magda El Zarki Professor, ICS UC, Irvine.
Chapter 16 Connecting LANs, Backbone Networks, and Virtual LANs
5: DataLink Layer 5a-1 Bridges and spanning tree protocol Reference: Mainly Peterson-Davie.
Ch. 15 Connecting LANs.
1 Chapter 3: Packet Switching (Switched LANs) Dr. Rocky K. C. Chang 23 February 2004.
4: DataLink Layer1 Hubs r Physical Layer devices: essentially repeaters operating at bit levels: repeat received bits on one interface to all other interfaces.
1 Networking and Internetworking Devices we need networking and internetworking devices to extend physical distance and to improve efficiency and manageability.
1 LAN switching and Bridges Relates to Lab Outline Interconnection devices Bridges/LAN switches vs. Routers Bridges Learning Bridges Transparent.
15.1 Chapter 15 Connecting LANs, Backbone Networks, and Virtual LANs Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or.
Ethernet switches and IP routers
Chapter 16– Connecting LANs
CS 3700 Networks and Distributed Systems
Part III Datalink Layer 10.
Connecting Devices LANs or WANs do not normally operate in isolation. They are connected to one another or to the Internet. To connect LANs or WANs, we.
Chapter 17 Connecting Devices And Virtual LANs 17.# 1
Lab 2 – Hub/Switch Data Link Layer
Chapter 4 Data Link Layer Switching
Lab 2 – Hub/Switch Data Link Layer
CS 3700 Networks and Distributed Systems
LAN switching and Bridges
CS 4700 / CS 5700 Network Fundamentals
Chapter 16 Connecting LANs, Backbone Networks, and Virtual LANs
LAN switching and Bridges
CS 4700 / CS 5700 Network Fundamentals
CS4470 Computer Networking Protocols
Part III Datalink Layer 10.
Delivery, Forwarding, and Routing of IP Packets
Chapter 15. Connecting Devices
LAN switching and Bridges
Presentation transcript:

1 Data Link Layer Lecture 23 Imran Ahmed University of Management & Technology

2 Agenda Introduction & services Error detection and correction Multiple access protocols LAN addresses and ARP Ethernet Hubs, bridges and switches

3 Hubs It works on physical layer. It is used in star topology (LAN). It’s a broadcasting device

4 Why Bridges? It operates both the physical & data link layers. Bridges can divide a large networks into smaller segments. Bridges contain logic that allows them to keep the traffic for each segment separate. It can also provide security through this partitioning of traffic.

5 A Bridge in the OSI Model

6 A Bridge

7 Bridge Functions When a frame enters a bridge, the bridge not only regenerates the signal but checks the address of the destination and forwards a new copy only to the segment to which the address belongs. As a bridge encounters a packet, it reads the address contained in the frame and compares that address with a table of all the stations on both segments. When it finds a match, it discovers to which segment the station belongs and relays the packet only to that segment.

8 Function of a Bridge

9 Bridge – Example Example: Last slide shows two segments joined by a bridge. –In figure a, A packet from station A addressed to station D arrives at the bridge. –Station A is on the same segment at station D; therefore, the packet is blocked from crossing into the lower segment. –Instead, the packet is relayed to the entire upper segment and received by station D. –In figure b, a packet generated by station A is intended for station G. –The bridge allows the packet to cross and relays it to the entire lower segment, where it is received by station G.

10 Bridge Table Bridge filtering & forwarding is done by bridge table. The bridge table contains entries for some, not all of the nodes on a LAN. An entry in the tables contains:- –The LAN address of the node –The bridge interface that leads towards the node. –The time at which the entry for the node was placed in the table.

11 Types of Bridges Simple bridge – is the most primitive and least expensive type of bridge. –It links two segments and contains a table that lists the addresses of all the stations included in each of them. –What makes it primitive is that these addresses must be entered manually. –Whenever a new station is added, the table must be modified. –Installation and maintenance of simple bridges are time-consuming.

12 Types of Bridges Multi-port bridge – can be used to connect more than two LANs –In the next slide figure, the bridge has three tables, each one holding the physical addresses of stations reachable through the corresponding port.

13 Multi-port Bridge

14 Types of Bridges Transparent bridge – or learning bridge builds it table of station addresses on its own. –The bridge table is initially empty. –When a frame arrives on one of the interfaces and the frame’s destination address is not in the table, then the bridge forwards copies of the frame to the output buffers preceding all of other interfaces. –For each frame received, the bridge stores in its table (1) the LAN address in the frame’s source address field, (2) the interface from which the frame arrived & (3) the current time. –When a frame arrives on one of the interfaces and the frame’s destination address is in the table, then the bridge forwards the frame to the appropriate interface. –The bridge deletes an address in the table, if no frames are received with that address as the source address after some period of time (the aging time).

15 Types of Bridges Spanning Tree Algorithm – Bridges are normally installed redundantly, which means that two LANs may be connected by more than one bridge. –In this case, if the bridges are transparent bridges, they may create a loop, which means a packet may be going round and round, form one LAN to another and back again to the first LAN. –To avoid this situation, bridges today use what is called the spanning tree algorithm.

16 Types of Bridges –Another solution to prevent loops in the LANs connected by bridges is source routing. –In which, the source of the packet defines the bridges and the LANs through which the packet should go before reaching the destination.

17 Spanning Tree Problem Figure Br 1 Br 2 Segment 1 Segment 2 Host B Host A Two LANs connected by two bridges

18 Spanning Tree Problem Suppose host B has not sent any packet, so neither bridge know to which segment host b is connected. Now consider this sequence of events:- –Host A sends a packet to host B. –One of the bridges, say Br1, receives the packet first and, not knowing where host b is, forwards the packet to segment 2. –The packet goes to its destination (host B) but at the same time, br2 receives the packet via segment 2. –The packet source address is host A; its destination address is host B. Br2 erroneously assumes that host A is connected to segment 2 & updates its table accordingly. Because it does not have any information about host B, Br2 forwards the packet to segment 1. –The packet is then received for the second time by Br1. it thinks that it is a new packet from host A and because it has no information about host b, Br1 forwards the packet to segment 2. –Now Br2 receives the packet again, and the cycle will repeat endlessly.

19 Spanning Tree Problem This situation occurs due to three factors:- –Transparent or Learning bridges are being used that do not have information about the location of host until they receive at least one packet from them. –The bridges are not aware of the existence of other bridges. –Graph has been created instead of tree.

20 Br1:100 Br4:400Br3:300Br5:500 Br2:200 Segment Segment 5 Segment 4 Segment 3 Segment A LAN before using the spanning-tree algorithm

21 Spanning Tree Algorithm An ID number is assigned to each bridge. –An ID number can be any arbitrary number determined by the network manager or the address of one of the ports, normally the smallest one. Each port is assigned a cost. –Normally the cost is determined by the bit rate supported by the port (the higher the bit rate, the lower the cost). The process of finding the spanning-tree can be summarized in three steps:- –The bridges choose a bridge to be the root of the tree. This is done by assigning an ID to the bridge and then finding the bridge with the smallest ID. –Each bridge determines its root port, the port that has the least root path cost to the root. The root path cost is the accumulated cost of the path from the port to the root. –One designated bridge is chosen for each segment.

22 Spanning Tree Algorithm Finding the Root bridge: –When a bridge receives the BPDU, it compares the source’s bridge ID with its own ID. –If its own ID is larger than the source’s bridge ID, it increments the root path cost by the cost of the receiving port forwards the frame. It also stops sending its own BPDU because it knows that it will not be chosen as the root bridge (another bridge has a lower ID). –If its own ID is smaller that the source’s bridge ID, the bridge discards the BPDU. It is obvious that after a while, the only BPDU that is being circulated is one with the smallest source bridge ID, the root bridge. In this way, every bridge knows which is the root bridge.

23 Spanning Tree Algorithm Finding the Root Port: –The root port is the port whose BPDU has the minimum accumulated root cost. Choosing the Designated Bridge: –The bridge that can carry a frame from the segment to the root with the cheapest root cost is selected as the designated bridge and the particular port that connects the bridge to that segment is called the designated port. Forming the Spanning Tree: –The ports of the bridge are divided into two groups:- The forwarding ports are the root ports and all of the designated ports. The rest of the ports are considered to be blocking ports.

24 Br1:100 Br4:400Br3:300Br5:500 Br2:200 Segment 1 Des. R.P. Des. R.P. Blocking port R.P. Des. Segment 5 Segment 4 Segment 3 Segment 2 Blocking port R.P. A LAN after using the spanning-tree algorithm Root bridge

25 Spanning Tree Algorithm We claim that with this configuration each LAN segment will receive one and only one copy of a frame sent by any host on any other segment; this guarantees loop-free operation: –A frame sent by a host on segment 1 will reach segment 2 through Br1, will reach segment 3 and segment 4 through Br1-Br2, and will reach segment 5 through Br4. –A frame sent by a host on segment 2 will reach segment 1 through Br1, will reach segment 3 and segment 4 through Br2, and will reach segment 5 through Br1-Br4. –A frame sent by a host on segment 3 will reach segment 4 and segment 2 through Br2, will reach segment 1 through Br2-Br1, and will reach segment 5 through Br2-Br1-Br4. –A frame sent by a host on segment 4 will reach segment 3 and segment 2 through Br2, will reach segment 1 through Br2-Br1, and will reach segment 5 through Br2-Br1-Br4. –A frame sent by a host on segment 5 will reach segment 1 through Br4, will reach segment 2 through Br4-Br1, and will reach segment 3 and segment 4 through Br4-Br1-Br2.

26 Switches The switch has a buffer for each link (network) to which it is connected. When it receives frame, it stores the frame in the buffer of the receiving link and checks the address to find the out-going link. Switches are based on two different strategies (called fabrics): –Store-and-forward – stores the frame in the input buffer until the whole packet has arrived. –Cut-through-switch – forwards the packet to the output buffer as soon as the destination address is received.

27 Switch

28 Summary Comparison HubsBridgesRoutersSwitches Traffic isolation Noyes Yes Plug & play Yes Noyes Optimal routing No YesNo Cut - through yesNonoYes