0% found this document useful (0 votes)
17 views19 pages

Unit 4 CN & WT

The document provides an overview of the Network Layer in the OSI model, detailing its services such as packetizing, routing, and forwarding. It discusses the differences between datagram and virtual circuit service models, including their advantages and disadvantages, as well as IP addressing and datagram formats for both IPv4 and IPv6. Additionally, it highlights the challenges of error control, flow control, and congestion control within the network layer.

Uploaded by

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

Unit 4 CN & WT

The document provides an overview of the Network Layer in the OSI model, detailing its services such as packetizing, routing, and forwarding. It discusses the differences between datagram and virtual circuit service models, including their advantages and disadvantages, as well as IP addressing and datagram formats for both IPv4 and IPv6. Additionally, it highlights the challenges of error control, flow control, and congestion control within the network layer.

Uploaded by

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

Network Layer: Services; Network Service Model: Datagram, Virtual

Circuit; Internet Protocol: IP Addressing, IPv4 datagram format, IPv6


datagram format; Routing Principles; Routing Algorithms: Classifications,
RIP, OSPF, BGP; Hierarchical Routing; DHCP; ICMP: Overview and
message types; SNMP: overview.

Network Layer Services- Packetizing, Routing


and Forwarding
The network Layer is the third layer in the OSI model of computer networks. Its

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

accepts a packet from the transport layer, encapsulates it in a datagram, and

then delivers the packet to the data link layer so that it can further be sent to the

receiver. At the destination, the datagram is decapsulated, and the packet is

extracted and delivered to the corresponding transport layer.

Features of Network Layer

1.​ The main responsibility of the Network layer is to carry the data

packets from the source to the destination without changing or using

them.

2.​ If the packets are too large for delivery, they are fragmented i.e., broken

down into smaller packets.

3.​ It decides the route to be taken by the packets to travel from the source

to the destination among the multiple routes available in a network

(also called routing).


4.​ The source and destination addresses are added to the data packets

inside the network layer.

Services Offered by Network Layer

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 data link layer.

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

decapsulate the packets they receive unless they need to be fragmented.

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

other and help in establishing communication throughout the network.


Routing

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

attached networks, it needs to forward the packet to another attached network

(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

from an entry interface out to an exit interface.

Forwarding

Difference between Routing and Forwarding

Routing Forwarding

Routing is the process of moving

data from one device to another Forwarding is simply defined as the

device. action applied by each router when


a packet arrives at one of its

interfaces.

Operates on the Network Layer. Operates on the Network Layer.

Work is based on Forwarding Checks the forwarding table and

Table. work according to that.

Works on protocols like Routing


Works on protocols like UDP
Information Protocol (RIP) for
Encapsulating Security Payloads
Routing.

Other Services Expected from Network Layer

1.​ Error Control

2.​ Flow Control

3.​ Congestion Control

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,

which makes error-checking inefficient in the network layer.

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

is overloaded with data. ​

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

protocol. If congestion continues, sometimes a situation may arrive where the

system collapses and no datagrams are delivered. Although congestion control

is indirectly implemented in the network layer, still there is a lack of congestion

control in the network layer.


Advantages of Network Layer Services

●​ Packetization service in the network layer provides ease of

transportation of the data packets.

●​ Packetization also eliminates single points of failure in data

communication systems.

●​ Routers present in the network layer reduce network traffic by creating

collision and broadcast domains.

●​ With the help of Forwarding, data packets are transferred from one

place to another in the network.

Disadvantages of Network Layer Services

●​ There is a lack of flow control in the design of the network layer.

●​ Congestion occurs sometimes due to the presence of too many

datagrams in a network that is beyond the capacity of the network or

the routers. Due to this, some routers may drop some of the

datagrams, and some important pieces of information may be lost.

●​ Although indirect error control is present in the network layer, there is

a lack of proper error control mechanisms as due to the presence of

fragmented data packets, error control becomes difficult to implement.

Network Service Model

Network Service Models: Datagram and Virtual Circuit


1. Datagram Service Model:

●​ Definition: Datagram service model is a connectionless communication model where each


packet is treated independently.
●​ Characteristics:
●​ No pre-established path or connection setup is required.
●​ Each packet is routed independently based on its destination address.
●​ Packets may arrive out of order or be lost, requiring retransmission.
●​ Example protocols: UDP (User Datagram Protocol) in the Internet Protocol suite.

Advantages:

●​ Suitable for applications where real-time communication or low-latency is crucial.


●​ Minimal overhead due to lack of connection establishment.
●​ Offers more flexibility and scalability.

Disadvantages:

●​ Lack of reliability as there's no guarantee of packet delivery or order.


●​ Higher chance of congestion due to the lack of traffic control.
●​ Not suitable for applications requiring guaranteed delivery or sequencing.

2. Virtual Circuit Service Model:

●​ Definition: Virtual Circuit service model is a connection-oriented communication model


where a dedicated path or circuit is established before data transmission.
●​ Characteristics:
●​ Connection setup phase precedes data transmission.
●​ Once established, all packets follow the same predefined path.
●​ Packets arrive in order and are typically guaranteed delivery.
●​ Example protocols: TCP (Transmission Control Protocol) in the Internet Protocol
suite.

Advantages:

●​ Reliable communication with guaranteed packet delivery and sequencing.


●​ Efficient use of network resources due to predetermined routes.
●​ Lower probability of congestion as traffic can be controlled and managed.

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

application, such as reliability, latency, and scalability.

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.

Datagram or Virtual Circuit?

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.​

Figure 4.1-2: Virtual circuit service model

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.

An alternative terminology for VC service and datagram service is network-layer


connection-oriented service and network-layer connectionless service, respectively.
Indeed, the VC service is a sort of connection-oriented service, as it involves setting up and
tearing down a connection-like entity, and maintaining connection state information in the packet
switches. The datagram service is a sort of connectionless service in that it doesn't employ
connection-like entities. Both sets of terminology have advantages and disadvantages, and both
sets are commonly used in the networking literature. We decided to use in this book the "VC
service" and "datagram service" terminology for the network layer, and reserve the
"connection-oriented service" and "connectionless service" terminology for the transport layer.
We believe this decision will be useful in helping the reader delineate the services offered by the
two layers.

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.

2. IPv4 Datagram Format:


●​ Version (4 bits): Indicates the IP version (IPv4).
●​ IHL (Internet Header Length) (4 bits): Length of the header in 32-bit words.
●​ Type of Service (8 bits): Specifies QoS parameters (e.g., precedence, delay,
throughput, reliability).
●​ Total Length (16 bits): Length of the entire datagram (header + data).
●​ Identification (16 bits): Unique identifier for fragmented packets.
●​ Flags (3 bits): Control fragmentation.
●​ Fragment Offset (13 bits): Indicates the position of the fragment in the original
datagram.
●​ Time to Live (8 bits): Limits the lifespan of the datagram to prevent looping.
●​ Protocol (8 bits): Specifies the upper-layer protocol (e.g., TCP, UDP).
●​ Header Checksum (16 bits): Error-checking for the header.
●​ Source Address (32 bits): IPv4 address of the sender.
●​ Destination Address (32 bits): IPv4 address of the recipient.
●​ Options (variable): Additional information (e.g., security, routing).
●​ Data (Payload): Upper-layer protocol data.

3. IPv6 Datagram Format:


●​ Version (4 bits): Indicates the IP version (IPv6).
●​ Traffic Class (8 bits): Replaces IPv4's Type of Service, used for QoS.
●​ Flow Label (20 bits): Identifies packets belonging to the same flow for special
handling.
●​ Payload Length (16 bits): Length of the payload.
●​ Next Header (8 bits): Specifies the type of the next header (e.g., TCP, UDP).
●​ Hop Limit (8 bits): Limits the number of hops a packet can traverse.
●​ Source Address (128 bits): IPv6 address of the sender.
●​ Destination Address (128 bits): IPv6 address of the recipient.
●​ Extension Headers (variable): Optional headers for additional functionalities.
●​ Data (Payload): Upper-layer protocol data.

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.

4. DHCP (Dynamic Host Configuration Protocol):

●​ Definition: Protocol used to dynamically assign IP addresses and other network


configuration parameters to devices.
●​ Functionality:
●​ IP address allocation.
●​ Subnet mask assignment.
●​ Default gateway configuration.
●​ DNS server assignment.
●​ Operates using a client-server model:
●​ DHCP client requests configuration parameters from DHCP server.
●​ DHCP server dynamically assigns and manages IP addresses.

5. ICMP (Internet Control Message Protocol):

●​ Overview: Protocol used for error reporting, diagnostics, and management in IP


networks.
●​ Message Types:
●​ Echo Request/Reply: Ping utility for connectivity testing.
●​ Destination Unreachable: Indicates packet cannot be delivered.
●​ Time Exceeded: Indicates packet TTL exceeded.
●​ Redirect: Informs a host to use a different route.

6. SNMP (Simple Network Management Protocol):

●​ 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:

Q explain Routing Principles .


Q Explain different Routing Algorithms: RIP, OSPF, BGP in detail

Q Explain Hierarchical Routing; DHCP;


Q Explain ICMP in detail & its message types.
Q explain SNMP in detail

You might also like