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

UNIT-1

Q.1) What is network topology? Explain different types of network topology.

Network Topology is the arrangement in which different computer systems or network


devices are connected to each other.

Types of network topology -


1) BUS TOPOLOGY: It is a network type in which every computer and the network device is
connected to a single cable. When it has exactly two endpoints, then it is called Bus topology.

FEATURES:
● It transmits data only in one direction (unidirectional)
● Every device is connected to a single cable

ADVANTAGES:
● Low cost
● Used in small networks.
● Easy to expand by joining two cables together.

DISADVANTAGES:
● Network fails due to cable failure.
● In case of heavy network traffic , the performance of the network decreases.
● Cable has a limited length.

2) RING TOPOLOGY: It is called ring topology as it forms a ring as each computer is


connected to another computer, with the last one connected to the first.

FEATURES:
● A number of repeaters are used and the transmission is unidirectional.
● Data is transferred in a sequential manner that is bit by bit

ADVANTAGES:
● Easy to install and reconfigure.
● Offers equal access to all the computers of the networks
● Faster error checking and acknowledgment.

DISADVANTAGES:
● Break in a single ring can risk the breaking of the entire network
● Modern day high-speed LANs made this topology less popular.
● It is very difficult to troubleshoot the ring network.
3) STAR TOPOLOGY: In this type of topology all the computers are connected to a single hub
through a cable.
This hub is the central node and all other nodes are connected to the central node.

FEATURES:
● Every node has its own dedicated connection to the hub.
● Acts as a repeater for data flow.
● Can be used with twisted pair, Optical Fibre or coaxial cable

ADVANTAGES:
● Only those nodes are affected, that has failed. Other nodes still work.
● Fast performance with few nodes and very low network traffic.
● In Star topology, addition, deletion, and moving of the devices are easy.

DISADVANTAGES:
● High Cost and Maintenance
● If the hub fails then the whole network is stopped because all the nodes depend on
the hub.
● Performance is based on the hub, that is it depends on its capacity.

4) MESH TOPOLOGY: It is a point-to-point connection to other nodes or devices. All the


network nodes are connected to each other. Mesh has n(n-1)/2 physical channels to link n
devices. In Mesh Topology, the connections between devices take place randomly.

FEATURES:
● Fully connected.
● Robust.
● Not flexible.

ADVANTAGES:
● Each connection can carry its own data load.
● Fault is diagnosed easily.
● Provides security and privacy.

DISADVANTAGES:
● Difficult Installation
● High Cabling cost
● Bulk wiring is required.
● High power consumption and High maintenance.
5) TREE TOPOLOGY: It has a root node and all other nodes are connected to it forming a
hierarchy. It is also called hierarchical topology. It should at least have three levels to the
hierarchy.

FEATURES:
● Ideal if workstations are located in groups.
● Used in Wide Area Network.
● Every system is fully connected .
● It Is Robust .

ADVANTAGES:
● Expansion of nodes is possible and easy.
● Easily managed and maintained.
● Error detection is easily done.

DISADVANTAGES:
● Costly.
● Node maintenance is difficult.
● Central hub fails, network fails

6) HYBRID TOPOLOGY: It is two different types of topologies which are a mixture of two or
more topologies.

FEATURES:
● It is a combination of two or more topologies
● Inherits the advantages and disadvantages of the topologies included

ADVANTAGES:
● Effective.
● Scalable as size can be increased easily.
● Flexible.

DISADVANTAGES:
● Complex in design.
● Needs high maintenance.
2) What is bit and byte stuffing? Explain with example.

Character stuffing / byte stuffing / character-oriented framing.


● A serious problem occurs when binary data itself will contain a flag byte's bit pattern.
● One solution is Character or Byte Stuffing where the sender's data link layer inserts a
special escape byte (ESC) just before each "accidental" flag byte in the data.
● At the receiving end the data link layer removes the escape byte before the data is
given to the network layer.
● Byte stuffing is the process of adding 1 extra byte whenever there is a flag or escape
character in the data.

Bit Stuffing or bit-oriented framing


● Data frames can contain an arbitrary number of bits and allows character codes with
an arbitrary number of bits per character.
● Where each frame begins and ends with a special bit pattern, 01111110 (in fact, a
flag byte).
● Whenever the sender's data link layer encounters five consecutive 1s in the data, it
automatically stuffs a 0 bit into the outgoing bit stream.

● When the receiver sees five consecutive incoming 1 bits, followed by a 0 bit, it
automatically de-stuffs the 0 bit.
● Just as byte stuffing is completely transparent to the network layer in both
computers, so is bit stuffing.
● If the user data contains the flag pattern, 01111110, this flag is transmitted as
011111010 but stored in the receiver's memory as 01111110.
● Bit stuffing is the process of adding one extra 0 whenever five consecutive 1s follow a
0 in the data so that the receiver does not mistake the pattern 0111110 for a flag.

3) What is the difference between error detection and correction? Explain CRC code
generation with example

● Cyclic Redundancy Check (CRC) is an error detection technique to detect errors in


data that has been transmitted on a communications link.
● A sending device applies a polynomial to a block of data that is to be transmitted and
appends the resulting cyclic redundancy check (CRC) to the block.
● The receiving end applies the same polynomial to the data and compares its result
with the result appended by the sender. If they agree, the data has been received
successfully. If not, the sender can be notified to resend the block of data.
● At Sender Side
● Sender has a generator G(x) polynomial with n bits.
● Sender appends (n-1) zero bits to the data.
Where n= no of bits in generator
● Dividend appends the data with generator G(x) using modulo 2 division (arithmetic).
● Remainder of (n-1) bits will be CRC.
● Codeword: It is a combined form of Data bits and CRC bits i.e. Codeword = Data bits +
CRC bits
● Data word to be sent - 100100
● Key - 1101 [ Or generator polynomial x3 + x2 + 1]
Sender Side: Receiver Side:

Therefore, the remainder is 001 Therefore, the remainder is zeros.


and hence the encoded Hence, the data received has no error
data sent is 100100001.

4) Draw the OSI reference model. Explain the functionality of each layer in brief.
OSI (Open System Interconnection) model is the reference model designed to divide the
entire communication operation into multiple processes. This model divides basic
communication functions into seven different layers
When the data is being transmitted it goes from bottom to top in the OSI layer architecture.
Each layer follows its own function:

1. Physical Layer − Its function is to transmit individual bits from one node to another
over a physical medium.
● This layer manages the synchronisation of bits.
● Line configuration
● It is also called as Physical topology
● Transmission mode

2. Data Link Layer − It is responsible for the reliable transfer of data frames from one
node to another connected by the physical layer.
● Physical addressing
● Flow control
● Error control
● Access control

3. Network Layer − It manages the delivery of individual data packets from source to
destination through appropriate addressing and routing.
● Logical addressing
● Routing
● Packets
● Congestion control
4. Transport Layer −It is responsible for delivery of the entire message from the source
host to destination host.
● Point to point service
● Segmentation and reassembling
● Connection control
● Flow control

5. Session Layer − It establishes sessions between users and offers services like dialog
control and synchronization.
● Dialog control
● Synchronisation

6. Presentation Layer − It monitors syntax and semantics of transmitted information


through translation, compression, and encryption.
● Translation
● Encryption
● Compression

7. Application Layer − It provides high-level APIs (application program interface) to the


users.
● File transfer protocol
● Mail service
● Web service
5) Give differences between Connection oriented versus Connectionless Services.

Connection-oriented Service Connectionless Service

Related to telephone system Related to postal system

Preferred by long and steady communication Preferred by bursty communication

Congestion is not possible Congestion is possible

Highly reliable Not reliable

Packets follow same route Packets does not follow same route

Requires a High Range Bandwidth Requires a Low Range Bandwidth

Requires authentication Does not requires authentication

Ex:- TCP (Transmission Control Protocol) Ex:- UDP (User Datagram protocol)

6) Explain functionality of Repeater, Hub, Bridge, Switch, Router and Gateway.


1) Repeater - Its job is to regenerate the Attenuated Signals into Regenerated Signals. An
Important point to be noted about repeaters is that they do not amplify the signal.

2) Hub - A hub is basically a multiport repeater. A hub connects multiple wires coming from
different branches, for example, the connector in star topology which connects different
stations

3) Bridge - A bridge operates at the data link layer. A bridge is a repeater, which add on the
functionality of filtering content by reading the MAC addresses of source and destination. It
is also used for interconnecting two LANs working on the same protocol.

4) Switch - A switch is a multiport bridge with a buffer and a design that can boost its
efficiency (a large number of ports imply less traffic) and performance and perform error
checking . A switch is a data link layer device

5) Router - A router is a device like a switch that routes data packets based on their IP
addresses. The router is mainly a Network Layer device.

7) Describe Go Back N and Selective Repeat protocol.


OR
Explain Sliding Window Protocol

Go Back N
● In Go-Back-N ARQ, the N is the sender window size. Suppose if we say Go-Back-4, the
sender window size is 4. It means it can send 4 frames simultaneously before expecting
any acknowledgement from the receiver.
● Go-Back-N ARQ uses the concept of protocol pipelining, i.e. the sender can send multiple
frames before receiving the acknowledgement for the first frame.
● There is a finite number of frames, and the frames are numbered sequentially.
● The number of frames that can be sent depends on the sender's window size.
● If the acknowledgement of a frame is not received within a certain period of time, all the
frames present in the current window will be transmitted.
● The sending window size determines the sequence number of the outbound frames.

Selective Repeat protocol


● It is also known as Sliding Window Protocol and used for error detection and control in
the data link layer.
● In the selective repeat, the sender sends several frames specified by a window size even
without the need to wait for individual acknowledgement from the receiver as in
Go-Back-N ARQ. In selective repeat protocol, the retransmitted frame is received out of
sequence.
● In Selective Repeat ARQ only the lost or error frames are retransmitted, whereas
correct frames are received and buffered.
● The receiver while keeping track of sequence numbers buffers the frames in memory
and sends NACK for only frames which are missing or damaged. The sender will
send/retransmit a packet for which NACK is received.
8) Discuss the parity checks for error detection in data transfer.

It is the simplest technique for detecting and correcting errors. The MSB of an 8-bits word is
used as the parity bit and the remaining 7 bits are used as data or message bits. The parity of
8-bits transmitted word can be either even parity or odd parity.

Even parity -- Even parity means the number of 1's in the given word including the parity bit
should be even (2,4,6,....).

Odd parity -- Odd parity means the number of 1's in the given word including the parity bit
should be odd (1,3,5,....).

9) What are the issues of stop and wait protocol? How Selective Repeat Protocol resolves
issues of stop and wait protocol?
A) Problems associated with Stop and Wait protocol-
● Problems due to lost data:
Suppose the sender sends the data and this data is lost.
→ The sender waits for the acknowledgement for an infinite amount of time. As
the data is lost, the receiver has not received any packet from the sender. So, it
will not send the acknowledgement to the sender. The receiver waits for an
infinite time for the data pkt.
● Problems due to lost acknowledgement:
In this case, the sender has sent the data to the receiver, and the receiver has
sent the acknowledgement, but here the acknowledgement is lost due to some
problems in the network.
● Problems due to the delayed Acknowledgement/Data:
After a timeout on the sender side, a delayed acknowledgement might be
wrongly considered as the acknowledgement of some other data packet.

Selective Repeat Protocol resolves issues of Stop & Wait Protocol:


● In selective repeat protocol, the retransmitted frame is received out of sequence.
● In Selective Repeat ARQ only the lost or error frames are retransmitted, whereas
correct frames are received and buffered.
● The receiver while keeping track of sequence numbers buffers the frames in memory
and sends NACK for only frames which are missing or damaged. The sender will
send/retransmit a packet for which NACK is received.
10) Discuss different types of guided and unguided media used to transmit data in
network.
1. Guided media - It is also referred to as Wired or Bounded transmission media.
Signals being transmitted are directed and confined in a narrow pathway by using
physical links.
Features:
● High speed
● Secure
● Used for comparatively shorter distances

There are 3 types of Guided media:


I. Twisted Pair Cable - Twisted pair is a physical media made up of a pair of cables
twisted with each other. A twisted pair cable is cheap as compared to other
transmission media. They are the most widely used Transmission Media.

II. Coaxial Cable - The name of the cable is coaxial as it contains two conductors parallel
to each other.It has a higher frequency as compared to Twisted pair cable.
It prevents signal interference and crosstalk. Coaxial cable is also known as coax.
Made up of copper.

III. Fiber Optic Cable Fibre optic cable is a cable that uses electrical signals for
communication. They are used to send the data by pulses of light. Fibre optics
provide faster data transmission than copper wires.

2. Unguided Media - It is also referred to as Wireless or Unbounded transmission media. No


physical medium is required for the transmission of electromagnetic signals.
Features:
● The signal is broadcasted through air
● Less Secure
● Used for larger distances

There are 3 types of Signals transmitted through unguided media: -


I. Radio Waves - Radio waves are very low frequency electromagnetic waves that are
transmitted in all directions within the range. The range in frequencies of radio waves
is from 3 Khz to 1 Khz.

II. Microwaves - Microwave is a line-of-sight wireless communication technology that


uses high frequency beams of radio waves to provide high speed wireless
connections that can send and receive voice, video, and data information.

III. Infrared waves - Infrared waves are used for very short distance communication.
Frequency Range: 300GHz – 400THz. It is used in TV remotes, wireless mouse,
keyboard, printer, etc.

11) Explain HDLC Protocol.


A) HDLC (High-Level Data Link Control) is a bit-oriented protocol that is used for
communication over the point-to-point and multipoint links.
This protocol implements the mechanism of ARQ(Automatic Repeat Request).
With the help of the HDLC protocol , full-duplex communication is possible.
HDLC is the most widely used protocol and offers reliability, efficiency, and a high level of
Flexibility.
Frame Format
There are up to 5 fields in each HDLC frame. There is a beginning flag field - 8 bit, Header
Field - 16 bit ( address and control field) , an information field - variable , a CRC field - 8
bytes or 16 bytes, and an ending field.

In the case of the multiple-frame transmission, the ending flag of the one frame acts as the
beginning flag of the next frame.

Let us take a look at different HDLC frames:


12) Explain TCP/IP Reference Model. Compare TCP/IP with OSI Model
A) TCP/IP Reference Model is a four-layered suite of communication protocols. It is named
after the two main protocols that are used in the model, namely, TCP and IP. TCP stands for
Transmission Control Protocol and IP stands for Internet Protocol.

The four layers in the TCP/IP protocol suite are −


● Network Layer − It is the lowest layer that is concerned with the physical
transmission of data. TCP/IP does not specifically define any protocol here but
supports all the standard protocols.
● Internet Layer − It defines the protocols for logical transmission of data over the
arpnetwork. The main protocol in this layer is Internet Protocol (IP) and it is
supported by the protocols ICMP, IGMP, RARP, and ARP.
● Transport Layer − It is responsible for error-free end-to-end delivery of data. The
protocols defined here are Transmission Control Protocol (TCP) and User Datagram
Protocol (UDP).
● Application Layer − This is the topmost layer and defines the interface of host
programs with the transport layer services. This layer includes all high-level protocols
like Telnet, DNS, HTTP, FTP, SMTP, etc.

The diagrammatic comparison of the TCP/IP and OSI model is as follows :

Difference between TCP/IP and OSI Model:

TCP/IP OSI

TCP refers to the Transmission Control OSI refers to Open Systems


Protocol. Interconnection.

TCP/IP has 4 layers. OSI has 7 layers.


TCP/IP is more reliable OSI is less reliable

TCP/IP does not have very strict


OSI has strict boundaries
boundaries.

TCP/IP follow a horizontal approach. OSI follows a vertical approach.

TCP/IP uses both the session and


OSI uses different session and
presentation layer in the application layer
presentation layers.
itself.

Transport layer in TCP/IP does not provide In the OSI model, the transport layer
assurance delivery of packets. provides assurance delivery of packets.

Connection less and connection oriented


TCP/IP model network layer only provides
both services are provided by network
connectionless services.
layer in OSI model.

13) Compute CRC for a data sequence 10110111 for which the generator is 110011.
A)
14) What are the reasons for using layered protocols in networks?
A) The reasons for using layered protocols are explained below : -
1. Design:
In a layered model each layer is defined separately. Thus, the design problem is
broken up into smaller and manageable pieces. Another advantage is it allows
protocol designers to specialise in one area (or layer).

2. Change:
When changes are made to one layer, it reduces the impact on the other layers. For
example, protocol in one layer can be changed easily without affecting higher or
lower layers. If the model was not layered and consisted of a single layer then any
change affects the entire model.

3. Learning:
The layered approach divided a big more complex task into several smaller tasks
where each small task is performed by one layer. This makes it much easier to learn
and understand the concept of each layer and the model.

4. Communication:
The layered approach is useful for proper organising and handling of communication.
It also provides a standard programming interface between two layers.

5. Standards:
It is the most important reason for using a layered model. A layered model provides a
guideline and framework not a rigid standard to be used by the various vendors when
creating their products.

15) Distinguish pt-to-pt and multi pt. links. Give relevant diagram along with advantages &
disadvantages.
A)
A. Point to Point Topology
Advantages of Point to Point Topology:
1. Highest Bandwidth because there are only two nodes.
2. Very fast compared to other network topologies
3. Easy to handle and maintain
Disadvantages of Point to Point Topology:
1. This topology is only used for small areas where nodes are closely located.
2. In case of a link broken the entire network will become dead.
3. Major Drawback: if any of the nodes stops working, data cannot be transferred across
the network.

B. Multi - Point Topology


Advantages of Multipoint Topology:
1. ease of installation,
2. low cost, reliability.
3. low cabling cost and installation cost.
Disadvantages of Multipoint Topology:
1. As network devices shares link’s capacity, communication can be weak
2. If two ISP's try to serve the area on the same frequency there will be interference for
both the parties.

16) Explain how data is transmitted and received in the OSI model.
A) Transmission and receiving of data are the processes carried out by these 7 layers:

7. Application Layer: The application layer is used by end-user software such as web
browsers and email clients. It provides protocols that allow software to send &
receive information and present meaningful data to users
Examples - Hypertext Transfer Protocol (HTTP), File Transfer Protocol (FTP), & Domain
Name System (DNS).

6. Presentation Layer: The presentation layer prepares data for the application layer.
It defines how two devices should encode, encrypt, and compress data so it is
received correctly on the other end. The presentation layer takes any data
transmitted by the application layer and prepares it for transmission over the session
layer.

5. Session Layer: The session layer creates communication channels, called sessions,
between devices. It is responsible for opening sessions, ensuring they remain open
and functional while data is being transferred, and closing them when
communication ends. The session layer can also set checkpoints during a data
transfer—if the session is interrupted, devices can resume data transfer from the last
checkpoint.

4. Transport Layer: The transport layer takes data transferred in the session layer and
breaks it into “segments” on the transmitting end. It is responsible for reassembling
the segments on the receiving end, turning it back into data that can be used by the
session layer. The transport layer carries out flow control, sending data at a rate.

3. Network Layer: The network layer has two main functions. One is breaking up
segments into network packets, and reassembling the packets on the receiving end.
The other is routing packets by discovering the best path across a physical network.
The network layer uses network addresses (typically Internet Protocol addresses) to
route packets to a destination node.

2. Data Link Layer: The data link layer establishes and terminates a connection
between two physically-connected nodes on a network. This layer is composed of two
parts—Logical Link Control (LLC), which identifies network protocols, performs error
checking and synchronises frames, and Media Access Control (MAC) which uses MAC
addresses to connect devices and define permissions to transmit and receive data.

1. Physical Layer: The physical layer is responsible for the physical cable or wireless
connection between network nodes. It defines the connector, the electrical cable or
wireless technology connecting the devices, and is responsible for transmission of the
raw data, which is simply a series of 0s and 1s, while taking care of bit rate control.

17) What is crosstalk? How is it minimized in case of twisted-pair of wire?


A) Crosstalk is when signals from one set of wires get transferred to another set of wire.
Typically this is most noticeable when on the phone and you can hear another conversation
at the same time. It generally occurs when the cable is starting to get old and moisture is
amplifying the effects that cause this.
Minimization in case of twisted-pair of wire:
If a pair of wires is twisted together, since they are of opposite polarity, the electromagnetic
signals produced by the two wires cancel each other. This tends to decrease the sensitivity of
the neighbouring wires to interference. Thereby, cancelling the unwanted crosstalk.
18) What is the purpose of cladding in an optical fiber? Discuss its density relative to the
core.
A) The purpose of cladding is to avoid the cross talk during transmission.
The outer layer of a fiber is called cladding. It is also made of glass or plastic. Cladding
is used in optical fiber to prevent any refraction while passing data. The function of
cladding is to occur full internal reflection in optical fiber.

It is necessary to keep the light reflecting in core instead of being refracted, because we need
it to pass on to destination from source. And when light enters from denser material into less
dense material the cladding changes its angle, it reflects back the light in core. This is the
reason that the core is denser and the outer layer is less dense.

19) What is Computer Networks? How is it differing from a distributed system?


A) Computer network is a collection of two or more computer systems that are linked
together. It allows users to communicate more easily. A network connection can be
established using either cable or wireless media. Hardware and software are used to connect
computers and tools in any network.

1. Network operating systems are used in heterogeneous computers and are known as
loosely coupled systems. On the other hand, distributed operating systems (DOS) are
tightly connected systems, and are mostly used in homogeneous computers or
multiprocessors.
2. Communication between computers (nodes) in a DOS is achieved through shared
memory or by sending messages. On the other hand, the network operating system
transfers files to interact with other nodes.
3. The operating system installed on the computers in a network operating system can
vary, but it is not the case in a distributed system.
4. The network operating system's primary goal is to give local services to remote users.
In contrast, DOS's goal is to handle the computer hardware resources.
5. The network operating system has a low level of transparency. On the other hand,
the DOS is highly transparent and hides resource usage.

20) Explain Error Correction Codes at data link layer.


OR
What is Hamming Code? Explain how it is useful in error correction.

Error Correction codes are used to detect and correct the errors when data is transmitted
from the sender to the receiver.
Error Correction can be handled in two ways:

Backward error correction: Once the error is discovered, the receiver requests the sender to
retransmit the entire data unit.
Forward error correction: In this case, the receiver uses the error-correcting code which
automatically corrects the errors.

Hamming code is a linear code that is useful for error detection up to two immediate bit
errors. It is capable of single-bit errors.
In Hamming code, the source encodes the message by adding redundant bits in the message.
These redundant bits are mostly inserted and generated at certain positions in the message
to accomplish the error detection and correction process.

Example -

Step 1: For checking parity bit P1, use check one and skip one method, which means, starting
from P1 and then skip P2, take D3 then skip P4 then take D5, and then skip D6 and take D7,
this way we will have the following bits,

As we can observe the total number of bits is odd so we will write the value of parity bit as
P1 = 1. This means the error is there.

Step 2: Check for P2 but while checking for P2, we will use the check two and skip two
methods, which will give us the following data bits. But remember since we are checking for
P2, so we have to start our count from P2 (P1 should not be considered).

As we can observe that the number of 1's are even, then we will write the value of P2 = 0.
This means there is no error.

Step 3: Check for P4 but while checking for P4, we will use the check four and skip four
methods, which will give us the following data bits. But remember since we are checking for
P4, so we have started our count from P4(P1 & P2 should not be considered).
As we can observe that the number of 1's is odd, then we will write the value of P4 = 1. This
means the error is there.

So, from the above parity analysis, P1 & P4 are not equal to 0, so we can clearly say that the
received hamming code has errors.

Hamming Code: Error Correction


Since we found that the received code has an error, so now we must correct them. To correct
the errors, use the following steps:

Now the error word E will be:

Now we have to determine the decimal value of this error word 101 which is 5 (22 *1 + 21 *
0 + 20 *1 = 5).

We get E = 5, which states that the error is in the fifth data bit. To correct it, just invert the
fifth data bit.

21) Explain different types of Errors?


A)
22) What is piggybacking? What are its advantages and disadvantages?
A) The process of carrying the acknowledgement along with the data on the same channel is
known as piggybacking. Let us understand how it works with the following example of two
users communicating with each other.
In data communication, the transmitter transmits the data packet and waits for
acknowledgement from the other end before it starts transmitting the next packet.
This can be achieved in two ways as follows.
Method #1 : There will be two separate channels, one channel is used for
transmission of data in forward direction and the other channel is used for
transmission of ACK in the reverse direction.
Method #2 : There will be a single channel used for transmission of data/ACK but one
at a time.

The method #1 reduces bandwidth efficiency by utilizing the entire channel for ACK.
Moreover method #2 introduces delay between successive packet or frame
transmissions. The above mentioned drawbacks are avoided by transmitting ACK
along with the data packet. Hence problems encountered in both the methods can be
avoided.

Advantages of piggybacking :
● Better use of available channel bandwidth. This happens because an
acknowledgement frame needs not to be sent separately.
● Usage cost reduction
● Improves latency of data transfer

Disadvantages of piggybacking :
● Additional complexity.
● If the data link layer waits long before transmitting the acknowledgement (block the
ACK for some time), the frame will be rebroadcast.
23) Explain the simplest protocol for noisy channels.
A)
● Stop – and – Wait protocol for noisy channels is data link layer protocol for
data communications with error control and flow control mechanisms.
● It is popularly known as Stop – and –Wait Automatic Repeat Request (Stop –
and –Wait ARQ) protocol.
● It adds error control facilities to Stop – and – Wait protocol.
● This protocol takes into account the facts that the receiver has a finite
processing speed and that frames may get corrupted while transmission.
● If acknowledgement does not arrive after a certain period of time , the sender
times out and retransmits the original frame

24) Explain one-bit sliding window protocol.


A)
● In one – bit sliding window protocol, the size of the window is 1.
● So the sender transmits a frame, waits for its acknowledgment, then transmits the
next frame. Thus it uses the concept of stop and wait for the protocol.
● This protocol provides for full – duplex communications. Hence, the acknowledgment
is attached along with the next data frame to be sent by piggybacking.

25) Explain framing and design issues in the data link layer.
A) Framing in the data link layer is a point-to-point connection between the sender and
receiver. The framing is the primary function of the data link layer and it provides a way to
transmit data over frames between the connected devices.
- Framing uses frames to send or receive data. The data link layer receives
packets from the network layer and converts them into frames.

Design issues with data link layer are :


1. Services provided to the network layer –
The data link layer acts as a service interface to the network layer. The principal
service is transferring data from the network layer on the sending machine to the
network layer on the destination machine. This transfer also takes place via DLL (Data
link-layer).
2. Frame synchronization –
The source machine sends data in the form of blocks called frames to the destination
machine. The starting and ending of each frame should be identified so that the
frame can be recognized by the destination machine.
3. Flow control –
Flow control is done to prevent the flow of data frames at the receiver end. The
source machine must not send data frames at a rate faster than the capacity of the
destination machine to accept them.
4. Error control –
Error control is done to prevent duplication of frames. The errors introduced during
transmission from source to destination machines must be detected and corrected at
the destination machine.
26) Explain Uthopia Protocol ( NOT IN COURSE )
The Simplex protocol is a data link layer protocol for transmission of frames over a computer
network. It is a hypothetical protocol designed for unidirectional data transmission over an
ideal channel, i.e. a channel through which transmission can never go wrong.

It is assumed that both the sender and the receiver are always ready for data processing and
both of them have infinite buffers. The sender simply sends all its data available onto the
channel as soon as they are available in its buffer. The receiver is assumed to process all
incoming data instantly. It does not handle flow control or error control. Since this protocol is
totally unrealistic, it is often called the Utopian Simplex protocol.

The significance of this protocol lies in the fact that it shows the basic structure on which the
usable protocols are built upon.

27) Let the given data bits are 00111001. Compute the hamming code.
28) Explain about checksum.
A) Checksum is an error detection technique based on the concept of redundancy.

The Sender follows the given steps:


● The block unit is divided into k sections, and each of n bits.
● All the k sections are added together by using one's complement to get the sum.
● The sum is complemented and it becomes the checksum field.
● The original data and checksum field are sent across the network.

The Receiver follows the given steps:


● The block unit is divided into k sections and each of n bits.
● All the k sections are added together by using one's complement algorithm to get the
sum.
● The sum is complemented.
● If the result of the sum is zero, then the data is accepted otherwise the data is
discarded.
Checksum Example-
Consider the data unit to be transmitted is-
10011001111000100010010010000100

Consider 8 bit checksum is used

Step-01:
At sender side,

The given data unit is divided into segments of 8 bits as-

Now, all the segments are added and the result is obtained as-

10011001 + 11100010 + 00100100 + 10000100 = 1000100011


Since the result consists of 10 bits, so extra 2 bits are wrapped around.
00100011 + 10 = 00100101 (8 bits)
Now, 1’s complement is taken which is 11011010.
Thus, checksum value = 11011010

Step-02:
The data along with the checksum value is transmitted to the receiver.

Step-03:
At receiver side,
The received data unit is divided into segments of 8 bits.
All the segments along with the checksum value are added.
Sum of all segments + Checksum value = 00100101 + 11011010 = 11111111
Complemented value = 00000000
Since the result is 0, the receiver assumes no error occurred in the data and therefore
accepts it.
29) Given a 6-bit data pattern 100100 and a divisor of 1101, answer the following.
i. What will be the dividend at the sender end? 100100000 / 100100 + 000
ii. Determine the CRC. 001
iii. What will be the transmitted data sequence? 100100001
iv. What will be the remainder at receiver end (assuming no error) ? 000
UNIT - 2
1) Name and categorise different multiple access protocols.

Multiple access protocols can be broadly classified into three categories - random access
protocols, controlled access protocols and channelization protocols.

Random Access Protocols -


Random access protocols assign uniform priority to all connected nodes. Any node can send
data if the transmission channel is idle. No fixed time or fixed sequence is given for data
transmission. The four random access protocols are−
1. ALOHA
2. Carrier sense multiple access (CSMA)
3. Carrier sense multiple access with collision detection (CSMA/CD)
4. Carrier sense multiple access with collision avoidance (CSMA/CA)

Controlled Access Protocols -


Controlled access protocols allow only one node to send data at a given time. Before
initiating transmission, a node seeks information from other nodes to determine which
station has the right to send. This avoids collision of messages on the shared channel. The
station can be assigned the right to send by the following three methods−
1. Reservation
2. Polling
3. Token Passing

Channelization
Channelization is a set of methods by which the available bandwidth is divided among the
different nodes for simultaneous data transfer. The three channelization methods are
1. Frequency division multiple access (FDMA)
2. Time division multiple access (TDMA)
3. Code division multiple access (CDMA)

2) Compare and explain the pure and slotted ALOHA system.


A)
Pure ALOHA -
● In Pure Aloha, the time of transmission is continuous. Whenever a station has an
available frame, it sends the frame.
● A collision occurs if more than one frame tries to occupy the channel at the same time. If
there is a collision and the frame is destroyed, the sender waits for a random amount of
time before retransmitting it.
● After transmitting a frame, a station waits for a finite period of time to receive an
acknowledgement. If the acknowledgement is not received within this time, the station
assumes that the frame has been destroyed due to collision and resends the frame.
● Due to the bursty nature of traffic inside a network, the possibilities of data frames
colliding are quite high when using the Pure Aloha protocol.
● None of the stations are concerned whether or not another station is transmitting at the
time. As a result, when several data packets are broadcast over the same channel, they
collide.

Throughput - 18.4%

Slotted ALOHA -
● In slotted aloha, successful data transmission occurs only when each slot sends just one
data frame at a time. The chance of a collision is considerably reduced by doing so.
● Here, time is divided into discrete intervals called slots, corresponding to a frame. The
communicating stations agree upon the slot boundaries.
● Sending of Data only at beginning of these slots
● Any station can send only one frame in each slot. Also, the stations cannot transmit at
any time whenever a frame is available. They should wait for the beginning of the next
slot.
● It will stay idle if no data packets are sent in any of the slots.
● It should be noted that if a packet does not get acknowledgement after a collision, it is
deemed lost and is retransmitted in a different slot after back-off time is taken into
account.
Throughput - 36.8%

3) Explain different CSMA protocols


A) Types of CSMA Protocols:
1. Persistent CSMA
● In this method, a 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 channels 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.

Advantages:
● Due to carrier sense property 1-persistent CSMA gives better performance
than the ALOHA systems.

Disadvantages:
● The more the Propagation Delay , the worst the performance of protocol

2. 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 a 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.

Advantages:
● It reduces the chance of collision and leads to better channel utilization,

Disadvantages:
● It reduces the efficiency of the network because the channel remains idle and
it leads to longer delays than 1-persistent CSMA

4) What is CSMA/CA?
A) Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA) is a network protocol
for carrier transmission that operates in the Medium Access Control (MAC) layer. In contrast
to CSMA/CD (Carrier Sense Multiple Access/Collision Detection) that deals with collisions
after their occurrence, CSMA/CA prevents collisions prior to their occurrence.
The algorithm of CSMA/CA is:
● When a frame is ready, the transmitting station checks whether the channel is idle or busy.
● If the channel is busy, the station waits until the channel becomes idle.
● If the channel is idle, the station waits for an Inter-frame gap (IFG) amount of time and
then sends the frame.
● After sending the frame, it sets a timer.
●The station then waits for acknowledgement from the receiver. If it receives the
acknowledgement before expiry of timer, it marks a successful transmission.
● Otherwise, it waits for a back-off time period and restarts the algorithm.

Advantages of CSMA/CA
● CSMA/CA prevents collision.
● Due to acknowledgements, data is not lost unnecessarily.
● It avoids wasteful transmission.
● It is very much suited for wireless transmissions.

Disadvantages of CSMA/CA
● The algorithm calls for long waiting times.
● It has high power consumption.

5) What is fast Ethernet?


A) In computer networks, Fast Ethernet is a variation of Ethernet standards that carry data
traffic at 100 Mbps (Megabits/second) in local area networks (LAN). It was launched as the
IEEE 802.3u standard in 1995, and stayed the fastest network till the introduction of Gigabit
Ethernet.
Fast Ethernet is popularly named as 100-BASE-X. Here, 100 is the maximum
throughput, i.e. 100 Mbps, BASE denoted use of baseband transmission, and X is the
type of medium used, which is TX or FX.

Varieties of Fast Ethernet


The common varieties of fast Ethernet are 100-Base-TX, 100-BASE-FX and 100-Base-T4.

6) What is CSMA/CD? Explain with Flow chart


A) Carrier Sense Multiple Access with Collision Detection (CSMA/CD) is a network protocol
for carrier transmission that operates in the Medium Access Control (MAC) layer. The
collision detection technology detects collisions by sensing transmissions from other
stations. On detection of a collision, the station stops transmitting, sends a jam signal, and
then waits for a random time interval before retransmission. Algorithms
The following flowchart summarizes the algorithms:

7) Explain Manchester encoding and differential Manchester encoding for bit stream
A)

8) Write a note on Ethernets.


● Ethernet is the traditional technology for connecting devices in a wired local area
network (LAN) or wide area network (WAN). It enables devices to communicate with
each other via a protocol, which is a set of rules.
● Ethernet describes how network devices format and transmit data so other devices
on the same LAN or campus network can recognize, receive and process the
information.
● Connected devices that use cables to access a geographically localized network --
instead of a wireless connection -- likely use Ethernet. From businesses to gamers,
diverse end users rely on the benefits of Ethernet connectivity, which include
reliability and security.
● Compared to wireless LAN (WLAN) technology, Ethernet is typically less vulnerable to
disruptions. It can also offer a greater degree of network security and control than
wireless technology because devices must connect using physical cabling.

Advantages of Ethernet
● Relatively low cost
● generally resistant to noise;
● good data transfer quality
● Speed and Reliability

Disadvantages of Ethernet
● intended for smaller, shorter distance networks
● limited mobility , speeds decrease with increased traffic
● use of longer cables can create crosstalk
● doesn't work well with real-time or interactive applications.
9) Differentiate fast Ethernet and gigabit Ethernet.

10) Why is Ethernet said to be a 1-persistent protocol (One - persistent protocol) ?


11) How CSMA/CA differs from CSMA/CD.
A)

12) Explain frame format used in Ethernet


A) Frame Format of IEEE 802.3:
The frame format of IEEE 802.3u is the same as IEEE 802.3. The fields in the frame
are:
● Preamble − It is a 7 byte starting field that provides alert and timing pulse for
transmission.
● Start of Frame Delimiter (SOF) − It is a 1 byte field that contains an
alternating pattern of ones and zeros ending with two ones.
● Destination Address − It is a 6 byte field containing the physical address of
destination stations.
● Source Address − It is a 6 byte field containing the physical address of the
sending station.
● Length − It is a 2 bytes field that stores the number of bytes in the data field.
● Data − The maximum size of the data field is 1500 bytes.
● Padding − This is added to the data to bring its length to the minimum
requirement of 46 bytes.
● CRC − CRC stands for cyclic redundancy check. It contains the error detection
information.
13) Explain Controlled Access Protocols.
A)
In controlled access, the stations consult one another to find which station has the right to
send. A station cannot send unless it has been authorized by other stations. We discuss three
popular controlled-access methods.

1. Reservation
In the reservation method, a station needs to make a reservation before sending data. Time
is divided into intervals. In each interval, a reservation frame precedes the data frames sent
in that interval.
If there are N stations in the system, there are exactly N reservation minislots in the
reservation frame. Each minislot belongs to a station. When a station needs to send a data
frame, it makes a reservation in its own minislot. The stations that have made reservations
can send their data frames after the reservation frame.

In the first interval, only stations 1, 3, and 4 have made reservations. In the second interval,
only station 1 has made a reservation.

2. Polling
Polling works with topologies in which one device is designated as a primary station (master)
and the other devices are secondary stations. All data exchanges must be made through the
primary device even when the ultimate destination is a secondary device. The primary device
controls the link; the secondary devices follow its instructions. It is up to the primary device
to determine which device is allowed to use the channel at a given time. The primary device,
therefore, is always the initiator of a session.

3. Token Passing
In the token-passing method, the stations in a network are organised in a logical ring. In
other words, for each station, there is a predecessor and a successor. The predecessor is the
station which is logically before the station in the ring; the successor is the station which is
after the station in the ring. The current station is the one that is accessing the channel now.
The right to this access has been passed from the predecessor to the current station. The
right will be passed to the successor when the current station has no more data to send.
14) What are the functions of LLC & MAC.
A)
Functions of LLC Sublayer:
● The primary function of LLC is to multiplex protocols over the MAC layer while
transmitting and to de-multiplex the protocols while receiving.
● Handles communication between upper and lower layers.
● LLC provides hop-to-hop flow and error control.
● It allows multipoint communication over a computer network.
● Frame Sequence Numbers are assigned by LLC.
● In case of acknowledged services, it tracks acknowledgements

Functions of MAC Layer:


● It provides an abstraction of the physical layer to the LLC and upper layers of
the OSI network.
● It is responsible for encapsulating frames so that they are suitable for
transmission via the physical medium.
● It resolves the addressing of source station as well as the destination station,
or groups of destination stations.
● It performs multiple access resolutions when more than one data frame is to
be transmitted. It determines the channel access methods for transmission.
● It also performs collision resolution and initiating retransmission in case of
collisions.

15) Explain Binary back off algorithm.


A) Back Off Algorithm is an algo. used for collision resolution. It works as, when this collision
occurs, both the devices wait for a random amount of time before retransmitting the signal
again, they keep on trying until the data is transferred successfully. This is called back off,
since the nodes ‘back-off’ for a certain amount of time, before they try to re-access it again.
Algorithm:
Step-1: The station continues transmission of the current frame for a specified time along
with a jam signal, to ensure that all the other stations detect collision.

Step-2: The station increments the retransmission counter, c, that denotes the number of
collisions.

Step-3: The station selects a random number of slot times in the range 0 and 2^c – 1. For
example, after the first collision (i.e. c = 1), the station will wait for either 0 or 1 slot times.
After the second collision (i.e. c = 2), the station will wait anything between 0 to 3 slot
times. After the third collision (i.e. c = 3), the station will wait anything between 0 to 7 slot
times, and so forth.

Step-4: If the station selects a number 𝑘 in the range 0 and 2^c – 1, then
Back_off_time = k × Time slot,
where a time slot is equal to round trip time (RTT).
Step-5: And at the end of the backoff time, the station attempts retransmission by
continuing with the CSMA/CD algorithm.

Step-6: If the maximum number of retransmission attempts is reached, then the station
aborts transmission.

16) Compare static vs dynamic channel allocation.(Fixed == static)


A)

17) What is framing ? Write the importance of it.

- Framing in the data link layer is a point-to-point connection between the sender and
receiver. The framing is the primary function of the data link layer and it provides a
way to transmit data between the connected devices.
- Framing uses frames to send or receive data. The data link layer receives
packets from the network layer and converts them into frames.
Parts of a Frame
A frame has the following parts −
Frame Header − It contains the source and the destination addresses of the frame.
Payload field − It contains the message to be delivered.
Trailer − It contains the error detection and error correction bits.
Flag − It marks the beginning and end of the frame.

Types of Framing
Framing can be of two types, fixed sized framing and variable sized framing.

1. Fixed-sized Framing: Here the size of the frame is fixed and so the frame length acts as a
delimiter of the frame. Consequently, it does not require additional boundary bits to identify
the start and end of the frame. Example − ATM cells.

2. Variable – Sized Framing: Here, the size of each frame to be transmitted may be different.
So additional mechanisms are kept to mark the end of one frame and the beginning of the
next frame. It is used in local area networks.

IMPORTANCE OF FRAMING:
- Due to various topologies used across the networks, the Maximum
transmission unit differs. Framing does the job for it.
- A frame is also used to wrap the payload with additional information such as
addressing information and checksum. Data link layer also delineates the
frames, commonly termed as Frame synchronisation.
UNIT-3

1. Compare datagram subnet and virtual circuit subnet.

Sr. Key Virtual Circuits Datagram Networks


No.

1 Defi Virtual Circuit is the connection oriented On other hand Datagram is the
nitio service in which there is a connection less service where no
n implementation of resources like buffers, such resources are required for the
CPU, bandwidth, etc., used by virtual data transmission.
circuit for a data transfer session.

2 Path In Virtual circuits as all the resources and On other hand in case Datagram
bandwidth get reserved before the network, the path is not fixed as
transmission, the path which is utilized data packets are free to decide the
or followed by first data packet would path on any intermediate router on
get fixed and all other data packets will the go by dynamically changing
use the same path and consume same routing tables on routers.
resources.

3 Hea As there is same path followed by all the On other hand different headers
der data packets, a common and same with information of other data
header is being used by all the packets. packet is being used in Datagram
network.

4 Com Virtual Circuit is less complex as However on other hand Datagram


plexi compared to that of Datagram network. network are more complex as
ty compared to Virtual circuit.

5 Relia Due to fixed path and assurance of fixed On other hand Datagram network
bility resources, Virtual Circuits are more due to dynamic resource allocation
reliable for data transmission as and follow dynamic path is more
compared to Datagram network. prone to error and is less reliable
than Virtual circuits.

6 Exa Virtual circuits are costlier in installation On the other hand Datagram
mple and maintenance and are widely used by network are cheaper as compared
and ATM (Asynchronous Transfer Mode) to the Virtual Circuits and are
Cost Network, which is used for the mainly used by IP network, which
Telephone calls. is used for Data services like
Internet.

2. Differentiate adaptive and non adaptive algorithms.


Non-Adaptive Routing
S.No Adaptive Routing algorithm
algorithm

A non-adaptive algorithm
An adaptive algorithm involves involves a network
1. routers for exchanging and administrator for the manual
updating router table data. entry of the routing paths into
the router.

Whereas this algorithm creates a


This algorithm creates a routing
static table in order to determine
table based on network
2. when to send packets and which
conditions.
node.

This algorithm is used by dynamic Whereas this algorithm is used


3. routing. by static routing.

Whereas in a non-adaptive
In adaptive routing algorithm, the
routing algorithm, the routing
routing decisions are made based
4. decisions are not made based on
on network traffic and topology.
network traffic and topology.

Adaptive routing algorithms are


While non-adaptive routing
more complex as compared to
algorithms are simple in terms of
5. non-adaptive routing algorithms in
complexity.
terms of complexity.

In adaptive routing algorithm, the While in non-adaptive routing


routing decisions are not static algorithm, the routing decisions
6. tables. are static tables.

Adaptive routing algorithm is


Whereas non-adaptive routing
categorized into distributed,
algorithm is categorized into
7. centralized and isolation
random walks and flooding.
algorithm.

Adaptive routing algorithm is Whereas non-adaptive routing


more used as compared to algorithm is comparatively less
8. non-adaptive. used.
The dynamic protocols are
The manual setup is performed
employed to update the routing
for establishing an optimal path
table and determine the best
9 between the source and
route between the source and
destination computers.
destination computers.

It is mostly used for-


It is mostly used for-
10.
● Simple, Closed network
● Open, Complex network topologies
topologies
Purposes- Purposes-
● Enhancement in network ● It enables
performance fine-grained control
● Prevents packet delivery over packet paths.
failure ● Suited for reliable
11. ● Aid in controlling networks with stable
congestion loads

3. Explain shortest path routing algorithm.

4. Explain leaky bucket algorithm.


A) If a bucket has a small hole at the bottom, the water leaks from the bucket at a
constant rate as long as there is water in the bucket.
• The rate at which the water leaks does not depend on the rate at which the
water is input to the bucket unless the bucket is empty.
• The input rate can vary, but the output rate remains constant. Similarly, in
networking, a technique called leaky bucket can smooth out bursty traffic.
Bursty
chunks are stored in the bucket and sent out at an average rate.
• A leaky bucket algorithm shapes bursty traffic into fixed-rate traffic by
averaging the data rate. It may drop the packets if the bucket is full.
5. Compare IPv4 & IPv6.
A)

IPv4 IPv6

IPv4 has a 32-bit


IPv6 has a 128-bit address length
address length

It Supports Manual
It supports Auto and renumbering address
and DHCP address
configuration
configuration

In IPv4 end to end,


connection In IPv6 end to end, connection integrity is
integrity is Achievable
Unachievable

It can generate
Address space of IPv6 is quite large it can produce
4.29×109 address
3.4×1038 address space
space

The Security
feature is IPSEC is an inbuilt security feature in the IPv6
dependent on protocol
application
Address
representation of Address Representation of IPv6 is in hexadecimal
IPv4 is in decimal

Fragmentation
performed by
In IPv6 fragmentation performed only by the sender
Sender and
forwarding routers

In IPv4 checksum
In IPv6 checksum field is not available
field is available

It has broadcast
Message In IPv6 multicast and anycast message transmission
Transmission scheme is available
Scheme

In IPv4 Encryption
and Authentication In IPv6 Encryption and Authentication are provided
facility not
provided

IPv4 has a header IPv6 has header of 40 bytes fixed


of 20-60 bytes.

IPv4 consist of 4
IPv6 consists of 8 fields, which are separated by
fields which are
colon (:)
separated by dot (.)

IPv4’s IP addresses
are divided into
five different IPv6 does not have any classes of IP address.
classes. Class:
A,B,C,D & E

Example of IPv4: Example of IPv6:


66.94.29.13 2001:0000:3238:DFE1:0063:0000:0000:FEFB
6. What is meant by congestion? List the ways of avoiding congestion
Congestion, in the context of networks, refers to a network state where a node or link carries so
much data that it may deteriorate network service quality, resulting in queuing delay, frame or
data packet loss and the blocking of new connections. In a congested network, response time
slows with reduced network throughput. Congestion occurs when bandwidth is insufficient and
network data traffic exceeds capacity.

7. What is flooding? What are its disadvantages?


Flooding is a non-adaptive routing technique following this simple method:
when a data packet arrives at a router, it is sent to all the outgoing links except
the one it has arrived on.

Advantages of Flooding
● It is very simple to setup and implement, since a router may know only its
neighbours.
● It is extremely robust. Even in case of malfunctioning of a large number
routers, the packets find a way to reach the destination.
● All nodes which are directly or indirectly connected are visited. So, there
are no chances for any node to be left out. This is a main criteria in case of
broadcast messages.
● The shortest path is always chosen by flooding.
Disadvantages:-
● Flooding tends to create an infinite number of duplicate data packets, unless
some measures are adopted to damp packet generation.
● It is wasteful if a single destination needs the packet, since it delivers the
data packet to all nodes irrespective of the destination.
● The network may be clogged with unwanted and duplicate data packets.
This may hamper delivery of other data packets.

8. Explain about the IP Header.

Version (VER) -This 4-bit field defines the version of the IPv4 protocol.
Currently the version is 4.
• Header length (HLEN)- This 4-bit field defines the total length of the
datagram header in 4-byte words.
Total length.- This is a In-bit field that defines the total length (header plus
data) of the IPv4 datagram in bytes.
Length of data =total length - header length
• Identification -This field is used in fragmentation (discussed in the next
section).
• Flags- This field is used in fragmentation (discussed in the next section).
• Fragmentation offset- A datagram can travel through different networks.
Each router decapsulates the IPv4 datagram from the frame it receives,
processes it, and then encapsulates it in another frame.
• Time to live- A datagram has a limited lifetime in its travel through an
internet. This field was originally designed to hold a timestamp, which was
decremented by each visited
router.
• Protocol- This 8-bit field defines the higher-level protocol that uses the
services of the IPv4 layer.
• An IPv4 datagram can encapsulate data from several higher-level protocols
such as TCP, UDP, ICMP, and IGMP
•Checksum- The checksum concept is used to check errors.
•Source address- This 32-bit field defines the IPv4 address of the source. This
field must remain unchanged during the time the IPv4 datagram travels from
the source host to the destination host.
•Destination address- This 32-bit field defines the IPv4 address of the
destination. This field must remain unchanged during the time the IPv4
datagram travels from the source host to the destination host.

9. Explain IP addressing method.


A) The process of IP address works in the following way:

1. Your computer, smartphone, or any other Wi-Fi-enabled device firstly


connects to a network that is further connected to the internet. The network
is responsible for giving your device access to the internet.
2. While working from home, your device would be probably using that network
provided by your Internet Service Provider (ISP). In a professional
environment, your device uses your company network.
3. Your ISP is responsible to generate the IP address for your device.
4. Your internet request penetrates through the ISP, and they place the
requested data back to your device using your IP address. Since they provide
you access to the internet, ISP's are responsible for allocating an IP address to
your computer or respective device.
5. Your IP address is never consistent and can change if there occurs any changes
in its internal environment. For instance, if you turn your modem or router on
or off, it will change your IP address. Or the user can also connect the ISP to
change their IP address.
6. When you are out of your home or office, mainly if you travel and carry your
device with you, your computer won't be accessing your home IP address
anymore. This is because you will be accessing the different networks (your
phone hotspot, Wi-Fi at a cafe, resort, or airport, etc.) to connect the device
with the internet. Therefore, your device will be allocated a different
(temporary) IP address by the ISP of the hotel or cafe.
10. Define routing & explain distance vector routing and link state routing
A. Routing is the mechanism of transferring information from a source to destination across an
internetwork. The distance vector routing and link state routing are the two of routing
algorithms, categorised depending on the way the routing tables are updated.

Distance Vector Routing –


➢ It is a dynamic routing algorithm in which each router computes a distance between itself and
each possible destination i.e. its immediate neighbors.
➢ The router shares its knowledge about the whole network to its neighbors and accordingly
updates the table based on its neighbors.
➢ The sharing of information with the neighbors takes place at regular intervals.
➢ It makes use of Bellman-Ford Algorithm for making routing tables.
➢ Problems – Count to infinity problem which can be solved by splitting horizon.
– Good news spread fast and bad news spread slowly.
– Persistent looping problem i.e. loop will be there forever.

Link State Routing –


➢ It is a dynamic routing algorithm in which each router shares knowledge of its neighbors with
every other router in the network.
➢ A router sends its information about its neighbors only to all the routers through flooding.
➢ Information sharing takes place only whenever there is a change.
➢ It makes use of Dijkstra’s Algorithm for making routing tables.
➢ Problems – Heavy traffic due to flooding of packets.
– Flooding can result in infinite looping which can be solved by using the Time to live (TTL) field.

11. Explain Choke packets, Load shedding, Jitter control.


A) Choke packets: A choke packet is a packet sent by a node to the source to
inform it of congestion. Each router monitors its resources and the utilization
at each of its output lines. Whenever the resource utilization exceeds the
threshold value which is set by the administrator, the router directly sends a
choke packet to the source giving it a feedback to reduce the traffic. The
intermediate nodes through which the packets has traveled are not warned
about congestion.

Load shedding: It is one of the approaches to congestion control. Router


contains a buffer to store packets and route it to destination. When the buffer
is full, it simply discards some packets. It chooses the packet to be discarded
based on the strategy implemented in the data link layer. This is called load
shedding
Jitter control:
● Jitter may be defined as the variation in delay for the packet belonging to the
same flow. The real time audio and video cannot tolerate jitter on the other
hand the jitter doesn’t matter if the packets are carrying an information
contained in a file.
● For the audio and video transmission if the packets take 20 ms to 30 ms
delay to each the destination, it doesn’t matter, provided that the delay
remains constant.
● The quality of sound and visuals will be hampered of the delays associated
with different packets have different values. Therefore, practically we can say
that 99% of packets should be delivered with a delay ranging from 24.5 ms to
25.5 ms.
● When а packet arrives at a router, the router will check to see whether the
packet is behind or ahead and by what time.
● This information is stored in the packet and updated at every hop. If packet is
ahead of the schedule then router will hold it for a slight longer time and if the
packet is behind schedule, then the router will try to send it out as quickly as
possible. This will help in keeping the average delay per packet constant and
will avoid time jitter.

12. Write a note on ICMP. OR Write a note on working of ICMP protocol.


A) The ICMP stands for Internet Control Message Protocol. It is a network layer
protocol. It is used for error handling in the network layer, and it is primarily
used on network devices such as routers. As different types of errors can exist
in the network layer, ICMP can be used to report these errors and to debug
those errors.
Working:
https://www.geeksforgeeks.org/internet-control-message-protocol-icmp/

13. Write a note on RIP.


A) Routing Information Protocol (RIP) is a dynamic routing protocol that uses
hop count as a routing metric to find the best path between the source and
the destination network. It is a distance-vector routing protocol that has an
AD value of 120 and works on the Network layer of the OSI model. RIP uses
port number 520.

Hop Count : Hop count is the number of routers occurring in between the
source and destination network. The path with the lowest hop count is
considered as the best route to reach a network and therefore placed in the
routing table. RIP prevents routing loops by limiting the number of hops
allowed in a path from source and destination. The maximum hop count
allowed for RIP is 15 and a hop count of 16 is considered as network
unreachable.

Features of RIP
1. Updates of the network are exchanged periodically.
2. Updates (routing information) are always broadcast.
3. Full routing tables are sent in updates.
4. Routers always trust routing information received from neighbour routers.
This is also known as Routing on rumours.

RIP versions : There are three versions of routing information protocol – RIP
Version1, RIP Version2, and RIPng.

14. Write a note on OSPF.


A) Open Shortest Path First (OSPF) is a link-state routing protocol that is used to
find the best path between the source and the destination router using its
own Shortest Path First). OSPF is developed by Internet Engineering Task Force
(IETF) as one of the Interior Gateway Protocol (IGP), i.e, the protocol which
aims at moving the packet within a large autonomous system or routing
domain. It is a network layer protocol which works on protocol number 89
and uses AD value 110. OSPF uses multicast address 224.0.0.5 for normal
communication and 224.0.0.6 for update to designated router(DR)/Backup
Designated Router (BDR).

OSPF states – The device operating OSPF goes through certain states. These
states are:
Down – In this state, no hello packets have been received on the interface.
#Note – The Downstate doesn’t mean that the interface is physically down.
Here, it means that the OSPF adjacency process has not started yet.
INIT – In this state, hello packets have been received from the other router.
2WAY – In the 2WAY state, both the routers have received the hello packets
from other routers. Bidirectional connectivity has been established.
Exstart – In this state, NULL DBD are exchanged. In this state, the master and
slave elections take place. The router having the higher router I’d become the
master while the other becomes the slave.
Exchange – In this state, the actual DBDs are exchanged.
Loading – In this state, LSR, LSU, and LSA (Link State Acknowledgement) are
exchanged.
Full – In this state, synchronisation of all the information takes place. OSPF
routing can begin only after the Full state.
CONFIGURATION
15. Differentiate Distance vector routing & Link state routing.
A)
16. To solve the examples related to identifying netid, hostid, subnet mask.

17. What is an extension in IPv6 than IPv4?


A) IPv4 produces 4 billion addresses, and the developers think tha
these addresses are enough, but they were wrong. IPv6 is the
next generation of IP addresses. The main difference between
IPv4 and IPv6 is the address size of IP addresses. IPv4 is a 32-bit
address, whereas IPv6 is a 128-bit hexadecimal address. IPv6
provides a large address space, and it contains a simple header
as compared to IPv4.

It provides transition strategies that convert IPv4 into IPv6, and these strategies are as
follows:

★ Dual stacking: It allows us to have both the versions, i.e., IPv4 and IPv6, on the same
device.
★ Tunnelling: In this approach, all the users who have IPv6 communicate with an IPv4
network to reach IPv6.
★ Network Address Translation: The translation allows the communication between the
hosts having a different version of IP.

18. Explain internetworking.


Routing between two networks is called internetworking.In internetworking,
routers have knowledge of each other’s address and addresses beyond them.
They can be statically configured to go on different networks or they can learn
by using internetworking routing protocol.
OR
Internetworking is the process or technique of connecting different networks
by using intermediary devices such as routers or gateway devices.

Internetworking ensures data communication among networks owned and


operated by different entities using a common data communication and the
Internet Routing Protocol. The Internet is the largest pool of networks
geographically located throughout the world but these networks are
interconnected using the same protocol stack, TCP/IP. Internetworking is only
possible when all the connected networks use the same protocol stack or
communication methodologies.

19. What is a firewall? Why is it used? Explain its working.


Firewalls are network security systems that prevent unauthorised access to a
network. It can be a hardware or software unit that filters the incoming and
outgoing traffic within a private network, according to a set of rules to spot
and prevent cyberattacks.
➔ Firewalls can be used in corporate as well as consumer settings.
➔ They are also used for antivirus applications.
➔ Firewalls can be used for a home network, Digital Subscriber Line (DSL), or
cable modem having static IP addresses. Firewalls can easily filter traffic and
can signal the user about intrusions.

A Firewall analyses the network traffic and filters it so that the unsecured and
suspicious networks cannot attack the system. The point where information is
exchanged with an external network is called a port. A firewall welcomes only
those incoming traffic that has been configured to accept. It distinguishes
between good and malicious traffic and either allows or blocks specific data
packets on pre-established security rules.

20. Explain flow based routing


Flow routing is a network routing technology that takes variations in the flow
of data into account to increase routing efficiency. This increased efficiency
helps avoid excessive latency and jitter for streaming data, such as voice over
IP or video.

Flow routing uses adaptive routing algorithms that base their decisions on the
traffic conditions between a computer and all the other computers it is
connected to on the subnetwork. Based on the traffic within this subnetwork,
flow routing makes the decision about which computer to send a packet to.

21. Explain shortest path routing algorithm


22. Explain IPv6.
A) Internet Protocol version 6 (IPv6) is the latest revision of the Internet Protocol
(IP) and the first version of the protocol to be widely deployed.IPV6 address is
unique and universal, 128 bits or 16 bytes long having address space 2^128

The IPv6 is a network layer protocol that allows communication and data
transfer between two different hosts. It sets specific rules that help identify
the separate hosts and track their location. That way, they could exchange
information successfully. Only when the two corresponding IP addresses are
identified, the route could be established, and the hosts are able to
communicate.
Advantages of IPv6
➔ It increases the capacity of address space – That way, the different resources
are efficiently distributed to the adapted additional web addresses.
➔ Routing is efficient – It gives a possibility of easy aggregation of prefixes
assigned to IP networks.
➔ Efficient Data Flow – It allows the transfer of large data packets
simultaneously. That helps with preserving bandwidth.
➔ Security– It improves safety and security based on the improved
authentication methods built into network firewalls.

23. Draw and explain IPv4 header


A) Same as Q8

24. Explain ARP protocol.


A) ARP: ARP stands for (Address Resolution Protocol). It is responsible to find the
hardware address of a host from a known IP address. There are three basic
ARP terms. The important terms associated with ARP are:
(i) Reverse ARP (ii) Proxy ARP (iii) Inverse ARP

Working: The devices of the network peel the header of the data link layer
from the protocol data unit (PDU) called frame and transfer the packet to the
network layer (layer 3 of OSI) where the network ID of the packet is validated
with the destination IP’s network ID of the packet and if it’s equal then it
responds to the source with the MAC address of the destination, else the
packet reaches the gateway of the network and broadcasts packet to the
devices it is connected with and validates their network ID.

The above process continues till the second last network device in the path
reaches the destination where it gets validated and ARP, in turn, responds
with the destination MAC address.

ARP Cache: After resolving the MAC address, the ARP sends it to the source
where it is stored in a table for future reference.
ARP Cache Timeout: It indicates the time for which the MAC address in the
ARP cache can reside.
ARP request: This is nothing but broadcasting a packet over the network to
validate whether we came across the destination MAC address or not.
- The physical address of the sender.
- The IP address of the sender.
- The IP address of the receiver
ARP response/reply: It is the MAC address response that the source receives
from the destination which aids in further communication of the data.
25. With a real time scenario explain IP addressing and subnetting.
A)
26. Compare distance vector routing and link state routing.
A)
27. Explain Flooding.
A) Flooding is a non-adaptive routing technique following this simple method:
when a data packet arrives at a router, it is sent to all the outgoing links except the
one it has arrived on. For example, let us consider the network in the figure, having
six routers that are connected through transmission lines.

- Using flooding technique −


● An incoming packet to A, will be sent to B, C and D.
● B will send the packet to C and E.
● C will send the packet to B, D and F.
● D will send the packet to C and F.
● E will send the packet to F.
● F will send the packet to C and E.

- Flooding may be of three types −

● Uncontrolled flooding − Here, each router unconditionally transmits the


incoming data packets to all its neighbours.
● Controlled flooding − They use some methods to control the transmission of
packets to the neighbouring nodes.
● Selective flooding − Here, the routers don't transmit the incoming packets
only along those paths which are heading towards approx. in the right
direction, instead of every available path.

NOTE - There should be some numericals in Unit - 3

UNIT - 4
1. Define the socket. List the types of sockets.

A socket is one endpoint of a two way communication link between two


programs running on the network. The socket mechanism provides a means of
inter-process communication (IPC) by establishing named contact points
between which the communication take place.
Socket are generally employed in client server applications. The server creates
a socket, attaches it to a network port addresses then waits for the client to
contact it. The client creates a socket and then attempts to connect to the
server socket. When the connection is established, transfer of data takes
place.

Types of Sockets :
There are two types of Sockets: the datagram socket and the stream socket.
1. Datagram Socket :
This is a type of network which has connection less point for sending
and receiving packets. It is similar to mailbox. The letters (data) posted
into the box are collected and delivered (transmitted) to a letterbox
(receiving socket).
2. Stream Socket
In Computer operating system, a stream socket is type of interprocess
communications socket or network socket which provides a
connection-oriented, sequenced, and unique flow of data without
record boundaries with well defined mechanisms for creating and
destroying connections and for detecting errors. It is similar to phone.
A connection is established between the phones (two ends) and a
conversation (transfer of data) takes place.
2. List the duties of the transport layer and explain each in brief.

Responsibilities of a Transport Layer:

Process to process delivery:


While Data Link Layer requires the MAC address (48 bits address contained
inside the Network Interface Card of every host machine) of
source-destination hosts to correctly deliver a frame and the Network layer
requires the IP address for appropriate routing of packets, in a similar way
Transport Layer requires a Port number to correctly deliver the segments of
data to the correct process amongst the multiple processes running on a
particular host. A port number is a 16-bit address used to identify any
client-server program uniquely.

End-to-end Connection between hosts:


The transport layer is also responsible for creating the end-to-end Connection
between hosts for which it mainly uses TCP and UDP. TCP is a secure,
connection-orientated protocol that uses a handshake protocol to establish a
robust connection between two end hosts. TCP ensures reliable delivery of
messages and is used in various applications. UDP, on the other hand, is a
stateless and unreliable protocol that ensures best-effort delivery. It is suitable
for applications that have little concern with flow or error control and requires
sending the bulk of data like video conferencing. It is often used in
multicasting protocols.

Congestion Control:
Congestion is a situation in which too many sources over a network attempt
to send data and the router buffers start overflowing due to which loss of
packets occur. As a result, retransmission of packets from the sources
increases the congestion further. In this situation, the Transport layer provides
icmpCongestion Control in different ways. It uses open loop congestion
control to prevent the congestion and closed-loop congestion control to
remove the congestion in a network once it occurs. TCP provides AIMD-
additive increase multiplicative decrease, leaky bucket technique for
congestion control.

Data integrity and Error correction:


The transport layer checks for errors in the messages coming from the
application layer by using error detection codes, computing checksums, it
checks whether the received data is not corrupted and uses the ACK and
NACK services to inform the sender if the data has arrived or not and checks
for the integrity of data.

Flow control:
The transport layer provides a flow control mechanism between the adjacent
layers of the TCP/IP model. TCP also prevents data loss due to a fast sender
and slow receiver by imposing some flow control techniques. It uses the
method of sliding window protocol which is accomplished by the receiver by
sending a window back to the sender informing the size of data it can receive.

3. Compare UDP & TCP.

Transmission control User datagram protocol


Basis
protocol (TCP) (UDP)
TCP is a UDP is the
connection-oriented Datagram-oriented
protocol. protocol. This is because
Connection-orientation there is no overhead for
means that the opening a connection,
Type of communicating devices maintaining a
Service should establish a connection, and
connection before terminating a
transmitting data and connection. UDP is
should close the efficient for broadcast
connection after and multicast types of
transmitting the data. network transmission.

TCP is reliable as it
The delivery of data to
guarantees the delivery
Reliability the destination cannot
of data to the
be guaranteed in UDP.
destination router.

TCP provides extensive


error-checking
UDP has only the basic
Error mechanisms. It is
error checking
checking because it provides flow
mechanism using
mechanism control and
checksums.
acknowledgment of
data.

Acknowledg An acknowledgment No acknowledgment


ment segment is present. segment.

Sequencing of data is a
There is no sequencing of
feature of Transmission
data in UDP. If the order
Control Protocol (TCP).
Sequence is required, it has to be
this means that packets
managed by the
arrive in order at the
application layer.
receiver.

UDP is faster, simpler,


TCP is comparatively
Speed and more efficient than
slower than UDP.
TCP.
There is no
Retransmission of lost retransmission of lost
Retransmissi
packets is possible in packets in the User
on
TCP, but not in UDP. Datagram Protocol
(UDP).

Header TCP has a (20-60) bytes UDP has an 8 bytes


Length variable length header. fixed-length header.

Weight TCP is heavy-weight. UDP is lightweight.

It’s a connectionless
Handshaking Uses handshakes such
protocol i.e. No
Techniques as SYN, ACK, SYN-ACK
handshake

TCP doesn’t support UDP supports


Broadcasting
Broadcasting. Broadcasting.

TCP is used by HTTP, UDP is used by DNS,


Protocols HTTPs, FTP, SMTP and DHCP, TFTP, SNMP, RIP,
Telnet. and VoIP.

The TCP connection is a UDP connection is


Stream Type
byte stream. message stream.

Low but higher than


Overhead Very low.
UDP.

4. What is meant by congestion?

Network congestion refers to a reduction in quality of service


(QOS) that causes packet loss, queueing delay, or the blocking
of new connections. Typically, network congestion occurs in
cases of traffic overloading when a link or network node is
handling data in excess of its capacity.
5. What is the function of the transport layer?
Same as Q2

6. Give the structure of the UDP header.

UDP header :
UDP header is an 8-bytes fixed and simple header. The first 8 Bytes contain all
necessary header information and the remaining part consist of data. UDP
port number fields are each 16 bits long, therefore the range for port numbers
defined from 0 to 65535; port number 0 is reserved. Port numbers help to
distinguish different user requests or processes.

7. Explain TCP header and the working of the TCP protocol.


How does TCP work?
TCP provides communication between an application program and the
Internet Protocol (they are frequently written as TCP/IP.) An application does
not need to required packet fragmentation on the transmission medium or
other mechanisms for sending data in order to be sent via TCP. While IP
handles actual delivery of the data, TCP keeps track of 'segments' - the
individual units of data transmission that a message is divided into for efficient
routing through the network.

Due to unpredictable network behaviour, IP packets can be lost or delivered


out of order; TCP detects and minimises these issues by reordering packet
data or requesting redelivery. This accuracy comes with a tradeoff in speed.
TCP is known more for reliability, but this accuracy comes from trading speed,
sometimes coming with a delay of several seconds.

OR
8. Draw and explain TCP Header.

The Transmission Control Protocol (TCP) header is the first 24 bytes of a TCP
segment that contains the parameters and state of an end-to-end TCP socket. The
TCP header tracks the state of communication between two TCP endpoints.

Uses :
Used by TCP/IP protocols at N/W layer
Unreliable and Connection - less

TCP Header Diagram

The diagram of TCP Header is shown below:

TCP Header Format

The TCP header format is classified into various fields that are as follows:

● Source port
● Destination port
● Sequence number
● Acknowledgement number
● HLEN
● Control Flag Bits
● Window size
● Checksum
● Options

Source Port

It defines the port number of the application program in the sender's host. The
source port is 16 bits in size.

Destination Port

It defines the port number of the application program in the receiver's host.
The destination port is 16 bits in size.

Sequence Nnmber

It conveys to the receiving host which octet in this sequence comprises the
first byte in the segment. The sequence number is a 32-bit field. TCP assigns
the unique sequence number to each byte of data contained in the TCP
segment.

Acknowledgement Number

The acknowledgement number specifies the sequence number of the next


octet that the receiver expects to receive. The acknowledgement number is a
32bit field. During the three-way handshake, the request segment is sent for
connection establishment.

HLEN

This field specifies the number of 32-bit words present in the TCP header. This
field helps the receiver to know from where the actual data begins. The HLEN
field is of 4 bits, and it ranges from 20 bytes to 60 bytes in tcp header size.

Control Flag Bits

The control flag bit is 6 bits. The control flag field is basically divided into the
following felids that are as follows:

● If the URG(Urgent pointer)=1, then the urgent pointer is in use


otherwise, it is not in use.
● IF ACK = 1 means the acknowledgement number is valid, and if ACK =
0 means the segment does not contain acknowledgement.
● If PSH(Push the data without buffering) = 1 means the request to
forward the data to the application layer without buffering it.
● If RST = 1 means it abruptly resets the connection whenever there is a
host crash or is sometimes used to reject a segment.
● SYN: Synchronize sequence numbers during connection establishment
Connection request: SYN=1,ACK=0
Reply: SYN=1,ACK=1
FIN: Terminate the connection

Window Size

It tells how many bytes may be sent, starting at the acknowledged byte. It
advertises how much data (in bytes) the sender can receive without
acknowledgement. Thus, the window size is used for Flow Control.

Checksum

The checksum is used for error detection. It checksums the data, header, and
pseudo-header. The sender adds CRC checksum to the checksum field before
sending the data. The receiver rejects the data that fails the CRC check.

Options

The options field is used for several purposes. The options field contains 40
bytes of information. Some widely used options are:

● MSS(maximum segment size)


● Window scale
● Time Stamp

9. Explain the world wide web.

World Wide Web, which is also known as a Web, is a collection of


websites or web pages stored in web servers and connected to local
computers through the internet. These websites contain text pages,
digital images, audios, videos, etc. Users can access the content of
these sites from any part of the world over the internet using their
devices such as computers, laptops, cell phones, etc. The WWW, along
with internet, enables the retrieval and display of text and media to your
device.

10. Explain HyperText Transfer Protocol


OR
11. Explain about HTTP. .

● HTTP stands for HyperText Transfer Protocol.


● It is a protocol used to access the data on the World Wide Web (www).

● The HTTP protocol can be used to transfer the data in the form of plain text,
hypertext, audio, video, and so on.

● This protocol is known as HyperText Transfer Protocol because of its


efficiency that allows us to use in a hypertext environment where there are
rapid jumps from one document to another document.

● HTTP is similar to the FTP as it also transfers the files from one host to
another host. But, HTTP is simpler than FTP as HTTP uses only one
connection, i.e., no control connection to transfer the files.

12. Explain the SMTP.

● MTP stands for Simple Mail Transfer Protocol.

● SMTP is a set of communication guidelines that allow software to transmit an


electronic mail over the internet is called Simple Mail Transfer Protocol.

● It is a program used for sending messages to other computer users based on


e-mail addresses.

● It provides a mail exchange between users on the same or different


computers, and it also supports:

○ It can send a single message to one or more recipients.

○ Sending message can include text, voice, video or graphics.

○ It can also send the messages on networks outside the internet.

● The main purpose of SMTP is used to set up communication rules between


servers. The servers have a way of identifying themselves and announcing
what kind of communication they are trying to perform. They also have a way
of handling the errors such as incorrect email address. For example, if the
recipient address is wrong, then receiving server reply with an error message
of some kind.

13. Write a note on DNS.

An application layer protocol defines how the application processes running


on different systems, pass the messages to each other.

● DNS stands for Domain Name System.

● DNS is a directory service that provides a mapping between the name


of a host on the network and its numerical address.

● DNS is required for the functioning of the internet.

● Each node in a tree has a domain name, and a full domain name is a
sequence of symbols specified by dots.

● DNS is a service that translates the domain name into IP addresses.


This allows the users of networks to utilize user-friendly names when
looking for other hosts instead of remembering the IP addresses.

● For example, suppose the FTP site at EduSoft had an IP address of


132.147.165.50, most people would reach this site by specifying
ftp.EduSoft.com. Therefore, the domain name is more reliable than IP
address.

14. Write short notes on FTP.

● FTP stands for File transfer protocol.


● FTP is a standard internet protocol provided by TCP/IP used for transmitting
the files from one host to another.
● It is mainly used for transferring the web page files from their creator to the
computer that acts as a server for other computers on the internet.
● It is also used for downloading the files to computer from other servers.
Objectives of FTP
● It provides the sharing of files.
● It is used to encourage the use of remote computers.
● It transfers the data more reliably and efficiently.

15. Explain internet transport protocol.


16. Explain TCP segment header.
Same as Q8

17. Difference between absolute domain name and relative domain na


18. What is a domain name system (DNS)?
19. Explain about MIME.
20. Draw and explain UDP Header.
UDP Header –
UDP header is an 8-bytes fixed and simple header, while for TCP it may vary
from 20 bytes to 60 bytes. The first 8 Bytes contains all necessary header
information and the remaining part consist of data. UDP port number fields
are each 16 bits long, therefore the range for port numbers is defined from 0
to 65535; port number 0 is reserved. Port numbers help to distinguish
different user requests or processes.

21. Source Port: Source Port is a 2 Byte long field used to identify the port
number of the source.
22. Destination Port: It is a 2 Byte long field, used to identify the port of
the destined packet.
23. Length: Length is the length of UDP including the header and the data.
It is a 16-bits field.
24. Checksum: Checksum is 2 Bytes long field. It is the 16-bit one’s
complement of the one’s complement sum of the UDP header, the
pseudo-header of information from the IP header, and the data,
padded with zero octets at the end (if necessary) to make a multiple of
two octets.

25. Difference between leaky bucket and token bucket.

26. Explain with example working of DHCP

You might also like