No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Configuration Guide - IP Unicast Routing

S7700 and S9700 V200R013C00

This document describes the configurations of IP Unicast Routing, including IP Routing, Static Route, RIP, RIPng, OSPF, OSPFv3, IPv4 IS-IS, IPv6 IS-IS, BGP, Routing Policy, IP Routing Table Management, and PBR.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Routing Table and FIB Table

Routing Table and FIB Table

Routers forward packets based on routing tables and forwarding information base (FIB) tables. Each router maintains at least one routing table and one FIB table. Routers select routes based on routing tables and forward packets based on FIB tables.

Routing Table

Each router maintains a local core routing table (namely, an IP routing table), and each routing protocol maintains its own routing table.

  • Local core routing table

    A router uses the local core routing table to store preferred routes. The router then sends the preferred routes to the FIB table to guide packet forwarding. The router selects routes according to the priorities of protocols and costs stored in the routing table.

    NOTE:

    A router that supports Layer 3 Virtual Private Network (L3VPN) maintains a local core routing table for each VPN instance.

  • Protocol routing table

    A protocol routing table stores routing information discovered by the protocol.

    A routing protocol can import and advertise routes that are discovered by other routing protocols. For example, a router runs the Open Shortest Path First (OSPF) protocol. To use OSPF to advertise direct routes, static routes, or Intermediate System-Intermediate System (IS-IS) routes, the router must import the routes into the OSPF routing table.

Routing Table Contents

You can run the display ip routing-table command on a router to view basic information about the routing table of the router. The command output is as follows:

<HUAWEI> display ip routing-table
Proto: Protocol        Pre: Preference
Route Flags: R - relay, D - download to fib, T - to vpn-instance
------------------------------------------------------------------------------
Routing Table: _public_
         Destinations : 14       Routes : 14                                    
                                                                                
Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface      
                                                                                
        0.0.0.0/0   Static  60   0          RD   10.137.216.1    Vlanif20
     10.10.10.0/24  Direct  0    0           D   10.10.10.10     Vlanif20
    10.10.10.10/32  Direct  0    0           D   127.0.0.1       InLoopBack0    
   10.10.10.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0    
     10.10.11.0/24  Direct  0    0           D   10.10.11.1      LoopBack0      
     10.10.11.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0    
   10.10.11.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0    
   10.137.216.0/23  Direct  0    0           D   10.137.217.208  Vlanif20      
 10.137.217.208/32  Direct  0    0           D   127.0.0.1       InLoopBack0    
 10.137.217.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0    
      127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0    
      127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0    
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0    
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0 

A routing table contains the following key data for each IP packet:

  • Destination: identifies the destination IP address or destination network address of an IP packet.

  • Mask: supplements the destination address to specially identify the address of the network segment where the destination host or router resides.

    The network segment address of a destination host or router is obtained through the "AND" operation on the destination address and network mask. For example, if the destination address is 10.1.1.1 and the mask is 255.255.255.0, the address of the network segment where the host or router resides is 10.1.1.0.

    The network mask is composed of several consecutive 1s. These 1s can be expressed in either the dotted decimal notation or the number of consecutive 1s in the mask. For example, the network mask can be expressed either as 255.255.255.0 or 24.

  • Proto: indicates the protocol through which routes are learned.

  • Pre: indicates the routing protocol preference of a route. There may be multiple routes to the same destination, which have different next hops and outbound interfaces. These routes may be discovered by different routing protocols or manually configured. A router selects the route with the highest preference (the smallest value) as the optimal route. For the routing protocol preference, see Routing Protocol Preference.

  • Cost: indicates the route cost. When multiple routes to the same destination have the same preference, the route with the lowest cost is selected as the optimal route.

    NOTE:

    The Preference value is used to compare the preferences of different routing protocols, while the Cost value is used to compare the preferences of different routes of the same routing protocol.

  • NextHop: indicates the IP address of the next device that an IP packet passes through.

  • Interface: indicates the outbound interface through which an IP packet is forwarded.

In Figure 1-1, the routing table of RouterA shows that it connects to three networks, so it has three IP addresses and three outbound interfaces.

Figure 1-1  Routing table

Matching with FIB Table

After selecting an optimal route from the routing table, a router sends it to the FIB table. When receiving a packet, the router compares it against the FIB table to find the optimal route to forward the packet.

Each entry in the FIB table contains the physical or logical interface through which a packet is sent to a network segment or host to reach the next router. An entry can also indicate whether the packet can be sent to a destination host in a directly connected network.

The router performs the "AND" operation on the destination address in the packet and the network mask of each entry in the FIB table. The router then compares the result of the "AND" operation with the entries in the FIB table to find a match and chooses the optimal route to forward packets according to the longest match rule.

For example, assume that a router has the following routing table:

Routing Tables:
Destination/Mask    Proto  Pre  Cost     Flags NextHop         Interface
 0.0.0.0/0      Static   60   0       D   192.168.0.2      GigabitEthernet1/0/0
 10.8.0.0/16    Static   60   3       D   192.168.0.2      GigabitEthernet1/0/0
 10.9.0.0/16    Static   60   50      D   172.16.0.2       GigabitEthernet3/0/0
 10.9.1.0/24    Static   60   4       D   192.168.0.2      GigabitEthernet2/0/0
 10.20.0.0/16   Direct   0    0       D   172.16.0.1       GigabitEthernet4/0/0

After receiving a packet carrying the destination address 10.9.1.2, the router searches the following FIB table:

 FIB Table:
 Total number of Routes : 5
Destination/Mask   Nexthop         Flag TimeStamp     Interface              TunnelID
0.0.0.0/0            192.168.0.2       SU   t[37]         GigabitEthernet1/0/0  0x0
10.8.0.0/16          192.168.0.2       DU   t[37]         GigabitEthernet1/0/0  0x0
10.9.0.0/16          172.16.0.2        DU   t[9992]       GigabitEthernet3/0/0  0x0
10.9.1.0/24          192.168.0.2       DU   t[9992]       GigabitEthernet2/0/0  0x0
10.20.0.0/16         172.16.0.1        U    t[9992]       GigabitEthernet4/0/0  0x0

The router performs the "AND" operation on the destination address 10.9.1.2 and the masks 0, 16, and 24 to obtain the network segment addresses: 0.0.0.0/0, 10.9.0.0/16, and 10.9.1.0/24. The three addresses match three entries in the FIB table. The router chooses the entry 10.9.1.0/24 according to the longest match rule, and forwards the packet through GigabitEthernet2/0/0.

Translation
Download
Updated: 2019-04-08

Document ID: EDOC1100065744

Views: 58169

Downloads: 46

Average rating:
This Document Applies to these Products
Related Version
Related Documents
Share
Previous Next