Unit 4 CN & WT
Unit 4 CN & WT
main function is to transfer network packets from the source to the destination.
It is involved both the source host and the destination host. At the source, it
then delivers the packet to the data link layer so that it can further be sent to the
1. The main responsibility of the Network layer is to carry the data
them.
2. If the packets are too large for delivery, they are fragmented i.e., broken
3. It decides the route to be taken by the packets to travel from the source
The services which are offered by the network layer protocol are as follows:
1. Packetizing
2. Routing
3. Forwarding
1. Packetizing
The process of encapsulating the data received from the upper layers of the
network (also called payload) in a network layer packet at the source and
decapsulating the payload from the network layer packet at the destination is
known as packetizing.
The source host adds a header that contains the source and destination address
and some other relevant information required by the network layer protocol to
the payload received from the upper layer protocol and delivers the packet to
The destination host receives the network layer packet from its data link layer,
decapsulates the packet, and delivers the payload to the corresponding upper
layer protocol. The routers in the path are not allowed to change either the
source or the destination address. The routers in the path are not allowed to
2. Routing
Routing is the process of moving data from one device to another device. These
are two other services offered by the network layer. In a network, there are a
number of routes available from the source to the destination. The network layer
specifies some strategies which find out the best possible route. This process is
referred to as routing. There are a number of routing protocols that are used in
this process and they should be run to help the routers coordinate with each
3. Forwarding
Forwarding is simply defined as the action applied by each router when a packet
arrives at one of its interfaces. When a router receives a packet from one of its
(unicast routing) or to some attached networks (in the case of multicast routing).
Routers are used on the network for forwarding a packet from the local network
to the remote network. So, the process of routing involves packet forwarding
Forwarding
Routing Forwarding
interfaces.
1. Error Control
Although it can be implemented in the network layer, it is usually not preferred
because the data packet in a network layer may be fragmented at each router,
2. Flow Control
It regulates the amount of data a source can send without overloading the
receiver. If the source produces data at a very faster rate than the receiver can
consume it, the receiver will be overloaded with data. To control the flow of
data, the receiver should send feedback to the sender to inform the latter that it
There is a lack of flow control in the design of the network layer. It does not
directly provide any flow control. The datagrams are sent by the sender when
they are ready, without any attention to the readiness of the receiver.
3. Congestion Control
Congestion occurs when the number of datagrams sent by the source is beyond
the capacity of the network or routers. This is another issue in the network layer
communication systems.
● With the help of Forwarding, data packets are transferred from one
the routers. Due to this, some routers may drop some of the
Advantages:
Disadvantages:
Advantages:
Disadvantages:
● Overhead due to connection establishment and maintenance.
● Less flexible compared to datagram model as the circuit needs to be established before
communication.
● May not be suitable for real-time applications due to potential delays during connection
setup.
Conclusion:
Understanding the differences between datagram and virtual circuit service models is crucial for
designing and implementing network protocols and applications. Each model has its own strengths
and weaknesses, and the choice between them depends on the specific requirements of the
When the transport layer at a sending host transmits a packet into the network (i.e.,
passes it down to the network layer at the sending host), can the transport layer count
on the network layer to deliver the packet to the destination? When multiple packets are
sent, will they be delivered to the transport layer in the receiving host in the order in
which they were sent? Will the amount of time between the sending of two sequential
packet transmissions be the same as the amount of time between their reception? Will
the network provide any feedback about congestion in the network? What is the
abstract view (properties) of the channel connecting the transport layer in the two
hosts? The answers to these questions and others are determined by the service model
provided by the network layer. The network service model defines the characteristics of
end-to-end transport of data between one "edge" of the network and the other, i.e.,
between sending and receiving end systems.
Perhaps the most important abstraction provided by the network layer to the upper
layers is whether or not the network layer uses virtual circuits (VCs) or not. You may
recall from Chapter 1 that a virtual-circuit packet network behaves much like a
telephone network, which uses "real circuits" as opposed to "virtual circuits". There are
three identifiable phases in a virtual circuit:
● VC setup. During the setup phase, the sender contacts the network layer,
specifies the receiver address, and waits for the network to setup the VC. The
network layer determines the path between sender and receiver, i.e., the series
of links and switches through which all packets of the VC will travel. As discussed
in Chapter 1, this typically involves updating tables in each of the packet switches
in the path. During VC setup, the network layer may also reserve resources (e.g.,
bandwidth) along the path of the VC.
● Data transfer. Once theVC has been established, data can begin to flow along
the VC.
● Virtual circuit teardown. This is initiated when the sender (or receiver) informs
the network layer of its desire to terminate the VC. The network layer will then
typically inform the end system on the other side of the network of the call
termination, and update the tables in each of the packet switches on the path to
indicate that the VC no longer exists.
There is a subtle but important distinction between VC setup at the network layer and
connection setup at the transport layer (e.g., the TCP 3-way handshake we studied in
Chapter 3). Connection setup at the transport layer only involves the two end systems.
The two end systems agree to communicate and together determine the parameters
(e.g., initial sequence number, flow control window size) of their transport level
connection before data actually begins to flow on the transport level connection.
Although the two end systems are aware of the transport-layer connection, the switches
within the network are completely oblivious to it. On the otherhand, with a virtual-circuit
network layer, packet switches are involved in virtual-cicuit setup, and each packet
switch is fully aware of all the VCs passing through it.
The messages that the end systems send to the network to indicate the initiation or
termination of a VC, and the messages passed between the switches to set up the VC
(i.e. to mod modify switch tables) are known as signaling messages and the protocols
used to exchange these messages are often referred to as signaling protocols. VC
setup is shown pictorially in Figure 4.1-2.
We mentioned in Chapter 1 that ATM uses virtual circuits, although virtual circuits in ATM jargon
are called virtual channels. Thus ATM packet switches receive and process VC setup and tear
down messages, and they also maintain VC state tables. Frame relay and X.25, which will be
covered in Chapter 5, are two other networking technologies that use virtual circuits.
With a datagram network layer, each time an end system wants to send a packet, it stamps
the packet with the address of the destination end system, and then pops the packet into the
network. As shown in Figure 4.1-3, this is done without any VC setup. Packet switches (called
"routers" in the Internet) do not maintain any state information about VCs because there are no
VCs! Instead, packet switches route a packet towards its destination by examining the packet's
destination address, indexing a routing table with the destination address, and forwarding the
packet in the direction of the destination. (As discussed in Chapter 1, datagram routing is similar
to routing ordinary postal mail.) Because routing tables can be modified at any time, a series of
packets sent from one end system to another may follow different paths through the network
and may arrive out of order. The Internet uses a datagram network layer.
Figure 4.1-3: Datagram service model
You may recall from Chapter 1 that a packet-switched network typically offers either a VC
service or a datagram service to the transport layer, and not both services. For example, an
ATM network offers only a VC service to the ATM transport layer (more precisely, to the ATM
adaptation layer), and the Internet offers only a datagram sevice to the transport layer. The
transport layer in turn offers services to communicating processes at the application layer. For
example, TCP/IP networks (such as the Internet) offers a connection-oriented service (using
TCP) and connectionless service (UDP) to its communicating processes.
Internet Protocol (IP): IP Addressing, IPv4 Datagram Format, IPv6 Datagram Format
1. IP Addressing:
● IPv4 Addressing:
● Consists of a 32-bit address expressed in dotted-decimal notation (e.g.,
192.168.1.1).
● Divided into network and host portions by a subnet mask.
● Uses classes (A, B, C) for defining network sizes, but Classless
Inter-Domain Routing (CIDR) is more commonly used for efficient address
allocation.
● Private IP address ranges are reserved for local networks (e.g., 10.0.0.0/8,
172.16.0.0/12, 192.168.0.0/16).
● IPv6 Addressing:
● Uses a 128-bit address expressed in hexadecimal notation (e.g.,
2001:0db8:85a3:0000:0000:8a2e:0370:7334).
● Designed to address the depletion of IPv4 addresses and provide a larger
address space.
● Divided into multiple parts, including network prefix and interface
identifier.
● Supports auto-configuration, simplifying network setup.
These formats outline the structure of IPv4 and IPv6 datagrams, including header fields
and payload, essential for routing and delivering data packets across networks.
1. Routing Principles:
● Definition: Routing involves determining the optimal path for data packets to travel from
a source to a destination across a network.
● Principles:
● Forwarding: Process of sending packets towards their destination based on
routing decisions.
● Routing Table: Data structure containing information about network topology and
available routes.
● Routing Protocols: Algorithms used to exchange routing information and
maintain routing tables.
● Metrics: Criteria used to evaluate and compare paths, such as hop count,
bandwidth, delay, and reliability.
2. Routing Algorithms:
● Classification:
● Distance Vector: Based on the number of hops to reach the destination (e.g.,
RIP).
● Link State: Considers the entire network topology to calculate the shortest path
(e.g., OSPF).
● Path Vector: Takes policies and network attributes into account (e.g., BGP).
● RIP (Routing Information Protocol):
● Distance vector routing protocol.
● Uses hop count as the metric.
● Limited to small networks due to slow convergence and scalability issues.
● OSPF (Open Shortest Path First):
● Link state routing protocol.
● Utilizes Dijkstra's algorithm to compute the shortest path.
● Suitable for large networks due to faster convergence and scalability.
● BGP (Border Gateway Protocol):
● Path vector routing protocol.
● Used in inter-domain routing between autonomous systems.
● Considers policy-based routing decisions.
3. Hierarchical Routing:
● Definition: Dividing the network into hierarchical levels or domains to manage and scale
routing efficiently.
● Benefits:
● Reduces the size of routing tables.
● Improves scalability and performance.
● Facilitates administrative delegation and policy enforcement.
● Overview: Protocol used for managing and monitoring network devices and systems.
● Functionality:
● Device discovery.
● Configuration management.
● Performance monitoring.
● Components:
● Manager: Centralized system for network management.
● Agent: Software module running on managed devices.
● MIB (Management Information Base): Database containing managed object
definitions.
These lecture notes cover routing principles, routing algorithms, hierarchical routing, DHCP,
ICMP, and SNMP, providing a comprehensive overview of key networking concepts and
protocols.
Assignment: