You are on page 1of 18

Computer Networks Chapter 5

Network layer
The network layer is concerned with getting packets from the source all the way to the destination. Getting to the destination may require making many hops at intermediate routers along the way. To achieve its goals, the network layer must know about the topology of the communication subnet like Internet, ATM. Router work on network layer
2

Network Layer Design Issues


The network layer provides services to the transport layer at the network layer/transport layer interface. The following goal is made in the: 1. The services should be independent of the router technology. 2. The transport layer should be shielded from the number, type, and topology of the routers present. 3. The network addresses made available to the transport layer should use a uniform numbering plan, even across LANs and WANs.
3

Routing Algorithms
The main function of the network layer is routing packets from the source machine to the destination machine. 1. Shortest Path Routing: That is widely used in many forms because it is simple and easy. To choose a route between a given pair of router. 2. Flooding: in which every incoming packet is sent out on every outgoing line except the one it arrived on. 3. Flow based routing: For this, certain information must be known in advance first the subnet topology must be known second the traffic.
4

4. Distance Vector Routing: Distance vector routing algorithms operate by having each router maintain a table (i.e., a vector) giving the best known distance to each destination and which line to use to get there. These tables are updated by exchanging information with the neighbors. 5. Link State Routing: Each router must do the following: Discover its neighbors and learn their network addresses. Measure the delay or cost to each of its neighbors Construct & send this packet to all other routers. Choose the shortest path to every other router. 5

6. Hierarchical Routing: The hierarchical routing is used, the routers are divided into what we will call regions, with each router knowing all the details about how to route packets.
7. Routing for Mobile Hosts: These mobile hosts introduce a new complication: to route a packet to a mobile host, the network first has to find it.

8. Broadcast Routing: Sending a packet to all destinations simultaneously is called broadcasting; various methods have been proposed for doing it.
6

Internetworking
Internetworking is a scheme for interconnecting multiple networks of dissimilar technologies Uses both hardware and software
Extra hardware positioned between networks Software on each attached computer

System of interconnected networks is called an internetwork or an internet

Internet Protocol (IP)


The Internet Protocol (IP) is the principal communications protocol used for relaying datagram (packets) across an internetwork using the Internet Protocol Suite. Responsible for routing packets across network boundaries, it is the primary protocol that establishes the Internet.

IP Addresses
Every host and router on the Internet has an IP address, which encodes its network number and host number. All IP addresses are 32 bits long and are used in the Source address and Destination address fields of IP packets. IP addresses were divided into the five categories It range 8 is between 0-255

Class

Range

Default Subnet Mask

A 0-127 255.0.0.0 B 128-191 255.255.0.0 C 192-223 255.255.255.0 D 224-239 Multicast E 240-255 Research Class A, Class B, Class C are unicast Class D is multicast Unicast: One source to one destination Multicast: One source to a group of destination
10

Q1. Given the address 23.56.7.91. Find Class, Network address, Network id and host id. Answer: Class A, Network address: 23.0.0.0, Network id: 23 and Host id: 56.7.91 Q2. Given the address 132.6.17.85 Find Class, Network address, Network id and host id. Answer: Class B, Network address: 132.6.0.0, Network id: 132.6 and Host id: 17.85 Q3. Given the address 192.4.8.2. Find Class, Network address, Network id and host id. Answer: Class C, Network address: 192.4.8.0, Network id: 192.4.8 and Host id: 2 Q4. Given Network address 17.0.0.0. Find Class Answer: Class A Q5. Identifying the class of IP address 229.1.2.3 Answer: Class D 11

Internet Control Protocols


The Internet has several control protocols used in the network layer, including ICMP ARP RARP DHCP

12

Internet Control Message Protocol (ICMP)


is one of the core protocols of the Internet Protocol suite. It is chiefly used by the operating systems of networked computers to send error messages indicating, for example, that a requested service is not available or that a host or router could not be reached. ICMP differs from transport protocols such as TCP and UDP in that it is not typically used to exchange data between system , nor is it regularly employed by end-user network applications (with the exception of some diagnostic tools like ping ).

Address Resolution Protocol (ARP)


Internet uses IP address to recognize a computer.
But IP address needs to be translated to physical address (NIC). ARP does this job. It takes IP address and gives corresponding physical address.

Reverse Address Resolution Protocol (RARP)


is an obsolete computer networking protocol used by a host computer to request its Internet Protocol (IPv4) address from an administrative host, when it has available its Link Layer or hardware address, such as \a MAC address.

Dynamic Host Configuration Protocol (DHCP) is an auto configuration protocol used on IP networks. Computers that are connected to IP networks must be configured before they can communicate with other computers on the network. DHCP allows a computer to be configured automatically, eliminating the need for intervention by a network administrator. It also provides a central database for keeping track of computers that have been connected to the network. This prevents two computers from accidentally being configured with the same IP address. In the absence of DHCP, hosts may be manually configured with an IP address. Alternatively IPv6 hosts may use stateless address auto configuration to generate an IP address. IPv4 hosts may use link-local addressing to achieve limited local connectivity.

Dynamic Host Configuration Protocol (DHCP)

The Interior Gateway Routing Protocol: OSPF(Open Shortest Path First)


The Internet is made up of a large number of autonomous systems. Each AS is operated by a different organization and can use its own routing algorithm inside. A routing algorithm within an AS is called an interior gateway protocol. OSPF supports three kinds of connections and networks: 1. Point-to-point lines between exactly two routers. 2. Multiaccess networks with broadcasting (e.g., most LANs). 3. Multiaccess networks without broadcasting (e.g., most packet-switched WANs).
17

The Exterior Gateway Routing Protocol: BGP(Border Gateway Protocol)


An algorithm for routing between autonomous systems is called an exterior gateway protocol. The Border Gateway Protocol (BGP) is the protocol backing the core routing decisions on the Internet. It maintains a table of IP networks or 'prefixes' which designate network reach ability among autonomous system(AS). It is described as a path vector protocol.

18

You might also like