0% found this document useful (0 votes)
8 views

UNIT_3_sem answers

The document discusses various aspects of network layer design, including store-and-forward packet switching, services provided to the transport layer, and the implementation of connection-oriented and connectionless services. It also covers routing algorithms, congestion control algorithms like the leaky bucket and token bucket, classful addressing in IPv4, and the structures of IPv4 and IPv6 headers. Additionally, it highlights the importance of the Internet Protocol and the need for subnetting and tunneling in networking.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

UNIT_3_sem answers

The document discusses various aspects of network layer design, including store-and-forward packet switching, services provided to the transport layer, and the implementation of connection-oriented and connectionless services. It also covers routing algorithms, congestion control algorithms like the leaky bucket and token bucket, classful addressing in IPv4, and the structures of IPv4 and IPv6 headers. Additionally, it highlights the importance of the Internet Protocol and the need for subnetting and tunneling in networking.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

UNIT_3

1. Explain about Network Layer Design Issues.


A. The network layer is concerned with getting packets from the source
all the way to the destination. Getting to the destination may require
making many hops at intermediate routers along the way. This
function clearly contrasts with that of the data link layer, which has the
more modest goal of just moving frames from one end of a wire to the
other. Thus, the network layer is the lowest layer that deals with end-
to-end transmission.
Network Layer Design Issues
1. Store-and-forward packet switching
2. Services provided to transport layer
3. Implementation of connectionless service
4. Implementation of connection-oriented service
5. Comparison of virtual-circuit and datagram networks.
1. Store-and-forward packet switching: The network layer operates
in an environment that uses store and forward packet switching. The
node which has a packet to send, delivers it to the nearest router. The
packet is stored in the router until it has fully arrived and its checksum
is verified for error detection. Once, this is done, the packet is
forwarded to the next router. Since, each router needs to store the
entire packet before it can forward it to the next hop, the mechanism
is called store − and − forward switching.
2. Services provided to transport layer:
• The network layer provides service its immediate upper layer, namely
transport layer, through the network − transport layer interface. The two
types of services provided are
– Connection − Oriented Service − In this service, a path is setup
between the source and the destination, and all the data packets
belonging to a message are routed along this path.
– Connectionless Service − In this service, each packet of the message
is considered as an independent entity and is individually routed from
the source to the destination. The objectives of the network layer while
providing these services are –
• The services should not be dependent upon the router technology.
• The router configuration details should not be of a concern to the
transport layer.
• A uniform addressing plan should be made available to the transport
layer, whether the network is a LAN, MAN or WAN.
3. Implementation of connectionless service:
• Packet are termed as “datagrams” and corresponding subnet as
“datagram subnets”. When the message size that has to be transmitted
is 4 times the size of the packet, then the network layer divides into 4
packets and transmits each packet to router via. a few protocol. Each
data packet has destination address and is routed independently
irrespective of the packets.
4. Implementation of connection-oriented service: • To use a
connection-oriented service, first we establishes a connection, use it
and then release it. In connection-oriented services, the data
packets are delivered to the receiver in the same order in which they
have been sent by the sender.
It can be done in either two ways:
– Circuit Switched Connection – A dedicated physical path or a
circuit is established between the communicating nodes and then
data stream is transferred.
– Virtual Circuit Switched Connection – The data stream is
transferred over a packet switched network, in such a way that it
seems to the user that there is a dedicated path from the sender to
the receiver. A virtual path is established here. While, other
connections may also be using the same path.
5. Comparison of virtual-circuit and datagram networks:

2. Explain about the Routing algorithms with one example.


A. • A routing algorithm is a procedure that lays down the route or path to
transfer data packets from source to the destination. They help in directing
Internet traffic efficiently. After a data packet leaves its source, it can choose
among the many different paths to reach its destination. Routing algorithm
mathematically computes the best path, i.e. “least – cost path” that the packet
can be routed through.
• Routing algorithms can be broadly categorized into two types,
adaptive and non-adaptive routing algorithms

• Routing algorithms can be grouped into two major classes:


1) Non adaptive (Static Routing)
2) Adaptive (Dynamic Routing)
Adaptive Algorithms:
• Adaptive routing algorithms, also known as dynamic routing algorithms,
makes routing decisions dynamically depending on the network conditions.
It constructs the routing table depending upon the network traffic and
topology. They try to compute the optimized route depending upon the hop
count, transit time and distance.
Non – Adaptive Routing Algorithms:
• Non-adaptive Routing algorithms, also known as static routing
algorithms, construct a static routing table to determine the path through
which packets are to be sent. The static routing table is constructed based
upon the routing information stored in the routers when the network is
booted up.
Example for Routing Algorithm: Shortest path algorithm:

Shortest path algorithm finds the shortest paths between routers(nodes) in


a graph. The widely used shortest path algorithm is Dijkstra's shortest path
algorithm.
• The idea is to build a graph of the subnet, with each node of the graph
representing a router and each arc of the graph representing a
communication line (often called a link).
• To choose a route between a given pair of routers, the algorithm just
finds the shortest path between them on the graph
• By changing the weighting function, the algorithm would then
compute the ''shortest'' path measured according to any one of a
number of criteria or to a combination of criteria.
• An algorithm for computing the shortest path between two nodes of a
graph is Dijkstra.

3. Explain in detail about congestion control algorithms.


A. Congestion Control Algorithm
• Too many packets present in (a part of) the network causes packet delay
and loss that degrades performance. This situation is called congestion. The
network and transport layers share the responsibility for handling
congestion
• There are two congestion control algorithms:
1. Leaky Bucket
2. Token Bucket Algorithm

Leaky Bucket
• The leaky bucket algorithm discovers its use in the context of network
traffic shaping or rate limiting. The algorithm allows controlling the rate at
which a record is injected into a network and managing burstiness in the
data rate.
• In this algorithm, a bucket with a volume of ‘b’ bytes and a hole in the
bottom is considered. If the bucket is null, it means b bytes are available as
storage. A packet with a size smaller than b bytes arrives at the bucket and
will forward it. If the packet's size increases by more than b bytes, it will
either be discarded or queued. It is also considered that the bucket leaks
through the hole in its bottom at a constant rate of r bytes per second.
• The outflow is considered constant when there is any packet in the bucket
and zero when it is empty. This defines that if data flows into the bucket
faster than data flows out through the hole, the bucket overflows.
• The disadvantages compared with the leaky-bucket algorithm are the
inefficient use of available network resources. The leak rate is a fixed
parameter. In the case of the traffic, volume is deficient, the large area of
network resources such as bandwidth is not being used effectively. The
leaky-bucket algorithm does not allow individual flows to burst up to port
speed to effectively MKK consume network resources when there would
not be resource contention in the network.

Token Bucket Algorithm


• The leaky bucket algorithm has a rigid output design at the average rate
independent of the bursty traffic. In some applications, when large bursts
arrive, the output is allowed to speed up. This calls for a more flexible
algorithm, preferably one that never loses information. Therefore, a token
bucket algorithm finds its uses in network traffic shaping or rate-limiting.
• It is a control algorithm that indicates when traffic should be sent. This
order comes based on the display of tokens in the bucket. The bucket
contains tokens. Each of the tokens defines a packet of predetermined size.
Tokens in the bucket are deleted for the ability to share a packet.
• When tokens are shown, a flow to transmit traffic appears in the display
of tokens. No token means no flow sends its packets. Hence, a flow transfers
traffic up to its peak burst rate in good tokens in the bucket.
• Thus, the token bucket algorithm adds a token to the bucket each 1 / r
seconds. The volume of the bucket is ‘b’ tokens. When a token appears, and
the bucket is complete, the token is discarded. If a packet of n bytes appears
and n tokens are deleted from the bucket, the packet is forwarded to the
network.
• When a packet of n bytes appears but fewer than n tokens are available.
No tokens are removed from the bucket in such a case, and the packet is
considered non-conformant. The non conformant packets can either be
dropped or queued for subsequent transmission when sufficient tokens
have accumulated in the bucket.
• They can also be transmitted but marked as being non-conformant. The
possibility is that they MKK may be dropped subsequently if the network is
overloaded.

4. Briefly explain about Classful addressing in IPV4.


A. CATEGORIES OF IPV4 ADDRESSING
• There are two broad categories of IPv4 Addressing techniques.
• They are
➢ Classful Addressing
➢ Classless Addressing

➢ CLASSFUL ADDRESSING
• An IPv4 address is 32-bit long (4 bytes).
• An IPv4 address is divided into sub-classes:
Class A
• In Class A, an IP address is assigned to those networks that contain a
large number of hosts.
• The network ID is 8 bits long.
• The host ID is 24 bits long.
• In Class A, the first bit in higher order bits of the first octet is always set
to 0 and the remaining 7 bits determine the network ID.
• The 24 bits determine the host ID in any network.
• The total number of networks in Class A = 27 = 128 network address
• The total number of hosts in Class A = 224 - 2 = 16,777,214 host
address

Class B
• In Class B, an IP address is assigned to those networks that range from
small- sized to large-sized networks.

• The Network ID is 16 bits long.


• The Host ID is 16 bits long.
• In Class B, the higher order bits of the first octet is always set to 10, and
the remaining14 bits determine the network ID.
• The other 16 bits determine the Host ID.
• The total number of networks in Class B = 214 = 16384 network
address
• The total number of hosts in Class B = 216 - 2 = 65534 host address
Class C
• In Class C, an IP address is assigned to only small-sized networks.
• The Network ID is 24 bits long.
• The host ID is 8 bits long.
• In Class C, the higher order bits of the first octet is always set to 110,
and the remaining 21 bits determine the network ID.
• The 8 bits of the host ID determine the host in a network.
• The total number of networks = 221 = 2097152 network address
• The total number of hosts = 28 - 2 = 254 host address

Class D
• In Class D, an IP address is reserved for multicast addresses.
• It does not possess subnetting.
• The higher order bits of the first octet is always set to 1110, and the
remaining bits determines the host ID in any network.
Class E
• In Class E, an IP address is used for the future use or for the research
and development purposes.
• It does not possess any subnetting.
• The higher order bits of the first octet is always set to 1111, and the
remaining bits determines the host ID in any network.

Advantage of Classful Addressing:


• Although classful addressing had several problems and became
obsolete, it had one advantage.
• Given an address, we can easily find the class of the address and, since
the prefix length for each class is fixed, we can find the prefix length
immediately.
• In other words, the prefix length in classful addressing is inherent in
the address; no extra information is needed to extract the prefix and
the suffix.
5.Explain the structure of IPV4 Header format in detail.
A. IPv4 is 32-bit addressing scheme used as TCP/IP host addressing
mechanism. IP addressing enables every host on the TCP/IP network to be
uniquely identifiable.
• IPv4 provides hierarchical addressing scheme which enables it to divide
the network into sub-networks, each with well-defined number of hosts. IP
addresses are divided into many categories:
• Class A - it uses first octet for network addresses and last three octets for
host addressing
• Class B - it uses first two octets for network addresses and last two for host
addressing
• Class C - it uses first three octets for network addresses and last one for
host addressing
• Class D - it provides flat IP addressing scheme in contrast to hierarchical
structure for above three.
• Class E - It is used as experimental.
• IPv4 also has well-defined address spaces to be used as private addresses
(not routable on internet), and public addresses (provided by ISPs and are
routable on internet). MKK
• Though IP is not reliable one; it provides ‘Best-Effort-Delivery’ mechanism.
• The Version field keeps track of which version of the protocol the
datagram belongs to.
• IHL, (Internet Header Length) is provided to tell how long the header is,
in 32-bit words.
• The Differentiated services field specifies Type of service
• The Total length includes everything in the datagram—both header and
data. The maximum length is 65,535 bytes.
• The Identification field is needed to allow the destination host to
determine which packet a newly arrived fragment belongs to.
• Then come two 1-bit fields related to fragmentation. DF stands for Don’t
Fragment. MF stands for More Fragments. MKK
• The Fragment offset tells where in the current packet this fragment
belongs.
• The TtL (Time to live) field is a counter used to limit packet lifetimes.
• The Protocol field tells it which transport process to give the packet to.
• Header checksum: Since the header carries vital information such as
addresses, it rates its own checksum for protection.
• The Source address and Destination address indicate the IP address of
the source and destination network interfaces.
• The Options field was designed to provide an escape to allow subsequent
versions of the protocol to include information not present in the original
design.

6. Explain the structure of IPV6 Header format in detail.


A. Exhaustion of IPv4 addresses gave birth to a next generation Internet
Protocol version 6. IPv6 addresses its nodes with 128-bit wide address
providing plenty of address space for future to be used on entire planet
or beyond.
• IPv6 has introduced Anycast addressing but has removed the concept
of broadcasting. IPv6 enables devices to self-acquire an IPv6 address
and communicate within that subnet. This auto-configuration removes
the dependability of Dynamic Host Configuration Protocol (DHCP)
servers. This way, even if the DHCP server on that subnet is down, the
hosts can communicate with each other.
• IPv6 provides new feature of IPv6 mobility. Mobile IPv6 equipped
machines can roam around without the need of changing their IP
addresses.
• IPv6 is still in transition phase and is expected to replace IPv4
completely in coming years.

• The Flow label field provides a way for a source and destination to
mark groups of packets that have the same requirements and should
be treated in the same way by the network
• The Payload length field tells how many bytes follow the byte header
• The Next header field tells which transport protocol handler (e.g.,
TCP, UDP) to pass the packet to. MKK
• The Hop limit field is same as the Time to live field in IPv4.
7.Briefly explain about importance of Internet protocol.
• A. The Internet Protocol (IP) is the method or protocol by which
data is sent from one computer to another on the Internet.
• Each computer (known as a host) on the Internet has at least one
IP address that uniquely identifies it from all other computers on
the Internet.
• When you send or receive data (for example, an email note or a
Web page), the message gets divided into little chunks called
packets.
• Each of these packets contains both the sender's Internet address
and the receiver's address.
• Any packet is sent first to a gateway computer that understands a
small part of the Internet.
• he gateway computer reads the destination address and forwards
the packet to an adjacent gateway that in turn reads the
destination address and so forth across the Internet until one
gateway recognizes the packet as belonging to a computer within
its immediate neighbourhood or domain.
• That gateway then forwards the packet directly to the computer
whose address is specified.

8. Demonstrate the need for sub netting and Tunnelling?


A. In networking,
• The process of dividing a single network into multiple sub networks is
called as subnetting.
• The sub networks so created are called as subnets.
Subnet ID-

• Each subnet has its unique network address known as its Subnet ID.
• The subnet ID is created by borrowing some bits from the Host ID part
of the IP Address.
• The number of bits borrowed depends on the number of subnets
created.

Advantages-
The two main advantages of subnetting a network are-
• It improves the security.
• The maintenance and administration of subnets is easy.
Disadvantages:
Subnetting leads to loss of IP Addresses.
Subnetting leads to complicated communication process.
Types of Subnetting-

Subnetting of a network may be carried out in the following two ways-

Tunnelling
• If they are two geographically separate networks, which want to
communicate with each other, they may deploy a dedicated line between or
they have to pass their data through intermediate networks.
• Tunnelling is a mechanism by which two or more same networks
communicate with each other, by passing intermediate networking
complexities. Tunnelling is configured at both ends.
Tunnelling is used for several reasons, especially in networking and
computing:
1. Security: Tunnelling allows data to be sent securely over public
networks by encapsulating it in a secure protocol (like VPNs).
2. Bypassing Restrictions: It helps bypass firewalls or geographic
restrictions by routing traffic through servers in different locations.
3. Protocol Compatibility: Tunnelling can enable the use of different
protocols over networks that may not support them natively, allowing
for communication between incompatible systems.
4. Privacy: It can enhance user privacy by masking IP addresses and
encrypting data, making it harder for third parties to intercept
information.
5. Data Integrity: Tunnelling can help ensure that data remains intact
during transmission, adding an extra layer of error-checking.
Each of these reasons contributes to the effectiveness and necessity of
tunnelling in modern network communications.

9. Why sub netting is necessary? With suitable example,


develop the concept of sub netting in class c network.
A. Subnetting in Networking-
In networking,
• The process of dividing a single network into multiple sub networks
is called as subnetting.
• The sub networks so created are called as subnets.
Subnet ID-

• Each subnet has its unique network address known as its Subnet ID.
• The subnet ID is created by borrowing some bits from the Host ID
part of the IP Address.
The number of bits borrowed depends on the number of subnets created
Example:
Consider-
• We have a big single network having IP Address 200.1.2.0.
• We want to do subnetting and divide this network into 2 subnets.

Clearly, the given network belongs to class C.

For creating two subnets and to represent their subnet IDs, we require 1
bit.
So,
• We borrow one bit from the Host ID part.
• After borrowing one bit, Host ID part remains with only 7 bits.

If borrowed bit = 0, then it represents the first subnet


• If borrowed bit = 1, then it represents the second subnet.
P Address of the two subnets are-
• 200.1.2.00000000 = 200.1.2.0
• 200.1.2.10000000 = 200.1.2.128
For 1st Subnet-
• IP Address of the subnet = 200.1.2.0
• Total number of IP Addresses = 27 = 128
• Total number of hosts that can be configured = 128 – 2 = 126
• Range of IP Addresses = [200.1.2.00000000, 200.1.2.01111111] =
[200.1.2.0, 200.1.2.127]
For 2nd Subnet-
• IP Address of the subnet = 200.1.2.128
• Total number of IP Addresses = 27 = 128
• Total number of hosts that can be configured = 128 – 2 = 126
• Range of IP Addresses = [200.1.2.10000000, 200.1.2.11111111] =
[200.1.2.128, 200.1.2.255]

10. Compare IPV6 and IPV4 in detail.

You might also like