16-Routing Protocol Command

Download

Table of Contents

Chapter 1 IP Routing Table Commands. 1-1

1.1 IP Routing Table Commands. 1-1

1.1.1 display ip routing-table. 1-1

1.1.2 display ip routing-table acl 1-3

1.1.3 display ip routing-table ip-address. 1-7

1.1.4 display ip routing-table ip-address1 ip-address2. 1-8

1.1.5 display ip routing-table ip-prefix. 1-9

1.1.6 display ip routing-table protocol 1-10

1.1.7 display ip routing-table radix. 1-11

1.1.8 display ip routing-table statistics. 1-12

1.1.9 display ip routing-table verbose. 1-13

1.1.10 reset ip routing-table statistics protocol 1-14

Chapter 2 Static Route Configuration Commands. 2-1

2.1 Static Route Configuration Commands. 2-1

2.1.1 delete static-routes all 2-1

2.1.2 ip route-static. 2-2

Chapter 3 RIP Configuration Commands. 3-1

3.1 RIP Configuration Commands. 3-1

3.1.1 checkzero. 3-1

3.1.2 default cost 3-2

3.1.3 display rip. 3-2

3.1.4 display rip interface. 3-4

3.1.5 display rip routing. 3-5

3.1.6 filter-policy export 3-6

3.1.7 filter-policy import 3-7

3.1.8 host-route. 3-8

3.1.9 import-route. 3-9

3.1.10 network. 3-10

3.1.11 peer 3-11

3.1.12 preference. 3-12

3.1.13 reset 3-12

3.1.14 rip. 3-13

3.1.15 rip authentication-mode. 3-14

3.1.16 rip input 3-15

3.1.17 rip metricin. 3-16

3.1.18 rip metricout 3-17

3.1.19 rip output 3-18

3.1.20 rip split-horizon. 3-18

3.1.21 rip version. 3-19

3.1.22 rip work. 3-20

3.1.23 summary. 3-21

3.1.24 timers. 3-22

3.1.25 traffic-share-across-interface. 3-23

Chapter 4 OSPF Configuration Commands. 4-1

4.1 OSPF Configuration Commands. 4-1

4.1.1 abr-summary. 4-1

4.1.2 area. 4-2

4.1.3 asbr-summary. 4-2

4.1.4 authentication-mode. 4-3

4.1.5 default 4-5

4.1.6 default-cost 4-6

4.1.7 default-route-advertise. 4-7

4.1.8 display router id. 4-8

4.1.9 display ospf abr-asbr 4-9

4.1.10 display ospf asbr-summary. 4-10

4.1.11 display ospf brief 4-11

4.1.12 display ospf cumulative. 4-14

4.1.13 display ospf error 4-16

4.1.14 display ospf interface. 4-19

4.1.15 display ospf lsdb. 4-21

4.1.16 display ospf nexthop. 4-24

4.1.17 display ospf peer 4-25

4.1.18 display ospf request-queue. 4-29

4.1.19 display ospf retrans-queue. 4-30

4.1.20 display ospf routing. 4-31

4.1.21 display ospf vlink. 4-32

4.1.22 filter-policy export 4-34

4.1.23 filter-policy import 4-35

4.1.24 import-route. 4-36

4.1.25 log-peer-change. 4-37

4.1.26 multi-path-number 4-38

4.1.27 network. 4-39

4.1.28 nssa. 4-40

4.1.29 ospf 4-41

4.1.30 ospf authentication-mode. 4-42

4.1.31 ospf cost 4-44

4.1.32 ospf dr-priority. 4-44

4.1.33 ospf mib-binding. 4-45

4.1.34 ospf mtu-enable. 4-46

4.1.35 ospf network-type. 4-47

4.1.36 ospf timer dead. 4-48

4.1.37 ospf timer hello. 4-49

4.1.38 ospf timer poll 4-50

4.1.39 ospf timer retransmit 4-51

4.1.40 ospf trans-delay. 4-51

4.1.41 peer 4-52

4.1.42 preference. 4-53

4.1.43 reset ospf 4-54

4.1.44 reset ospf statistics. 4-54

4.1.45 router id. 4-55

4.1.46 silent-interface. 4-56

4.1.47 snmp-agent trap enable ospf 4-57

4.1.48 spf-schedule-interval 4-58

4.1.49 stub. 4-59

4.1.50 vlink-peer 4-60

Chapter 5 BGP Configuration Commands. 5-1

5.1 BGP Configuration Commands. 5-1

5.1.1 aggregate. 5-1

5.1.2 bgp. 5-2

5.1.3 compare-different-as-med. 5-3

5.1.4 confederation id. 5-4

5.1.5 confederation nonstandard. 5-5

5.1.6 confederation peer-as. 5-6

5.1.7 dampening. 5-7

5.1.8 default local-preference. 5-8

5.1.9 default med. 5-9

5.1.10 default-route imported. 5-10

5.1.11 display bgp group. 5-10

5.1.12 display bgp network. 5-11

5.1.13 display bgp paths. 5-12

5.1.14 display bgp peer 5-13

5.1.15 display bgp routing. 5-15

5.1.16 display bgp routing as-path-acl 5-17

5.1.17 display bgp routing cidr 5-17

5.1.18 display bgp routing community. 5-18

5.1.19 display bgp routing community-list 5-19

5.1.20 display bgp routing dampened. 5-20

5.1.21 display bgp routing different-origin-as. 5-21

5.1.22 display bgp routing flap-info. 5-21

5.1.23 display bgp routing peer 5-23

5.1.24 display bgp routing regular-expression. 5-24

5.1.25 display bgp routing statistic. 5-25

5.1.26 filter-policy export 5-25

5.1.27 filter-policy import 5-26

5.1.28 group. 5-27

5.1.29 import-route. 5-28

5.1.30 ipv4-family. 5-29

5.1.31 log-peer-change. 5-30

5.1.32 network. 5-30

5.1.33 peer advertise-community. 5-31

5.1.34 peer allow-as-loop. 5-32

5.1.35 peer as-number 5-33

5.1.36 peer as-path-acl export 5-33

5.1.37 peer as-path-acl import 5-35

5.1.38 peer connect-interface. 5-36

5.1.39 peer default-route-advertise. 5-37

5.1.40 peer description. 5-37

5.1.41 peer ebgp-max-hop. 5-38

5.1.42 peer enable. 5-39

5.1.43 peer filter-policy export 5-40

5.1.44 peer filter-policy import 5-40

5.1.45 peer group. 5-41

5.1.46 peer ip-prefix export 5-42

5.1.47 peer ip-prefix import 5-43

5.1.48 peer next-hop-invariable. 5-43

5.1.49 peer next-hop-local 5-44

5.1.50 peer password. 5-45

5.1.51 peer public-as-only. 5-46

5.1.52 peer reflect-client 5-47

5.1.53 peer route-limit 5-47

5.1.54 peer route-policy export 5-49

5.1.55 peer route-policy import 5-49

5.1.56 peer route-update-interval 5-50

5.1.57 peer shutdown. 5-51

5.1.58 peer timer 5-52

5.1.59 preference. 5-53

5.1.60 reflect between-clients. 5-53

5.1.61 reflector cluster-id. 5-54

5.1.62 refresh bgp. 5-55

5.1.63 reset bgp. 5-56

5.1.64 reset bgp dampening. 5-56

5.1.65 reset bgp flap-info. 5-57

5.1.66 reset bgp group. 5-58

5.1.67 router id. 5-58

5.1.68 summary. 5-59

5.1.69 timer 5-60

5.1.70 undo synchronization. 5-60

Chapter 6 IP Routing Policy Configuration Commands. 6-1

6.1 IP Routing Policy Configuration Commands. 6-1

6.1.1 apply as-path. 6-1

6.1.2 apply community. 6-2

6.1.3 apply cost 6-3

6.1.4 apply cost-type. 6-3

6.1.5 apply ip next-hop. 6-4

6.1.6 apply local-preference. 6-5

6.1.7 apply origin. 6-6

6.1.8 apply tag. 6-6

6.1.9 display ip ip-prefix. 6-7

6.1.10 display route-policy. 6-8

6.1.11 if-match { acl | ip-prefix } 6-9

6.1.12 if-match as-path. 6-10

6.1.13 if-match community. 6-10

6.1.14 if-match cost 6-11

6.1.15 if-match interface. 6-12

6.1.16 if-match ip next-hop. 6-13

6.1.17 if-match tag. 6-14

6.1.18 ip as-path-acl 6-14

6.1.19 ip community-list 6-15

6.1.20 ip ip-prefix. 6-16

6.1.21 route-policy. 6-17

Chapter 7 Route Capacity Configuration Commands. 7-1

7.1 Route Capacity Configuration Commands. 7-1

7.1.1 display memory. 7-1

7.1.2 display memory limit 7-2

7.1.3 memory. 7-3

7.1.4 memory auto-establish disable. 7-4

7.1.5 memory auto-establish enable. 7-5

 


Chapter 1  IP Routing Table Commands

 

&  Note:

The term router in this chapter refers to a router in a generic sense or an Ethernet switch running a routing protocol.

 

1.1  IP Routing Table Commands

1.1.1  display ip routing-table

Syntax

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

View

Any view

Parameters

regular-expression: Regular expression, a string of 1 to 256 case-sensitive characters used for specifying routing entries.

|: Uses the regular expression to match the output routing information.

begin: Displays the routing information from the route entry containing the specified character string.

include: Displays all routing information containing the specified character string.

exclude: Displays all routing information without the specified character string.

 

&  Note:

For details about regular expressions, refer to Configuration File Management Operation of this manual.

 

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.

Examples

# Display the summary of the current routing table.

<Sysname> 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

# Display the routing information from the entry containing the character string interface4in the current routing table.

<Sysname> display ip routing-table | begin interface4

Routing Table: public net

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

# Display the routing information containing the character string interface4 in the current routing table.

<Sysname> display ip routing-table | include interface4

Routing Table: public net

Destination/Mask   Protocol   Pre Cost  Nexthop     Interface

4.4.4.0/24         DIRECT        0   0       4.4.4.1     Vlan-interface4

# Display the routing information without the character string interface4in the current routing table.

<Sysname> display ip routing-table | exclude interface4

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

Syntax

display ip routing-table acl acl-number [ verbose ]

View

Any view

Parameters

acl-number: Basic access control list number, in the range of 2000 to 2999.

verbose: With this keyword specified, detailed information of routes in the active or inactive state that match the ACL is displayed. With this keyword not specified, brief information of only the routes in the active state that match the ACL is displayed.

Description

Use the display ip routing-table acl command to display the information of routes that match the specified ACL.

Examples

# Display the information of ACL 2100.

<Sysname> display acl 2100

Basic ACL  2100, 1 rule

Acl's step is 1

rule 0 permit source 192.168.1.0 0.0.0.255

For details about the display acl command, refer to ACL Command.

# Display the information of routes that match ACL 2100.

<Sysname> display ip routing-table acl 2100

Routes matched by access-list 2100:

  Summary count: 2

Destination/Mask   Protocol  Pre  Cost      Nexthop        Interface

192.168.1.0/24     DIRECT    0    0         192.168.1.2     Vlan-interface2

192.168.1.2/32     DIRECT    0    0         127.0.0.1       InLoopBack0

For descriptions of the above fields, refer to Table 1-1.

# Display the detailed information of routes that match ACL 2100.

<Sysname> display ip routing-table acl 2100 verbose

Routes matched by access-list 2100:

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

 

  Summary count: 3

 

**Destination: 192.168.1.0       Mask: 255.255.255.0

         Protocol: #DIRECT       Preference: 0

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

         State: <Int ActiveU Retain Unicast>

         Age: 21:34:13           Cost: 0/0

 

**Destination: 192.168.1.2       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: 21:34:13           Cost: 0/0  

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

Field

Description

Destination

Destination address

Mask

Subnet mask

Protocol

Protocol that discovers the route

Preference

Route preference

Nexthop

Next hop to the destination

Interface

Outbound interface through which data packets are forwarded to the destination network segment.

State

Description of route state:

ActiveU

An active unicast route, where “U” represents unicast.

Blackhole

A blackhole route is similar to a reject route, but no ICMP unreachable message is sent to the source.

Delete

A route is to be deleted.

Gateway

An indirect route.

Hidden

An existing route that is temporarily unavailable for some reason (for example, suppressed by a routing policy or down interface). However, deletion is not expected. It is therefore hidden so that it can recover later.

Holddown

Number of routes that are held down. Holddown is a route advertisement policy that some D-V based routing protocols (for example, RIP) use to avoid the spread of wrong routes but speed up the correct spread of ICMP unreachable messages. A certain route is advertised at intervals, no matter whether the currently discovered route to the same destination changes. For details, refer to the specific routing protocols.

Int

A route discovered by IGP.

NoAdvise

A routing protocol does not advertise any NoAdvise route when advertising routes in accordance with a routing policy.

NotInstall

A NonInstall route cannot be added to the core routing table, but may be advertised. A route with the highest priority is generally selected from the routing table, added to the core routing table, and then advertised.

Reject

The routes marked with reject do not guide the router to forward packets as a normal route does. The router discards the packets matching reject routes and sends an ICMP unreachable message to the source.

Reject routes are usually used for network tests.

Retain

The routes marked with retain will not be deleted when you delete routes in the core routing table. You can mark static routes with retain to make them stay in the core routing table.

Static

The routes marked with static will not be deleted from the routing table after you perform a save operation and restart the router. The routes manually configured on a router are marked with static.

Unicast

A unicast route.

Age

Lifetime of a route in the routing table, in the format of HH:MM:SS.

Cost

Cost of a route.

 

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

mask: Subnet mask, in dotted decimal notation.

mask-length: Length of a subnet mask, in the range of 0 to 32.

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: Displays the detailed information of 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.