Introduction

In the lower layers the emphasis has been on the way in which the physical medium is used to transport bits of information and a reliable method for setting up a data link between two points. This layer is responsible for communication between adjacent nodes in the network, and the routing of packets from source to destination. Routes could be based on static tables built into the network - fixed paths between any two nodes - or they could be determined at the start of each conversation. In fact, they may even be dynamic - being determined anew for each individual packet, thus optimise the current network load. When there are too many packets in the subnetwork (a physical network which may be only one in a series of such physical networks which links two or more end systems) congestion will occur - the control of this lies within the domain of the Network Layer.

 

Services Provided to the Transport layer

  • Network addresses are provided by the Network Layer and are used by transport entities to uniquely identify other transport entities
  • Network Service data unit transfer - On a network connection, the Network Layer provides for the transmission of Network Service data units (e.g. packets of data). These units have a distinct beginning and end.
  • Error notification - Unrecoverable errors detected by the Network Layer are reported to the Transport Layer
  • Flow control - A transport entity which is receiving at one end of a network connection can cause the Network Service to stop sending data units.

Some of the functions within the Network Layer

  • Routing and relaying - Network connections are provided by network entities in end systems but may involve intermediate systems providing relaying.
  • The error detection facilities are used to check that the quality of service provided over a network connection is maintained. Error detection in the Network Layer uses error notification from the Data Link Layer.
  • Service selection - This function allows service selection to be implemented to ensure that the service provided at each end of a network connection is the same when a network connection spans several subnetworks of dissimilar quality

 

Routing

Routing is the selection of paths for packets. This is usually performed by the network. The source can also identify the path, if ti has the necessary info.

Two types of transport are used by networks:-

  • For datagram transport the network selects the path for each packet individually.
  • For virtual circuit transport the network makes one path selection for all the packets of the same connection.

Routing Algorithm Characteristics:

  • Robustness - it should adapt the routing decisions to changing conditions (i.e . network traffic and topology).
  • Stability - a small change in conditions should result in a small change in routing decisions.
  • Fairness - different users should experience equitable delays and transmission rates.
  • Optimality - maximizing the network designers objective function while satisfying the design constraints.

The process of routing involves two key decisions:

  • Route Discovery -- Identifies the optimal path for a datagram.
  • Route Selection -- After the optimal path has been identified, route selection takes it.

Routing Algorithms

Congestion Control

When one part of the subnet (e.g. one or more routers in an area) becomes overloaded, congestion results. Because routers are receiving packets faster than they can forward them, one of two things must happen:

  • The subnet must prevent additional packets from entering the congested region until those already present can be processed.
  • The congested routers can discard queued packets to make room for those that are arriving.

We now consider the problem of congestion and some possible solutions:

The Internet Protocol IP

The Internet Protocol (IP) is the Network Layer protocol used in the Internet suite of protocols.

IP provides:

  • Datagram Delivery without reliability checking
  • Addressing through a fixed length IP address
  • No method of flow control
  • No ordering of packets
  • Connectionless service
  • Fragmentation and reassembly of long packets

IP Addressing

An IP address is a 32 bit number which identifies uniquely every host connected to an internetwork.

It is usually represented in dotted decimal notation like this...

146.34.47.24

Each field between the periods is an 8-bit number (called an octet in the Internet world), and can have values from 0 to 255. The numbers 0, 127, and 255, however, have special meanings when they appear.

  • Zeros are used when an address is unknown, as when a machine is requesting that a server assign to it an IP address.
  • The value 127 is used when a machine is referring to its own address, called loopback.
  • The value 255 is used when a packet is be broadcast to every host on a local network.

Hosts use these addresses to send each IP packet along to its final destination. The process of deciding where a particular packet should go next is known as routing.

There are several classes of IP addresses as defined by the IETF.

  • Class A - very large networks
  • Class B - large networks.
  • Class C - small networks.
  • Class D - multicast.
  • Class E - reserved future use.

Depending on the network class, the IP address is divided into two parts. Part of the address is called the network address, and the remaining part is the host address.

Class A

This class is for very large networks. The first octet of the form 0xxxxxxx, which means it can range from 1 to 126. Networks of this type use the only the first octet as the network address. That means there can only be 126 class A networks. The remaining portion, 3 more octets or 24 bits, is used as the host address. This allows 16,194,277 computers on a class A network.

Class B

Class B networks are large networks. It is common for universities to have Class B addresses assigned to them. The first octet has the form 10xxxxxx, which gives a range from 128 to 191. The network address is defined to be the first two octets, which allows 16,382 class B networks. The last two octets are used for the host address, allowing 64,009 hosts. (remember that 0, 127, and 255 cannot be used)

Class C

is a small network, with the first octect of the form 110xxxxx, or 192 to 223. The network address consists of the first three octets, allowing 1,984,279 different class C networks with only 253 hosts per network.

Other Classes

The IP specification states that addresses whose first octect have the form 111xxxxx are 'extended' addresses, reserved for future use. Some of these have since been allocated for other uses, i.e. multicast.

 

 

Preallocation of Resources

Preallocation schemes aim to prevent congestion from happening in the first place. For example, we can require that resources be preallocated before any packets can be sent, guaranteeing that resources will be available to process each packet.

In virtual circuit networks, for example, the sender opens a connection before sending data. The circuit setup operation selects a path through the subnet, and each router on the path dedicates buffer space and bandwidth to the new circuit.

What happens when a user attempts to open a virtual circuit and the subnet is congested? The subnet can refuse to open the connection, forcing the user to wait until sufficient resources become available.

 

Traffic Shaping

Control the rate at which packets are sent (not just how many). Widely used in ATM networks.

At set up, the sender and carrier negotiate a traffic pattern (shape).

Leaky Bucket Algorithm used to control rate in a datagram network. A single-server queue with constant service time. If bucket (buffer) overflows then packets are discarded.

Enforces a constant output rate regardless of burstiness of input. Does nothing when input is idle. In contrast the Token Bucket Algorithm causes a token to be generated periodically, which during idle periods can be saved up.

Related to traffic shaping is flow specification, where a particular quality of service is agreed upon between sender, receiver and carrier.

Discarding Packets(No Preallocation)

At the other end of the spectrum, we could preallocate no resources in advance, and take our chances that resources will be available when we need them. When insufficient resources are present to process existing packets, discard queued packets to make room for newly arriving ones. Who retransmits the discarded packets? Two cases: connection oriented and connectionless. In datagram (connectionless) networks, the sending host (transport layer) retransmits discarded packets (if appropriate). In virtual circuit networks, the previous-hop router retransmits the packet when it fails to receive an acknowledgment.

Failure to preallocate resources leads to two problems: potential deadlock and unfairness. First, let us consider deadlock. Suppose that all of an router's buffers hold packets. Because the router has no free buffers, it cannot accept additional frames. Unfortunately, it also ignores frames containing ACKs that would free up some of those buffers! Suppose further, that two adjacent routers, A and B, are sending packets to each other. Since both are waiting for the other to accept a packet, neither can proceed. This condition is known as a deadlock. Solution: Reserve at least one buffer for each input line and use it to hold incoming packets. Note that we can extract the ACK field and still discard the packet, if we don't have buffers to hold it.

Advantage of discarding packets when congested:

  • Easy to implement.

Disadvantages:

  • Wastes resources. The network may have expended considerable resources processing a packet that is eventually discarded.
  • Non-deterministic. There is less guarantee than with virtual circuits that packets will ever reach their destination.
  • Requires that sending hosts pay attention to congestion. If the network can't prevent a host from sending data, a host can overload the network. In particular, a ``broken'' host may cause the network to become overly congested.
  • In the extreme case, congestion collapse occurs. The network becomes so overloaded, that few packets reach their destination. Meanwhile, the sending hosts continue to generate more data (both retransmissions and new packets).

Flow Control

Flow control is aimed at preventing a fast sender from overwhelming a slow receiver. Flow control can be helpful at reducing congestion, but it can't really solve the congestion problem. For example, suppose we connect a fast sender and fast receiver.

  1. If the two machines use a sliding window protocol, and the window is large, the link will become congested in a hurry.
  2. If the window size is small (e.g., 2 packets), the link won't become congested. Note how the window size limits the total number of packets that can be in transmission at one time.

Flow control can take place at many levels:

  1. User process to user process (end-to-end). Later, we'll see how TCP uses flow control at the end-to-end level.
  2. Host to host. For example, if multiple application connections share a single virtual circuit between two hosts.
  3. Router to router. For example, in virtual circuits.

Choke Packets

Routers can monitor the level of congestion around them, and when congestion is present, they can send choke packets to the sender that say ``slow down''. How can an router measure congestion? An router might estimate the level of congestion by measuring the percentage of buffers in use, line utilization, or average queue lengths.

Advantage:

  • Dynamic.i.e. Host sends as much data as it wants, the network informs it when it is sending too much.

Disadvantages:

  • Difficult to tune. By how much should a host slow down? The answer depends on how much traffic the host is sending, how much of the congestion it is responsible for, and the total capacity of the congested region. Such information is not readily available in practice.
  • After receiving a choke packet, the sending host should ignore additional choke packets for a short while because packets currently in transmission may generate additional choke packets. How long? Depends on such dynamic network conditions as delay.

Jitter Control

In synchronous traffic such as video and audio, having a little longer delay is acceptable. But the delay has to be in a constant range. That is, the quality of service degrades rapidly if delay varies. The task of jitter control is to make sure synchronous traffic get through the network smoothly. One mechanism of doing this is to compute the expected transit time for each hop along the path. This information is carried in packets. If at a hop the packet is behind the schedule, the router can increase the priority and send it faster; if a packet is ahead of schedule, decrease the priority and send it later. Both reduce jitters.

RSVP - Resource reSerVation Protocol

The basic idea of RSVP is the following.

  • The sender and the receivers establish an initial path, along which multiple routers may be involved.
  • Each receiver then sends a reservation request to the sender in reverse direction. The request is processed by each of the routers on the way.
  • If sufficient bandwidth is available, the request is granted and forwarded to next router on its way to the sender; otherwise, the request is rejected.
  • When the sender receives the reservation from a receiver, it knows that the reservation has been made properly.
  • When a different receiver makes a request to the same sender asking for the same multicast information, the channel can be shared.
  • When all parties involved have set up the paths, multicast can take place.