Got it

How are IP packets forwarded?

Latest reply: Mar 7, 2022 11:25:27 807 31 12 0 1

Hello, everyone!

I'd like to share the basics of IP routing today. Do you know how packets are forwarded in a network?

Let's start with an overview of IP routing.


IP Routing Overview


IP Routing


When a router receives an IP packet, the router searches the FIB table for a route based on the destination IP address of the IP packet.


  • If a matching route is found, the device forwards the route based on the outbound interface or next-hop of the route.


  • If no route is matched, the router discards the packet because it has no routing information to guide packet forwarding.


RIB and FIB


Network devices with routing functions maintain two important data tables:


  • Routing Table (RIB)

  • Forwarding table (FIB)


IP Routing


Routers maintain a local core routing table and, in addition, routers maintain routing tables for their respective routing protocols.


The router downloads the best route from the local core routing table into the FIB table.The forwarding chip of the router forwards IP packets according to the FIB table.


Routing Table


Each router has a routing table, which is divided into a local core routing table and a protocol routing table.


  • Protocol Routing Table


Protocol Routing Table


  • Local Core Routing Table


Local Core Routing Table


Longest match rule for IP route lookup


When the routing table searches the FIB table, it performs bitwise logically and on the destination IP address of the packet and the mask of each item in the FIB table.


Finally, a FIB entry with the longest mask is selected to forward the packet.


Source of Route


There are three main sources of routes.


  1. Direct Route


    Direct Route


  2. Static Route


    Static Route


  3. Dynamic Route


    Dynamic Route


Dynamic Routing Protocol


Dynamic routing protocols can be classified into the following types:


  • Interior Gateway Protocol (IGP): It runs within an autonomous system. Common IGP protocols include OSPF and IS-IS.


  • External Gateway Protocol (EGP): runs between different autonomous systems. BGP is the most common EGP protocol.


Dynamic Routing Protocol


Route Selection


A route must have a directly connected next hop to guide forwarding. The next hop of a static route or BGP route may not be a directly connected neighbor. Therefore, a directly connected next hop needs to be calculated. This process is called route selection.


Route Selection


Select a directly connected next-hop: In this example, we add a route to 11.x.x.2 for R1 so that the route to 192.168. 21.0/24 can be iterated.


Data Forwarding Process


The following figure shows the packet forwarding process.


Data Forwarding Process



Thank you so much for reading and hope it helps you.

Welcome to the comments section.

t_0002.gif

The post is synchronized to: Routing & SwitchingNetwork Learning Sharing

@Malik3000 @alopez @IndianKid @umaryaqub @LuizPuppin @shakeela @NTan33 @smileymind @Saqib123 @yogijain @lucian2003 @Unicef @WalidNawar_PDAC_MVE @BAZ @Ihteshamraza @sohaib.ansar @daniellima @S_Noch @chantha @Navin_kay @Faridrami @Herediano @abood_1419 @VinceD @19muaz19 @Addy786 @Adriale @Ahmed_Osman @AJR @alkaseer @ankush @Aroot @azkasaqib @bagic @BAZ @daniellima @DawoodShah @Ddkompik @Dragos_Voicila @E.DR_91 @EdelChino @EglymarB @Elecha001 @ernesto_cupet6 @fargat @felixqperez @Fernando_Ag @Floyd_42 @Fuat @futurework @gabo.lr @Galeober @GDCP @Harihar_Shrestha_new @HaseebAkhtar @huriuraz @HWmah @IndianKid @jas_heer @JNL @JT_UPDATE @kakuye @Kolli @KorayK. @krishnkant @Len_non @little_fish @LSA @lucian2003 @LuizPuppin @Luke_WiFi_Walker @Majdi.Chebil @Marcelo.Toledo @Mglsmn @Moemyint18 @Mohamed_Ahmed @MPatel @mr_anderson @msgabs @Nawwaf.sa @NetEng.JA @niko_makoni @olutaiwo07 @orlan_ortiz @ozan @phuta @RanaShakeel @realtm7 @Renan_Brasil @rganacim @RoxES @Rumana @safi1012 @sam_san @Sapte @Saqib123 @Shalapy @Shayan_ITMan @Siyamraj @smileymind @sonam228 @thisu @umaryaqub @Unicef @user_3015189 @user_3333671 @user_3445655 @user_3754066 @user_3926329 @user_3984285 @user_3998471 @user_3999909 @user_4000907 @user_4082249 @user_4082499 @user_4101251 @user_4115707 @user_4183415 @vagkaefer @Vien @vitoko @Vlada85 @WalidNawar_PDAC_MVE @wissal @www_13290524951 @yogijain @zaheernew @Zahid_27


You are welcome to leave a message

t_0002.gif





View more
  • x
  • convention:

wissal
wissal Created Jan 13, 2022 06:35:52 (1) (0)
Thank you, my friend  
little_fish
little_fish Created Jan 13, 2022 08:08:58 (0) (0)
 
Saqibaz
Saqibaz Created Mar 2, 2022 04:09:59 (0) (0)
 
The interface with the destination IP address that is specified in the packet headers then retrieves the packets from the local network.
If the destination address is not on the local network, the packets are then forwarded to the next adjacent network, or hop.
View more
  • x
  • convention:

Chenxintao
Chenxintao Created Jan 13, 2022 08:03:25 (1) (0)
If the destination IP address of the packet is in the local LAN, the packet is directly forwarded.
If the destination IP address of the packet is outside the WAN, it is forwarded by the gateway router.  
Thanks for sharing your knowledge to help users.
View more
  • x
  • convention:

Chenxintao
Chenxintao Created Jan 13, 2022 08:04:10 (0) (0)
Thank you for your support! my good friend!  
I am interesting on Data Forwarding Process :) well done post thanks
View more
  • x
  • convention:

Chenxintao
Chenxintao Created Jan 13, 2022 09:19:45 (0) (0)
Thank you for your support! my good friend!  
Great share. As always, keep up the good work!
View more
  • x
  • convention:

Chenxintao
Chenxintao Created Jan 17, 2022 00:51:51 (0) (0)
Thank you for your support! my good friend!  
Excellent post on IP packets forwarding, thank you for sharing
View more
  • x
  • convention:

Chenxintao
Chenxintao Created Jan 17, 2022 00:52:04 (0) (0)
Thank you for your support! my good friend!  
Excellent post
View more
  • x
  • convention:

Chenxintao
Chenxintao Created Jan 17, 2022 00:52:11 (0) (0)
Thank you for your support! my good friend!  
Nice post. Thanks for sharing
View more
  • x
  • convention:

Chenxintao
Chenxintao Created Jan 17, 2022 00:52:18 (0) (0)
Thank you for your support! my good friend!  
thanks for sharing.
View more
  • x
  • convention:

VinceD
VinceD Created Jan 17, 2022 06:30:04 (0) (0)
 
Chenxintao
Chenxintao Created Jan 17, 2022 09:56:56 (0) (0)
Thank you for your support! my good friend!  
12
Back to list

Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.