Network Layer - CPE 3A5 - University of San Jose - Recoletos PDF
Document Details
University of San Jose-Recoletos
Tags
Summary
This document is lecture notes for a computer networks course, covering the network layer. It includes learning objectives, explanations of key concepts, and examples. The document is from the University of San Jose - Recoletos.
Full Transcript
PRELIMS NETWORK LAYER CPE 3A5-COMPUTER NETWORKS AND SECURITY SCHEDULE: TTH 12:00NN-1:30PM ROOM: SA 204 Learning Outcomes: By the end of this session, you should be able to: 1. Explain the role and functions of the Network Layer in the OSI Model. 2. Understand the key components and protocols a...
PRELIMS NETWORK LAYER CPE 3A5-COMPUTER NETWORKS AND SECURITY SCHEDULE: TTH 12:00NN-1:30PM ROOM: SA 204 Learning Outcomes: By the end of this session, you should be able to: 1. Explain the role and functions of the Network Layer in the OSI Model. 2. Understand the key components and protocols associated with the Network Layer. 3. Discuss the concept of routing and how it operates at the Network Layer. 4. Identify common Network Layer issues and troubleshooting techniques. University of San Jose – Recoletos University of San Jose – Recoletos Corner P. Lopez & Magallanes Streets, Cebu City 6000, Philippines Corner P. Lopez & Magallanes Streets, Cebu City 6000 Suppose Bob and Alice are connected to the same local area network (LAN), and Bob wants to send Alice a message. Because Bob is on the same network as Alice, he could send it directly to her computer across the network. However, if Alice is instead on a different LAN several miles away, Bob's message will have to be addressed and sent to Alice's network before it can reach her computer, which is a network layer process. University of San Jose – Recoletos University of San Jose – Recoletos Corner P. Lopez & Magallanes Streets, Cebu City 6000, Philippines Corner P. Lopez & Magallanes Streets, Cebu City 6000 THE NETWORK LAYER Network-to-network connections are what make the Internet possible. The "network layer" is the part of the Internet communications process where these connections occur, by sending packets of data back and forth between different networks. University of San Jose – Recoletos University of San Jose – Recoletos Corner P. Lopez & Magallanes Streets, Cebu City 6000, Philippines Corner P. Lopez & Magallanes Streets, Cebu City 6000 Network Layer The Network Layer is the third layer of the OSI model. It handles the service requests from the transport layer and further forwards the service request to the data link layer. The network layer translates the logical addresses into physical addresses It determines the route from the source to the destination and also manages the traffic problems such as switching, routing and controls the congestion of data packets. The main role of the network layer is to move the packets from sending host to the receiving host. University of San Jose – Recoletos University of San Jose – Recoletos Corner P. Lopez & Magallanes Streets, Cebu City 6000, Philippines Corner P. Lopez & Magallanes Streets, Cebu City 6000 The main functions performed by the network layer are: Routing: When a packet reaches the router's input link, the router will move the packets to the router's output link. Logical Addressing: The data link layer implements the physical addressing and network layer implements the logical addressing. Logical addressing is also used to distinguish between source and destination system. The network layer adds a header to the packet which includes the logical addresses of both the sender and the receiver. Internetworking: This is the main role of the network layer that it provides the logical connection between different types of networks. Fragmentation: The fragmentation is a process of breaking the packets into the smallest individual data units that travel through different networks. University of San Jose – Recoletos University of San Jose – Recoletos Corner P. Lopez & Magallanes Streets, Cebu City 6000, Philippines Corner P. Lopez & Magallanes Streets, Cebu City 6000 Forwarding & Routing In Network layer, a router is used to forward the packets. Every router has a forwarding table. A router forwards a packet by examining a packet's header field and then using the header field value to index into the forwarding table. The value stored in the forwarding table corresponding to the header field value indicates the router's outgoing interface link to which the packet is to be forwarded. University of San Jose – Recoletos University of San Jose – Recoletos Corner P. Lopez & Magallanes Streets, Cebu City 6000, Philippines Corner P. Lopez & Magallanes Streets, Cebu City 6000 Network Addressing Network Addressing is one of the major responsibilities of the network layer. Network addresses are always logical, i.e., software-based addresses. A host is also known as end system that has one link to the network. The boundary between the host and link is known as an interface. Therefore, the host can have only one interface. Each IP address is 32 bits long, and they are represented in the form of "dot-decimal notation" where each byte is written in the decimal form, and they are separated by the period. An IP address would look like 193.32.216.9 where 193 represents the decimal notation of first 8 bits of an address, 32 represents the decimal notation of second 8 bits of an address. University of San Jose – Recoletos University of San Jose – Recoletos Corner P. Lopez & Magallanes Streets, Cebu City 6000, Philippines Corner P. Lopez & Magallanes Streets, Cebu City 6000 Network Addressing An ip address is divided into two parts: Network ID: It represents the number of networks. Host ID: It represents the number of hosts. University of San Jose – Recoletos University of San Jose – Recoletos Corner P. Lopez & Magallanes Streets, Cebu City 6000, Philippines Corner P. Lopez & Magallanes Streets, Cebu City 6000 Network Addressing University of San Jose – Recoletos University of San Jose – Recoletos Corner P. Lopez & Magallanes Streets, Cebu City 6000, Philippines Corner P. Lopez & Magallanes Streets, Cebu City 6000 Classful Network Architecture University of San Jose – Recoletos University of San Jose – Recoletos Corner P. Lopez & Magallanes Streets, Cebu City 6000, Philippines Corner P. Lopez & Magallanes Streets, Cebu City 6000 Routing A router is a networking device that forwards the packet based on the information available in the packet header and forwarding table. The routing protocols use the metric to determine the best path for the packet delivery. The metric is the standard of measurement such as hop count, bandwidth, delay, current load on the path, etc. used by the routing algorithm to determine the optimal path to the destination. The routing algorithm initializes and maintains the routing table for the process of path determination. University of San Jose – Recoletos University of San Jose – Recoletos Corner P. Lopez & Magallanes Streets, Cebu City 6000, Philippines Corner P. Lopez & Magallanes Streets, Cebu City 6000 Metrics are the network variables used to determine the best route to the destination. Hop count: Hop count is defined as a metric that specifies the number of passes through internetworking devices such as a router, a packet must travel in a route to move from source to the destination Delay: It is a time taken by the router to process, queue and transmit a datagram to an interface. The path having the lowest delay value will be considered as the best path. University of San Jose – Recoletos University of San Jose – Recoletos Corner P. Lopez & Magallanes Streets, Cebu City 6000, Philippines Corner P. Lopez & Magallanes Streets, Cebu City 6000 Metrics Bandwidth: The capacity of the link is known as a bandwidth of the link. The bandwidth is measured in terms of bits per second. The link that has a higher transfer rate like gigabit is preferred over the link that has the lower capacity like 56 kb. Load: Load refers to the degree to which the network resource such as a router or network link is busy. A Load can be calculated in a variety of ways such as CPU utilization, packets processed per second. If the traffic increases, then the load value will also be increased. University of San Jose – Recoletos University of San Jose – Recoletos Corner P. Lopez & Magallanes Streets, Cebu City 6000, Philippines Corner P. Lopez & Magallanes Streets, Cebu City 6000 Metrics Reliability: Reliability is a metric factor may be composed of a fixed value. It depends on the network links, and its value is measured dynamically. Some networks go down more often than others. After network failure, some network links repaired more easily than other network links. University of San Jose – Recoletos University of San Jose – Recoletos Corner P. Lopez & Magallanes Streets, Cebu City 6000, Philippines Corner P. Lopez & Magallanes Streets, Cebu City 6000 University of San Jose – Recoletos University of San Jose – Recoletos Corner P. Lopez & Magallanes Streets, Cebu City 6000, Philippines Corner P. Lopez & Magallanes Streets, Cebu City 6000 Static Routing Static Routing is also known as Nonadaptive Routing. It is a technique in which the administrator manually adds the routes in a routing table. A Router can send the packets for the destination along the route defined by the administrator. In this technique, routing decisions are not made based on the condition or topology of the networks University of San Jose – Recoletos University of San Jose – Recoletos Corner P. Lopez & Magallanes Streets, Cebu City 6000, Philippines Corner P. Lopez & Magallanes Streets, Cebu City 6000 Static Routing Advantages Of Static Routing Following are the advantages of Static Routing: No Overhead: It has ho overhead on the CPU usage of the router. Therefore, the cheaper router can be used to obtain static routing. Bandwidth: It has not bandwidth usage between the routers. Security: It provides security as the system administrator is allowed only to have control over the routing to a particular network. Disadvantages of Static Routing: Following are the disadvantages of Static Routing: For a large network, it becomes a very difficult task to add each route manually to the routing table. The system administrator should have a good knowledge of a topology as he has to add each route manually. University of San Jose – Recoletos University of San Jose – Recoletos Corner P. Lopez & Magallanes Streets, Cebu City 6000, Philippines Corner P. Lopez & Magallanes Streets, Cebu City 6000 Default Routing Default Routing is a technique in which a router is configured to send all the packets to the same hop device, and it doesn't matter whether it belongs to a particular network or not. A Packet is transmitted to the device for which it is configured in default routing. Default Routing is used when networks deal with the single exit point. It is also useful when the bulk of transmission networks have to transmit the data to the same IP device. University of San Jose – Recoletos University of San Jose – Recoletos Corner P. Lopez & Magallanes Streets, Cebu City 6000, Philippines Corner P. Lopez & Magallanes Streets, Cebu City 6000 Dynamic Routing It is also known as Adaptive Routing. Dynamic routing is like a network's GPS, making real-time decisions to ensure data travels efficiently and avoids problems on the way. It's flexible, adapts to changes, and works well for large networks. Dynamic protocols are used to discover the new routes to reach the destination. In Dynamic Routing, RIP and OSPF are the protocols used to discover the new routes. If any route goes down, then the automatic adjustment will be made to reach the destination. University of San Jose – Recoletos University of San Jose – Recoletos Corner P. Lopez & Magallanes Streets, Cebu City 6000, Philippines Corner P. Lopez & Magallanes Streets, Cebu City 6000 Network Layer Protocols ARP stands for Address Resolution Protocol. It is used to associate an IP address with the MAC address. Each device on the network is recognized by the MAC address imprinted on the NIC. Therefore, we can say that devices need the MAC address for communication on a local area network. MAC address can be changed easily. For example, if the NIC on a particular machine fails, the MAC address changes but IP address does not change. ARP is used to find the MAC address of the node when an internet address is known. University of San Jose – Recoletos University of San Jose – Recoletos Corner P. Lopez & Magallanes Streets, Cebu City 6000, Philippines Corner P. Lopez & Magallanes Streets, Cebu City 6000 Network Layer Protocol -ARP University of San Jose – Recoletos University of San Jose – Recoletos Corner P. Lopez & Magallanes Streets, Cebu City 6000, Philippines Corner P. Lopez & Magallanes Streets, Cebu City 6000 Network Layer Protocols RARP RARP stands for Reverse Address Resolution Protocol. If the host wants to know its IP address, then it broadcast the RARP query packet that contains its physical address to the entire network. A RARP server on the network recognizes the RARP packet and responds back with the host IP address. The protocol which is used to obtain the IP address from a server is known as Reverse Address Resolution Protocol. University of San Jose – Recoletos University of San Jose – Recoletos Corner P. Lopez & Magallanes Streets, Cebu City 6000, Philippines Corner P. Lopez & Magallanes Streets, Cebu City 6000 Network Layer Protocol -RARP University of San Jose – Recoletos University of San Jose – Recoletos Corner P. Lopez & Magallanes Streets, Cebu City 6000, Philippines Corner P. Lopez & Magallanes Streets, Cebu City 6000 Network Layer Protocols ICMP ICMP stands for Internet Control Message Protocol. The ICMP is a network layer protocol used by hosts and routers to send the notifications of IP datagram problems back to the sender. ICMP uses echo test/reply to check whether the destination is reachable and responding. ICMP handles both control and error messages, but its main function is to report the error but not to correct them. University of San Jose – Recoletos University of San Jose – Recoletos Corner P. Lopez & Magallanes Streets, Cebu City 6000, Philippines Corner P. Lopez & Magallanes Streets, Cebu City 6000 Network Layer Protocol -ICMP University of San Jose – Recoletos University of San Jose – Recoletos Corner P. Lopez & Magallanes Streets, Cebu City 6000, Philippines Corner P. Lopez & Magallanes Streets, Cebu City 6000 Network Layer Protocols IGMP IGMP stands for Internet Group Message Protocol. The IP protocol supports two types of communication: Unicasting: It is a communication between one sender and one receiver. Therefore, we can say that it is one-to-one communication. Multicasting: Sometimes the sender wants to send the same message to a large number of receivers simultaneously. This process is known as multicasting which has one-to-many communication. The IGMP protocol is used by the hosts and router to identify the hosts in a LAN that are the members of a group. University of San Jose – Recoletos University of San Jose – Recoletos Corner P. Lopez & Magallanes Streets, Cebu City 6000, Philippines Corner P. Lopez & Magallanes Streets, Cebu City 6000 Network Layer Protocol -IGMP University of San Jose – Recoletos University of San Jose – Recoletos Corner P. Lopez & Magallanes Streets, Cebu City 6000, Philippines Corner P. Lopez & Magallanes Streets, Cebu City 6000