Network Layer
Introduction
Forwarding and Routing
An important aspect in the network layer is the difference between forwarding and routing.
- Forwarding: The router that receives a packet on its input link must move it to the appropriate output link. Thus forwarding refers to the router-local action of moving a packet from an input interface to the correct output link. A router uses a forwarding table to solve this task. From each packet a value in its header is examined and used to index, in the forwarding table, the outgoing interface.
- Routing: The network layer must determine the route that a packet should take as it flows from the sender to the receiver. So routing refers to the network-wide process that determine the end-to-end path of a packet. The routing algorithm, in turns, populate the forwarding-table.
Another important distinction must be made regarding packet switch. In general a packet switch transfers a packet from its input link to its output links. There are two types of packet switch
- Link layer switch: they forward packets using information stored in field of the link-layer frame (level 2)
- Router: they base their forwarding decision on values in the network-layer field (level 3)
Network services
Among the numerous services the network layer could provide, todays internet offer a single service known as best-effort service. Other networks provide different services, for example the ATM is capable of providing constant bit rate and available bit rate