Function of Network Layer

Forwarding

It just moves packets from a single router's input to the appropriate router's output port. It’s a lower-level function

Forwarding is the process of moving packets from an incoming interface to the appropriate outgoing interface based on the forwarding table.

Routing

determine route taken by packets from source to destination.

Routing is the process of determining the path that data packets will take from the source to the destination across multiple networks. It involves making decisions about the best route for data to travel through a network of interconnected routers. It uses routing table to get the various network destinations.

Key Differences:

Aspect Routing Forwarding
Definition Determining the best path for data across networks Sending packets from one network interface to another
Scope Network-wide, across multiple routers Local, within a single router or switch
Function Path selection based on routing protocols and metrics Directing packets to the correct output port
Examples Routing protocols like OSPF, BGP Forwarding tables in routers and switches
Operation Level Higher level, involves network topology and policy Lower level, involves packet movement

Connection and Connection-less service

In networking, datagram networks and virtual circuit (VC) networks are two fundamental approaches to how data is transmitted across a network. Here’s a comparison of the two:

1. Datagram Network

Datagram networks use a connectionless method for data transmission. Each packet, or datagram, is treated independently and can take different paths to reach the destination.

Characteristics:

Example: