Skip to main content

IP Routing Overview

 This blog is going to talk about the specific of the routing process. In general there are mainly three steps    that a router needs to go through

1. Routing : The goal of the routing is the to find out what interface is going to send the packet out. So if the packet comes in from fa0/0 it has to make decision of its outgoing interface whether it is  fa0/1 or other interface available 

Once the decision is made of the outgoing interface then it goes through the next process called as Switching Process.

2. Switching : Main goal is to move packet between interfaces where I will write a separate blog about different types of switching mechanism like Cisco Express Forwarding ( CEF), Packet Switching, Fast Switching.

The last step is when the packet arrives to be forwarded out of the interface router needs to re-encapsulate the packet

3. Encapsulation :  Build layer 2 header also known as Layers 2 rewrite. 

THE ROUTING PROCESS

  • Step 1 : Find the longest match      
    • - show ip route 1.2.3.4 
      • 1.0.0.0/8
      • 1.2.0.0/16
      • 1.2.3.0/24
      • Which route to choose ?
It will now be performing binary comparison between the destination 1.2.3.4 and all those routes available in the routing table (i.e. 1.0.0.0/8 , 1.2.0.0/16, 1.2.3.0/24) and find out which routes has the bits in common with the destination 1.2.3.4. 1.2.3.0/24 will have more bits in common compared to other two routes whereas the most specific routes in common for 1.2.3.4 would be 1.2.3.4/32 also know as Host Route where it is exact match for all 32 bits. The least specific match would be 0.0.0.0/0 only know to be as gateway of last resort or default route.

The router needs to now find out what interface is that route located on ? It does with the help of recursive routing lookup
  • Step 2 : Perform recursive lookup
    •  1.2.3.4 via 5.6.7.8
      • 5.6.7.8 via 9.0.1.2
        • 9.0.1.2 via 3.6.7.8 
          • >> 3.6.7.8 directly connected, FastEthernet0/0
What this basically means is that one route points to another and another routes point to another route until and unless it finds out a interface to send the packet out as mentioned above. The router in our case will do another lookup for 5.6.7.8 and same goes to 9.0.1.2 and 3.6.7.8 until it finds out the connected interface.

THE SWITCHING PROCESS

Switching mainly defines about how packets are moved from the input interface to the output interface. basically we can relate it to saying moving packet between  the interfaces. There are many different switching paths available
  • Process Switching :  ask the CPU about every single packet
  • Fast Switching : route caching process where you ask the CPU about the first packet and then uses the cache for the rest of it.
  • CEF ( Cisco Express Forwarding) : by far the most common and is available by default. 
I will be talking about all these 3 switching process more in detail in my other blog.

THE ENCAPSULATION PROCESS

Lastly we have the encapsulation process where router needs to build the layer 2 header based on the outgoing media also sometimes referred to as layer 2 packet rewrite. Let's take an example.

Assuming Host A has packets to go to Host B in the following all-Ethernet connection:

Host A --- Switch A --- Router A --- Router B --- Switch B --- Host B

Host A and B are in different subnets, and their default gateways are Router A and Router B interfaces.
When Router A will forward the packet towards to Router B , it will remove the Layer 2 addressing sent by Host A  with its outgoing interface as the source MAC address and it will use Router B's interface closest to it as the destination MAC address. Once the frame has been recreated, it will send it.

Reference

https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ipswitch_poview/configuration/15-s/isw-poview-15-s-book.html#GUID-8D568005-3AF8-494D-B32D-B878EFBA8328

Brian Mcgahan, CCNP Route Switch Course v3



Comments

Popular posts from this blog

SSL Decryption FortiGate

  We have pretty much heard about SSL decryption and of malware hiding inside an encrypted traffic. A large amount of traffic in the internet is pretty much encrypted which basically means that bad things like malware, virus, ransomware can hide inside this encrypted traffic. If majority of these traffic are encrypted our Firewalls are not able to analyze these traffic which can easily infect our organization and the investment which we have done in these firewalls are wasted. There does come around a solution for this and as my topic suggest SSL Decryption also know as Deep Packet Inspection as by some IT folks. The image that I have attached down below clearly suggest about what I am trying to explain. Using deep packet inspection, the firewall simply decrypts the encrypted traffic happening  between client and server, inspects the content to find the threats and block them , then forwards it to the destination re-encrypting it . We will need to first setup the SSL/SSH in...

High Availability Palo Alto (Active/Standby)

 High Availability is usually performed in most of the data centers networks today which ensures application availability . High Availability is usually achieved in case one of the appliance goes down or have some physical or logical connectivity issues.  Achieving high availability in Palo Alto firewall is relatively very easy. Palo Alto firewall can work in both Active/Standby mode or in Active/Active. We will basically be talking about Active/Standby mode in this article. There are basically two links that needs to be configure in Palo Alto for HA. 1. Control Links Control Links are associated with control plane traffic which is mainly used for heartbeat exchanged, configuration synchronization. Dedicate HA ports are available in higher series of Palo Alto or even a HA interface can be created for some inband ports.   2. Data Links Data Links are mainly used for session synchronization, forwarding table synchronization. Dedicated HSCI Ports are available for highe...

Virtual Chassis Juniper EX 3400 (PREPROVISONED)

Juniper has always been an technology that I have always liked right from the beginning of my career when I was working as an Jr Network Administrator. The logical command as well as the hierarchy based Juniper devices has always made me love the device. Let me today talk about a very useful and an interesting topic which we usually called stack in the world of Cisco and virtual chassis in the world of Juniper, both of them mean the same thing logically make two or more than two switch as a one and configure and manage the device as a single unity. High Availability, managed configuration and maintenance are few of the benefits that a virtual chassis can provide. The configuration for virtual chassis can be found easily in the juniper sites but my objective about writing this is making it more simpler in context to Juniper's document. There are basically two ways of configuring virtual chassis in Juniper. 1.   Nonprovisioned configuration  :  The master switch assig...