H3C S9500 Command Manual-Release1648[v1.24]-03 IP Routing Volume

HomeSupportSwitchesH3C S9500 Series SwitchesReference GuidesCommand ReferencesH3C S9500 Command Manual-Release1648[v1.24]-03 IP Routing Volume
01-Static Route Commands
Title Size Download
01-Static Route Commands 82.09 KB

Chapter 1  Static Route Configuration Commands

 

&  Note:

The term "router” or the router icon in this document refers to a router in a generic sense or an S9500 switch running routing protocols.

 

1.1  Display Commands of the Routing Table

1.1.1  display ip routing-table

Syntax

display ip routing-table

View

Any view

Parameters

None

Description

Use the display ip routing-table command to display the routing table summary.

This command displays routing table information in summary form. Each line represents one route. The contents include destination address/mask length, protocol, preference, metric, next hop and output interface.

Only the current used route, namely, the best route, is displayed with the display ip routing-table command.

Examples

# View the summary of the routing table.

<H3C> display ip routing-table

Routing Table: public net

Destination/Mask   Protocol   Pre Cost        Nexthop    Interface

1.1.1.0/24         DIRECT        0   0       1.1.1.1 Vlan-interface1

1.1.1.1/32         DIRECT        0   0       127.0.0.1   InLoopBack0

2.2.2.0/24         DIRECT        0   0       2.2.2.1 Vlan-interface2

2.2.2.1/32         DIRECT        0   0       127.0.0.1   InLoopBack0

3.3.3.0/24         DIRECT        0   0       3.3.3.1 Vlan-interface3

3.3.3.1/32         DIRECT        0   0       127.0.0.1   InLoopBack0

4.4.4.0/24         DIRECT        0   0       4.4.4.1 Vlan-interface4

4.4.4.1/32         DIRECT        0   0       127.0.0.1   InLoopBack0

127.0.0.0/8        DIRECT        0   0       127.0.0.1   InLoopBack0

127.0.0.1/32       DIRECT        0   0       127.0.0.1   InLoopBack0

Table 1-1 Description on the fields of the display ip routing-table command

Field

Description

Destination/Mask

Destination address/Mask length

Protocol

Routing protocol

Pre

Routing preference

Cost

Cost

Nexthop

Next hop address

Interface

Output interface, through which the data packet destined for the destination network segment is sent

 

1.1.2  display ip routing-table acl

Syntax

display ip routing-table acl { acl-number | acl-name } [ verbose ]

View

Any view

Parameters

acl-number: The number of basic ACL, ranging from 2000 to 2999.

acl-name: The basic ACL name introduced via names.

verbose: With the parameter, this command displays the verbose information of both the Active and Inactive routes that passed filtering rules. Without the parameter, this command only displays the summary of the Active routes that passed filtering rules.

Description

Use the display ip routing-table acl command to display the route filtered through specified basic access control list (ACL).

This command is used in track display of route policy to display the route that passed the filtering rule according the input basic ACL number or name.

The command is used to display only the routes that passed basic ACL filtering rules.

Examples

# Display the summary of Active routes that are filtered through basic ACL 2000.

[H3C] acl number 2000

[H3C-acl-basic-2000] rule permit source 10.1.1.1 0.0.0.255

[H3C-acl-basic-2000] rule deny source any

[H3C-acl-basic-2000] display ip routing-table acl 2000

Routes matched by access-list 2000:

Summary count: 4

Destination/Mask   Protocol Pre  Cost        Nexthop       Interface

10.1.1.0/24  DIRECT  0   0   10.1.1.2        Vlan-interface1

10.1.1.2/32  DIRECT  0   0   127.0.0.1      InLoopBack0

For detailed description of the output information, see Table 1-1.

# Display the verbose information of the Active and Inactive routes that are filtered through basic ACL 2000.

<H3C> display ip routing-table acl 2000 verbose

Routes matched by access-list 2000:

  + = Active Route, - = Last Active, # = Both   * = Next hop in use

 

  Summary count: 2

 

**Destination: 10.1.1.0         Mask: 255.255.255.0

        Protocol: #DIRECT       Preference: 0

        *NextHop: 10.1.1.2         Interface: 10.1.1.2(Vlan-interface1)

        Vlinkindex: 0

        State: <Int ActiveU Retain Unicast>

        Age: 7:24       Cost: 0/0       Tag: 0

 

**Destination: 10.1.1.2         Mask: 255.255.255.255

        Protocol: #DIRECT       Preference: 0

        *NextHop: 127.0.0.1        Interface: 127.0.0.1(InLoopBack0)

        Vlinkindex: 0

        State: <NoAdvise Int ActiveU Retain Gateway Unicast>

        Age: 7:24       Cost: 0/0       Tag: 0

Table 1-2 Description on the fields of the display ip routing-table acl verbose command

Field

Description

Destination

Destination address

Mask

Mask

Protocol

Routing protocol

Preference

Routing preference

Nexthop

Next hop address

Interface

Output interface, through which the data packet destined for the destination network segment is sent

Vlinkindex

Virtual link index

State

Route state description:

ActiveU

Valid unicast route. U stands for unicast.

Blackhole

Blackhole route is similar to Reject route, but it will not send the ICMP unreachable message to the source end

Delete

The route is deleted

Gateway

Indicates that the route is not directly reachable

Hidden

The route exists, but it is unavailable temporarily for some reasons (e.g., configured policy or interface is Down). Moreover, you do not wish to delete it. Therefore, you need to hide it, so as to restore it again later

Holddown

Holddown is one kind of route redistribution policy adopted by some distance-vector (D-V) routing protocols (e.g., RIP), through which these routing protocols can avoid the flooding of error routes and deliver the routing unreachable message accurately. For example, the RIP imports a certain route every a period of time regardless of whether the actually found routes destined for the same destination change. For more details, refer to the specific routing protocols.

Int

The route is discovered by interior gateway protocol (IGP).

NoAdvise

The routing protocol does not import NoAdvise route when it imports routes based on the policy.

NotInstall

The routing protocol generally selects the route with the highest precedence from its routing table, then places it in its core routing table and imports it. Although the NotInstall route cannot be placed in the core routing table, it is possibly that it is selected and imported.

Reject

Unlike the normal routes, the Reject route will discard the packets that select it as their route, and the router will send ICMP unreachable message to the source end. Reject route is usually used for the network test

Retain

When the routes from the core routing table are deleted, the routes with the Retain flag will not be deleted. Using this function you can set the Retain flag for some static routes, so that they can exist in the core routing table.

Static

The route with Static flag will not be cleared from the routing table after you save it and reboot the router. Generally, the static route configured manually in the router belongs to a Static route.

Unicast

Unicast route

Age

Lifetime of a route entry, in hh : mm : ss, where hh is hours, mm is minutes, and ss is seconds. The displayed time should be read from right to left. For example, 7:24 indicates that the lifetime of a route is seven hours and 24 minutes.

Cost

Value of the cost

Tag

Route tag

 

1.1.3  display ip routing-table ip-address

Syntax

display ip routing-table ip-address [ mask | mask-length ] [ longer-match ] [ verbose ]

View

Any view

Parameters

ip-address: Destination IP address, in dotted decimal format.

mask: IP address mask, length in dotted decimal notation or integer. It ranges from 0 to 32 when it is expressed with integer.

mask-length: Mask length. 1s in a 32-bit mask must be contiguous; therefore, a mask in dotted decimal notation format can be represented by mask-length. (mask-length is the number of contiguous 1s in the mask.)

longer-match: Address route matching the destination address in natural mask range.

verbose: With the verbose argument, this command displays the verbose information of both the Active and Inactive routes. Without the parameter, this command only displays the summary of Active routes.

Description

Use the display ip routing-table ip-address command to display the routing information of the specified destination address.

With different parameters, the output of command is different. The following is the output description for different forms of this command:

l           display ip routing-table ip-address

If destination address, ip-address, has corresponding route in natural mask range, this command will display all subnet routes or only the route best matching the destination address, ip-address, is displayed. And only the Active matching route is displayed.

l           display ip routing-table ip-address mask,

This command only displays the route fully matching with specified destination address and mask.

l           display ip routing-table ip-address longer-match

This command displays all destination address route matching with destination address in the natural mask range.

Examples

# There is a corresponding route in natural mask range. Display the summary.

<H3C>display ip routing-table 169.0.0.0

Destination/Mask   Protocol Pre  Cost        Nexthop         Interface

169.0.0.0/16       STATIC   60   0           192.168.1.2     Vlan-interface10

169.0.0.0/8        STATIC   60   0           192.168.1.2     Vlan-interface10

For detailed description of the output information, see Table 1-1.

# There is no corresponding route (only the longest matching route is displayed) in natural mask range and summary is displayed.

<H3C>display ip routing-table 192.168.1.2

Destination/Mask   Protocol Pre  Cost        Nexthop         Interface

192.168.1.0/24     DIRECT   0    0           192.168.1.1     Vlan-interface10

# There are corresponding routes in the natural mask range. Display the detailed information.

<H3C> display ip routing-table 169.0.0.0 verbose

Routing tables:

  Generate Default: no

  + = Active Route, - = Last Active, # = Both    * = Next hop in use

 

  Summary count: 2

 

**Destination: 169.0.0.0         Mask: 255.255.0.0

         Protocol: #STATIC       Preference: 60

         *NextHop: 192.168.1.2      Interface: 192.168.1.1(Vlan-interface10)

         Vlinkindex: 0

         State: <Int ActiveU Gateway Static Unicast>

         Age: 10:20      Cost: 0/0       Tag: 0

 

**Destination: 169.0.0.0         Mask: 255.0.0.0

         Protocol: #STATIC       Preference: 60

         *NextHop: 192.168.1.2      Interface: 192.168.1.1(Vlan-interface10)

         Vlinkindex: 0

         State: <Int ActiveU Gateway Static Unicast>

         Age: 4:39       Cost: 0/0       Tag: 0   

# There are no corresponding routes in the natural mask range (only displaying the longest matched route). Display the detailed information.

<H3C> display ip routing-table 169.168.1.2 verbose

Routing tables:

  Generate Default: no

  + = Active Route, - = Last Active, # = Both    * = Next hop in use

 

  Summary count: 1

 

**Destination: 192.168.1.0       Mask: 255.255.255.0

         Protocol: #DIRECT       Preference: 0

         *NextHop: 192.168.1.1      Interface: 192.168.1.1(Vlan-interface10)

         Vlinkindex: 0

         State: <Int ActiveU Retain Unicast>

         Age: 12:51      Cost: 0/0       Tag: 0   

For detailed description of the output information, see Table 1-2.

1.1.4  display ip routing-table ip-address1 ip-address2

Syntax

display ip routing-table ip-address1 mask1 ip-address2 mask2 [ verbose ]

View

Any view

Parameters

ip-address1, ip-address2: Destination IP address in dotted decimal notation. ip-address1, mask1, mask2 and ip-address2 determine one address range together. ANDing ip-address1 with mask1 specifies the start of the range while ANDing ip-address2 with mask2 specifies the end. This command is used to display the routes in this address range.

mask1, mask2: IP address mask, length in dotted decimal notation or integer form. It ranges from 0 to 32 when it is presented in integer.

verbose: With the verbose keyword, this command displays the verbose information of both the active and inactive routes. Without the parameter, this command only displays the summary of Active routes.

Description

Use the display ip routing-table ip-address1 ip-address2 command to display the route information in the specified address range.

Examples

# Display the routing information of destination addresses ranging from 1.1.1.0 to 2.2.2.0.

<H3C> display ip routing-table 1.1.1.0 24 2.2.2.0 24

Routing tables:

  Summary count: 3

Destination/Mask   Protocol   Pre Cost        Nexthop      Interface

1.1.1.0/24         DIRECT    0  0                  1.1.1.1         Vlan-interface1

1.1.1.1/32         DIRECT    0  0           127.0.0.1    InLoopBack0

2.2.2.0/24         DIRECT    0  0                    2.2.2.1         Vlan-interface2

For detailed description of the output information, see Table 1-1.

1.1.5  display ip routing-table ip-prefix

Syntax

display ip routing-table ip-prefix ip-prefix-name [ verbose ]

View

Any view

Parameters

ip-prefix-name: ip prefix list name.

verbose: With the parameter, this command displays the verbose information of both the active and inactive routes that passed filtering rules. Without the parameter, this command displays the summary of the active routes that passed filtering rules.

Description

Use the display ip routing-table ip-prefix command to display the route information that passed the filtering rule according the input ip prefix list name.

This command is mainly used to trace the route-policy and display the corresponding route information.

If there is no specified address prefix list, this command will display the verbose information of all Active and Inactive routes with the verbose keyword and it will display the summary of all Active routes without the verbose keyword.

Examples

# Configure the ip prefix list abc2, allowing the routes with the prefix as 10.1.1.0 and a mask length in the range 24 to 32 to pass.

[H3C] ip ip-prefix abc2 permit 10.1.1.0 24 less-equal 32

<H3C> dis ip routing-table protocol static

STATIC Routing tables:

  Summary count: 3

STATIC Routing table status:<active>:

  Summary count: 3

Destination/Mask   Protocol Pre  Cost        Nexthop         Interface

10.1.0.0/16        STATIC   60   0           48.48.48.2      Vlan-interface48

10.1.1.0/24        STATIC   60   0           48.48.48.2      Vlan-interface48

10.1.1.2/32        STATIC   60   0           48.48.48.2      Vlan-interface48

STATIC Routing table status:<inactive>:

  Summary count: 0       

<H3C> display ip routing-table ip-prefix abc2

Routes matched by ip-prefix abc2:

  Summary count: 2

Destination/Mask   Protocol Pre  Cost        Nexthop         Interface

10.1.1.0/24        STATIC   60   0           48.48.48.2      Vlan-interface48

10.1.1.2/32        STATIC   60   0           48.48.48.2      Vlan-interface48

For detailed description of the output information, see Table 1-1.

# Display the details of the active and inactive routes filtered by the prefix list abc2.

<H3C> display ip routing-table ip-prefix abc2 verbose

Routes matched by ip-prefix abc2:

  Generate Default: no

  + = Active Route, - = Last Active, # = Both    * = Next hop in use

 

  Summary count: 2

 

**Destination: 10.1.1.0          Mask: 255.255.255.0

         Protocol: #STATIC       Preference: 60

         *NextHop: 48.48.48.2       Interface: 48.48.48.1(Vlan-interface48)

         Vlinkindex: 0

         State: <Int ActiveU Gateway Static Unicast>

         Age: 12:42      Cost: 0/0       Tag: 0

 

**Destination: 10.1.1.2          Mask: 255.255.255.255

         Protocol: #STATIC       Preference: 60

         *NextHop: 48.48.48.2       Interface: 48.48.48.1(Vlan-interface48)

         Vlinkindex: 0

         State: <Int ActiveU Gateway Static Unicast>

         Age: 12:48      Cost: 0/0       Tag: 0 

For explanations of the above information, see Table 1-2.

1.1.6  display ip routing-table protocol

Syntax

display ip routing-table protocol protocol [ inactive | verbose ] [ vpn-instance vpn-instance-name ]

View

Any view

Parameters

inactive: With the parameter, this command displays the inactive route information. Without the parameter, this command displays the active and inactive route information.

verbose: With the verbose keyword, this command displays the verbose route information. Without the parameter, this command displays the route summary.

protocol: The parameter has multiple selectable values:

l           direct: Displays direct connection route information

l           static: Displays the static route information.

l           bgp: Displays BGP route information.

l           isis: Displays IS-IS route information.

l           ospf: Displays OSPF route information.

l           ospf-ase: Displays OSPF ASE route information.

l           ospf-nssa: Displays OSPF NSSA route information.

l           rip: Displays RIP route information.

l           nat: Displays NAT route information.

vpn-instance-name: Indicates a VPN instance name.

Description

Use the display ip routing-table protocol command to display the route information of specified protocol.

Examples

# Display all direct connection routes summary.

<H3C> display ip routing-table protocol direct

DIRECT Routing tables:

Summary count: 4

DIRECT Routing tables status:<active>:

Summary count: 3

Destination/Mask     Protocol    Pre Cost    Nexthop     Interface

20.1.1.1/32          DIRECT          0   0       127.0.0.1   InLoopBack0

127.0.0.0/8          DIRECT          0   0       127.0.0.1   InLoopBack0

127.0.0.1/32         DIRECT          0   0       127.0.0.1   InLoopBack0

DIRECT Routing tables status:<inactive>:

Summary count: 1

Destination/Mask     Protocol   Pre  Cost    Nexthop     Interface

210.0.0.1/32         DIRECT      0       0       127.0.0.1   InLoopBack0

# View the static routing table.

<H3C> display ip routing-table protocol static

STATIC Routing tables:

  Summary count: 1

STATIC Routing tables status:<active>:

  Summary count: 0

STATIC Routing tables status:<inactive>:

  Summary count: 1

Destination/Mask   Protocol   Pre Cost       Nexthop      Interface

1.2.3.0/24          STATIC     60  0          1.2.4.5      Vlan-interface10

STATIC Routing tables status:<inactive>:

  Summary count: 1

For detailed description of the output information, see Table 1-1.

1.1.7  display ip routing-table radix

Syntax

display ip routing-table radix

View

Any view

Parameters

None

Description

Use the display ip routing-table radix command to display route information in tree format.

Examples

# Display route information in tree format.

<H3C> display ip routing-table radix

Radix tree for INET (2) inodes 7 routes 5:

             +-32+--{210.0.0.1

         +--0+

          | | +--8+--{127.0.0.0

          | | | +-32+--{127.0.0.1

          | +--1+

          | +--8+--{20.0.0.0

          | +-32+--{20.1.1.1

Table 1-3 Description on the fields of the display ip routing-table radix command

Field

Description

INET

Address suite

inodes

Number of nodes

routes

Number of routes

 

1.1.8  display ip routing-table statistics

Syntax

display ip routing-table statistics

View

Any view

Parameters

None

Description

Use the display ip routing-table statistics command to display the integrated routing information.

The integrated routing information includes total route amount, the route amount added or deleted by protocol, amount of the routes that are labeled “Deleted” but not deleted, and the Active route amount.

Examples

# Display the integrated route information.

<H3C> display ip routing-table statistics

Routing tables:

Proto      route       active      added       deleted

DIRECT     24          4           25          1

STATIC     4           1           4           0

BGP        0           0           0           0

RIP        0           0           0           0

IS-IS      0           0           0           0

OSPF       0           0           0           0

O_ASE      0           0           0           0

O_NSSA     0           0           0           0

AGGRE      0           0           0           0

Total      28          5           29          1

Table 1-4 Description on the fields of the display ip routing-table statistics command

Field

Description

Proto

Routing protocol. O_ASE indicates OSPF_ASE routes, O_NSSA indicates OSPF_NSSA routes and AGGRE indicates aggregated routes.

Route

Number of routes

Active

Number of active routes

Added

Number of added routes after the router is rebooted or the routing table is cleared last time

Deleted

Number of deleted routes (such routes will be freed in a period of time)

Total

Total number of the different kinds of routes

 

1.1.9  display ip routing-table vpn-instance

Syntax

display ip routing-table vpn-instance vpn-instance-name [ ip-address ] [ verbose ] [ statistics ]

View

Any view

Parameters

vpn-instance: Specifies VPN instance parameter.

vpn-instance-name: VPN instance name.

ip-address: Destination IP address, in dotted decimal notation.

verbose: Displays detailed route information.

statistics: Displays the statistics about all the routes.

Description

Use the display ip routing-table vpn-instance command to display the routing information about the VPN instance.

 

&  Note:

If an LSP tunnel is not established for the nexthop of some routes in the VPN, using the display ip routing-table vpn-instance vpn-instance-name statistics command does not display the number of actually active routes.

 

Examples

# View the routing information about the VPN instance.

<H3C> display ip routing-table vpn-instance vpn49-1

  vpn49-1   Route Information

 Routing Table:  vpn49-1   Route-Distinguisher:   49:1

Destination/Mask   Protocol Pre  Cost        Nexthop         Interface

77.77.77.77/32     STATIC        60          0           195.195.1.10    Vlan-interface1016

195.168.130.0/24   DIRECT       0          0           195.168.130.1   Vlan-interface1013

195.168.130.1/32   DIRECT   0     0           127.0.0.1       InLoopBack0

195.195.0.0/16     DIRECT       0         0           195.195.1.1     Vlan-interface1016

195.195.1.1/32     DIRECT   0     0           127.0.0.1       InLoopBack0

1.1.10  display ip routing-table verbose

Syntax

display ip routing-table verbose

View

Any view

Parameters

None

Description

Use the display ip routing-table verbose command to display the verbose routing table information.

With the verbose keyword, this command displays the verbose routing table information. The descriptor describing the route state will be displayed first, then the statistics of the entire routing table will be output and finally the verbose description of each route will be output.

All current routes, including inactive route and invalid route, can be displayed using the display ip routing-table verbose command.

Examples

# Display the verbose routing table information.

<H3C> display ip routing-table verbose

Routing Tables:

  Generate Default: no

  + = Active Route, - = Last Active, # = Both    * = Next hop in use

  Destinations: 3       Routes: 3

  Holddown: 0    Delete: 62      Hidden: 0

**Destination: 1.1.1.0           Mask: 255.255.255.0

         Protocol: #DIRECT       Preference: 0

         *NextHop: 1.1.1.1          Interface: 1.1.1.1(Vlan-interface1)

         State: <Int ActiveU Retain Unicast>

         Age: 20:17:41   Cost: 0/0

**Destination: 1.1.1.1           Mask: 255.255.255.255

         Protocol: #DIRECT       Preference: 0

         *NextHop: 127.0.0.1        Interface: 127.0.0.1(InLoopBack0)

         State: <NoAdvise Int ActiveU Retain Gateway Unicast>

         Age: 20:17:42   Cost: 0/0

**Destination: 2.2.2.0           Mask: 255.255.255.0

         Protocol: #DIRECT       Preference: 0

         *NextHop: 2.2.2.1          Interface: 2.2.2.1(Vlan-interface2)

         State: <Int ActiveU Retain Unicast>

         Age: 20:08:05   Cost: 0/0

First, display statistics of the whole routing table and then output detailed information of every route entry in turn. The meaning of route status is shown in Table 1-2, and the statistics of routing table is shown in the following table.

Table 1-5 Description on the fields of the display ip routing-table verbose command

Field

Description

Holddown

Number of held-down routes

Delete

Number of deleted routes

Hidden

Number of hidden routes

 

&  Note:

* = Next hop in use does not mean that this nexthop is actually used. A nexthop is actually used as long as the corresponding preference displayed is greater than 0.

 

1.2  Static Route Configuration Commands

1.2.1  delete static-routes all

Syntax

delete static-routes all

View

System view

Parameters

None

Description

Use the delete static-routes all command to delete all the static routes.

The system will request your confirmation before it deletes all the configured static routes.

Related commands: ip route-static, display ip routing-table.

Examples

# Delete all the static routes in the router.

[H3C] delete static-routes all

Are you sure to delete all the unicast static routes?[Y/N]

1.2.2  delete vpn-instance

Syntax

delete vpn-instance vpn-instance-name static-routes all

View

System view

Parameters

vpn-instance: Specifies VPN instance parameter.

vpn-instance-name: VPN instance name.

static-routes: VPN static route.

all: All static routes.

Description

Use the delete vpn-instance command to remove all the static routes of the VPN. When you use this command to remove the static routes, the system will prompt your acknowledgement. The system removes all configured static routes after the acknowledgement.

Related commands: ip route-static, display ip routing-table vpn-instance.

Examples

# Remove all static routes of the VPN.

[H3C] delete vpn-instance vp1 static-routes all

Are you sure to delete all the VPN static routes?[Y/N]

1.2.3  ip route-static

Syntax

ip route-static ip-address { mask | mask-length } { interface-type interface-number } [ nexthop-ip-address ] [ preference preference-value | tag tag-value ] * [ reject | blackhole ] [ description text ]

undo ip route-static ip-address { mask | mask-length } interface-type interface-number } [ nexthop-ip-address ] [ preference preference-value ]

ip route-static [ vpn-instance vpn-instance-name-list ] ip-address { mask | mask-length } { interface-type interface-number | vpn-instance vpn-instance-name nexthop-ip-address } [ public ] [ preference preference-value | tag tag-value | public ] * [ reject | blackhole ]  [ description text ]

undo ip route-static vpn-instance vpn-instance-name-list destination-ip-address { mask | mask-length } [ interface-name | vpn-instance vpn-nexthop-name ] nexthop-ip-address [ public ] [ preference preference-value ]

View

System view

Parameters

vpn-instance: Specifies VPN instance parameter.

vpn-instance-name-list: VPN instance name list. vpn-instance-name-list= vpn-instance-name & <1-6>. &<1-6> in the command represents that the preceding parameter can be input repeatedly up to 6 times.

ip-address: Destination IP address in dotted decimal notation.

mask: Mask.

mask-length: Mask length. Since "1" s in the 32-bit mask are required to be consecutive, the mask in dotted decimal format can be replaced by mask-length, which is the number of the consecutive "1" s in the mask.

vpn-instance-name: Name of a VPN instance.

interface-type interface-number: Specifies the outgoing interface for the next hop. The null interface is a kind of virtual interface, where data packets are discarded directly to decrease the system load.

nexthop-ip-address: Specifies the next hop IP address of the route, in dotted decimal format.

preference-value: Preference level of the route in the range from 1 to 255.

tag-value: Tag value of the static route.

public: Configures a public static route.

reject: Indicates an unreachable route. When a static route to a destination has the reject attribute, all the IP packets to this destination will be discarded, and the source host will be informed that the destination is unreachable.

blackhole: Indicates a blackhole route. If a static route to a destination has the blackhole attribute, the outgoing interface of this route is the Null 0 interface regardless of the next hop address, and any IP packets addressed to this destination are dropped without notifying the source host.

description text: Configures description for the static route.

Description

Use the ip route-static command to configure a static route.

Use the undo ip route-static command to delete the configured static route.

Use the ip route-static vpn-instance command to configure a static route. When a multi-role host is used, you can configure a static route in a private network with an interface of another private network or public network as its outgoing interface.

Use the undo ip route-static vpn-instance command to remove the static route.

By default, the system can obtain the sub-net route directly connected with the router. If you do not specify the preference when you configure a static route, the default preference of 60 will be used. If not specified as reject or blackhole, the route will be reachable by default. The tag value of the static route defaults to 0.

Precautions for static route configuration:

l           When the destination IP address and the mask are both 0.0.0.0, it is the configured default route. If it is failed to detect the routing table, a packet will be forwarded along the default route.

1)         For different configurations of preference, flexible routing management policy can be adopted. For example, specifying the same preference for different routes to the same destination address enables load sharing on the routes, while specifying different preferences for them implements route backup.

2)         You can change the tag value of a static route that is used by a routing protocol to flexibly control the advertisement of the static route.

3)         To configure a static route, you can either specify an outgoing interface or a nexthop address, depending on the actual condition.

l           For interfaces that support resolution between network address and link layer address or point-to-point interfaces, you can specify either the outgoing interface or nexthop address.

l           For NBMA interfaces, such as the X.25 or ATM interfaces and dial-up ports, which support point-to-multipoint networks, a mapping between IP address to link layer address must be established at the link layer in addition to IP route configuration. In this case, to configure a static route, you need to specify the nexthop IP address instead of an outgoing interface.

4)         You cannot configure a VT interface as the outgoing interface. 

5)         You can configure a description for a static route.

l           In some cases, such as when link layer is encapsulated with PPP, you may have no idea about the peer address when configuring the router. In such a case, you can specify an outgoing interface so that you do not need to modify the router configuration when the peer address is changed.

Related commands: display ip routing-table.

Note that if you configure static routes for the specified interface, you must specify the right next hop at the same time.

Examples

# Configure the next hop of the default route as 129.102.0.2.

[H3C] ip route-static 0.0.0.0 0.0.0.0 129.102.0.2

# Configure static route 129.102.0.2 255.255.255.0 in multiple VPNs.

[H3C] ip route-static vpn-instance vpn1 vpn2 vpn3 129.102.0.2 255.255.255.0 null 0

# Configure static route 100.1.1.1 16 1.1.1.2, setting its tag value to 100.

[H3C] ip route-static 100.1.1.1 16 1.1.1.2 tag 100

# Configure static route 100.1.1.1 16 1.1.1.2, setting a description of switch for it.

[H3C] ip route-static 100.1.1.1 16 1.1.1.2 description switch

 

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
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
新华三官网