0% found this document useful (0 votes)
33 views

#Network Layer

This document discusses several key concepts relating to networking and the network layer: 1) It describes internetworking as routing between two different networks and discusses how networks can differ in protocol, topology, layer 2 network, and addressing scheme. 2) Tunneling and packet fragmentation at the network layer allow communication between separate networks by passing through intermediate networks or breaking large packets into smaller fragments. 3) Network addressing and IP addressing schemes including classful addressing, rules for assigning host and network IDs, and the roles of interfaces, hosts, and routers are covered.

Uploaded by

Defa Chali
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views

#Network Layer

This document discusses several key concepts relating to networking and the network layer: 1) It describes internetworking as routing between two different networks and discusses how networks can differ in protocol, topology, layer 2 network, and addressing scheme. 2) Tunneling and packet fragmentation at the network layer allow communication between separate networks by passing through intermediate networks or breaking large packets into smaller fragments. 3) Network addressing and IP addressing schemes including classful addressing, rules for assigning host and network IDs, and the roles of interfaces, hosts, and routers are covered.

Uploaded by

Defa Chali
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 35

Chapter-5

The Network Layer


Internetworking in Computer Network
 In real world scenario, networks under same administration

are generally scattered geographically.

 There may exist requirement of connecting two different

networks of same kind as well as of different kinds. Routing

between two networks is called internetworking.

 Networks can be considered different based on various

parameters such as, Protocol, topology, Layer-2 network and

addressing scheme.
Tunneling
 If they are two geographically separate networks, which want to communicate with
each other, they may deploy a dedicated line between or they have to pass their
data through intermediate networks.
 Tunneling is a mechanism by which two or more same networks communicate with
each other, by passing intermediate networking complexities. Tunneling is
configured at both ends.
 When the data enters from one end of Tunnel, it is tagged. This tagged data is then
routed inside the intermediate or transit network to reach the other end of Tunnel.
When data exists the Tunnel its tag is removed and delivered to the other part of the
network.
 Both ends seem as if they are directly connected and tagging makes data travel
through transit network without any modifications.
Packet Fragmentation
 A data packet can have more or less packet length depending upon
the application. Devices in the transit path also have their hardware
and software capabilities which tell what amount of data that device
can handle and what size of packet it can process.
 If the packet is larger, it is broken into smaller pieces and then
forwarded. This is called packet fragmentation. Each fragment
contains the same destination and source address and routed through
transit path easily. At the receiving end it is assembled again.
 If a packet with DF (don’t fragment) bit set to 1 comes to a router
which can not handle the packet because of its length, the packet is
dropped.
 When a packet is received by a router has its MF (more fragments)
bit set to 1, the router then knows that it is a fragmented packet and
parts of the original packet is on the way.
Network Addressing
 Network Addressing is one of the major responsibilities of the network layer.
 A host is also known as end system that has one link to the network. The
boundary between the host and link is known as an interface. Therefore, the
host can have only one interface.
 A router is different from the host in that it has two or more links that connect
to it. When a router forwards the datagram, then it forwards the packet to one
of the links.
 The boundary between the router and link is known as an interface, and the
router can have multiple interfaces, one for each of its links. Each interface is
capable of sending and receiving the IP packets, so IP requires each interface
to have an address.
 Each IP address is 32 bits long, and they are represented in the form of
"dot-decimal notation" where each byte is written in the decimal form, and
they are separated by the period.

 In the above figure, a router has three interfaces labeled as 1, 2 & 3 and
each router interface contains its own IP address.
 Each host contains its own interface and IP address.
 All the interfaces attached to the LAN 1 is having an IP address in the form
of 223.1.1.xxx, and the interfaces attached to the LAN 2 and LAN 3 have
an IP address in the form of 223.1.2.xxx and 223.1.3.xxx respectively.
Class-full Addressing
 An IP address is divided into sub-classes:
Class A
Class B
Class C
Class D
Class E
Rules for assigning Host ID
 The Host ID is used to determine the host within any
network. The Host ID is assigned based on the following
rules:
 The Host ID must be unique within any network.

 The Host ID in which all the bits are set to 0 cannot be


assigned as it is used to represent the network ID of the IP
address.
 The Host ID in which all the bits are set to 1 cannot be
assigned as it is reserved for the multicast address.
Rules for assigning Network ID:
 If the hosts are located within the same local network, then they are
assigned with the same network ID.

 The following are the rules for assigning Network ID.

 The network ID cannot start with 127 as 127 is used by Class A.

 The Network ID in which all the bits are set to 0 cannot be assigned as
it is used to specify a particular host on the local network.

 The Network ID in which all the bits are set to 1 cannot be assigned as
it is reserved for the multicast address.
 An IP address is divided into two parts:
 Network ID: It represents the number of networks.
 Host ID: It represents the number of hosts.

 In the above diagram, we observe that each class have a specific


range of IP addresses. The class of IP address is used to determine the
number of bits used in a class and number of networks and hosts
available in the class.
Class A
 In Class A, an IP address is assigned to those networks that
contain a large number of hosts
 The network ID is 8 bits long.
 The host ID is 24 bits long.

 the first bit in higher order bits of the first octet is always set
to 0 and the remaining 7 bits determine the network ID. The
24 bits determine the host ID in any network.
Class B
 In Class B, an IP address is assigned to those networks that
range from small sized to large-sized networks.
 The Network ID is 16 bits long.
 The Host ID is 16 bits long.

 In Class B, the higher order bits of the first octet is always set
to 01, and the remaining14 bits determine the network ID. The
other 16 bits determine the Host ID.
Class C
 In Class C, an IP address is assigned to only small-sized
networks.
 The Network ID is 24 bits long.
 The host ID is 8 bits long.

 In Class C, the higher order bits of the first octet is always set
to 110, and the remaining 21 bits determine the network ID.
The 8 bits of the host ID determine the host in a network.
What is Sub netting?
 the practice of dividing a network into two or smaller
networks. It increases routing efficiency, which helps to
enhance the security of the network and reduces the size of the
broadcast domain.
 IP Subnetting designates high-order bits from the host as part
of the network prefix. This method divides a network into
smaller subnets.
 It also helps you to reduce the size of the routing tables, which
is stored in routers. This method also helps you to extend the
existing IP address base & restructures the IP address.
Why Use Sub netting?
 Here are important reasons for using Sub netting:
 IPV4 Sub netting reduces network traffic by eliminating
collision and broadcast traffic and thus improves overall
performance.
 Optimized IP network performance & Facilitates spanning
of large geographical distances.
 Sub netting process helps to allocate IP addresses that
prevent large numbers of IP network addresses from
remaining unused.
What is Subnet Mask?
 A subnet mask is a 32 bits address used to distinguish between
a network address and a host address in IP address.
 A subnet mask identifies which part of an IP address is the
network address and the host address.
 They are not shown inside the data packets traversing the
Internet. They carry the destination IP address, which a router
will match with a subnet
What is IP?
 IP address as a numeric address assigned to each device on a
network.
 An IP address is assigned to each device connected to a
network. Each device uses an IP address for communication.
 An IP address is assigned to each device so that the device on a
network can be identified uniquely.
 To facilitate the routing of packets, TCP/IP protocol uses a 32-
bit logical address known as IPv4 (Internet Protocol version 4).
 There are two types of IP addresses
 IPv4
 IPv6
What is IPv4?
 It is a current version and the most commonly used IP address.
 It is a 32-bit address written in four numbers separated by
'dot', i.e., periods. This address is unique for each device.
 In today's computer network world, computers do not
understand the IP addresses in the standard numeric format as
the computers understand the numbers in binary form only.
 The binary number can be either 1 or 0. The IPv4 consists of
four sets, and these sets represent the octet. The bits in each
octet represent a number.
 If the bit the 1, then the number it represents will count, and if
the bit is 0, then the number it represents does not count.
Network Layer Protocols in TCP/IP
Routing
 A Routing is a process of selecting path along which the data can be
transferred from source to the destination. Routing is performed by a
special device known as a router
 A router is a networking device that forwards the packet based on
the information available in the packet header and forwarding table.
 The routing algorithms are used for routing the packets. The routing
algorithm is nothing but a software responsible for deciding the
optimal path through which packet can be transmitted.
 The routing protocols use the metric to determine the best path for
the packet delivery. The metric is the standard of measurement such
as hop count, bandwidth, delay, current load on the path, etc. used
by the routing algorithm to determine the optimal path to the
destination.
Types of Routing
 Routing can be classified into three categories:
 Static Routing
 Default Routing
 Dynamic Routing
Static Routing
 Static Routing is also known as Non adaptive Routing.
 It is a technique in which the administrator manually adds the
routes in a routing table.
 A Router can send the packets for the destination along the
route defined by the administrator.
 In this technique, routing decisions are not made based on the
condition or topology of the networks
Advantages Of Static Routing
 No Overhead: It has ho overhead on the CPU usage of the
router. Therefore, the cheaper router can be used to obtain
static routing.
 Bandwidth: It has not bandwidth usage between the routers.
 Security: It provides security as the system administrator is
allowed only to have control over the routing to a particular
network.

Disadvantages of Static Routing:


 For a large network, it becomes a very difficult task to add
each route manually to the routing table.
 The system administrator should have a good knowledge of a
topology as he has to add each route manually.
Default Routing
• Default Routing is a technique in which a router is configured
to send all the packets to the same hop device, and it doesn't
matter whether it belongs to a particular network or not. A
Packet is transmitted to the device for which it is configured in
default routing.
• Default Routing is used when networks deal with the single
exit point.
• It is also useful when the bulk of transmission networks have
to transmit the data to the same hop device.
• When a specific route is mentioned in the routing table, the
router will choose the specific route rather than the default
route. The default route is chosen only when a specific route is
not mentioned in the routing table.
Dynamic Routing
 It is also known as Adaptive Routing.
 It is a technique in which a router adds a new route in the
routing table for each packet in response to the changes in the
condition or topology of the network.
 Dynamic protocols are used to discover the new routes to
reach the destination.
 In Dynamic Routing, RIP and OSPF are the protocols used to
discover the new routes.
 If any route goes down, then the automatic adjustment will be
made to reach the destination.
The Dynamic protocol should have the following features:
 All the routers must have the same dynamic routing protocol
in order to exchange the routes.
 If the router discovers any change in the condition or topology,
then router broadcast this information to all other routers.
Advantages of Dynamic Routing:
 It is easier to configure & It is more effective in selecting the
best route in response to the changes in the condition or
topology.
Disadvantages of Dynamic Routing:
 It is more expensive in terms of CPU and bandwidth usage.
Routing Protocols
1. Routing Information Protocol (RIP)
 RIP is used in both Local Area Networks (LANs) and Wide
Area Networks (WANs), and also runs on the Application
layer of the OSI model.
 There are multiple versions of RIP including RIPv1 and
RIPv2. The original version or RIPv1 determines network
paths based on the IP destination and the hop count of the
journey.
 It is less secure as compared to default and static routing.
2. Interior Gateway Protocol (IGRP)
 Interior Gateway Protocol or IGRP is a distance vector routing
protocol produced by Cisco.
 IGRP was designed to build on the foundations laid down on
RIP to function more effectively within larger connected
networks and removed the 15 hop cap that was placed on RIP.
 IGRP uses metrics such as bandwidth, delay, reliability, and
load to compare the viability of routes within the network.
 However, only bandwidth and delay are used under IGRP’s
default settings.
3. Exterior Gateway Protocol (EGP)
 Exterior Gateway Protocol or EGP is a protocol that is used to
exchange data between gateway hosts that neighbor each other
within autonomous systems.
 In other words, EGP provides a forum for routers to share
information across different domains.
 The most high-profile example of an EGP is the internet itself.
The routing table of the EGP protocol includes known routers,
route costs, and network addresses of neighboring devices.
 EGP was widely-used by larger organizations but has since
been replaced by BGP.
Multicast
 Multicast is a method of group communication where the
sender sends data to multiple receivers or nodes present in the
network simultaneously.
 Multicasting is a type of one-to-many and many-to-many
communication as it allows sender or senders to send data
packets to multiple receivers at once across LANs or WANs.

You might also like