Page Content

Tutorials

What is IP Routing, How IP Routing Works, and Types

In this article, we learn about what IP routing is, purpose and importance of IP routing, how IP Routing Works, Key Components of IP Routing, Types of IP Routing, Types of Routing Protocols, Key IP Routing Commands, Advantages and Disadvantages of IP Routing.

What is IP Routing

What is IP Routing
What is IP Routing

A basic procedure called IP routing makes it easier for Internet Protocol (IP) packets to get from a sending device to their destination over the whole TCP/IP network. Even if they are situated on various networks, possibly across several computer networks, it guarantees that data reaches the right device. A key component of this process is routers, which function at the network layer (Layer 3).

You can also read Default Route, How Default Route works And Its Function

Purpose and Importance of IP Routing

The primary purpose of IP routing is to ensure that information sent from one device can reach the correct destination device, even if they are on different networks. This process is crucial for modern network communication, enabling devices on different IP subnets or distinct networks to communicate with each other.

Key aspects of its importance include:

Inter-Network Communication and Enabling Internet Access: IP routing is essential for connecting various networks, from home and office networks to the global internet, allowing seamless data flow.

Path Optimization and Efficiency: It optimizes data routes based on distance, speed, and quality. This streamlines operations and controls network traffic.

Reliability and Redundancy: If a path fails, IP routing can automatically find an alternative route, ensuring the network remains operational and data continues to flow smoothly.

Scalability: IP routing provides the structure to handle complex and growing networks, making it easy to add additional devices or networks.

Quality of Service (QoS): It can provide priority to critical data, such as audio or video conversations, to maintain optimal performance even in the face of heavy traffic, resulting in better user experience and clear communication.

How IP Routing Works

How IP Routing Works
How IP Routing Works

The process involves both the sending host and routers along the path:

  • Host Forwarding Logic: The sending device first ascertains if the packet’s destination IP address is on its local subnet or a remote subnet using host forwarding logic.
    • If the destination is on the local subnet, the device communicates directly.
    • If the destination is on a remote subnet, the host sends the packet to its default gateway (router).
  • Router Forwarding Process:
    • A router de-encapsulates the IP packet from a data-link frame as it arrives.
    • Next, the router checks the packet header for the destination IP address.
    • It refers to its IP routing table, which serves as a “map of the internetwork” and includes forwarding instructions and entries for destination IP networks or subnets.
    • The router determines the packet’s optimal routing and subsequent hop by applying the longest prefix match rule. This indicates that the entry that has the most precise subnet mask is selected. The route with the lowest metric (cost) is utilized when several routes have the same subnet mask.
    • Encapsulating the IP packet creates an outbound interface data-link frame. IP packets are identical except for the Time To Live (TTL) field, which reduces with each hop.
    • Using the configured interface, the new frame is transmitted to the destination host or next-hop router.
    • Until the packet reaches its destination, this process is repeated at every router. The originator receives an ICMP error message if there is no route available.

Key Components of IP Routing

Internet Protocol (IP): The primary network layer protocol responsible for logical addressing and routing.

Routers and Layer 3 Switches: Devices that link several network segments, receive IP packets, decide how to forward them, and then physically forward them are known as routers and Layer 3 switches.

IP Addressing and Subnets: Devices are identified by their unique IP addresses, which are then grouped into subnets for effective routing.

Routing Tables: Routing tables are router databases that hold network pathways, such as the outgoing interface, the IP address of the next-hop router, and the destination IP network or subnet, to facilitate packet forwarding decisions. A default route serves as a “gateway of last resort” for traffic without a more specialized route; it is typically specified as 0.0.0.0 with flag G.

Routing Protocols: Routing protocols are dynamic protocols that enable routers to learn about IP subnets, determine the best routes, communicate routing information automatically, and keep their routing tables up to date.

IP Packets: IP packets are the basic data units used in network routing that carry IP addresses.

Types of IP Routing

Routers can learn and use routes through various methods:

Dynamic Routing: Routing protocols, such as RIP, EIGRP, OSPF, and BGP, are used by routers to automatically learn about IP subnets from nearby routers, share routing data, select the most efficient routes, and keep track of their routing tables. Usually, this entails sharing routing updates and choosing the best routes based on metrics.

Static Routing: In static routing, every route in the router’s routing table is manually configured by a network engineer.

Default Routing: A particular kind of static route known as “default routing” is set up to serve as a “gateway of last resort” for all traffic for which the routing table does not contain a more specific route.

You can also read What Are The Advantages And Disadvantages Of Static Routing

Types of Routing Protocols

A router requires a routing table and a variety of routing protocols in order to make routing decisions. Two domains comprise the routing protocols:

Intradomain Routing protocols 

Interdomain Routing protocols

Interdomain Routing Protocols

This routing is used among autonomous networks and it includes Path Vector Routing(PVR).

Path Vector Routing

Path vectors are used for routing in path vector routing. These path vectors are updated in real time.

PVR uses the Border Gateway Protocol (BGP) to make routing decisions.

Intra domain Routing Protocols

This routing is used within the autonomous networks and it includes two types of routing: Distance Vector Routing(DVR) and Link State Routing(LSR).

Distance Vector Routing

  • Distance vector routing routes using distance vectors.
  • In order to maintain the shortest distance to other routers, each router keeps track of a routing table.
  • It calculates different distances using the Bellman-Ford technique.
  • In DVR, routing decisions are made using the Routing Information Protocol (RIP).
  • Split-horizon or route poisoning can be used to address the count-to-infinity issue that DVR faces.

Link State Routing

  • Link condition routing routes based on the link’s current condition.
  • It calculates different distances using the Dijkstra method.
  • LSR makes routing decisions using Open Shortest Path First (OSPF).
  • Flooding causes excessive traffic on LSR, a problem that the TTL field helps resolve.

Advantages and Disadvantages of IP Routing

Advantages:

  • Scalable: By incorporating additional devices or networks, networks can readily expand.
  • Flexible: Able to discover alternative routes in the event that an existing one breaks or alters.
  • Efficient: Enhances performance by sending data via the quickest paths.
  • Reliable: Identifies alternate routes on its own to maintain network connectivity.
  • Balanced Traffic: Distributes data across different paths to prevent congestion.
  • Secure: May aid in access control and traffic blocking.
  • Cost-effective: Able to select the data’s most cost-effective route.
  • Interoperable: Linking various network types, no matter how big or little.
  • Ease of Setup: Configuration can be automated with modern tools, making management easier.

Disadvantages:

  • Complexity: It might be difficult to set up IP routing in big, complicated networks.
  • Overhead: In order to manage routes, routers need more memory and computing power.
  • Route Loops: Incorrect settings might cause data to loop forever.
  • Vulnerability to Attacks: IP routing systems can be hacked to steal data or cause outages.
  • Inconsistent Routing Decisions: Routers may choose different routes, which might result in slower speeds or inefficiency.

Key IP Routing Commands (for Routers and Layer 3 Switches)

[no] ip routing: A global configuration command that enables or disables the routing of IPv4 packets on a router or a Layer 3 switch.

ip route prefix mask {ip-address | interface-type interface-number} [distance] [permanent]: A global configuration command used to create a static route.

show ip route: An EXEC mode command to list the router’s entire IP routing table. Variations like show ip route [connected | static | ospf] allow viewing subsets of the table.

show ip protocols: Used to display summary information about the configured IP routing protocols.

show ip interface: Displays the packet switching method used by a router interface.

ip address ip-address mask: An interface subcommand that assigns the IP address and mask to an interface.

interface vlan <number> and ip address <ip-address> <subnet-mask>: Used to configure a VLAN interface (SVI) with an IP address, enabling a Layer 3 switch to route between VLANs.

You can also read Advantages of Dynamic Routing & How Dynamic Routing Works

Index