1 of 19

WEEK X

IPv4 Routing

2 of 19

IPv4 ROUTING

​

  • Routing is the process of selecting a path for traffic in a network or between or across multiple networks.
  • Broadly, routing is performed in many types of networks, including circuit-switched networks, such as the public switched telephone network, and computer networks, such as the Internet.
  • A computer network is made of many machines, called nodes, and paths or links that connect those nodes.
  • Communication between two nodes in an interconnected network can take place through many different paths.

Fig.: Routing in network

3 of 19

IPV4 HOST ROUTING

 

  • IP routing is the process of sending packets from a host on one network to another host on a different remote network.
  • This process is usually done by routers.
  • Routers examine the destination IP address of a packet, determine the next-hop address, and forward the packet.

​

ROUTER

 

  • A router is a device that connects two or more packet-switched networks or subnetworks.
  • It serves two primary functions: managing traffic between these networks by forwarding data packets to their intended IP addresses, and allowing multiple devices to use the same Internet connection.

4 of 19

FORWARDING DECISIONS AND THE IP ROUTING TABLE

​

FORWARDING DECISIONS:

 .

  • Devices such as switches or bridges use forwarding tables to process packets faster than routers.
  • The forwarding table is responsible for storing the next hop of each network and identifying the frame type.
  • There are different types of frames in networking - unicast, broadcast and multicast.
  • It is possible to send a unicast frame to one device only.
  • A broadcast frame is used to send to all devices in a network.
  • A multicast frame is sent to a specific group of devices within a particular network.
  • A forwarding table simply forwards the packets received in intermediate switches.
  • It is not responsible for selecting a path and only involves forwarding the packets to another attached network.

​

5 of 19

THE IP ROUTING TABLE

 

  • IP routing is the process of hosts and routers forwarding IP packets, while relying on the underlying LANs and WANs to forward the bits.
  • A Router is a networking device that forwards data packets between computer networks.
  • This device is usually connected to two or more different networks.
  • When a data packet comes to a router port, the router reads address information in packet to determine out which port the packet will be sent.

​

THE DEFAULT GATEWAY

.

  • A default gateway is the node in a computer network using the Internet protocol suite that serves as the forwarding host to other networks when no other route specification matches the destination IP address of a packet.

6 of 19

Fig.: Working of default gateway

A SUMMARY OF ROUTER FORWARDING LOGIC

 

  • First, when a router receives a data-link frame addressed to that router’s data-link address, the router needs to think about processing the contents of the frame.
  • When such a frame arrives, the router uses the following logic on the data-link frame:

 

7 of 19

Step 1: Use the data-link Frame Check Sequence (FCS) field to ensure

that the frame had no errors; if errors occurred, discard the

frame.

Step 2: Assuming that the frame was not discarded at Step 1, discard

the old data-link header and trailer, leaving the IP packet.

Step 3: Compare the IP packet’s destination IP address to the routing

table, and find the route that best matches the destination

address. This route identifies the outgoing interface of the

router, and possibly the next-hop router IP address.

Step 4: Encapsulate the IP packet inside a new data-link header and

trailer, appropriate for the outgoing interface, and forward the

frame.

8 of 19

A DETAILED ROUTING EXAMPLE

 

  • Routers happen to use the Open Shortest Path First (OSPF) routing protocol, and all routers know routes for all subnets.
  • In particular, PC2, at the bottom, sits in subnet 150.150.4.0, which consists of all addresses that begin with 150.150.4.
  • In the example, PC1 sends an IP packet to 150.150.4.10, PC2’s IP address.

​

​

9 of 19

Step A : PC1 sends the packet to its default router.

Step B : R1 processes the incoming frame and forwards the packet

to R2.

Step C : R2 processes the incoming frame and forwards the packet

to R3.

Step D : R3 processes the incoming frame and forwards the packet

to PC2.

​

ROUTING PROTOCOLS

 

  • Routing protocols help computer networks to communicate effectively and efficiently.
  • Regardless of network size, these protocols can help securely transfer data to its intended destination

10 of 19

IPV4 ROUTING PROTOCOLS – STATIC AND DYNAMIC

  There are mainly two types of Network Routing Protocols

  • Static
  • Dynamic

.

Static Routing Protocols : Static routing protocols are used when an administrator manually assigns the path from source to the destination network. It offers more security to the network.

 .

Advantages

  • No overhead on router CPU.
  • No unused bandwidth between links.
  • Only the administrator is able to add routes

.

Disadvantages

  • The administrator must know how each router is connected.
  • Not an ideal option for large networks as it is time intensive
  • Whenever link fails all the network goes down which is not feasible in small networks.

​

11 of 19

Dynamic Routing Protocols : It helps routers to add information to their routing tables from connected routers automatically. These types of protocols also send out topology updates whenever the network changes’ topological structure.

​

Advantages

  • Easier to configure even on larger networks.
  • It will be dynamically able to choose a different route in case if a link goes down.
  • It helps you to do load balancing between multiple links.

​

Disadvantage

  • Updates are shared between routers, so it consumes bandwidth.
  • Routing protocols put an additional load on router CPU or RAM.

​

12 of 19

OTHER NETWORK LAYER FEATURES

​

  • IP Address Access Control Lists - Some wireless routers allow specific IP addresses to be included in an ACL. Addresses in the list can either be denied or allowed network access.

​

  • Firewalls - Wireless routers sometimes contain firewall features. These features allow traffic to flow outward from a local network to the Internet. Traffic flowing inward from the Internet to the local network is filtered or blocked.

​

  • Virtual Private Networks - Virtual private network (VPN) features include IP Security (IPSec) encryption capabilities and tunneling capabilities, such as the Point-to-Point Tunneling Protocol (PPTP).

​

13 of 19

USING NAMES AND THE DOMAIN NAME SYSTEM

 

  • The Internet's DNS system works like a phone book by managing the mapping between names and numbers.
  • DNS servers translate requests for names into IP addresses, controlling which server an end user will reach when they type a domain name into their web browser.
  • These requests are called queries.
  • DNS stands for Domain Name System and is required for the functioning of the internet.
  • DNS is a directory service that provides a mapping between the name of a host on the network and its numerical address.
  • Each node in a tree has a domain name, and a full domain name is a sequence of symbols specified by dots.
  • DNS is a service that translates the domain name into IP addresses.
  • This allows the users of networks to utilize user-friendly names when looking for other hosts instead of remembering the IP addresses.

​

14 of 19

15 of 19

THE ADDRESS RESOLUTION PROTOCOL

 .

  • Address Resolution Protocol (ARP) is a protocol or procedure that connects an ever-changing Internet Protocol (IP) address to a fixed physical machine address, also known as a media access control (MAC) address, in a local-area network (LAN).
  • When a new computer joins a local area network (LAN), it will receive a unique IP address to use for identification and communication.
  • Packets of data arrive at a gateway, destined for a particular host machine.
  • The gateway, or the piece of hardware on a network that allows data to flow from one network to another, asks the ARP program to find a MAC address that matches the IP address.
  • The ARP cache keeps a list of each IP address and its matching MAC address.
  • The ARP cache is dynamic, but users on a network can also configure a static ARP table containing IP addresses and MAC addresses.

16 of 19

ICMP ECHO AND THE PING COMMAND

 .

  • Internet Control Message Protocol (ICMP) is a network layer protocol that serves the purpose of error reporting and network path diagnostic functions.
  • The Ping and Traceroute utility tools leverage ICMP messages for fault detection and isolation.
  • Purpose of Ping - Ping is used to send a test packet, or echo packet, to a device to find out whether it is reachable and how long the packet takes to reach the device.
  • There are two important purposes.
  •  test the network availability to device
  • network latency between two devices
  • ICMP is not used regularly in end-user applications.
  • It is used by network administrators to troubleshoot internet connections in diagnostic utilities including ping and traceroute.
  • ICMP is not associated with any transport layer protocol, such as TCP or UDP.

17 of 19

  • It is a connectionless protocol, meaning a device does not need to open a connection with the target device before sending a message.
  • Common ICMP Types - Some common message types include the following:
  • Type 0 — Echo reply
  • Type 3 — Destination unreachable
  • Type 8 — Echo
  • Type 5 — Redirect

.

DHCP : Dynamic Host Configuration Protocol

 .

  • It is a client/server protocol that automatically provides an Internet Protocol (IP) host with its IP address and other related configuration information such as the subnet mask and default gateway.
  • RFCs 2131 and 2132 define DHCP as an Internet Engineering Task Force (IETF) standard based on Bootstrap Protocol (BOOTP), a protocol with which DHCP shares many implementation details.
  • DHCP allows hosts to obtain required TCP/IP configuration information from a DHCP server.

 

​

​

18 of 19

STATIC ADDRESS ASSIGNMENT

 

  • A static IP address is simply an address that doesn't change.
  • Once user’s device is assigned a static IP address, that number typically stays the same until the device is decommissioned or your network architecture changes.
  • Static IP addresses generally are used by servers or other important equipment.

​

DYNAMIC ADDRESS ASSIGNMENT

 

  • A dynamic IP address is an IP address that changes from time to time unlike a static IP address.
  • Most home networks are likely to have a dynamic IP address and the reason for this is because it is cost effective for Internet Service Providers (ISPs) to allocate dynamic IP addresses to their customers.

​

19 of 19

DHCP SERVERS

 

  • A DHCP Server is a network server that automatically provides and assigns IP addresses, default gateways and other network parameters to client devices.
  • It relies on the standard protocol known as Dynamic Host Configuration Protocol or DHCP to respond to broadcast queries by clients.
  • A DHCP server automatically sends the required network parameters for clients to properly communicate on the network.
  • Without it, the network administrator has to manually set up every client that joins the network, which can be cumbersome, especially in large networks.
  • DHCP servers usually assign each client with a unique dynamic IP address, which changes when the client’s lease for that IP address has expired.