H3C S7500 Series Command Manual(Release 3100 Series)-(V1.04)

HomeSupportSwitchesH3C S7500 Switch SeriesReference GuidesCommand ReferencesH3C S7500 Series Command Manual(Release 3100 Series)-(V1.04)
16-Routing Protocol Commands
Title Size Download
16-Routing Protocol Commands 721 KB

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 acl 1-2

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

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

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

1.1.6 display ip routing-table protocol 1-9

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.2 Static Route Configuration Commands. 1-14

1.2.1 delete static-routes all 1-14

1.2.2 ip route-static. 1-15

1.2.3 ip route-static default-preference. 1-16

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 routing. 2-3

2.1.5 filter-policy export 2-5

2.1.6 filter-policy import 2-6

2.1.7 host-route. 2-7

2.1.8 import-route. 2-8

2.1.9 network. 2-9

2.1.10 peer 2-10

2.1.11 preference. 2-11

2.1.12 reset 2-12

2.1.13 rip. 2-12

2.1.14 rip authentication-mode. 2-13

2.1.15 rip input 2-14

2.1.16 rip metricin. 2-15

2.1.17 rip metricout 2-16

2.1.18 rip output 2-17

2.1.19 rip split-horizon. 2-17

2.1.20 rip version. 2-18

2.1.21 rip work. 2-19

2.1.22 summary. 2-20

2.1.23 timers. 2-21

2.1.24 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-10

3.1.13 display ospf asbr-summary. 3-11

3.1.14 display ospf brief 3-13

3.1.15 display ospf cumulative. 3-14

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

3.1.22 display ospf retrans-queue. 3-27

3.1.23 display ospf routing. 3-28

3.1.24 display ospf vlink. 3-29

3.1.25 filter-policy export 3-30

3.1.26 filter-policy import 3-31

3.1.27 import-route. 3-32

3.1.28 network. 3-34

3.1.29 nssa. 3-35

3.1.30 ospf 3-36

3.1.31 ospf authentication-mode. 3-37

3.1.32 ospf cost 3-38

3.1.33 ospf dr-priority. 3-38

3.1.34 ospf mib-binding. 3-39

3.1.35 ospf mtu-enable. 3-40

3.1.36 ospf network-type. 3-40

3.1.37 ospf timer dead. 3-42

3.1.38 ospf timer hello. 3-43

3.1.39 ospf timer poll 3-43

3.1.40 ospf timer retransmit 3-44

3.1.41 ospf trans-delay. 3-45

3.1.42 peer 3-45

3.1.43 preference. 3-46

3.1.44 protocol multicast-mac enable. 3-47

3.1.45 reset ospf 3-48

3.1.46 router id. 3-49

3.1.47 silent-interface. 3-49

3.1.48 snmp-agent trap enable ospf 3-50

3.1.49 spf-schedule-interval 3-51

3.1.50 stub. 3-52

3.1.51 vlink-peer 3-52

Chapter 4 Integrated IS-IS Configuration Commands. 4-1

4.1 Integrated IS-IS Configuration Commands. 4-1

4.1.1 area-authentication-mode. 4-1

4.1.2 cost-style. 4-2

4.1.3 default-route-advertise. 4-3

4.1.4 display isis brief 4-4

4.1.5 display isis interface. 4-5

4.1.6 display isis lsdb. 4-6

4.1.7 display isis mesh-group. 4-6

4.1.8 display isis peer 4-7

4.1.9 display isis route. 4-8

4.1.10 display isis spf-log. 4-9

4.1.11 domain-authentication-mode. 4-10

4.1.12 filter-policy export 4-11

4.1.13 filter-policy import 4-12

4.1.14 ignore-lsp-checksum-error 4-13

4.1.15 import-route. 4-14

4.1.16 import-route isis level-2 into level-1. 4-15

4.1.17 isis. 4-16

4.1.18 isis authentication-mode. 4-17

4.1.19 isis circuit-level 4-18

4.1.20 isis cost 4-19

4.1.21 isis dis-priority. 4-20

4.1.22 isis enable. 4-20

4.1.23 isis mesh-group. 4-21

4.1.24 isis timer csnp. 4-22

4.1.25 isis timer hello. 4-23

4.1.26 isis timer holding-multiplier 4-24

4.1.27 isis timer lsp. 4-25

4.1.28 isis timer retransmit 4-26

4.1.29 is-level 4-26

4.1.30 log-peer-change. 4-27

4.1.31 md5-compatible. 4-28

4.1.32 network-entity. 4-29

4.1.33 preference. 4-30

4.1.34 reset isis all 4-30

4.1.35 reset isis peer 4-31

4.1.36 set-overload. 4-31

4.1.37 silent-interface. 4-32

4.1.38 spf-delay-interval 4-33

4.1.39 spf-slice-size. 4-34

4.1.40 summary. 4-34

4.1.41 timer lsp-max-age. 4-35

4.1.42 timer lsp-refresh. 4-36

4.1.43 timer spf 4-37

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

5.1.3 balance. 5-3

5.1.4 compare-different-as-med. 5-4

5.1.5 confederation id. 5-5

5.1.6 confederation nonstandard. 5-6

5.1.7 confederation peer-as. 5-7

5.1.8 dampening. 5-7

5.1.9 default local-preference. 5-9

5.1.10 default med. 5-9

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-table. 5-14

5.1.16 display bgp routing-table as-path-acl 5-16

5.1.17 display bgp routing-table cidr 5-17

5.1.18 display bgp routing-table community. 5-18

5.1.19 display bgp routing-table community-list 5-19

5.1.20 display bgp routing-table dampened. 5-20

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

5.1.22 display bgp routing-table flap-info. 5-22

5.1.23 display bgp routing-table peer 5-24

5.1.24 display bgp routing-table regular-expression. 5-25

5.1.25 display bgp routing-table statistic. 5-25

5.1.26 filter-policy export 5-26

5.1.27 filter-policy import 5-27

5.1.28 group. 5-28

5.1.29 import-route. 5-29

5.1.30 network. 5-30

5.1.31 peer advertise-community. 5-30

5.1.32 peer allow-as-loop. 5-31

5.1.33 peer as-number 5-32

5.1.34 peer as-path-acl export 5-32

5.1.35 peer as-path-acl import 5-33

5.1.36 peer connect-interface. 5-34

5.1.37 peer default-route-advertise. 5-35

5.1.38 peer description. 5-35

5.1.39 peer ebgp-max-hop. 5-36

5.1.40 peer enable. 5-37

5.1.41 peer filter-policy export 5-38

5.1.42 peer filter-policy import 5-39

5.1.43 peer group. 5-39

5.1.44 peer ip-prefix export 5-40

5.1.45 peer ip-prefix import 5-41

5.1.46 peer next-hop-local 5-42

5.1.47 peer password. 5-42

5.1.48 peer public-as-only. 5-43

5.1.49 peer reflect-client 5-44

5.1.50 peer route-policy export 5-45

5.1.51 peer route-policy import 5-46

5.1.52 peer route-update-interval 5-46

5.1.53 peer timer 5-47

5.1.54 preference. 5-48

5.1.55 reflect between-clients. 5-49

5.1.56 reflector cluster-id. 5-49

5.1.57 refresh bgp. 5-50

5.1.58 reset bgp. 5-51

5.1.59 reset bgp dampening. 5-52

5.1.60 reset bgp flap-info. 5-52

5.1.61 reset bgp group. 5-53

5.1.62 router id. 5-53

5.1.63 summary. 5-54

5.1.64 timer 5-54

5.1.65 undo synchronization. 5-55

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 isis. 6-5

6.1.7 apply local-preference. 6-6

6.1.8 apply origin. 6-6

6.1.9 apply tag. 6-7

6.1.10 display ip ip-prefix. 6-8

6.1.11 display route-policy. 6-9

6.1.12 if-match { acl | ip-prefix } 6-10

6.1.13 if-match as-path. 6-10

6.1.14 if-match community. 6-11

6.1.15 if-match cost 6-12

6.1.16 if-match interface. 6-13

6.1.17 if-match ip next-hop. 6-14

6.1.18 if-match tag. 6-15

6.1.19 ip as-path-acl 6-15

6.1.20 ip community-list 6-16

6.1.21 ip ip-prefix. 6-17

6.1.22 route-policy. 6-18

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 auto-establish disable. 7-3

7.1.4 memory auto-establish enable. 7-4

7.1.5 memory { safety | limit }* 7-5

 


Chapter 1  Static Route Configuration Commands

 

&  Note:

The term “router” in this document refers to a router in a generic sense or an Ethernet switch running routing protocols.

 

1.1  Routing Table Monitoring Commands

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 summary of a routing table.

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

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

Examples

# 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

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 sent to the destination network segment are 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: Number of the number-identified ACL, in the range 2,000 to 2,999.

acl-name: Name of the basic name-identified ACL.

verbose: Specifies to display the detailed information about active and inactive routes filtered through the ACL rules if this keyword is provided; specifies to display the brief information about the active routes filtered through the ACL rules.

Description

Use the display ip routing-table acl command to display the routes filtering through the basic ACL rules.

This command is used to trace and display routing policies, that is, to display the routes filtering through the rules based on the input basic ACL numbers.

Examples

# Display the brief information about the active routes filtering through basic ACL 2000.

<H3C>system-view

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

[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: 2

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

Refer to Table 1-1 for the description on the displayed information above.

# Display the detailed information about the active and inactive routes filtered through basic ACL 2000.

<H3C> display ip routing-table acl 2000 verbose

Routes matched by access-list 2000:

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: #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 command

Field

Description

Destination

Destination address

Mask

Mask

Protocol

Routing protocol that detects this route

Preference

Preference of the route

Nexthop

Address of the next hop

Interface

Output interface where packets to the destination network segment are forwarded.

Vlinkindex

Virtual link index

State

Route state:

ActiveU

Active unicast routes

Blackhole

Blackhole routes, which are similar to Reject routes except that blackhole routes do not send ICMP unreachable messages to the source end of the packet.

Delete

The route is deleted.

Gateway

Indirect routes

Hidden

If you do not want to remove some routes that are not available temporarily for some reasons (such as the configured polices, the port being down), you can hide the route so as to restore it 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 at regular intervals regardless of whether the actually found routes leading to the same destination change. For more details, refer to the specific routing protocols.

Int

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

NoAdvise

NoAdvise routes are nor advertised when the routing protocol ad

NotInstall

Generally, the route with the highest preference in a routing table is added to the core routing table and advertised. Comparatively, NotInstall routes cannot be added to the core routing table, however, they may be advertised.

Reject

Reject routes do not distribute packets like normal routes. Instead, the packet that selects a reject route will be dropped, and ICMP unreachable messages will be sent to the source end of the packet. Reject routes are generally used in network tests.

Retain

When the routes read by the core routing table are removed, the routes with the “retain” tag will not be removed. You can set some static routes as retain routes so that they can continue to exist in the core routing table.

Static

The static routes manually configured on the router are tagged as static routes, which will not be removed from the routing table if the router is restarted after the save command is executed.

Unicast

Unicast routes

Age

The time during which a route exists in the routing table, expressed in the form of hh:mm:ss.

Cost

Route cost

Tag

Route tag

 

1.1.3  display ip routing-table ip-address

Syntax

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

View

Any view

Parameters

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 to display 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 will be displayed.

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

l           display ip routing-table ip-address

If the destination address specified by ip-address corresponds to a route in the natural mask range, this command is used to display all its subnet routes. Otherwise, this command is used to display the longest matching route based on the destination address specified by ip-address.

l           display ip routing-table ip-address mask

This command is only used to display the routes exactly matching the specified destination address and mask.

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

This command is used to display all the matched routes leading to the destination address in the natural mask range.

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

This command is used to display all the matched routes leading to the destination address in the specified mask range.

Examples

# 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, refer to Table 1-1.

# There is no corresponding route (only the longest matched 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:

  Generate Default: no

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

  Summary count:2

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

**Destination: 169.0.0.0     Mask: 255.254.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

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

  Generate Default: no

  + = 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

For detailed description of the output information, refer to 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 and ip-address2, mask2 determine one address range together. ip-address1 ANDed with mask1 specifies the start of the range, and ip-address2 ANDed with mask2 specifies the end of the range. This command is used to display 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 is used to display the verbose information of both active and inactive routes. Without this argument provided, this command is used to display 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.

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, refer to 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: Name of the IP address prefix list, containing 1 to 19 characters.

verbose: Specifies to display the detailed information about active and inactive routes filtered through the ACL rules if this keyword is provided; specifies to display the brief information about the active routes filtered through the ACL rules.

Description

Use the display ip routing-table ip-prefix command to display the routes filtered through the specified ip-prefix list.

This command is used to track and display the routing policy. It is used to display the routes filtering through the rules based on the input ip-prefix list name.

If the specified ip-prefix list does not exist, with the verbose keyword provided, this command is used to display the detailed information about all active and inactive routes; without the verbose argument keyword, this command is used to display the brief information about all active routes only.

Examples

# Display the brief information about the active routes filtered through the IP-prefix list named abc2, which permits the route with a prefix of 10.1.1.0 and a mask length of 24 to 32.

<H3C>system-view

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

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

[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        DIRECT    0   0       10.1.1.2       Vlan-interface1

10.1.1.2/32        DIRECT    0   0       127.0.0.1      InLoopBack0

For detailed information about the displayed information above, refer to Table 1-1.

# Display the detailed information about the active and inactive routes filtered through the ip-prefix list named 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: #DIRECT       Preference: 0

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

        Vlinkindex: 0

        State: <Int ActiveU Retain Unicast>

        Age: 3:23:44    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: 3:23:44    Cost: 0/0       Tag: 0

For detailed description on the displayed information above, refer to Table 1-2.

1.1.6  display ip routing-table protocol

Syntax

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

View

Any view

Parameters

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

l           direct: Specifies to display direct-connect route information

l           static: Specifies to display static route information.

l           bgp: Specifies to display BGP route information

l           isis: Specifies to display IS-IS route information.

l           ospf: Specifies to display OSPF route information.

l           ospf-ase: Specifies to display OSPF ASE route information.

l           ospf-nssa: Specifies to display OSPF NSSA route information.

l           rip: Specifies to display RIP route information.

inactive: With this argument provided, this command is used to display the inactive route information. Without this argument provided, this command is used to display the information of both active and inactive routes.

verbose: With this argument provided, this command is used to display the verbose route information. Without this argument provided, this command is used to display route summary only.

Description

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

Examples

# Display the summary of all direct-connect routes.

<H3C> display ip routing-table protocol direct

DIRECT Routing tables:

  Summary count: 8

DIRECT Routing table status:<active>:

  Summary count: 7

Destination/Mask   Protocol Pre  Cost        Nexthop     Interface

10.5.1.0/24          DIRECT      0      0            10.5.1.5        Vlan-interface105

10.5.1.5/32        DIRECT    0    0       127.0.0.1     InLoopBack0

100.100.1.1/32     DIRECT    0    0       127.0.0.1     InLoopBack0

102.1.1.0/24       DIRECT    0    0       102.1.1.1     LoopBack1

102.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 table status:<inactive>:

  Summary count: 1

Destination/Mask   Protocol Pre  Cost        Nexthop       Interface

100.100.1.1/32     DIRECT   0    0           100.100.1.1   LoopBack0

# 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.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 the route information in a tree mode.

Examples

<H3C> display ip routing-table radix

Radix tree for INET (2) inodes 14 routes 10:

 

                   +--8+--{169.0.0.0

                   |  +-32+--{169.1.1.1

                +--0+

                |  |  +--8+--{127.0.0.0

                |  |  |  +-32+--{127.0.0.1

                |  +--1+

                |     |  +--8+--{2.0.0.0

                |     |  |     +-24+--{2.2.2.0

                |     |  |     |  +-32+--{2.2.2.2

                |     |  |  +-22+

                |     |  |     +-32+--{2.2.1.1

                |     +--6+

                |        +--8+--{1.0.0.0

                |           +-32+--{1.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 statistics information about routes.

The statistics information about routes includes the total number of routes, the number of routes added by protocols, the number of routes deleted by the protocols, the number of routes which are not deleted though they have the deleted tag, the number of active routes, and the number of inactive routes.

Examples

# Display the statistics information about routes.

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

route

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 different kinds of routes.

 

1.1.9  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 argument provided, this command is used to display 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 be executed to display all current routes, including inactive routes and invalid routes.

Examples

# 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

Table 1-2 describes the meaning of route status and Table 1-5 shows the statistics information about the routing 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

 

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

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

View

System view

Parameters

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

mask: Mask.

mask-length: Mask length. Because 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. At present, the next-hop outgoing interface can be NULL 0 only. The packets sent to a null interface, which is a virtual interface, will be discarded immediately. This can reduce 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 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 sent to this destination will be discarded.

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 sent to this destination are dropped.

Description

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

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

By default, the system can obtain the subnet route directly connected to the router. If you do not specify the preference for a static route to be configured, the preference defaults to 60. If you do not specify reject or blackhole for the route, the route will be a reachable route by default.

 

&  Note:

l       If the destination IP address and the mask of a route are both 0.0.0.0, the route is the default route. Any packet for which the router fails to find a matching entry in the routing table will be forwarded through the default route.

l      Do not configure the next hop address of a static route as the IP address of an interface on the local switch.

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

 

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

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

1.2.3  ip route-static default-preference

Syntax

ip route-static default-preference default-preference-value

undo ip route-static default-preference

View

System view

Parameters

default-preference-value: Default precedence of static routes, in the range 1 to 255. It is 60 by default.

Description

Use the ip route-static default-preference command to set the default precedence of static routes.

Use the undo ip route-static default-preference command to restore the default precedence.

If a static route is configured without the specified precedence, its precedence is set to the default precedence value.

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

Examples

# Set the default precedence of static routes to 120.

<H3C>system-view

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

[H3C] ip route-static default-preference 120

 


Chapter 2  RIP Configuration Commands

 

&  Note:

The term “router” in this document refers to a router in a generic sense or an Ethernet switch running routing protocols.

 

2.1  RIP Configuration Commands

2.1.1  checkzero

Syntax

checkzero

undo checkzero

View

RIP view

Parameters

None

Description

Use the checkzero command to enable zero field check on 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 or disable zero field check on 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 that have no zero fields.

Examples

# 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

Parameters

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

Description

Use the default cost command to set the default routing cost for redistributed 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 redistribute routes from another routing protocol, the default routing cost specified with the default cost command applies.

Related command: import-route.

Examples

# Set the default routing cost for the redistributed routes 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

Parameters

None

Description

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

Examples

# Display the current RIP operation status 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 :

    10.0.0.0  

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

Field

Description

RIP is running

RIP is active

Checkzero is on

Zero field check is enabled

Default cost : 1

The default route cost is 1

Summary is on

Routes are aggregated automatically

Preference : 100

The preference of RIP is 100

Traffic-share-across-interface is off

Traffic sharing is enabled or disabled among equivalent routes

Period update timer : 30

Timeout timer : 180

Garbage-collection timer : 120

Settings of the three timers of RIP

No peer router

No destination address of a transmission is specified

Network :10.0.0.0

RIP is enabled on network segment 10.0.0.0

 

2.1.4  display rip routing

Syntax

display rip routing

View

Any view

Parameters

None

Description

Use the display rip routing command to display RIP routing information.

Examples

# Display RIP routing table information.

<H3C> display rip routing

                     RIP routing table: public net

A = Active      I = Inactive      G=Garbage collection

 

Destination/Mask   Cost NextHop         Age     SourceGateway   Att

6.0.0.0/8          1    10.153.25.22    4s      10.153.25.22    A

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

Field

Description

Destination/Mask

Destination address/Mask

Cost

Cost

NextHop

Net hop address

Age

The time that a route exists in the routing table, namely, the aging time

SourceGateway

Gateway originating the route

Att

Attribute value, which may be one of the three following values:

A

Active routes

I

Inactive routes

G

Unreachable route in the state of garbage collection. If garbage collection times out, and the unreachable route does not receive updates from the same neighbor, the route will be removed from the routing table completely.

 

2.1.5  filter-policy export

Syntax

filter-policy { acl-number | ip-prefix ip-prefix-name } export [ protocol [ process-id ] | interface interface-type interface-number ]

filter-policy route-policy route-policy-name export

undo filter-policy { acl-number | ip-prefix ip-prefix-name } export [ protocol [ process-id ] | interface interface-type interface-number ]

undo filter-policy route-policy route-policy-name export

View

RIP view

Parameters

acl-number: Number of the basic or advanced ACL used to filter routing information by destination address, in the range of 2,000 to 3,999.

ip-prefix-name: Name of the address ip-prefix list used to filter routing information by destination address, containing 1 to 19 characters.

route-policy-name: Name of the routing policy used to filter routing information, containing 1 to 19 characters. A routing policy can enable RIP to determine which routes are to be sent/received based on such fields as acl/cost/interface/ip/ip-prefix/tag.

protocol: Routing protocol whose routing information is to be filtered. Currently, this can be bgp, direct, isis, ospf, ospf-ase, ospf-nssa or static.

process-id: Routing protocol process ID, in the range of 1 to 65535. This argument is valid only when the protocol is ospf.

interface: Specifies an interface where the routes to be advertised will be filtered.

interface-type interface-number: Interface type and interface number.

Description

Use the filter-policy export command to enable RIP to filter the routing information to be advertised.

Use the undo filter-policy export command to cancel the filtering of the routing information to be advertised.

By default, RIP does not filter routing information before advertising.

Related commands: acl, filter-policy import, ip ip-prefix.

Examples

# Configure to filter route information by ACL 2000 before the information is advertised.

<H3C> system-view

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

[H3C] rip

[H3C-rip] filter-policy 2000 export

2.1.6  filter-policy import

Syntax

filter-policy { acl-number | [ ip-prefix ip-prefix-name ] [ gateway ip-prefix-name ] } import [ interface interface-type interface-number ]

undo filter-policy { acl-number | [ ip-prefix ip-prefix-name ] [ gateway ip-prefix-name ] } import [ interface-type interface-number ]

filter-policy route-policy route-policy-name import

undo filter-policy route-policy route-policy-name import

View

RIP view

Parameters

acl-number: Number of the ACL used to filter routing information by destination address, in the range of 2,000 to 3,999.

ip-prefix-name: Name of the address prefix list used to filter routing information by destination address, containing 1 to 19 characters.

interface: Specifies an interface where the routes to be advertised will be filtered.

interface-type interface-number: Interface type and interface number.

gateway ip-prefix-name: Name of the address prefix list used to filter routing information by the address of the neighbor router advertising the information, containing 1 to 19 characters.

route-policy-name: Name of the routing policy used to filter routing information, containing 1 to 19 characters. A routing policy can enable RIP to determine which routes are to be sent/received based on such fields as acl/cost/interface/ip/ip-prefix/tag.

Description

Use the filter-policy gateway import command to enable RIP to filter received routing information by a specified address.

Use the undo filter-policy gateway import command to disable the above filtering.

Use the filter-policy import command to filter the received routing information.

Use the undo filter-policy import command to disable the above filtering.

By default, RIP does not filter received routing information.

You can control the range of routes received by RIP by specifying an ACL, ip-prefix list and routing policies.

Related commands: acl, filter-policy export, ip ip-prefix.

Examples

# Configure to filter incoming routing information by ACL 2000.

<H3C>system-view

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

[H3C] rip

[H3C-rip] filter-policy 2000 import

2.1.7  host-route

Syntax

host-route

undo host-route

View

RIP view

Parameters

None

Description

Use the host-route command to enable RIP to receive host routes.

Use the undo host-route command to reject host routes.

By default, receiving host routes is enabled.

In some special cases, RIP receives a great number of host routes from the same network segment. These routes are of little help to routing and occupy a large amount of resources. In this case, the undo host-route command can be used to reject host routes.

Examples

# Enable RIP to reject host routes.

<H3C> system-view

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

[H3C] rip

[H3C-rip] undo host-route

2.1.8  import-route

Syntax

import-route protocol [ process-id | allow-ibgp ] [ cost value | route-policy route-policy-name ]*

undo import-route protocol [ process-id ]

View

RIP view

Parameters

protocol: Source routing protocol whose routes will be redistributed by RIP. At present, RIP can redistribute the following types of routes: direct, ospf, ospf-ase, ospf-nssa, static, isis and bgp.

process-id: Routing protocol process ID, in the range of 1 to 65535. This argument is valid only when the protocol is ospf.

allow-ibgp: Allows the redistribution of IBGP routes when redistributing routes from BGP.

value: Cost value of the routes to be redistributed, in the range of 1 to 16.

route-policy route-policy-name: Specifies a routing policy, which contains 1 to 19 characters. Only the routes matching the conditions of the specified routing policy will be redistributed.

Description

Use the import-route command to redistribute the routes of another protocol into RIP.

Use the undo import-route command to cancel the routes redistributed from another protocol.

By default, RIP does not redistribute routes from other protocols.

The import-route command is used to redistribute the routes of another protocol with a specified cost. RIP regards the redistributed routes as its own routes and transmits them with the specified cost. This command can greatly enhance the capability of RIP to obtain routes, thereby improving RIP performance.

If the cost value is not specified, routes will be redistributed with the default routing cost (set by the default cost command, ranging from 1 to 16). If the cost of an redistributed route is 16, RIP marks the route as HOLD DOWN (however, the route can still be used to forward packets), and continues to announce the route with this cost to other routers running RIP until the garbage collection timer times out (the timeout time defaults to 120 seconds).

Related commands: default cost.

Note that:

l           The import-route bgp command redistributes EBGP routes only.

l           The import-route bgp allow-ibgp command redistributes both EBGP and IBGP routes.

l           Use the import-route bgp allow-ibgp command with care, because it redistributes IBGP routes without keeping the AS_PATH attribute, which may lead to routing loops between ASs.

 

&  Note:

Use the import-route bgp allow-ibgp command with care!

 

Examples

# Redistribute static routes with the cost of 4.

<H3C> system-view

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

[H3C] rip

[H3C-rip] import-route static cost 4

# Set the default cost and redistribute OSPF routes with the default cost.

<H3C> system-view

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

[H3C] rip

[H3C-rip] default cost 3

[H3C-rip] import-route ospf

2.1.9  network

Syntax

network network-address

undo network network-address

View

RIP view

Parameters

network-address: Address of the network for which RIP is enabled/disabled. It can be the IP network address of any interface.

Description

Use the network command to enable RIP on a specified interface.

Use the undo network command to disable RIP on the interface.

By default, RIP is disabled on any interface.

After a RIP routing process is started, it is disabled on any interface. To enable RIP routing on an interface, you need to use the network command.

When the network command is used on an address, the effect is that the interface on the network segment at this address is enabled. For example, the results of viewing the network 129.102.1.1 with both the display current-configuration command and the display rip command are shown as network 129.102.0.0.

Related commands: rip work.

Examples

# Enable RIP on the interface with the network address 129.102.0.0.

<H3C> system-view

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

[H3C] rip

[H3C-rip] network 129.102.0.0

2.1.10  peer

Syntax

peer ip-address

undo peer ip-address

View

RIP view

Parameters

ip-address: IP address of the interface on the peer router with which routing information needs to be exchanged. It is in dotted decimal notation.

Description

Use the peer command to specify the IP address of the peer device with which routing information should be exchanged in unicast mode.

Use the undo peer command to remove the IP address.

By default, RIP does not send packets to any address in unicast mode.

This command is used to for non-broadcast networks to which protocol packets cannot be sent in broadcast mode. And you are not recommended to use this command in normal situation.

Examples

# Specify a unicast destination address of 202.38.165.1.

<H3C> system-view

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

[H3C] rip

[H3C-rip] peer 202.38.165.1

2.1.11  preference

Syntax

preference value

undo preference

View

RIP view

Parameters

value: Preference level, ranging from 1 to 255. By default, the value is 100.

Description

Use the preference command to configure the RIP route preference.

Use the undo preference command to restore the default preference.

Every routing protocol has its own preference. Its default value is determined by the specific routing policy. The preferences of routing protocols will finally determine which routing algorithm's routes will be selected as the optimal routes in the IP routing table. You can use this command to modify the RIP preference manually.

Examples

# Specify the RIP preference as 20.

<H3C> system-view

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

[H3C] rip

[H3C-rip] preference 20

2.1.12  reset

Syntax

reset

View

RIP view

Parameters

None

Description

Use the reset command to reset the system configuration parameters of RIP.

When you need to re-configure the parameters of RIP, you can use this command to restore the default setting.

Examples

# Reset the RIP system configuration.

<H3C> system-view

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

[H3C] rip

[H3C-rip] reset

2.1.13  rip

Syntax

rip

undo rip

View

System view

Parameters

None

Description

Use the rip command to enable RIP and enter RIP view.

Use the undo rip command to disable RIP.

By default, the system does not run RIP.

RIP must be enabled before you can enter the RIP view and configure various RIP global parameters. You can, however, configure the interface-based parameters regardless of whether RIP is enabled.

 

&  Note:

Note that the interface parameters configured previously would be invalid when RIP is disabled.

 

Examples

# Enable RIP and enter RIP view.

<H3C> system-view

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

[H3C] rip

[H3C-rip]

2.1.14  rip authentication-mode

Syntax

rip authentication-mode { simple password | md5 { rfc2453 key-string | rfc2082 key-string key-id } }

undo rip authentication-mode

View

Interface view

Parameters

simple: Specifies to use simple text authentication mode.

password: Simple text authentication key, containing 1 to 16 characters.

md5: Specifies to use MD5 cipher text authentication mode.

rfc2453: Specifies that MD5 cipher text authentication packets will use the packet format (IETF standard) stipulated by RFC2453.

rfc2082: Specifies that MD5 cipher text authentication packets will use the packet format stipulated by RFC2082.

key-string: MD5 cipher text authentication key. If input in simple text, the character string of MD5 key cannot exceed 16 characters. And it will be displayed in a cipher text form in a length of 24 characters when you use the display current-configuration command. You can also input the MD5 key in cipher text format with a length of 24 characters.

key-id: MD5 cipher text authentication identifier, ranging from 1 to 255.

Description

Use the rip authentication-mode command to configure RIP-2 authentication mode and parameters.

Use the undo rip authentication-mode command to cancel the authentication.

RIP-1 does not authenticate packets. Generally RIP authenticates packets in two modes: plain text authentication and MD5 ciphertext authentication. There are two packet formats in the MD5 ciphertext authentication: one format conforms to RFC 2453 and the other format is described in RFC 2082. Routers support both formats. You can select any format as required.

Related commands: rip version.

Examples

# Specify the interface VLAN-interface 10 to use the simple authentication with the authentication key of aaa.

<H3C> system-view

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

[H3C] interface Vlan-interface 10

[H3C-Vlan-interface10] rip version 2

[H3C-Vlan-interface10] rip authentication-mode simple aaa

# Specify VLAN-interface 10 to use the MD5 cipher text authentication, with the authentication key of aaa and the packet format of rfc2453.

<H3C> system-view

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

[H3C] interface Vlan-interface 10

[H3C-Vlan-interface10] rip version 2

[H3C-Vlan-interface10] rip authentication-mode md5 rfc2453 aaa

2.1.15  rip input

Syntax

rip input

undo rip input

View

Interface view

Parameters

None

Description

Use the rip input command to enable an interface to receive RIP packets.

Use the undo rip input command to disable an interface from receiving RIP packets.

By default, all interfaces, except loopback interfaces, can receive RIP packets.

This command is used in cooperation with another two commands: rip output and rip work. Functionally, rip work is equivalent to rip input&rip output. The latter two commands control the receipt and the transmission of RIP packets respectively on an interface. The former command equals the functional combination of the latter two commands.

Related commands: rip output, rip work.

Examples

# Configure the interface VLAN-interface 10 not to receive RIP packets.

<H3C> system-view

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

[H3C]interface Vlan-interface 10  

[H3C-Vlan-interface10] undo rip input

2.1.16  rip metricin

Syntax

rip metricin value

undo rip metricin

View

Interface view

Parameters

value: Additional route metric added when receiving a RIP route, which ranges from 0 to 16. By default, the value is 0.

Description

Use the rip metricin command to configure the additional route metric added to the RIP routes received on an interface.

Use the undo rip metricin command to restore the default value of this additional route metric.

Related commands: rip metricout.

Examples

# Set the additional route metric added to RIP routes received on VLAN-interface 10 to 2.

<H3C> system-view

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

[H3C] interface Vlan-interface 10

[H3C-Vlan-interface10] rip metricin 2

2.1.17  rip metricout

Syntax

rip metricout value

undo rip metricout

View

Interface view

Parameters

value: Additional route metric added when transmitting a RIP route, which ranges from 1 to 16. By default, the value is 1.

Description

Use the rip metricout command to configure the additional route metric added to the RIP routes to be transmitted on an interface.

Use the undo rip metricout command to restore the default value of this additional route metric.

 

&  Note:

The metricout configuration only applies to the RIP routes learnt by the router and those generated by the router itself. It does not apply to any route redistributed to RIP from any other routing protocol.

 

Related commands: rip metricin.

Examples

# Set the additional route metric added to the RIP routes to be transmitted on VLAN-interface 10 to 2.

<H3C> system-view

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

[H3C] interface Vlan-interface 10

[H3C-Vlan-interface10] rip metricout 2

2.1.18  rip output

Syntax

rip output

undo rip output

View

Interface view

Parameters

None

Description

Use the rip output command to enable an interface to transmit RIP packets.

Use the undo rip output command to disable an interface from transmitting RIP packets.

By default, all interfaces, except loopback interfaces, are enabled to transmit RIP packets.

This command is used in cooperation with another two commands: rip input and rip work. Functionally, rip work is equivalent to rip input&rip output. The latter two commands control the receipt and the transmission of RIP packets respectively on an interface. The former command equals the functional combination of the latter two commands.

Related commands: rip input, rip work.

Examples

# Disable the interface VLAN-interface 10 from transmitting RIP packets.

<H3C> system-view

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

[H3C] interface Vlan-interface 10

[H3C-Vlan-interface10] undo rip output

2.1.19  rip split-horizon

Syntax

rip split-horizon

undo rip split-horizon

View

Interface view

Parameters

None

Description

Use the rip split-horizon command to enable the split horizon function on an interface when transmitting RIP packets.

Use the undo rip split-horizon command to disable the split horizon function on the interface when transmitting RIP packets.

By default, the split horizon is enabled.

Generally, split horizon is necessary for avoiding routing loops. Only in some special cases does split horizon need to be disabled to ensure the correct execution of the protocol. So, disable split horizon only when necessary.

Examples

# Disable the split horizon function on interface VLAN-interface 10 when processing RIP packets.

<H3C> system-view

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

[H3C] interface Vlan-interface 10

[H3C-Vlan-interface10] undo rip split-horizon

2.1.20  rip version

Syntax

rip version { 1 | 2 [ broadcast | multicast ] }

undo rip version

View

Interface view

Parameters

1: Specifies the version of RIP packets on the interface to RIP-1.

2: Specifies the version of RIP packets on the interface to RIP-2.

broadcast: Sends RIP-2 packets in broadcast mode.

multicast: Sends RIP-2 packets in multicast mode.

Description

Use the rip version command to specify the version of RIP packets on an interface.

Use the undo rip version command to restore the default RIP packet version on the interface.

By default, the interface RIP version is RIP-1. RIP-1 transmits packets in broadcast mode, while RIP-2 transmits packets in multicast mode by default.

When running RIP-1, the interface only receives and transmits RIP-1 broadcast packets, and receives RIP-2 broadcast packets, but does not receive RIP-2 multicast packets. When running RIP-2 in broadcast mode, the interface receives and transmits RIP-2 broadcast packets, receives RIP-1 broadcast packets and RIP-2 multicast packets. When running RIP-2 in multicast mode, the interface only receives and transmits RIP-2 multicast packets, receives RIP-2 broadcast packets, but does not receive RIP-1 broadcast packets.

Examples

# Configure the interface VLAN-interface 10 to run in RIP-2 broadcast mode.

<H3C> system-view

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

[H3C] interface Vlan-interface 10

[H3C-Vlan-interface10] rip version 2 broadcast

2.1.21  rip work

Syntax

rip work

undo rip work

View

Interface view

Parameters

None

Description

Use the rip work command to enable RIP on an interface.

Use the undo rip work command to disable RIP on an interface.

By default, RIP is enabled on an interface.

This command is used in cooperation with rip input, rip output and network commands.

Related commands: network, rip input, rip output.

Examples

# Disable RIP on interface VLAN-interface 10.

<H3C> system-view

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

[H3C] interface Vlan-interface 10

[H3C-Vlan-interface10] undo rip work

2.1.22  summary

Syntax

summary

undo summary

View

RIP view

Parameters

None

Description

Use the summary command to enable RIP-2 automatic route summarization.

Use the undo summary command to disable RIP-2 automatic route summarization.

By default, automatic RIP-2 route summarization is enabled.

Route summarization can be used to reduce the routing traffic on the network as well as to reduce the size of the routing table. If RIP-2 is used, route summarization function can be disabled with the undo summary command when it is necessary to broadcast subnet routes.

RIP-1 does not support subnet mask. Forwarding subnet routes may cause ambiguity. Therefore, RIP-1 always uses route summarization.

Related commands: rip version.

Examples

# Set RIP version on the interface VLAN-interface 10 to RIP-2 and disable route summarization.

<H3C> system-view

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

[H3C] interface Vlan-interface 10

[H3C-Vlan-interface10] rip version 2

[H3C-Vlan-interface10] quit

[H3C] rip

[H3C-rip] undo summary

2.1.23  timers

Syntax

timers { update update-timer | timeout timeout-timer } *

undo timers { update | timeout } *

View

RIP view

Parameters

update-timer: Value of the Period update timer, ranging from 1 to 3,600 seconds. By default, it is 30 seconds.

timeout-timer: Value of the Timeout timer, ranging from 1 to 3,600 seconds. By default, it is 180 seconds.

Description

Use the timers command to modify the values of the three RIP timers: Period update, Timeout, and Garbage-collection.

Use the undo timers command to restore the default settings.

By default, the Period update, Timeout, and Garbage-collection timers are 30 seconds, 180 seconds, and 120 seconds, respectively.

Generally, it is regarded that the value of the Garbage-collection timer is fixed at four times that of the Period update timer. Adjusting the Period update timer will affect the Garbage-collection timer.

The modification of RIP timers is validated immediately.

Related commands: display rip.

Examples

# Set the values of the Period update timer and the Timeout timer of RIP to 10 seconds and 30 seconds respectively.

<H3C> system-view

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

[H3C] rip

[H3C-rip] timers update 10 timeout 30

2.1.24  traffic-share-across-interface

Syntax

traffic-share-across-interface

undo traffic-share-across-interface

View

RIP view

Parameters

None

Description

Use the traffic-share-across-interface command to enable traffic to be forwarded along multiple equivalent RIP routes.

Use the undo traffic-share-across-interface command to disable this function.

By default, this function is disabled.

When the number of equivalent routes reaches the upper limit:

If this function is enabled, the newly learned equivalent route replaces the existing equivalent route in the routing table.

If this function is disabled, the first aged route entry is replaced by the newly learned route. If no route entry is aged, the newly learned equivalent route will be dropped.

Examples

# Enable traffic to be forwarded along multiple equivalent RIP routes.

<H3C> system-view

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

[H3C] rip

[H3C-rip] traffic-share-across-interface

 


Chapter 3  OSPF Configuration Commands

 

&  Note:

The term “router” in this document refers to a router in a generic sense or an Ethernet switch running routing protocols.

 

3.1  OSPF Configuration Commands

3.1.1  abr-summary

Syntax

abr-summary ip-address mask [ advertise | not-advertise ]

undo abr-summary ip-address mask

View

OSPF area view

Parameters

ip-address: Network segment address.

mask: Network mask.

advertise: Specifies to advertise the aggregated route that match a specific IP address and mask.

not-advertise: Specifies not to advertise the aggregated route that match a specific IP address and mask.

Description

Use the abr-summary command to enable route aggregation on an area border router (ABR).

Use the undo abr-summary command to disable route aggregation on an ABR.

By default, an ABR does not aggregate routes.

This command is applicable to ABRs only and is used for route aggregation in an area. It allows the ABR to transmit an aggregated route to other areas.

Route aggregation means that routing information is processed by an ABR, which transmits only one route to other areas for each network segment configured with route aggregation. You can configure multiple aggregation routes in an area so that OSPF can aggregate multiple network segments.

Examples

# Aggregate the routes in the network segments 36.42.10.0 and 36.42.110.0 in OSPF area 1 into one summary route 36.42.0.0 and transmit it to other areas.

<H3C> system-view

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

[H3C] ospf 1

[H3C-ospf-1] area 1

[H3C-ospf-1-area-0.0.0.1] network 36.42.10.0 0.0.0.255

[H3C-ospf-1-area-0.0.0.1] network 36.42.110.0 0.0.0.255

[H3C-ospf-1-area-0.0.0.1] abr-summary 36.42.0.0 255.255.0.0

3.1.2  area

Syntax

area area-id

undo area area-id

View

OSPF view

Parameters

area-id: ID of an OSPF area, which can be a decimal integer (ranging from 0 to 4294967295) or in the form of an IP address.

Description

Use the area command to enter OSPF area view.

Use the undo area command to remove the specified area.

Examples

# Enter OSPF area 0 view.

<H3C> system-view

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

[H3C] ospf 1

[H3C-ospf-1] area 0

[H3C-ospf-1-area-0.0.0.0]

3.1.3  asbr-summary

Syntax

asbr-summary ip-address mask [ not-advertise | tag value ]

undo asbr-summary ip-address mask

View

OSPF view

Parameters

ip-address: IP address to be matched, in dotted decimal notation.

mask: IP address mask, in dotted decimal notation.

not-advertise: Specifies not to advertise the aggregated route matching the specified IP address and mask. If this keyword is not provided, the aggregated route will be advertised.

tag value: Tag value, which is mainly used to control route advertisement through route-policy. It ranges from 0 to 4294967295 and defaults to 1.

Description

Use the asbr-summary command to configure the aggregation of imported routes by OSPF.

Use the undo asbr-summary command to cancel the aggregation.

By default, imported routes are not aggregated.

After the aggregation of imported routes is configured, if the local router is an autonomous system border router (ASBR), this command aggregates the imported Type-5 LSAs in the aggregation address range. If an NSSA is configured, this command also aggregates the imported Type-7 LSAs in the summary address range.

If the local router acts as both an ABR and a transit router in the NSSA, this command aggregates Type-5 LSAs transformed from Type-7 LSAs. If the router is not the router in the NSSA, the aggregation is disabled.

Related commands: display ospf asbr-summary.

Examples

# Set aggregation of routes imported by the router H3C.

<H3C> system-view

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

[H3C] ospf 1

[H3C-ospf-1] asbr-summary 10.2.0.0 255.255.0.0 not-advertise

3.1.4  authentication-mode

Syntax

authentication-mode { simple | md5 }

undo authentication-mode

View

OSPF area view

Parameters

simple: Uses plain text authentication mode.

md5: Uses MD5 cipher text authentication mode.

Description

Use the authentication-mode command to configure an OSPF area to support the authentication attribute.

Use the undo authentication-mode command to cancel the authentication attribute of this area.

By default, an area does not support authentication attribute.

Routers in one area must use the same authentication mode (no authentication, plain text authentication, or MD5 cipher text authentication). And routers on the same segment must use the same authentication key.

Use the ospf authentication-mode simple command to configure a plain text authentication key.

Use the ospf authentication-mode md5 command to configure the MD5 cipher text authentication key if the area is configured to support MD5 cipher text authentication mode.

Related commands: ospf authentication-mode.

Examples

# Enter area 0 view.

<H3C> system-view

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

[H3C] ospf 1

[H3C-ospf-1] area 0

# Specify the OSPF area 0 to support MD5 cipher text authentication.

[H3C-ospf-1-area-0.0.0.0] authentication-mode md5

3.1.5  default cost

Syntax

default cost value

undo default cost

View

OSPF view

Parameters

value: Default cost of external routes imported by OSPF, in the range 0 to 16777214. By default, its value is 1.

Description

Use the default cost command to configure the default cost for OSPF imported external routes.

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

Since OSPF can import external routing information and propagate the information to the entire autonomous system, routing cost of external routes can influence route selection and calculation. Therefore, it is necessary to specify the default routing cost for the protocol to import external routes.

Examples

# Specify the default cost for OSPF imported external routes as 10.

<H3C> system-view

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

[H3C] ospf 1

[H3C-ospf-1] default cost 10

3.1.6  default interval

Syntax

default interval seconds

undo default interval

View

OSPF view

Parameters

seconds: Interval to import external routes in seconds, in the range 1 to 2147483647, with the default of 1.

Description

Use the default interval command to configure the default interval for OSPF to import external routes.

Use the undo default interval command to restore the default interval.

OSPF can import external routing information and propagate it to the entire autonomous system. However, importing routes too often greatly affects the performance of the device. Therefore, it is necessary to specify the default interval for the protocol to import external routes.

Examples

# Specify the default interval for OSPF to import external routes as 10 seconds.

<H3C> system-view

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

[H3C] ospf 1

[H3C-ospf-1] default interval 10

3.1.7  default limit

Syntax

default limit routes

undo default limit

View

OSPF view

Parameters

routes: Number of external routes that can be imported in a unit time. The value ranges from 200 to 2,147,483,647 and defaults to 1,000.

Description

Use the default limit command to configure the number of routes that can be imported by OSPF in a unit time.

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

OSPF can import external routing information and advertise them to the whole AS. However, importing too many external routes at a time greatly affects the performance of the device. Therefore, it is necessary to set number of external routes that can be imported during each import interval.

Related commands: default interval.

Examples

# Specify the number of external routes that can be imported by OSPF in each import interval as 200.

<H3C> system-view

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

[H3C] ospf 1

[H3C-ospf-1] default limit 200

3.1.8  default tag

Syntax

default tag tag

undo default tag

View

OSPF view

Parameters

tag: Default tag, in the range 0 to 4294967295, with the default being 1.

Description

Use the default tag command to configure the default tag of OSPF imported external routes.

Use the undo default tag command to restore the default tag.

When OSPF uses imported routes as the external routing information of its own autonomous system, some additional parameters are required, including the default cost and the default tag of the route.

Related commands: default type.

Examples

# Set the default tag of OSPF imported external routes of the autonomous system as 10.

<H3C> system-view

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

[H3C] ospf 1

[H3C-ospf-1] default tag 10

3.1.9  default type

Syntax

default type { 1 | 2 }

undo default type

View

OSPF view

Parameters

type 1: External routes of type 1.

type 2: External routes of type 2.

Description

Use the default type command to configure the default routing information type when OSPF imports external routes.

Use the undo default type command to restore the default setting.

OSPF defines two types of external routing information.

By default, the external routes of type 2 are imported.

Related commands: default tag.

Examples

# Configure OSPF to import external routes of type 1 by default.

<H3C> system-view

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

[H3C] ospf 1

[H3C-ospf-1] default type 1

3.1.10  default-cost

Syntax

default-cost value

undo default-cost

View

OSPF area view

Parameters

value: Cost of the default route transmitted by OSPF to the Stub or NSSA area. The value ranges from 0 to 16777214 and defaults to 1.

Description

Use the default-cost command to configure the cost of the default route transmitted by OSPF to the Stub or NSSA area.

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

This command only applies to an ABR in a Stub area or NSSA area.

To configure a Stub area, you need to use the stub and default-cost commands.

You must use the stub command on all the routers connected to a STUB area to configure the area with the STUB attribute. And use the default-cost command to configure the cost of the default route transmitted by an ABR to the STUB area or NSSA area.

Related commands: stub, nssa.

Examples

# Set area 1 as the Stub area and the cost of the default route transmitted to this Stub area to 60.

<H3C> system-view

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

[H3C] ospf 1

[H3C-ospf-1] area 1

[H3C-ospf-1-area-0.0.0.1] network 20.0.0.0 0.255.255.255

[H3C-ospf-1-area-0.0.0.1] stub

[H3C-ospf-1-area-0.0.0.1] default-cost 60

3.1.11  default-route-advertise

Syntax

default-route-advertise [ always | cost value | type type-value | route-policy route-policy-name ]*

undo default-route-advertise [ always | cost | type | route-policy ]*

View

OSPF view

Parameters

always: Generates and advertises an ase lsa describing the default route if the local router is not configured with the default route. If this keyword is not provided, the local router must be configured with the default route before it can import the ase lsa, which generates the default route.

cost value: Specifies the cost value of this ase lsa. The value ranges from 0 to 16777214 and defaults to 1.

type type-value: Specifies the cost type of this ase lsa. The value of type-value ranges from 1 to 2 and defaults 2.

route-policy route-policy-name: Specifies a route policy by name, a string of 1 to 19 characters. If you specify the default route name here, the values in ase lsa will be affected.

Description

Use the default-route-advertise command to import the default route to OSPF route area.

Use the undo default-route-advertise command to cancel the setting.

By default, OSPF does not import the default route.

The import-route command cannot import the default route. To import the default route to the route area, you must use the default-route-advertise command. If the local router is not configured with the default route, the keyword always should be specified so that ase lsa of the default route is generated.

Related commands: import-route.

Examples

# The ase lsa of the default route is generated only if the local router has the default route.

<H3C> system-view

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

[H3C] ospf 1

[H3C-ospf-1] default-route-advertise

# The ase lsa of default route will be generated and advertised to OSPF route area even the local router has no default route.

[H3C-ospf-1] default-route-advertise always

3.1.12  display ospf abr-asbr

Syntax

display ospf [ process-id ] abr-asbr

View

Any view

Parameters

process-id: OSPF process ID, in the range 1 to 65535. If you do not specify a process ID, this command applies to all current OSPF processes.

Description

Use the display ospf abr-asbr command to display the information about the ABR and ASBR of OSPF.

Examples

# Display the information about the OSPF ABRs and ASBRs.

<H3C> display ospf abr-asbr

                  OSPF Process 1 with Router ID 1.1.1.1

Routing Table to ABR and ASBR

 I = Intra i = Inter A = ASBR B = ABR    S = SumASBR

Destination        Area         Cost   Nexthop         Interface

IA 2.2.2.2         0.0.0.0      10     10.153.17.89    Vlan-interface1

Table 3-1 Description on the fields of the display ospf abr-asbr command

Field

Description

Destination

Router ID of the ABR or ASBR

Area

Area where the router is connected to the ASBR

Cost

overhead the route

Nexthop

Nexthop address

Interface

Local output interface

 

3.1.13  display ospf asbr-summary

Syntax

display ospf [ process-id ] asbr-summary [ ip-address mask ]

View

Any view

Parameters

process-id: OSPF process ID, in the range 1 to 65535. If you do not specify a process ID, this command applies to all current OSPF processes.

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

mask: IP address mask, in dotted decimal notation.

Description

Use the display ospf asbr-summary command to display the summary information of OSPF imported routes.

If you do not specify an IP address or mask, the summary information of all OSPF imported routes will be displayed.

Related commands: asbr-summary

Examples

# Display the summary information of all OSPF imported routes.

<H3C> display ospf asbr-summary

                 OSPF Process 1 with Router ID 10.1.1.1

                              Summary Addresses 

Total summary address count:   2

 

                Summary Address

net      : 168.10.0.0

mask     : 255.254.0.0

tag      : 1

status   : Advertise

The Count of Route is 0

 

                Summary Address

net      : 1.1.0.0

mask     : 255.255.0.0

tag      : 100

status   : DoNotAdvertise

The Count of Route is 0

Table 3-2 Description on the fields of the display ospf asbr-summary command.

Field

Description

net

Destination network segment

mask

Mask

tag

Tag

status

Status information, in one of the following two values:

DoNotAdvertise

The summary routing information to the network segment will not be advertised.

Advertise

The summary routing information to the network segment will be advertised.

 

3.1.14  display ospf brief

Syntax

display ospf [ process-id ] brief

View

Any view

Parameters

process-id: OSPF process ID, in the range 1 to 65535. If you do not specify a process ID, this command applies to all current OSPF processes.

Description

Use the display ospf brief command to display brief OSPF information.

Examples

# Display brief OSPF information.

<H3C> display ospf brief

                 OSPF Process 1 with Router ID 10.1.1.1

                        OSPF Protocol Information

 

 RouterID: 10.1.1.1

 Spf-schedule-interval: 5

 Routing preference: Inter/Intra: 10 External: 150

 Default ASE parameters: Metric: 1 Tag: 1 Type: 2

 SPF computation count: 163

 Area Count: 1    Nssa Area Count: 0

 

 Area 0.0.0.0:

   Authtype: none   Flags: <>

   SPF scheduled: <Router Net Intra>

   Interface: 110.1.1.1 (Vlan-interface110)

     Cost: 11 State: DR    Type: Broadcast

     Priority: 11

     Designated Router: 110.1.1.1

     Backup Designated Router: 110.1.1.2

     Timers: Hello 10, Dead 40, Poll 40, Retransmit 5, Transmit Delay 1

Table 3-3 Description on the fields of the display ospf brief command

Field

Description

RouterID

ID of the router

spf-schedule-interval

Interval of SPF schedule

Authtype

Authentication type of OSPF

Routing preference

Routing preference of OSPF. The internal route of OSPF includes intra/inter area route, and its default routing preference is 10, while that of the external route of OSPF is 150.

Default ASE parameters

Default ASE parameters of OSPF, including metric, type and tag

SPF computation count

SPF computation count since OSPF is enabled

Area Count

Areas for connection to this router

Nssa Area Count

Number of NSSA areas

SPF scheduled

SPF scheduled (flag)

Interface

Name of interface belonging to this area

Cost

Cost of routes

State

State information

Type

Network type of OSPF interface/the first type is the type of the imported external routes

Priority

Priority

Designated Router

IP address of designated router (DR)

Backup Designated Router

IP address of backup designated router (BDR)

Timers

OSPF timers, defined as follows:

Hello

Interval of hello packet

Dead

Interval of dead neighbors

Poll

Polling interval

Retransmit

Interval of retransmitting LSA

Transmit Delay

Delay time of transmitting LSA

 

3.1.15  display ospf cumulative

Syntax

display ospf [ process-id ] cumulative

View

Any view

Parameters

process-id: OSPF process ID, in the range 1 to 65535. If you do not specify a process ID, this command applies to all current OSPF processes.

Description

Use the display ospf cumulative command to display cumulative OSPF statistics.

Examples

# Display cumulative OSPF statistics.

<H3C> display ospf cumulative

                 OSPF Process 1 with Router ID 10.1.1.1

                               Cumulations

 

  IO Statistics

             Type        Input     Output

            Hello         6271       9241

   DB Description         9659       9915

   Link-State Req          419       1426

Link-State Update        30190      51723

   Link-State Ack        13642      22262

  ASE: 6231 Checksum Sum: C3D40E0

  LSAs originated by this router

  Router: 141  Net: 5

  LSAs Originated: 146  LSAs Received: 161905

 

  Area 0.0.0.0:

    Neighbors: 4  Interfaces: 5

    Spf: 163  Checksum Sum 3C60A5F8

    rtr: 105 net: 187 sumasb: 0 sumnet: 30500

 

  Routing Table:

    Intra Area: 8  Inter Area: 0  ASE: 5

Table 3-4 Description on the fields of the display ospf cumulative command

Field

Description

IO Statistics

Type

Type of input/output OSPF packet

Input

Number of received packets

Output

Number of transmitted packets

ASE

Number of all ASE LSAs

checksum sum

Checksum of ASE LSA

LSAs

originated

Number of originated LSAs

received

Number of received LSAs generated by other routers

Router

Number of all Router LSAs

SumNet

Number of all Sumnet LSAs

SumASB

Number of all SumASB LSAs

Area

Neighbors

Number of neighbors in this area

Interfaces

Number of interfaces in this area

Spf

Number of SPF computations in this area

rtr, net, sumasb, sumnet

Number of all LSAs in this area

Routing Table

Intra Area

Number of intra-area routes

Inter Area

Number of inter-area routes

ASE

Number of external routes

 

3.1.16  display ospf error

Syntax

display ospf [ process-id ] error

View

Any view

Parameters

process-id: OSPF process ID, in the range 1 to 65535. If you do not specify a process ID, this command applies to all current OSPF processes.

Description

Use the display ospf error command to display OSPF error information.

Examples

# Display the OSPF error information.

<H3C> display ospf error

OSPF Process 1 with Router ID 1.1.1.1

OSPF packet error statistics:

   0: IP: received my own packet        0: OSPF: wrong packet type

   0: OSPF: wrong version               0: OSPF: wrong checksum

   0: OSPF: wrong area id               0: OSPF: area mismatch

   0: OSPF: wrong virtual link          0: OSPF: wrong authentication type

   0: OSPF: wrong authentication key    0: OSPF: too small packet

   0: OSPF: packet size > ip length     0: OSPF: transmit error

   0: OSPF: interface down              0: OSPF: unknown neighbor

   0: HELLO: netmask mismatch           0: HELLO: hello timer mismatch

   0: HELLO: dead timer mismatch        0: HELLO: extern option mismatch

   0: HELLO: router id confusion        0: HELLO: virtual neighbor unknown

   0: HELLO: NBMA neighbor unknown      0: DD: neighbor state low

   0: DD: router id confusion           0: DD: extern option mismatch

   0: DD: unknown LSA type              0: LS ACK: neighbor state low

   0: LS ACK: wrong ack                 0: LS ACK: duplicate ack

   0: LS ACK: unknown LSA type          0: LS REQ: neighbor state low

   0: LS REQ: empty request             0: LS REQ: wrong request

   0: LS UPD: neighbor state low        0: LS UPD: newer self-generate LSA

   0: LS UPD: LSA checksum wrong         0: LS UPD: received less recent LSA

   0: LS UPD: unknown LSA type           0: OSPF routing: next hop not exist

   0: DD: MTU option mismatch           0: ROUTETYPE: wrong type value

   0: LS UPD: LSA length wrong                                          

Table 3-5 Description on the fields of the display ospf error command

Field

Description

IP: received my own packet

Received my own packet

OSPF: wrong packet type

OSPF packet type error

OSPF: wrong version

OSPF version error

OSPF: wrong checksum

OSPF checksum error

OSPF: wrong area id

OSPF area ID error

OSPF: area mismatch

OSPF area mismatch

OSPF: wrong virtual link

OSPF virtual link error

OSPF: wrong authentication type

OSPF authentication type error

OSPF: wrong authentication key

OSPF authentication key error

OSPF: too small packet

OSPF packet too small

OSPF: packet size > ip length

OSPF packet size exceeds IP packet length

OSPF: transmit error

OSPF transmission error

OSPF: interface down

OSPF interface is down

OSPF: unknown neighbor

OSPF neighbors are unknown

HELLO: netmask mismatch

Network mask mismatch

HELLO: hello timer mismatch

Interval of HELLO packet is mismatched

HELLO: dead timer mismatch

Interval of dead neighbor packet is mismatched

HELLO: extern option mismatch

Extern option of Hello packet is mismatched

HELLO: router id confusion

Hello packet: Router ID confusion

HELLO: virtual neighbor unknown

Hello packet: unknown virtual neighbor

HELLO: NBMA neighbor unknown

Hello packet: unknown NBMA neighbor

DD: neighbor state low

Database description (DD) packet: asynchronous neighbor state

DD: unknown LSA type

DD packet: unknown LSA type

DD: router id confusion

DD packet: router id unidentifiable

DD: extern option mismatch

DD packet: external route flag error

LS ACK: neighbor state low

Link state acknowledgment (LS ACK) packet: asynchronous neighbor state

LS ACK: wrong ack

Link state acknowledgment packet: ack error

LS ACK: duplicate ack

Link state acknowledgment packet: ack duplication

LS ACK: unknown LSA type

Link state acknowledgment packet: unknown LSA type

LS REQ: neighbor state low

Link state request (LS REQ) packet: asynchronous neighbor state

LS REQ: empty request

Link state request packet: empty request

LS REQ: wrong request

Link state request packet: erroneous request

LS UPD: neighbor state low

Link state update packet: asynchronous neighbor state

LS UPD: newer self-generate LSA

Link state update packet: newer LSA generated by itself

LS UPD: LSA checksum wrong

Link state update packet: LSA checksum error

LS UPD:received less recent LSA

Link state update packet: received less recent LSA

LS UPD: unknown LSA type

Link state update packet: unknown LSA type

OSPF routing: next hop not exist

Next hop of OSPF routing does not exist

DD: MTU option mismatch

MTU option of DD packet is mismatched

ROUTETYPE: wrong type value

Route type: the value of the type is wrong

LS UPD: LSA length wrong

LSA length error

 

3.1.17  display ospf interface

Syntax

display ospf [ process-id ] interface [ interface-type interface-number ]

View

Any view

Parameters

process-id: OSPF process ID, in the range 1 to 65535. If you do not specify a process ID, this command applies to all current OSPF processes.

interface-type interface-number: Specifies an interface by its type and number.

Description

Use the display ospf interface command to display the OSPF interface information.

Examples

# Display the OSPF interface information of VLAN-interface 1.

<H3C> display ospf interface vlan-interface 1

                OSPF Process 1 with Router ID 1.1.1.1

                                Interfaces

Interface: 10.110.10.2 (Vlan-interface1)

 Cost: 1 State: BackupDR    Type: Broadcast

 Priority: 1

 Designated Router: 10.110.10.1

 Backup Designated Router: 10.110.10.2

 Timers: Hello 10, Dead 40, Poll 40, Retransmit 5, Transmit Delay 1

Table 3-6 Description on the fields of the display ospf interface command

Field

Description

Cost

Cost of the interface

State

State of the interface state machine

Type

Network type of OSPF

Priority

Priority of DR for interface election

Designated Router

DR in the network where the interface resides

Backup Designated Router

BDR in the network where the interface resides

Timers

OSPF timers, defined as follows:

Hello

Interval of hello packet

Dead

Interval of dead neighbors

Poll

Interval of poll

Retransmit

Interval of retransmitting LSA

Transmit Delay

Delay time of transmitting LSA

 

3.1.18  display ospf lsdb

Syntax

display ospf [ process-id [ area-id ] ] lsdb [ brief | [ asbr | ase | network | nssa | router | summary  ] [ ip-address ] [ originate-router ip-address | self-originate ] ]

View

Any view

Parameters

process-id: OSPF process ID, in the range 1 to 65535. If you do not specify a process ID, this command applies to all current OSPF processes.

area-id: OSPF area ID, which can be a decimal integer (ranging from 0 to 4294967295) or in the form of an IP address.

brief: Displays brief database information.

asbr: Displays the database information about Type-4 LSAs (summary-Asbr-LSAs) advertised by ASBR routers.

ase: Displays the database information about the Type-5 LSAs (AS-external-LSAs). This argument is unavailable if you have provided a value for area-id.

network: Displays the database information about the Type-2 LSAs (network-LSAs).

nssa: Displays the database information about the Type-7 LSAs (NSSA-external-LSAs).

router: Displays the database information about the Type-1 LSAs (router-LSAs).

summary: Displays the database information about the Type-3 LSAs (summary-net-LSAs).

ip-address: Link state identifier (in the form of an IP address).

originate-router ip-address: Specifies the ID of the router advertising the LSAs.

self-originate: Displays the database information about the LSAs generated by the local router (self-originate LSAs).

Description

Use the display ospf lsdb command to display the database information about OSPF connecting state.

Examples

# Display the database information about OSPF connection state.

<H3C> display ospf lsdb

                OSPF Process 1 with Router ID 1.1.1.1

                            Link State Database

                               Area: 0.0.0.0

Type LinkState ID  AdvRouter  Age Len  Sequence  Metric Where

Rtr  2.2.2.2       2.2.2.2    465 36   8000000c       0 SpfTree

Rtr  1.1.1.1       1.1.1.1    449 36   80000004       0 SpfTree

Net  10.153.17.89  2.2.2.2    465 32   80000004       0 SpfTree

SNet 10.153.18.0   1.1.1.1    355 28   80000003      10 Inter List

                              Area: 0.0.0.1

Type LinkState ID  AdvRouter  Age Len  Sequence  Metric Where

Rtr  1.1.1.1       1.1.1.1    449 36   80000004       0 SpfTree

Rtr  3.3.3.3       3.3.3.3    429 36   8000000a       0 Clist

Net  10.153.18.89  3.3.3.3    429 32   80000003       0 SpfTree

SNet 10.153.17.0   1.1.1.1    355 28   80000003      10 Inter List

ASB  2.2.2.2       1.1.1.1    355 28   80000003      10 SumAsb List

                             AS External Database:

Type LinkState ID  AdvRouter  Age Len  Sequence  Metric Where

ASE  10.153.18.0   1.1.1.1   1006 36   80000002       1 Ase List

ASE  10.153.16.0   2.2.2.2    798 36   80000002       1 Uninitialized

ASE  10.153.17.0   2.2.2.2    623 36   80000003       1 Uninitialized

ASE  10.153.17.0   1.1.1.1   1188 36   80000002       1 Ase List

Table 3-7 Description on the fields of the display ospf lsdb command

Field

Description

Type

Type of the LSA

LinkStateID

Link state ID of the LSA

AdvRouter

Router ID of the router that advertises the LSA

Age

Age of the LSA

Len

Length of the LSA

Sequence

Sequence number of the LSA

Metric

Cost from the router that advertises the LSA to LSA destination

Where

Location of the LSA

 

<H3C> display ospf lsdb ase

                OSPF Process 1 with Router ID 1.1.1.1

                           Link State Data Base

type: ASE

ls id :  2.2.0.0

adv rtr: 1.1.1.1

ls age:  349

len:    36

seq#:   80000001

chksum:  0xfcaf

Options: (DC)

Net mask:255.255.0.0

     Tos 0 metric: 1

     E type :    2

     Forwarding Address: 0.0.0.0

     Tag: 1

Table 3-8 Description on the fields of the display ospf lsdb ase command

Field

Description

type

Type of the LSA

ls id

Link state ID of the LSA

adv rtr

Router ID of the router that advertises the LSA

ls age

Age of the LSA

len

Length of the LSA

seq#

Sequence number of the LSA

chksum

Checksum of the LSA

Options

Options of the LSA

Net mask

Network mask

E type

Type of external route

Forwarding Address

Forwarding address

Tag

Tag

 

3.1.19  display ospf nexthop

Syntax

display ospf [ process-id ] nexthop

View

Any view

Parameters

process-id: OSPF process ID, in the range 1 to 65535. If you do not specify a process ID, this command applies to all current OSPF processes.

Description

Use the display ospf nexthop command to display the OSPF next-hop information.

Examples

# Display the OSPF next-hop information.

<H3C> display ospf nexthop

                OSPF Process 1 with Router ID 2.2.2.2

 

Next hops:

Address       Type    Refcount     Intf Addr       Intf Name

---------------------------------------------------------------

202.38.160.1 Direct  3          202.38.160.1      Vlan-interface2

202.38.160.2 Neighbor    1          202.38.160.1      Vlan-interface2

Table 3-9 Description on the fields of the display ospf nexthop command

Field

Description

Address

Address of next hop

Type

Type of next hop

Refcount

Reference count of the next hop, namely, number of routes using the next hop

Intf Addr

IP address of the interface to the next hop

Intf Name

Interface to the next hop

nexthop

Next hop

 

3.1.20  display ospf peer

Syntax

display ospf [ process-id ] peer [ brief | statistics ]

View

Any view

Parameters

process-id: OSPF process ID, in the range 1 to 65535. If you do not specify a process ID, this command applies to all current OSPF processes.

Description

Use the display ospf peer command to display the information about OSPF peer.

Use the display ospf peer brief command to display the brief information about each OSPF peer.

Use the display ospf peer statistics command to display the statistics of each OSPF peer.

Examples

# Display the information about OSPF peer.

<H3C> display ospf peer

                OSPF Process 1 with Router ID 1.1.1.1

                                Neighbors

Area 0.0.0.0 interface 10.153.17.88(Vlan-interface1)'s neighbor(s)

  RouterID: 2.2.2.2         Address: 10.153.17.89

        State: Full  Mode: Nbr is Master  Priority: 1

        DR: 10.153.17.89  BDR: 10.153.17.88

        Dead timer expires in 31s

        Neighbor has been up for 01:14:14

Table 3-10 Description on the fields of the display ospf peer command

Field

Description

RouterID

Router ID of neighbor router

Address

Address of the interface, through which neighbor router communicates with the router

State

State of adjacency relation

Mode

Master/Slave mode formed by negotiation in exchanging DD packet

Priority

Priority of DR/BDR for neighbor election

DR

IP address of the interface of the elected DR

BDR

IP address of the interface of the elected BDR

Dead timer expires in 31s

If no hello packet is received from the peer within this interval, the peer will be considered invalid.

Neighbor has been up for 01:14:14

Time of neighbor connection

 

# Display OSPF peer statistics.

<H3C> display ospf peer statistics

                OSPF Process 1 with Router ID 1.1.1.1

                                Neighbor Statistics

Area ID      Down Attempt Init 2-Way ExStart Exchange Loading Full Total

0.0.0.0      0    0       0    0     0       0        0       1    1

0.0.0.1      0    0       0    0     0       0        0       1    1

Total        0    0       0    0     0       0        0       2    2

Table 3-11 Description on the fields of the display ospf peer statistics command

Field

Description

Area ID

Area ID

Down

Initial state for OSPF to establish neighbor relation, which indicates that OSPF router does not receive the message from a certain neighbor router within a period of time

Attempt

This state is enabled in an NBMA environment, such as Frame Relay, X.25 or ATM. The state indicates that OSPF router does not receive the message from a certain neighbor router within a period of time, but still attempts to send Hello packets to the adjacent routers for communications in a lower frequency.

Init

Indicates that OSPF router has received Hello packet from a neighbor router, but its IP address is not contained in the Hello packet. Therefore, a two-way communication between them has not been established.

2-Way

Indicates that a two-way communication between OSPF router and neighbor router has been established. DR and BDR can be selected in this state (or higher state).

ExStart

In this state, the router determines the sequence number of initial database description (DD) packet used for data exchange, so that it can obtain the latest link state information

Exchange

Indicates that OSPF router sends DD packet to its neighbor routers to exchange link state information

Loading

In this state, OSPF router requests neighbor routers based on the updated link state information from neighbor routers and its expired information, and waits for response from neighbor routers

Full

Indicates that database synchronization between the routers that have established neighbor relation has been completed, and their link state databases have been consistent

 

3.1.21  display ospf request-queue

Syntax

display ospf [ process-id ] request-queue

View

Any view

Parameters

process-id: OSPF process ID, in the range 1 to 65535. If you do not specify a process ID, this command applies to all current OSPF processes.

Description

Use the display ospf request-queue command to display the information about the OSPF request-queue.

Examples

# Display the information about the OSPF request-queue.

<H3C> display ospf request-queue

                 OSPF Process 1 with Router ID 1.1.1.1

                               Request List

 

  The Router's Neighbor is

  RouterID:  10.1.1.1        Address: 120.1.1.1

  Interface: 120.1.1.2       Area: 0.0.0.0

  Request list:

  LSID:151.14.83.0      AdvRouter:5.4.0.0  Sequence:8000002a  Age:545

  LSID:151.10.91.0      AdvRouter:5.4.0.0  Sequence:8000002a  Age:545

Table 3-12 Description on the fields of the display ospf request-queue command

Field

Description

RouterID

Router ID of neighbor router

Address

Address of the interface, through which neighbor routers communicate with the router

Interface

Address of the interface on the network segment

Area

Area number of OSPF

LSID

Link State ID of the LSA

AdvRouter

Router ID of the router that advertised the LSA

Sequence

Sequence number of the LSA, used to discover old and repeated LSAs

Age

Age of the LSA

 

3.1.22  display ospf retrans-queue

Syntax

display ospf [ process-id ] retrans-queue

View

Any view

Parameters

process-id: OSPF process ID. If you do not specify a process ID, this command applies to all current OSPF processes.

Description

Use the display ospf retrans-queue command to display the information about the OSPF retransmission queue.

Examples

# Display the information about the OSPF retransmission queue.

<H3C> display ospf retrans-queue

                 OSPF Process 200 with Router ID 103.160.1.1

                               Retransmit List

      The Router's Neighbors is

  RouterID: 162.162.162.162 Address: 103.169.2.2

  Interface: 103.169.2.5     Area: 0.0.0.1

          Retrans list:

          Type: ASE  LSID:129.11.77.0  AdvRouter:103.160.1.1

          Type: ASE  LSID:129.11.108.0  AdvRouter:103.160.1.1

Table 3-13 Description on the fields of the display ospf retrans-queue command

Field

Description

RouterID

Router ID of neighbor router

Address

Address of the interface, through which neighbor routers communicate with the router

Interface

Address of the interface on the network segment

Area

Area number of OSPF

Type

Type of the LSA

LSID

Link State ID of the LSA

AdvRouter

Router ID of the router that advertises the LSA

 

3.1.23  display ospf routing

Syntax

display ospf [ process-id ] routing

View

Any view

Parameters

process-id: OSPF process ID, in the range 1 to 65535. If you do not specify a process ID, this command applies to all current OSPF processes.

Description

Use the display ospf routing command to display the information about OSPF routing table.

Examples

# Display OSPF routing information.

<H3C> display ospf routing

                  OSPF Process 1 with Router ID 1.1.1.1

                        Routing Tables

Routing for Network

Destination      Cost Type  NextHop         AdvRouter        Area

10.110.0.0/16       1  Net  10.110.10.1      1.1.1.1         0.0.0.0

10.10.0.0/16        1  Stub 10.10.0.1        3.3.3.3         0.0.0.0

Total Nets: 2

  Intra Area: 2  Inter Area: 0  ASE: 0  NSSA: 0

Table 3-14 Description on the fields of the display ospf routing command

Field

Description

Destination

Destination network segment

Cost

Cost of route

Type

Type of route

NextHop

Next hop of route

AdvRouter

ID of the router that advertises the route

Area

Area ID

Intra Area

Number of intra-area routes

Inter Area

Number of inter-area routes

ASE

Number of external routes

NSSA

Number of NSSA routes

 

3.1.24  display ospf vlink

Syntax

display ospf [ process-id ] vlink

View

Any view

Parameters

process-id: OSPF process ID, in the range 1 to 65535. If you do not specify a process ID, this command applies to all current OSPF processes.

Description

Use the display ospf vlink command to display the information about OSPF virtual links.

Examples

# Display OSPF virtual link information.

<H3C> display ospf vlink

                  OSPF Process 1 with Router ID 1.1.1.1

                        Virtual Links

  Virtual-link Neighbor-id  -> 2.2.2.2, State: Full

    Cost: 0 State: Full    Type: Virtual

    Transit Area: 0.0.0.2

    Timers: Hello 10, Dead 40, Poll 0, Retransmit 5, Transmit Delay 1

Table 3-15 Description on the fields of the display ospf vlink command

Field

Description

Virtual-link Neighbor-id

Router ID of virtual-link neighbor router

State

State

Interface

IP address of the interface on the virtual link

Cost

Route cost of the interface

Type

Type: virtual link

Transit Area

ID of transit area that the virtual link passes, and it cannot be backbone area, STUB area, or NSSA area

Timers

OSPF timers, defined as follows:

Hello

Interval of hello packet

Dead

Interval of dead neighbors

Poll

Interval of poll

Retransmit

Interval of retransmitting LSA

Transmit Delay

Delay time of transmitting LSA

 

3.1.25  filter-policy export

Syntax

filter-policy { acl-number | ip-prefix ip-prefix-name } export [ protocol ]

undo filter-policy { acl-number | ip-prefix ip-prefix-name } export [ protocol ]

View

OSPF view

Parameters

acl-number: Basic or advanced ACL number, in the range 2000 to 3999.

ip-prefix-name: Name of the address prefix list, a string of 1 to 19 characters.

protocol: Routing protocol advertising the routing information. At present, it can be direct, rip, bgp, isis or static.

Description

Use the filter-policy export command to enable the ASBR routers to filter the external routes imported to OSPF. This command is applicable to ASBR routers only.

Use the undo filter-policy export command to cancel the filtering rule configured.

By default, OSPF does not receive routes advertised by the other routing protocols.

 

&  Note:

l      The filter-policy export command only takes effect on routes imported to the local device through the import-route command. The command does not take effect if it is executed before the import-route command.

l      If the protocol argument is not specified in the filter-policy export command, this command takes effect on all the routes imported to the local device through the import-route command.

 

Related commands: acl, ip ip-prefix.

Examples

# Configure OSPF to advertise only the routing information permitted by acl 2000.

<H3C> system-view

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

[H3C] acl number 2000

[H3C-acl-basic-2000] rule permit source 11.0.0.0  0.255.255.255

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

[H3C-ospf-1] filter-policy 2000 export

3.1.26  filter-policy import

Syntax

filter-policy { acl-number | ip-prefix ip-prefix-name | gateway ip-prefix-name } import

undo filter-policy { acl-number | ip-prefix ip-prefix-name | gateway ip-prefix-name } import

View

OSPF view

Parameters

acl-number: Basic or advanced access control list used for routing information filtering based on destination addresses.

ip-prefix-name: Name of the address prefix list used for routing information filtering based on destination addresses, a string of 1 to 19 characters.

gateway ip-prefix-name: Specifies the name of the address prefix list used for filtering the addresses of the neighbor routers advertising the routing information.

Description

Use the filter-policy import command to configure the OSPF rules for filtering the routing information received.

Use the undo filter-policy import command to cancel the filtering of the routing information received.

By default, no filtering of the received routing information is performed.

In some situations, it may be required that only the routing information meeting some conditions can be received. You can use the filter-policy command to set the filtering conditions for the routing information to be received. Only the routing information passing the filter can be received.

The filter-policy import command filters the routes calculated by OSPF. Only the routes passing the filter can be added to the routing table. The routes can be filtered based on next hop and destination address.

OSPF is a dynamic routing protocol based on link state, with routing information hidden in LSAs. Therefore, OSPF cannot filter any advertised or received LSA. This command is used much less in OSPF than in distance-vector routing protocols.

Examples

# Filter the received routing information according to the rule defined by ACL 2000.

<H3C> system-view

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

[H3C] acl number 2000

[H3C-acl-basic-2000] rule permit source 20.0.0.0  0.255.255.255

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

[H3C-ospf-1] filter-policy 2000 import

3.1.27  import-route

Syntax

import-route protocol [ process-id | allow-ibgp ] [ cost value | type value | tag value | route-policy route-policy-name ]*

undo import-route protocol [ process-id ]

View

OSPF view

Parameters

protocol: Redistributes routes from the routing protocol. At present, it can be direct, rip, bgp, isis, static, ospf, ospf-ase and ospf-nssa.

process-id: OSPF process ID, in the range 1 to 65535. It is for route redistribution from another OSPF process.

allow-ibgp: Allows the redistribution of IBGP routes when redistributing routes from BGP.

cost value: Specifies the cost of imported external routes, in the range 0 to 16777214.

type value: Specifies the cost type of imported external routes. The value ranges from 1 to 2.

tag value: Specifies the tag of imported external routes.

route-policy route-policy-name: Imports only the routes matching the specified route-policy. The route-policy-name argument is a string of 1 to 19 characters.

Description

Use the import-route command to import external routes.

Use the undo import-route command to cancel the importing of external routes.

 

&  Note:

You are recommended to configure the route type, cost and tag together in one command. When you configure them individually, the new configuration will overwrite the old one.

 

By default, the routing information of other protocols is not imported.

Note that:

l           The import-route bgp command redistributes EBGP routes only.

l           The import-route bgp allow-ibgp command redistributes both EBGP and IBGP routes.

l           Use the import-route bgp allow-ibgp command with care, because it redistributes IBGP routes without keeping the AS_PATH attribute, which may lead to routing loops between ASs.

l           It is recommended to configure parameters such as type, cost and tag for redistributed routes with one command line because reconfiguring the command overwrites the previous configuration.

 

& Note:

Use the import-route bgp allow-ibgp command with care!

 

Examples

# Import RIP routes as type-2 routes, with the route tag of 33 and the route cost of 50.

<H3C> system-view

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

[H3C] ospf 1

[H3C-ospf-1] import-route rip type 2 tag 33 cost 50

3.1.28  network

Syntax

network ip-address ip-mask

undo network ip-address ip-mask

View

OSPF area view

Parameters

ip-address: Address of the network segment where the interface resides.

ip-mask: IP address wildcard shielded text (similar to the complement of the IP address mask).

Description

Use the network command to enable an interface to run the OSPF protocol.

Use the undo network command to disable an interface from running OSPF.

By default, the interface does not belong to any area.

To run OSPF on an interface, the master IP address of this interface must be in the network segment specified by this command. If only the slave IP address of the interface is in the network segment specified by this command, this interface will not run OSPF.

Related commands: ospf.

Examples

# Specify the interfaces whose master IP addresses are in the segment of 10.110.36.0 to run OSPF and specify the number of the OSPF area (where these interfaces reside) as 6.

<H3C> system-view

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

[H3C] ospf 1

[H3C-ospf-1] area 6

[H3C-ospf-1-area-0.0.0.6] network 10.110.36.0 0.0.0.255

3.1.29  nssa

Syntax

nssa [ default-route-advertise | no-import-route | no-summary ]*

undo nssa

View

OSPF area view

Parameters

default-route-advertise: Imports the default route to the NSSA area.

no-import-route: Specifies not to import route to the NSSA area.

no-summary: An ABR is disabled from transmitting summary_net LSAs to the NSSA area.

Description

Use the nssa command to configure an OSPF area as an NSSA area.

Use the undo nssa command to cancel the function.

By default, no NSSA area is configured.

For all the routers connected to the NSSA area, the nssa command must be used to configure the area as the NSSA attribute.

The default-route-advertise keyword is used to generate the default type-7 LSA. Whether or not the route 0.0.0.0 exists in the routing table on the ABR, the type-7 LSA default route will always be generated. The type-7 LSA default route is generated only when the route 0.0.0.0 exists in the routing table on the ASBR.

On the ASBR, if the no-import-route keyword is provided, the external route imported by OSPF with the import-route command will not be advertised to NSSA area.

Examples

# Configure area 1 as NSSA area.

<H3C> system-view

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

[H3C] ospf 1

[H3C-ospf-1] area 1

[H3C-ospf-1-area-0.0.0.1] network 36.0.0.0 0.255.255.255

[H3C-ospf-1-area-0.0.0.1] nssa

3.1.30  ospf

Syntax

ospf [ process-id [ router-id router-id ] ]

undo ospf [ process-id ]

View

System view

Parameters

process-id: OSPF process ID, in the range 1 to 65535. By default, the process ID is 1. The ID is locally significant.

router-id: Router ID used by an OSPF process, in dotted decimal notation.

Description

Use the ospf command to enable OSPF.

Use the undo ospf command to disable OSPF.

After OSPF is enabled, you can perform the related configuration in OSPF view.

By default, the system does not run OSPF.

Related commands: network.

Examples

# Enable OSPF.

<H3C> system-view

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

[H3C] router id 10.110.1.8

[H3C] ospf 1

[H3C-ospf-1]

# Enable and run OSPF with the process ID of 120.

<H3C> system-view

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

[H3C] router id 10.110.1.8

[H3C] ospf 120

[H3C-ospf-120]

3.1.31  ospf authentication-mode

Syntax

ospf authentication-mode { simple password | md5 key-id key }

undo ospf authentication-mode { simple | md5 }

View

Interface view

Parameters

simple password: Uses plain text authentication. The password argument is a string of up to eight characters.

key-id: ID of the authentication key in MD5 authentication mode, in the range 1 to 255.

key: MD5 authentication key. You can either input the key in plain text (a string of 1 to 16 characters) or in a cipher text (exactly 24 characters). However, the key is displayed in a cipher text of 24 characters with the display current-configuration command.

Description

Use the ospf authentication-mode command to configure the authentication mode and key ID for adjacent routers.

Use the undo ospf authentication-mode command to remove specified configuration.

By default, no authentication is available on an interface.

Interfaces attached to the same network segment must have the same authentication password and mode.

In addition, you need to use the authentication-mode command to set the authentication type of the area, so as to validate the configuration.

Related commands: authentication-mode.

Examples

# Configure area 1 where the network segment 131.119.0.0 of interface VLAN-interface 10 resides to support MD5 cipher text authentication. Set the authentication key identifier to 15 and the authentication key to abc.

<H3C> system-view

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

[H3C] ospf 1

[H3C-ospf-1] area 1

[H3C-ospf-1-area-0.0.0.1] network 131.119.0.0 0.0.255.255

[H3C-ospf-1-area-0.0.0.1] authentication-mode md5

[H3C-Vlan-interface10] ospf authentication-mode md5 15 abc

3.1.32  ospf cost

Syntax

ospf cost value

undo ospf cost

View

Interface view

Parameters

value: Value of OSPF cost, in the range 1 to 65535.

Description

Use the ospf cost command to configure the cost for running OSPF on the interface.

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

For the switch, the default cost for running OSPF protocol on a VLAN interface is 1.

Examples

# Set the current OSPF interface cost to 33.

<H3C> system-view

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

[H3C] interface Vlan-interface 10

[H3C-Vlan-interface10] ospf cost 33

3.1.33  ospf dr-priority

Syntax

ospf dr-priority value

undo ospf dr-priority

View

Interface view

Parameters

value: DR priority of the interface, in the range 0 to 255. The default value is 1.

Description

Use the ospf dr-priority command to configure the priority for DR election on an interface.

Use the undo ospf dr-priority command to restore the default value.

The priority determines the qualification of the interface in DR election. The interface with higher priority is preferred in case an election conflict occurs.

Examples

# Set the priority of the interface VLAN-interface 10 to 8.

<H3C> system-view

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

[H3C] interface Vlan-interface 10

[H3C-Vlan-interface10] ospf dr-priority 8

3.1.34  ospf mib-binding

Syntax

ospf mib-binding process-id

undo ospf mib-binding

View

System view

Parameters

process-id: OSPF process ID. It ranges from 1 to 65535 and defaults to 1.

Description

Use the ospf mib-binding command to bind MIB operation to a specified OSPF process.

Use the undo ospf mib-binding command to restore the default setting.

By default, MIB operation is bound to the first OSPF process.

With this command, you can bind MIB operation to other OSPF processes.

To cancel the binding, use the undo ospf mib-binding command. The default binding relationship will be established automatically.

Examples

# Bind MIB operation to OSPF process 100.

<H3C> system-view

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

[H3C] ospf mib-binding 100

# Bind MIB operation to OSPF process 200.

<H3C> system-view

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

[H3C] ospf mib-binding 200

# Cancel the binding of MIB operation.

<H3C> system-view

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

[H3C] undo ospf mib-binding

3.1.35  ospf mtu-enable

Syntax

ospf mtu-enable

undo ospf mtu-enable

View

Interface view

Parameters

None

Description

Use the ospf mtu-enable command to enable an interface to add real MTU into database description (DD) packets.

Use the undo ospf mtu-enable command to restore the default.

By default, an interface adds the MTU value of 0 into DD packets, that is, no real MTU is added.

DD packets are used to describe its own LSDB when the router running OSPF protocol is synchronizing the database.

The default MTU value of DD packet is 0. You can use this command to let the specified interface add the real MTU value into DD packets.

Examples

# Enable interface VLAN-interface 3 to add real MTU value into DD packets.

<H3C> system-view

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

[H3C] interface Vlan-interface 3

[H3C-Vlan-interface3] ospf mtu-enable

3.1.36  ospf network-type

Syntax

ospf network-type { broadcast | nbma | p2mp | p2p }

undo ospf network-type

View

Interface view

Parameters

broadcast: Specifies the network type as broadcast.

nbma: Specifies the network type as NBMA.

p2mp: Specifies the network type as point-to-multipoint.

p2p: Specifies the network type as to point-to-point.

Description

Use the ospf network-type command to configure the network type for an OSPF interface.

Use the undo ospf network-type command to restore the default network type for an OSPF interface.

OSPF divides networks into four types based on link layer protocol:

l           Broadcast: If Ethernet or FDDI is adopted, OSPF defaults the network type to broadcast.

l           Non-Broadcast Multi-access (nbma): If Frame Relay, ATM, HDLC or X.25 is adopted, OSPF defaults the network type to NBMA.

l           Point-to-Multipoint (p2mp): OSPF will not default the network type of any link layer protocol to p2mp. The general undertaking is to change a partially connected NBMA network to p2mp network if the NBMA network is not fully-meshed.

l           Point-to-point (p2p): If PPP, LAPB or POS is adopted, OSPF defaults the network type to p2p.

If there is any router not supporting multicast addresses on a broadcast network, the network type of the interface can be changed to NBMA. Alternatively, the network type of the interface can be changed from NBMA to broadcast.

For a non-broadcast multi-accessible network to be of NBMA type, any two routers in the network must be directly reachable to each other through a virtual circuit. In other words, the network must be fully-meshed.

For a network not meeting this condition, the network type of the interface must be changed to point-to-multipoint. In this way, routing information can be exchanged between two routers not directly reachable to each other through another router that is directly reachable to the two routers.

If only two routers run OSPF in the same network segment, the network type of the interface can also be changed to point-to-point.

Note that you must use the peer command to configure the peer if the network type of the interface is NBMA or manually changed to NBMA with the ospf network-type command.

Related commands: ospf dr-priority.

Examples

# Set the network type for interface VLAN-interface 10 to NBMA.

<H3C> system-view

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

[H3C] interface Vlan-interface 10

[H3C-Vlan-interface10] ospf network-type nbma

3.1.37  ospf timer dead

Syntax

ospf timer dead seconds

undo ospf timer dead

View

Interface view

Parameters

seconds: Dead interval of the OSPF neighbor in seconds, in the range 1 to 65535.

Description

Use the ospf timer dead command to configure the dead interval of the OSPF peer.

Use the undo ospf timer dead command to restore the default.

By default, the dead interval is 40 seconds for p2p and broadcast interfaces and is 120 seconds for p2mp and nbma interfaces.

If an interface receives no Hello packet from the neighbor after the dead interval elapsed, the interface considers the neighbor as dead. The dead interval on an interface is at least four times the hello interval. Any two routers attached to the same segment must have the same dead interval.

Related commands: ospf timer hello.

Examples

# Set the dead interval on the interface VLAN-interface 10 to 80 seconds.

<H3C> system-view

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

[H3C] interface Vlan-interface 10

[H3C-Vlan-interface10] ospf timer dead 80

3.1.38  ospf timer hello

Syntax

ospf timer hello seconds

undo ospf timer hello

View

Interface view

Parameters

seconds: Hello interval in seconds, in the range 1 to 255.

Description

Use the ospf timer hello command to configure the hello interval (interval for transmitting Hello messages) on an interface.

Use the undo ospf timer hello command to restore the default hello interval on an interface.

By default, the hello interval is 10 seconds for p2p or broadcast interfaces and 30 seconds for p2mp or nbma interfaces.

Related commands: ospf timer dead.

Examples

# Configure the hello interval on the interface VLAN-interface 10 as 20 seconds.

<H3C> system-view

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

[H3C] interface Vlan-interface 10

[H3C-Vlan-interface10] ospf timer hello 20

3.1.39  ospf timer poll

Syntax

ospf timer poll seconds

undo ospf timer poll

View

Interface view

Parameters

seconds: Poll interval in seconds. The value ranges from 1 to 65,535 and defaults to 40.

Description

Use the ospf timer poll command to configure the poll interval on an NBMA and p2mp interface.

Use the undo ospf timer poll command to restore the default value.

When an NBMA or P2MP interface finds its neighbor is dead, it will send hello packets at the poll interval. The poll interval is at least three times the hello interval.

Examples

# Set the poll timer interval on interface VLAN-interface 20 to 120 seconds.

<H3C> system-view

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

[H3C] interface Vlan-interface 20

[H3C-Vlan-interface20] ospf timer poll 120

3.1.40  ospf timer retransmit

Syntax

ospf timer retransmit interval

undo ospf timer retransmit

View

Interface view

Parameters

interval: LSA retransmit timer interval in seconds, in the range 1 to 3600. The default is 5.

Description

Use the ospf timer retransmit command to set the LSA retransmit interval on an interface.

Use the undo ospf timer retransmit command to restore the default.

After sending a LSA, an interface waits for an acknowledgement packet. If the interface receives no acknowledgement when the retransmit interval elapses, it will retransmit the LSA.

The retransmit interval should not be too small to avoid unnecessary retransmissions (See RFC 2328).

Examples

# Set the LSA retransmit interval on the interface VLAN-interface 10 to 12 seconds.

<H3C> system-view

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

[H3C] interface Vlan-interface 10

[H3C-Vlan-interface10] ospf timer retransmit 12

3.1.41  ospf trans-delay

Syntax

ospf trans-delay seconds

undo ospf trans-delay

View

Interface view

Parameters

seconds: LSA transmission delay time in seconds. in the range 1 to 3,600. The default is 1.

Description

Use the ospf trans-delay command to configure the LSA transmission delay time on an interface.

Use the undo ospf trans-delay command to restore the default.

Each LSA in the LSDB has an age (incremented 1 by a second), but a LSA is not aged out on transmission. It is necessary to add a transmit delay into its age time, which is important for transmission on low speed networks.

Examples

# Set the LSA transmit delay time on the interface VLAN-interface 10 to 3 seconds.

<H3C> system-view

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

[H3C] interface Vlan-interface 10

[H3C-Vlan-interface10] ospf trans-delay 3

3.1.42  peer

Syntax

peer ip-address [ dr-priority dr-priority-value ]

undo peer ip-address

View

OSPF view

Parameters

ip-address: IP address of the peer.

dr-priority-value: Value of the corresponding priority of a neighbor in the NBMA network. It ranges from 0 to 255 and defaults to 1.

Description

Use the peer command to specify the IP address of an NBMA neighbor, and the DR priority of the neighbor.

Use the undo peer command to cancel this configuration.

Examples

# Configure the IP address of the neighbor router as 10.1.1.1.

<H3C> system-view

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

[H3C] ospf 1

[H3C-ospf-1] peer 10.1.1.1

3.1.43  preference

Syntax

preference [ ase ] value

undo preference [ ase ]

View

OSPF view

Parameters

value: Priority value, in the range 1 to 255.

ase: Specifies the priority of imported external routes of the AS.

Description

Use the preference command to configure the priority of an OSPF routes.

Use the undo preference command to restore the default.

By default, the priority is 10 for OSPF internal routes and 150 external routes.

Since a router may run multiple dynamic routing protocols, it has to decide on routes found by these protocols. Every protocol has a priority to help the router determine which route to use especially when multiple routes to the same destination are found by several routing protocols. The route found by the protocol with the highest priority will be used.

Examples

# Specify the priority of an imported external route of the AS as 160.

<H3C> system-view

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

[H3C] ospf 1

[H3C-ospf-1] preference ase 160

3.1.44  protocol multicast-mac enable

Syntax

protocol multicast-mac enable

undo protocol multicast-mac enable

View

System view

Parameters

None

Description

Use the protocol multicast-mac enable command to enable the sending of protocol multicast MAC addresses.

Use the undo protocol multicast-mac enable command to disable the sending of protocol multicast MAC addresses.

By default, protocol multicast MAC address sending is enabled.

If OSPF is configured when Layer-2/Layer-3 multicast function is enabled, the system will multicast the broadcast routing protocol packets because the broadcast MAC address and multicast MAC address used by OSPF are the same. This makes broadcast packets unable to reach the destination host and adversely affects the operation of the routing protocol.

You can disable the protocol multicast MAC address sending function so that the system correctly forwards OSPF multicast packets, thus ensuring the normal operation of the routing protocol.

 

&  Note:

l      To enable OSPF when Layer-2/Layer-3 multicast function is enabled in the system, make sure you use the undo protocol multicast-mac enable command to disable protocol multicast MAC address sending.

l      You do not need to disable protocol multicast MAC address sending if the system is enabled with OSPF only.

 

Examples

# Disable protocol multicast MAC address sending.

<H3C>system-view

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

[H3C]undo protocol multicast-mac enable

3.1.45  reset ospf

Syntax

reset ospf [ statistics ] { all | process-id }

View

User view

Parameters

all: Resets all OSPF processes.

process-id: OSPF process ID, in the range 1 to 65535. If this argument is not specified, all OSPF processes will be reset.

statistics: Resets OSPF statistics.

Description

Use the reset ospf all command to reset all OSPF processes.

Use the reset ospf process-id command to reset the specified OSPF process and clear the statistics.

After you use this command to reset an OSPF process:

l           Invalid LSA is cleared immediately before LSA times out.

l           A new Router ID takes effect if the Router ID changes.

l           DR and BDR are re-elected conveniently.

l           OSPF configuration before the restart will not lose.

After this command is issued, the system will prompt you to confirm whether to re-enable OSPF.

Examples

# Reset all the OSPF processes.

<H3C> reset ospf all

# Reset OSPF process 200.

<H3C> reset ospf 200

3.1.46  router id

Syntax

router id router-id

undo router id

View

System view

Parameters

router-id: Router ID, in dotted decimal notation, in the range 0 to 255.

Description

Use the router id command to configure the ID of an OSPF router.

Use the undo router id command to cancel the router ID that has been set.

Related commands: ospf.

Examples

# Set the router ID to 10.1.1.3.

<H3C> system-view

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

[H3C] router id 10.1.1.3

3.1.47  silent-interface

Syntax

silent-interface interface-type interface-number

undo silent-interface interface-type interface-number

View

OSPF view

Parameters

interface-type interface-number: Specifies an interface by its type and number.

Description

Use the silent-interface command to disable an interface from transmitting OSPF packets.

Use the undo silent-interface command to restore the default setting.

By default, an interface can transmit OSPF packets.

To make no routing information obtained by other routers on a network segment, you can use this command to disable the interface from sending OSPF packets.

On a switch, this command can be used to enable/disable OSPF packet transmission through the specified VLAN interface.

Examples

# Disable interface VLAN-interface 20 from transmitting OSPF packets.

<H3C> system-view

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

[H3C] ospf 1

[H3C-ospf-1] silent-interface Vlan-interface 20

3.1.48  snmp-agent trap enable ospf

Syntax

snmp-agent trap enable ospf [ process-id ] [ ifstatechange | iftxretransmit | ifrxbadpkt | ifcfgerror | virifstatechange | nbrstatechange | virnbrstatechange | virifcfgerror | ifauthfail | virifauthfail | virifrxbadpkt | viriftxretransmit | originatelsa | maxagelsa | lsdboverflow | lsdbapproachoverflow ]*

undo snmp-agent trap enable ospf [ process-id ] [ ifstatechange | iftxretransmit | ifcfgerror |virifstatechange | nbrstatechange | virnbrstatechange | virifcfgerror | ifauthfail | virifauthfail | ifrxbadpkt | virifrxbadpkt | viriftxretransmit | originatelsa | maxagelsa | lsdboverflow | lsdbapproachoverflow ]*

View

System view

Parameters

process-id: OSPF process ID, in the range 1 to 65535. If you do not specify a process ID, this command applies to all current OSPF processes.

ifstatechange, virifstatechange, nbrstatechange, virnbrstatechange, ifcfgerror, virifcfgerror, ifauthfail, virifauthfail, ifrxbadpkt, iftxretransmit, virifrxbadpkt, viriftxretransmit, originatelsa, maxagelsa, lsdboverflow, and lsdbapproachoverflow: Types of TRAP packets that the switch produces when OSPF fails to work normally.

Description

Use the snmp-agent trap enable ospf command to enable the OSPF TRAP function.

Use the undo snmp-agent trap enable ospf command to disable the OSPF TRAP function.

This command does not apply to the OSPF processes that are started after the command is executed.

By default, a switch does not send TRAP packets when OSPF fails to work normally.

For details about SNMP TRAP configuration, refer to section System Management in this manual.

Examples

# Enable the TRAP function for OSPF process 100.

<H3C> system-view

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

[H3C] snmp-agent trap enable ospf 100

3.1.49  spf-schedule-interval

Syntax

spf-schedule-interval interval

undo spf-schedule-interval

View

OSPF view

Parameters

interval: SPF calculation interval in seconds, in the range 1 to 10. The default is 5.

Description

Use the spf-schedule-interval command to configure the OSPF route calculation interval.

Use the undo spf-schedule-interval command to restore the default setting.

Based on its LSDB, an OSPF router calculates the shortest route tree with itself being the root, using which to determine the next hop to a destination. Through adjusting SPF calculation interval, you can protect bandwidth and router resources from being over-consumed due to frequent network changes.

Examples

# Set the OSPF route calculation interval to 6 seconds.

<H3C> system-view

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

[H3C] ospf 1

[H3C-ospf-1] spf-schedule-interval 6

3.1.50  stub

Syntax

stub [ no-summary ]

undo stub

View

OSPF area view

Parameters

no-summary: Disables an ABR from transmitting Summary LSAs to the Stub area.

Description

Use the stub command to configure an OSPF area as a stub area.

Use the undo stub command to remove the configuration.

By default, no area is stub area.

If the router is an ABR, it will send a default route to the connected stub area. Use the default-cost command to configure the default route cost. In addition, you can specify the no-summary keyword in the stub command to disable the receiving of type-3 LSAs by the stub area connected to the ABR.

Related commands: default-cost.

Examples

# Configure OSPF area 1 as a stub area.

<H3C> system-view

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

[H3C] ospf 1

[H3C-ospf-1] area 1

[H3C-ospf-1-area-0.0.0.1] stub

3.1.51  vlink-peer

Syntax

vlink-peer router-id [ hello seconds | retransmit seconds | trans-delay seconds | dead seconds | simple password | md5 keyid key ]*

undo vlink-peer router-id

View

OSPF area view

Parameters

route-id: Router ID of virtual link peer.

hello seconds: Specifies the interval, in seconds, at which the router transmits hello packets. The value ranges from 1 to 8192 and defaults to 10. This value must equal to the hello seconds value of the router virtually linked to the interface.

retransmit seconds: Specifies the interval, in seconds, for retransmitting the LSA packets on an interface. It ranges from 1 to 3600 and defaults to 5.

trans-delay seconds: Specifies the delay, in seconds, for transmitting LSA packets on an interface. It ranges from 1 to 3600 and defaults to 1.

dead seconds: Specifies the interval, in seconds, of death timer. It ranges from 1 to 8192 and defaults to 40. This value must equal the dead seconds of the router virtually linked to it and must be at least four times of the hello seconds.

simple password: Specifies the simple text authentication password, which contains up to eight characters, of the interface. This value must equal the authentication key of the virtually linked peer.

keyid: MD5 authentication key ID. It ranges from 1 to 255. It must be equal to the authentication key ID of the virtually linked peer.

key: MD5 authentication key. If you use simple text authentication key, you can input a string containing 1 to 16 characters. When you use the display current-configuration command to display system information, the MD5 authentication key is displayed in the form of cipher text with a length of 24 characters. Inputting the key in the form of cipher text with a length of 24 characters is also supported.

Description

Use the vlink-peer command to create and configure a virtual link.

Use the undo vlink-peer command to cancel an existing virtual link.

According to RFC 2328, an OSPF area must be connected to the backbone network. You can use the vlink-peer command to keep the connectivity. Virtual link can be regarded as a common interface that uses OSPF because the principle for configuring the parameters such as hello, retransmit, and trans-delay on it is similar.

Note that, when configuring virtual link authentication, you use the authentication-mode command to specify the authentication mode as MD5 cipher text or simple text on the backbone network.

Related commands: authentication-mode, display ospf.

Examples

# Create a virtual link to 10.110.0.3 and use the MD5 cipher authentication mode.

<H3C> system-view

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

[H3C] ospf 1

[H3C-ospf-1] area 10.0.0.0

[H3C-ospf-1-area-10.0.0.0] vlink-peer 10.110.0.3 md5 3 345

 


Chapter 4  Integrated IS-IS Configuration Commands

 

&  Note:

The term “router” in this document refers to a router in a generic sense or an Ethernet switch running routing protocols.

 

4.1  Integrated IS-IS Configuration Commands

4.1.1  area-authentication-mode

Syntax

area-authentication-mode { simple | md5 } password [ ip | osi ]

undo area-authentication-mode { simple | md5 } [ ip | osi ]

View

IS-IS view

Parameters

simple: Specifies to send the password in plain text.

md5: Specifies to send the password encrypted with MD5.

password: Specifies the password to be set. For the simple authentication mode, the password must be plain text. For the md5 authentication mode, the password can be either plain text or ciphertext, and the result depends on the input. A plain password can be a string less than 16 digits, such as abc918. A cipher password must be a ciphertext of 24 digits, such as (TT8F]Y\5SQ=^Q`MAF4<1!!.

ip: Specifies the system to check the configuration for the corresponding field of IP in LSP.

osi: Specifies the system to check the configuration for the corresponding field of OSI in LSP.

Whether a password should use the ip keyword or the osi keyword is not affected by the actual network environment.

Description

Use the area-authentication-mode command to configure IS-IS to authenticate the packets (LSP, CSNP and PSNP) received from level-1 route using the predefined mode and password.

Use the undo area-authentication-mode command to disable IS-IS from authenticating the received packets.

The system will neither authenticate the packets received from level-1 route nor check its password by default.

We can use this command to clear all level-1 routing packets not compatible with the area authentication password set by the command. And at the same time, we also instruct the system to follow a specific mode to insert the area authentication password in all the level-1 routing packets sent from the local node.

Related commands: reset isis all, domain-authentication-mode, isis authentication-mode.

Examples

# Set the area authentication password to hello, and the authentication mode to simple.

<H3C> system-view

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

[H3C] isis

[H3C-isis] area-authentication-mode simple hello

4.1.2  cost-style

Syntax

cost-style { narrow | wide | wide-compatible | { compatible | narrow-compatible } [ relax-spf-limit ] }

undo cost-style

View

IS-IS view

Parameters

narrow: Specifies to receive and send narrow packets only.

wide: Specifies to receive and send wide packets only.

compatible: Specifies to receive or send both wide and narrow packets.

narrow-compatible: Specifies to receive both narrow and wide packets, but send only narrow packets.

wide-compatible: Specifies to receive both narrow and wide packets, but send only wide packets.

relax-spf-metric: Specifies to allow receiving routes with cost bigger than 1,024. If this keyword is not configured, any route with cost larger than 1,024 will be dropped. This configuration is only available when the compatible keyword or when the narrow-compatible keyword is provided.

Description

Use the cost-style command to set the cost style of packets received or sent by the IS-IS router.

Use the undo cost-style command to restore the default cost style.

Only narrow packets can be received and sent by default.

Related commands: isis cost.

Examples

# Set the router to send only narrow packets, but receive both narrow and wide ones.

<H3C> system-view

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

[H3C] isis

[H3C-isis] cost-style narrow-compatible

4.1.3  default-route-advertise

Syntax

default-route-advertise [ route-policy route-policy-name ]

undo default-route-advertise [ route-policy route-policy-name ]

View

IS-IS view

Parameters

route-policy-name: Name of the specified route-policy, which is a string containing 1 to 19 characters.

Description

Use the default-route-advertise command to enable the L1 and L2 routers to generate default routes.

Use the undo default-route-advertise command to disable the function.

By default, L2 routers generate default routes.

This command can be executed on L1 routers or L2 routers. Default routes are generated in L2 LSP by default. Carrying out the apply isis level-1 command in routing policy view will generate default routes in L1 LSP. Carrying out the apply isis level-2 command in routing policy view will generate default routes in L2 LSP. Carrying out the apply isis level-1-2 command in routing policy will generate default routes in L1 LSP and L2 LSP respectively.

Examples

# Configure the current router to generate default route in the corresponding LSP.

<H3C> system-view

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

[H3C-isis] default-route-advertise

4.1.4  display isis brief

Syntax

display isis brief

View

Any view

Parameters

None

Description

Use the display isis brief command to display the brief information about IS-IS.

Examples

# Display the brief information about IS-IS.

<H3C> display isis brief

                ISIS  Protocol Brief Information:

 

System protocol supported by IS-IS:  none

Is-level:  level-1-2

Cost-style:  narrow

Preference:  15

CLNS Preference:  15

Timers:

     spf-delay-interval:  5000

     spf-slice-size:  0

     lsp-max-age:  1200

     lsp-refresh:  900

     interval between SPFs:  level-1  10

                             level-2  10

4.1.5  display isis interface

Syntax

display isis interface [ verbose ]

View

Any view

Parameters

verbose: Displays the detailed information about the interface.

Description

Use the display isis interface command to view the information about the IS-IS-enabled interfaces.

The information displayed by this command includes the interface name, interface IP address, interface link state, and so on. Besides all the information displayed by the  display isis interface command, the display isis interface verbose command will display the IS-IS configuration information related to the interface, such as CSNP packet broadcast intervals, Hello packet broadcast intervals and the number of invalid Hello packets.

Examples

# Display the information about the IS-IS-enabled interface.

<H3C> display isis interface

Interface       IP Address Id  Link.Sta IP.Sta  MTU  Type  DIS

Vlan-interface1 172.16.1.2 001 Up        Up      1497  L1   No/No

# Display the detailed information about the IS-IS-enabled interface.

<H3C> display isis interface verbose

Interface       IP Address Id  Link.Sta IP.Sta  MTU  Type  DIS

Vlan-interface1 172.16.1.2 001 Up       Up      1497  L1   No/No

  Secondary IP Address        :

  Csnp Interval               :  L1    10  L2    10

  Hello Interval              :  L1    10  L2    10

  Hold Time                   :  L1    30  L2    30

  Lsp Interval                :        33

  Cost                        :  L1    10  L2    10

  Priority                    :  L1    64  L2    64

  Retransmission interval     :         5

4.1.6  display isis lsdb

Syntax

display isis lsdb [ [ l1 | l2 | level-1 | level-2 ] | [ [ lsp-id | local ] | verbose ]* ]*

View

Any view

Parameters

l1, level-1: Specifies level-1 routing connection state database.

l2, level-2: Specifies level-2 routing connection state database.

lsp-id: LSP ID of the network-entity-title.

local: Specifies to display LSP information generated locally.

verbose: Specifies to display the detailed information of link state database.

Description

Use the display isis lsdb command to display IS-IS link state database.

Examples

# Display a piece of LSP information.

<H3C> display isis lsdb 0050.0500.5005.00-00

                      IS-IS Level-1 Link State Database

 

Lsp ID                  Sequence          Holdtime    A_P_O   Checksum

>0050.0500.5005.00-00   0x00000328        780         0_0_0    0xf211

4.1.7  display isis mesh-group

Syntax

display isis mesh-group

View

Any view

Parameters

None

Description

Use the display isis mesh-group command to display the mesh-group of IS-IS.

You can use this command to view the mesh-group configuration of the current routing interface.

Examples

# Configure the IS-IS-enabled VLAN-interface 10 and VLAN-interface 20 of the router to belong to mesh group 100.

<H3C> system-view

[H3C-Vlan-interface10] isis mesh-group 100

[H3C-Vlan-interface10] interface Vlan-interface 20

[H3C-Vlan-interface20] isis mesh-group 100

# Display the configuration information of the IS-IS mesh group.

<H3C> system-view

[H3C-Vlan-interface20] display isis mesh-group

Interface           Mesh-group/Blocked

Vlan-interface 10            100

Vlan-interface 20            100

4.1.8  display isis peer

Syntax

display isis peer [ verbose ]

View

Any view

Parameters

verbose: Displays the area address advertised in a neighbor’s Hello packet when this keyword is provided; displays only the brief information if this keyword is not specified.

Description

Use the display isis peer command to display the information of the IS-IS neighbor.

Besides all the information displayed by the  display isis peer command, the display isis peer verbose command will display the neighbor’s area address, holdtime of Up state and the IP address of the directly-connected interface.

Examples

# Display the detailed information about IS-IS neighbors.

<H3C> display isis peer verbose

System ID      Interface          Circuit ID      State HoldTime Type Pri

0000.0000.7502 Vlan-interface1000 0000.0000.7502.02 Up  8s       L1   64

  Area Address:  01  IP Address: 7.7.7.7   Period: 01:51:13

 

System ID      Interface          Circuit ID      State HoldTime Type Pri

0000.0000.7502 Vlan-interface1001 0001.0000.7506.02 Up  24s      L1   64

  Area Address:  01  IP Address: 6.6.6.6   Period: 00:53:50

# Display the information about IS-IS neighbors.

<H3C> display isis peer

System ID      Interface          Circuit ID      State HoldTime Type Pri

0000.0000.7502 Vlan-interface1000 0000.0000.7502.02 Up 9s        L1   64

0000.0000.7502 Vlan-interface1001 0001.0000.7506.02 Up 24s       L1   64

4.1.9  display isis route

Syntax

display isis route { clns | ip }

View

Any view

Parameters

ip: Displays IP-based IS-IS routing information.

clns: Displays OSI-based IS-IS routing information.

Description

Use the display isis route command to display the IS-IS routing information.

Examples

# Display the output information of the display isis ip route command.

<H3C> display isis route ip

                  ISIS IP Level - 2 Routing Table :

 

          Type - D -Direct, C -Connected, I -ISIS, S -Static, O -OSPF

                 B -BGP, R -RIP

 

     Flags: R-Added to RM, L-Advertised in LSPs, U-Up/Down Bit Set

 

  Destination/Mask  In.Met  Ex.Met NextHop     Interface          Flags

------------------------------------------------------------------------

D 111.1.0.0/16      10             Direct      Vlan-interface111  R/L/-

D 170.1.1.0/24      10             Direct      Vlan-interface170  R/L/-

I 131.1.0.0/16      20             111.1.1.1   Vlan-interface111  R/-/-

I 133.1.0.0/16      20             111.1.1.1   Vlan-interface111  R/-/-

I 135.1.0.0/16      20             111.1.1.1   Vlan-interface111  R/-/-

D 145.1.0.0/16      10             Direct      Vlan-interface145  R/L/-

4.1.10  display isis spf-log

Syntax

display isis spf-log

View

Any view

Parameters

None

Description

Use the display isis spf-log command to display the log record of IS-IS SPF calculation.

Examples

# Display the log record of IS-IS SPF calculation.

<H3C> display isis spf-log

Details of Level 2 SPF Run:

 --------------------------------------------------------------------------

      Trig.Event                No.Of Nodes    Duration(ms)    StartTime

    IS_SPFTRIG_NEWADJ           2              74              0:10:55

    IS_SPFTRIG_NEWADJ           2              670             0:10:24

    IS_SPFTRIG_NEWADJ           2              23              0:10:2

    IS_SPFTRIG_NEWADJ           2              30              0:9:32

    IS_SPFTRIG_NEWADJ           2              34              0:9:1

    IS_SPFTRIG_NEWADJ           2              111             0:7:59

    IS_SPFTRIG_NEWADJ           2              302             0:25:1

    IS_SPFTRIG_NEWADJ           2              60              0:24:30

    IS_SPFTRIG_NEWADJ           2              232             0:20:31

    IS_SPFTRIG_NEWADJ           2              42              0:19:58

    IS_SPFTRIG_NEWADJ           2              37              0:19:32

    IS_SPFTRIG_NEWADJ           2              34              0:19:0

    IS_SPFTRIG_CIRC_UP          2              633             0:18:51

    IS_SPFTRIG_NEWADJ           2              78              0:17:59

    IS_SPFTRIG_ADJDOWN          0              -59863          0:15:7

    IS_SPFTRIG_NEWADJ           2              30              0:15:3

    IS_SPFTRIG_NEWADJ           2              32              0:14:2

    IS_SPFTRIG_NEWADJ           2              202             0:13:34

    IS_SPFTRIG_CIRC_DOWN        2              215             0:12:17

    IS_SPFTRIG_CIRC_UP          2              27              0:12:7 

4.1.11  domain-authentication-mode

Syntax

domain-authentication-mode { simple | md5 } password [ ip | osi ]

undo domain-authentication-mode { simple | md5 } [ ip | osi ]

View

IS-IS view

Parameters

simple: Specifies to send the password in plain text.

md5: Specifies to send the password encrypted with MD5.

password: Specifies the password to be set. For the simple authentication mode, the password must be plain text. For md5 authentication mode, the password can be either plain text or ciphertext, and the result depends on the input. A plain password can be a string less than 16 digits, such as abc918. A cipher password must be a ciphertext of 24 digits, such as _(TT8F]Y\5SQ=^Q`MAF4<1!!.

ip: Specifies the system to check the configuration for the corresponding field of IP in LSP.

osi: Specifies the system to check the configuration for the corresponding field of OSI in LSP.

Whether a password should use the ip keyword or the osi keyword is not affected by the actual network environment.

Description

Use the domain-authentication-mode command to configure IS-IS routing domain to authenticate the received level-2 packets (LSP, CSNP and PSNP) using the predefined mode and password.

Use the undo domain-authentication-mode command to disable IS-IS from authenticating the received packets mentioned above.

The system will neither authenticate the received level-2 routing packet nor check its password by default.

You can use this command to clear all level-2 routing packets not matching the domain-authentication password set by the command. At the same time, we also instruct the system to follow a specific mode to insert the area-authentication password in all the level-2 routing packets sent from the local node.

Related commands: area-authentication-mode, isis authentication-mode.

Examples

# Use the simple mode and set the password to abc to authenticate level-2 routing packets.

<H3C> system-view

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

[H3C] isis

[H3C-isis] domain-authentication-mode simple abc

4.1.12  filter-policy export

Syntax

filter-policy acl-number export [ protocol ]

undo filter-policy acl-number export [ protocol ]

View

IS-IS view

Parameters

acl-number: ACL number in the range of 2,000 to 3,999.

protocol: Protocol used to advertise routing information, including direct, static, rip, bgp, ospf, ospf-ase, and ospf-nssa currently.

Description

Use the filter-policy export command to enable IS-IS to filter the routes advertised by other routing protocols.

Use the undo filter-policy export command to disable the configured filter rules.

IS-IS does not filter the routes advertised by other routing protocols by default.

 

&  Note:

l      The filter-policy export command takes effect only on the routes imported through the import-route command. If the filter-policy export command is configured while the import-route command is not configured to import other non-IS-IS routes, the filter-policy export command does not take effect.

l      If the protocol argument is not provided in the filter-policy export command, the command takes effect on all the routes imported to the local device using the import-route command.

 

Related commands: filter-policy import.

Examples

# Use ACL 2000 to filter the routes imported through IS-IS.

<H3C> system-view

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

[H3C] isis

[H3C-isis] filter-policy 2000 export

4.1.13  filter-policy import

Syntax

filter-policy acl-number import

undo filter-policy acl-number import

View

IS-IS view

Parameters

acl-number: ACL number in the range of 2,000 to 3,999.

Description

Use the filter-policy import command to enable IS-IS to filter the received routes.

Use the undo filter-policy import command to disable IS-IS from filtering the received routes.

IS-IS does not filter the received routes by default.

In some circumstances, only the routing information satisfying certain conditions will be received. You can configure the filtering condition by setting the filter-policy parameters.

Related commands: filter-policy export.

Examples

# Use ACL 2000 to filter the received routes.

<H3C> system-view

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

[H3C] isis

[H3C-isis] filter-policy 2000 import

4.1.14  ignore-lsp-checksum-error

Syntax

ignore-lsp-checksum-error

undo ignore-lsp-checksum-error

View

IS-IS view

Parameters

None

Description

Use the ignore-lsp-checksum-error command to set IS-IS to drop the LSP when it detects LSP checksum errors.

Use the undo ignore-lsp-checksum-error command to set IS-IS to ignore LSP checksum errors.

IS-IS ignores LSP checksum errors by default.

When the local IS-IS receives a LSP packet, it will check the LSP packet and compare the checksum calculated with that in the LSP packet. By default, the LSP packets will not be dropped even if the checksum is wrong. You can use the ignore-lsp-checksum-error command to configure IS-IS to drop the LSP packet in case of checksum error.

Examples

# Configure IS-IS to drop the LSP packet in case of checksum error.

<H3C> system-view

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

[H3C] isis

[H3C-isis] ignore-lsp-checksum-error

4.1.15  import-route

Syntax

import-route protocol [ allow-ibgp ] [ cost value | type { external | internal } | [ level-1 | level-1-2 | level-2 ] | route-policy route-policy-name ]*

undo import-route protocol [ cost value | type { external | internal } | [ level-1 | level-1-2 | level-2 ] | route-policy route-policy-name ]*

View

IS-IS view

Parameters

protocol: Source routing protocol that can be imported, including direct, static, rip, bgp, ospf, ospf-ase, and ospf-nssa.

allow-ibgp: Allows the redistribution of IBGP routes when redistributing routes from BGP.

value: Cost of the imported route, in the range of 0 to 63.

type: Specifies the type of the routing cost. If it is internal, then it is a route within an area; if it is external, it is a route between areas. The type is internal by default.

level-1: Specifies to import routes to Level-1 routing table.

level-2: Specifies to import routes to Level-2 routing table. If no level is specified, the routes are imported to level-2 routing table by default.

level-1-2: Specifies to import routes to Level-1 and level-2 routing tables.

route-policy route-policy-name: Specifies to import only those routes satisfying the matching condition of the designated route-policy. The route-policy-name argument is a string containing 1 to 19 characters.

Description

Use the import-route command to enable IS-IS to filter the imported routes.

Use the undo import-route command to disable IS-IS from importing other protocols' routing information.

IS-IS does not import other protocols’ routing information by default.

IS-IS takes all the routes imported to the routing domain as external routes, which describe how to select a route to a destination outside of the routing domain.

Note that:

l           The import-route bgp command redistributes EBGP routes only.

l           The import-route bgp allow-ibgp command redistributes both EBGP and IBGP routes.

l           Use the import-route bgp allow-ibgp command with care, because it redistributes IBGP routes without keeping the AS_PATH attribute, which may lead to routing loops between ASs.

l           It is recommended to configure parameters such as type, cost and tag for redistributed routes with one command line because reconfiguring the command overwrites the previous configuration.

 

&  Note:

Use the import-route bgp allow-ibgp command with care!

 

Related commands: import-route isis level-2 into level-1.

Examples

# Import a static route with the cost of 15.

<H3C> system-view

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

[H3C] isis

[H3C-isis] import-route static cost 15

4.1.16  import-route isis level-2 into level-1

Syntax

import-route isis level-2 into level-1 [ acl acl-number ]

undo import-route isis level-2 into level-1

View

IS-IS view

Parameters

acl-number: ACL number in the range of 2,000 to 3,999. It can be either basic ACLs or advanced ACLs.

Description

Use the import-route isis level-2 into level-1 command to import the routing information of Level-2 area to Level-1 area.

Use the undo import-route isis level-2 into level-1 command to disable this function.

By using the filter policy to filter the routes during the route penetration from Level-2 to Level-1, you can advertise those routes that have passed the filter to Level-1 area.

The routing information in Level-2 area will not be advertised in Level-1 area by default.

Related commands: import-route.

Examples

# Set the router to penetrate routes from Level-2 to Level-1 through ACL.

<H3C> system-view

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

[H3C] isis

[H3C-isis] import-route isis level-2 into level-1 acl 2100

4.1.17  isis

Syntax

isis [ tag ]

undo isis [ tag ]

View

System view

Parameters

tag: Name of an IS-IS routing process, consisting of no more than 128 characters. Its length can be 0, that is, the tag argument can be null.

Description

Use the isis command to start a corresponding IS-IS routing process and enter the IS-IS view.

Use the undo isis command to delete the specified IS-IS routing process.

IS-IS routing processes are disabled by default.

Before running IS-IS protocol normally, you must first use the isis command to enable an IS-IS process, then use the network-entity  command to configure a network entity title (NET) for the router, and then use the isis enable command to enable each interface that needs to run the IS-IS process.

 

&  Note:

Only one IS-IS routing process can be enabled on a router.

 

Related commands: isis enable, network-entity.

Examples

# Start the IS-IS routing process, with the system ID 0000.0000.0002, and area ID 01.0001.

<H3C> system-view

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

[H3C] isis

[H3C-isis] network-entity 01.0001.0000.0000.0002.00

4.1.18  isis authentication-mode

Syntax

isis authentication-mode { simple | md5 } password [ { level-1 | level-2 } [ ip | osi ] ]

undo isis authentication-mode { simple | md5 } password [ { level-1 | level-2 } [ ip | osi ] ]

View

Interface view

Parameters

simple: Specifies to send the password in plain text.

md5: Specifies to send the password in ciphertext.

password: Specifies a password. For simple authentication mode, the password must be plain text. For md5 authentication mode, the password can be either plain text or ciphertext, and the result depends on the input. A plain password can be a string less than 16 digits, such as abc918. A cipher password must be a ciphertext of 24 digits, such as _(TT8F]Y\5SQ=^Q`MAF4<1!!.

level-1: Specifies to set a password for L1.

level-2: Specifies to set a password for L2.

ip: Specifies the system to check the configuration for the corresponding field of IP in LSP.

osi: Specifies the system to check the configuration for the corresponding field of OSI in LSP.

Whether a password should use the ip keyword or the osi keyword is not affected by the actual network environment.

Description

Use the isis authentication-mode command to authenticate the IS-IS hello packets of the specified level using the specified authentication mode and password on the IS-IS interface.

Use the undo isis authentication-mode command to disable the authentication and remove the password.

There is no password or authentication by default.

If there is no other parameter but the password, then only level-1 and osi are available.

Related commands: area-authentication-mode, domain authentication-mode.

Examples

# Set the plain password as tangshi for Level-1 adjacency on VLAN-interface 10.

<H3C> system-view

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

[H3C] interface Vlan-interface 10

[H3C-Vlan-interface10] isis authentication-mode simple tangshi level-1

4.1.19  isis circuit-level

Syntax

isis circuit-level [ level-1 | level-1-2 | level-2 ]

undo isis circuit-level

View

Interface view

Parameters

level-1: Specifies to set up only level-1 adjacency for the interface.

level-1-2: Specifies to set up level-1-2 adjacency for the interface.

level-2: Specifies to set up only level-2 adjacency for the interface.

Description

Use the isis circuit-level command to set link adjacency for the level-1-2 router.

Use the undo isis circuit-level command to resume the default configuration of link adjacency for the level-1-2 router.

Level-1-2 adjacency can be configured for an interface by default.

This command is only available for a level-1-2 router. If the local host is a level-1-2 router and it needs to set up some adjacency (level-1 or level-2) with a peer router, then you can use this command to prescribe the local interface to receive and send only the hello packets. An interface can receive and send only one type of hello packets on a point-to-point link. You can use this command to reduce the router’s processing time to save bandwidth.

Related commands: is-level.

Examples

# Set the level-1 attributes for VLAN-interface 10 to prohibit sending and receiving level-2 Hello packets when the interface is connected to a non-backbone router within the same area.

<H3C> system-view

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

[H3C] interface Vlan-interface 10

[H3C-Vlan-interface10] isis enable

[H3C-Vlan-interface10] isis circuit-level level-1

4.1.20  isis cost

Syntax

isis cost value [ level-1 | level-2 ]

undo isis cost [ level-1 | level-2 ]

View

Interface view

Parameters

value: Specifies the link cost value for corresponding SPF calculation, in the range of 0 to 63. It is 10 by default.

level-1: Indicates the link cost corresponding to Level-1 layer.

level-2: Indicates the link cost corresponding to Level-2 layer.

Description

Use the isis cost command to set the interface link cost for SPF calculation.

Use the undo isis cost command to resume the default link cost value.

If neither level-1 nor level-2 is assigned in the configuration, both level-1 and level-2 are configured by default.

You are recommended to configure a proper link cost for each interface; otherwise, the link cost for IS-IS route calculation may not reflect the correct cost.

Examples

# Set the Level-2 link cost to 5 for VLAN-interface10.

<H3C> system-view

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

[H3C] interface Vlan-interface 10

[H3C] interface Vlan-interface 10

[H3C-Vlan-interface10] isis cost 5 level-2

4.1.21  isis dis-priority

Syntax

isis dis-priority value [ level-1 | level-2 ]

undo isis dis-priority [ level-1 | level-2 ]

View

Interface view

Parameters

value: Specifies the priority for selecting DIS, ranging from 0 to 127, with the default as 64.

level-1: Specifies the priority for selecting level-1 DIS.

level-2: Specifies the priority for selecting level-2 DIS.

If neither level-1 nor level-2 is specified in this command, both level-1 and level-2 priorities are configured by default.

Description

Use the isis dis-priority command to specify the priority for selecting corresponding DIS.

Use the undo isis dis-priority command to resume the default priority.

Unlike DR of OSPF, there is no backup DIS for IS-IS and the router with priority 0 can also be selected as DIS.

Related commands: area-authentication-mode, domain authentication-mode.

Examples

# Configure the priority as 127 for VLAN-interface 10.

<H3C> system-view

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

[H3C] interface Vlan-interface 10

[H3C-Vlan-interface10] isis dis-priority 127 level-2

4.1.22  isis enable

Syntax

isis enable [ tag ]

undo isis enable [ tag ]

View

Interface view

Parameters

tag: Name assigned to the IS-IS routing process when the isis command is executed in system view. If this argument is not specified, it is null.

Description

Use the isis enable command to enable the corresponding IS-IS routing process for the interface.

Use the undo isis enable command to disable this configuration.

The interface does not enable the IS-IS routing process by default.

Before running IS-IS protocol normally, you must use the isis command to enable IS-IS process, and use the network-entity  command to configure a network entity title (NET) for the router, and then use the isis enable command to enable each interface that need to run the IS-IS process.

Related commands: isis, network-entity.

Examples

# Enable the IS-IS routing process on VLAN-interface 10.

<H3C> system-view

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

[H3C] isis abc

[H3C-isis] network-entity 10.0001.1010.1020.1030.00

[H3C] interface Vlan-interface 10

[H3C-Vlan-interface10] isis enable abc

4.1.23  isis mesh-group

Syntax

isis mesh-group { mesh-group-number | mesh-blocked }

undo isis mesh-group

View

Interface view

Parameters

mesh-group-number: Mesh group number, ranging from 1 to 4,294,967,295.

mesh-blocked: After this parameter is configured, the interface will be blocked and does not flood the received LSP to other interfaces.

Description

Use the isis mesh-group command to add an interface to a specified mesh group.

Use the undo isis mesh-group command to delete an interface from a mesh group.

An interface is not in any mesh group and can flood LSP normally by default.

For an interface not in a mesh group, it follows the normal process to flood the received LSP to other interfaces. For the NBMA network with high connectivity and multiple point-to-point links, this will cause repeated LSP flooding and bandwidth waste.

After an interface is added to a mesh group, it will only flood a received LSP to interfaces that do not belong to the same mesh group.

When you add an interface to a mesh group or block the interface, make sure to retain some redundancy so that a link failure will not affect the normal LSP packet flooding.

Examples

# Add the IS-IS-enabled VLAN-interface 20 to mesh-group 3.

<H3C> system-view

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

[H3C-Vlan-interface20] isis mesh-group 3

4.1.24  isis timer csnp

Syntax

isis timer csnp seconds [ level-1 | level-2 ]

undo isis timer csnp [ level-1 | level-2 ]

View

Interface view

Parameters

seconds: Interval of sending CSNP packets over broadcast network in seconds, ranging from 1 to 65,535, with the default as 10 seconds.

level-1: Specifies the Level-1 time interval for sending CSNP packets.

level-2: Specifies the Level-2 time interval for sending CSNP packets.

If neither the level-1 keyword nor the level-2 keyword is specified, both the level-1 interval and the level-2 interval are set.

Description

Use the isis timer csnp command to specify the time interval for sending CSNP packets over a broadcast network.

Use the undo isis timer csnp command to resume the default value of 10 seconds.

This command only applies to the DIS router, which sends CSNP packets periodically. Besides, DIS is separated to Level-1 and Level-2, and their time intervals should be configured respectively.

Examples

# Configure Level-2 CSNP packets to be sent every 15 seconds over VLAN-interface 10.

<H3C> system-view

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

[H3C] interface Vlan-interface 10

[H3C-Vlan-interface10] isis timer csnp 15 level-2

4.1.25  isis timer hello

Syntax

isis timer hello seconds [ level-1 | level-2 ]

undo isis timer hello [ level-1 | level-2 ]

View

Interface view

Parameters

seconds: Interval for sending Hello packets, ranging from 3 to 255, in seconds, with the default as 10 seconds.

level-1: Specifies the time interval for sending Level-1 Hello packets.

level-2: Specifies the time interval for sending Level-2 Hello packets.

If neither the level-1 keyword nor the level-2 keyword is specified, both the level-1 interval and the level-2 interval are set.

Description

Use the isis timer hello command to specify the time interval for sending the corresponding Hello packets.

Use the undo isis timer hello command to resume the default value of 10 seconds.

The hello time interval must be configured respectively for the Level-1 and Level-2 packets on a broadcast network, because these two types of hello packets are sent separately. A point-to-point link does not require this. The shorter the time interval is, the more system resources will be occupied to send Hello packets, so you should configure a proper time interval depending on the specific requirements.

Related commands: isis timer holding-multiplier.

Examples

# Configure Level-2 Hello packets to be sent every 20 seconds over VLAN-interface 10.

<H3C> system-view

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

[H3C] interface Vlan-interface 10

[H3C-Vlan-interface10] isis timer hello 20 level-2

4.1.26  isis timer holding-multiplier

Syntax

isis timer holding-multiplier value [ level-1 | level-2 ]

undo isis timer holding-multiplier [ level-1 | level-2 ]

View

Interface view

Parameters

value: Number of invalid Hello packets of an IS-IS neighbor, in the range of 3 to 1,000.

level-1: Specifies the number of invalid Hello packets of a Level-1 IS-IS neighbor.

level-2: Specifies the number of invalid Hello packets of a Level-2 IS-IS neighbor.

If neither the level-1 keyword nor the level-2 keyword is specified, the command takes effect on both level-1 and level-2 IS-IS neighbors.

Description

Use the isis timer holding-multiplier command to configure the number of invalid Hello packets for an IS-IS neighbor. When a specified number of Hello packets are not received from a neighbor, the neighbor will be considered as invalid.

Use the undo isis timer holding-multiplier command to resume the default configuration.

The number of invalid Hello packets is three by default.

You can configure the time intervals of Hello packets separately for Level-1 and Level-2 peers. But for a point-to-point link, since there is only one kind of Hello packet, you need not to specify Level-1 or Level-2.

In fact, the number of invalid Hello packets is used to configure Holddown time. If a router receives no Hello packet from the peer router within Holddown time, it will take the peer router as invalid. Depending on the interface configuration, the Holddown time can be configured differently for different routers within an area. You can adjust the Holddown time by changing either the time interval for sending Hello packets or the number of invalid Hello packets.

Related commands: isis timer hello.

Examples

# Configure the number of Level-2 Hello packets signifying a peer invalid as 5 for VLAN-interface 10, that is, if no Hello packet is received from the interface within 5 Hello packet time intervals, the IS-IS peer is considered as invalid.

<H3C> system-view

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

[H3C] interface Vlan-interface 10

[H3C-Vlan-interface10] isis timer holding-multiplier 5

4.1.27  isis timer lsp

Syntax

isis timer lsp time

undo isis timer lsp

View

Interface view

Parameters

time: Interval for sending link-state packets, in milliseconds, ranging from 1 to 1000, with the default as 33 milliseconds.

Description

Use the isis timer lsp command to configure the time interval for sending link-state packets over an interface.

Use the undo isis timer lsp command to resume the default configuration.

Related commands: isis timer retransmit.

Examples

# Configure the time interval as 500 milliseconds for VLAN-interface 10 to send LSP packets.

<H3C> system-view

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

[H3C] interface Vlan-interface 10

[H3C-Vlan-interface10] isis timer lsp 500

4.1.28  isis timer retransmit

Syntax

isis timer retransmit seconds

undo isis timer retransmit

View

Interface view

Parameters

seconds: Interval for retransmitting LSP packets, in seconds, ranging from 1 to 300, with the default as 5 seconds.

Description

Use the isis timer retransmit command to configure the time interval for retransmitting LSP packets over a point-to-point link.

Use the undo isis timer retransmit command to resume the default configuration.

You should be careful when configuring this parameter to avoid unnecessary retransmission.

You need not use this command over a broadcast link, because an LSP packet requires response from the peer only over a point-to-point link, but not over a broadcast link.

Related commands: isis timer lsp.

Examples

# Configure the time interval as 10 seconds for VLAN-interface 10 to retransmit LSP.

<H3C> system-view

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

[H3C] interface Vlan-interface 10

[H3C-Vlan-interface10] isis timer retransmit 10

4.1.29  is-level

Syntax

is-level { level-1 | level-1-2 | level-2 }

undo is-level

View

IS-IS view

Parameters

level-1: Indicates the router works in Level-1, which means it only calculates routes within the area, and maintains L1 LSDB.

level-1-2: Indicates the router works in Level-1-2, which means it calculates routes and maintains LSDB for both L1 and L2.

level-2: Indicates the router works in Level-2, which means it calculates LSP switching and routes and maintains LSDB for L2 only.

Description

Use the is-level command to configure IS-IS router type.

Use the undo is-level command to resume the default configuration.

The configuration is level-1-2 by default.

It is recommended to configure system level when you configure IS-IS.

You can configure all the routers as either Level-1 or Level-2 if there is only one area, because there is no need for all routers to maintain two identical databases at the same time. You are advised to configure all routers as Level-2 in IP network so as to facilitate extending later.

Related commands: isis circuit-level.

Examples

# Configure the current router to work in Level-1.

<H3C> system-view

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

[H3C] isis

[H3C-isis] is-level level-1

4.1.30  log-peer-change

Syntax

log-peer-change

undo log-peer-change

View

IS-IS view

Parameters

None

Description

Use the log-peer-change command to enable the IS-IS adjacency state change output.

Use the undo log-peer-change command to disable the output.

The output is disabled by default.

When the adjacency state output is enabled, the IS-IS adjacency state change will be sent to the configuration terminal.

Examples

# Enable the IS-IS adjacency state change output on the current router.

<H3C> system-view

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

[H3C] isis

[H3C-isis] log-peer-change

4.1.31  md5-compatible

Syntax

md5-compatible

undo md5-compatible

View

IS-IS view

Parameters

None

Description

Use the md5-compatible command to specify IS-IS to adopt the MD5 algorithm compatible with other manufacturers.

Use the undo md5-compatible command to specify IS-IS to adopt the default MD5 algorithm.

By default, IS-IS adopts the MD5 algorithm compatible with Huawei.

This command must be configured when the switch needs to perform IS-IS MD5 authentication with the devices of manufacturers except Huawei.

Examples

# Specify IS-IS to adopt the MD5 algorithm compatible with other manufacturers.

<H3C> system-view

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

[H3C] isis

[H3C-isis] md5-compatible

4.1.32  network-entity

Syntax

network-entity network-entity-title

undo network-entity network-entity-title

View

IS-IS view

Parameters

network-entity-title: Network entity title in the form of X…X.XXXX....XXXX.00, with the 12 “X” in the middle as system ID of the router, the last “00” as the SEL and the "X…X" in the front as the area address.

Description

Use the network-entity command to configure the network entity title (NET) for an IS-IS routing process.

Use the undo network-entity command to delete a NET.

There is no NET by default.

A NET is a network service access point (NSAP), and it is in the range of 8 to 20 digits for IS-IS.

A NET has three parts: The first part is an area ID, which ranges from 1 to 13 digits. The routes of the same area have the same area ID. The second part is the router’s system ID of 6 digits, which is unique within the whole area and backbone area. The third part is SEL, the ending digit with the value of 00. You need to configure only 1 NET for a router. When repartitioning an area, such as merging or splitting, you can reconfigure the router to ensure correct and continuous routing.

Related commands: isis, isis enable.

Examples

# Specify the NET as 10.0001.1010.1020.1030.00, of which 10.0001 is the area ID and 1010.1020.1030 is the system ID.

<H3C> system-view

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

[H3C] isis

[H3C-isis] network-entity 10.0001.1010.1020.1030.00

4.1.33  preference

Syntax

preference value [ clns | ip ]

undo preference [ clns | ip ]

View

IS-IS view

Parameters

value: Preference value in the range of 1 to 255. It is 15 by default.

clns: IS-IS routing preference based on OSI protocol stack, in the range of 1 to 255. It is IP-based preference by default.

ip: IS-IS routing preference based on IP protocol stack, in the range of 1 to 255.

Description

Use the preference command to configure IS-IS protocol preference.

Use the undo preference command to resume the default IS-IS protocol preference.

When a router runs multiple dynamic routing protocols at the same time, the system will configure a preference for each routing protocol. If several protocols find routes to the same destination, the one with the highest preference dominates.

Examples

# Configure the preference of IS-IS protocol as 25.

<H3C> system-view

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

[H3C] isis

[H3C-isis] preference 25

4.1.34  reset isis all

Syntax

reset isis all

View

User view

Parameters

None

Description

Use the reset isis all command to clear all ISIS data structure information.

The IS-IS data information will not be cleared by default.

This command is used when an LSP need to be updated immediately. For example, after performing the area-authentication-mode and domain-authentication-mode commands, if the router still has some old LSPs, you can use this command to clear these LSPs.

Related commands: area-authentication-mode, domain authentication-mode.

Examples

# Clear all IS-IS data structure.

<H3C> reset isis all

4.1.35  reset isis peer

Syntax

reset isis peer system-id

View

User view

Parameters

system-id: System ID for an IS-IS peer, in the range of one bit to 128 bits.

Description

Use the reset isis peer command to clear the data information of a specific IS-IS peer.

The IS-IS peer is not cleared by default.

This command is used when you need to re-establish a specific peer.

Examples

# Clear the IS-IS peer with the system ID as 0000.0c11.1111.

<H3C> reset isis peer 0000.0c11.1111

4.1.36  set-overload

Syntax

set-overload

undo set-overload

View

IS-IS view

Parameters

None

Description

Use the set-overload command to set an overload flag for the current router.

Use the undo set-overload command to clear an overload flag.

No overload flag is set by default.

When , the routes calculated by the router will be ignored by other routes when they calculate SPF. (But the routes directly connected to the router will not be ignored.)

When the overload flag is set for a router, other routers will not transmit the packets that should be forwarded by the router.

Examples

# Set an overload flag on the current router.

<H3C> system-view

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

[H3C] isis

[H3C-isis] set-overload

4.1.37  silent-interface

Syntax

silent-interface interface-type interface-number

undo silent-interface interface-type interface-number

View

IS-IS view

Parameters

interface-type interface-number: Interface index.

Description

Use the silent-interface command to prohibit IS-IS packet sending on the specified interface.

Use the undo silent-interface command to permit IS-IS packet sending on the specified interface.

By default, IS-IS packet sending is permitted on all interfaces.

The silent-interface command just suppresses IS-IS packet sending on this interface. However, these IS-IS packets can still be sent on other interfaces.

Examples

# Prohibit IS-IS packet sending on VLAN-interface 3.

<H3C>system-view

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

[H3C] isis

[H3C-isis] silent-interface Vlan-interface 3

4.1.38  spf-delay-interval

Syntax

spf-delay-interval number

undo spf-delay-interval

View

IS-IS view

Parameters

number: Interval of releasing CPU during route calculation, in the range of 1,000 routes to 50,000 routes. It is 5,000 routes by default.

Description

Use the spf-delay-interval command to set the interval of releasing CPU during SPF calculation.

Use the undo spf-delay-interval command to restore the default value.

When there are too many routes in the routing table, you can use this command to release CPU automatically after a certain number of routes are processed in order to prevent the SPF calculation from occupying the system resources for a long time, thus affecting the response of the console. The unprocessed routes are to be processed in one second.

You can adjust the number argument according to the size of the routing table. If the spf-slice-size command is configured at the same time, the SPF calculation will be paused if the SPF calculation matches any of the setting.

By default, CPU is released when every 5,000 routes are processed.

Related commands: spf-slice-size.

Examples

# Set IS-IS to release CPU when every 3,000 routes are processed.

<H3C> system-view

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

[H3C] isis

[H3C-isis] spf-delay-interval 3000

4.1.39  spf-slice-size

Syntax

spf-slice-size seconds

undo spf-slice-size

View

IS-IS view

Parameters

seconds: Duration time during SPF calculation, in milliseconds, ranging from 0 to 120. A calculation is ended when the duration time is reached or exceeded. If the second argument is set to 0, the SPF calculation will continue until it finishes. It is 0 by default.

Description

Use the spf-slice-size command to configure whether the SPF routing calculation is fragmented and configure the duration time for each fragment.

Use the undo spf-slice-size command to resume the default configuration.

When there are too many routes in the routing table, you can use this command to fragment the SPF calculation to avoid taking up the system resources for a long time. You are not recommended to change the default configuration.

If the spf-delay-interval command is configured at the same time, the SPF calculation will be paused if the SPF calculation matches any of the setting.

Related commands: spf-delay-interval.

Examples

# Set SPF duration time to one second.

<H3C> system-view

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

[H3C] isis

[H3C-isis] spf-slice-size 1

4.1.40  summary

Syntax

summary ip-address mask [ level-1 | level-1-2 | level-2 ]

undo summary ip-address mask [ level-1 | level-1-2 | level-2 ]

View

IS-IS view

Parameters

ip-address: Address range to generate summarized routes.

mask: Mask of an aggregate route.

level-1: Specifies to summarize only the routes imported to level-1 area.

level-1-2: Specifies to summarize all the routes imported to level-1 area and backbone area.

level-2: Specifies to summarize only the routes imported to backbone area.

If none of the level-1 keyword, level-2 keyword, and level-1-2 keyword is specified, the routes imported to backbone area are summarized.

Description

Use the summary command to configure IS-IS to generate summarized routes.

Use the undo summary command to disable summary.

No route is summarized by default.

You can summarize the routes having the same next hop into one route to reduce the routing table size, as well as the LSP and LSDB generated by the router. It is possible to summarize native IS-IS routes and imported routes. After summarization, the route cost is the minimum cost of those summarized routes.

Examples

# Set a summarized route 202.0.0.0/8.

<H3C> system-view

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

[H3C] isis

[H3C-isis] summary 202.0.0.0 255.0.0.0

4.1.41  timer lsp-max-age

Syntax

timer lsp-max-age seconds

undo timer lsp-max-age

View

IS-IS view

Parameters

seconds: Maximum valid time of a LSP, in the range of 1 to 65,535 in seconds. It is 1,200 seconds by default.

Description

Use the timer lsp-max-age command to set the maximum valid time of the LSPs generated on the current router.

Use the undo timer lsp-max-age command to restore the default setting.

When the router generates system LSPs, the LSPs are generated with the maximum valid time in them. When an LSP is received by other routers, the maximum valid time will be smaller and smaller. If the maximum valid time decreases to 0, this LSP will be removed from LSDB.

Related commands: timer lsp-refresh.

Examples

# Set the maximum valid time of the LSPs generated by the current system to 25 minutes, namely, 1,500 seconds.

<H3C> system-view

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

[H3C] isis

[H3C-isis] timer lsp-max-age 1500

4.1.42  timer lsp-refresh

Syntax

timer lsp-refresh seconds

undo timer lsp-refresh

View

IS-IS view

Parameters

seconds: LSP updating period, in seconds, ranging from 1 to 65,535. It is 900 seconds by default.

Description

Use the timer lsp-refresh command to set an LSP updating period.

Use the undo timer lsp-refresh command to resume the default configuration.

You can keep LSP in synchronization for the whole area with this mechanism.

Related commands: timer lsp-max-age.

Examples

# Set the updating period to 1,500 seconds for the current system LSP.

<H3C> system-view

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

[H3C] isis

[H3C-isis] timer lsp-refresh 1500

4.1.43  timer spf

Syntax

timer spf seconds [ level-1 | level-2 ]

undo timer spf [ level-1 | level-2 ]

View

IS-IS view

Parameters

seconds: Maximum time interval (in seconds) for SPF calculation, ranging from 1 to 120, with the default as 10.

level-1: Specifies to set the time interval for only Level-1 SPF calculation.

level-2: Specifies to set the time interval for only Level-2 SPF calculation.

If neither the level-1 keyword nor the level-2 keyword is specified, the interval of both level-1 SPF calculation and the level-2 SPF calculation are set.

Description

Use the timer spf command to set the time interval for SPF calculation.

Use the undo timer spf command to resume the default configuration.

In the IS-IS protocol, the short path must be calculated again when the LSDB changes. If the SPF calculation is performed frequently, plenty of system resources will be occupied and the router efficiency will be affected. Comparatively, performing SPF calculation periodically can improve the efficiency. You can set the time interval of performing SPF calculation as required.

Examples

# Set the time interval of performing SPF calculation to three seconds.

<H3C> system-view

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

[H3C] isis

[H3C-isis] timer spf 3


Chapter 5  BGP Configuration Commands

 

&  Note:

The term “router” in this document refers to a router in a generic sense or an Ethernet switch running routing protocols.

 

5.1  BGP Configuration Commands

 

&  Note:

For the commands defining routing policies in BGP, refer to the next chapter “IP Routing Policy Configuration Commands".

 

5.1.1  aggregate

Syntax

aggregate ip-address mask [ as-set | attribute-policy route-policy-name | detail-suppressed | origin-policy route-policy-name | suppress-policy route-policy-name ]*

undo aggregate ip-address mask [ as-set | attribute-policy route-policy-name | detail-suppressed | origin-policy route-policy-name | suppress-policy route-policy-name ]*

View

BGP view

Parameters

ip-address: Address of the aggregated route, in dotted decimal notation.

mask: Network mask of the aggregated route, in dotted decimal notation.

as-set: Creates a route with segment of AS_SET.

detail-suppressed: Only advertises the aggregated route.

suppress-policy route-policy-name: Suppresses the specific route selected.

origin-policy route-policy-name: Selects the original routes used for aggregation.

attribute-policy route-policy-name: Sets the attributes of the aggregated route.

Description

Use the aggregate command to establish an aggregated record in the BGP routing table.

Use the undo aggregate command to disable the function.

By default, there is no route aggregation.

The keywords are explained as follows:

Table 5-1 Description on the keywords of the aggregate command

Keywords

Description

as-set

Used to produce an aggregated route whose AS path information includes detailed routes. Use this keyword with caution when many AS paths need to be aggregated because frequent changes of routes may lead to route flaps.

detail-suppressed

This keyword does not establish any aggregated route, but it restrains the advertisement of all the specific routes. If only some specific routes are to be restrained, use the peer filter-policy command.

suppress-policy

Create an aggregated route with this keyword; at the same time, the advertisement of the specified route is restrained. If you want to restrain some specific routes selectively and leaves other routes still being advertised, use the if-match clause of the route-policy command.

origin-policy

This keyword is used to select only the specific routes in accordance with the route-policy to create an aggregated route.

attribute-policy

This keyword is used to set attributes of the aggregated route. The same work can be done by using peer route-policy, and so on.

 

Examples

# Create an aggregated route in BGP routing table.

<H3C> system-view

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

[H3C] bgp 100

[H3C-bgp] aggregate 192.213.0.0 255.255.0.0

5.1.2  bgp

Syntax

bgp as-number

undo bgp [ as-number ]

View

System view

Parameters

as-number: Specified local AS number, in the range of 1 to 65535.

Description

Use the bgp command to enable BGP and enter BGP view.

Use the undo bgp command to disable BGP.

By default, BGP is disabled.

This command is used to enable/disable BGP and specify the local AS number of BGP.

Examples

# Enable BGP.

<H3C> system-view

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

[H3C] bgp 100

[H3C-bgp]

5.1.3  balance

Syntax

balance num

undo balance

View

BGP view

Parameters

num: Number of BGP routes used for load balance. This argument ranges from 1 to 4. A value of 1 means the system does not adopt load balance.

Description

Use the balance command to configure BGP load balance.

Use the undo balance command to cancel the load balance configuration.

By default, the system does not adopt BGP load balance.

Examples

# Configure BGP load balance.

<H3C> system-view

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

[H3C] bgp 100

[H3C-bgp] balance  2

5.1.4  compare-different-as-med

Syntax

compare-different-as-med

undo compare-different-as-med

View

BGP view

Parameters

None

Description

Use the compare-different-as-med command to enable comparison of MED values from different AS neighboring routes when determining the best route.

Use the undo compare-different-as-med command to disable the comparison.

By default, it is not allowed to compare the MED attribute values from the routing paths of different AS peers.

If there are several routes available to one destination address, the route with a smaller MED can be selected as the final route.

Do not use this command unless it is determined that the same IGP and routing selection mode are adopted by different autonomous systems.

Examples

# Enable comparison of MED values from different AS neighboring routes.

<H3C> system-view

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

[H3C] bgp 100

[H3C-bgp] compare-different-as-med

5.1.5  confederation id

Syntax

confederation id as-number

undo confederation id

View

BGP view

Parameters

as-number: The ID of BGP AS confederation. It is equal to the AS number which contains the AS numbers of multiple sub-ASs. The range is 1 to 65535.

Description

Use the confederation id command to configure confederation identifier.

Use the undo confederation id command to cancel the BGP confederation specified by the as-number argument.

By default, no confederation ID is configured.

Confederation can be adopted to solve the problem of too many IBGP fully-meshed connections in a large AS domain. The solution is by first dividing the AS domain into several smaller sub-ASs, and each sub-ASs remains fully-meshed. These sub-ASs form a confederation. Key BGP attributes of the route, such as next hop, MED, and local preference, are not discarded across each sub-ASs. The sub-ASs still look integral from the point of view of a confederation although these sub-ASs have EBGP relations. This can assure the integrality of the former AS domain, and ease the problem of too many connections in the domain

Related commands: confederation nonstandard, confederation peer-as.

Examples

# Confederation 9 consists of four sub-ASs, namely, 38, 39, 40, and 41. Here, the peer 10.1.1.1 is an internal member of the AS confederation while the peer 200.1.1.1 is an external member of the AS confederation. For external members, Confederation 9 is a unified AS domain.

<H3C> system-view

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

[H3C] bgp 41

[H3C-bgp] confederation id 9

[H3C-bgp] confederation peer-as 38 39 40

[H3C-bgp] group Confed38 external

[H3C-bgp] peer Confed38 as-number 38

[H3C-bgp] peer 10.1.1.1 group Confed 38

[H3C-bgp] group Remote98 external

[H3C-bgp] peer Remote98 as-number 98

[H3C-bgp] peer 200.1.1.1 group Remote98

5.1.6  confederation nonstandard

Syntax

confederation { nonstandard | standard1965 | standard3065 }

undo confederation { nonstandard | standard1965 | standard3065 }

View

BGP view

Parameters

nonstandard: Configures nonstandard confederation.

standard1965: Configures the confederation to be compliant with RFC 1965.

standard3065: Configures the confederation to be compliant with RFC 3065.

Description

Use the confederation { nonstandard | standard1965 | standard3065 } command to configure the standard type of confederation.

Use the undo confederation { nonstandard | standard1965 | standard3065 } command to cancel the configuration.

By default, the configured confederations are in compliance with RFC1965.

For the communication with nonstandard devices, you must execute the confederation nonstandard command on all the H3C routers in the confederation.

Related commands: confederation id confederation peer-as.

Examples

# AS100 contains routers following nonstandard, which is composed of two sub-ASs, 64000 and 65000.

<H3C> system-view

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

[H3C] bgp 64000

[H3C-bgp] confederation id 100

[H3C-bgp] confederation peer-as 65000

[H3C-bgp] confederation nonstandard

5.1.7  confederation peer-as

Syntax

confederation peer-as as-number-list

undo confederation peer-as [ as-number-list ]

View

BGP view

Parameters

as-number-list: List of sub-AS numbers. Up to 32 sub-ASs can be configured for a confederation in the command.

Description

Use the confederation peer-as command to configure a confederation to consist of which Sub-ASs.

Use the undo confederation peer-as command to delete the specified Sub-AS in the confederation.

By default, no autonomous system is configured as a member of the confederation.

The configured ASs in this command are inside the confederation and each AS uses fully meshed network. Before this command is executed, the confederation ID should be configured by using the confederation id command. Otherwise this configuration is invalid.

Related commands: confederation nonstandard, confederation id.

Examples

# Configure the confederation to contain AS 2000 and 2001.

<H3C> system-view

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

[H3C] bgp 100

[H3C-bgp] confederation peer-as 2000 2001

5.1.8  dampening

Syntax

dampening [ half-life-reachable half-life-unreachable reuse suppress ceiling ] [ route-policy route-policy-name ]

undo dampening

View

BGP view

Parameters

half-life-reachable: Semi-dampening of a reachable route, in minutes, in the range of 1 to 45. The default value is 15.

half-life-unreachable: Semi-dampening of an unreachable, in minutes, in the range of 1 to 45. The default value is 15.

reuse: Threshold for disabling route suppression, in seconds. When the penalty value is below this threshold, the route will be reused. The range is 1 to 20,000. The default value is 750.

suppress: Threshold for enabling route suppression, in seconds. When the penalty value is above the threshold, the route is suppressed. The range is 1 to 20,000. The default value is 2,000.

ceiling: Upper penalty threshold in seconds, that is, the penalty value stops increasing when it reaches the upper threshold. The range is 1,001 to 20,000. The default value is 16,000.

route-policy-name: Name of a route policy, in the range of 1 to 19 characters.

If no value is specified for the arguments, their default values will take effect. The half-life-reachable, half-life-unreachable, reuse, suppress, and ceiling arguments are independent of each other. Therefore, if you specify a value for any of these arguments, you must specify a value for all the others.

Description

Use the dampening command to make BGP route attenuation valid or modify various BGP route attenuation parameters.

Use the undo dampening command to make the characteristics invalid.

By default, no route attenuation is configured.

Related commands: reset bgp dampening, reset bgp flap-info, display bgp routing-table dampened, display bgp routing-table flap-info.

Examples

# Configure BGP route dampening parameters.

<H3C> system-view

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

[H3C] bgp 100

[H3C-bgp] dampening 15 15 1000 2000 10000

5.1.9  default local-preference

Syntax

default local-preference value

undo default local-preference

View

BGP view

Parameters

value: Default local preference to be configured. The range is 0 to 4294967295. A higher value represents a higher preference. By default, its value is 100.

Description

Use the default local-preference command to configure the default local preference.

Use the undo default local-preference command to restore the default value.

Configuring different local preferences will affect BGP routing selection.

Examples

<H3C> system-view

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

[H3C] bgp 100

[H3C-bgp] default local-preference 180

5.1.10  default med

Syntax

default med med-value

undo default med

View

BGP view/BGP multicast address family view

Parameters

med-value: Specified MED value, in the range of 0 to 4294967295. The default med-value is 0.

Description

Use the default med command to configure the default MED value of the system.

Use the undo default med command to restore the default MED value of the system.

The multi-exit discriminator (MED) is an external route metric. Different from the local preference, the MED is exchanged between autonomous systems. After the MED enters an autonomous system, it will not be sent out of this autonomous system. The MED attribute is used to select the optimal route, that is, the route with a smaller MED value is selected. When a router running the BGP obtains routes with the same destination address but different next hops through different external peers, the route selection will be based on the MED value. In the case that all other conditions are the same, the system first selects the route with the smaller MED value as an external route of the autonomous system.

Examples

# Set the MED value to 25.

<H3C> system-view

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

[H3C] bgp 100

[H3C-bgp] default med 25

5.1.11  display bgp group

Syntax

display bgp [ multicast ] group [ group-name ]

View

Any view

Parameters

multicast: Specifies multicast address family.

group-name: Name of a peer group, a string of 1 to 47 alphanumeric characters.

Description

Use the display bgp group command to display the information of peer groups.

Examples

# Display the information of the peer group aaa.

<H3C> display bgp group aaa

Group : aaa  type : external

  as-number : 200

members in this group :

                 10.1.1.1         11.1.1.1

  configuration within the group :

    no export policy route-policy

    no export policy filter-policy

    no export policy acl

no export policy ip-prefix

no import policy route-policy

    no import policy filter-policy

    no import policy acl

    no import policy ip-prefix

    no default route produce

Table 5-2 Description on fields of the display bgp group command

Field

Description

Group

Name of peer group

type

Type of peer group: internal (IBGP) or external (EBGP)

as-number

AS number of peer group

members in this group

Members in this peer group

route-policy

Name of configured route policy

filter-policy

Configured export and import route filter for BGP

acl

Configured access control list

ip-prefix

Configured IP address prefix list

default route produce

Whether or not to advertise default routing information

 

5.1.12  display bgp network

Syntax

display bgp [ multicast ] network

View

Any view

Parameters

multicast: Specifies multicast address family.

Description

Use the display bgp network command to view the routing information that has been configured.

Examples

# Display the routing information that has been configured.

<H3C> display bgp network

           Network             Mask          Route-policy

  ---------------------------------------------------------

         168.10.24.0      255.255.255.0        None

         10.0.0.0         255.0.0.0            None 

Table 5-3 Description on fields of the display bgp network command

Field

Description

Network

Network address

Mask

Mask

Route-policy

Configured route policy

 

5.1.13  display bgp paths

Syntax

display bgp paths as-regular-expression

View

Any view

Parameters

as-regular-expression: Matched AS path regular expression, a string of 1 to 79 characters.

Description

Use the display bgp paths command to view the information about AS paths

Examples

# Display the information about the AS paths.

<H3C> display bgp paths 500

Id  Hash-index References Aggregator Origin As-Path

---------------------------------------------------

153 80         100        <null>      IGP   500 {500,400,600}

Table 5-4 Description on fields of the display bgp paths command

Field

Description

Id

Value of sequence number

Hash-Index

Value of Hash-index

References

Number of routes with reference

Aggregator

Mask length of aggregate route

Origin

Origin attribute of route, which indicates that the route updates its origin relative to the route originating it from AS. It has three optional values:

IGP

The route belongs to inside of AS. BGP treats aggregate route and the route defined by the command network as inside of AS, and origin type as IGP.

EGP

The route is learned from exterior gateway protocol (EGP).

INC

Short for INCOMPLETE: indicates that the original source of the route information is unknown (learned by other methods). BGP sets the origin of the route imported through other IGP protocols as INCOMPLETE

As-path

AS-path attribute of route, which records all AS areas that the route passes. With it, route loop can be avoided.

 

5.1.14  display bgp peer

Syntax

display bgp [ multicast ] peer [ ip-address [ verbose ] ]

display bgp [ multicast ] peer [ verbose ]

View

Any view

Parameters

multicast: Specifies multicast address family.

ip-address: IP address of the peer to be displayed.

verbose: Displays detailed information of the specified peer.

Description

Use the display bgp peer command to display the information about the specified BGP peer.

Examples

# Display detailed information of the peer 10.110.25.20.

<H3C> display bgp peer 10.110.25.20 verbose

         Peer: 10.110.25.20 Local: Unspecified

         Type: External

         State: Idle     Flags: <Idled>

         Last State: NoState     Last Event: NoEvent

         Last Error: None

         Options: <>

 

  Configuration within the peer :

    no export policy route-policy

    no export policy ip-prefix

    no export policy filter-policy

    no export policy acl

    no import policy route-policy

    no import policy ip-prefix

    no import policy filter-policy

    no import policy acl

    no default route produce

Table 5-5 Description on fields of the display bgp peer command

Field

Description

Peer

IP address of peer and port number used by the peer to  establish TCP  connection

Local

IP address and port number used to establish TCP connection of local end

Type

Type of peer: Internal for IBGP, and External for EBGP

State

State of peer

Flags

Flags of peer

Last State

Last state before entering current state

Last Event

Last event of neighbor state machine

Last Error

Last error of neighbor state machine

Options

Options

 

5.1.15  display bgp routing-table

Syntax

display bgp [ multicast ] routing-table [ ip-address [ mask ] ]

View

Any view

Parameters

multicast: Specifies multicast address family.

ip-address: Destination of the network.

mask: Mask of the network.

Description

Use the display bgp routing-table command to display all the BGP routing information.

Examples

# Display all the BGP routing information.

<H3C> display bgp routing-table

Flags:   # - valid       ^ - active      I - internal

         D - damped      H - history     S - aggregate suppressed

 

    Dest/Mask          Next-hop     Med        Local-pref Origin As-path

-----------------------------------------------------------------------

#^  129.1.1.0/24       5.5.5.5                            IGP    600

#^  129.1.2.0/24       5.5.5.5                            IGP    600

#^  129.1.3.0/24       5.5.5.5                            IGP    600

#^  129.1.4.0/24       5.5.5.5                            IGP    600

#^  129.1.5.0/24       5.5.5.5                            IGP    600

#^  129.1.6.0/24       5.5.5.5                            IGP    600

#^  129.1.7.0/24       5.5.5.5                            IGP    600

#^  129.1.8.0/24       5.5.5.5                            IGP    600

#^  129.1.9.0/24       5.5.5.5                            IGP    600

#^  129.1.10.0/24      5.5.5.5                            IGP    600

 

  Routes total: 10

Table 5-6 Description on fields of the display bgp routing-table command

Field

Description

Flags

Status code:

# – valid (valid route)

^ – active (selected optimal route)

I – internal (IBGP route)

D – damped (attenuation dampened)

H – history (history record)

S – aggregate suppressed (aggregation suppressed)

Dest/Mask

Destination address/mask

Next Hop

IP address of the next hop

Med

Value of the MULTI_EXIT_DISC attribute, which ranges from 0 to 4294967295

Local-Pref

Local preference, which ranges from 0 to 4294967295

Origin

Origin attribute of a route, which indicates that the route updates its origin relative to the route originating it from the AS. It has three optional values:

IGP

The route is inside the AS. BGP treats the aggregation route and the route defined by the network command inside AS, and the origin type as IGP.

EGP

The route is learned from exterior gateway protocol (EGP).

INC

Short for INCOMPLETE: indicates that the original source of the route information is unknown (learned by other methods). BGP sets the origin of the route imported through other IGP protocols as INCOMPLETE

As-path

AS-path attribute of a route, which records all AS areas that the route passes to avoid route loop.

 

5.1.16  display bgp routing-table as-path-acl

Syntax

display bgp [ multicast ] routing-table as-path-acl acl-number

View

Any view

Parameters

acl-number: Matched AS path list number, in the range of 1 to 199.

multicast: Specifies multicast address family.

Description

Use the display bgp routing-table as-path-acl command to view routes that match an as-path acl.

Examples

# Display routes that match as-path-acl 1.

<H3C> display bgp routing-table as-path-acl 1

Flags:   # - valid       ^ - active      I - internal

         D - damped      H - history     S - aggregate suppressed

 

  Dest/Mask         Next-Hop      Med     Local-pref   Origin    As-path

--------------------------------------------------------------------

#^ 1.1.1.0/24         10.10.10.1    0                   IGP      200

#^ 1.1.2.0/24         10.10.10.1    0                   IGP      200

#^ 1.1.3.0/24         10.10.10.1    0                   IGP      200

#^ 2.2.3.0/24         10.10.10.1    0                   INC      200

#^ 4.4.4.0/24         10.10.10.1    0                   INC      200

#^ 9.9.9.0/24         10.10.10.1    0                   INC      200

#^ 10.10.10.0/24      10.10.10.1    0                   IGP      200

#^  22.1.0.0/16       200.1.7.2     100                 INC      200

Table 5-7 Description on fields of the display bgp routing-table as-path-acl command

Field

Description

Dest/Mask

Destination address/Mask

Pref

Preference

Nexthop

IP address of next hop

Med

MULTI_EXIT_DISC attribute value

Local-pref

Local preference

Origin

Origin attribute of route, which indicates that the route updates its origin relative to the route originating it from AS. It has three optional values:

IGP

The route belongs to inside of AS. BGP treats aggregate route and the route defined by the command network as inside of AS, and origin type as IGP.

EGP

The route is learned from exterior gateway protocol (EGP).

INC

Short for INCOMPLETE: indicates that the original source of the route information is unknown (learned by other methods). BGP sets the origin of the route imported through other IGP protocols as INCOMPLETE

As-path

AS-path attribute of route, which records all AS areas that the route passes. With it, route loop can be avoided

 

5.1.17  display bgp routing-table cidr

Syntax

display bgp [ multicast ] routing-table cidr

View

Any view

Parameters

multicast: Specifies multicast address family.

Description

Use the display bgp routing-table cidr command to view the routing information about the non-natural mask (namely the classless inter-domain routing, CIDR).

Examples

# Display BGP CIDR routing information.

<H3C> display bgp routing-table cidr

Flags:   # - valid       ^ - active      I - internal

         D - damped      H - history     S - aggregate suppressed

      

 

    Dest/Mask         Next-Hop     Med    Local-pref   Origin    As-path

------------------------------------------------------------------------

#^  22.1.0.0/16       200.1.7.2    30      100          INC      200

#   88.1.0.0/16       0.0.0.0      30                   IGP

For detailed description of the fields in the output information, see Table 5-6.

5.1.18  display bgp routing-table community

Syntax

display bgp [ multicast ] routing-table community [ aa:nn | no-export-subconfed | no-advertise | no-export ]* [ whole-match ]

View

Any view

Parameters

multicast: Specifies multicast address family.

aa:nn: Community number.

no-export-subconfed: Specifies not to export a route to the outside of the local AS or to other sub-ASs in the confederation after the route is received.

no-advertise: Specifies not to advertise a route to other BGP peers after the route is received.

no-export: Specifies not to export a route to the outside of the local AS after the route is received. If the confederation is used, the router cannot be exported to the outside of the confederation, but can be exported to other sub-ASs in the confederation.

whole-match: Displays the exactly matched routes.

Description

Use the display bgp routing-table community command to view the routing information related to the specified BGP community number in the routing table.

Examples

# Display the routing information matching BGP community number 11:22.

<H3C> display bgp routing-table community 11:22

Flags:   # - valid       ^ - active      I - internal

         D - damped      H - history     S - aggregate suppressed

        

 

    Dest/Mask       Next-Hop     Med     Local-pref   Origin    As-path

-------------------------------------------------------------------

#^   1.0.0.0/8      172.10.0.2            100          IGP   

#^   2.0.0.0/8      172.10.0.2            100          IGP

For detailed description of the fields in the output information, see Table 5-6.

5.1.19  display bgp routing-table community-list

Syntax

display bgp [ multicast ] routing-table community-list community-list-number [ whole-match ]

View

Any view

Parameters

multicast: Specifies multicast address family.

community-list-number: Community list number, in the range of 1 to 999.

whole-match: Displays the exactly matched routes.

Description

Use the display bgp routing-table community-list command to view the routing information matching the specified BGP community list.

Examples

# Display the routing information matching BGP community list 1.

<H3C> display bgp routing-table community-list 1

Flags:   # - valid       ^ - active      I - internal

         D - damped      H - history     S - aggregate suppressed

        

 

Destination/Mask    Next-hop        Med     Local-Pref   Origin  As-Path

-------------------------------------------------------------------

    1.1.1.0/24      10.10.10.1      0                    IGP      200

    1.1.2.0/24      10.10.10.1      0                    IGP      200

    1.1.3.0/24      10.10.10.1      0                    IGP      200

    2.2.3.0/24      10.10.10.1      0                    INC      200

    4.4.4.0/24      10.10.10.1      0                    INC      200

    9.9.9.0/24      10.10.10.1      0                    INC      200

    10.10.10.0/24   10.10.10.2      0                    IGP      

    10.10.10.0/24   10.10.10.1      0                    IGP      200

For detailed description of the fields in the output information, see Table 5-6.

5.1.20  display bgp routing-table dampened

Syntax

display bgp routing-table dampened

View

Any view

Parameters

None

Description

Use the display bgp routing-table dampened command to display BGP dampened routes.

Examples

# Display BGP dampened routes.

<H3C> display bgp routing-table dampened

Flags:   # - valid       ^ - active      I - internal

         D - damped      H - history     S - aggregate suppressed

       

Dest/Mask             Source    Damping-limit   Origin   As-path

-----------------------------------------------------------------

#D  11.1.0.0        133.1.1.2      1:20:00       IGP      200

Table 5-8 Description on the fields of the display bgp routing-table dampened command

Field

Description

Flags

Status code:

# – valid (valid route)

^ – active (selected optimal route)

I – internal (IBGP route)

D – damped (attenuation dampened)

H – history (history record)

S – aggregate suppressed (aggregation suppressed)

B – balance (load balance)

#D

Valid and dampened route

Dest/Mask

The route to this network segment is dampened.

Source

Next hop of the route

Damping-limit

The time before dampening turns invalid and the route can be reused.

Origin

Origin attribute of a route, which indicates that the route updates its origin relative to the route originating it from the AS. It has three optional values:

IGP

The route belongs to inside of AS. BGP treats aggregate route and the route defined by the command network as inside of AS, and origin type as IGP.

EGP

The route is learned from exterior gateway protocol (EGP).

INC

Short for INCOMPLETE: indicates that the original source of the route information is unknown (learned by other methods). BGP sets the origin of the route imported through other IGP protocols as INCOMPLETE

As-path

AS-path attribute of route, which records all AS areas that the route passes. With it, route loop can be avoided.

 

5.1.21  display bgp routing-table different-origin-as

Syntax

display bgp [ multicast ] routing-table different-origin-as

View

Any view

Parameters

multicast: Specifies multicast address family.

Description

Use the display bgp routing-table different-origin-as command to display routes that have different source autonomous systems.

Examples

# Display the routes that have different source ASs.

<H3C> display bgp routing-table different-origin-as

Flags:   # - valid       ^ - active      I - internal

         D - damped      H - history     S - aggregate suppressed

        

 

Destination/Mask     Next-hop       Med     Local-Pref  Origin   As-Path

-----------------------------------------------------------------------

   10.10.10.0/24      10.10.10.2    0                   IGP    

   10.10.10.0/24      10.10.10.1    0                   IGP      200

For detailed description of the fields in the output information, see Table 5-6.

5.1.22  display bgp routing-table flap-info

Syntax

display bgp routing-table flap-info [ regular-expression as-regular-expression | as-path-acl acl-number | network-address [ mask [ longer-match ] ] ]

View

Any view

Parameters

as-regular-expression: Route flap-info matching AS path regular expression.

acl-number: Number of the specified AS path to be matched, in the range of 1 to 199.

network-address: Network IP address related to the dampening information to be shown

mask: Network mask.

longer-match: Displays the flap-info of the route that has a mask longer than that specified by the network-address mask argument.

Description

Use the display bgp routing-table flap-info command to view BGP flap-info.

Examples

# Display BGP flap-info.

<H3C> display bgp routing-table flap-info

Flags:   # - valid       ^ - active      I - internal

         D - damped      H - history     S - aggregate suppressed

        

    Dest/Mask      Source      Keepup    Damping   Flap  Origin As-path

                                time      limit    times

-------------------------------------------------------------------------

#D  11.1.0.0/16    133.1.1.2   48        1:20:30   4     IGP     200

Table 5-9 Description on fields of the display bgp routing-table flap-info command

Field

Description

Flags

State flags:

# – valid (valid route)

^ – active (selected optimal route)

D – damped (attenuation dampened)

H – history (history record)

I – internal (interior gateway protocol)

S – aggregate suppressed (aggregation suppressed)

B – balance (load balance)

#D

Valid and damped route

Dest/Mask

The route to this network segment is dampened.

Source

The next hop of the route

Keepup-time

The time that route damping has continued

Damping-limit

The time before dampening turns invalid and the route can be reused.

Flap-times

The times of the route flap

Origin

Origin attribute of route, which indicates that the route updates its origin relative to the route originating it from AS. It has three optional values:

IGP

The route belongs to inside of AS. BGP treats aggregate route and the route defined by the command network as inside of AS, and origin type as IGP.

EGP

The route is learned from exterior gateway protocol (EGP).

INC

Short for INCOMPLETE: indicates that the original source of the route information is unknown (learned by other methods). BGP sets the origin of the route imported through other IGP protocols as INCOMPLETE

As-path

AS-path attribute of route, which records all AS areas that the route passes. With it, route loop can be avoided

 

5.1.23  display bgp routing-table peer

Syntax

display bgp [ multicast ] routing-table peer ip-address { advertised | received }  [ network-address [ mask ] | statistic ]

View

Any view

Parameters

multicast: Specifies multicast address family.

ip -address: Specifies the peer to be displayed.

advertised: Routing information advertised by the specified peer.

received: Routing information the specified peer received.

network-address mask : IP address and address mask of destination network.

statistic: Statistic routing information of peer.

Description

Use the display bgp routing-table peer command to view the routing information that the specified BGP peer advertised or received.

Related commands: display bgp peer

Examples

# Display the routing information advertised by BGP peer 1.1.1.2.

<H3C> display bgp routing table peer 1.1.1.2 advertised

Dest/Mask          Next-hop       Med        Local-pref  Origin As-path

-------------------------------------------------------------------------

  Appendant Flags: @ - Queued

 1.1.1.0/24         1.1.1.1        0           100         INC

Here, "Appendant Flags" indicates the appended flag, "@" the route to be sent, "!" the reachable route, and "~" to cancel route. For detailed description of the fields in the output information, see Table 5-6.

5.1.24  display bgp routing-table regular-expression

Syntax

display bgp [ multicast ] routing-table regular-expression as-regular-expression

View

Any view

Parameters

multicast: Specifies multicast address family.

as-regular-expression: Matched AS regular expression.

Description

Use the display bgp routing-table regular-expression command to view the routing information matching the specified AS regular expression

Examples

# Display the routing information matched with ^200$.

<H3C> display bgp routing-table regular-expression ^200$

Flags:   # - valid       ^ - active      I - internal

         D - damped      H - history     S - aggregate suppressed

       

 

Dest/Mask       Next-hop         Med    Local-Pref  Origin AS-Path

--------------------------------------------------------------------

 1.1.1.0/24      10.10.10.1       0                  IGP   200

 1.1.2.0/24      10.10.10.1       0                  IGP   200

 1.1.3.0/24      10.10.10.1       0                  IGP   200

 2.2.3.0/24      10.10.10.1       0                  INC   200

 4.4.4.0/24      10.10.10.1       0                  IGP   200

 9.9.9.0/24      10.10.10.1       0                  INC   200

 10.10.10.0/24   10.10.10.1       0                  IGP   200

For detailed description of the fields in the output information, see Table 5-6.

5.1.25  display bgp routing-table statistic

Syntax

display bgp [ multicast ] routing-table statistic

View

Any view

Parameters

multicast: Specifies multicast address family.

Description

Use the display bgp routing-table statistic command to view the statistics of BGP routing information.

Examples

# Display the statistics of BGP routing information.

<H3C> display bgp routing-table statistic

  Routes total: 4

5.1.26  filter-policy export

Syntax

filter-policy { acl-number | ip-prefix ip-prefix-name } export [ protocol  [ process-id ] ]

undo filter-policy { acl-number | ip-prefix ip-prefix-name } export [ protocol  [ process-id ] ]

View

BGP view

Parameters

acl-number: Number of the ACL used to match the destination address field of the routing information, ranging 2000 to 3999.

ip-prefix-name: Name of the ip prefix list used to match the destination address field of the routing information, containing 1 to 19 characters.

protocol: Routing protocol whose routing information is to be filtered. Currently, routing information obtained using the following methods can be filtered: direct, ospf, ospf-ase, ospf-nssa, rip, isis, and static.

process-id: Routing protocol process ID, in the range of 1 to 65535. This argument is valid only when the protocol is ospf.

Description

Use the filter-policy export command to filter the advertised routes and only the routes passing the filter can be advertised by BGP.

Use the undo filter-policy export command to cancel the filtration to the advertised routes.

By default, filtration to the received routing information is not configured.

If a value is specified for the protocol argument, only the imported route generated by the specified protocol is filtered and the imported routes generated by other protocols are not affected. If no value is specified for the protocol argument, the imported route generated by any protocol will be filtered.

Examples

# Use ACL 2000 to filter the routing information advertised by BGP.

<H3C> system-view

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

[H3C] bgp 100

[H3C-bgp] filter-policy 2000 export

5.1.27  filter-policy import

Syntax

filter-policy gateway ip-prefix-name import

undo filter-policy gateway ip-prefix-name import

filter-policy { acl-number | ip-prefix ip-prefix-name } import

undo filter-policy { acl-number | ip-prefix ip-prefix-name } import

View

BGP view

Parameters

acl-number: Number of the ACL used to match the destination address field of the routing information, ranging 2000 to 3999.

ip-prefix ip-prefix-name: Specifies the name of address prefix list used to match the destination address field of the routing information, containing 1 to 19 characters.

gateway ip-prefix-name: Specifies the ip-prefix name of a neighboring router to match against the routing information advertised by the specified neighboring router. ip-prefix-name contains 1 to 19 characters.

Description

Use the filter-policy gateway import command to filter the learned routing information advertised by the peer with the specified address.

Use the undo filter-policy gateway import command to cancel the filtration to the routing information advertised by the peer with specified address.

Use the filter-policy import command to filter the received global routing information. Use the undo filter-policy import command to remove the filtration to the received global routing information.

By default, filtration to the received routing information is not configured.

This command can be used to filter the routes received by BGP and determines whether to add the routes to the BGP routing table.

Examples

# Use ACL 2000 to filter all imported BGP routes.

<H3C>system-view

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

[H3C] bgp 100

[H3C-bgp] filter-policy 2000 import

5.1.28  group

Syntax

group group-name [ internal | external ]

undo group group-name

View

BGP view

Parameters

group-name: Name of the peer group, an alphanumeric string of 1 to 47 characters. It is significant only locally.

internal: Creates an IBGP peer group.

external: Creates an EBGP peer group, including other sub-ASs in the confederation.

Description

Use the group group-name command to configure a peer group.

Use the undo group group-name command to cancel the configuration.

If no parameter is specified with the group command, an IBGP peer group is created.

The basic configurations of members in a peer group must be the same as those of the peer group. The BGP peer cannot exist independently, and it must belong to a peer group. Therefore, when configuring a BGP peer, create a peer group first and then add the BGP peer to the group.

Routing update policies of peer members must be the same as those of the peer group. However, entry policies can be different.

Examples

# Create an IBGP group named test.

<H3C>system-view

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

[H3C] bgp 100

[H3C-bgp] group test

5.1.29  import-route

Syntax

import-route protocol [ process-id ] [ med med-value | route-policy route-policy-name ]*

undo import-route protocol [ process-id ]

View

BGP view

Parameters

protocol: Source routing protocols which can be imported, including direct, ospf, ospf-ase, ospf-nssa, rip, isis and static at present.

process-id: Specific process ID, in the range of 1 to 65535. This argument is valid only when the protocol argument is “ospf”.

med med-value: Specifies the MED value loaded by the imported route, in the range of 0 to 4294967295.

route-policy route-policy-name: Specifies a route-policy to filter routes before importing. The route-policy-name argument is an alphanumeric string of 1 to 19 characters.

Description

Use the import-route command to import and advertise routes of other protocols.

Use the undo import-route command to cancel the existing configuration.

By default, BGP does not import and advertise routes of other protocols.

Examples

# Import routes of RIP.

<H3C>system-view

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

[H3C] bgp 100

[H3C-bgp] import-route rip

5.1.30  network

Syntax

network ip-address [ mask ] [ route-policy route-policy-name ]

undo network ip-address [ mask ] [ route-policy route-policy-name ]

View

BGP view

Parameters

ip-address: IP address of the destination network segment.

mask: Subnet mask.

route-policy-name: Route policy used for the advertised route, containing 1 to 19 characters.

Description

Use the network command to advertise the network segment route to the BGP routing table.

Use the undo network command to cancel the existing configuration.

By default, BGP does not advertise any network segment routes.

Examples

# Advertise routes to the network segment 10.0.0.0/16.

<H3C>system-view

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

[H3C] bgp 100

[H3C-bgp] network 10.0.0.0 255.255.0.0

5.1.31  peer advertise-community

Syntax

peer group-name  advertise-community

undo peer group-name advertise-community

View

BGP view

Parameters

group-name: Name of a peer group, containing 1 to 47 alphanumeric characters.

Description

Use the peer advertise-community command to enable the transmission of the community attribute to a peer group.

Use the undo peer advertise-community command to cancel the existing configuration.

By default, the community attribute is not transmitted to any peer group.

Related commands: if-match community-list, apply community.

Examples

# Transmit the community attribute to the peer group named test.

<H3C>system-view

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

[H3C] bgp 100

[H3C-bgp] peer test advertise-community

5.1.32  peer allow-as-loop

Syntax

peer { group-name | ip-address } allow-as-loop [ number ]

undo peer { group-name | ip-address } allow-as-loop

View

BGP view

Parameters

group-name: Name of a peer group, containing 1 to 47 alphanumeric characters.

ip-address: IP address of the peer.

number: Times of repeating the local AS number, in the range of 1 to 10.

Description

Use the peer allow-as-loop command to allow the local AS number to appear in the AS_Path attribute of the received route and configure the repeated times.

Use the undo peer allow-as-loop command to cancel the function.

Related commands: display current-configuration, display bgp routing-table peer, display bgp routing-table group

Examples

# Set the times of repeating the local AS that learns routes from 1.1.1.1 to “2”.

<H3C>system-view

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

[H3C] bgp 100

[H3C-bgp] peer 1.1.1.1 allow-as-loop 2

5.1.33  peer as-number

Syntax

peer group-name as-number as-number

undo peer group-name as-number

View

BGP view

Parameters

group-name: Name of a peer group, containing 1 to 47 alphanumeric characters.

as-number: AS number of the peer or peer group, in the range of 1 to 65535.

Description

Use the peer as-number command to configure the AS number of a peer group.

Use the undo peer as-number command to delete the AS number of a peer group.

By default, no AS number is configured for a peer group.

Examples

# Set the AS number for the peer named test to 100.

<H3C>system-view

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

[H3C] bgp 100

[H3C-bgp] peer test as-number 100

5.1.34  peer as-path-acl export

Syntax

peer group-name as-path-acl acl-number export

undo peer group-name as-path-acl acl-number export

View

BGP view

Parameters

group-name: Name of the peer group, containing 1 to 47 alphanumeric characters.

acl-number: AS path ACL number, in the range of 1 to 199.

export: Filters the advertised routes.

Description

Use the peer as-path-acl export command to configure filtering policy of BGP advertised routes based on AS path list.

Use the undo peer as-path-acl command to cancel the existing configuration.

By default, no AS path ACL is configured for a peer group.

You can use the peer as-path-acl export command on a peer group. In the peer as-path-acl export command, the acl-number argument is the AS path list number. It is configured by using the ip as-path-acl command, instead of the acl command.

Related commands: peer as-path-acl import, ip as-path-acl.

Examples

# Filter routes exported to the peer group (named test) based on AS path ACL 1.

<H3C>system-view

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

[H3C] bgp 100

[H3C-bgp] peer test as-path-acl 1 export

5.1.35  peer as-path-acl import

Syntax

peer { group-name | ip-address } as-path-acl acl-number import

undo peer { group-name | ip-address } as-path-acl acl-number import

View

BGP view

Parameters

group-name: Name of the peer group, containing 1 to 47 alphanumeric characters.

ip-address: IP address of the peer, in dotted decimal notation.

acl-number: AS path list number, in the range of 1 to 199.

import: Applies the AS path list in filtering the received routes.

Description

Use the peer as-path-acl import command to configure filtering Policy of BGP received routes based on AS path list.

Use the undo peer as-path-acl import command to cancel the existing configuration.

By default, the peer/peer group has no AS path list.

The priority of the ingress routing policy configured for the peer is higher than that for the peer group.

Related commands: peer as-path-acl export, ip as-path-acl

Examples

# Apply AS path ACL 1 in the peer group named test to filter BGP received routes.

<H3C>system-view

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

[H3C] bgp 100

[H3C-bgp] peer test as-path-acl 1 import

5.1.36  peer connect-interface

Syntax

peer { group-name | ip-address } connect-interface interface-type interface-number

undo peer { group-name | ip-address } connect-interface interface-type interface-number

View

BGP view

Parameters

group-name: Name of the peer group, containing 1 to 47 alphanumeric characters.

ip-address: IP address of the peer.

interface-type interface- number: Interface type and interface number.

Description

Use the peer connect-interface command to specify the source interface of a route update packet.

Use the undo peer connect-interface command to restore the best source interface.

By default, BGP uses the interface directly connected to the peer as the source interface of route update packets.

Generally, BGP uses the optimal source interface for route update packets. In order for the system to be able to send route update packets in the case that this interface is faulty, you can configure the loopback interface as the source interface of route update packets.

Examples

# Specify the source interface that sends route update packets to the peer group named test as Loopback 0.

<H3C>system-view

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

[H3C] bgp 100

[H3C-bgp] peer test connect-interface loopback 0

5.1.37  peer default-route-advertise

Syntax

peer group-name default-route-advertise

undo peer group-name default-route-advertise

View

BGP view

Parameters

group-name: Name of the peer group, containing 1 to 47 alphanumeric characters.

Description

Use the peer default-route-advertise command to send the default route to the peer group.

Use the undo peer default-route-advertise command to cancel the existing configuration.

By default, the default route is not sent to the peer group.

For this command, no default route needs to exist in the routing table. A default route is sent unconditionally to a peer group with the next hop as itself.

Examples

# Configure a peer group named test to generate a default route.

<H3C>system-view

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

[H3C] bgp 100

[H3C-bgp] peer test default-route-advertise

5.1.38  peer description

Syntax

peer { group-name | ip-address } description description-text

undo peer { group-name | ip-address } description

View

BGP view

Parameters

group-name: Name of the peer group, containing 1 to 47 alphanumeric characters.

ip-address: IP address of the peer.

description-text: Description information configured, containing up to 79 alphanumeric characters.

Description

Use the peer description command to configure the description information of the peer/peer group.

Use the undo peer description command to cancel the description information of the peer/peer group.

By default, no description information is configured for peers/peer group.

Related commands: display current-configuration, display bgp peer, display bgp routing-table group.

Examples

# Configure the description information of an existing peer group named group1 as beijing1.

<H3C>system-view

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

[H3C] bgp 100

[H3C-bgp] peer group1 description beijing1

5.1.39  peer ebgp-max-hop

Syntax

peer group-name ebgp-max-hop [ hop-count ]

undo peer group-name ebgp-max-hop

View

BGP view

Parameters

group-name: Name of the peer group, containing 1 to 47 characters.

hop-count: Maximum hop value, in the range of 1 to 255. By default, the value is 64.

Description

Use the peer ebgp-max-hop command to establish EBGP connection with the peer on indirectly connected network.

Use the undo peer ebgp-max-hop command to cancel the existing configuration.

By default, it is not allowed to establish any EBGP connection with a peer on an indirectly connected network.

By setting hop-count, you can also configure the maximum hop value of an EBGP connection.

Examples

# Allow to establishing EBGP connection with the peer group named test indirectly connected.

<H3C>system-view

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

[H3C] bgp 100

[H3C-bgp] peer test ebgp-max-hop

5.1.40  peer enable

Syntax

peer { group-name | ip-address } enable

undo peer { group-name | ip-address } enable

View

BGP view

Parameters

group-name: Name of the peer group, containing 1 to 47 characters. 

ip-address: IP address of the peer.

Description

Use the peer enable command to enable the specified peer/peer group.

Use the undo peer enable command to disable the specified peer/peer group.

By default, a BGP peer/peer group is enabled.

If the specified peer/peer group is disabled, the router will not exchange routing information with the specified peer/peer group.

Examples

# Disable the specified peer 18.10.0.9. After the configuration, the local router does not exchange BGP routing information with the peer 18.10.0.9..

<H3C>system-view

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

[H3C] bgp 100

[H3C-bgp] peer 18.10.0.9 group group1

[H3C-bgp] undo peer 18.10.0.9 enable

5.1.41  peer filter-policy export

Syntax

peer group-name filter-policy acl-number export

undo peer group-name filter-policy acl-number export

View

BGP view

Parameters

group-name: Name of the peer group, containing 1 to 47 characters.

acl-number: Basic or advanced ACL number, ranging from 2000 to 3999.

export: Applies a filtering policy on advertised routes. It applies to a peer group only.

Description

Use the peer filter-policy export command to configure the filter-policy list of routes advertised by a peer group.

Use the undo peer filter-policy export command to cancel the existing configuration.

By default, a peer/peer group has no access control list (acl).

You can configure the peer filter-policy export command on a peer group only.

Related commands: acl, peer filter-policy import.

Examples

# Configure to filter the routes advertised by the peer group named test by using ACL 2000.

<H3C>system-view

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

[H3C] bgp 100

[H3C-bgp] peer test filter-policy 2000 export

5.1.42  peer filter-policy import

Syntax

peer { group-name | ip-address } filter-policy acl-number import

undo peer { group-name | ip-address } filter-policy acl-number import

View

BGP view

Parameters

group-name: Name of the peer group, containing 1 to 47 characters.

ip-address: IP address of the peer, in dotted decimal format.

acl-number: Basic or advanced ACL number, ranging from 2000 to 3999.

Description

Use the peer filter-policy import command to configure the filter-policy list of the routes received by a peer/peer group.

Use the undo peer filter-policy import command to cancel the existing configuration.

By default, a peer/peer group has no access control list (acl).

Related commands: peer filter-policy export, ip as-path-acl, peer as-path-acl export, peer as-path-acl import.

Examples

# Set the filter-policy list of a peer group test.

<H3C>system-view

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

[H3C] bgp 100

[H3C-bgp] peer test filter-policy 2000 import

5.1.43  peer group

Syntax

peer ip-address group group-name [ as-number as-number ]

undo peer ip-address

View

BGP view

Parameters

group-name: Name of the peer group, containing 1 to 47 characters.

ip-address: IP address of the peer.

as-number: Peer AS number of the peer/peer group, in the range of 1 to 65535.

Description

Use the peer group command to add a peer to the existing peer group.

Use the undo peer ip-address command to delete a peer.

When adding a peer to an EBGP peer group without AS number, you should also specify the peer’s AS number. While adding a peer to an IBGP peer group or to a EBGP peer group with AS number, you need not specify the AS number for the peer.

Examples

# Add a peer to the peer group test.

<H3C> system-view

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

[H3C] bgp 100

[H3C-bgp] group test external

[H3C-bgp] peer test as-number 2004

[H3C-bgp] peer 10.1.1.1 group test

5.1.44  peer ip-prefix export

Syntax

peer group-name ip-prefix ip-prefix-name export

undo peer group-name ip-prefix ip-prefix-name export

View

BGP view

Parameters

group-name: Name of peer group, containing 1 to 47 characters.

ip-prefix-name: Name of the specified ip-prefix, a string containing 1 to 19 characters.

Description

Use the peer ip-prefix export command to configure the route filtering policy of routes advertised by the peer group based on the ip-prefix.

Use the undo peer ip-prefix export command to cancel the route filtering policy of the peer group based on the ip-prefix.

By default, the route filtering policy of the peer group is not specified.

You can use the peer ip-prefix export command on peer groups only.

Related commands: peer ip-prefix import

Examples

# Configure the route filtering policy of the peer group based on the ip-prefix 1.

<H3C>system-view

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

[H3C] bgp 100

[H3C-bgp] peer group1 ip-prefix list1 export

5.1.45  peer ip-prefix import

Syntax

peer { group-name | ip-address } ip-prefix ip-prefix-name import

undo peer { group-name | ip-address } ip-prefix ip-prefix-name import

View

BGP view

Parameters

group-name: Name of peer group, containing 1 to 47 characters.

ip-address: IP address of the peer, in dotted decimal notation.

ip-prefix-name: Name of the specified ip-prefix, containing 1 to 19 characters.

Description

Use the peer ip-prefix import command to configure the route filtering policy of routes received by the peer/peer group based on the ip-prefix.

Use the undo peer ip-prefix import command to cancel the route filtering policy of the peer/peer group based on the ip-prefix.

By default, the route filtering policy of the peer/peer group is not specified.

The priority of the ingress routing policy configured for the peer is higher than that for the peer group.

Related commands: peer ip-prefix export

Examples

# Configure the route filtering policy of the peer group based on the ip-prefix 1.

<H3C>system-view

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

[H3C] bgp 100

[H3C-bgp] peer group1 ip-prefix list1 import

5.1.46  peer next-hop-local

Syntax

peer group-name  next-hop-local

undo peer group-name next-hop-local

View

BGP view

Parameters

group-name: Name of the peer group, containing 1 to 47 characters.

Description

Use the peer next-hop-local command to configure the peer group to take its own address as the next hop when routes are advertised to the peer group.

Use the undo peer next-hop-local command to cancel the existing configuration.

Examples

# When BGP distributes the routes to the peer group test, it will take its own address as the next hop.

<H3C>system-view

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

[H3C] bgp 100

[H3C-bgp] peer test next-hop-local

5.1.47  peer password

Syntax

peer { group-name | ip-address } password { cipher | simple } password

undo peer { group-name | ip-address } password

View

BGP view

Parameters

group-name: Name of the peer group, containing 1 to 47 characters.

ip-address: IP address of the peer, in dotted decimal notation.

cipher: Displays the configured password in cipher text mode.

simple: Displays the configured password in simple text mode.

password: Password in character string form with 1 to 16 characters when the simple keyword is specified in the command or in the event of inputting the password in simple text mode but the cipher keyword is specified in the command; with 24 characters in the event of inputting the password in cipher text mode when the cipher keyword is specified in the command.

Description

Use the peer password command to configure MD5 authentication for BGP during TCP connection setup.

Use the undo peer password command to cancel the configuration.

By default, BGP does not perform MD5 authentication when TCP connection is set up.

Once MD5 authentication is enabled, both parties involved in the authentication must be configured with identical authentication modes and passwords. Otherwise, TCP connection will not be set up because of the failed authentication.

This command is used to configure MD5 authentication for the specific peer only when the peer group to which the peer belongs is not configured with MD5 authentication. Otherwise, the peer should be consistent with the peer group.

Examples

# Adopt MD5 authentication on the TCP connection set up between the local router at 10.1.100.1 and the peer router at 10.1.100.2.

<H3C>system-view

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

[H3C] bgp 100

[H3C-bgp] peer 10.1.100.2 password simple abc

# Perform the similar configuration on the peer.

<H3C>system-view

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

[H3C] bgp 100

[H3C-bgp] peer 10.1.100.1 password simple abc

5.1.48  peer public-as-only

Syntax

peer group-name  public-as-only

undo peer group-name public-as-only

View

BGP view

Parameters

group-name: Name of a peer group, containing 1 to 47 characters.

Description

Use the peer public-as-only command to configure not to carry the AS number when transmitting BGP update packets.

Use the undo peer public-as-only command to configure to carry the AS number when transmitting BGP update packets.

By default, private AS number is carried when transmitting BGP update packets.

Generally, BGP transmits BGP update packets with the AS number (either public AS number or private AS number). To enable some outbound routers to ignore the AS number when transmitting update packets, you can configure not to carry the AS number when transmitting BGP update packets.

Examples

# Configure not to carry the private AS number when transmitting BGP update packets to the peer group named test.

<H3C>system-view

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

[H3C] bgp 100

[H3C-bgp] peer test public-as-only

5.1.49  peer reflect-client

Syntax

peer group-name reflect-client

undo peer group-name reflect-client

View

BGP view

Parameters

group-name: Name of peer group, containing 1 to 47 characters.

Description

Use the peer reflect-client command to configure the local device as a route reflector and configure a peer/peer group as the route reflector client.

Use the undo peer reflect-client command to cancel the existing configuration.

By default, no route reflector or client is configured.

This command only applies to IBGP peer groups.

Related commands: reflect between-clients, reflector cluster-id.

Examples

# Configure the peer group test as the route reflector client.

<H3C>system-view

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

[H3C] bgp 100

[H3C-bgp] peer test reflect-client

5.1.50  peer route-policy export

Syntax

peer group-name route-policy route-policy-name export

undo peer group-name route-policy route-policy-name export

View

BGP view

Parameters

group-name: Name of peer group, containing 1 to 47 characters.

route-policy-name: The specified Route-policy. The length of route-policy-name argument ranges from 1 to 19 character string.

Description

Use the peer route-policy export command to assign the Route-policy to the routes advertised to the peer group.

Use the undo peer route-policy export command to delete the specified Route-policy.

By default, the peer group has no Route-policy association.

The peer route-policy export command applies to peer groups only.

Related commands: peer route-policy import

Examples

# Apply the Route-policy named test-policy to the route advertised from the peer group named test.

<H3C>system-view

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

[H3C] bgp 100

[H3C-bgp] peer test route-policy test-policy export

5.1.51  peer route-policy import

Syntax

peer { group-name | ip-address } route-policy route-policy-name import

undo peer { group-name | ip-address } route-policy route-policy-name import

View

BGP view

Parameters

group-name: Name of peer group, containing 1 to 47 characters. 

ip-address: IP address of the peer, in dotted decimal notation.

route-policy-name: Specified Route-policy, a string of 1 to 19 characters.

Description

Use the peer route-policy import command to assign the Route-policy to the route coming from the peer/peer group.

Use the undo peer route-policy import command to delete the specified Route-policy.

By default, the peer/peer group has no Route-policy association.

The priority of the ingress routing policy configured for the peer is higher than that for the peer group.

Related commands: peer route-policy export.

Examples

# Apply the Route-policy named test-policy to the route coming from the peer/peer group test.

<H3C>system-view

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

[H3C] bgp 100

[H3C-bgp] peer test route-policy test-policy import

5.1.52  peer route-update-interval

Syntax

peer group-name route-update-interval seconds

undo peer group-name route-update-interval

View

BGP view

Parameters

group-name: Peer group name, containing 1 to 47 characters.

seconds: Minimum interval at which UPDATE packets are sent. It is in the range of 0 to 600 seconds. By default, the advertisement interval is 5 seconds for internal peer group and 30 seconds for external peer group.

Description

Use the peer route-update-interval command to configure the interval at which the same route update packet is sent to the peer group. .

Use the undo peer route-update-interval command to restore the default interval.

Examples

# Configure the interval of the BGP peer group test sending the route update packet as 10 seconds.

<H3C>system-view

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

[H3C] bgp 100

[H3C-bgp] peer test route-update-interval 10

5.1.53  peer timer

Syntax

peer { group-name | ip-address } timer keep-alive keepalive-interval hold holdtime-interval

undo peer { group-name | ip-address } timer

View

BGP view

Parameters

group-name: Name of peer group, containing 1 to 47 characters.

ip-address: IP address of the peer.

keepalive-interval: Keepalive timer in seconds. It is in the range of 1 to 65535 and defaults to 60.

holdtime-interval: Holdtime timer in seconds. It is in the range of 3 to 65535 and defaults to 180.

Description

Use the peer timer command to configure the Keepalive and holdtime timers for a peer/peer group.

Use the undo peer timer command to restore the default value of the timer.

The timer configured by using this command has a higher priority than the one configured by using the timer command.

Examples

# Configure Keepalive and Holdtime intervals of the peer group test.

<H3C>system-view

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

[H3C] bgp 100

[H3C-bgp] peer test timer keep-alive 60 hold 180

5.1.54  preference

Syntax

preference ebgp-value ibgp-value local-value

undo preference

View

BGP view

Parameters

ebgp-value: Preference value for EBGP. It is in the range of 1 to 256 and defaults to 256.

ibgp-value: Preference value for IBGP routes. It is in the range of 1 to 256 and defaults to 256.

local-value: Preference value for locally-originated routes. It is in the range of 1 to 256 and defaults to 130.

Description

Use the preference command to set preference values for the routes learned from external peers, routes learned from internal peers, and local-originated routes.

Use the undo preference command to restore the default preference values.

You can configure preferences for different types of routes of BGP.

Examples

# Set the preferences of EBGP, IBGP and locally generated routes to 170.

<H3C>system-view

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

[H3C] bgp 100

[H3C-bgp] preference 170 170 170

5.1.55  reflect between-clients

Syntax

reflect between-clients

undo reflect between-clients

View

BGP view

Parameters

None

Description

Use the reflect between-clients command to configure the between-client reflection of a route.

Use the undo reflect between-clients command to disable this function.

After a route reflector is configured, it reflects the route of a client to another client.

By default, the clients of a route reflector are not fully interconnected and the route is reflected from a client to another client by default via the route reflector. If the clients are fully interconnected, you do not need to configure route reflection.

Related commands: reflector cluster-id, peer reflect-client.

Examples

# Disable the reflection between clients.

<H3C>system-view

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

[H3C] bgp 100

[H3C-bgp] undo reflect between-clients

5.1.56  reflector cluster-id

Syntax

reflector cluster-id cluster-id

undo reflector cluster-id

View

BGP view

Parameters

cluster-id: Cluster ID of the route reflector, an integer number ranging from 1 to 4294967295, or an IP address in dotted decimal notation.

Description

Use the reflector cluster-id command to configure the cluster ID of the route reflector.

Use the undo reflector cluster-id command to delete the cluster ID of the route reflector.

By default, each route reflector uses its Router ID as the cluster ID.

Generally, there is only one route reflector in a cluster. In this case, Router ID of the route reflector is used to identify the cluster. Setting multiple route reflectors enhances network stability. If multiple route reflectors are in a cluster, use this command to configure the same cluster ID for all the route reflectors to prevent route loop.

Related commands: reflect between-clients, peer reflect-client.

Examples

# A local router is one of the route reflectors in a cluster. Set the cluster ID of the route reflector to 80.

<H3C>system-view

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

[H3C] bgp 100

[H3C-bgp] reflector cluster-id 80

5.1.57  refresh bgp

Syntax

refresh bgp { all | ip-address | group group-name } [ multicast ] { import | export }

View

User view

Parameters

all: Refreshes all peers.

ip-address: Refreshes connection with a specified BGP peer.

group-name: Peer group name, containing 1 to 47 characters.

multicast: Specifies multicast address family.

import: Sends a ROUTE-REFRESH packet to the peer, requesting the peer to refresh the routes.

export: Refreshes routes advertised to the peers.

Description

Use the refresh bgp command to request the peer to resend routes or resend routes to the peer.

After a BGP connection is created, only incremental routes are sent. However, in some cases, such as when BGP routing policy changes, the peer needs to re-advertise routes or to be resent routes so that the routes are filtered again according to the new policy.

Examples

# Refresh all BGP connections.

<H3C> refresh bgp all import

5.1.58  reset bgp

Syntax

reset bgp { all | ip-address | group group-name }

View

User view

Parameters

all: Resets all the BGP connections.

ip-address: Resets connection with a specified BGP peer.

group group-name: Resets the connection with a specified peer group.

Description

Use the reset bgp ip-address command to reset the connection of BGP with a specified BGP peer.

Use the reset bgp all command to reset all the connections with BGP.

Use the reset bgp group group-name command to reset the BGP connection with a specified peer group.

After a BGP routing policy or protocol configuration changes, resetting the BGP connection will make the new configured policy take effect immediately.

Examples

# After using the timer command to configure new Keepalive and Holdtime intervals, you can reset all BGP connections for the new configuration to take effects immediately.

<H3C> reset bgp all

5.1.59  reset bgp dampening

Syntax

reset bgp dampening [ network-address [ mask ] ]

View

User view

Parameters

network-address: IP address of the network segment, in dotted decimal notation.

mask: Network mask.

Description

Use the reset bgp dampening command to reset the flapping attenuation information of a route and release the suppression of a suppressed route.

Related commands: dampening, display bgp routing-table dampened.

Examples

# Reset the route attenuation information of the specified route.

<H3C> reset bgp dampening 20.1.0.0 255.255.0.0

5.1.60  reset bgp flap-info

Syntax

reset bgp flap-info [ regular-expression as-regular-expression | as-path-acl acl-number | ip-address [ mask ] ]

View

User view

Parameters

regular-expression as-regular-expression: Resets the flap-info matching the AS path regular expression.

as-path-acl acl-number: Resets the flap-info in consistency with a specified filter list. The range of the parameter acl-number is 1 to 199.

ip-address: Resets the flap-info of a record at this IP address.

mask: Network mask.

Description

Use the reset bgp flap-info command to reset the flap info of a route.

If no value is specified, the flap info of all routes will be reset.

Related commands: dampening.

Examples

# Reset the flap-info of all the routes that go through filter list 1.

<H3C> reset bgp flap-info as-path-acl 1

5.1.61  reset bgp group

Syntax

reset bgp group group-name

View

User view

Parameters

group-name: Name of the peer group, a string of 1 to 47 characters.

Description

Use the reset bgp group command to reset the connections between the BGP and all the members of a group.

Related commands: peer group.

Examples

# Reset BGP connections of all members from group1.

<H3C> reset bgp group group1

5.1.62  router id

Syntax

router id router-id

undo router id

View

System view

Parameters

router-id: Router ID, in dotted decimal notation.

Description

Use the router id command to configure the ID of a BGP router.

Use the undo router id command to cancel the router ID that has been set.

Examples

# Set the router ID to 10.1.1.3.

<H3C> system-view

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

[H3C] router id 10.1.1.3

5.1.63  summary

Syntax

summary

undo summary

View

BGP view

Parameters

None

Description

Use the summary command to configure auto aggregation of sub-network routes.

Use the undo summary command to disable it.

By default, no auto aggregation of sub-network routes is executed.

After the summary command is used, BGP cannot receive the sub-network routes imported from the IGP, so the amount of the routing information can be reduced.

Examples

# Perform auto aggregation of the sub-network routes.

<H3C>system-view

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

[H3C] bgp 100

[H3C-bgp] summary

5.1.64  timer

Syntax

timer keep-alive keepalive-interval hold holdtime-interval

undo timer

View

BGP view

Parameters

keepalive-interval: Interval time value for keepalive time. The range is 1 to 65535. By default, its value is 60 seconds.

holdtime-interval: Interval time value for hold time. The range is 3 to 65535. By default, its value is 180 seconds.

Description

Use the timer command to configure the Keep-alive and Hold-time timer of BGP.

Use undo timer command to restore the default value of the Keep-alive and Hold-time of the timer.

Examples

# Configure the Keep-alive timer as 120 seconds and Hold-time timer as 360 seconds. 

<H3C>system-view

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

[H3C] bgp 100

[H3C-bgp] timer keepalive 120 hold 360

5.1.65  undo synchronization

Syntax

undo synchronization

View

BGP view

Parameters

None

Description

Use the undo synchronization command to cancel the synchronization of BGP and IGP.

By default, BGP does not synchronize with IGP.

This command means BGP does not synchronize with IGP in current system. You need not configure it because the S7500 series do not support synchronization of BGP and IGP at present.

Examples

# Cancel the synchronization of BGP and IGP.

<H3C>system-view

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

[H3C] bgp 100

[H3C-bgp] undo synchronization

 


Chapter 6  IP Routing Policy Configuration Commands

 

&  Note:

The term “router” in this document refers to a router in a generic sense or an Ethernet switch running routing protocols.

 

6.1  IP Routing Policy Configuration Commands

6.1.1  apply as-path

Syntax

apply as-path as-number-list

undo apply as-path

View

Route policy view

Parameters

as-number-list: AS number list, in the form of as-number&<1-10>. Here, as-number is an AS number, which ranges from 1 to 65535, and &<1-10> means you can input 1 to 10 AS numbers in one command.

Description

Use the apply as-path command to add an AS number before the original AS path in a route-policy.

Use the undo apply as-path command to remove the added AS number.

By default, AS number is not set.

If the route-policy matching conditions are met, AS attributes of the routes to be advertised will be changed by the apply as-path command. A maximum of ten AS numbers can be added.

Examples

# Add AS number 200 before the original AS path

<H3C> system-view

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

[H3C] route-policy 10 permit node 10

[H3C-route-policy] apply as-path 200

6.1.2  apply community

Syntax

apply community { none | [ aa:nn | no-export-subconfed | no-export | no-advertise ]* [ additive ] }

undo apply community

View

Route policy view

Parameters

none: Specifies no community attribute.

aa:nn: Community number. The value ranges of aa and nn are both from 1 to 65535.

no-export-subconfed: Specifies not to advertise matched routes out of the specified sub AS.

no-advertise: Specifies not to advertise matched routes to any peer entities.

no-export: Specifies not to advertise routes out of the specified sub AS or federation, but to send to other sub ASs in the federation.

additive: Specifies community attributes of additional routes.

Description

Use the apply community command to set BGP community attributes in a route-policy.

Use the undo apply community command to remove the setting.

By default, BGP community attributes are not set.

If the route-policy matching conditions are met, BGP community attributes will be changed by the apply community command.

Related commands: ip community-list, if-match community-list, route-policy, display bgp routing-table community.

Examples

# Create a route-policy named setcommunity and set its node sequence number as 16 and match mode as permit. Enter route policy view and set matching conditions and the actions to be executed after the matching conditions are met.

<H3C> system-view

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

[H3C] route-policy 10 permit node 10

[H3C] route-policy setcommunity permit node 16

[H3C-route-policy] if-match as-path 8

[H3C-route-policy] apply community no-export

6.1.3  apply cost

Syntax

apply cost value

undo apply cost

View

Route policy view

Parameters

value: Cost value of a route. The value ranges from 0 to 4,294,967,295.

Description

Use the apply cost command to configure the cost of a route.

Use the undo apply cost command to cancel the apply clause.

By default, no apply clause is defined.

This command is one of the apply clauses of a route-policy used to set the cost of the route passing the filtering.

Related commands: if-match interface, if-match acl, if-match ip-prefix, if-match ip next-hop, if-match cost, if-match tag, route-policy, apply ip next-hop, apply local-preference, apply origin, apply tag.

Examples

# Define an apply clause to set the cost of a route to 120.

<H3C> system-view

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

[H3C] route-policy policy_10 permit node 12

  %New sequence of this list

[H3C-route-policy] apply cost 120

6.1.4  apply cost-type

Syntax

apply cost-type [ internal | external ]

undo apply cost-type

View

Route policy view

Parameters

internal: In BGP, specifies to use IGP cost as BGP MED when BGP peer entity advertises routes to EBGP peer entity; in IS-IS, specifies to use only for IS-IS as an internal cost.

External: Specifies to use only for IS-IS as an external cost.

Description

Use the apply cost-type command to set the cost type for a route.

Use the undo apply cost-type command to cancel the apply clause.

By default, cost is not set.

Examples

# Set IGP cost as BGP MED.

<H3C> system-view

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

[H3C] route-policy 10 permit node 10

[H3C-route-policy] apply cost-type internal

6.1.5  apply ip next-hop

Syntax

apply ip next-hop ip-address

undo apply ip next-hop

View

Route policy view

Parameters

ip-address: IP address of next hop.

Description

Use the apply ip next-hop command to set the next hop for a route .

Use the undo apply ip next-hop command to cancel the apply clause.

By default, no next hop is defined.

This clause is one of the apply clauses of the route-policy used to set the next hop of the route passing the filtering.

Related commands: if-match interface, if-match acl, if-match ip-prefix, if-match ip next-hop, if-match cost, if-match tag, route-policy, apply local-preference, apply cost, apply origin and apply tag.

Examples

# Define an apply clause to set the next hop of the route to 193.1.1.8.

<H3C> system-view

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

[H3C] route-policy 10 permit node 10

[H3C-route-policy] apply ip next-hop 193.1.1.8

6.1.6  apply isis

Syntax

apply isis [ level-1 | level-2 | level-1-2 ]

undo apply isis

View

Route-policy view

Parameters

level-1: Imports routes to level-1 area.

level-2: Imports routes to level-2 area.

level-1-2: Imports routes to both level-1 area and level-2 area.

Description

Use the apply isis command to set the IS-IS area(s) at specified level(s) that routes will be imported to.

Use the undo apply isis command to cancel the apply clause.

By default, no apply clause is defined.

Related commands: if-match interface, if-match acl, if-match ip-prefix, if-match ip next-hop, if-match cost, if-match tag, route-policy, apply cost, apply origin, apply tag.

Examples

# Define an apply clause to import routes to level-2 area.

<H3C> system-view

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

[H3C] route-policy 10 permit node 10

[H3C-route-policy] apply isis level-2

6.1.7  apply local-preference

Syntax

apply local-preference local-preference

undo apply local-preference

View

Route policy view

Parameters

local-preference: local preference, ranging from 0 to 4,294,967,295.

Description

Use the apply local-preference command to set local preference for routing information.

Use the undo apply local-preference command to cancel the apply clause.

Related commands: if-match interface, if-match acl, if-match ip-prefix, if-match ip next-hop, if-match cost, if-match tag, route-policy, apply ip next-hop, apply local-preference, apply origin and apply tag.

Examples

# Define an apply clause to set local preference for routing information to 130.

<H3C> system-view

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

[H3C] route-policy 10 permit node 10

[H3C-route-policy] apply local-preference 130

6.1.8  apply origin

Syntax

apply origin { igp | egp as-number | incomplete }

undo apply origin

View

Route policy view

Parameters

igp: Specifies that BGP routing information source is internal route.

egp: Specifies that BGP routing information source is external route.

as-number: Autonomous system number of an external route. The value ranges from 1 to 65,535.

incomplete: Specifies that BGP routing information source is unknown.

Description

Use the apply origin command to set BGP routing information source.

Use the undo apply origin command to cancel the apply clause.

Related commands: if-match interface, if-match acl, if-match ip-prefix, if-match ip next-hop, if-match cost, if-match tag, route-policy, apply ip next-hop, apply local-preference, apply cost, apply tag.

Examples

# Define an apply clause to specify that the BGP routing information source is igp.

<H3C> system-view

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

[H3C]route-policy 10 permit node 10

[H3C-route-policy] apply origin igp

6.1.9  apply tag

Syntax

apply tag value

undo apply tag

View

Route policy view

Parameters

value: Tag value of route information, ranging from 0 to 4,294,967.295.

Description

Use the apply tag command to set the tag area of RIP or OSPF route information.

Use the undo apply tag command to cancel the apply clause.

Related commands: if-match interface, if-match acl, if-match ip-prefix, if-match ip next-hop, if-match cost, if-match tag, route-policy, apply ip next-hop, apply local-preference, apply cost, apply origin.

Examples

# Define an apply clause to set the tag area of route information to 100.

<H3C> system-view

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

[H3C] route-policy policy_10 permit node 12

  %New sequence of this list

[H3C-route-policy] apply tag 100

6.1.10  display ip ip-prefix

Syntax

display ip ip-prefix [ ip-prefix-name ]

View

Any view

Parameters

ip-prefix-name: Name of the IP address prefix list to be displayed, a string of 1 to 19 characters.

Description

Use the display ip ip-prefix command to display information about the specified IP address prefix list.

If ip-prefix-name is not specified, this command displays information about all IP address prefix lists.

Related commands: ip ip-prefix.

Examples

# Display information about the address prefix list named p1.

<H3C> display ip ip-prefix p1

name                 index   conditions  ip-prefix / mask    GE  LE

p1                   10      permit      10.1.0.0/16         17  18

Table 6-1 Description on the fields of the display ip ip-prefix command

Field

Description

name

Name of ip-prefix

index

Internal sequence number of ip-prefix

conditions

Mode: permit or deny

ip-prefix / mask

Address and mask of ip-prefix

GE

Threshold that ip-prefix mask is greater than or equal to

LE

Threshold that ip-prefix mask is less than or equal to

 

6.1.11  display route-policy

Syntax

display route-policy [ route-policy-name ]

View

Any view

Parameters

route-policy-name: Name of the route-policy to be displayed, a string of 1 to 19 characters.

Description

Use the display route-policy command to display information about the specified route policy.

If route-policy-name is not specified, this command displays information about all route policies.

Related commands: route-policy.

Examples

# Display information about route-policy policy1.

<H3C> display route-policy policy1

Route-policy : policy1

  Permit 10 : if-match (prefixlist) p1

              apply cost 100

              matched : 0     denied : 0

Table 6-2 Description on the fields of the display route-policy command

Field

Description

Route-policy

Name of the route policy

Permit 10

Information about the route-policy with the mode configured as permit and the node as 10:

if-match (prefixlist) p1

Matching conditions

apply cost 100

Apply the cost of 100 to routes meeting the matching conditions set by the if-match clause

matched

Number of routes matching the conditions set by the if-match clause

denied

Number of routes not matching the conditions set by the if-match statement

 

6.1.12  if-match { acl | ip-prefix }

Syntax

if-match { acl acl-number | ip-prefix ip-prefix-name }

undo if-match { acl | ip-prefix }

View

Route policy view

Parameters

acl-number: Number of the ACL used for filtering.

ip-prefix-name: Name of the address prefix list used for filtering, a string of  to 19 characters.

Description

Use the if-match { acl | ip-prefix } command to configure a matching rule for the route- policy and specify an IP address range.

Use the undo if-match { acl | ip-prefix } command to remove the setting.

The if-match { acl | ip-prefix } command references an ACL or a address prefix list for filtering.

Related commands: if-match interface, if-match ip next-hop, if-match cost, if-match tag, route-policy, apply ip next-hop, apply cost, apply local-preference, apply origin, apply tag.

Examples

# Define an if-match clause, allowing route information filtered by route destination address through the address prefix list p1 to pass the if-match clause.

<H3C> system-view

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

[H3C] route-policy policy_10 permit node 12

  %New sequence of this list

[H3C-route-policy] if-match ip-prefix p1

6.1.13  if-match as-path

Syntax

if-match as-path as-path-number

undo if-match as-path

View

Route policy view

Parameters

as-path-number: AS path number, ranging from 1 to 199.

Description

Use the if-match as-path command to match the AS path field of BGP routing information.

Use the undo if-match as-path command to remove the configuration.

By default, AS regular expression is not set for matching in the route-policy.

This clause is one of the if-match clauses of the route policy used to set AS path attributes as matching conditions to filter BGP routing information.

Examples

# Create an AS path named 2, which permits the routing information of AS 200 and AS 300. Then create a route-policy named test, and define an if-match clause quoting the definitions of AS path 2 for node 10 of the route-policy.

<H3C> system-view

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

[H3C] ip as-path-acl 2 permit 200:300

[H3C] route-policy test permit node 10

[H3C-route-policy] if-match as-path 2

6.1.14  if-match community

Syntax

if-match community { basic-community-list-number [ whole-match ] | adv-community-list-number }

undo if-match community

View

Route policy view

Parameters

basic-community-list-number: Basic community list number, ranging from 1 to 99.

adv-community-list-number: Advanced community list number, ranging from 100 to 199.

whole-match: Exact match, which means that all communities must be displayed.

Description

Use the if-match community command to match community attributes of BGP routing information.

Use the undo if-match community command to remove the configuration.

Be default, community attributes are not set for matching.

This clause is one of the if-match clauses of the route policy used to set community attributes as matching conditions to filter BGP routing information.

Related commands: route-policy, ip community-list.

Examples

# Create a community list named 1, which permits routing information of AS 100 and AS 200. Then create a route-policy named test and define an if-match clause quoting the definitions of community list 1 for node 10 of the route-policy.

<H3C> system-view

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

[H3C] ip community-list 1 permit 100:200

[H3C] route-policy test permit node 10

[H3C-route-policy] if-match community 1

6.1.15  if-match cost

Syntax

if-match cost value

undo if-match cost

View

Route policy view

Parameters

value: Route cost value, ranging from 0 to 4,294,967,295.

Description

Use the if-match cost command to configure a match rule for the route-policy to match the cost of routing information.

Use the undo if-match cost command to remove the configuration.

By default, no if-match clause is defined.

This clause is one of the if-match clauses of the route-policy used to specify the route cost of the routing information meeting the matching conditions.

Related commands: if-match interface, if-match acl, if-match ip-prefix, if-match ip next-hop, if-match tag, route-policy, apply ip next-hop, apply cost, apply local-preference, apply origin, apply tag.

Examples

# Define an if-match clause, allowing the routing information with the routing cost of 8 to pass this if-match clause.

<H3C> system-view

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

[H3C] route-policy policy permit node 1

  %New sequence of this list

[H3C-route-policy] if-match cost 8

6.1.16  if-match interface

Syntax

if-match interface { interface-type interface-number }

undo if-match interface

View

Route policy view

Parameters

interface-type: Interface type.

interface-number: Interface number.

Description

Use the if-match interface command to match the route whose next hop is the designated interface.

Use the undo if-match interface command to remove the configuration.

By default, no if-match clause is defined.

This clause is one of the if-match clauses of the route-policy used to match the interface corresponding to the next hop of the route.

Related commands: if-match acl, if-match ip-prefix, if-match ip next-hop, if-match cost, if-match tag, route-policy, apply ip next-hop, apply cost, apply local-preference, apply origin, apply tag.

Examples

# Define an if-match clause to match the route whose next hop interface is VLAN-interface 1.

<H3C> system-view

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

[H3C] route-policy policy permit node 1

  %New sequence of this list

[H3C-route-policy] if-match interface Vlan-interface 1

6.1.17  if-match ip next-hop

Syntax

if-match ip next-hop { acl acl-number | ip-prefix ip-prefix-name }

undo if-match ip next-hop [ ip-prefix ]

View

Route policy view

Parameters

acl-number: Number of the ACL used for filtering, ranging from 2,000 to 2,999.

ip-prefix-name: Name of the prefix address list used for filtering.

Description

Use the if-match ip next-hop command to configure a match rule for the route-policy to match the next hop address of routing information.

Use the undo if-match ip next-hop command to remove the configuration of using an ACL to match the next hop address of routing information.

Use the undo if-match ip next-hop ip-prefix command to remove the configuration of using an ip-prefix list to match the next hop address of routing information.

By default, no if-match clause is defined.

This clause is one of the if-match clauses of the route-policy used to specify the next hop address matching the routing information. It performs filter by referencing an ACL or an ip-prefix list.

Related commands: if-match interface, if-match acl,  if-match ip-prefix, if-match cost, if-match tag, route-policy, apply ip next-hop, apply cost, apply local-preference, apply origin, apply tag.

Examples

# Define an if-match clause. It permits the routing information whose next hop address filtered through ip-prefix list p1 to pass this if-match clause.

<H3C> system-view

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

[H3C] route-policy policy permit node 1

  %New sequence of this list

[H3C-route-policy] if-match ip next-hop ip-prefix p1

6.1.18  if-match tag

Syntax

if-match tag value

undo if-match tag

View

Route policy view

Parameters

value: Tag field value, ranging from 0 to 4,294,967,295.

Description

Use the if-match tag command to match the tag field of routing information.

Use the undo if-match tag command to remove the matching rule.

Related commands: if-match interface, if-match acl,  if-match ip-prefix, if-match ip next-hop, if-match cost, route-policy, apply ip next-hop, apply cost, apply local-preference, apply origin, apply tag.

Examples

# Define an if-match clause. It permits the OSPF route information whose tag value is 8 to pass the if-match clause.

<H3C> system-view

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

[H3C] route-policy policy permit node 1

  %New sequence of this list

[H3C-route-policy] if-match tag 8

6.1.19  ip as-path-acl

Syntax

ip as-path-acl acl-number { permit | deny } as-regular-expression

undo ip as-path-acl acl-number

View

System view

Parameters

acl-number: AS path list number, ranging from 1 to 199.

as-regular-expression: AS path regular expression.

Description

Use the ip as-path-acl command to configure an AS regular expression.

Use the undo ip as-path-acl command to remove the configuration.

The defined AS path list can be used in BGP policy.

Related commands: peer as-path-acl, display bgp routing-table as-path-acl.

Examples

# Configure an AS path list

<H3C> system-view

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

[H3C] ip as-path-acl 10 permit 200,300

6.1.20  ip community-list

Syntax

ip community-list basic-comm-list-number { permit | deny } [ aa:nn | internet | no-export-subconfed | no-advertise | no-export ]*

ip community-list adv-comm-list-number { permit | deny } comm-regular-expression

undo ip community-list { basic-comm-list-number | adv-comm-list-number }

View

System view

Parameters

basic-comm-list-number: Basic community list number, ranging from 1 to 99.

adv-comm-list-number: Advanced community list number, ranging from 100 to 199.

permit: Specifies to allow access to matching conditions.

deny: Specifies to deny access to matching conditions.

aa:nn: Community number. The value ranges of aa and nn are both from 1 to 65,535.

internet: Specifies to advertise all routes.

no-export-subconfed: Specifies not to send matched routes out of the specified sub AS.

no-advertise: Specifies not to send matched routes to any peer entities.

no-export: Specifies not to send routes out of the specified sub AS or a federation but to send to the other sub ASs in the federation.

comm-regular-expression: Community attribute in regular expression form.

Description

Use the ip community-list command to set a BGP community list.

Use the undo ip community-list command to remove the configuration.

The defined community list can be used in BGP policy.

Related commands: apply community, display bgp routing-table community-list.

Examples

# Define a community list, and specify not to send the routes with the community attributes out of the local autonomous system.

<H3C> system-view

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

[H3C] ip community-list 6 permit no-export-subconfed

6.1.21  ip ip-prefix

Syntax

ip ip-prefix ip-prefix-name [ index index-number ] { permit | deny } network len [ greater-equal greater-equal | less-equal less-equal ] *

undo ip ip-prefix ip-prefix-name [ index index-number | permit | deny ]

View

System view

Parameters

ip-prefix-name: Name of the ip-prefix list, a string of 1 to 19 characters. It identifies an ip-prefix list uniquely.

index-number: Identifier of an item in the ip-prefix list. The item with a smaller index-number will be tested first.

permit: Specifies the match mode of the defined ip-prefix list items as permit mode. If the permit mode is specified and the IP address to be filtered is in the ip-prefix range specified by the item, the item is filtered through and the next item is not tested. If the IP address to be filtered is not in the ip-prefix range specified by the item, the next item is tested

deny: Specifies the match mode of the defined ip-prefix list items as deny mode. If the deny mode is specified and the IP address to be filtered is in the ip-prefix range specified by the item, the item is not filtered through and the next item is not tested; otherwise, the next item is tested.

network: IP address prefix range (IP address). 0.0.0.0 0 means all IP addresses are matched.

len: IP address prefix range (mask length). 0.0.0.0 0 means all IP addresses are matched.

greater-equal, less-equal: Address prefix range [greater-equal, less-equal] to be matched after the network len has been matched. The meaning of greater-equal is "greater than and equal to" , and the meaning of less-equal is "less than and equal to". The range is len <= greater-equal <= less-equal <= 32. When only greater-equal is used, it denotes the prefix range [greater-equal, 32]. When only less-equal is used, it denotes the prefix range [len, less-equal].

Description

Use the ip ip-prefix command to configure an ip-prefix list or one of its items.

Use the undo ip ip-prefix command to remove an ip-prefix list or one of its items.

An ip-prefix list is used for IP address filtering. An ip-prefix list may contain several items, and each item specifies one address prefix range. The inter-item filtering relation is "OR". That is, passing an item means filtering through this ip-prefix list. Passing no item means not filtering through this ip-prefix list.

The address prefix range may contain two parts, which are determined by len and [greater-equal, less-equal], respectively. If the prefix ranges of these two parts are both specified, the IP address to be filtered must match the prefix ranges of these two parts.

If you specify network len as 0.0.0.0 0, this command matches the default route only.

Examples

# Define an ip-prefix named p1 to permit only the routes whose mask lengths are 17 or 18 on network segment 10.0.192.0 8 to pass.

<H3C> system-view

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

[H3C] ip ip-prefix p1 permit 10.0.192.0 8 greater-equal 17 less-equal 18

6.1.22  route-policy

Syntax

route-policy route-policy-name { permit | deny } node { node-number }

undo route-policy route-policy-name [ permit | deny | node node-number ]

View

System view

Parameters

route-policy-name: Name of the route-policy, a string of 1 to 19 characters. It identifies a route-policy uniquely.

permit: Specifies the match mode of the nodes in the defined route-policy as permit mode. When a route meets all the if-match clauses of a node, the system executes the apply clauses of the node but does not perform the match test of the next node. If not, the system goes on the match test against the next node.

deny: Specifies the match mode of the nodes in the defined route-policy as deny mode. When a route meets all the if-match clauses of a node, the system considers that the route fails to pass through the node and does not take the match test of the next node.

node: Specifies a node of the route-policy.

node-number: Index of the node in the route-policy. When this route-policy is used for filtering routing information, the node with smaller node-number will be tested first.

Description

Use the route-policy command to create a route-policy and enter route-policy view.

Use the undo route-policy command to delete the created route-policy.

By default, no route-policy is defined.

Route policies are used for route information filtering or policy routing. A route-policy comprises multiple nodes and each node comprises some if-match clauses and apply clauses.

An if-match clause defines match rules of a node. An apply clause defines the actions to be taken after a route passes the match test of a node. The filtering relationship between the if-match clauses of the node is "and". That is, all if-match clauses of a node must be met.

The filtering relation between nodes of a route-policy is "OR". That is, passing the filter of one node means passing the filter of the route-policy.

Related commands: if-match interface, if-match acl,  if-match ip-prefix, if-match ip next-hop, if-match cost, if-match tag, apply ip next-hop, apply local-preference, apply cost, apply origin, apply tag.

Examples

# Configure a route-policy named policy_10, with the node number of 12 and the match mode of permit, and enter route-policy view.

<H3C>system-view

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

[H3C]route-policy policy_10 permit node 12

  %New sequence of this list

[H3C-route-policy]


Chapter 7  Route Capacity Configuration Commands

 

&  Note:

The term “router” in this document refers to a router in a generic sense or an Ethernet switch running routing protocols.

 

7.1  Route Capacity Configuration Commands

7.1.1  display memory

Syntax

display memory [ slot slotnumber ]

View

Any view

Parameters

slotnumber: Number of the slot whose route capacity information is displayed.

Description

Use the display memory command to display the memory setting.

Examples

# Display the current memory setting of the switch.

<H3C> display memory

System Total Memory(bytes): 203563008

Total Used Memory(bytes): 77852012

Used Rate: 38%

The following table shows describes the fields of the command:

Table 7-1 Description on the fields of the display memory command

Field

Description

System Total Memory(bytes)

Total memory size (in bytes) of the switch

Total Used Memory(bytes)

Occupied memory size (in bytes) of the switch

Used Rate

Memory occupation rate

 

7.1.2  display memory limit

Syntax

display memory limit

View

Any view

Parameters

None

Description

Use the display memory limit command to display the memory setting and status information related to route capacity.

This command displays the current configuration information, free memory, and status information about connections, such as times of disconnection, times of reconnection, and whether the current status is emergent.

Examples

# Display the current memory setting and status information.

<H3C> display memory limit

Current memory limit configuration information:

  system memory safety: 40 (MBytes)

  system memory limit: 30 (MBytes)

  auto-establish enabled

 

Free Memory: 125705152 (Bytes)

 

The state information about connection:

  The times of disconnect: 0

  The times of reconnect: 0

  The current state: Normal

The information displayed above includes Ethernet switch memory limit, size of free memory, times of disconnection, times of reconnection, and the current status.

The following table describes the fields of the command:

Table 7-2 Description on the fields of the display memory limit command

Field

Description

system memory safety

Safety value of the switch memory

system memory limit

Lower limit of the switch memory

auto-establish enabled

Automatic connection recovery is enabled (If automatic connection recovery is disabled, "auto-establish disabled" is displayed)

Free Memory

Size of the current free memory in bytes

The times of disconnect: 0

The times of disconnection of the routing protocol is 0.

The times of reconnect: 0

The times of reconnection of the routing protocol is 0.

The current state: Normal

The current status is normal (If the current status is emergent, "Exigence" is displayed).

 

7.1.3  memory auto-establish disable

Syntax

memory auto-establish disable

View

System view

Parameters

None

Description

Use the memory auto-establish disable command to disable the automatic recovery of routing protocol connections (even if the free memory recovers to the safety value).

By default, when the free memory of a switch recovers to the safety value, connections of all the routing protocols will always recover (when the free memory of the switch decreases to a lower limit, the connections will be disconnected forcibly).

After this command is used, connections of all the routing protocols will not recover when the free memory of the switch recovers to a safety value. In this case, you need to restart the routing protocol to recover the connections.

Use this command with caution.

Related commands: memory auto-establish enable, memory { safety | limit }, display memory limit.

Examples

# Disable automatic recovery of the routing protocol connections when the free memory of the current switch recovers.

<H3C> system-view

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

[H3C] memory auto-establish disable

7.1.4  memory auto-establish enable

Syntax

memory auto-establish enable

View

System view

Parameters

None

Description

Use the memory auto-establish enable command to enable automatic recovery of routing protocol connections when the free memory of the switch recovers to the specified value.

By default, when the free memory of a switch recovers to the safety value, connections of all the routing protocols will always recover (when the free memory of the switch decreases to a lower limit, the connections will be disconnected forcibly).

You can use the memory auto-establish disable command to disable the automatic recovery function, and use the memory auto-establish enable command to re-enable the function.

By default, this function is enabled.

Related commands: memory auto-establish disable, memory { safety | limit }, display memory limit.

Examples

# Enable automatic recovery of the connections of all the routing protocols when the free memory of the current switch recovers.

<H3C> system-view

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

[H3C] memory auto-establish enable

7.1.5  memory { safety | limit }*

Syntax

memory { safety safety-value | limit limit-value }*

undo memory [ safety | limit ]

View

System view

Parameters

safety-value: Safety value of the switch free memory, in Mbytes. Its value range depends on the free memory of the current switch.

limit-value: Lower limit of the switch free memory, in Mbytes. Its value range depends on the free memory of the current switch.

Description

Use the memory limit limit-value command to configure the lower limit of the switch free memory.

When the free memory of a switch is less than the specified value, all the routing protocol connections will be disconnected forcibly. The limit-value argument in the command must be less than the current free memory safety value; otherwise, the configuration fails.

Use the memory safety safety-value command to configure the safety value of the switch free memory.

If you use the memory auto-establish enable command (the default configuration), the routing protocol connection that has been forcibly disconnected automatically recovers when the free memory of the switch reaches this value. The safety-value argument in the command must be greater than the current free memory lower limit; otherwise, the configuration fails.

Use the memory safety safety-value limit limit-value command to change both the safety value and lower limit of the switch free memory. The value of safety-value must be greater than that of limit-value; otherwise, the configuration fails.

Use the undo memory command to restore the default safety value and lower limit of the switch free memory.

Related commands: memory auto-establish disable, memory auto-establish enable, display memory limit.

Examples

# Set the lower limit of the switch free memory to 2 MB and the safety value to 4 MB.

<H3C> system-view

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

[H3C] memory safety 4 limit 2

 

  • 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 Resources
  • Partner Business Management
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网