Network Layer 1
Network Layer 1
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.
• The packet is stored in the router until it has fully arrived and its checksum is
verified for error detection.
• 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.
• 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.
• Each datagram belonging to the message follows its own individual route from
the source to the destination.
• It ensures that information sent from one device reaches the correct
destination by using a unique set of numbers known as IP addresses.
• Source Address(128 bits): Contains the IPv6 address of the sender (source) of the
packet.
• 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.
• The last fragment has a flag value 0 to denote end and remaining other have a
flag value of 1.
• 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.
• 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.
• 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 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.
• 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).
• But in IPv6 ::1 is used as local loopback address and therefore there isn’t any
wastage of addresses.