17-Routing Protocol Command

Download

Table of Contents

Chapter 1 Static Route Configuration Commands. 1-1

1.1 Routing Table Monitoring Commands. 1-1

1.1.1 display ip routing-table. 1-1

1.1.2 display ip routing-table ip-address. 1-2

1.1.3 display ip routing-table ip-address1 ip-address2. 1-6

1.1.4 display ip routing-table protocol 1-7

1.1.5 display ip routing-table radix. 1-8

1.1.6 display ip routing-table statistics. 1-9

1.1.7 display ip routing-table verbose. 1-10

1.2 Static Route Configuration Commands. 1-11

1.2.1 delete static-routes all 1-11

1.2.2 ip route-static. 1-12

Chapter 2 RIP Configuration Commands. 2-1

2.1 RIP Configuration Commands. 2-1

2.1.1 checkzero. 2-1

2.1.2 default cost 2-2

2.1.3 display rip. 2-2

2.1.4 display rip interface. 2-4

2.1.5 display rip routing. 2-5

2.1.6 filter-policy export 2-6

2.1.7 filter-policy import 2-7

2.1.8 host-route. 2-8

2.1.9 import-route. 2-8

2.1.10 network. 2-10

2.1.11 peer 2-11

2.1.12 preference. 2-11

2.1.13 reset 2-12

2.1.14 rip. 2-13

2.1.15 rip authentication-mode. 2-13

2.1.16 rip input 2-15

2.1.17 rip metricin. 2-15

2.1.18 rip metricout 2-16

2.1.19 rip output 2-17

2.1.20 rip split-horizon. 2-18

2.1.21 rip version. 2-19

2.1.22 rip work. 2-19

2.1.23 summary. 2-20

2.1.24 timers. 2-21

2.1.25 traffic-share-across-interface. 2-22

Chapter 3 OSPF Configuration Commands. 3-1

3.1 OSPF Configuration Commands. 3-1

3.1.1 abr-summary. 3-1

3.1.2 area. 3-2

3.1.3 asbr-summary. 3-3

3.1.4 authentication-mode. 3-4

3.1.5 default cost 3-5

3.1.6 default interval 3-5

3.1.7 default limit 3-6

3.1.8 default tag. 3-7

3.1.9 default type. 3-8

3.1.10 default-cost 3-8

3.1.11 default-route-advertise. 3-9

3.1.12 display ospf abr-asbr 3-11

3.1.13 display ospf asbr-summary. 3-11

3.1.14 display ospf brief 3-13

3.1.15 display ospf cumulative. 3-15

3.1.16 display ospf error 3-16

3.1.17 display ospf interface. 3-19

3.1.18 display ospf lsdb. 3-20

3.1.19 display ospf nexthop. 3-23

3.1.20 display ospf peer 3-24

3.1.21 display ospf request-queue. 3-27

3.1.22 display ospf retrans-queue. 3-28

3.1.23 display ospf routing. 3-29

3.1.24 display ospf vlink. 3-30

3.1.25 filter-policy export 3-31

3.1.26 filter-policy import 3-32

3.1.27 import-route. 3-33

3.1.28 log-peer-change. 3-34

3.1.29 multi-path-number 3-35

3.1.30 network. 3-35

3.1.31 nssa. 3-36

3.1.32 ospf 3-37

3.1.33 ospf authentication-mode. 3-38

3.1.34 ospf cost 3-39

3.1.35 ospf dr-priority. 3-40

3.1.36 ospf mib-binding. 3-41

3.1.37 ospf mtu-enable. 3-41

3.1.38 ospf network-type. 3-42

3.1.39 ospf timer dead. 3-44

3.1.40 ospf timer hello. 3-44

3.1.41 ospf timer poll 3-45

3.1.42 ospf timer retransmit 3-46

3.1.43 ospf trans-delay. 3-47

3.1.44 peer 3-47

3.1.45 preference. 3-48

3.1.46 reset ospf 3-49

3.1.47 router id. 3-50

3.1.48 silent-interface. 3-50

3.1.49 snmp-agent trap enable ospf 3-51

3.1.50 spf-schedule-interval 3-52

3.1.51 stub. 3-53

3.1.52 vlink-peer 3-54

Chapter 4 IP Routing Policy Configuration Commands. 4-1

4.1 IP Routing Policy Configuration Commands. 4-1

4.1.1 apply cost 4-1

4.1.2 apply tag. 4-2

4.1.3 display ip ip-prefix. 4-2

4.1.4 display route-policy. 4-3

4.1.5 if-match. 4-4

4.1.6 if-match cost 4-5

4.1.7 if-match interface. 4-6

4.1.8 if-match ip next-hop. 4-7

4.1.9 if-match tag. 4-8

4.1.10 ip ip-prefix. 4-8

4.1.11 route-policy. 4-10

Chapter 5 Route Capacity Configuration Commands. 5-1

5.1 Route Capacity Configuration Commands. 5-1

5.1.1 display memory. 5-1

5.1.2 display memory limit 5-2

5.1.3 memory. 5-3

5.1.4 memory auto-establish disable. 5-4

5.1.5 memory auto-establish enable. 5-5

 


Chapter 1  Static Route Configuration Commands

 

&  Note:

When running a routing protocol, the Ethernet switch also functions as a router. The words “router” and the router icons covered in the following text represent routers in common sense and Ethernet switches running a routing protocol.

This manual deals with the S3600-EI series switches. The ospf, ospf-ase, and ospf-nssa commands are supported by the S3600-EI series, but not supported by any other S3600 Ethernet switch. This will not be mentioned again in this manual.

 

1.1  Routing Table Monitoring Commands

1.1.1  display ip routing-table

Syntax

display ip routing-table

View

Any view

Parameter

None

Description

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

This command displays the summary of the routing table. Each line represents one route, containing destination address/mask length, protocol, preference, cost, next hop, and output interface.

This command displays only the currently used routes, that is, the optimal routes.

Example

# Display the summary of the current 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

Route preference

Cost

Route cost

Nexthop

Next hop address

Interface

Output interface, through which the data packets destined for the destination network segment are sent

 

1.1.2  display ip routing-table ip-address

Syntax

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

View

Any view

Parameter

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

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

longer-match: Specifies all the routes that lead to the destination address and match the specified mask. If you do not specify the mask argument, those that match the natural mask are specified.

verbose: With the verbose argument specified, this command displays the verbose information of both the active and inactive routes. Without the argument specified, 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 arguments provided, the command output is different. The following is the command output with different arguments provided:

l           display ip routing-table ip-address

If the destination address ip-address corresponds to a route in the natural mask range, this command displays the route that is the longest match of the destination address ip-address and is active.

l           display ip routing-table ip-address mask

This command only displays the routes exactly matching the specified destination address and mask.

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

This command displays all destination address routes matching the specified destination address in the natural mask range.

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

This command displays all destination address routes matching the specified destination address in the specified mask range.

Example

# There is a corresponding route in the 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       2.1.1.1     LoopBack1

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

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

<H3C> display ip routing-table 169.253.0.0

Destination/Mask     Protocol    Pre     Cost    Nexthop     Interface

169.0.0.0/8          Static  60      0       2.1.1.1     LoopBack1

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

<H3C> display ip routing-table 169.0.0.0 verbose

Routing tables:

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

  Summary count: 1

**Destination: 169.0.0.0         Mask: 255.255.255.0

         Protocol: #STATIC       Preference: 60

         *NextHop: 2.1.1.1          Interface: 2.1.1.1(LoopBack1)

         Vlinkindex: 0

         State: <Int ActiveU Gateway Static Unicast>

         Age: 4:49       Cost: 0/0       Tag: 0  

# There is no corresponding route in the natural mask range (only the longest matched route is displayed). Display the detailed information.

<H3C> display ip routing-table 169.253.0.0 verbose

Routing Tables:

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

  Summary count:1

**Destination: 169.0.0.0       Mask: 255.0.0.0

         Protocol: #Static     Preference: -60

         *NextHop: 2.1.1.1        Interface: 2.1.1.1(LoopBack1)

         Vlinkindex: 0

         State: <Int ActiveU Static Unicast>

         Age: 3:47       Cost: 0/0       Tag: 0  

Table 1-2 Description on the fields of the display ip routing-table 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 packets destined for the destination network segment are sent

State

Route state description:

ActiveU

This is an active unicast route. "U" means "unicast".

Blackhole

Blackhole route is similar to Reject route, except that a Blackhole route sends no ICMP unreachable message to the source end.

Delete

The route is deleted

Gateway

The route is not directly reachable.

Hidden

The route is hidden. That is, the route exists, but it is hidden because it is unavailable for the moment due to some reason (e.g., a configured policy or a down interface) and is not expected to be deleted, and it can be restored later.

Holddown

Holddown is a route redistribution policy adopted by some distance-vector (D-V) routing protocols such as RIP. Through Holddown, a routing protocol can avoid the flooding of error routes and deliver route unreachable messages accurately. It redistributes 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 redistribute NoAdvise route when it redistributes routes based on the policy.

NotInstall

Normally, the routing protocol selects the route with the highest preference from its routing table, places it in its core routing table, and redistributes it. Although the NotInstall route cannot be placed in the core routing table, it is possibly that it is selected and redistributed.

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 messages to the source end. Reject route is usually used for the network test

Retain

When the routes from the routing table are deleted, the routes with Retain flag will not be deleted. Using this function you can set 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

Time to live, in the format of hour/minute/second (hh:mm:ss).

Cost

Value of the cost

 

1.1.3  display ip routing-table ip-address1 ip-address2

Syntax

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

View

Any view

Parameter

ip-address1, ip-address2: Destination IP address in dotted decimal notation. ip-address1, mask1 and ip-address2, mask2 determine one address range together. ip-address1 ANDed with mask1 specifies the start of the range, while ip-address2 ANDed with mask2 specifies the end. This command displays the route in this address range.

mask1, mask2: IP address mask, length in dotted decimal notation or expressed as an integer. It ranges from 0 to 32 when expressed as an integer.

verbose: With the verbose argument provided, this command displays the verbose information of both active and inactive routes. Without this argument provided, this command displays the summary of active routes only.

Description

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

Example

# 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.4  display ip routing-table protocol

Syntax

display ip routing-table protocol protocol [ inactive | verbose ]

View

Any view

Parameter

protocol: You can provide one of the following values for this argument.

l           direct: Displays direct-connect route information

l           static: Displays static 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.

inactive: With this argument provided, this command displays the inactive route information. Without this argument provided, this command displays both active and inactive route information.

verbose: With this argument provided, this command displays the verbose route information. Without this argument provided, this command displays route summary only.

Description

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

Example

# Display the summary of all direct-connect routes.

<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

# Display 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

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

1.1.5  display ip routing-table radix

Syntax

display ip routing-table radix

View

Any view

Parameter

None

Description

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

Example

<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.6  display ip routing-table statistics

Syntax

display ip routing-table statistics

View

Any view

Parameter

None

Description

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

The integrated routing information includes the total number of routes, the number of active routes, the number of routes added by protocols, and the number of routes deleted.

Example

# 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

RIP        0           0           0           0

OSPF       0           0           0           0

O_ASE      0           0           0           0

O_NSSA     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 stands for OSPF_ASE routes; O_NSSA stands for OSPF NSSA routes; AGGRE stands for aggregated routes.

route

Total number of routes

active

Number of active routes

added

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

deleted

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

Total

Total number of the different kinds of routes

 

1.1.7  display ip routing-table verbose

Syntax

display ip routing-table verbose

View

Any view

Parameter

None

Description

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

With the verbose argument provided, 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. Finally, the verbose description of each route will be output.

The display ip routing-table verbose command can display all current routes, including inactive routes and invalid routes.

Example

# Display the verbose routing table information.

<H3C> display ip routing-table verbose

Routing Tables:

  + = 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. Then, output detailed information of every route entry in turn. Table 1-2 shows the meaning of route status. Table 1-5 shows routing table statistics.

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

 

1.2  Static Route Configuration Commands

1.2.1  delete static-routes all

Syntax

delete static-routes all

View

System view

Parameter

None

Description

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

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

Related command: ip route-static and display ip routing-table.

Example

# Delete all the static routes in the router.

<H3C> system-view

System View: return to User View with Ctrl+Z. 

[H3C] delete static-routes all

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

1.2.2  ip route-static

Syntax

ip route-static ip-address { mask | mask-length } { interface-type interface-number | next-hop } [ preference preference-value ] [ reject | blackhole ] [ description text | detect-group group number ]*

undo ip route-static ip-address { mask | mask-length } [ interface-type interface-number | next-hop ] [ preference preference-value ] [ reject | blackhole ] [ description text | detect-group group number ]*

View

System view

Parameter

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

mask: Mask.

mask-length: Mask length. Since 1s in a 32-bit mask must be consecutive, a mask in dotted decimal notation can be replaced by mask-length, which is the number of the consecutive 1s in the mask.

interface-type interface-number: Next-hop outgoing interface. The packets sent to a null interface, which is a virtual interface, will be discarded immediately. This can decrease the system load.

next-hop: Next hop IP address of the route, in dotted decimal notation.

preference-value: Preference level of the route, in the range from 1 to 255. The default preference is 60.

reject: Indicates an unreachable route. If a static route to a destination has the "reject" attribute, all the IP packets destined for 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 all the IP packet addresses destined for this destination are dropped without the source host being notified.

description: Provides a description for the current route.

detect-group: Specifies a detect group.

Description

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

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

By default, the system can obtain the subnet route directly connected to the router. When you configure a static route, if no preference is specified for the route, the preference defaults to 60, and if the route is not specified as reject or blackhole, the route will be reachable by default.

When configuring a static route, note the following points:

l           If the destination IP address and the mask are both 0.0.0.0, what you are configuring is a default route. All the packets that fail to find a routing entry will be forwarded through this default route.

l           You cannot configure an interface address of the local switch as the next hop address of a static route.

l           You can configure a different preference to implement flexible route management policy.

Related command: display ip routing-table.

Example

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

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] ip route-static 0.0.0.0 0.0.0.0 129.102.0.2

 


Chapter 2  RIP Configuration Commands

 

&  Note:

When running a routing protocol, the Ethernet switch also functions as a router. The word “router” and the router icons covered in the following text represent routers in common sense and Ethernet switches running a routing protocol.

 

2.1  RIP Configuration Commands

2.1.1  checkzero

Syntax

checkzero

undo checkzero

View

RIP view

Parameter

None

Description

Use the checkzero command to enable zero field check of RIP-1 packets.

Use the undo checkzero command to disable zero field check.

By default, RIP-1 performs zero field check.

According to the protocol (RFC 1058) specifications, some fields in RIP-1 packets must be zero and these fields are called zero fields. You can use the checkzero command to enable/disable zero field check of RIP-1 packets. When zero field check is enabled, if an incoming RIP-1 packet has a non-zero zero field, the packet will be rejected.

This command does not apply to RIP-2 packets because they have no zero fields.

Example

# Disable zero field check on RIP-1 packets.

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] rip  

[H3C-rip] undo checkzero

2.1.2  default cost

Syntax

default cost value

undo default cost

View

RIP view

Parameter

value: Default routing cost to be set, ranging from 1 to 16. It is 1 by default.

Description

Use the default cost command to set the default routing cost of imported routes.

Use the undo default cost command to restore the default value.

If no routing cost is specified when you use the import-route command to import routes from another routing protocol, the routes will be imported with the default routing cost specified with the default cost command.

Related command: import-route.

Example

# Set the default routing cost of the routes imported from other routing protocols to 3.

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] rip

[H3C-rip] default cost 3

2.1.3  display rip

Syntax

display rip

View

Any view

Parameter

None

Description

Use the display rip command to display the current RIP operation state and RIP configuration.

Example

# Display the current RIP operation state and configuration.

<H3C> display rip

RIP is running

    Checkzero is on         Default cost : 1

    Summary is on           Preference : 100

    Traffic-share-across-interface is off

Period update timer : 30

    Timeout timer : 180

    Garbage-collection timer : 120

    No peer router

    Network :

    202.38.168.0      

Table 2-1 Description on the fields of the display rip command

Field

Description

RIP is running