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

SAN Switch Zoning with Brocade

Zoning in Brocade SAN Switch Let's begin with resetting the switch completely. In my environment I have two brocade SAN Switch connecting to 2 Dell R940 server configured with VMware. The SAN switch will be having connectivity between Dell Unity 500 storage and Dell R940 servers. Multipathing will be done between the server and storage with the help of SAN Switch. Multipathing, also called SAN multipathing or I/O multipathing, is the establishment of multiple physical routes between a server and the storage device that supports. It results in better fault tolerance and performance enhancement. DESIGN The idea behind zoning is that intended WWPN talk with each other . This is more like ACL in the world of Ethernet. To see the devices which are logged into the switch the following commands can be executed. SAN-A:admin> switchshow switchName: SAN-A switchType: 118.1 switchState: Online switchMode: Native switchRole: Principal switchDomain: 1 switchId: ...

Device Mapper Multipath with LVM in Oracle Linux

This blog describes you the step by step procedure for configuring multipath in liunx using Device Mapper and will also help you understanding what Device Mapper is. Simply stating Device Mapper is an interface to Linux Kernel which helps us to configure multiple I/O path between the server and the storage arrays.  Device Mapper interface allows the linux kernel to communicate with LVM Logical Volumes, EVMS Volumes , Software RAID, multipath and many other solutions. Multipathing is a must for all those mission critical applications as we all know that data is the most important thing in an enterprise network . Let me now share the installation process for multipathing. Installing Device Mapper #yum install device-mapper-multipath -y #rpm -qa | grep device-mapper Enabling Multipath #cp /usr/sare/doc/device-mapper-multipath - */multipath.conf   /etc/multipath.conf #mpathconf -enable -user_firendly_names n #modprobe dm_multipath #lsmod | grep dm_multip...

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...