0% found this document useful (0 votes)
14 views33 pages

Network Layer 1

The document discusses the Network Layer's primary functions, including logical addressing, routing, and packet switching. It elaborates on connection-oriented and connectionless services, the Internet Protocol (IP), and the importance of Network Address Translation (NAT) to conserve IP addresses. Additionally, it covers subnetting, supernetting, and various addressing methods, including classless addressing and local broadcast and loopback addresses.

Uploaded by

potatoancar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views33 pages

Network Layer 1

The document discusses the Network Layer's primary functions, including logical addressing, routing, and packet switching. It elaborates on connection-oriented and connectionless services, the Internet Protocol (IP), and the importance of Network Address Translation (NAT) to conserve IP addresses. Additionally, it covers subnetting, supernetting, and various addressing methods, including classless addressing and local broadcast and loopback addresses.

Uploaded by

potatoancar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 33

UNIT-4

NETWORK LAYER
Network Layer Design Issues
• The Network layer is majorly focused on getting packets from the source to the
destination, routing, error handling, and congestion control.

Various functions of Network layer are:


Logical Addressing (IP Addressing) • Assigns unique IP addresses to devices in a
network. • Helps in identifying the source and destination of data packets
Packeting: This is performed by Internet Protocol. The network layer converts
the packets from its upper layer.
• Routing: It is the most important functionality. The network layer chooses the
most relevant and best path for the data transmission from source to destination.
Eg dijkstras and bellman ford algorithm
• Inter-networking: It works to deliver a logical connection across multiple devices.
Network Layer Design Issues
The design issues can be elaborated under four heads −
• Store − and − Forward Packet Switching
• Services to Transport Layer
• Providing Connection Oriented Service
• Providing Connectionless Service
Store − and − Forward Packet
Switching
• The network layer operates in an environment that uses store and forward
packet switching.

• The host send the data packet 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.
Services to Transport Layer
The network layer provides service to 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.
Services to Transport Layer
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.
Providing Connection Oriented
Service
• In connection − oriented services, a path or route called a virtual circuit is setup
between the source and the destination nodes before the transmission starts.

• All the packets in the message are sent along this route.

• Each packet contains an identifier that denotes the virtual circuit to which it
belongs to.

• When all the packets are transmitted, the virtual circuit is terminated and the
connection is released.

• An example of connection − oriented service is MultiProtocol Label Switching


(MPLS).
Providing Connectionless
Service
• In connectionless service, since each packet is transmitted independently, each
packet contains its routing information and is termed as datagram.

• The network using datagrams for transmission is called datagram networks or


datagram subnets.

• No prior setup of routes are needed before transmitting a message.

• Each datagram belonging to the message follows its own individual route from
the source to the destination.

• example -Internet Protocol or IP.


Internet Protocol (IP)
• The Internet Protocol (IP) is a set of rules that allows computers and
other devices to communicate over the Internet.

• It ensures that information sent from one device reaches the correct
destination by using a unique set of numbers known as IP addresses.

• IP addressing uniquely identifies each device on a network using IPv4 or


IPv6 addresses, assigned either statically or dynamically through DHCP.

• DNS translates human-readable domain names into these IP addresses,


while protocols like ARP (for IPv4) or NDP (for IPv6) map IPs to
physical MAC addresses locally.
IPv4 Datagram
IPv6 Header Format
IPv6 Header Format
• Version(4 bits): Specifies the IP version

• Traffic Class/priority(8 bits):


–Similar to the Type of Service (ToS) field in IPv4, it allows classification of packets by priority.
–Helps differentiate types of traffic and can be used for quality of service (QoS) purposes.

• Flow Label(20 bits):


–Used to identify and manage packets that belong to the same flow (a sequence of packets from
the same source to the same destination with specific requirements).
–This field enables faster processing of packets that are part of the same flow.

• Payload Length(16 bits):


–Indicates the size of the payload in bytes, which includes any extension headers and the data.
–Maximum value is 65,535, but larger payloads can be accommodated with the optional "Jumbo
Payload" extension.
IPv6 Header Format
• Next Header(8 bits):
–Specifies the type of the next header that follows the IPv6 header, which can be an extension
header (such as a hop-by-hop option) or a higher-layer protocol (e.g., TCP, UDP).
–Similar to the Protocol field in IPv4, this field enables protocol chaining and extends the
capabilities of IPv6 headers.

• Hop Limit(8 bits):


–Specifies the maximum number of hops (routers) the packet can pass through before being
discarded.
–Similar to the Time to Live (TTL) field in IPv4, but renamed to clarify its purpose as a hop counter.

• Source Address(128 bits): Contains the IPv6 address of the sender (source) of the
packet.

• Destination Address(128 bits): Contains the IPv6 address of the recipient


(destination) of the packet.
Abbreviating an IPv6 Address
• 1111:2222:3333:0000:0000:1000:ffee:0001 can be written in abbreviated
form as 1111:2222:3333::1000:ffee:1

• 0001:0002:0003:0000:0000:1023:0000:0022 -> 1:2:3::1023:0:22

• ffee:0000:0000:0001:0000:0000:0000:0001 -> ffee:0:0:1::1

• 1a2b:0000:0000:0000:0000:0000:0000:0002 -> 1a2b::2


IP Datagram Fragmentation
• Datagrams received by datalink layer need to be encapsulated to
enable transmission from one link to other.

• There is a limit as to how much a link layer frame can carry.

• Maximum amount of data a link layer frame can carry is called


Maximum Transmission Unit (MTU).

• Problem arises when each link uses a different link layer protocol
having different MTU.
MTU Sizes
IP Datagram Fragmentation
• Link layer frames are broken down into smaller size fragments to enable
transmission over the link.

• Fragments are reassembled at the destination by the end systems.

• To enable reassembly of fragments, each fragment has an identification no.

• Sending host increments the identification no. of each outgoing fragment.

• The last fragment has a flag value 0 to denote end and remaining other have a
flag value of 1.

• Offset denotes place where the data is to inserted.


Network Address Translation
(NAT)
• Network Address Translation allows (NAT) multiple devices to use the same
public IP address and access the Internet.

• There can be total 232 (around 4.3 billion) different IPv4 addresses which is very
less considering the number of IPv4 devices connected to the Internet.

• The idea of NAT saves from IP address exhaustion.

• One public IP address is needed to access the Internet but we can use multiple IP
addresses in our private network and access the internet from different devices
and same IP address.

• To achieve this, a private IP address must be translated into a public IP address.


Network Address Translation (NAT)
• Network Address Translation (NAT) is a process in which one or more local IP addresses are translated
into one or more Global IP addresses and vice versa to provide Internet access to the local hosts.
• It also does the translation of port numbers.
• It then makes the corresponding entries of IP address and port number in the NAT table.
• NAT generally operates on a router or firewall.
Internet (IP) Address
Internet Classes
IP Addresses in Decimal
Notation
Class Ranges of Internet
Addresses
Network and Host Addresses
A Network with Two Levels of
Hierarchy
A Network with Three Levels of
Hierarchy
Subnetting and Supernetting
• Subnetting is the procedure to divide the network into sub-networks or small
networks, these smaller networks are known as subnets.
• The subnet is also defined as an internal address made up of a combination of a small
network and host segments.
• Supernetting is the procedure to combine small networks into larger spaces.
• In subnetting, Network addresses’ bits are increased. On the other hand, in supernetting,
Host addresses’ bits are increased.
Addresses with and without
Subnetting
Mask
• Mask is a 32-bit binary number that gives the network address in the address block
when AND operation is bitwise applied on the mask and any IP address of the block.

The default masks in different classes are :


• Class A – 255.0.0.0
• Class B – 255.255.0.0
• Class C – 255.255.255.0

• Question: Given IP address 132.6.17.85 and default class B mask, find the beginning
address (network address).

• Solution: The default mask is 255.255.0.0, which means that only the first 2 bytes are
preserved and the other 2 bytes are set to 0. Therefore, the network address is
132.6.0.0.
Classless Addressing
• In classless addressing, variable-length blocks are used that belong to no classes.

• The notation used for representing classless addressing is called Classless Inter-
Domain Routing (CIDR) or slash notation.

• This addressing type aids in the more efficient allocation of IP addresses.

• This technique assigns a block of IP addresses based on specified conditions when


the user demands a specific amount of IP addresses.

• This block is known as a "CIDR block", and it contains the necessary number of IP
addresses.
Local Broadcast and Loopback
Address
• Local Broadcast Address is used to communicate with all the devices on a local
network.

• It is represented by 255.255.255.255 in decimal or


11111111.11111111.11111111.11111111 in binary.

• A broadcast address is used by hosts to request IP addresses from


the DHCP(Dynamic Host Configuration Protocol) server.

• The host sends a broadcast to the broadcast address to request an IP address


and in turn the DHCP server allocates an IP address from the pool of IP
addresses.
Loopback Address

• Local Loopback Address is used to let a system send a message to itself to make
sure that TCP/IP stack is installed correctly on the machine.

• In IPv4, IP addresses that start with decimal 127 or that has 01111111 in the first
octet are loopback addresses(127.X.X.X).

• Typically 127.0.0.1 is used as the local loopback address.


This leads to the wastage of many potential IP addresses.

• But in IPv6 ::1 is used as local loopback address and therefore there isn’t any
wastage of addresses.

You might also like