CN Module 2

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 98

COMPUTER NETWORKS

Presentation Material
Department of Computer Science & Engineering
 
Course  Code:20CS35XX Semester: V
Course  Title: COMPUTER NETWORKS Year:2022
Faculty Name: Prof. Pooja  

Computer Networks -19CS3602 Department of Computer Science & Engineering 1


MODULE 2
Syllabus:

Data Link Layer – MAC (Media Access Control) and LLC (Logical Link Control) sublayer
functionalities
Design Issues: Framing – Flow control (Simplest protocol, Stop and wait, sliding window)
Error control- CRC, Hamming code
Ethernet Basics-Multi Access Protocols: ALOHA, CSMA/CD
Connecting Devices: Hubs, Bridges, Switches, Routers, and Gateways

Computer Networks -19CS3602 Department of Computer Science & Engineering 2


• The communication channel that connects the adjacent nodes is known as links, and in order to
move the datagram from source to the destination.

• The main responsibility of the Data Link Layer is


• Providing a well defined service interface to the network layer
• Data is represented as Frames.
• Dealing with transmission errors
• Regulating the flow of data so that slow receivers are not swamped by fast senders
To accomplish these goals the DLL takes the packets it gets from the network layer and encapsulates
them into frames for transmission.

• The Data Link Layer protocols are Ethernet, token ring and PPP.
Frames
A frame contains (see the image below),
1. A frame header contains control information
2. A payload field for holding the packet
3. A frame trailer

Data transmitted on a physical link are packed in units of frames.


Control information in frame header means the destination address, the upper-layer protocol in use, the
error detection code, etc.
5
The protocols used to determine who goes next on a
multi-access channel belong to a sublayer of the data
link layer called the MAC (Medium Access Control)
sublayer.
Technically, the MAC sublayer is the bottom part of the
data link layer.

6
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.
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 shows one single LLC protocol serving several MAC protocols.

21-09-2022 9
• The IEEE has subdivided data link layer into two sublayers: logical link control (LLC) and media access control
(MAC).
• Figure IEEE standard for LANs

21-09-2022 10
• 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
Design Issues

• Framing
• Flow Control(Simplest Protocol, Stop and wait, Sliding
Window)
• Error Control(CRC, Hamming Code)

12
Framing

• data link uses the services given to the physical layer.

• The source machine sends the data in the form of


frames to the destination machine.

• Starting point and the endpoint of the frame should


point out so that the destination machine can easily
identify the frame.

• The data link layer breaks the bitstream and calculates


the checksum for each layer.

• At the destination layer, the checksum is mentioned


one by one. Therefore, breaking the bitstream by
placing spaces and time gaps is known as framing.
• Approaches to Flow Control :
Flow Control is classified into two categories –
• Feedback – based Flow Control :
In this control technique, sender transmits data or information or frame to receiver, then
receiver transmits data back to sender and also allows sender to transmit more amount of
data or tell sender about how receiver is processing or doing. This means that sender
transmits data or frames after it has received acknowledgments from user.

• Rate – based Flow Control :


In this control technique, usually when sender sends or transfer data at faster speed to
receiver and receiver is not being able to receive data at the speed, then mechanism
known as built-in mechanism in protocol will just limit or restricts overall rate at which data
or information is being transferred or transmitted by sender without any feedback or
acknowledgment from receiver.
Simplex Protocol
The Simplex protocol is hypothetical protocol designed for unidirectional data transmission over an ideal
channel, i.e. a channel through which transmission can never go wrong. It has distinct procedures for
sender and receiver. The sender simply sends all its data available onto the channel as soon as they are
available to its buffer. The receiver is assumed to process all incoming data instantly. It is hypothetical since
it does not handle flow control or error control.

Properties of Simplex Protocol:


• The design of Simplex Protocol is based on 2 procedures i.e. Sender and Receiver.
• Both Sender and Receiver run in the data link layer but the sender runs in the data link layer of the source machine
while Receiver runs in datalink layer of the destination machine.
• It is designed for Uni-directional data transmission.
• Sender and receiver are always ready for data processing.
• Both of them have infinite buffer space available.
• The communication links never losses any data frames.
• It is considered as unrealistic as it does not handle flow control or error correction.
Stop – and – Wait Protocol
Stop – and – Wait protocol is for noiseless channel too. It provides unidirectional data transmission
without any error control facilities. However, it provides for flow control so that a fast sender does not
drown a slow receiver. The receiver has a finite buffer size with finite processing speed. The sender can
send a frame only when it has received indication from the receiver that it is available for further data
processing.

The primitives of stop and wait protocol are:


Sender side
Rule 1: Sender sends one data packet at a time.
Rule 2: Sender sends the next packet only when it receives the acknowledgment of the previous
packet.
Receiver side
Rule 1: Receive and then consume the data packet.
Rule 2: When the data packet is consumed, receiver sends the acknowledgment to the sender.

10.25
Stop and Wait

• Source transmits single frame


• Wait for ACK
• If received frame damaged, discard it
• Transmitter has timeout
• If no ACK within timeout, retransmit
• If ACK damaged, transmitter will not recognize it
• Transmitter will retransmit
• Receiver gets two copies of frame
• Use ACK0 and ACK1
Stop and Wait -
Diagram
Stop and Wait - Pros and Cons

• Simple
• Inefficient

• Case 1: Successful Transmission.


• Case 2: Ack not received within the time
period, so retransmission of frame is
done. The Ack is rejected by sender. The
duplicate frame is rejected by the
receiver.
• Case 3: Ack is lost. So retransmission of
frame is done. The duplicate frame is
rejected by the receiver.
• Case 4: Frame is lost. So
retransmission of frame is done after
waiting for time-out.
Sliding Window Protocol:
• The sliding window is a technique for sending multiple frames at a time. It controls the data packets
between the two devices where reliable and gradual delivery of data frames is needed. It is also used in 
TCP (Transmission Control Protocol)
• In this technique, each frame has sent from the sequence number. The sequence numbers are used to find
the missing data in the receiver end. The purpose of the sliding window technique is to avoid duplicate
data, so it uses the sequence number.
Stop – and – Wait ARQ
Stop – and – wait Automatic Repeat Request (Stop – and – Wait ARQ) is a
variation of the above protocol with added error control mechanisms, appropriate
for noisy channels. The sender keeps a copy of the sent frame. It then waits for a
finite time to receive a positive acknowledgement from receiver. If the timer expires
or a negative acknowledgement is received, the frame is retransmitted. If a
positive acknowledgement is received then the next frame is sent.

Negative Acknowledgment :
Whenever the receiver receives a damaged frame or a duplicate frame, it sends a
NACK back to the sender and sender must retransmit the correct frame.
Go – Back – N ARQ
Go – Back – N ARQ provides for sending multiple frames before receiving the acknowledgement for the first frame.
It uses the concept of sliding window, and so is also called sliding window protocol. The frames are sequentially
numbered and a finite number of frames are sent. If the acknowledgement of a frame is not received within the
time period, all frames starting from that frame are retransmitted.
Selective Repeat ARQ
This protocol also provides for sending multiple frames before receiving the
acknowledgement for the first frame. However, here only the erroneous or lost frames are
retransmitted, while the good frames are received and buffered.
• Ways of doing Error Control :
There are basically two ways of doing Error control as given
below :
1. Error Detection :
Error detection, as name suggests, simply means detection or identification
of errors. These errors may cause due to noise or any other impairments
during transmission from transmitter to the receiver, in communication
system. It is class of technique for detecting garbled i.e. unclear and
distorted data or message.

2. Error Correction :
Error correction, as name suggests, simply means correction or solving or
fixing of errors. It means reconstruction of original data that is error-free. But
error correction method is very costly and is very hard.
CYCLIC CODES

• Cyclic codes are special linear block codes with one


extra property. In a cyclic code, if a codeword is
cyclically shifted (rotated), the result is another
codeword.

Topics discussed in this section:

Cyclic Redundancy Check


Hardware Implementation
Polynomials
Cyclic Code Analysis
Advantages of Cyclic Codes
Other Cyclic Codes
CRC encoder and decoder
Data : 1 0 0 1
Division in CRC encoder
Generator : 1 0 1 1

Data word : data + (generator -1)


= 1001 + (4 bits -1=3 bits) 3 bit zeros append to data
= 1001+ 000
= 1001000
Figure 10.16 Division in the CRC decoder for two cases
Figure 10.17 Hardwired design of the divisor in CRC
Figure 10.18 Simulation of division in CRC encoder
Using Polynomials
• We can use a polynomial to represent a binary word.
• Each bit from right to left is mapped onto a power term.
• The rightmost bit represents the “0” power term. The bit next to it the
“1” power term, etc.
• If the bit is of value zero, the power term is deleted from the
expression.
Figure 10.22 CRC division using polynomials

CRC Sender Side or CRC Encoding:

Data or message =X3 + 1

Generator = X3 + X+1

Data word = (X3+1). (X3)


= X6 + X3
CRC Decoding or Receiver side:

50
Practice Problem:

• Message = 1010001101
Generator = 110101
• Find whether this is valid or not?
Hamming Code
General Algorithm of Hamming code: Hamming Code is simply the use of extra parity bits to allow the
identification of an error.
1. Write the bit positions starting from 1( in the form of LSB to MSB).

2. All the bit positions that are a power of 2 are marked as parity bits (n=1, 2, 4, 8,….n).

3. All the other bit positions are marked as data bits.

52
4. Each data bit is included in a unique set of parity bits, as determined its bit position in binary form. 
a. Parity bit 1 covers all the bits positions. For P1: it checks 1bit and skips 1bit till it reaches the MSB bit
acc/to example it is D7 (1, 3, 5, 7, etc). 
b. Parity bit 2 covers all the bits positions, starting from second bit position from LSB. Now for P2: it
checks 2bits and skips 2bits till it reaches the MSB acc/to example it is D7 (2, 3, 6, 7, etc). 
c. Parity bit 4 covers all the bits positions, starting from 4th bit position from LSB. Now for P4: it checks
4bits and skips 4bits till it reaches the MSB acc/to example it is D7 (4,5,6,7, etc). 

53
4. Since we check for even parity set a parity bit to 1 if the total number of ones in the
positions it checks is odd.
5. Set a parity bit to 0 if the total number of ones in the positions it checks is even.

54
Detecting Errors

55
Correcting the Errors

56
Ethernet Basics
Ethernet is a set of technologies and protocols that are used primarily in LANs. However, Ethernet
can also be used in MANs and even WANs. It was first standardized in the 1980s as IEEE 802.3
standard. Since then, it has gone through four generations, as shown in the following chart

Standard Ethernet is also referred to as Basic Ethernet. It uses 10Base5 coaxial cables for
communications. Ethernet provides service up to the data link layer. At the data link layer,
Ethernet divides the data stream received from the upper layers and encapsulates it into
frames, before passing them on to the physical layer.
57
Standard Ethernet has many physical layer implementations. The four main
physical layer implementations are shown in the following diagram

58
Figure 13.10 10Base5 implementation
 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

06/11/2022 61
• 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

06/11/2022 62
Figure 12.2 Taxonomy of multiple-access protocols discussed in this chapter

12.63
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.
Vulnerable time:
• The vulnerable time is in which there is a possibility of collision. We assume that the stations send fixed-length frames
with each frame taking Tfr S to send. The following figure shows the vulnerable time for station A.
• Station A sends a frame at time t. Now imagine station B has already sent a frame between t - T fr and t. This leads to a
collision between the frames from station A and station B. The end of B's frame collides with the beginning of A's frame.
• On the other hand, suppose that station C sends a frame between t and t + T fr . Here, there is a collision between frames
from station A and station C. The beginning of C's frame collides with the end of A's frame. We see vuklnerable time
during which a collision may occur in pure ALOHA , is 2 times the frame transmission time.
• Pure Aloha vulnerable time = 2* Tfr

68
Procedure for Pure ALOHA

69
• The time-out period is equal to the maximum possible round-trip propagation delay, which is
twice the amount of time required to send a frame between the two most widely separated
stations (2 x Tp) The back-off time TB is a random value that normally depends on K (the
number of attempted unsuccessful transmissions). The formula for TB depends on the
implementation. One common formula is the binary exponential back-off.

• In this method, for each retransmission, a multiplier in the range 0 to 2K - 1 is randomly chosen
and multiplied by Tp (maximum propagation time) or Tfr (the average time required to send out
a frame) to find TB' Note that in this procedure, the range of the random numbers increases
after each collision. The value of Kmax is usually chosen as 15.

70
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.
• In slotted ALOHA we divide the time into slots of Tfr and force the station to send only at
the beginning of the time slot. The following figure shows an example of frame collisions
in slotted ALOHA.
• Because a station is allowed to send only at the beginning of the synchronized time slot,
if a station misses this moment, it must wait until the beginning of the next time slot. This
means that the station which started at the beginning of this slot has already finished
sending its frame. But, still there is the possibility of collision if two stations try to send at
the beginning of the same time slot. However, the vulnerable time is now reduced to
one-half, equal to Tfr.  The following figure shows the situation.

72
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.
(i) 1-persistent CSMA
• In this method, station that wants to transmit data continuously senses the channel to check whether the channel is idle or
busy.
• If the channel is busy, the station waits until it becomes idle.
• When the station detects an idle-channel, it immediately transmits the frame with probability 1. Hence it is called 1-
persistent CSMA.
• This method has the highest chance of collision because two or more stations may find channel to be idle at the same time
and transmit their frames.
• When the collision occurs, the stations wait a random amount of time and start all over again.

74
Drawback of 1-persistent
• The propagation delay time greatly affects this protocol. Let us suppose, just after the station I begins its transmission,
station 2 also became ready to send its data and senses the channel. If the station I signal has not yet reached station 2,
station 2 will sense the channel to be idle and will begin its transmission. This will result in collision. Even if propagation
delay time is zero, collision will still occur. If two stations became .ready in the middle of third station’s transmission, both
stations will wait until the transmission of first station ends and then both will begin their transmission exactly
simultaneously. This will also result in collision.

75
(ii)Non-persistent CSMA

• In this scheme, if a station wants to transmit a frame and it finds that the channel is busy (some other station is
transmitting) then it will wait for fixed interval of time.
• After this time, it again checks the status of the channel and if the channel is free it will transmit.
• A station that has a frame to send senses the channel.
• If the channel is idle, it sends immediately.
• If the channel is busy, it waits a random amount of time and then senses the channel again.
• In non-persistent CSMA the station does not continuously sense the channel for the purpose of capturing it when it detects
the end of previous transmission.
Advantage of non-persistent
• It reduces the chance of collision because the stations wait a random amount of time. It is unlikely that two or more
stations will wait for same amount of time and will retransmit at the same time.
Disadvantage of non-persistent
• It reduces the efficiency of network because the channel remains idle when there may be stations with frames to send.
This is due to the fact that the stations wait a random amount of time after the collision.

76
77
(iii) p-persistent CSMA

• This method is used when channel has time slots such that the time slot duration is equal to or greater than the
maximum propagation delay time.
• Whenever a station becomes ready to send, it senses the channel.
• If channel is busy, station waits until next slot.
• If channel is idle, it transmits with a probability p.
• With the probability q=l-p, the station then waits for the beginning of the next time slot.
• If the next slot is also idle, it either transmits or waits again with probabilities p and q.
• This process is repeated till either frame has been transmitted or another station has begun transmitting.
• In case of the transmission by another station, the station acts as though a collision has occurred and it waits a
random amount of time and starts again.
Advantage of p-persistent
• It reduces the chance of collision and improves the efficiency of the network.

78
79
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.

 
Wireless Lan 802.11
• Wireless LAN stands for Wireless Local Area Network. It is also called LAWN (Local
Area Wireless Network). WLAN is one in which a mobile user can connect to a Local
Area Network (LAN) through a wireless connection.
• The IEEE 802.11 group of standards defines the technologies for wireless LANs. For
path sharing, 802.11 standard uses the Ethernet protocol and CSMA/CA (carrier sense
multiple access with collision avoidance).
• Wireless LANs provide high speed data communication in small areas such as building
or an office. WLANs allow users to move around in a confined area while they are still
connected to the network.

83
Advantages of WLANs  

•  It’s a reliable sort of communication.  


• As WLAN reduces physical wires so it’s a versatile way of communication.  
• It’s easier to feature or remove workstation. 
• It provides high rate to small area coverage.  
• You’ll also move workstation while maintaining the connectivity.  
• The direction of connectivity are often anywhere i.e. you’ll connect devices in any
direction unless it’s within the range of access point.  
• Easy installation and don’t need extra cables for installation. 
• WLAN are often useful in disasters situation e.g. earthquake and fire.
• it’s economical due to the tiny area access. 

84
Disadvantages of WLANs:
• WLAN requires license.  
• The Government agencies can control the flow of signals of WLAN and
can also limit it  if required. this will affect data transfer from connected
devices to the web.  
• If the amount of connected devices increases then data transfer rate
decreases.  
• WLAN uses frequency which may interfere with other devices which use
frequency. 
• If there’s rain or thunder then communication may interfere. 
• Due to Low security as attackers can get access to the transmitted data.  
• Signals could also be suffering from the environment as compared to using
fiber optics.  
• The radiation of WLAN are often harmful to the environment.
85
Connecting Devices: Hubs, Bridges, Switches,
Routers and Gateways

Department of Computer Science & Engineering 86


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.

Department of Computer Science & Engineering 87


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.

Department of Computer Science & Engineering

88
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.

Department of Computer Science & Engineering 89


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 point to point device.

∙ 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.

Department of Computer Science & Engineering 90


Routers and Gateways

Department of Computer Science & Engineering 91


Routers:
• Routers are networking devices operating at layer 3 or a network layer of the OSI model.
• They are responsible for receiving, analyzing, 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
• 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 specialized 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
• 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.

97
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 & Dissimilar 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.

98

You might also like