UNIT-III
NETWORK LAYER
THE OSI MODEL
NETWORK LAYER
NETWORK LAYER
NETWORK LAYER
Network layer is the third layer in the OSI model of computer
networks
It’s main function is to transfer network packets from the
source to the destination.
It is involved both at the source host and the destination host.
At the source, it accepts a packet from the transport layer,
encapsulates it in a datagram and then deliver the packet to the
data link layer so that it can further be sent to the receiver. At
the destination, the datagram is decapsulated, the packet is
extracted and delivered to the corresponding transport layer.
NETWORK LAYER
Features :
Main responsibility of Network layer is to carry the data packets from the
source to the destination without changing or using it.
If the packets are too large for delivery, they are fragmented i.e., broken
down into smaller packets.
It decides the root to be taken by the packets to travel from the source to
the destination among the multiple roots available in a network (also called
as routing).
The source and destination addresses are added to the data packets inside
the network layer.
NETWORK LAYER
NETWORK LAYER
SERVICES
PACKETIZING
ROUTING
FORWARDING
ERROR CONTROL
FLOW CONTROL
NETWORK LAYER
SERVICES
NETWORK LAYER
SERVICES
NETWORK LAYER
SERVICES
NETWORK LAYER
SERVICES
NETWORK LAYER
SERVICES
NETWORK LAYER
SERVICES
NETWORK LAYER
SERVICES
NETWORK LAYER
SERVICES
NETWORK LAYER
SERVICES
NETWORK LAYER
DESIGN ISSUES
NETWORK LAYER
DESIGN ISSUES
20
NETWORK LAYER
DESIGN ISSUES
Circuit switching
22
Packet switching
23
packet switching
24
ROUTING
ALGORITHMS
ROUTING
ALGORITHMS
SHORTEST PATH
ALGORITHMS
SHORTEST PATH
ALGORITHMS
SHORTEST PATH
ALGORITHMS
SHORTEST PATH
ALGORITHMS
SHORTEST PATH
ALGORITHMS
SHORTEST PATH
ALGORITHM
SHORTEST PATH
ALGORITHM
FLOODING
OPTIMALITY
PRINCIPLE
DISTANCE VECTOR
ROUTING
DISTANCE VECTOR
ROUTING
DISTANCE VECTOR
ROUTING
DISTANCE VECTOR ROUTING- COUNT
TO INFINITY PROBLEM
DISTANCE VECTOR ROUTING-
COUNT TO INFINITY PROBLEM
DISTANCE VECTOR ROUTING-
COUNT TO INFINITY PROBLEM
DISTANCE VECTOR ROUTING-
COUNT TO INFINITY PROBLEM
DISTANCE VECTOR ROUTING-
COUNT TO INFINITY PROBLEM
DISTANCE VECTOR ROUTING-
COUNT TO INFINITY PROBLEM
DISTANCE VECTOR ROUTING-
COUNT TO INFINITY PROBLEM
LINK STATE ROUTING
LINK STATE ROUTING
LINK STATE ROUTING
LINK STATE ROUTING
HIERARCHICAL ROUTING
In hierarchical routing, the routers are divided into regions.
Each router has complete details about how to route
packets to destinations within its own region. But it does
not have any idea about the internal structure of other
regions.
HIERARCHICAL ROUTING
HIERARCHICAL ROUTING
HIERARCHICAL ROUTING
NETWORK LAYER
IN THE INTERNET
•IP ADDRESS
•IP4 ADDRESS
•IP6 ADDRESS
IP ADDRESS
An IP address is a unique identifier assigned to the
computer which is connected to the internet.
Just as you would address a letter to send in the mail,
computers use the unique identifier to send data to specific
computers on a network.
Each IP address consists of a series of characters like
192.168.1.2.
the unique identifier for a computer is called its IP
IP ADDRESS
IP ADDRESS
IP ADDRESS
CLASSIFICATION OF IP ADDRESS
DYNAMIC IP ADDRESS
STATIC IP ADDRESS
DYNAMIC IP
ADDRESS
DYNAMIC IP
ADDRESS
•Temporary ip address assigned by
ISP
•Dynamic ip address always change
STATIC IP
ADDRESS
IP ADDRESS
TYPES
IP4 ADDRESS
IP4 ADDRESS
IP4 32 bit numerical address
66 . 94 . 29 . 13 (decimal to binary)
66 94 29 13
01000010 01011110 000111101 00001101
4*8=32 bit
IP4 ADDRESS
IP4 ADDRESS
IP4 is 4 numerical digit (decimal numbers) separated by dots
66 . 94 . 29 . 13
Each digit range is (0 -255)
0.0.0.0 – 255.255.255.255
IP4 ADDRESS
IPv4 binary
conversion
8-bit octent chat
128 64 32 16 8 4 2 1
66.99.29.13
66 = 64 + 4
128 64 32 16 8 4 2 1
0 1 0 0 0 1 0 0
64=01000100
IPv4 binary
conversion
8-bit octent chat
128 64 32 16 8 4 2 1
66.99.29.13
99 = 64 + 32+2+1
128 64 32 16 8 4 2 1
0 1 1 0 0 0 1 1
99 = 01100011
CATEGORIES OF IPV4
ADDRESSING
There are two broad categories of IPv4
Addressing techniques.
Classful Addressing
Classless Addressing
CLASSFUL ADDRESSING
Classful addressing based on classes
An IP address is divided into sub-classes:
Class A
Class B
Class C
Class D
Class E
An ip address is divided into two parts:
Network ID: It represents the number of networks.
Host ID: It represents the number of hosts.
CLASSFUL ADDRESSING
An IP address is 32-bit long. 192.168.22.100
An IP address is divided into sub-classes:
Class A : 1.0.0.0 - 126. 255.255.255 (1-126)
Class B : 128.0.0.0 - 191. 255.255.255 (128-191)
Class C : 192.0.0.0 - 223.255.255.255 (192 – 223)
Class D : 224.0.0.0 - 239.255.255.255 (224 – 239)
Class E : 240.0.0.0 - 255.255.255.255 (240 – 255)
CATEGORIES OF IPV4
ADDRESSING
CATEGORIES OF IPV4
ADDRESSING
14.28.101.20 – network.node.node.node
14 - network ID
28.101.20 –nodes
129.28.101.20 – network.network.node.node
125 .28 network
101.20 -nodes
200.28.101.20 – network.network.network.node
200 .28 .101 network
20 -node
class D & E
We are not using class D & E ip address range
D is used only for multicast
Class E is under research purpose
IP6 ADDRESS
IP6 ADDRESS
IP6 ADDRESS
classless addressing
classless addressing
PROTOCOLS IN
NETWORK LAYER
IP PROTOCOL : I) IP4 PROTOCOL & 2) IP6
PROTOCOL
DHCP – DYNAMIC HOST CONFIGURATION
PROTOCOL
ICMPV4 : INTERNET CONTROL MESSAGE
PROTOCOL VERSION 4
IPv4 PROTOCOL
IPv4 stands for internet protocol version 4
Internet Protocol is one of the major protocols in the
TCP/IP protocols suite/OSI. This protocol works at the
network layer of the OSI model and the TCP/IP model.
Thus this protocol has the responsibility of identifying
hosts based upon their logical addresses and to route data
among them over the underlying network.
It is used to identify devices on network using an
addressing system
This protocol responsible for establishing connections
between computers, servers, mobile devices based on IP
address
IPv4 PROTOCOL
IP4 uses best effort delivery, i.e. it does not guarantee that
packets would be delivered to the destined host, but it will
do its best to reach the destination. So IPv4 is a
connectionless protocol
Internet Protocol version 4 uses 32-bit logical address
IPv4 PACKET
STRUCTURE
Internet Protocol being a layer-3 protocol (OSI) takes data
Segments from layer-4 (Transport) and divides it into
packets. IP packet encapsulates data unit received from
above layer and add to its own header information.
IPv4 DATAGRAM
FORMAT
IPv4 DATAGRAM
FORMAT
IPv4 DATAGRAM
FORMAT
IPv4 DATAGRAM
FORMAT
ARP
The acronym ARP stands for Address Resolution
Protocol which is one of the most important protocols of the
Network layer in the OSI model.
ARP functionality is to translate IP address to physical
addresses.
ARP finds the hardware address, also known as Media
Access Control (MAC) address, of a host from its known IP
address.
ARP
HOW ARP
WORKS?
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.
HOW ARP
WORKS?
DHCP – DYNAMIC HOST
CONFIGURATION PROTOCOL
DHCP
Dynamic Host Configuration Protocol (DHCP) is a network
management protocol used to dynamically assign an IP address
to nay device, or node, on a network so they can communicate
using IP (Internet Protocol).
DHCP automates and centrally manages these configurations.
There is no need to manually assign IP addresses to new devices.
Therefore, there is no requirement for any user configuration to
connect to a DHCP based network.
DHCP can be implemented on local networks as well as large
enterprise networks.
DHCP
Dynamic Host Configuration Protocol (DHCP) is a network
management protocol used to dynamically assign an IP address
to nay device, or node, on a network so they can communicate
using IP (Internet Protocol).
DHCP automates and centrally manages these configurations.
There is no need to manually assign IP addresses to new devices.
Therefore, there is no requirement for any user configuration to
connect to a DHCP based network.
DHCP can be implemented on local networks as well as large
enterprise networks.
DHCP – DYNAMIC HOST
CONFIGURATION PROTOCOL
DHCP – DYNAMIC HOST
CONFIGURATION PROTOCOL
DHCP – DYNAMIC HOST
CONFIGURATION PROTOCOL
FORWARDING OF IP PACKETS
Forwarding means to deliver the packet to the next hop (which can be the final
destination or the intermediate connecting device).
FORWARDING OF IP PACKETS
IPV6 PROTOCOL
It is the most recent version of the Internet Protocol.
This new IP address version is being deployed to fulfill the need
for more Internet addresses.
It was aimed to resolve issues which are associated with IPv4.
With 128-bit address space, it allows 340 undecillion unique
address space.
DRAWBACKS OF
IPV4
Internet must accommodate real-time audio and video
transmission that requires minimum delay strategies and reservation
of resources.
Internet must provide encryption and authentication of data for
some applications
IPV4 VS IPV6
IPv4 is 32-Bit IP address whereas IPv6 is a 128-Bit IP address.
IPv4 binary bits are separated by a dot(.) whereas IPv6 binary bits
are separated by a colon(:).
IPv4 offers 12 header fields whereas IPv6 offers 8 header fields.
IPv4 supports broadcast whereas IPv6 doesn’t support broadcast.
IPv4 uses ARP (Address Resolution Protocol) to map to MAC
address whereas IPv6 uses NDP (Neighbour Discovery Protocol) to
map to MAC address.
PACKET FORMAT OF IPV6
IPV6 FEATURES
CONGESTION CONTROL
CONGESTION CONTROL
CONGESTION CONTROL
CONGESTION CONTROL
CONGESTION CONTROL
CONGESTION CONTROL