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

Fat AP and Cloud AP V200R008C00 CLI-based Configuration Guide

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).
IP Routing Basics

IP Routing Basics

You can configure IP routing to learn about basic parameters for IP routing.

Introduction to IP Routing

Routing is the basic element of data communication networks. It is the process of selecting paths on a network along which packets are sent from a source to a destination.

Routes are classified into the following types based on the destination address:
  • Network segment route: The destination is a network segment. The subnet mask of an IPv4 destination address is less than 32 bits or the prefix length of an IPv6 destination address is less than 128 bits.
  • Host route: The destination is a host. The subnet mask of an IPv4 destination address is 32 bits or the prefix length of an IPv6 destination address is 128 bits.
Routes are classified into the following types based on whether the destination is directly connected to a router:
  • Direct route: The router is directly connected to the network where the destination is located.
  • Indirect route: The router is indirectly connected to the network where the destination is located.
Routes are classified into the following types based on the destination address type:
  • Unicast route: The destination address is a unicast address.
  • Multicast route: The destination address is a multicast address.

Principles

This section describes the implementation of IP Routing.

Routers and Routing Principles

On the Internet, network connecting devices control traffic and ensure data transmission quality. Common network connecting devices include hubs, bridges, switches, and routers. These network devices have similar basic principles. The following uses a router as an example to describe basic principles.

As a typical network connecting device, a router selects routes and forwards packets. Upon receiving a packet, a router selects a proper path, which has one or multiple hops, to send the packet to the next router according to the destination address in the packet. The last router is responsible for sending the packet to the destination host.

A route is a path along which packets are sent from the source to the destination. When multiple routes are available to send packets from a router to the destination, the router can select the optimal route from an IP routing table to forward the packets. Optimal route selection depends on the routing protocol preferences and metrics of routes. When multiple routes have the same routing protocol preference and metric, load balancing can be implemented among these routes to relieve network pressure. When multiple routes have different routing protocol preferences and metrics, route backup can be implemented among these routes to improve network reliability.

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, and each routing protocol maintains its routing table.

  • Local core routing table

    A router uses the local core routing table to store protocol routes and 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.

  • Protocol routing table

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

    A routing protocol can import and advertise the routes that are discovered by other routing protocols. For example, if a router that runs the Open Shortest Path First (OSPF) protocol needs 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 brief information about the routing table of the router. The command output is as follows:

<Huawei> display ip routing-table
Route Flags: R - relay, D - download to fib                                     
------------------------------------------------------------------------------  
Routing Tables: 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    GigabitEthernet
2/0/0      
     10.10.10.0/24  Direct  0    0           D   10.10.10.10     GigabitEthernet
1/0/0
    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  GigabitEthernet
2/0/0      
 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 the destination network address of an IP packet.

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

    The network segment address of the destination host or router is obtained through the "AND" operation on the destination address and network mask. For example, if the destination address is 1.1.1.1 and the mask is 255.255.255.0, the address of the network segment where the host or router resides is 1.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 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.

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

As shown in Figure 7-8, RouterA connects to three networks, so it has three IP addresses and three outbound interfaces. Figure 7-8 shows the routing table of RouterA.

Figure 7-8  Routing table

Matching with FIB Table

After route selection, routers send active routes in the routing table to the FIB table. When a router receives a packet, the router searches the FIB table for 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 also indicates 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.

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   120.0.0.2      GigabitEthernet1/0/0
 8.0.0.0/8    RIP      100  3       D   120.0.0.2      GigabitEthernet1/0/0
 9.0.0.0/8    OSPF     10   50      D   20.0.0.2       GigabitEthernet3/0/0
 9.1.0.0/16   RIP      100  4       D   120.0.0.2      GigabitEthernet2/0/0
 20.0.0.0/8   Direct   0    0       D   20.0.0.1       GigabitEthernet4/0/0

After receiving a packet that carries the destination address 9.1.2.1, 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          120.0.0.2       SU   t[37]         GigabitEthernet1/0/0  0x0
8.0.0.0/8          120.0.0.2       DU   t[37]         GigabitEthernet1/0/0  0x0
9.0.0.0/8          20.0.0.2        DU   t[9992]       GigabitEthernet3/0/0  0x0
9.1.0.0/16         120.0.0.2       DU   t[9992]       GigabitEthernet2/0/0  0x0
20.0.0.0/8         20.0.0.1        U    t[9992]       GigabitEthernet4/0/0  0x0

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

Route Metric

A route metric specifies the cost of a route to a specified destination address. The following factors often affect the route metric:

  • Path length

    The path length is the most common factor affecting the route metric. Link-state routing protocols allow you to assign a link cost for each link to identify the path length of a link. In this case, the path length is the sum of link costs of all the links that packets pass through. Distance-vector routing protocols use the hop count to identify the path length. The hop count is the number of devices that packets pass through from the source to the destination. For example, the hop count from a router to its directly connected network is 0, and the hop count from a router to a network that can be reached through another router is 1. The rest can be deduced in the same manner.

  • Network bandwidth

    The network bandwidth is the transmission capability of a link. For example, a 10-Gigabit link has a higher transmission capability than a 1-Gigabit link. Although bandwidth defines the maximum transmission rate of a link, routes over high-bandwidth links are not necessarily better than routes over low-bandwidth links. For example, when a high-bandwidth link is congested, forwarding packets over this link will require more time.

  • Load

    The load is the degree to which a network resource is busy. You can calculate the load by calculating the CPU usage and packets processed per second. Monitoring the CPU usage and packets processed per second continually helps learn about network usage.

  • Communication cost

    The communication cost measures the operating cost of a route over a link. The communication cost is another important indicator, especially if you do not care about network performance but the operating expenditure.

Load Balancing and Route Backup

When multiple routes have the same routing protocol preference and metric, these routes are called equal-cost routes, among which load balancing can be implemented. When multiple routes have different routing protocol preferences and metrics, route backup can be implemented among these routes.

Load Balancing

Routers support the multi-route mode, allowing you to configure multiple routes with the same destination and preference. If the destinations and costs of multiple routes discovered by the same routing protocol are the same, load balancing can be performed among the routes.

During load balancing, a router forwards packets based on the 5-tuple (source IP address, destination IP address, source port, destination port, and transport protocol) in the packets. When the 5-tuple information is the same, the router always chooses the next-hop address that is the same as the last one to send packets. When the 5-tuple information is different, the router forwards packets over idle paths.

Figure 7-9  Networking diagram of load balancing

As shown in Figure 7-9, RouterA forwards the first packet P1 to 10.1.1.0/24 through GE1/0/0 and needs to forward subsequent packets to 10.1.1.0/24 and 10.2.1.0/24 respectively. The forwarding process is as follows:

  • When forwarding the second packet P2 to 10.1.1.0/24, RouterA forwards P2 and subsequent packets destined for 10.1.1.0/24 through GE1/0/0 if it finds that the 5-tuple information of P2 is the same as that of P1 destined for 10.1.1.0/24.

  • When forwarding the first packet P1 to 10.2.1.0/24, RouterA forwards this packet and subsequent packets destined for 10.2.1.0/24 through GE2/0/0 if it finds that the 5-tuple information of P1 destined for 10.2.1.0/24 is different from that of P1 destined for 10.1.1.0/24.

Route Backup

Route backup can improve network reliability. You can configure multiple routes to the same destination as required. The route with the highest preference functions as the primary route, and the other routes with lower preferences function as backup routes.

A router generally uses the primary route to forward data. When the primary link fails, the primary route becomes inactive. The router selects a backup route with the highest preference to forward data. In this manner, data is switched from the primary route to a backup route. When the primary link recovers, the router selects the primary route to forward data again because the primary route has the highest preference. Data is then switched back from the backup route to the primary route.

Route Convergence
Definition

Route convergence is the action of recalculating routes to replace existing routes in the case of network topology changes. The integration of network services urgently requires differentiated services. Routes for key services, such as Voice over IP (VoIP), video conferences, and multicast services, need to be converged rapidly, while routes for common services can be converged relatively slowly. In this case, the system needs to converge routes based on their convergence priorities to improve network reliability.

Priority-based convergence is a mechanism that allows the system to converge routes based on the convergence priority. You can set different convergence priorities for routes: critical, high, medium, and low, which are in descending order of priority. The system then converges routes according to the scheduling weight to guide service forwarding.

Principles

Routing protocols first compute and deliver routes of high convergence priorities to the system. You can reconfigure the scheduling weight values as required. Table 7-6 lists the default convergence priorities of public routes.

Table 7-6  Default convergence priorities of public routes

Routing Protocol or Route Type

Convergence Priority

Direct

high

Static

medium

32-bit host routes of OSPF and IS-IS

medium

OSPF routes (excluding 32-bit host routes)

low

IS-IS routes (excluding 32-bit host routes)

low

RIP

low

BGP

low

NOTE:

For private routes, only the convergence priority of 32-bit host routes of OSPF and IS-IS is identified as medium and the convergence priorities of the other routes are identified as low.

Priority-based Route Convergence

Figure 7-10 shows the networking for multicast services. OSPF and IS-IS run on the network; the receiver connects to RouterA; the multicast source server 10.10.10.10/32 connects to RouterB. The route to the multicast source server must be converged faster than other routes, such as 12.10.10.0/24. You can set the convergence priority of route 10.10.10.10/32 to be higher than that of route 12.10.10.0/24. When routes are converged on the network, the route to the multicast source server 10.10.10.10/32 is converged first. This ensures the transmission of multicast services.

Figure 7-10  Networking diagram of priority-based route convergence

Default Routes

Default routes are special routes, which are used only when packets to be forwarded do not match any routing entry in a routing table. If the destination address of a packet does not match any entry in the routing table, the packet is sent through a default route. If no default route exists and the destination address of the packet does not match any entry in the routing table, the packet is discarded. An Internet Control Message Protocol (ICMP) packet is then sent, informing the originating host that the destination host or network is unreachable.

In a routing table, a default route is the route to network 0.0.0.0 (with the mask 0.0.0.0). You can run the display ip routing-table command to check whether a default route is configured. Generally, administrators can manually configure default static routes. Default routes can also be generated through dynamic routing protocols such as OSPF and IS-IS.

References

This section lists references of IP Routing.

None

Translation
Download
Updated: 2019-01-11

Document ID: EDOC1000176006

Views: 118813

Downloads: 309

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