1.7 Network Devices (Layer 2)

1.7 Network Devices (Layer 2)


OSI Model: Layer 2 Device
Protocol Data Unit(PDU): Frames

A bridge can be used to join segments or workgroup LANs. A bridge can also be used to divide a network to isolate traffic or problems. If the volume of traffic from one or two computers or a single department is flooding the network with data and slowing down the entire LAN, a bridge could isolate those computers or that department. Bridges can be used to:

  • Expand the length of a segment
  • Provide for an increased number of computers on the network
  • Reduce traffic jams resulting from an excessive number of attached computers
  • Split an overloaded network into two separate networks, reducing the amount of traffic on each segment and making each network more efficient
  • Link unlike physical media such as twisted pair and coaxial Ethernet

Because bridges work at the data link layer of the OSI reference model all information contained in the higher levels of the OSI reference model is unavailable to them. Bridges do not distinguish between one protocol and another. They pass all protocols along the network. Because all protocols pass across bridges it is up to the individual computers to determine which protocols they can recognise.

The data link layer has two sub layers: the Logical Link Control (LLC) sub layer and the Media Access Control (MAC) sub layer. Bridges work at the MAC sub layer.

A bridge works at layer 2 of the OSI model and its primary task is to keep local traffic local.

A bridge works by doing the following:

  • Listens to all traffic
  • Checks the source and destination addresses of each frame
  • Builds a switching table, as the information becomes available
  • Forwards packets if not local

A bridge works on the principle that each network node has its own address. A bridge forwards packets based on the address of the destination node. Bridges do have a degree of intelligence in that they learn where to forward data to. As traffic passes through the bridge, information about the computer addresses is stored in the bridge’s RAM. The bridge uses this RAM to build a switching table based on source addresses. The bridge’s routing table is initially empty. As packets are transmitted the source address is copied to the routing table. With this address information the bridge learns which computers are on which segment of the network.

If a bridge knows the location of the destination node it forwards the frame to it. If it does not know the destination it forwards the frame to all segments.

Bridges work at layer 2 of the OSI model whereas repeaters and hubs work at layer 1. This means that bridges have more intelligence than repeaters and hubs. Whilst it is true to say that bridges resemble repeaters in that they can regenerate data, bridges do this at the frame level. This means that bridges can send frames over long distances using a variety of long distance media.

The key advantages of a Bridges are that they are easy to install and set up, invisible to users and relatively inexpensive. Generally, Switches have surpassed Bridges as the choice of a layer 2 device.


OSI Model: Layer 2 Device
Protocol Data Unit(PDU): Frames

A switch is an OSI layer 2 device that allows network microsegmentation.

LANs can be segmented to limit network traffic and therefore to reduce collisions. Traffic flows within a segment but only leaves that segment if it is really necessary. A segment can be a number of computers such as a department or it may be a single computer.

The purpose of a switch is to provide network connectivity, while making data transmission more efficient. A switch provides multiple connections like a hub but behaves like a bridge by providing traffic regulation. A switch switches frames from incoming ports to outgoing ports and provides each connection with full bandwidth.

A switch works by examining the MAC address (layer 2 address) of incoming frames. Switches learn MAC addresses as traffic is generated, a switching table built, very quickly the switch has enough information to operate effectively. A switch examines MAC addresses of frames. If the frame is local ie: the MAC address on the same network segment as the incoming port of the switch then the frame is not forwarded across the bridge. If the frame is not local ie: with a MAC address not on the incoming port of the switch then it is forwarded to the appropriate network segment. All the decision-making is carried out by the switching circuits based on MAC addresses.

A switch cannot be used to connect different types of network, that job falls to the router. A segment is a logical division of devices; in order for communication to take place all hosts must all share the same network address. All hosts connected to the switch are still in the same broadcast domain. Therefore, all nodes connected through the LAN switch can see a broadcast from any node.









The diagram shows a network with three switches. Each port on a switch is its own collision domain and unlike a hub there is no contention and no collisions.

All hosts in the diagram are in the class B network with a subnet mask of Hosts in each segment can communicate with each other without creating traffic over the entire network. If a host wishes to send a broadcast message the broadcast address of will be used, all hosts on the network will see the message.

Moving to a switched LAN environment is very cost-effective as existing hardware and cabling can be utilised with minimum disruption, ie: a one for one change from a hub to a switch can be made.

Switching Technology

A LAN that uses a Switched Ethernet topology creates a network that behaves as though it has only two nodes: the sending node and the receiving node. These two nodes share the maximum available bandwidth between them

Each node is directly connected to one of the switches ports or a segment that is connected to one of the switch’s ports. This creates a maximum bandwidth connection between each node and each segment on the switch. A computer connected directly to an Ethernet switch is its own collision domain. A LAN switch allows many users to communicate in parallel through the use of virtual circuits and dedicated network segments in a collision-free environment.

Reasons for Using Switches

  • Increased network demands on multitasking network operating systems – A switch is required to allow timely access to resources
  • Increase in network intensive client/server applications, such as web services
  • Bandwidth maximisation – Full duplex can be achieved with no contention
  • Reduction of collision domains – each port on a switch is a separate collision domain.

Note: Although switches are also known as multi-port bridges a key difference is that switches use hardware to perform traffic filtering whereas bridges use software. Being hardware based, switches are typically faster than bridges.