7.
0 Layer 2 Design
The Data Link layer provides a means for exchanging data over a common local media. The Data Link
layer performs two basic services: Allows the upper layers to access the media using techniques such as
framing and Controls how data is placed onto the media and is received from the media using
techniques such as media access control and error detection.
Data Link Layer is second layer of OSI Layered Model. This layer is one of the most complicated
layers and has complex functionalities and liabilities. Data link layer hides the details of underlying
hardware and represents itself to upper layer as the medium to communicate.
Data link layer works between two hosts which are directly connected in some sense. This direct
connection could be point to point or broadcast. Systems on broadcast network are said to be on same
link. The work of data link layer tends to get more complex when it is dealing with multiple hosts on
single collision domain.
Data link layer is responsible for converting data stream to signals bit by bit and to send that over the
underlying hardware. At the receiving end, Data link layer picks up data from hardware which are in
the form of electrical signals, assembles them in a recognizable frame format, and hands over to upper
layer.
Data link layer has two sub-layers:
Logical Link Control: It deals with protocols, flow-control, and error control
Media Access Control: It deals with actual control of media
7.2 Specific Objectives
At the end of the lesson you should be able to;
Explain the Data Link Layer as Layer 2 of the OSI Reference Model.
Explain the Functions of the Data Link Layer
Identify and describe the Layer 2 devices.
Describe the different network design models/topologies.
Explain the benefits of the three-tier network design architecture.
7.3 Lecture Outline
7.3.1 Functions of the Data Link Layer
7.3.2 Layer 2 Devices
7.3.2.1 Bridges
7.3.2.2 Switches
7.3.4 Layer 2 Design
7.4 Lecture Activities
7.5 Self-test Questions
7.6 Summary
7.3.1 Functionality of Data-link Layer
Data link layer does many tasks on behalf of upper layer. These are:
Framing: Data-link layer takes packets from Network Layer and encapsulates them into
Frames. Then, it sends each frame bit-by-bit on the hardware. At receiver’ end, data link layer
picks up signals from hardware and assembles them into frames.
Addressing: Data-link layer provides layer-2 hardware addressing mechanism. Hardware
address is assumed to be unique on the link. It is encoded into hardware at the time of
manufacturing.
Synchronization: When data frames are sent on the link, both machines must be synchronized
in order to transfer to take place.
Error Control: Sometimes signals may have encountered problem in transition and the bits are
flipped. These errors are detected and attempted to recover actual data bits. It also provides
error reporting mechanism to the sender.
Flow Control: Stations on same link may have different speed or capacity. Data-link layer
ensures flow control that enables both machine to exchange data on same speed.
Multi-Access: When host on the shared link tries to transfer the data, it has a high probability of
collision. Data-link layer provides mechanism such as CSMA/CD to equip capability of
accessing a shared media among multiple Systems.
Unlike Layer 1 networking devices, Layer 2 LAN devices help filter network traffic by looking at the
MAC addresses in the frame. These MAC addresses are physical addresses burned into the network
interface cards (NICs) on PCs and devices. The data link layer devices reference these addresses when
performing its functions. The two types of LAN network devices that look at the MAC addresses are
bridges and switches. This section discusses the functions of both and how they are used to filter traffic
and reduce congestion on a network.
7.3.2 Layer 2 Devices
7.3.2.1 Bridges
The existence of a physical address or media access control (MAC) address for each computer makes it
possible to use a networking device that can read these addresses to filter traffic. Filtering traffic helps
to solve the problem of network congestion. One device that can read MAC addresses is called a
bridge. A bridge keeps a table with all MAC addresses on the network. This table enables the bridge to
recognize which MAC addresses are on each side of the bridge. A bridge works by keeping traffic
destined for one side of the bridge to that side alone. Since frames are not forwarded throughout the
whole network and are contained in the appropriate network segment, network traffic is minimized.
Less network traffic means less congestion, which results in a more efficient and faster network.
Less traffic can also mean a decrease in collisions. Collisions occur when data packets collide on the
media. The most common type of network is Ethernet. In an Ethernet network, a complete data frame is
transmitted one at a time. Only when that frame transmission is complete can a new frame begin. If
more than one frame is sent at a time, they may collide and the contents are destroyed. The frames have
to be resent, tying up the network and possibly causing other collisions. The number of collisions may
become so great that the network uses most of its resources to detect and recover from collisions. This
results in excessive network congestion and significant slow down of the network. To solve this
problem, bridges and switches are used to create several collision domains rather than just a single
large one.
7.3.2.2 Switches
A switch is sometimes referred to as a multi-port bridge, yet its functions are far more advanced. A
switch can divide the network into many subnetworks, or smaller networks, depending on the number
of ports on the switch. A switch helps to keep network communications from reaching beyond their
destination.
A switch allows multiple connections within it. When two hosts are communicating, they use only a
pair of ports. This allows other hosts on other ports to communicate without causing collisions or
affecting other transmissions.
Switches are also useful because several ports can be grouped together into a virtual local-area network
(VLAN). VLANs can be used to secure certain parts of the network or to manage departments within a
company. For instance, a company may group all accounting PCs and relevant servers on the same
VLAN so that they can communicate with each other and not allow any other user access to the
information.
While switches and bridges are used to filter network traffic based on MAC addresses, Layer 3 devices
look at the network addresses to determine the path that data will take.
7.3.3 Layer 2 Design
The purpose of Layer 2 devices in the network is to switch frames based on destination MAC address
information, provide error detection, and to reduce congestion in the network. The two most common
Layer 2 network devices are bridges and LAN switches. Devices at Layer 2 determine the size of the
collision domains.
Collisions and collision domain size are two factors that negatively affect the performance of a
network. Microsegmentation of the network reduces the size of collision domains and reduces
collisions. Microsegmentation is implemented through the use of bridges and switches. The goal is to
boost performance for a workgroup or a backbone. Switches can be used with hubs to provide the
appropriate level of performance for different users and servers.
Another important characteristic of a LAN switch is how it allocates bandwidth on a per-port basis.
This provides more bandwidth to vertical cabling, uplinks, and servers. This type of switching is
referred to as asymmetric switching. Asymmetric switching provides switched connections between
ports of unlike bandwidth, such as a combination of 10-Mbps and 100-Mbps ports. Symmetric
switching provides switched connections between ports of similar bandwidth.
The desired capacity of a vertical cable run is greater than that of a horizontal cable run. The
installation of a LAN switch at the MDF and IDF allows the vertical cable run to manage the data
traffic from the MDF to the IDF. The horizontal runs between the IDF and the workstations use
Category 5e UTP. A horizontal cable drop should not be longer than 100 meters (328 ft.). In a normal
environment, 10 Mbps is adequate for the horizontal drop. Asymmetric LAN switches allow 10-Mbps
and 100-Mbps ports on a single switch.
The next task is to determine the number of 10 Mbps and 100 Mbps ports needed in the MDF and
every IDF. This is accomplished by a review of the user requirements for the number of horizontal
cable drops per room and the number of total drops in any catchment area. This includes the number of
vertical cable runs. For example, suppose that user requirements dictate four horizontal cable runs to be
installed in each room. The IDF services a catchment area of 18 rooms. Therefore, four drops in each of
the 18 rooms equals 4x18, or 72 LAN switch ports.
The size of a collision domain is determined by the number of hosts that are physically connected to
any single port on the switch. This also affects the bandwidth that is available to any host. In an ideal
situation, there is only one host connected on a LAN switch port. The collision domain would consist
only of the source host and destination host. The size of the collision domain would be two. Because of
the small size of this collision domain, there should be virtually no collisions when any two hosts
communicate with each other. Another way to implement LAN switching is to install shared LAN hubs
on the switch ports. This allows multiple hosts to connect to a single switch port. All hosts connected to
the shared LAN hub share the same collision domain and bandwidth. That means that collisions would
occur more frequently.
Shared media hubs are generally used in a LAN switch environment to create more connection points
at the end of the horizontal cable runs. This is an acceptable solution, but care must be taken. Collision
domains should be kept small and bandwidth to the host must be provided in accordance to the
specifications gathered in the requirements phase of the network design process.
7.4 Lecture Activities
Go on a fact -finding mission and get information from the Network
Administrator/Engineer of your company/organization. Try to find out the
following:
Are the layer 2 devices in your network?
Does the organization have clearly defined functional units?
How have switches been deployed in your network?
7.5 Self –Test Questions
What are the two sub-layers of the Data Link Layer?
List and briefly explain the functions of the Data Link Layer.
How are the functions of the bridge different from the functions of a switch?
What are the concerns of the Layer 2 Design?
7.6 Summary
In this lesson we have learned:
About the Data Link Layer
The functions of the Data Layer Link.
About the network devices that operate at the Data Link Layer
The Layer 2 Design.
7.7 Suggestion for Further Reading
The learner can read further by visiting the link provided below and reading the literature
presented:
http://www.tutorialspoint.com/data_communication_computer_network/data_link
_layer_introduction.htm
http://www.highteck.net/EN/DataLink/Data_Link_Layer.html