unit-iv computer network network layer. network layer prepared by - rohit koshta in the seven-layer...

22
UNIT-IV Computer Network Network Layer

Upload: asher-bradley

Post on 17-Dec-2015

235 views

Category:

Documents


2 download

TRANSCRIPT

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

UNIT- IV

Computer NetworkNetwork Layer

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

Prepared by - ROHIT KOSHTA

Network Layer

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

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

Prepared by - ROHIT KOSHTA

Routing

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

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

Prepared by - ROHIT KOSHTA

Routing algorithms

Dijkstra's algorithmBellman-ford algorithmBroadcast RoutingMulticast Routing,Hierarchical routing

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

Prepared by - ROHIT KOSHTA

Dijkstra's algorithm

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

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

Prepared by - ROHIT KOSHTA

Bellman-ford algorithm

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.

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

Prepared by - ROHIT KOSHTA

Congestion Control

Bellm

an

-ford

a

lgori

thm

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

Prepared by - ROHIT KOSHTA

Broadcast Routing

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.

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

Prepared by - ROHIT KOSHTA

Broadcast Routing (contd)

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.

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

Prepared by - ROHIT KOSHTA

Broadcast Routing (contd)

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

Prepared by - ROHIT KOSHTA

Multicast Routing

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.

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

Prepared by - ROHIT KOSHTA

Multicast Routing (contd)

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

Prepared by - ROHIT KOSHTA

Congestion

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.

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

Prepared by - ROHIT KOSHTA

Causes of congestion

Too many inputs on the same channelSlow links / less bandwidthSlow processors

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

Prepared by - ROHIT KOSHTA

Principles of Congestion Control

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.

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

Prepared by - ROHIT KOSHTA

Prevention Policies

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

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

Prepared by - ROHIT KOSHTA

Virtual Circuit

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.

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

Prepared by - ROHIT KOSHTA

Datagram

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.

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

Prepared by - ROHIT KOSHTA

IP Protocol

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.

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

Prepared by - ROHIT KOSHTA

IP Addresses

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

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

Prepared by - ROHIT KOSHTA

Comparative study of IPv4 & IPv6

IPv4 IPv6

1. 232 possible addresses 1. 2128 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 bytes 3. 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.

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

Prepared by - ROHIT KOSHTA

Mobile IP

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.