written 7.8 years ago by | • modified 2.8 years ago |
Mumbai University > Information Technology > Sem4 > CN
Marks: 10M
Year: May 2016
written 7.8 years ago by | • modified 2.8 years ago |
Mumbai University > Information Technology > Sem4 > CN
Marks: 10M
Year: May 2016
written 7.8 years ago by |
Functions of Network Layer:
Internetworking: This is the main duty of network layer. It provides the logical connection between different types of networks.
Addressing: Addressing is necessary to identify each device on the internet uniquely. This is similar to telephone system. The address used in the network layer should uniquely and universally define the connection of a computer.
Routing: In a network, there are multiple roots available from a source to a destination and one of them is to be chosen. The network layer decides the root to be taken. This is called as routing and it depends on various criterions.
Packetizing: The network layer encapsulates the packets received from upper layer protocol and makes new packets. This is called as packetizing. It is done by a network layer protocol called IP (Internetworking Protocol).
Routing:
Routing is a major component of the network layer and is concerned with the problem of determining feasible paths (or routes) for packets to follow from each source to each destination. The best path is the one that gives minimum end-to-end delay and with the greatest available bandwidth.
Distance Vector Routing:
Computer networks generally use dynamic routing algorithms that are more complex than flooding, but more efficient because they find shortest paths for the current topology. Two dynamic algorithms in particular, distance vector routing and link state routing, are the most popular.
i. A distance vector routing algorithm operates by having each router maintain a table (i.e., a vector) giving the best known distance to each destination and which link to use to get there. These tables are updated by exchanging information with the neighbors. Eventually, every router knows the best link to reach each destination.
ii. The distance vector routing algorithm is sometimes commonly known as distributed Bellman-Ford routing algorithm.
iii. In distance vector routing, each router maintains a routing table indexed by, and containing one entry for each router in the network. This entry has two parts: the preferred outgoing line to use for that destination and an estimate of the distance to that destination.
iv. The distance might be measured as the number of hops or using another metric.
v. The router is assumed to know the ‘‘distance’’ to each of its neighbors. If the metric is hops, the distance is just one hop. If the metric is propagation delay, the router can measure it directly with special ECHO packets that the receiver just timestamps and sends back as fast as it can.
As an example, assume that delay is used as a metric and that the router knows the delay to each of its neighbors. Once every T msec, each router sends to each neighbor a list of its estimated delays to each destination. It also receives a similar list from each neighbor. Imagine that one of these tables has just come in from neighbor X, with Xi being X’s estimate of how long it takes to get to router i. If the router knows that the delay to X is m msec, it also knows that it can reach router i via X in Xi + m msec. By performing this calculation for each neighbor, a router can find out which estimate seems the best and use that estimate and the corresponding link in its new routing table.
This updating process is illustrated in Fig. Part (a) shows a network. The first four columns of part (b) show the delay vectors received from the neighbors of router J. A claims to have a 12-msec delay to B, a 25-msec delay to C, a 40- msec delay to D, etc. Suppose that J has measured or estimated its delay to its neighbors, A, I, H, and K, as 8, 10, 12, and 6 msec, respectively.
Consider how J computes its new route to router G. It knows that it can get to A in 8 msec, and furthermore A claims to be able to get to G in 18 msec, so J knows it can count on a delay of 26 msec to G if it forwards packets bound for G to A. Similarly, it computes the delay to G via I, H, and K as 41 (31 + 10), 18 (6 + 12), and 37 (31 + 6) msec, respectively. The best of these values is 18, so it makes an entry in its routing table that the delay to G is 18 msec and that the route to use is via H. The same calculation is performed for all the other destinations, with the new routing table shown in the last column of the figure.
Examples of distance vector protocols include RIP - Routing Information Protocol and IGRP - Interior Gateway Routing Protocol.