Unit 3 Computer Network
Unit 3 Computer Network
Unit 3 Computer Network
Network Layer
Unit: 3
Computer Networks
(ACSE0602)
Sanjay Kumar Nayak
(Assistant Professor)
B Tech 6th Sem CSE
Department
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
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
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 4: conduct investigation of complex problem with the help of technical, managerial,
leadership qualities, and modern engineering tools provided by industry sponsored
laboratories.
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
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
• 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
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.
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.
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.
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.
Other legacy network layer protocols that are not widely used
include:
• Novell Internetwork Packet Exchange (IPX)
• AppleTalkConnectionless Network Service (CLNS/DECNet)
Solution
We replace each group of 8 bits with its equivalent decimal number (see
Appendix B) and add dots for separation.
Solution
We replace each decimal number with its binary equivalent
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.
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.
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
Solution
The binary representation of the given address is
11001101 00010000 00100101 00100111
b. The second group has 128 customers; each needs 128 addresses.
Design the sub blocks and find out how many addresses are still available
after these allocations.
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
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
Addresses in a NAT
• 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
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.
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.
• 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
• 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
To show that the shortest path tree for each node is different, we found
the shortest path tree as seen by node C.
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
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
2.Choke packet
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
1.FIFO queue
2.Priority queuing:
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
2.Token bucket
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
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
• https://www.youtube.com/watch?v=aqtd8iZlSAA
• https://www.youtube.com/watch?v=JhBnOamc_8s
• http://www.ululu.in/computer-networks-
solved-sample-papers-btech-6th-semester/
• 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.
Books:
1. Forouzen, "Data Communication and Networking",TMH