ITL355 Devices Layers 2024

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

ITL355: Computer Networks Lab

Lab 2 - Devices found at different layers of the


TCP/IP Model

March 21, 2024

End devices and networks cannot operate in isolation. There is need of


connecting devices to connect end devices together to make a network or to
connect networks together to make an internet. Connecting devices operate in
different layers of TCP/IP model. By saying a connecting device is Layer N ,
means that it opeartes at all layers from 1 to N , and thus, can access all their
features. Table 1 summarizes the different connecting devices and the associated
layers.

Table 1: Devices at different TCP/IP layers

Layers Devices

Application Gateway, All end devices


Transport -
Network Router
Data Link Bridge, Switch
Physical Repeater, Hub

1. Physical Layer. This layer of TCP/IP model is responsible for physical


connectivity of two devices. Some of the devices used in Physical layers
are:
(a) Repeater – A repeater operates at the physical layer. Its job is to re-
generate the signal over the same network before the signal becomes
too weak or corrupted so as to extend the length to which the signal
can be transmitted over the same network. An important point to be
noted about repeaters is that Analog repeaters only amplify the sig-
nal. However, digital repeaters when the signal becomes weak, they

1
copy the signal bit by bit and regenerate it at the original strength.
It is a 2 port device.
(b) Hub – A hub is basically a multiport repeater and it also helps to con-
nect different LAN segments. A hub connects multiple wires coming
from different branches, for example, the connector in star topology
which connects different stations. Hubs are Layer 1 device, hence,
have no intelligence and cannot filter data, so whenever they receive
any data packet they do a broadcast, i.e., data packets are sent to
all connected devices. Also, they do not have intelligence to find out
best path for data packets which leads to inefficiencies and wastage.

2. Data Link Layer. This layer is responsible to transfer data hop by hop
(i.e within same LAN, from one device to another device) based on the
MAC address. Some of the devices used in Data Link layer are:
(a) Bridge – A bridge operates at data link layer. A bridge is a repeater
(physical layer functionality), with add on the data link layer func-
tionality of filtering content by reading the MAC addresses of source
and destination. It is also used for interconnecting two LANs work-
ing on the same protocol. It has a single input and single output
port, thus making it a 2 port device.
(b) Switch - A switch is a multiport bridge with a buffer and a design
that can boost its efficiency (a large number of ports imply switch
may be able to allocate a unique port to each station. With each sta-
tion as its own independent entity, this means no competing traffic.)
and performance. With many ports The switch can perform error
checking before forwarding data, that makes it very efficient as it
does not forward packets that have errors and forward good packets
selectively to correct port only.
(c) Working principle of bridge and switch:
• Filtering is the ability to determine whether a frame should be
forwarded to an interface or should just be dropped. Bridge being
only a 2-port device thus, needs to make only a yes or no decision,
i.e., if it receives a data packet with source as well as destination
address having port 1, then it will drop the packets. However,
if the source and destination have different ports, it will forward
it to other port. Whereas, switch with multiple ports is more
efficient and needs to make forwarding decision, i.e., it needs to
determine which of the interfaces the frame should be directed
to. Both bridges and switches do this using their bridge/switch
tables. For each node on the LAN, the bridge/switch table con-
tains (1) the MAC address of the node, (2) the bridge/switch
interface (port) that leads towards the node.
• Learning. Earlier bridges and switches used to have static ta-
bles. However, these were highly inefficient and needed manual

2
changes. A better solution was to have dynamic tables that maps
addresses and ports automatically and learn the table with frame
movement. Self-learning process in switch comprises of following
steps (similar steps are followed for bridges except that it only
has two interfaces):
– The switch 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 switch for-
wards this frame to all interfaces except the interface from
which it was send.
– For each frame received, the switch stores in its table (1)
the LAN address in the frame’s source address field, (2) the
interface from which the frame arrived. All nodes except the
destination will reject the frame and the destination node will
send back ACK. Using this ACK, switch will again update
the table with destination’s address and corresponding inter-
face. In this manner, the switch records in its table different
nodes and their corresponding interfaces.
– Thus, once the table is ready when a frame arrives on one of
the interfaces and the frame’s destination address is checked
in the table and the switch forwards the frame to the appro-
priate interface.
– Switch deletes an address in the table if no frames are re-
ceived with that address as the source address after a period
of time (the aging time). In this manner, if a PC is replaced
by another PC (with a different adapter), the LAN address
of the original PC will eventually be purged from the switch
table.
So, for a switch first time it always does a broadcast and later
once it knows the addresses it does a unicast.

3. Network Layer. This layer is responsible for creating routing table,


and based on routing table, forwarding of the input request. Some of the
Devices used in Network Layer are,
(a) Routers - A router is a switch like device that routes/forwards data
packets based on their IP addresses. Routers normally connect Local
Area Network (LANs) and Wide Are Network (WANs) together and
have a dynamically updating routing table based on which they make
decisions on routing the incoming packets.
(b) Brouters - A bridge router or brouter is a network device that works
as a bridge and as a router. The brouter routes packets for known
protocols and simply forwards all other packets as a bridge would.
Brouters operate at both the network layer for routable protocols (or
between network with different data link layer protocol ex. one is

3
running on ethernet (802.3) and other network is running on Token
ring (802.5)) and at the data link layer for non-routable protocols (or
both network are using same data link layer protocol).
4. Application Layer. This layer is the top most layer of TCP/IP Model
that provides the interface between the applications and network. Ap-
plication layer is used exchange messages. Some of the devices used in
Application layer are:
(a) Gateway – A gateway, as the name suggests, is a passage to connect
two networks together that may work upon different networking mod-
els. They basically work as the messenger agents that take data from
one system, interpret it, and transfer it to another system. Gateways
are also called protocol converters and can operate at any network
layer. Gateways are generally more complex than switch or router.
(b) End devices like PC’s (Personal Computer), Phones, Servers, etc.

Collision and broadcast domain in devices:


• Collision Domain – A Collision Domain is a scenario in which when a
device sends out a message to the network, all other devices which are
included in its collision domain have to pay attention to it, no matter
if it was destined for them or not. This causes a problem because, in
a situation where two devices send out their messages simultaneously, a
collision will occur leading them to wait and re-transmit their respective
messages, one at a time. Note that it happens only in case of a half-duplex
mode.

• Broadcast Domain – A Broadcast Domain is a scenario in which when a


device sends out a broadcast message, all the devices present in its broad-
cast domain have to pay attention to it. This creates a lot of congestion
in the network, commonly called LAN congestion, which affects the band-
width of the users present in that network.

From this, we can realize that more the number of collision domains and more
the number of broadcast domains, the more efficient is the network providing
better bandwidth to all its users. Let us look at various devices and where they
stand.

• Hub neither breaks a collision domain nor a broadcast domain. All the
devices connected to a hub is in a single collision and single broadcast
domain. This is because hubs do not segment a network, they just connect
network segments.
• Switches have an advantage over the hub. Every port on a switch is in a
different collision domain, beacuse it unicasts once it has learned the table.
So messages that come from devices connected to different ports never
experience a collision. This helps us during designing networks but there

4
is still a problem with switches. They never break broadcast domains.
All the ports on the switch are in still in a single broadcast domain. If
a device sends a broadcast message, it will still cause congestion like first
time when switch is self-learning.
• Routers not only break collision domains but also break broadcast do-
mains. A router creates a connection between two networks. A broadcast
message from one network will never reach the other one as the router will
never let it pass.
Figure 1 and 2 illustrates the broadcast domains and collision domains for given
network.

Figure 1: Broadcast domains

Figure 2: Collision domains

5
References
[1] Chapter 15, Behrouz A. Forouzan, Data communications and Networking
(4th Ed.)
[2] Aaron Balchunas, CCNA Guides
[3] Devices used in each layer of TCP/IP model. [online]
https://www.geeksforgeeks.org/devices-used-in-each-layer-of-tcp-ip-model/
(Accessed April 2022).
[4] Network Devices. [online]
https://www.geeksforgeeks.org/network-devices-hub-repeater-bridge-switch-router-gateways/
(Accessed March 2023).

[5] Collision Domain and Broadcast Domain in Computer Network. [online]


https://www.geeksforgeeks.org/collision-domain-and-broadcast-domain-in-computer-network/
(Accessed March 2023).

You might also like