Unit 3 Computer Network

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

Noida Institute of Engineering and

Technology, Greater Noida

Network Layer

Unit: 3

Computer Networks
(ACSE0602)
Sanjay Kumar Nayak
(Assistant Professor)
B Tech 6th Sem CSE
Department

Sanjay Kumar Nayak ACSE602 CN


4/19/2024 1
UNIT 3
Noida Institute of Engineering and
Technology, Greater Noida
 Sanjay Nayak received his B.Tech
degree in Computer Science &
Engineering from institute of Institute of
Engineering & Technology (IET),
Lucknow . M.Tech degree from UPTU .

Sanjay Kumar Nayak ACSE602 CN UNIT 3


2
4/19/2024
Curriculum

Sanjay Kumar Nayak ACSE602 CN UNIT 3


4/19/2024 3
Syllabus

Sanjay Kumar Nayak ACSE602 CN UNIT 3


4/19/2024 4
Books

Text books:
1. Behrouz Forouzan, “Data Communication and Networking” Fourth Edition-2006,
Tata McGraw Hill
2. Andrew Tanenbaum “Computer Networks”, Fifth Edition-2011, Prentice Hall.
3. William Stallings, “Data and Computer Communication”, Eighth Edition-2008,
Pearson.

Reference Books:
1. Kurose and Ross, “Computer Networking- A Top-Down Approach”, Eighth
Edition-2021, Pearson.
2. Peterson and Davie, “Computer Networks: A Systems Approach”, Fourth Edition-
1996, Morgan Kaufmann

Sanjay Kumar Nayak ACSE602 CN UNIT 3


4/19/2024 5
Course Objective

The objective of this course is to understand introduction of


computer networks with suitable transmission media and
different networking devices. Network protocols which are
essential for the computer network are need to explain such as
data link layer protocols and routing protocols.
A detail explanation of IP addressing , TCP/IP protocols and
application layer protocols are covered in this course.

Sanjay Kumar Nayak ACSE602 CN UNIT 3


4/19/2024 6
Course Outcome

Sanjay Kumar Nayak ACSE602 CN UNIT 3


4/19/2024 7
PO’s
1.Engineering knowledge
2. Problem analysis
3. Design/development of solutions
4. Conduct investigations of complex problems
5. Modern tool usage
6. The engineer and society
7. Environment and sustainability
8. Ethics
9. Individual and team work
10. Communication
11. Project management and finance
12. Life-long learning

Sanjay Kumar Nayak ACSE602 CN UNIT 3


4/19/2024 8
CO-PO Mapping
Computer Networks(ACSE- 603) Year of Study: 2023-24

CO PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12

ACSE0602.1 3 2 2 2 2 2 3

ACSE0602.2 3 3 2 3

ACSE0602.3 3 3 3 3 2 2 2 3

ACSE0602.4 3 2 2 2 3

ACSE0602.5 3 3 2 2 3 2 3

Average 3 2 2 2 2 2 2 2 3

4/19/2024 9
Sanjay Kumar Nayak ACSE602 CN UNIT 3
PSO’s

On successful completion of graduation degree, The computer Science & Engineering


graduates will be able to:

PSO1: identify, analyze real world problems and design their ethical solutions using
artificial intelligence, robotics, virtual/augmented reality, data analytics, block chain
technology, and cloud computing.

PSO2: design and develop the hardware sensor devices and related interfacing software
systems for solving complex engineering problems.

PSO 3: understand inter-disciplinary computing techniques and to apply them in the


design of advanced computing.

PSO 4: conduct investigation of complex problem with the help of technical, managerial,
leadership qualities, and modern engineering tools provided by industry sponsored
laboratories.

Sanjay Kumar Nayak ACSE602 CN UNIT 3


4/19/2024 10
PSO’s
CO PSO1 PSO2 PSO3 PSO4

ACSE0602.1 2 2 2 2

ACSE0602.2 2 2 2 2

ACSE0602.3 2 2 2 3

ACSE0602.4 2 2 2 2

ACSE0602.5 2 2 2 2

Avg 2 2 2 2

Sanjay Kumar Nayak ACSE602 CN UNIT 3


4/19/2024 11
Program Educational Objectives
PEO 1: To have an excellent scientific and engineering breadth so as to comprehend,
analyze, design and provide sustainable solutions for real-life problems using state-of-the-
art technologies.

PEO 2: To have a successful career in industries, to pursue higher studies or to support


entrepreneurial endeavors and to face the global challenges.

PEO 3:To have an effective communication skills, professional attitude, ethical values and
a desire to learn specific knowledge in emerging trends, technologies for research,
innovation and product development and contribution to society.

PEO 4: To have life-long learning for up-skilling and re-skilling for successful
professional career as engineer, scientist, entrepreneur and bureaucrat for betterment of
society.
Sanjay Kumar Nayak ACSE602 CN UNIT 3
4/19/2024 12
Result Analysis

COMPUTER NETWORKS (ACSE0602)

Department wise Result of VI sem. 100

Subject wise result 99

Faculty wise result 99

Sanjay Kumar Nayak ACSE602 CN UNIT 3


4/19/2024 13
End semester Question paper templates

Sanjay Kumar Nayak ACSE602 CN UNIT 3


4/19/2024 14
Prerequisite and Recap

• Networking components
• Concept of physical addressing
• Concept of OSI and TCP/IP model
In previous unit
Data link layer duties
Multi access protocol
Error control

Sanjay Kumar Nayak ACSE602 CN UNIT 3


4/19/2024 15
Content

Unit 3

• Point-to-point networks
• Logical addressing (IPv4)
• Basic internetworking (IP, CIDR
ARP, RARP, DHCP, ICMP)
• Routing, forwarding and delivery
• Static and dynamic routing
• Routing algorithms and protocols
• Congestion control algorithms
• IPv6.

Sanjay Kumar Nayak ACSE602 CN UNIT 3


4/19/2024 16
Network Layer Functions

Objective: Study about basic concept of Network layer and its function

• Getting packets from the source all the way to the destination
• May require many hops through intermediate routers.
• It must know about the topology of the communication subnet ( the
set of all routers) and choose appropriate paths through it.
• It must take care to choose routers to avoid overloading some of the
lines and routers while leaving others idle.
• When source and destination are in different networks, it has to deal
with the differences.

Sanjay Kumar Nayak ACSE602


4/19/2024 17
CN UNIT 3
Network Layer Functions

Sanjay Kumar Nayak ACSE602


4/19/2024 18
CN UNIT 3
Network Layer Functions

The network layer performs several functions to facilitate data transmission in a


network. Some of the functions performed are as follows:

1. Routing:
It is the process to determine the most effective route for data transmission in
the network. When a data packet arrives at the router's input link, it determines the
ideal route for data transmission in the network. It determines the path that will be used
to transfer the packet further in the network.
2. Logical Addressing:
There are two types of addressing performed in the network: logical
addressing and physical addressing. The data link layer performs the physical
addressing, while the network layer does the logical addressing in the OSI model.
Logical addressing is also used to distinguish between the source and destination
system. The network layer adds a header to the packet, which includes the logical
addresses of both the sender and the receiver.

Sanjay Kumar Nayak ACSE602


4/19/2024 19
CN UNIT 3
Network Layer Functions

The network layer performs several functions to facilitate data transmission in a


network. Some of the functions performed are as follows:

3. Internetworking:
This is the most important function performed by the network layer of the
OSI model. It establishes the logical connection between nodes in the same or different
networks.

4. Fragmentation:
It is the conversion of data packets into the smallest individual data units
capable of being transmitted in the network.

Sanjay Kumar Nayak ACSE602


4/19/2024 20
CN UNIT 3
Network Layer

Sanjay Kumar Nayak ACSE602


4/19/2024 21
CN UNIT 3
Network Layer Protocols

Sanjay Kumar Nayak ACSE602


4/19/2024 22
CN UNIT 3
Network Layer Protocols

There are several network layer protocols in existence; however,


only the following two are commonly implemented:

• Internet Protocol version 4 (IPv4)


• Internet Protocol version 6 (IPv6)

Other legacy network layer protocols that are not widely used
include:
• Novell Internetwork Packet Exchange (IPX)
• AppleTalkConnectionless Network Service (CLNS/DECNet)

Sanjay Kumar Nayak ACSE602


4/19/2024 23
CN UNIT 3
IPv4 Protocol

Sanjay Kumar Nayak ACSE602


4/19/2024 24
CN UNIT 3
IPv4 Protocol
Objective: Study about basic concept of IP addressing and its type

An IPv4 address is a 32-bit address that uniquely and universally


defines the connection of a device (for example, a computer or a
router) to the Internet.

The address space of IPv4 is


232 or 4,294,967,296.
Dotted-decimal notation and binary notation for an IPv4 address

Sanjay Kumar Nayak ACSE602


4/19/2024 25
CN UNIT 3
IPv4 Example

Change the following IPv4 addresses from binary notation to dotted-


decimal notation.

Solution
We replace each group of 8 bits with its equivalent decimal number (see
Appendix B) and add dots for separation.

Sanjay Kumar Nayak ACSE602


4/19/2024 26
CN UNIT 3
IPv4 example

Change the following IPv4 addresses from dotted-decimal notation to


binary notation.

Solution
We replace each decimal number with its binary equivalent

Sanjay Kumar Nayak ACSE602


4/19/2024 27
CN UNIT 3
IPv4 example

Find the error, if any, in the following IPv4 addresses.

Solution
a. There must be no leading zero (045).
b. There can be no more than four numbers.
c. Each number needs to be less than or equal to 255.
d. A mixture of binary notation and dotted-decimal
notation is not allowed.

Sanjay Kumar Nayak ACSE602


4/19/2024 28
CN UNIT 3
IPv4 address classification

Finding the classes in binary and dotted-decimal notation

In classful addressing, the address space is divided into five classes:


A, B, C, D, and E.

Sanjay Kumar Nayak ACSE602


4/19/2024 29
CN UNIT 3
IPv4 address classification

Find the class of each address.


a. 00000001 00001011 00001011 11101111
b. 11000001 10000011 00011011 11111111
c. 14.23.120.8
d. 252.5.15.111

Solution
a. The first bit is 0. This is a class A address.
b. The first 2 bits are 1; the third bit is 0. This is a class C
address.
c. The first byte is 14; the class is A.
d. The first byte is 252; the class is E.

Sanjay Kumar Nayak ACSE602


4/19/2024 30
CN UNIT 3
IPv4 address classification
Number of blocks and block size in classful IPv4 addressing

In classful addressing, a large part of the available addresses were


wasted.
Default masks for classful addressing

Sanjay Kumar Nayak ACSE602


4/19/2024 31
CN UNIT 3
IPv4 address classification

A block of 16 addresses granted to a small organization

Classful addressing, which is almost obsolete, is replaced with


classless addressing.

Sanjay Kumar Nayak ACSE602


4/19/2024 32
CN UNIT 3
IPv4 address : classless addressing

In IPv4 addressing, a block of addresses can be defined as


x.y.z.t /n
in which x.y.z.t defines one of the addresses and the /n defines the
mask.

The first address in the block can be found by setting the rightmost
32 − n bits to 0s.

The last address in the block can be found by setting the rightmost
32 − n bits to 1s.

The number of addresses in the block can be found by using the formula
232−n.
Sanjay Kumar Nayak ACSE602
4/19/2024 33
CN UNIT 3
Daily Quiz
What is the primary function of the Network Layer in the OSI model?
A) Error detection
B) Data link
C) Routing
D) Physical transmission
Which protocol operates at the Network Layer for addressing and routing in the Internet?
A) TCP
B) IP
C) UDP
D) ICMP
Which of the following devices operates at the Network Layer?
A) Hub
B) Switch
C) Router
D) Repeater
What is the size of the IPv4 address?
A) 32 bits
B) 64 bits
C) 128 bits
D) 16 bits

Sanjay Kumar Nayak ACSE602


4/19/2024 34
CN UNIT 3
Example 19.6
IPv4 address : classless addressing

Sanjay Kumar Nayak ACSE602


4/19/2024 35
CN UNIT 3
Example 19.6
IPv4 address : classless addressing

A block of addresses is granted to a small organization. We know that one


of the addresses is 205.16.37.39/28. What is the first address in the block?

Solution
The binary representation of the given address is
11001101 00010000 00100101 00100111

If we set 32−28 rightmost bits to 0, we get

11001101 00010000 00100101 0010000


or
205.16.37.32.

Sanjay Kumar Nayak ACSE602


4/19/2024 36
CN UNIT 3
IPv4 address : classless addressing

Three-level hierarchy in an IPv4 address

Sanjay Kumar Nayak ACSE602


4/19/2024 37
CN UNIT 3
IPv4 address : classless addressing

An ISP is granted a block of addresses starting with 190.100.0.0/16 (65,536


addresses). The ISP needs to distribute these addresses to three groups of
customers as follows:

a. The first group has 64 customers; each needs 256 addresses.

b. The second group has 128 customers; each needs 128 addresses.

c. The third group has 128 customers; each needs 64 addresses.

Design the sub blocks and find out how many addresses are still available
after these allocations.

Sanjay Kumar Nayak ACSE602


4/19/2024 38
CN UNIT 3
IPv4 address : classless addressing

Group 1
For this group, each customer needs 256 addresses. This means that 8
(log2 256) bits are needed to define each host. The prefix length is then 32
− 8 = 24. The addresses are

Sanjay Kumar Nayak ACSE602


4/19/2024 39
CN UNIT 3
Example 19.10 (continued)
IPv4 address : classless addressing

Group 2
For this group, each customer needs 128 addresses. This means that 7
(log2 128) bits are needed to define each host. The prefix length is then 32
− 7 = 25. The addresses are

Sanjay Kumar Nayak ACSE602


4/19/2024 40
CN UNIT 3
Example 19.10 (continued)
IPv4 address : classless addressing
Group 3
For this group, each customer needs 64 addresses. This means that 6
(log264) bits are needed to each host. The prefix length is then 32 − 6 = 26.
The addresses are

Number of granted addresses to the ISP: 65,536


Number of allocated addresses by the ISP: 40,960
Number of available addresses: 24,576

Sanjay Kumar Nayak ACSE602


4/19/2024 41
CN UNIT 3
IPv4 address : classless addressing

An example of address allocation and distribution by an ISP

Sanjay Kumar Nayak ACSE602


4/19/2024 42
CN UNIT 3
IPv4 address : classless addressing

Addresses for private networks

Sanjay Kumar Nayak ACSE602


4/19/2024 43
CN UNIT 3
IPv4 address

Addresses in a NAT

Sanjay Kumar Nayak ACSE602


4/19/2024 44
CN UNIT 3
IPv6 address

Objective: Study about basic concept of IPv6 and its function

Despite all short-term solutions, address depletion is still a long-term


problem for the Internet. This and other problems in the IP protocol
itself have been the motivation for IPv6

An IPv6 address is 128 bits long.

Sanjay Kumar Nayak ACSE602


4/19/2024 45
CN UNIT 3
IPv6 address

IPv6 address in binary and hexadecimal colon notation

Sanjay Kumar Nayak ACSE602


4/19/2024 46
CN UNIT 3
IPv6 address

Expand the address 0:15::1:12:1213 to its original.


Solution
We first need to align the left side of the double colon to the left of the
original pattern and the right side of the double colon to the right of the
original pattern to find how many 0s we need to replace the double
colon.

This means that the original address is.

Sanjay Kumar Nayak ACSE602


4/19/2024 47
CN UNIT 3
IPv6 address

IPv6 address in binary and hexadecimal colon notation

Sanjay Kumar Nayak ACSE602


4/19/2024 48
CN UNIT 3
Routing

Objective: Study about basic concept of Routing and its type

An internet is a combination of networks connected by routers. When a


datagram goes from a source to a destination, it will probably pass
through many routers until it reaches the router attached to the
destination network.

Sanjay Kumar Nayak ACSE602


4/19/2024 49
CN UNIT 3
Routing

Sanjay Kumar Nayak ACSE602


4/19/2024 50
CN UNIT 3
Routing

DISTANCE VECTOR ROUTING: Updating of Routing table

• If the next-node entry is different


– The receiving node chooses the row with the smaller cost
– If there is a tie, the old one is kept
• If the next-node entry is the same
– i.e. the sender of the new row is the provider of the old
entry
– The receiving node chooses the new row, even though the
new value is infinity.

Sanjay Kumar Nayak ACSE602


4/19/2024 51
CN UNIT 3
Routing

• Periodic Update
– A node sends its routing table, normally 30
seconds, in a periodic update
• Triggered Update
– A node sends its routing table to its neighbors any
time when there is a change in its routing table
1. After updating its routing table, or
2. Detects some failure in the neighboring links

Sanjay Kumar Nayak ACSE602


4/19/2024 52
CN UNIT 3
Routing

Figure shows the initial routing table for an AS. Note that the
figure does not mean that all routing tables have been created
at the same time; each router creates its own routing table
when it is booted.

Sanjay Kumar Nayak ACSE602


4/19/2024 53
CN UNIT 3
Routing
Now assume router A sends four records to its neighbors, routers B,
D, and C. shows the changes in B’s routing table when it receives
these records.

Sanjay Kumar Nayak ACSE602


4/19/2024 54
CN UNIT 3
Routing

Sanjay Kumar Nayak ACSE602


4/19/2024 55
CN UNIT 3
Routing

The Routing Information Protocol (RIP) is an intra-domain


(interior) routing protocol used inside an autonomous system.
It is a very simple protocol based on distance vector routing.
RIP implements distance vector routing directly with some
considerations.

Sanjay Kumar Nayak ACSE602


4/19/2024 56
CN UNIT 3
Routing: Link state Routing

Link state routing has a different philosophy from that of distance vector
routing. In link state routing, if each node in the domain has the entire
topology of the domain—the list of nodes and links, how they are
connected including the type, cost (metric), and the condition of the links
(up or down)—the node can use the Dijkstra algorithm to build a routing
table.

Sanjay Kumar Nayak ACSE602


4/19/2024 57
CN UNIT 3
Routing

Sanjay Kumar Nayak ACSE602


4/19/2024 58
CN UNIT 3
Routing

Sanjay Kumar Nayak ACSE602


4/19/2024 59
CN UNIT 3
Routing
Building Routing Tables

• Creation of the states of the links by each node, called the link
state packets (LSP)
• Dissemination of LSPs to every other routers, called flooding
(efficiently)
• Formation of a shortest path tree for each node
• Calculation of a routing table based on the shortest path tree

Sanjay Kumar Nayak ACSE602


4/19/2024 60
CN UNIT 3
Routing
Creation of LSP

• LSP data: the node ID, the list of links, a sequence number, and
age.
• LSP Generation
– When there is a change in the topology of the domain
– On a periodic basis
• There is no actual need for this type of LSP, normally 60
minutes or 2 hours

Sanjay Kumar Nayak ACSE602


4/19/2024 61
CN UNIT 3
Routing
Forming shortest path three for router A in a graph

Sanjay Kumar Nayak ACSE602


4/19/2024 62
CN UNIT 3
Routing

Sanjay Kumar Nayak ACSE602


4/19/2024 63
CN UNIT 3
Routing

Sanjay Kumar Nayak ACSE602


4/19/2024 64
CN UNIT 3
Routing

To show that the shortest path tree for each node is different, we found
the shortest path tree as seen by node C.

Sanjay Kumar Nayak ACSE602


4/19/2024 65
CN UNIT 3
Routing

Sanjay Kumar Nayak ACSE602


4/19/2024 66
CN UNIT 3
Daily Quiz
Which field in the IPv4 header is used for error checking and correction?
A) Source IP Address
B) Destination IP Address
C) Checksum
D) TTL (Time to Live)

Which routing algorithm considers the entire network topology to make routing decisions?
A) Distance Vector
B) Link State
C) RIP
D) OSPF

What is the purpose of the TTL (Time to Live) field in the IPv4 header?
A) Sets the maximum transmission speed
B) Limits the time a packet can live in the network
C) Specifies the time for a packet to reach its destination
D) Controls the packet priority

In IPv6, what is the size of the address space compared to IPv4?


A) Smaller
B) Same
C) Larger
D) Equal

Sanjay Kumar Nayak ACSE602


4/19/2024 67
CN UNIT 3
Congestion Control

Objective: Study about basic concept of congestion control and its type

Data traffic
The main focus of congestion control and quality of service is data
traffic. In congestion control we try to avoid traffic congestion. In
quality of service, we try to create an appropriate environment for the
traffic. So, before talking about congestion control and quality of
service, we discuss the data traffic itself.
Traffic descriptors

Sanjay Kumar Nayak ACSE602


4/19/2024 68
CN UNIT 3
Congestion Control

Three traffic profiles

Sanjay Kumar Nayak ACSE602


4/19/2024 69
CN UNIT 3
Congestion Control

Congestion in a network may occur if the load on the


network—the number of packets sent to the network—
is greater than the capacity of the network—the
number of packets a network can handle. Congestion
control refers to the mechanisms and techniques to
control the congestion and keep the load below the
capacity. Queues in a router

Sanjay Kumar Nayak ACSE602


4/19/2024 70
CN UNIT 3
Congestion Control

Packet delay and throughput as functions of load

Sanjay Kumar Nayak ACSE602


4/19/2024 71
CN UNIT 3
Congestion Control

Congestion control categories

Sanjay Kumar Nayak ACSE602


4/19/2024 72
CN UNIT 3
Congestion Control

OPEN LOOP CONGESTION CONTROL (PREVENTION TECHNIQUES)


In open-loop congestion control, policies are applied to prevent
congestion before it happens. In these mechanisms, congestion
control is handled by either the source or the destination.

1.Retransmission Policy :Retransmission is sometimes


unavoidable. If the sender feels that a sent packet is lost or
corrupted, the packet needs to be retransmitted. Retransmission
in general may increase congestion in the network. However, a
good retransmission policy can prevent congestion. The
retransmission policy and the retransmission timers must be
designed to optimize efficiency and at the same time prevent
congestion.

Sanjay Kumar Nayak ACSE602


4/19/2024 73
CN UNIT 3
Congestion Control

2.Window Policy: The type of window at the sender may also


affect congestion. The Selective Repeat window is better than the
Go-Back-N window for congestion control.

3.Acknowledgment Policy: The acknowledgment policy imposed


by the receiver may also affect congestion. If the receiver does
not acknowledge every packet it receives, it may slow down the
sender and help prevent congestion. A receiver may send an
acknowledgment only if it has a packet to be sent or a special
timer expires. A receiver may decide to acknowledge only N
packets at a time. the acknowledgments are also part of the load
in a network. Sending fewer acknowledgments means imposing
less load on the network.

Sanjay Kumar Nayak ACSE602


4/19/2024 74
CN UNIT 3
Congestion Control

4.Discarding Policy: A good discarding policy by the routers may


prevent congestion and at the same time may not harm the
integrity of the transmission. For example, in audio transmission,
if the policy is to discard less sensitive packets when congestion is
likely to happen, the quality of sound is still preserved and
congestion is prevented or alleviated.

5.Admission Policy: An admission policy, which is a quality-of-


service mechanism , can also prevent congestion in virtual-circuit
networks. Switches in a flow first check the resource requirement
of a flow before admitting it to the network. A router can deny
establishing a virtual-circuit connection if there is congestion in
the network or if there is a possibility of future congestion

Sanjay Kumar Nayak ACSE602


4/19/2024 75
CN UNIT 3
Congestion Control
CLOSED LOOP CONGESTION CONTROL (REMOVAL TECHNIQUES)
Closed-loop congestion control mechanisms try to alleviate congestion after it
happen

1. Backpressure method for alleviating congestion

2.Choke packet

Sanjay Kumar Nayak ACSE602


4/19/2024 76
CN UNIT 3
Congestion Control
3. Implicit Signaling:

• There is no communication between the congested node or


nodes and the source.
• The source guesses that there is congestion somewhere in the
network from other symptoms.
• For example, when a source sends several packets and there is
no acknowledgment for a while, one assumption is that the
network is congested. The delay in receiving an
acknowledgment is interpreted as congestion in the network;
the source should slow down

Sanjay Kumar Nayak ACSE602


4/19/2024 77
CN UNIT 3
Congestion Control

4. Explicit Signaling:
• The node that experiences congestion can explicitly send a
signal to the source or destination.
• The explicit-signaling method, however, is different from the
choke-packet method.
• In the choke-packet method, a separate packet is used for
this purpose; in the explicit-signaling method, the signal is
included in the packets that carry data.
• Explicit signaling can occur in either the forward or the
backward direction. This type of congestion control can be
seen in an ATM network

Sanjay Kumar Nayak ACSE602


4/19/2024 78
CN UNIT 3
Congestion Control

TECHNIQUES TO IMPROVE QoS: There are some techniques that


can be used to improve the quality of service. four common
methods: scheduling, traffic shaping.

Scheduling: A good scheduling technique treats the different flows


in a fair and appropriate manner. Several scheduling techniques
are designed to improve the quality of service.

1.FIFO queue

Sanjay Kumar Nayak ACSE602


4/19/2024 79
CN UNIT 3
Congestion Control

2.Priority queuing:

Sanjay Kumar Nayak ACSE602


4/19/2024 80
CN UNIT 3
Congestion Control

3.Weighted fair queuing

Sanjay Kumar Nayak ACSE602


4/19/2024 81
CN UNIT 3
Congestion Control
Traffic Shaping :Traffic shaping is a mechanism to control the amount and the
rate of the traffic sent to the network.
Two techniques can shape traffic: leaky bucket and token bucket.

1. Leaky bucket
A leaky bucket
algorithm
shapes busty
traffic into
fixed-rate
traffic by
averaging the
data rate. It
may drop the
packets if the
Sanjay Kumar Nayak ACSE602
bucket is full.
4/19/2024 82
CN UNIT 3
Congestion Control

Leaky bucket implementation

Sanjay Kumar Nayak ACSE602


4/19/2024 83
CN UNIT 3
Congestion Control

2.Token bucket

Sanjay Kumar Nayak ACSE602


4/19/2024 84
CN UNIT 3
ADDRESS MAPPING
A physical address is a local address. It is called a physical address because it is
usually (but not always) implemented in hardware. An example of a physical
address is the 48-bit MAC address in the Ethernet protocol, which is imprinted
on the NIC installed in the host or router. The physical address and the logical
address are two different identifiers

Mapping Logical to Physical Address: ARP

ARP stands for “Address Resolution Protocol”.


• It is a network protocol used to determine the MAC address
(hardware address) from any IP address.

• This protocol is used when a device wants to communicate with


another device over a local area network or ethernet.

Sanjay Kumar Nayak ACSE602


4/19/2024 85
CN UNIT 3
ARP WORKING
How ARP Protocol Works?
Working flow diagram of ARP Protocol

Sanjay Kumar Nayak ACSE602


4/19/2024 86
CN UNIT 3
ADDRESS MAPPING

Mapping Physical to Logical Address:


RARP, BOOTP, and DHCP
There are occasions in which a host knows its physical address but
needs to know its logical address. This may happen in two cases:

1. A diskless station is just booted. The station can find its physical
address by checking its interface, but it does not know its IP
address.
2. An organization does not have enough IP addresses to assign
to each station; it needs to assign IP addresses on demand. The
station can send its physical address and ask for a short time
lease

Sanjay Kumar Nayak ACSE602


4/19/2024 87
CN UNIT 3
RARP

• Reverse Address Resolution Protocol (RARP) finds the logical


address for a machine that knows only its physical address.
• The machine can get its physical address (by reading its NIC, for
example), which is unique locally.
• With RARP, the device would broadcast its MAC address and
request an IP address, and a RARP server on the network would
respond with the corresponding IP address.
• RARP was widely used in the past, it has largely been replaced
by newer protocols such as DHCP (Dynamic Host Configuration
Protocol), which provides more flexibility and functionality in
assigning IP addresses dynamically.
• RARP is still used in some specialized applications, such as
booting embedded systems and configuring network devices
with pre-assigned IP addresses.
Sanjay Kumar Nayak ACSE602
4/19/2024 88
CN UNIT 3
BOOTP

Bootstrap Protocol (BOOTP) is a networking protocol which is used by


networking administration to give IP addresses to each member of that
network for participating with other networking devices by the main server.
The Bootstrap Protocol (BOOTP) is a client/server protocol designed to provide physical
address to logical address mapping. BOOTP is an application layer protocol. The
administrator may put the client and the server on the same network or on different
networks.

How a client can send an IP datagram when it knows neither its own IP address (the
source address) nor the server's IP address (the destination address). The client simply
uses all 0s as the source address and all 1s as the destination address

Sanjay Kumar Nayak ACSE602


4/19/2024 89
CN UNIT 3
BOOTP

Sanjay Kumar Nayak ACSE602


4/19/2024 90
CN UNIT 3
BOOTP

BOOTP is not a dynamic configuration protocol. When a client requests its IP


address, the BOOTP server consults a table that matches the physical address
of the client with its IP address.
if a host moves from one physical network to another? What if a host wants a
temporary IP address? BOOTP cannot handle these situations because the
binding between the physical and IP addresses is static and fixed in a table until
changed by the administrator.
BOOTP is a static configuration protocol.
Sanjay Kumar Nayak ACSE602
4/19/2024 91
CN UNIT 3
DHCP
The Dynamic Host Configuration Protocol (DHCP) has been devised to provide
static and dynamic address allocation that can be manual or automatic

• Static Address Allocation In this capacity DHCP acts as BOOTP does. It is


backward compatible with BOOTP, which means a host running the BOOTP
client can request a static address from a DHCP server. A DHCP server has a
database that statically binds physical addresses to IP addresses.

• Dynamic Address Allocation DHCP has a second database with a pool of


available IP addresses. This second database makes DHCP dynamic. When a
DHCP client requests a temporary IP address, the DHCP server goes to the
pool of available (unused) IP addresses and assigns an IP address for a
negotiable period of time.

Sanjay Kumar Nayak ACSE602


4/19/2024 92
CN UNIT 3
Faculty Video Links, Youtube & NPTEL Video
Links and Online Courses Details

• You tube/other Video Links

• https://www.youtube.com/watch?v=aqtd8iZlSAA
• https://www.youtube.com/watch?v=JhBnOamc_8s

Sanjay Kumar Nayak ACSE602


4/19/2024 93
CN UNIT 3
Daily Quiz
1. Routing tables of a router keeps track of
A. MAC Address Assignments
B. Port Assignments to network devices
C. Distribute IP address to network devices
D. Routes to use for forwarding data to its destination
2. What is the use of Ping command?
A. To test a device on the network is reachable
B. To test a hard disk fault
C. To test a bug in an Application
D. To test a Pinter Quality
3. Router and 3 layer switch work on which layer of OSI model.
A. Physical layer
B. Data Link layer
C. Network layer
D. None

Sanjay Kumar Nayak ACSE602


4/19/2024 94
CN UNIT 3
Daily Quiz
4. Which is correct for IPv4 and IPv6
A. 32 & 128 B. 32 & 48 C. 48 & 128 D. 64 & 132
5. Find out wrong IP address
A. 192.168.2.50 B.168.02.34.1 C. 127.0.0.0 D. 111.2.56.39
6. Class C IP address default mask address
A. 255.0.0.0 B. 255.255.255.0 C. 255.255.0.0 D. None
7. Hub work on which layer of OSI model
A. Physical layer B. Data Link layer C. Network layer D. None
8. Main function of network layer of OSI model
A. Routing B. Logical addressing C. Both A&B D. None
9. Which IP address version have five classes
A. IPv4 B. IPv6 C. Both A & B D. None
10. Supernetting found in which type of IP addresses
A. Classfull B. Classless C. Both A &B D. None
Sanjay Kumar Nayak ACSE602
4/19/2024 95
CN UNIT 3
Weekly Assignment

1. A computer on 6 mbps network is regulated by a token bucket


The token bucket is filled at a rate of 1 mbps. It is initially Filled to
capacity with 8 mega bits. How long can the Computer transmit at
the full 6 mbps.
Solution: S=C/(M-P)=8/(6-1)=1.6 sec (CO3)
Ans
Capacity C=8 Mb
S Burst length in sec
M=6Mbps
P=1 Mbps

Sanjay Kumar Nayak ACSE602


4/19/2024 96
CN UNIT 3
MCQ s

1. Which of the following is true of the IP address 192.0.0.10? (CO4)

A) The netid is 192.


B) The hostid is 0.10.
C) The network address is 192.0.0.0.
D) none of the above
2. A subnet mask in class A has 14 1s. How many subnets does it define?
A) 32
B) 8
C) 64
D) none of the above
3. Which IPv6 address type is used for loopback testing?
A) Unicast
B) Multicast
C) Anycast
D) Loopback

Sanjay Kumar Nayak ACSE602


4/19/2024 97
CN UNIT 3
MCQ s

4. Given the IP address 201.14.78.65 and the subnet mask


255.255.255.224, what is the subnet address?
A) 201.14.78.32
B) 201.14.78.65
C) 201.14.78.64
D) none of the above

5. Routers function in the _______ layers.


A) physical and data link
B) physical, data link, and network
C) data link and network
D) none of the above

Sanjay Kumar Nayak ACSE602


4/19/2024 98
CN UNIT 3
Old Question Papers

• http://www.ululu.in/computer-networks-
solved-sample-papers-btech-6th-semester/

Sanjay Kumar Nayak ACSE602


4/19/2024 99
CN UNIT 3
Expected Questions for University Exam
1. Compare routers and gateways. (CO4)
2. Write the IP address range of each class. (CO4)
3. Explain the need of subnet. (CO4)
4. Write acronym for ARP, RARP, ICMP(CO4)
5. For the given IP address 192.168.2.9 find the class, network
address and host address. (CO4)
6. Write down default mask for each class IP address. (CO4)
7. Write down subnet mask for given 192.12.3.9/26 IP address.
(CO4)
8. List the functions of network layer. (CO4)

Sanjay Kumar Nayak ACSE602


4/19/2024 100
CN UNIT 3
Summary

In this unit 3 we have studied about Network layer of OSI


model, its functions and how it handles the packet
received from transport layer. Routing methods are also
explained and comparison IPv4 and IPv6 completed.
To manage the traffic congestion control is covered.

Sanjay Kumar Nayak ACSE602


4/19/2024 101
CN UNIT 3
Recap of Unit

• Point-to-point networks
• Logical addressing (IPv4)
• Basic internetworking (IP, CIDR
ARP, RARP, DHCP, ICMP)
• Routing, forwarding and delivery
• Static and dynamic routing
• Routing algorithms and protocols
• Congestion control algorithms
• IPv6.

Sanjay Kumar Nayak ACSE602 CN UNIT 3


4/19/2024 102
References

Books:
1. Forouzen, "Data Communication and Networking",TMH

2. A.S. Tanenbaum, Computer Networks, Pearson Education

3. W. Stallings, Data and Computer Communication,


MacmillanPress

Sanjay Kumar Nayak ACSE602


4/19/2024 103
CN UNIT 3

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy