Presentation is loading. Please wait.

Presentation is loading. Please wait.

UNIT-IV Computer Network Network Layer. Network Layer Prepared by - ROHIT KOSHTA In the seven-layer OSI model of computer networking, the network layer.

Similar presentations


Presentation on theme: "UNIT-IV Computer Network Network Layer. Network Layer Prepared by - ROHIT KOSHTA In the seven-layer OSI model of computer networking, the network layer."— Presentation transcript:

1 UNIT-IV Computer Network Network Layer

2 Network Layer Prepared by - ROHIT KOSHTA In the seven-layer OSI model of computer networking, the network layer is layer 3. The network layer is responsible for packet forwarding including routing through intermediate routers, whereas the data link layer is responsible for media access control, flow control and error checking. Functions of the network layer include:  Connection model: connectionless communication  Host addressing  Message forwarding

3 Routing Prepared by - ROHIT KOSHTA Routing is the process of forwarding of a packet in a network so that it reaches its intended destination. The main goals of routing are:  Correctness  Simplicity  Robustness  Stability  Fairness  Optimality

4 Routing algorithms Prepared by - ROHIT KOSHTA Dijkstra's algorithm Bellman-ford algorithm Broadcast Routing Multicast Routing, Hierarchical routing

5 Dijkstra's algorithm Prepared by - ROHIT KOSHTA Dijkstra's algorithm is an algorithm for finding the shortest paths between nodes in a graph, which may represent, for example, road networks. For a given source node in the graph, the algorithm finds the shortest path between that node and every other. The shortest path algorithm is widely used in network routing protocols

6 Bellman-ford algorithm Prepared by - ROHIT KOSHTA The Bellman–Ford algorithm is an algorithm that computes shortest paths from a single source vertex to all of the other vertices in a weighted digraph. The algorithm is usually named after two of its developers, Richard Bellman and Lester Ford, Jr., who published it in 1958 and 1956, respectively. Bellman-Ford algorithm is a procedure used to find all shortest path in a graph from one source to all other nodes. The algorithm requires that the graph does not contain any cycles of negative length, but if it does, the algorithm is able to detect it.

7 Congestion Control Prepared by - ROHIT KOSHTA Bellman-ford algorithm

8 Broadcast Routing Prepared by - ROHIT KOSHTA By default, the broadcast packets are not routed and forwarded by the routers on any network. Routers create broadcast domains. But it can be configured to forward broadcasts in some special cases. A broadcast message is destined to all network devices. Broadcast routing can be done in two ways (algorithm):  A router creates a data packet and then sends it to each host one by one. In this case, the router creates multiple copies of single data packet with different destination addresses. All packets are sent as unicast but because they are sent to all, it simulates as if router is broadcasting. This method consumes lots of bandwidth and router must destination address of each node.  Secondly, when router receives a packet that is to be broadcasted, it simply floods those packets out of all interfaces. All routers are configured in the same way.

9 Broadcast Routing (contd) Prepared by - ROHIT KOSHTA This method is easy on router's CPU but may cause the problem of duplicate packets received from peer routers. Reverse path forwarding is a technique, in which router knows in advance about its predecessor from where it should receive broadcast. This technique is used to detect and discard duplicates.

10 Broadcast Routing (contd) Prepared by - ROHIT KOSHTA

11 Multicast Routing Prepared by - ROHIT KOSHTA Multicast routing is special case of broadcast routing with significance difference and challenges. In broadcast routing, packets are sent to all nodes even if they do not want it. But in Multicast routing, the data is sent to only nodes which wants to receive the packets. The router must know that there are nodes, which wish to receive multicast packets (or stream) then only it should forward. Multicast routing works spanning tree protocol to avoid looping. Multicast routing also uses reverse path Forwarding technique, to detect and discard duplicates and loops.

12 Multicast Routing (contd) Prepared by - ROHIT KOSHTA

13 Congestion Prepared by - ROHIT KOSHTA When too many packets are present in a part of a subnet, the performance degrades. This situation is called as congestion. Congestion in a network may occur when the load on the network i.e. the number of packets sent to the network is greater than the capacity of the network (i.e. the number of packets a network can handle). As the traffic increases further, the performance degrades more and more packets are lost and congestion worsens.

14 Causes of congestion Prepared by - ROHIT KOSHTA Too many inputs on the same channel Slow links / less bandwidth Slow processors

15 Principles of Congestion Control Prepared by - ROHIT KOSHTA The solutions to congestion problems can be divided into two categories or groups:  Open loop solutions  Closed loop solutions Open loop congestion control is based on the prevention of congestion Closed loop solutions are for removing the congestion.

16 Prevention Policies Prepared by - ROHIT KOSHTA Policies  Data link layer policies  Retransmission  Acknowledgement  Flow control  Out of order caching  Network layer policies  Virtual circuit  Packet queuing  Packet discard  Routing Algorithm  Packet lifetime management  Transport layer policies  Retransmission  Out of order caching  Acknowledgement  Flow control  Time out determination

17 Virtual Circuit Prepared by - ROHIT KOSHTA The virtual circuit is one which gets established when the data is to be transferred. It routes the data to the nearest destination network. The gateway notes down the existence of this virtual circuit in its table and builds another virtual circuit to a router which is in the next subnet. This process continues untill the destination host has been reached.

18 Datagram Prepared by - ROHIT KOSHTA Packets in IP layer are called datagrams. A datagram in a variable length packet with two parts namely the header and data. The header is 20 to 60 bytes in length. It contains the information essential for routing and delivery. The other part of the datagram is the data field which is of variable length.

19 IP Protocol Prepared by - ROHIT KOSHTA IP is a connectionless datagram protocol with no guarantee of reliability. It is an unreliable protocol because it does not provide any error control or flow control. It can only detect error and discards the packet if it is corrupted. It can be made more reliable on integrating with another protocol named TCP.

20 IP Addresses Prepared by - ROHIT KOSHTA IP addresses are 32 bit long and they are used in the source address and destination address fields of the IP header. The IP addresses for the hosts are assigned by the network administrator. IP address consists of two parts:  Network ID  Host ID

21 Comparative study of IPv4 & IPv6 Prepared by - ROHIT KOSHTA IPv4IPv6 1. 2 32 possible addresses1. 2 128 possible addresses 2. IPv4 is written by dotted decimal notation e.g. 121.2.8.12 2. IPv6 is hexadecimal and consists of 8 groups, containing 4 hexadecimal digits e.g. AC77:7834:2222:FACB 3. Basic header length is 20 bytes3. Basic header length is 40 bytes 4. Source and destination addresses are 32 bits in length. 4. Source and destination addresses are 128 bits in length. 5. IPsec support is optional.5. IPsec support is required. 6. Address Resolution Protocol is used. 6. Neighbour Solicitation Messages are used. 7. Must be configured either manually or through DHCP. 7. Does not require manual configuraion or DHCP.

22 Mobile IP Prepared by - ROHIT KOSHTA Mobile IP is the underlying technology for support of various mobile data applications and the networking applications. Mobile IP (or MIP ) is an Internet Engineering Task Force (IETF) standard communications protocol that is designed to allow mobile device users to move from one network to another while maintaining a permanent IP address. The Mobile IP protocol allows for location-independent routing of IP datagrams on the Internet. Each mobile node is identified by its home address disregarding its current location in the Internet. While away from its home network, a mobile node is associated with a care-of address which identifies its current location and its home address is associated with the local endpoint of a tunnel to its home agent.care-of address


Download ppt "UNIT-IV Computer Network Network Layer. Network Layer Prepared by - ROHIT KOSHTA In the seven-layer OSI model of computer networking, the network layer."

Similar presentations


Ads by Google