Professional Documents
Culture Documents
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
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
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
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
12
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.
18