![]() ![]() |
|
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
Some of the functions within the Network Layer
|
|
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:-
Routing Algorithm Characteristics:
The process of routing involves two key decisions:
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:
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:
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...
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.
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.
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 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. |
|
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:
Disadvantages:
|
|
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.
Flow control can take place at many levels:
|
|
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:
Disadvantages:
|
|
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. |
|
|