04-Layer 3 Configuration Guide

HomeSupportConfigure & DeployConfiguration GuidesH3C Access Controllers Configuration Guides(E3703P61 R2509P61 R3709P61 R2609P61 R3509P61)-6W10204-Layer 3 Configuration Guide
12-IP Routing Basics
Title Size Download
12-IP Routing Basics 46.54 KB

IP routing basics

The term "router" in this document refers to both routers and routing-capable access controllers.

IP routing directs IP packet forwarding on routers based on a routing table.

Routing table

A router maintains at least two routing tables: a global routing table and a FIB. The FIB table contains only the optimal routes, and the global routing table contains all routes. The router uses the FIB table to forward packets.

Table 1 categorizes routes by different criteria.

Table 1 Route categories

Criterion

Categories

Destination

·     Network route—Destination is a network. The subnet mask is less than 32 bits.

·     Host route—Destination is a host. The subnet mask is 32 bits.

Whether the destination is directly connected

·     Direct route—Destination is directly connected.

·     Indirect route—Destination is indirectly connected.

Origin

·     Direct route—A direct route is discovered by the data link protocol on an interface, and is also called an "interface route."

·     Static route—A static route is manually configured by an administrator.

 

To view brief information about a routing table, use the display ip routing-table command:

<Sysname> display ip routing-table

Routing Tables: Public

         Destinations : 7       Routes : 7

 

Destination/Mask    Proto  Pre  Cost         NextHop         Interface

 

1.1.1.0/24          Direct 0    0            1.1.1.1         XGE1/0/2

2.2.2.0/24          Static 60   0            12.2.2.2        XGE1/0/2

A route entry includes the following key items:

·     DestinationIP address of the destination host or network.

·     MaskMask length of the IP address.

·     Pre—Preference of the route. The route with the highest preference is optimal when multiple routes are available to a destination.

·     Cost—If multiple routes to a destination have the same preference, the route with the smallest cost becomes the optimal route.

·     NextHop—Next hop.

·     Interface—Output interface.

Route preference

By default, static and direct routes each have a preference. When multiple routes are available to a destination, the router selects the route with the highest preference as the optimal route.

The preference of a direct route is always 0 and cannot be changed. You can configure a preference for each static route as required. The following table lists the route types and default preferences. The smaller the value, the higher the preference.

Table 2 Route types and default route preferences

Route type

Preference

Direct route

0

Static route

60

Unknown (route from an untrusted source)

256

 

Route backup

Route backup can improve network availability. When multiple routes are available to a destination, the route with the highest priority is the primary route and others are secondary routes.

The router forwards matching packets through the primary route. When the primary route fails, the route with the highest preference among the secondary routes is selected to forward packets. When the primary route recovers, the router uses it to forward packets.

Displaying and maintaining a routing table

Task

Command

Remarks

Display routing table information.

display ip routing-table [ verbose ] [ | { begin | exclude | include } regular-expression ]

Available in any view.

Display information about routes to a specific destination address.

display ip routing-table ip-address [ mask | mask-length ] [ longer-match ] [ verbose ] [ | { begin | exclude | include } regular-expression ]

Available in any view.

Display information about routes to a range of destination addresses.

display ip routing-table ip-address1 { mask | mask-length } ip-address2 { mask | mask-length } [ verbose ] [ | { begin | exclude | include } regular-expression ]

Available in any view.

Display information about routes installed by a routing protocol.

display ip routing-table protocol protocol [ inactive | verbose ] [ | { begin | exclude | include } regular-expression ]

Available in any view.

Display IPv4 route statistics.

display ip routing-table statistics [ | { begin | exclude | include } regular-expression ]

Available in any view.

Clear IPv4 route statistics.

reset ip routing-table statistics protocol { protocol | all }

Available in user view.

Display IPv6 routing table information.

display ipv6 routing-table [ verbose ] [ | { begin | exclude | include } regular-expression ]

Available in any view.

Display information about routes to a specific IPv6 destination address.

display ipv6 routing-table ipv6-address [ prefix-length ] [ longer-match ] [ verbose ] [ | { begin | exclude | include } regular-expression ]

Available in any view.

Display information about routes to a range of IPv6 destination addresses.

display ipv6 routing-table ipv6-address1 prefix-length1 ipv6-address2 prefix-length2 [ verbose ] [ | { begin | exclude | include } regular-expression ]

Available in any view.

Display routes installed by an IPv6 routing protocol.

display ipv6 routing-table protocol protocol [ inactive | verbose ] [ | { begin | exclude | include } regular-expression ]

Available in any view.

Display IPv6 route statistics.

display ipv6 routing-table statistics [ | { begin | exclude | include } regular-expression ]

Available in any view.

Clear IPv6 route statistics.

reset ipv6 routing-table statistics protocol { protocol | all }

Available in user view.

 

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Intelligent Storage
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
  • Technical Blogs
All Support
  • Become A Partner
  • Partner Policy & Program
  • Global Learning
  • Partner Sales Resources
  • Partner Business Management
  • Service Business
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网