0% found this document useful (0 votes)
47 views121 pages

Module 2

This document discusses different types of computer networks and multiple access protocols. It describes four main types of networks: 1. LAN (Local Area Network) which connects computers in a small area like a building. 2. PAN (Personal Area Network) which connects personal devices within 10 meters of an individual. 3. MAN (Metropolitan Area Network) connects LANs over a larger geographic area like a city. 4. WAN (Wide Area Network) extends over large areas like states or countries, such as the internet. It then discusses multiple access protocols like ALOHA, CSMA, and Ethernet that allow nodes to share access to a transmission medium and reduce collisions.

Uploaded by

geles73631
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views121 pages

Module 2

This document discusses different types of computer networks and multiple access protocols. It describes four main types of networks: 1. LAN (Local Area Network) which connects computers in a small area like a building. 2. PAN (Personal Area Network) which connects personal devices within 10 meters of an individual. 3. MAN (Metropolitan Area Network) connects LANs over a larger geographic area like a city. 4. WAN (Wide Area Network) extends over large areas like states or countries, such as the internet. It then discusses multiple access protocols like ALOHA, CSMA, and Ethernet that allow nodes to share access to a transmission medium and reduce collisions.

Uploaded by

geles73631
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 121

Dayananda Sagar University Bangalore

Department of Computer Science


Computer Networks (19CS3602)
By
Prof. Pooja
Assistant Professor, CSE, DSU
• Computer Network Types or Classification of Networks:

• A computer network is a group of computers linked to each other that enables the computer to communicate
with another computer and share their resources, data, and applications.

• A computer network can be categorized by their size. A computer network is mainly of four types:

o LAN(Local Area Network)


o PAN(Personal Area Network)
o MAN(Metropolitan Area Network)
o WAN(Wide Area Network)
• LAN(Local Area Network)
o Local Area Network is a group of computers connected to each other in a small area such as
building, office.
o LAN is used for connecting two or more personal computers through a communication medium
such as twisted pair, coaxial cable, etc.
o It is less costly as it is built with inexpensive hardware such as hubs, network adapters, and ethernet
cables.
o The data is transferred at an extremely faster rate in Local Area Network.
o Local Area Network provides higher security.
• PAN(Personal Area Network)
o Personal Area Network is a network arranged within an individual person, typically within a range of
10 meters.
o Personal Area Network is used for connecting the computer devices of personal use is known as
Personal Area Network.
o Thomas Zimmerman was the first research scientist to bring the idea of the Personal Area Network.
o Personal Area Network covers an area of 30 feet.
o Personal computer devices that are used to develop the personal area network are the laptop, mobile
phones, media player and play stations.
• There are two types of Personal Area Network:

o Wired Personal Area Network


o Wireless Personal Area Network

Wireless Personal Area Network: Wireless Personal Area Network is developed by simply using wireless
technologies such as WiFi, Bluetooth. It is a low range network.

• Wired Personal Area Network: Wired Personal Area Network is created by using the USB.
• Examples Of Personal Area Network:

o Body Area Network: Body Area Network is a network that moves with a person. For
example, a mobile network moves with a person. Suppose a person establishes a
network connection and then creates a connection with another device to share the
information.

o Offline Network: An offline network can be created inside the home, so it is also known
as a home network. A home network is designed to integrate the devices such as
printers, computer, television but they are not connected to the internet.
• MAN(Metropolitan Area Network)
o A metropolitan area network is a network that covers a larger geographic area by interconnecting a
different LAN to form a larger network.
o Government agencies use MAN to connect to the citizens and private industries.
o In MAN, various LANs are connected to each other through a telephone exchange line.
o The most widely used protocols in MAN are Frame Relay, ATM, ADSL, etc.
o It has a higher range than Local Area Network(LAN).
• Uses Of Metropolitan Area Network:
o MAN is used in communication between the banks in a city.
o It can be used in an Airline Reservation.
o It can be used in a college within a city.
o It can also be used for communication in the military.
• WAN(Wide Area Network)
o A Wide Area Network is a network that extends over a large geographical area such as states or countries.
o A Wide Area Network is quite bigger network than the LAN.
o A Wide Area Network is not limited to a single location, but it spans over a large geographical area
through a telephone line, fibre optic cable or satellite links.
o The internet is one of the biggest WAN in the world.
o A Wide Area Network is widely used in the field of Business, government, and education.
• Examples Of Wide Area Network:
o Mobile Broadband: A 4G network is widely used across a region or country.

o Last mile: A telecom company is used to provide the internet services to the
customers in hundreds of cities by connecting their home with fiber.

o Private network: A bank provides a private network that connects the 44 offices. This
network is made by using the telephone leased line provided by the telecom company.
Multi Access Protocol:
• ALOHA, CSMA, Collision Free Protocols, Ethernet-Physical Layer,
Ethernet Mac Sub Layer, DLL Switching & Use of Bridges, Learning
Bridges, Spanning Tree Bridges, Repeaters, Hubs, Bridges, Switches,
Routers & Gateways. LLC, WIFI, Bluetooth protocol.
• Multiple access protocol
• Data Link Layer

• The data link layer is used in a computer network to transmit the data between two devices or nodes.

• It divides the layer into parts such as data link control and the multiple access resolution/protocol.

• The upper layer has the responsibility to flow control and the error control in the data link layer, and hence it
is termed as logical of data link control.

• Whereas the lower sub-layer is used to handle and reduce the collision or multiple access on a channel. Hence
it is termed as media access control or the multiple access resolutions.

• Data Link Control

• A data link control is a reliable channel for transmitting data over a dedicated link using various techniques
such as framing, error control and flow control of data packets in the computer network.
• What is a multiple access protocol?

• When a sender and receiver have a dedicated link to transmit data packets, the data link control is enough
to handle the channel.

• Suppose there is no dedicated path to communicate or transfer the data between two devices. In that case,
multiple stations access the channel and simultaneously transmits the data over the channel.

• It may create collision and cross talk. Hence, the multiple access protocol is required to reduce the collision
and avoid crosstalk between the channels.

• For example, suppose that there is a classroom full of students. When a teacher asks a question, all the
students (small channels) in the class start answering the question at the same time (transferring the data
simultaneously). All the students respond at the same time due to which data is overlap or data lost.
Therefore it is the responsibility of a teacher (multiple access protocol) to manage the students and make
them one answer.

• Following are the types of multiple access protocol that is subdivided into the different process as:
A. Random Access Protocol

• In this protocol, all the station has the equal priority to send the data over a channel.

• In random access protocol, one or more stations cannot depend on another station nor any station
control another station.

• Depending on the channel's state (idle or busy), each station transmits the data frame. However, if
more than one station sends the data over a channel, there may be a collision or data conflict.

• Due to the collision, the data frame packets may be lost or changed. And hence, it does not receive
by the receiver end.

• Following are the different methods of random-access protocols for broadcasting frames on the
channel.
o Aloha
o CSMA
o CSMA/CD
o CSMA/CA
1. ALOHA Random Access Protocol

• It is designed for wireless LAN (Local Area Network) but can also be used in a shared medium to
transmit data.

• Using this method, any station can transmit data across a network simultaneously when a data
frameset is available for transmission.

• Aloha Rules
1. Any station can transmit data to a channel at any time.
2. It does not require any carrier sensing.
3. Collision and data frames may be lost during the transmission of data through multiple stations.
4. Acknowledgment of the frames exists in Aloha. Hence, there is no collision detection.
5. It requires retransmission of data after some random amount of time.
• Pure Aloha

• Whenever data is available for sending over a channel at stations, we use Pure Aloha.

• In pure Aloha, when each station transmits data to a channel without checking whether the channel
is idle or not, the chances of collision may occur, and the data frame can be lost.

• When any station transmits the data frame to a channel, the pure Aloha waits for the receiver's
acknowledgment.

• If it does not acknowledge the receiver end within the specified time, the station waits for a random
amount of time, called the backoff time (Tb).

• And the station may assume the frame has been lost or destroyed. Therefore, it retransmits the
frame until all the data are successfully transmitted to the receiver.
• Slotted Aloha

• The slotted Aloha is designed to overcome the pure Aloha's efficiency because pure Aloha has a
very high possibility of frame hitting. In slotted Aloha, the shared channel is divided into a fixed
time interval called slots.

• So that, if a station wants to send a frame to a shared channel, the frame can only be sent at the
beginning of the slot, and only one frame is allowed to be sent to each slot. And if the stations
are unable to send data to the beginning of the slot, the station will have to wait until the
beginning of the slot for the next time. However, the possibility of a collision remains when
trying to send a frame at the beginning of two or more station time slot.
• CSMA (Carrier Sense Multiple Access)

• It is a carrier sense multiple access based on media access protocol to sense the traffic on a channel
(idle or busy) before transmitting the data. It means that if the channel is idle, the station can send data
to the channel. Otherwise, it must wait until the channel becomes idle. Hence, it reduces the chances of
a collision on a transmission medium.

• CSMA Access Modes

• 1-Persistent: In the 1-Persistent mode of CSMA that defines each node, first sense the shared channel
and if the channel is idle, it immediately sends the data. Else it must wait and keep track of the status of
the channel to be idle and broadcast the frame unconditionally as soon as the channel is idle
(continuously sensing).

• Non-Persistent: It is the access mode of CSMA that defines before transmitting the data, each node
must sense the channel, and if the channel is inactive, it immediately sends the data. Otherwise, the
station must wait for a random time (not continuously), and when the channel is found to be idle, it
transmits the frames.

• P-Persistent: It is the combination of 1-Persistent and Non-persistent modes. The P-Persistent mode
defines that each node senses the channel, and if the channel is inactive, it sends a frame with
a P probability. If the data is not transmitted, it waits for a (q = 1-p probability) random time and
resumes the frame with the next time slot. If it is found that the channel is inactive, each station waits for
its turn to retransmit the data.
If the frame is successfully received, the station sends another frame. If any collision is detected in
the CSMA/CD, the station sends a jam/ stop signal to the shared channel to terminate data
transmission.
After that, All the stations it waits for a random time before sending a frame to a channel.
CSMA/CA:
• The basic idea behind CSMA/CD is that a station needs to be able to
receive while transmitting to detect a collision.
• When there is no collision, the station receives one signal: its own
signal. When there is a collision, the station receives two signals: its
own signal and the signal transmitted by a second station.
• To distinguish between these two cases, the received signals in these
two cases must be significantly different.
• In a wired network, the received signal has almost the same energy as
the sent signal because either the length of the cable is short or there
are repeaters that amplify the energy between the sender and the
receiver.
• However, in a wireless network, much of the sent energy is lost in
transmission.
• The received signal has very little energy. Therefore, a collision may
add only 5 to 10 percent additional energy. This is not useful for
effective collision detection in wireless network.
• We need to avoid collisions on wireless networks because they cannot
be detected. Carrier sense multiple access with collision avoidance
(CSMAlCA) was invented for this network.
• Collisions are avoided through the use of CSMAICA's three strategies:
the interframe space, the contention window, and acknowledgments,
as shown in Figure
• to avoid the collision:

These are three types of strategies:


1.Interframe Space (IFS) – When a station finds the channel busy, it waits for a
period of time called IFS time. IFS can also be used to define the priority of a
station or a frame. Higher the IFS lower is the priority.

2.Contention Window – It is the amount of time divided into slots. A station that
is ready to send frames chooses a random number of slots as wait time.
In CSMAlCA, if the station finds the channel busy, it does not restart the timer of
the contention window; it stops the timer and restarts it when the channel
becomes idle.

3. Acknowledgments – The positive acknowledgments and time-out timer can


help guarantee a successful transmission of the frame.
B. Controlled Access Protocol

• It is a method of reducing data frame collision on a shared channel.

• In the controlled access method, each station interacts and decides to


send a data frame by a particular station approved by all other stations.

• It means that a single station cannot send the data frames unless all other
stations are not approved. It has three types of controlled
access: Reservation, Polling, and Token Passing.
C. Channelization Protocols

• It is a channelization protocol that allows the total usable bandwidth in a shared


channel to be shared across multiple stations based on their time, distance and
codes. It can access all the stations at the same time to send the data frames to the
channel.
• Following are the various methods to access the channel based on their time,
distance and codes:

1.FDMA (Frequency Division Multiple Access)


2.TDMA (Time Division Multiple Access)
3.CDMA (Code Division Multiple Access)
• FDMA
• It is a frequency division multiple access (FDMA) method used to divide the available bandwidth
into equal bands so that multiple users can send data through a different frequency to the
subchannel.
• Each station is reserved with a particular band to prevent the crosstalk between the channels and
interferences of stations.
• Available bandwidth is shared by all stations.
• TDMA

• Time Division Multiple Access (TDMA) is a channel access method.


• It allows the same frequency bandwidth to be shared across multiple stations.
• And to avoid collisions in the shared channel, it divides the channel into different
frequency slots that allocate stations to transmit the data frames.
• The same frequency bandwidth into the shared channel by dividing the signal into
various time slots to transmit it.
• CDMA

• The code division multiple access (CDMA) is a channel access method. In CDMA, all stations can
simultaneously send the data over the same channel.
• It means that it allows each station to transmit the data frames with full frequency on the shared
channel at all times. It does not require the division of bandwidth on a shared channel based on
time slots.
• If multiple stations send data to a channel simultaneously, their data frames are separated by a
unique code sequence. Each station has a different unique code for transmitting the data over a
shared channel.
• For example, there are multiple users in a room that are continuously speaking. Data is received by
the users if only two-person interact with each other using the same language. Similarly, in the
network, if different stations communicate with each other simultaneously with different code
language.
• COLLISION FREE PROTOCOL:
• In computer networks, when more than one station tries to transmit simultaneously via a shared channel,
the transmitted data is garbled. This event is called collision. The Medium Access Control (MAC) layer of
the OSI model is responsible for handling collision of frames.
• Collision – free protocols are devised so that collisions do not occur. Protocols like CSMA/CD and
CSMA/CA nullifies the possibility of collisions once the transmission channel is acquired by any station.
However, collision can still occur during the contention period if more than one stations starts to transmit
at the same time. Collision – free protocols resolves collision in the contention period and so the
possibilities of collisions are eliminated.

• Types of Collision – free Protocols


1. Bit – map Protocol
• In bit map protocol, the contention period is divided into N slots, where N is the total number of
stations sharing the channel. If a station has a frame to send, it sets the corresponding bit in the slot.
• So, before transmission, each station knows whether the other stations want to transmit. Collisions are
avoided by mutual agreement among the contending stations on who gets the channel.

2. Binary Countdown
• This protocol overcomes the overhead of 1 bit per station of the bit – map protocol. Here, binary
addresses of equal lengths are assigned to each station. For example, if there are 6 stations, they
may be assigned the binary addresses 001, 010, 011, 100, 101 and 110.
• All stations wanting to communicate broadcast their addresses. The station with higher address gets
the higher priority for transmitting.

3. Limited Contention Protocols


• These protocols combines the advantages of collision based protocols and collision free protocols.
Under light load, they behave like ALOHA scheme.
• Under heavy load, they behave like bitmap protocols.
4. Adaptive Tree Walk Protocol
• In adaptive tree walk protocol, the stations or nodes are arranged in the form of a binary tree as follows -

Initially all nodes (A, B ……. G, H) are permitted to compete for the channel. If a node is successful
in acquiring the channel, it transmits its frame. In case of collision, the nodes are divided into two
groups (A, B, C, D in one group and E, F, G, H in another group). Nodes belonging to only one of
them is permitted for competing. This process continues until successful transmission occurs.
ETHERNET:
• IEEE STANDARDS

• The LAN market has several technologies such as Ethernet, Token Ring, Token Bus and ATM LAN.

• In 1985, the Computer Society of the IEEE started a project, called Project 802, to set standards to enable
intercommunication among equipment from a variety of manufacturers. Project 802 is a way of specifying
functions of the physical layer and the data link layer of major LAN protocols.

• The standard was adopted by the American National Standards Institute (ANSI). In 1987, the International
Organization for Standardization (ISO) also approved it as an international standard under the designation
ISO 8802.

• The relationship of the 802 Standard to the traditional OSI model is shown in Figure 13.1.

• . IEEE has also created several physical layer standards for different LAN protocols.

17/03/2024 47
• The IEEE has subdivided data link layer into two sublayers: logical link control (LLC) and media access control
(MAC).
• Figure IEEE standard for LANs

17/03/2024 48
• Logical Link Control:

• data link control handles framing, flow control, and error control. In IEEE Project 802, flow control, error control, and part
of the framing duties are collected into one sublayer called the logical link control. Framing is handled in both the LLC
sublayer and the MAC sublayer.

• The LLC provides one single data link control protocol for all IEEE LANs. In this way, the LLC is different from the
media access control sublayer, which provides different protocols for different LANs.

• A single LLC protocol can provide interconnectivity between different LANs because it makes the MAC sublayer
transparent. Figure 13.1 shows one single LLC protocol serving several MAC protocols.

17/03/2024 49
• Framing LLC defines a protocol data unit (PDU) that is somewhat similar to that of HDLC.
• The header contains a control field like the one in HDLC; this field is used for flow and error control. The
two other header fields define the upper-layer protocol at the source and destination that uses LLC.
• These fields are called the destination service access point (DSAP) and the source service access point
(SSAP). The other fields defined in a typical data link control protocol such as HDLC are moved to the MAC
sublayer.
• In other words, a frame defined in HDLC is divided into a PDU at the LLC sublayer and a frame at the MAC
sublayer, as shown in above Figure.
• Need for LLC The purpose of the LLC is to provide flow and error control for the upper-layer protocols that
actually demand these services.

Figure High Level Data Link Control (HDLC) frame compared with LLC and MAC frames
• Media Access Control:

• It specifies the media access method for each LAN.


• For example, it defines CSMA/CD as the media access method for Ethernet LANs and
the token-passing method for Token Ring and Token Bus LANs.
• It defines the access method and the framing format specific to corresponding LAN
protocol.
• IEEE Project 802 has created a sublayer called media access control that defines the
specific access method for each LAN.
• As we discussed in the previous section, part of the framing function is also handled by
the MAC layer. In contrast to the LLC sublayer, the MAC sublayer contains a number of
distinct modules; each defines the access method and the framing format specific to the
corresponding LAN protocol.
• STANDARD ETHERNET:

• The original Ethernet was created in 1976 at Xerox’s Palo Alto Research Center (PARC). Since then, it has gone through
four generations. We briefly discuss the Standard (or traditional) Ethernet in this section.

• Figure Ethernet evolution through four generations

17/03/2024 52
• Figure Categories of Standard Ethernet

17/03/2024 53
• l0Base5: Thick Ethernet

 The first implementation is called 10Base5, thick Ethernet, or Thicknet.


 The nickname derives from the size of the cable, which is roughly the size of a garden hose and too stiff to bend with
your hands.
 l0Base5 was the first Ethernet specification to use a bus topology with an external transceiver (transmitter/receiver)
connected via a tap to a thick coaxial cable.

 The transceiver is responsible for transmitting, receiving, and detecting collisions. The transceiver is connected to the
station via a transceiver cable that provides separate paths for sending and receiving. This means that collision can only
happen in the coaxial cable.

 The maximum length of the coaxial cable must not exceed 500 m, otherwise, there is excessive degradation of the signal.

17/03/2024 54
Figure 13.10 10Base5 implementation
• 10Base2: Thin Ethernet

 The second implementation is called l0Base2, thin Ethernet, or Cheaper net. 10Base2 also uses a bus topology, but the
cable is much thinner and more flexible.
 The cable can be bent to pass very close to the stations. In this case, the transceiver is normally part of the network
interface card (NIC), which is installed inside the station.

 NIC is a hardware component, circuit board which is installed on a computer so it can connect to a network.

 Note that the collision here occurs in the thin coaxial cable. This implementation is more cost effective than 10Base5
because thin coaxial cable is less expensive than thick coaxial.

 Installation is simpler because the thin coaxial cable is very flexible. However, the length of each segment cannot
exceed 185 m (close to 200 m) due to the high level of attenuation in thin coaxial cable.

17/03/2024 56
 Figure 13.11 10Base2 implementation
• 10Base-T: Twisted-Pair Ethernet

• The third implementation is called l0Base-T or twisted-pair Ethernet. 10Base-T uses a physical star topology. The stations
are connected to a hub via two pairs of twisted cable, as shown in Figure 13.12

• Note that two pairs of twisted cable create two paths (one for sending and one for receiving) between the station and the
hub. Any collision here happens in the hub.

• Compared to l0Base2, we can see that the hub actually replaces the coaxial cable as far as a collision is concerned. The
maximum length of the twisted cable here is defined as 100 m, to minimize the effect of attenuation in the twisted cable.

• Figure 13.12 10Base-T implementation

17/03/2024 58
• l0Base-F: Fiber Ethernet

 Although there are several types of optical fiber l0-Mbps Ethernet, the most common is called 10Base-F. l0Base-F uses a
star topology to connect stations to a hub.
 The stations are connected to the hub using two fiber-optic cables, as shown in Figure 13.13.

• Figure 13.13 10Base-F implementation

17/03/2024 59
• FAST ETHERNET:

• Fast Ethernet was designed to compete with LAN protocols such as FDDI or Fiber Channel. IEEE created Fast Ethernet
under the name 802.3u. Fast Ethernet is backward-compatible with Standard Ethernet, but it can transmit data 10 times
faster at a rate of 100 Mbps.

• The goals of Fast Ethernet can be summarized as follows:

1. Upgrade the data rate to 100 Mbps.

2. Make it compatible with Standard Ethernet.

3. Keep the same 48-bit address.

4. Keep the same frame format.

5. Keep the same minimum and maximum frame lengths

17/03/2024 60
• Figure Fast Ethernet implementations

17/03/2024 61
• GIGABIT ETHERNET:

• The need for an even higher data rate resulted in the design of the Gigabit Ethernet protocol (1000 Mbps). The IEEE
committee calls the Standard 802.3z.

• The goals of the Gigabit Ethernet design can be summarized as follows:

1. Upgrade the data rate to 1 Gbps.

2. Make it compatible with Standard or Fast Ethernet.

3. Use the same 48-bit address.

4. Use the same frame format.

5. Keep the same minimum and maximum frame lengths.

6. To support auto negotiation as defined in Fast Ethernet.

17/03/2024 62
• Figure Gigabit Ethernet implementations

17/03/2024 63
• MAC SUBLAYER:

• In standard Ethernet, the MAC sublayer governs the operation of the access method.

• It also frames data received from the upper layers and passes them to the physical layer.

• Frame Format:

• Ethernet does not provide any mechanism for acknowledging received frames.

• This frame contains 7 fields: preamble, SFD, DA, SA, length or type of protocol data unit, upper-layer data and
CRC.

17/03/2024 64
• Figure 13.4 802.3 MAC frame

17/03/2024 65
17/03/2024 66
Frame Length
 Ethernet has imposed restrictions on both the minimum and
maximum
lengths of a frame.
 The minimum length restriction is required for the correct operation
of
CSMA/CD.
 An Ethernet frame needs to have a minimum length of 512 bits or 64
bytes.
 Part of this length is the header and the trailer.
 If we count 18 bytes of header and trailer (6 bytes of source
address, 6 bytes of destination address, 2 bytes of length or type,
and 4 bytes of CRC), then the minimum length of data from the
upper layer is 64 − 18
= 46 bytes.
 If the upper-layer packet is less than 46 bytes, padding is added to
 The standard defines the maximum length of a frame
(without preamble and SFD field) as 1518 bytes.
 If we subtract the 18 bytes of header and trailer, the maximum
length of the payload is 1500 bytes.
 The maximum length restriction has two historical reasons.
• First, memory was very expensive when Ethernet was designed; a
maximum length restriction helped to reduce the size of the
buffer.
• Second, the maximum length restriction prevents one station from
monopolizing the shared medium, blocking other stations that
have data
Minimum to length:
frame send. 64 bytes Minimum data length: 46 bytes
Maximum frame length: 1518 Maximum data length: 1500
bytes bytes
• Addressing:

• Each station on an Ethernet network has its own Network Interface Card (NIC).

• The NIC fits inside the station and provides the station with a 6-byte physical address.

• NIC is a hardware component, circuit board which is installed on a computer so it can connect to a network.

• The Ethernet address is a 6-byte (48 bits), normally written in hexa-decimal notation, with a colon between bytes.

• Figure Example of an Ethernet address in hexadecimal notation

70
• Unicast, multicast and broadcast addresses:

• A source address is always a unicast address- the frame comes from only one station.

• The destination address, however, can be unicast, multicast or broad cast address.

• If the least significant bit for the first byte in a destination address is 0, the address is unicast; otherwise, it is multicast.

• A unicast destination address defines only one recipient and the relationship between sender and receiver is one-to-
one.

• A multicast destination address defines a group of addresses and the relationship between sender and receiver is one-
to-many.

• The broadcast address is a special case of multicast address and the recipients are all the stations in the LAN.

71
72
• DATA LINK LAYER SWITCHING:
• Network switching is the process of forwarding data frames from one port to another leading to data transmission from
source to destination.

• Data link layer is the second layer of the Open System Interconnections (OSI) model whose function is to divide the
stream of bits from physical layer into data frames and transmit the frames according to switching requirements.

• Switching in data link layer is done by network devices called bridges.

• Bridges:
• A data link layer bridge connects multiple LANs (local area networks) together to form a larger LAN.

• This process of aggregating networks is called network bridging.

73
• A bridge connects the different components so that they appear as parts of a single network.
• The following diagram shows a bridge connecting two LANs −

74
• USES OF BRIDGE:
 Bridges connects two or more different LANs that has a similar protocol and provides communication between
the devices (nodes) in them.

 By joining multiple LANs, bridges help in multiplying the network capacity of a single LAN.

 Since they operate at data link layer, they transmit data as data frames. On receiving a data frame, the bridge
consults a database to decide whether to pass, transmit or discard the frame.

o If the frame has a destination MAC (media access control) address in the same network, the bridge passes
the frame to that node and then discards it.

o If the frame has a destination MAC address in a connected network, it will forward the frame toward it.

75
 By deciding whether to forward or discard a frame, it prevents a single faulty node from bringing down the entire
network.

 In cases where the destination MAC address is not available, bridges can broadcast data frames to each node. To
discover new segments, they maintain the MAC address table.

 In order to provide full functional support, bridges ideally need to be transparent. No major hardware, software
or architectural changes should be required for their installation.

76
• Switching by Bridges:
• When a data frame arrives at a particular port of a bridge, the bridge examines the frame’s data link address, or more
specifically, the MAC address.

• If the destination addresses as well as the required switching is valid, the bridge sends the frame to the directed port.
Otherwise, the frame is discarded.

• The bridge is not responsible for end-to-end data transfer. It is concerned with transmitting the data frame from one hop
to the next.

• Due to this, they can help in switching any kind of packets from the network layer above.

• Bridges also connect virtual LANs (VLANs) to make a larger VLAN.

• If any segment of the bridged network is wireless, a wireless bridge is used to perform the switching.

• There are three main ways for bridging −

 simple bridging
 multi-port bridging
 learning or transparent bridging

77
REPEATERS, HUBS, BRIDGES, SWITCHES

78
Introduction

• All these devices operate in different layers as illustrated in below figure. The layer
matters because different devices use different pieces of information to decide how to
switch.

79
Repeaters
 The repeater operates in the physical layer.

 These are analog devices that work with signals on the cables to which they are connected.

 A signal appearing on one cable is regenerated and put out on another cable. Hence it extends the physical
length of LAN.

 Distance covered by the signal we can increase by using the repeaters.

 Repeaters do not understand frames, packets or headers. They understand the symbols that encode bit as
volts.

80
Hub
 A hub has a number of input lines that it joins electrically. Active hub and passive hub are two types of hubs.

 Frames arriving on any of the lines are sent out on all the others. It is broadcast device. If two frames arrive
at the same time, they will collide, just as on a coaxial cable.

• Like repeaters, hubs are physical layer devices that do not examine the link layer addresses or use them in
any way. It is not an intelligent device.

82
Bridge
 A bridge connects two or more LANs. It operates at data link layer.

 Like a hub, a modern bridge has multiple ports, usually enough for 4 to 48 input lines of a certain type.
Unlike in a hub, each port is isolated to be its own collision domain.

 When a frame arrives, the bridge extracts the destination address (for Ethernet, it is 48 bit) from the frame
header and looks it up in a table to see where to send the frame.

 The bridge only outputs the frame on the port where it is needed and can forward multiple frames at the
same time.

83
Switch
 Switches are modern bridges by another name. It acts as multiport bridge to connect devices or segments in
a LAN. It operates at data link layer.

 It is an intelligent device. It uses switching table to find the correct destination.

 Switches are of two types:

• i. Store-and-forward switch: It stores the frame in the input buffer until the whole packet has arrived.

• ii. Cut-through switch: It forwards the packet to the output buffer as soon as the destination address is
received.

85
Learning Bridge and
Spanning Tree

86
Bridges
• Link Layer devices: operate on Ethernet frames, examining frame
header and selectively forwarding frame based on its destination
• Bridge isolates collision domains
• When frame is to be forwarded on segment, bridge uses CSMA/CD to
access segment and transmit

87
Bridges (more)
• Bridge advantages:
• Isolates collision domains resulting in higher total max throughput, and does
not limit the number of nodes nor geographical coverage

• Can connect different type Ethernet since it is a store and forward device

• Transparent: no need for any change to hosts LAN adapters

88
Backbone Bridge

89
Interconnection Without Backbone

• Not recommended for two reasons:


- single point of failure at Computer Science hub
- all traffic between EE and SE must path over CS segment

90
Bridges: frame filtering, forwarding

• bridges filter packets


• same-LAN -segment frames not forwarded onto other LAN segments
• forwarding:
• how to know on which LAN segment to forward frame?
• With the help of port numbers it will decide where to send.

91
Introducing Spanning Tree
• Allow a path between every LAN without causing
loops (loop-free environment)
• Bridges communicate with special configuration
messages (BPDUs)
• Standardized by IEEE 802.1D

Note: redundant paths are good, active redundant paths are bad (they cause
loops)

94
Spanning Tree Algorithm:
Select Root Bridge Designated Bridges
• Initially, each bridge considers itself to be the
designated bridge
• Bridges send BDPU frames to its attached LANs
• The bridge and port ID of the sending bridge
• The bridge and port ID of the bridge the sending bridge considers root
• The root path cost for the sending bridge

• 3. Best one wins


• (lowest ID/cost/priority)

108
Routers and Gateways

112
Routers:
• Routers are networking devices operating at layer 3 or a network layer of the OSI model.
• They are responsible for receiving, analysing, and forwarding data packets among the connected
computer networks.
• When a data packet arrives, the router inspects the destination address, consults its routing tables
to decide the optimal route and then transfers the packet along this route.
• Features of Routers
 It connects different networks together and sends data packets from one network to another.
 A router can be used both in LANs (Local Area Networks) and WANs (Wide Area Networks).
 It transfers data in the form of IP packets. In order to transmit data, it uses IP address mentioned in
the destination field of the IP packet.
 Routers have a routing table in it that is refreshed periodically according to the changes in the
network. In order to transmit data packets, it consults the table and uses a routing protocol.
 In order to prepare or refresh the routing table, routers share information among each other.
 Routers provide protection against broadcast storms.
 Routers are more expensive than other networking devices like hubs, bridges and switches.
 Routers are manufactured by some popular companies like −
o Cisco
o D-Link
o HP
• Routing Table

• The functioning of a router depends largely upon the routing table stored in it. The routing table
stores the available routes for all destinations.

• The router consults the routing table to determine the optimal route through which the data packets
can be sent.

• Routing tables are of two types −


 Static Routing Table − Here, the routes are given manually and are not refreshed automatically. It
is suitable for small networks containing 2-3 routers.
 Dynamic Routing Table − Here, the router communicates with other routers using routing
protocols to determine the available routes. It is suited for larger networks having large number of
routers.
• Types of Routers:
 Wireless Router − They provide WiFi connection WiFi devices like laptops, smartphones etc. They can
also provide standard Ethernet routing. For indoor connections, the range is 150 feet while its 300 feet for
outdoor connections.

 Broadband Routers − They are used to connect to the Internet through telephone and to use voice over
Internet Protocol (VoIP) technology for providing high-speed Internet access. They are configured and
provided by the Internet Service Provider (ISP).

 Edge Routers − They connect the internal network to the external networks, and are suitable for
transferring data packets across networks. They use Border Gateway Protocol (BGP) for connectivity.
There are two types of edge routers, subscriber edge routers and label edge routers.

• Brouters − Brouters are specialised routers that can provide the functionalities of bridges as well. Like a
bridge, brouters help to transfer data between networks. And like a router, they route the data within the
devices of a network.
Gateway:
• A gateway is a network node that forms a passage between two networks operating with different
transmission protocols.
• The most common type of gateways, the network gateway operates at layer 3, i.e. network layer of
the OSI (open systems interconnection) model.
• However, depending upon the functionality, a gateway can operate at any of the seven layers of OSI
model. It acts as the entry – exit point for a network since all traffic that flows across the networks
should pass through the gateway.
• Only the internal traffic between the nodes of a LAN does not pass through the gateway.
• Features of Gateways:

 Gateway is located at the boundary of a network and manages all data that inflows or outflows
from that network.
 A gateway operates as a protocol converter, providing compatibility between the different protocols
used in the two different networks.
 The feature that differentiates a gateway from other network devices is that it can operate at any
layer of the OSI model.
 It also stores information about the routing paths of the communicating networks.
 When used in enterprise scenario, a gateway node may be supplemented as proxy server or
firewall.
 A gateway is generally implemented as a node with multiple NICs (network interface cards)
connected to different networks. However, it can also be configured using software.
 It uses packet switching technique to transmit data across the networks.
Types of gateways
• Web application firewalls- This type filters traffic to and from a web
server and looks at application-layer data.
• Cloud storage gateways- This type translates storage requests with
various cloud storage service API calls. It allows organizations to integrate
storage from a private cloud into applications without migrating into a
public cloud.
• API or XML gateways – This type manages traffic flowing into and out of a
service, microservices-oriented architecture or XML-based web service.
• IoT gateways-This type aggregates sensor data from devices in an IoT
environment, translates between sensor protocols and processes sensor
data before sending it onward.
119
• Media gateways- This type converts data from the format required for
one type of network to the format required for another.
• Email security gateways- This type prevents the transmission of emails
that break company policy or will transfer information with malicious
intent.
• VoIP trunk gateways- This type facilitates the use of plain old
telephone service equipment, such as landline phones and fax
machines, with a voice over IP (VoIP) network.
Difference between a gateway and a router

• Gateways and routers are similar in that they both can be used to
regulate traffic between two or more separate networks. However, a
router is used to join two similar types of networks and a gateway is
used to join two dissimilar networks. Dissimilar could be used to
describe networks that use different primary protocols.
• Due to this logic, a router may be considered a gateway, but a
gateway is not always considered a router. Routers are the most
common gateway, used to connect a home or enterprise network to
the internet.

121

You might also like