display ospf routing

HP 5920 & 5900 Switch Series
Layer 3 - IP Routing
Command Reference
Part number: 5998-2884
Software version: Release2207
Document version: 6W100-20121130
Legal and notice information
© Copyright 2012 Hewlett-Packard Development Company, L.P.
No part of this documentation may be reproduced or transmitted in any form or by any means without
prior written consent of Hewlett-Packard Development Company, L.P.
The information contained herein is subject to change without notice.
HEWLETT-PACKARD COMPANY MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS
MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. Hewlett-Packard shall not be liable for errors contained
herein or for incidental or consequential damages in connection with the furnishing, performance, or
use of this material.
The only warranties for HP products and services are set forth in the express warranty statements
accompanying such products and services. Nothing herein should be construed as constituting an
additional warranty. HP shall not be liable for technical or editorial errors or omissions contained
herein.
Contents
Basic IP routing commands ········································································································································· 1 display ip routing-table ············································································································································ 1 display ip routing-table acl ······································································································································ 4 display ip routing-table ip-address ·························································································································6 display ip routing-table prefix-list ···························································································································· 8 display ip routing-table protocol ····························································································································· 9 display ip routing-table statistics ·························································································································· 11 display ipv6 routing-table ····································································································································· 12 display ipv6 routing-table acl······························································································································· 15 display ipv6 routing-table ipv6-address ·············································································································· 16 display ipv6 routing-table prefix-list····················································································································· 19 display ipv6 routing-table protocol······················································································································ 20 display ipv6 routing-table statistics ······················································································································ 21 display max-ecmp-num ········································································································································· 22 max-ecmp-num ······················································································································································· 23 reset ip routing-table statistics protocol ··············································································································· 23 reset ipv6 routing-table statistics protocol ··········································································································· 24 Static routing commands ··········································································································································· 25 delete static-routes all ············································································································································ 25 ip route-static ·························································································································································· 25 ip route-static default-preference ·························································································································· 28 RIP commands ···························································································································································· 29 checkzero ······························································································································································· 29 default cost ····························································································································································· 29 default-route ··························································································································································· 30 display rip ······························································································································································ 31 display rip database ············································································································································· 32 display rip interface ·············································································································································· 33 display rip route ···················································································································································· 35 fast-reroute ······························································································································································ 36 filter-policy export ·················································································································································· 37 filter-policy import ·················································································································································· 38 graceful-restart ······················································································································································· 40 host-route ································································································································································ 40 import-route ···························································································································································· 41 maximum load-balancing ····································································································································· 42 network ··································································································································································· 43 output-delay ···························································································································································· 43 preference ······························································································································································ 44 reset rip process ···················································································································································· 45 reset rip statistics···················································································································································· 45 rip ············································································································································································ 45 rip authentication-mode ········································································································································ 46 rip bfd enable ························································································································································ 47 rip default-route······················································································································································ 48 rip input ·································································································································································· 49 rip metricin ····························································································································································· 49 rip metricout ··························································································································································· 50 i
rip output ································································································································································ 51 rip poison-reverse ·················································································································································· 52 rip split-horizon ······················································································································································ 52 rip summary-address ············································································································································· 53 rip version ······························································································································································ 53 silent-interface ························································································································································ 54 summary ································································································································································· 55 timers ······································································································································································ 56 validate-source-address ········································································································································· 57 version ···································································································································································· 57 OSPF commands ························································································································································ 59 abr-summary (OSPF area view) ··························································································································· 59 area (OSPF view) ·················································································································································· 59 asbr-summary ························································································································································· 60 authentication-mode ·············································································································································· 61 bandwidth-reference (OSPF view) ······················································································································· 62 default ····································································································································································· 62 default-cost (OSPF area view) ······························································································································ 63 default-route-advertise (OSPF view) ····················································································································· 64 description (OSPF/OSPF area view)··················································································································· 65 display ospf abr-asbr ············································································································································ 66 display ospf asbr-summary ··································································································································· 67 display ospf brief ··················································································································································· 68 display ospf cumulative ········································································································································ 71 display ospf error ·················································································································································· 73 display ospf graceful-restart ································································································································· 75 display ospf interface ············································································································································ 77 display ospf lsdb ··················································································································································· 79 display ospf peer ··················································································································································· 82 display ospf peer statistics ···································································································································· 84 display ospf request-queue ··································································································································· 85 display ospf retrans-queue···································································································································· 86 display ospf routing··············································································································································· 87 display ospf vlink ··················································································································································· 90 display router id ···················································································································································· 90 enable link-local-signaling ···································································································································· 91 enable out-of-band-resynchronization ················································································································· 91 fast-reroute (OSPF view)········································································································································ 92 filter (OSPF area view) ·········································································································································· 93 filter-policy export (OSPF view) ···························································································································· 94 filter-policy import (OSPF view) ···························································································································· 95 graceful-restart (OSPF view) ································································································································· 96 graceful-restart helper enable ······························································································································ 97 graceful-restart helper strict-lsa-checking ············································································································· 98 graceful-restart interval (OSPF view) ··················································································································· 98 host-advertise ························································································································································· 99 import-route (OSPF view) ···································································································································· 100 ispf enable···························································································································································· 101 log-peer-change ··················································································································································· 102 lsa-arrival-interval················································································································································· 102 lsdb-overflow-interval ··········································································································································· 103 lsa-generation-interval ········································································································································· 104 lsdb-overflow-limit ················································································································································ 104 maximum load-balancing (OSPF view) ············································································································· 105 ii
network (OSPF area view)·································································································································· 106 nssa ······································································································································································· 106 opaque-capability enable ··································································································································· 107 ospf ······································································································································································· 108 ospf authentication-mode···································································································································· 109 ospf bfd enable ··················································································································································· 110 ospf cost ······························································································································································· 111 ospf dr-priority ····················································································································································· 111 ospf fast-reroute lfa-backup ································································································································ 112 ospf mib-binding ·················································································································································· 113 ospf mtu-enable···················································································································································· 113 ospf network-type ················································································································································ 114 ospf timer dead ··················································································································································· 115 ospf timer hello ···················································································································································· 115 ospf timer poll ······················································································································································ 116 ospf timer retransmit ············································································································································ 117 ospf trans-delay ··················································································································································· 117 peer ······································································································································································· 118 preference ···························································································································································· 119 reset ospf counters ··············································································································································· 120 reset ospf process ················································································································································ 120 reset ospf redistribution ······································································································································· 121 rfc1583 compatible ············································································································································ 121 router id ································································································································································ 122 silent-interface (OSPF view) ································································································································ 123 snmp-agent trap enable ospf······························································································································ 123 snmp trap rate-limit ·············································································································································· 125 spf-schedule-interval ············································································································································ 125 stub (OSPF area view) ········································································································································ 126 stub-router ····························································································································································· 127 transmit-pacing ···················································································································································· 128 vlink-peer (OSPF area view) ······························································································································· 128 IS-IS commands ······················································································································································· 131 area-authentication-mode ··································································································································· 131 auto-cost enable··················································································································································· 132 bandwidth-reference (IS-IS view)························································································································ 133 circuit-cost ····························································································································································· 133 cost-style ······························································································································································· 134 default-route-advertise (IS-IS view) ····················································································································· 135 display isis brief··················································································································································· 136 display isis graceful-restart status ······················································································································· 137 display isis interface ············································································································································ 139 display isis lsdb ··················································································································································· 141 display isis name-table ········································································································································ 144 display isis peer ··················································································································································· 145 display isis redistribute ······································································································································· 148 display isis route ·················································································································································· 149 display isis statistics············································································································································· 152 domain-authentication-mode ······························································································································ 154 fast-reroute ···························································································································································· 155 filter-policy export ················································································································································ 156 filter-policy import ················································································································································ 157 flash-flood ····························································································································································· 158 graceful-restart ····················································································································································· 159 iii
graceful-restart suppress-sa ································································································································· 160 graceful-restart t1 ················································································································································· 160 graceful-restart t2 ················································································································································· 161 graceful-restart t3 ················································································································································· 162 import-route ·························································································································································· 163 import-route isis level-1 into level-2 ···················································································································· 164 import-route isis level-2 into level-1 ···················································································································· 165 import-route limit ·················································································································································· 166 isis ········································································································································································· 167 isis authentication-mode······································································································································ 168 isis bfd enable ····················································································································································· 169 isis circuit-level ····················································································································································· 169 isis circuit-type p2p·············································································································································· 170 isis cost ································································································································································· 171 isis dis-name ························································································································································· 172 isis dis-priority ······················································································································································ 172 isis enable ···························································································································································· 173 isis peer-ip-ignore ················································································································································ 174 isis silent ······························································································································································· 174 isis small-hello ······················································································································································ 175 isis timer csnp ······················································································································································ 175 isis timer hello ······················································································································································ 176 isis timer holding-multiplier ································································································································· 177 isis timer lsp·························································································································································· 178 ispf enable···························································································································································· 179 is-level ··································································································································································· 180 is-name·································································································································································· 180 is-name map ························································································································································· 181 log-peer-change ··················································································································································· 181 lsp-fragments-extend ············································································································································ 182 lsp-length originate ·············································································································································· 183 lsp-length receive ················································································································································· 183 maximum load-balancing (IS-IS view) ··············································································································· 184 network-entity ······················································································································································· 185 preference ···························································································································································· 186 priority ·································································································································································· 186 reset isis all ··························································································································································· 187 reset isis peer ······················································································································································· 188 set-overload ·························································································································································· 188 summary (IS-IS view) ··········································································································································· 189 timer lsp-generation ············································································································································· 190 timer lsp-max-age ················································································································································ 191 timer lsp-refresh ···················································································································································· 192 timer spf ································································································································································ 192 virtual-system ························································································································································ 193 BGP commands ······················································································································································· 195 advertise-rib-active ··············································································································································· 195 aggregate····························································································································································· 195 balance ································································································································································· 198 bestroute as-path-neglect ···································································································································· 199 bestroute compare-med ······································································································································ 200 bestroute med-confederation ······························································································································ 201 bgp········································································································································································ 202 compare-different-as-med ···································································································································· 203 iv
confederation id ·················································································································································· 203 confederation nonstandard ································································································································ 205 confederation peer-as ········································································································································· 205 dampening ··························································································································································· 206 default local-preference ······································································································································ 207 default med ·························································································································································· 208 default-route imported ········································································································································· 209 display bgp dampening parameter ipv4 unicast····························································································· 211 display bgp dampening parameter ipv6 unicast····························································································· 211 display bgp group ipv4 unicast ························································································································· 212 display bgp group ipv6 unicast ························································································································· 214 display bgp network ··········································································································································· 216 display bgp paths················································································································································ 218 display bgp peer ipv4 unicast ··························································································································· 219 display bgp peer ipv6 unicast ··························································································································· 222 display bgp routing-table dampened ipv4 unicast ·························································································· 226 display bgp routing-table dampened ipv6 unicast ·························································································· 227 display bgp routing-table flap-info ipv4 unicast ······························································································· 228 display bgp routing-table flap-info ipv6 unicast ······························································································· 230 display bgp routing-table ipv4 unicast ·············································································································· 232 display bgp routing-table ipv4 unicast advertise-info ······················································································ 235 display bgp routing-table ipv4 unicast as-path-acl ·························································································· 236 display bgp routing-table ipv4 unicast community-list ····················································································· 237 display bgp routing-table ipv4 unicast peer ····································································································· 238 display bgp routing-table ipv4 unicast statistics······························································································· 240 display bgp routing-table ipv6 unicast ·············································································································· 241 display bgp routing-table ipv6 unicast as-path-acl ·························································································· 244 display bgp routing-table ipv6 unicast community-list ····················································································· 245 display bgp routing-table ipv6 unicast peer ····································································································· 246 display bgp routing-table ipv6 unicast statistics······························································································· 248 ebgp-interface-sensitive ······································································································································· 248 filter-policy export ················································································································································ 249 filter-policy import ················································································································································ 251 graceful-restart ····················································································································································· 252 graceful-restart timer restart ································································································································ 253 graceful-restart timer wait-for-rib ························································································································ 254 group ···································································································································································· 255 ignore-first-as ························································································································································ 256 import-route ·························································································································································· 257 ip vpn-instance (BGP view) ································································································································· 259 ipv4-family ···························································································································································· 259 ipv6-family ···························································································································································· 260 log-peer-change ··················································································································································· 261 network ································································································································································· 262 network short-cut ·················································································································································· 263 peer advertise-community ··································································································································· 264 peer advertise-ext-community ····························································································································· 266 peer allow-as-loop ··············································································································································· 267 peer as-number (for a BGP peer) ······················································································································· 268 peer as-number (for a BGP peer group) ··········································································································· 269 peer as-path-acl ··················································································································································· 270 peer bfd ································································································································································ 272 peer capability-advertise conventional ············································································································· 273 peer capability-advertise route-refresh ·············································································································· 274 v
peer capability-advertise suppress-4-byte-as ···································································································· 275 peer connect-interface ········································································································································· 276 peer default-route-advertise ································································································································ 277 peer description ··················································································································································· 279 peer ebgp-max-hop ············································································································································· 279 peer enable ·························································································································································· 280 peer fake-as·························································································································································· 282 peer filter-policy ··················································································································································· 283 peer group ··························································································································································· 285 peer ignore ·························································································································································· 286 peer keep-all-routes ············································································································································· 287 peer low-memory-exempt ···································································································································· 289 peer next-hop-local ·············································································································································· 290 peer password ····················································································································································· 291 peer preferred-value ············································································································································ 292 peer prefix-list ······················································································································································ 293 peer public-as-only ·············································································································································· 295 peer reflect-client ················································································································································· 296 peer route-limit ····················································································································································· 297 peer route-policy ·················································································································································· 299 peer route-update-interval ··································································································································· 300 peer substitute-as ················································································································································· 301 peer timer ····························································································································································· 302 preference ···························································································································································· 303 reflect between-clients ········································································································································· 304 reflector cluster-id················································································································································· 305 refresh bgp ipv4 unicast ····································································································································· 307 refresh bgp ipv6 unicast ····································································································································· 308 reset bgp all ························································································································································· 309 reset bgp dampening ipv4 unicast ···················································································································· 309 reset bgp dampening ipv6 unicast ···················································································································· 310 reset bgp flap-info ipv4 unicast ························································································································· 311 reset bgp flap-info ipv6 unicast ························································································································· 312 reset bgp ipv4 unicast ········································································································································ 312 reset bgp ipv6 unicast ········································································································································ 313 router id ································································································································································ 314 router-id ································································································································································ 315 summary automatic ············································································································································· 316 timer ······································································································································································ 316 Policy-based routing commands····························································································································· 319 apply next-hop ····················································································································································· 319 display ip policy-based-route ····························································································································· 319 display ip policy-based-route interface ············································································································· 320 display ip policy-based-route setup ··················································································································· 322 if-match acl ··························································································································································· 323 ip policy-based-route ··········································································································································· 323 policy-based-route ··············································································································································· 324 reset ip policy-based-route statistics ··················································································································· 325 IPv6 static routing commands ································································································································· 326 delete ipv6 static-routes all ································································································································· 326 ipv6 route-static···················································································································································· 326 ipv6 route-static default-preference ···················································································································· 328 vi
RIPng commands ····················································································································································· 330 checkzero ····························································································································································· 330 default cost ··························································································································································· 330 display ripng ························································································································································ 331 display ripng database······································································································································· 332 display ripng interface ········································································································································ 333 display ripng route ·············································································································································· 334 filter-policy export ················································································································································ 335 filter-policy import ················································································································································ 336 graceful-restart ····················································································································································· 337 import-route ·························································································································································· 338 maximum load-balancing ··································································································································· 338 preference ···························································································································································· 339 reset ripng process ·············································································································································· 340 reset ripng statistics ············································································································································· 340 ripng ····································································································································································· 341 ripng default-route ··············································································································································· 341 ripng enable ························································································································································ 342 ripng metricin ······················································································································································· 343 ripng metricout ····················································································································································· 343 ripng poison-reverse ············································································································································ 344 ripng split-horizon················································································································································ 344 ripng summary-address ······································································································································· 345 timers ···································································································································································· 345 OSPFv3 commands ················································································································································· 347 abr-summary (OSPFv3 area view) ····················································································································· 347 area ······································································································································································ 347 bandwidth-reference ··········································································································································· 348 default-cost (OSPFv3 area view) ························································································································ 349 default-route-advertise (OSPF view) ··················································································································· 349 display ospfv3 abr-asbr ······································································································································ 351 display ospfv3 brief ············································································································································ 351 display ospfv3 graceful-restart status ················································································································ 353 display ospfv3 interface ····································································································································· 354 display ospfv3 lsdb ············································································································································· 356 display ospfv3 peer ············································································································································ 359 display ospfv3 request-queue ····························································································································· 361 display ospfv3 retrans-queue ····························································································································· 363 display ospfv3 routing ········································································································································ 364 display ospfv3 statistics ······································································································································ 365 display ospfv3 vlink ············································································································································ 367 filter (OSPFv3 area view) ··································································································································· 368 filter-policy export (OSPFv3 view) ····················································································································· 369 filter-policy import (OSPFv3 view) ····················································································································· 370 graceful-restart enable ········································································································································ 371 graceful-restart helper enable ···························································································································· 372 graceful-restart helper strict-lsa-checking ··········································································································· 372 graceful-restart interval········································································································································ 373 import-route (OSPFv3 view) ································································································································ 374 log-peer-change ··················································································································································· 375 lsa-generation-interval ········································································································································· 376 maximum load-balancing (OSPFv3 view) ········································································································· 376 ospfv3 ··································································································································································· 377 ospfv3 area ·························································································································································· 378 vii
ospfv3 bfd enable ··············································································································································· 378 ospfv3 cost ··························································································································································· 379 ospfv3 dr-priority ················································································································································· 380 ospfv3 mtu-ignore ················································································································································ 380 ospfv3 network-type ············································································································································ 381 ospfv3 peer ·························································································································································· 382 ospfv3 timer dead ··············································································································································· 383 ospfv3 timer hello ················································································································································ 383 ospfv3 timer poll ·················································································································································· 384 ospfv3 timer retransmit ······································································································································· 385 ospfv3 trans-delay ··············································································································································· 385 preference ···························································································································································· 386 silent-interface(OSPFv3 view) ····························································································································· 387 router-id ································································································································································ 388 spf-schedule-interval ············································································································································ 388 stub (OSPFv3 area view) ···································································································································· 389 vlink-peer (OSPFv3 area view)··························································································································· 390 IPv6 IS-IS configuration commands ························································································································ 392 display isis redistribute ipv6 ······························································································································· 392 display isis route ipv6 ········································································································································· 393 ipv6 default-route-advertise ································································································································ 396 ipv6 enable ·························································································································································· 397 ipv6 filter-policy export ······································································································································· 397 ipv6 filter-policy import ······································································································································· 398 ipv6 import-route ················································································································································· 400 ipv6 import-route isisv6 level-1 into level-2 ······································································································· 401 ipv6 import-route isisv6 level-2 into level-1 ······································································································· 401 ipv6 import-route limit ········································································································································· 402 ipv6 maximum load-balancing ·························································································································· 403 ipv6 preference ··················································································································································· 403 ipv6 summary ······················································································································································ 404 isis ipv6 bfd enable ············································································································································· 405 isis ipv6 enable ··················································································································································· 405 IPv6 policy-based routing commands ···················································································································· 407 apply next-hop ····················································································································································· 407 display ipv6 policy-based-route ························································································································· 407 display ipv6 policy-based-route interface ········································································································· 408 display ipv6 policy-based-route setup ··············································································································· 410 if-match acl ··························································································································································· 411 ipv6 policy-based-route (interface view) ··········································································································· 411 ipv6 policy-based-route (system view) ··············································································································· 412 reset ipv6 policy-based-route statistics ·············································································································· 413 Routing policy configuration commands ··············································································································· 414 Common routing policy configuration commands···································································································· 414 apply as-path ······················································································································································· 414 apply comm-list delete ········································································································································ 414 apply community ················································································································································· 415 apply cost ····························································································································································· 416 apply cost-type ····················································································································································· 417 apply extcommunity ············································································································································ 418 apply isis ······························································································································································ 418 apply local-preference ········································································································································ 419 apply origin ························································································································································· 420 viii
apply preference ················································································································································· 420 apply preferred-value ·········································································································································· 421 apply tag ······························································································································································ 421 continue ································································································································································ 422 display ip as-path ················································································································································ 423 display ip community-list ····································································································································· 423 display ip extcommunity-list ································································································································ 424 display route-policy ············································································································································· 425 if-match as-path ···················································································································································· 426 if-match community ·············································································································································· 426 if-match cost ························································································································································· 427 if-match extcommunity ········································································································································· 428 if-match interface ················································································································································· 428 if-match local-preference ····································································································································· 429 if-match route-type ··············································································································································· 430 if-match tag ·························································································································································· 430 ip as-path······························································································································································ 431 ip community-list ·················································································································································· 432 ip extcommunity-list ············································································································································· 433 route-policy ··························································································································································· 434 IPv4 routing policy configuration commands ············································································································ 435 apply fast-reroute ················································································································································· 435 apply ip-address next-hop ·································································································································· 436 display ip prefix-list ············································································································································· 437 if-match ip ····························································································································································· 438 ip prefix-list ··························································································································································· 438 reset ip prefix-list ·················································································································································· 439 IPv6 routing policy configuration commands ············································································································ 440 apply ipv6 next-hop ············································································································································ 440 display ipv6 prefix-list ········································································································································· 441 if-match ipv6 ························································································································································ 442 ipv6 prefix-list······················································································································································· 442 reset ipv6 prefix-list ············································································································································· 443 Support and other resources ·································································································································· 445 Contacting HP ······························································································································································ 445 Subscription service ············································································································································ 445 Related information ······················································································································································ 445 Documents ···························································································································································· 445 Websites······························································································································································· 445 Conventions ·································································································································································· 446 Index ········································································································································································ 448 ix
Basic IP routing commands
display ip routing-table
Use display ip routing-table to display routing table information.
Syntax
display ip routing-table [ vpn-instance vpn-instance-name ] [ verbose ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN by its name, a case-sensitive string of 1 to 31
characters. Without this option, the command displays the routing table information for the public
network.
verbose: Displays detailed routing table information, including information about both active and
inactive routes. Without this keyword, the command displays only brief information about active routes.
Examples
# Display brief information about active routes in the routing table.
<Sysname> display ip routing-table
Destinations : 13
Routes : 13
Destination/Mask
Proto
Cost
NextHop
Interface
0.0.0.0/32
Direct 0
Pre
0
127.0.0.1
InLoop0
1.1.1.0/24
Static 60
0
192.168.47.4
Vlan21
127.0.0.0/8
Direct 0
0
127.0.0.1
InLoop0
127.0.0.0/32
Direct 0
0
127.0.0.1
InLoop0
127.0.0.1/32
Direct 0
0
127.0.0.1
InLoop0
127.255.255.255/32
Direct 0
0
127.0.0.1
InLoop0
192.168.1.0/24
Direct 0
0
192.168.1.40
Vlan11
192.168.1.0/32
Direct 0
0
192.168.1.40
Vlan11
192.168.1.40/32
Direct 0
0
127.0.0.1
InLoop0
192.168.1.255/32
Direct 0
0
192.168.1.40
Vlan11
224.0.0.0/4
Direct 0
0
0.0.0.0
NULL0
224.0.0.0/24
Direct 0
0
0.0.0.0
NULL0
255.255.255.255/32
Direct 0
0
127.0.0.1
InLoop0
1
Table 1 Command output
Field
Description
Destinations
Number of destination addresses.
Routes
Number of routes.
Destination/Mask
Destination address/mask length.
Proto
Protocol that installed the route.
Pre
Preference of the route.
Cost
Cost of the route.
NextHop
Next hop address of the route.
Interface
Output interface for packets to be forwarded along the route.
Summary Count
Number of routes.
# Display detailed information about all routes in the routing table.
<Sysname> display ip routing-table verbose
Destinations : 13
Routes : 13
Destination: 0.0.0.0/32
Protocol: Direct
SubProtID: 0x0
Cost: 0
Tag: 0
OrigTblID: 0x0
TableID: 0x2
NBRID: 0x10000000
AttrID: 0xffffffff
Process ID: 0
Age: 08h34m37s
Preference: 0
State: Active NoAdv
OrigVrf: default-vrf
OrigAs: 0
LastAs: 0
Neighbor: 0.0.0.0
Flags: 0x1000c
OrigNextHop: 127.0.0.1
Label: NULL
RealNextHop: 127.0.0.1
BkLabel: NULL
Tunnel ID: Invalid
BkTunnel ID: Invalid
BkNextHop: N/A
Interface: InLoopBack0
BkInterface: N/A
Destination: 1.1.1.0/24
Protocol: Static
SubProtID: 0x0
Cost: 0
Tag: 0
OrigTblID: 0x0
TableID: 0x2
NBRID: 0x10000003
AttrID: 0xffffffff
Process ID: 0
Age: 04h20m37s
Preference: 60
State: Active Adv
OrigVrf: default-vrf
OrigAs: 0
LastAs: 0
Neighbor: 0.0.0.0
Flags: 0x1008c
OrigNextHop: 192.168.47.4
Label: NULL
RealNextHop: 192.168.47.4
BkLabel: NULL
Tunnel ID: Invalid
BkNextHop: N/A
Interface: Vlan-interface21
2
BkTunnel ID: Invalid
BkInterface: N/A
...
Table 2 Command output
Field
Description
Destinations
Number of destination addresses.
Routes
Number of routes.
Destination
Destination address/mask length.
Protocol
Protocol that installed the route.
SubProtID
ID of the subprotocol for routing.
Age
Time for which the route has been in the routing table.
Cost
Cost of the route.
Preference
Preference of the route.
Tag
Route tag.
Route status:
State
•
•
•
•
•
•
•
Active—Active unicast route.
Adv—Route that can be advertised.
Inactive—Inactive route.
NoAdv—Route that the router must not advertise.
Vrrp—Routes generated by VRRP.
Nat—Routes generated by NAT.
TunE—Tunnel.
OrigTblID
Original routing table ID.
OrigVrf
Original VPN that the route belongs to.
TableID
ID of the routing table.
OrigAs
Original AS number.
NBRID
Neighbor ID of the route.
LastAs
Last AS number.
AttrID
Attribute ID.
Neighbor
Address of the neighbor determined by the routing protocol.
Flags
Flags of the route.
OrigNextHop
Next hop address of the route.
RealNextHop
Real next hop of the route.
BkLabel
Backup label.
BkNexthop
Backup next hop.
Interface
Output interface for packets to be forwarded along the route.
BkTunnel ID
Backup tunnel ID.
BkInterface
Backup output interface.
3
display ip routing-table acl
Use display ip routing-table acl to display information about routes permitted by a specific basic ACL.
Syntax
display ip routing-table [ vpn-instance vpn-instance-name ] acl acl-number [ verbose ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN by its name, a case-sensitive string of 1 to 31
characters. Without this option, the command displays routing information for the public network.
acl-number: Specifies a basic ACL by its number in the range of 2000 to 2999.
verbose: Displays detailed information about all routes permitted by the basic ACL. Without this keyword,
the command displays only brief information about active routes permitted by the basic ACL.
Usage guidelines
If the specified ACL does not exist or has no rules configured, the command displays information about
all routes.
Examples
# Define basic ACL 2000 and set the route filtering rules.
<Sysname> system-view
[Sysname] acl number 2000
[Sysname-acl-basic-2000] rule permit source 192.168.1.0 0.0.0.255
[Sysname-acl-basic-2000] rule deny source any
# Display brief information about active routes permitted by basic ACL 2000.
[Sysname-acl-basic-2000] display ip routing-table acl 2000
Routes Matched by Access control list : 2000
Summary Count : 4
Destination/Mask
Proto
Cost
NextHop
Interface
192.168.1.0/24
Direct 0
Pre
0
192.168.1.111
Vlan21
192.168.1.0/32
Direct 0
0
192.168.1.111
Vlan21
192.168.1.111/32
Direct 0
0
127.0.0.1
InLoop0
192.168.1.255/32
Direct 0
0
192.168.1.111
Vlan21
For command output, see Table 1.
# Display detailed information about all routes permitted by basic ACL 2000.
<Sysname> display ip routing-table acl 2000 verbose
Routes Matched by Access control list : 2000
Summary Count : 4
4
Destination: 192.168.1.0/24
Protocol: Direct
Process ID: 0
SubProtID: 0x1
Cost: 0
Age: 04h20m37s
Preference: 0
Tag: 0
State: Active Adv
OrigTblID: 0x0
OrigVrf: default-vrf
TableID: 0x2
OrigAs: 0
NBRID: 0x10000003
LastAs: 0
AttrID: 0xffffffff
Neighbor: 0.0.0.0
Flags: 0x10080
OrigNextHop: 192.168.1.111
Label: NULL
RealNextHop: 192.168.1.111
BkLabel: NULL
BkNextHop: N/A
Tunnel ID: Invalid
BkTunnel ID: Invalid
Interface: Vlan-interface21
BkInterface: N/A
Destination: 192.168.1.0/32
Protocol: Direct
Process ID: 0
SubProtID: 0x0
Cost: 0
Age: 04h20m37s
Preference: 0
Tag: 0
State: Active NoAdv
OrigTblID: 0x0
OrigVrf: default-vrf
TableID: 0x2
OrigAs: 0
NBRID: 0x10000003
LastAs: 0
AttrID: 0xffffffff
Neighbor: 0.0.0.0
Flags: 0x1008c
OrigNextHop: 192.168.1.111
Label: NULL
RealNextHop: 192.168.1.111
BkLabel: NULL
BkNextHop: N/A
Tunnel ID: Invalid
BkTunnel ID: Invalid
Interface: Vlan-interface21
BkInterface: N/A
Destination: 192.168.1.111/32
Protocol: Direct
Process ID: 0
SubProtID: 0x1
Cost: 0
Age: 04h20m37s
Preference: 0
Tag: 0
State: Active NoAdv
OrigTblID: 0x0
OrigVrf: default-vrf
TableID: 0x2
OrigAs: 0
NBRID: 0x10000000
LastAs: 0
AttrID: 0xffffffff
Neighbor: 0.0.0.0
Flags: 0x10004
OrigNextHop: 127.0.0.1
Label: NULL
RealNextHop: 127.0.0.1
BkLabel: NULL
BkNextHop: N/A
Tunnel ID: Invalid
BkTunnel ID: Invalid
Interface: InLoopBack0
BkInterface: N/A
Destination: 192.168.1.255/32
Protocol: Direct
Process ID: 0
5
SubProtID: 0x0
Age: 04h20m37s
Cost: 0
Preference: 0
Tag: 0
State: Active NoAdv
OrigTblID: 0x0
OrigVrf: default-vrf
TableID: 0x2
OrigAs: 0
NBRID: 0x10000003
LastAs: 0
AttrID: 0xffffffff
Neighbor: 0.0.0.0
Flags: 0x1008c
OrigNextHop: 192.168.1.111
Label: NULL
RealNextHop: 192.168.1.111
BkLabel: NULL
BkNextHop: N/A
Tunnel ID: Invalid
BkTunnel ID: Invalid
Interface: Vlan-interface21
BkInterface: N/A
For command output, see Table 2.
display ip routing-table ip-address
Use display ip routing-table ip-address to display information about routes to a specific destination
address.
Use display ip routing-table ip-address1 to ip-address2 to display information about routes to a range of
destination addresses.
Syntax
display ip routing-table [ vpn-instance vpn-instance-name ] ip-address [ mask | mask-length ]
[ longer-match ] [ verbose ]
display ip routing-table [ vpn-instance vpn-instance-name ] ip-address1 to ip-address2 [ verbose ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN by its name, a case-sensitive string of 1 to 31
characters. Without this option, the command displays routing information for the public network.
ip-address: Specifies a destination IP address in dotted decimal notation.
mask: Specifies the IP address mask in dotted decimal notation.
mask-length: Specifies the mask length, an integer in the range of 0 to 32.
longer-match: Displays the route entry with the longest mask.
ip-address1 to ip-address2: Specifies a destination IP address range.
verbose: Displays detailed routing table information, including information about both active and
inactive routes. Without this keyword, the command displays brief information about active routes.
Usage guidelines
Executing the command with different parameters yields different outputs:
•
display ip routing-table ip-address:
6
{
{
The system ANDs the entered destination IP address with the subnet mask in each active route
entry.
The system ANDs the destination IP address in each active route entry with its own subnet mask.
If the two operations yield the same result for an entry, the entry is displayed.
•
display ip routing-table ip-address mask:
{
{
The system ANDs the entered destination IP address with the entered subnet mask.
The system ANDs the destination IP address in each active route entry with the entered subnet
mask.
If the two operations yield the same result for an entry and the entry has a subnet mask less than
or equal to the entered subnet mask, the entry is displayed.
•
display ip routing-table ip-address longer-match:
{
{
The system ANDs the entered destination IP address with the subnet mask in each active route
entry.
The system ANDs the destination IP address in each active route entry with its own subnet mask.
If the two operations yield the same result for multiple entries, the one with longest mask length is
displayed.
•
display ip routing-table ip-address mask longer-match:
{
{
The system ANDs the entered destination IP address with the entered subnet mask.
The system ANDs the destination IP address in each active route entry with the entered subnet
mask.
If the two operations yield the same result for multiple entries and the entries have a mask less than
or equal to the entered subnet mask, the one with the longest mask length is displayed.
•
display ip routing-table ip-address1 to ip-address2:
The system displays active route entries with destinations in the range of ip-address1/32 to
ip-address2/32.
Examples
# Display brief information about the routes to the destination IP address 11.0.0.1.
<Sysname> display ip routing-table 11.0.0.1
Summary Count : 3
Destination/Mask
Proto
Cost
NextHop
Interface
11.0.0.0/8
Static 60
Pre
0
0.0.0.0
NULL0
11.0.0.0/16
Static 60
0
0.0.0.0
NULL0
11.0.0.0/24
Static 60
0
0.0.0.0
NULL0
# Display brief information about the routes to the destination IP address 11.0.0.1 and mask length 20.
<Sysname> display ip routing-table 11.0.0.1 20
Summary Count : 2
Destination/Mask
Proto
11.0.0.0/8
11.0.0.0/16
Pre
Cost
NextHop
Interface
Static 60
0
0.0.0.0
NULL0
Static 60
0
0.0.0.0
NULL0
# Display brief information about the most specific route to the destination address 11.0.0.1.
7
<Sysname> display ip routing-table 11.0.0.1 longer-match
Summary Count : 1
Destination/Mask
Proto
11.0.0.0/24
Static 60
Pre
Cost
NextHop
Interface
0
0.0.0.0
NULL0
# Display brief information about the most specific route to the destination IP address 11.0.0.1 and mask
length 20.
<Sysname> display ip routing-table 11.0.0.1 20 longer-match
Summary Count : 1
Destination/Mask
Proto
11.0.0.0/16
Static 60
Pre
Cost
NextHop
Interface
0
0.0.0.0
NULL0
# Display brief information about the routes to destination addresses in the range of 1.1.1.0 to 5.5.5.0.
<Sysname> display ip routing-table 1.1.1.0 to 5.5.5.0
Summary Count : 6
Destination/Mask
Proto
1.1.1.1/32
2.2.2.0/24
Pre
Cost
NextHop
Interface
Direct 0
0
127.0.0.1
InLoop0
Direct 0
0
2.2.2.1
Vlan2
3.3.3.0/24
Direct 0
0
3.3.3.1
Vlan22
3.3.3.1/32
Direct 0
0
127.0.0.1
InLoop0
4.4.4.0/24
Direct 0
0
4.4.4.1
Vlan21
4.4.4.1/32
Direct 0
0
127.0.0.1
InLoop0
For command output, see Table 1.
display ip routing-table prefix-list
Use display ip routing-table prefix-list to display routes permitted by an IP prefix list.
Syntax
display ip routing-table [ vpn-instance vpn-instance-name ] prefix-list prefix-list-name [ verbose ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN by its name, a case-sensitive string of 1 to 31
characters. Without this option, the command displays routing information for the public network.
prefix-list-name: Specifies an IP prefix list by its name, a case-sensitive string of 1 to 63 characters.
verbose: Displays detailed information about all routes permitted by the IP prefix list. Without this
keyword, the command displays brief information about active routes permitted by the IP prefix list.
8
Usage guidelines
If the specified IP prefix list does not exist, the command displays information about all routes.
Examples
# Create an IP prefix list named test to permit the route 1.1.1.0/24.
<Sysname> system-view
[Sysname] ip prefix-list test permit 1.1.1.0 24
# Display brief information about the active route permitted by the IP prefix list.
[Sysname] display ip routing-table prefix-list test
Routes Matched by Prefix list : test
Summary Count : 1
Destination/Mask
Proto
Pre
1.1.1.0/24
Direct 0
Cost
NextHop
Interface
0
1.1.1.2
Vlan22
For command output, see Table 1.
# Display detailed information about all routes permitted by the IP prefix list.
[Sysname] display ip routing-table prefix-list test verbose
Routes Matched by Prefix list : test
Summary Count : 1
Destination: 1.1.1.0/24
Protocol: Direct
Process ID: 0
SubProtID: 0x1
Age: 04h20m37s
Cost: 0
Preference: 0
Tag: 0
State: Active Adv
OrigTblID: 0x0
OrigVrf: default-vrf
TableID: 0x2
OrigAs: 0
NBRID: 0x10000003
LastAs: 0
AttrID: 0xffffffff
Neighbor: 0.0.0.0
Flags: 0x1008c
OrigNextHop: 1.1.1.2
Label: NULL
RealNextHop: 1.1.1.2
BkLabel: NULL
BkNextHop: N/A
Tunnel ID: Invalid
BkTunnel ID: Invalid
Interface: Vlan-interface22
BkInterface: N/A
For command output, see Table 2.
display ip routing-table protocol
Use display ip routing-table protocol to display information about routes installed by a protocol.
Syntax
display ip routing-table [ vpn-instance vpn-instance-name ] protocol protocol [ inactive | verbose ]
Views
Any view
9
Predefined user roles
network-admin
network-operator
Parameters
vpn-instance vpn-instance-name: Specifies MPLS L3VPN by its name, a case-sensitive string of 1 to 31
characters. Without this option, the command displays routing information for the public network.
protocol: Specifies a routing protocol. It can be bgp, direct, guard, isis, ospf, rip, or static.
inactive: Displays information about inactive routes. Without this keyword, the command displays
information about both active and inactive routes.
verbose: Displays detailed routing table information. Without this keyword, the command displays brief
routing information.
Examples
# Display brief information about direct routes.
<Sysname> display ip routing-table protocol direct
Summary Count : 13
Direct Routing Table Status : <Active>
Summary Count : 13
Destination/Mask
Proto
Cost
NextHop
Interface
0.0.0.0/32
Direct 0
Pre
0
127.0.0.1
InLoop0
2.2.2.0/24
Direct 0
0
2.2.2.1
Vlan2
2.2.2.0/32
Direct 0
0
2.2.2.1
Vlan2
2.2.2.2/32
Direct 0
0
127.0.0.1
InLoop0
2.2.2.255/32
Direct 0
0
2.2.2.1
Vlan2
127.0.0.0/8
Direct 0
0
127.0.0.1
InLoop0
127.0.0.0/32
Direct 0
0
127.0.0.1
InLoop0
127.0.0.1/32
Direct 0
0
127.0.0.1
InLoop0
127.255.255.255/32
Direct 0
0
127.0.0.1
InLoop0
192.168.80.0/24
Direct 0
0
192.168.80.10
Vlan21
192.168.80.0/32
Direct 0
0
192.168.80.10
Vlan21
192.168.80.10/32
Direct 0
0
127.0.0.1
InLoop0
192.168.80.255/32
Direct 0
0
192.168.80.10
Vlan21
Direct Routing Table Status : <Inactive>
Summary Count : 0
# Display brief information about static routes.
<Sysname> display ip routing-table protocol static
Summary Count : 2
Static Routing Table Status : <Active>
Summary Count : 0
10
Static Routing Table Status : <Inactive>
Summary Count : 2
Destination/Mask
Proto
1.2.3.0/24
3.0.0.0/8
Pre
Cost
NextHop
Interface
Static 60
0
1.2.4.5
Vlan10
Static 60
0
2.2.2.2
Vlan21
For command output, see Table 1.
display ip routing-table statistics
Use display ip routing-table statistics to display IPv4 route statistics.
Syntax
display ip routing-table [ vpn-instance vpn-instance-name ] statistics
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN by its name, a case-sensitive string of 1 to 31
characters. Without this option, the command displays route statistics for the public network.
Examples
# Display IPv4 route statistics for the public network.
<Sysname> display ip routing-table statistics
Proto
route
active
added
deleted
DIRECT
12
12
30
18
STATIC
3
3
5
2
RIP
0
0
0
0
OSPF
0
0
0
0
ISIS
0
0
0
0
BGP
0
0
0
0
Total
15
15
35
20
Table 3 Command output
Field
Description
Proto
Protocol that installed the route.
route
Number of routes installed by the protocol.
active
Number of active routes.
added
Number of routes added to the routing table after the router started up or the routing table was
last cleared.
deleted
Number of routes marked as deleted, which will be cleared after a period.
Total
Total number of routes.
11
display ipv6 routing-table
Use display ipv6 routing-table to display IPv6 routing table information.
Syntax
display ipv6 routing-table [ vpn-instance vpn-instance-name ] [ verbose ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN by its name, a case-sensitive string of 1 to 31
characters. Without this option, the command displays routing information for the public network.
verbose: Displays detailed routing table information, including information about both active and
inactive routes. With this keyword absent, the command displays only brief information about active
routes.
Examples
# Display brief information about active routes in the IPv6 routing table.
<Sysname> display ipv6 routing-table
Destinations : 3 Routes : 3
Destination: ::1/128
Protocol
: Direct
NextHop
: ::1
Preference: 0
Interface
: InLoop0
Cost
: 0
Destination: FE80::/10
Protocol
: Direct
NextHop
: ::
Preference: 0
Interface
: NULL0
Cost
: 0
Destination: FF00::/8
Protocol
: Direct
NextHop
: ::
Preference: 0
Interface
: NULL0
Cost
: 0
Table 4 Command output
Field
Description
Destinations
Number of destination addresses.
Routes
Number of routes.
Destination
IPv6 address and prefix of the destination network or host.
NextHop
Next hop address of the route.
Preference
Preference of the route.
12
Field
Description
Interface
Output interface for packets to be forwarded along the route.
Protocol
Protocol that installed the route.
Cost
Cost of the route.
Summary Count
Number of routes.
# Display detailed information about all routes in the routing table.
<Sysname> display ipv6 routing-table verbose
Destinations : 3 Routes : 3
Destination: ::1/128
Protocol: Direct
SubProtID: 0x0
Cost: 0
Tag: 0
OrigTblID: 0x0
TableID: 0xa
Process ID: 0
Age: 00h53m50s
Preference: 0
State: Active NoAdv
OrigVrf: default-vrf
OrigAs: 0
NBRID: 0x20000000
LastAs: 0
AttrID: 0xffffffff
Neighbor: ::
Flags: 0x10004
OrigNextHop: ::1
Label: NULL
RealNextHop: ::1
BkLabel: NULL
BkNextHop: N/A
Tunnel ID: Invalid
BkTunnel ID: Invalid
Interface: InLoopBack0
BkInterface: N/A
Destination: FE80::/10
Protocol: Direct
SubProtID: 0x0
Cost: 0
Tag: 0
OrigTblID: 0x0
TableID: 0xa
NBRID: 0x20000002
AttrID: 0xffffffff
Process ID: 0
Age: 00h53m50s
Preference: 0
State: Active NoAdv
OrigVrf: default-vrf
OrigAs: 0
LastAs: 0
Neighbor: ::
Flags: 0x10084
OrigNextHop: ::
Label: NULL
RealNextHop: ::
BkLabel: NULL
Tunnel ID: Invalid
BkTunnel ID: Invalid
BkNextHop: N/A
Interface: NULL0
BkInterface: N/A
Destination: FF00::/8
Protocol: Direct
SubProtID: 0x0
Cost: 0
Tag: 0
OrigTblID: 0x0
Process ID: 0
Age: 00h53m50s
Preference: 0
State: Active NoAdv
OrigVrf: default-vrf
13
TableID: 0xa
OrigAs: 0
NBRID: 0x20000001
LastAs: 0
AttrID: 0xffffffff
Neighbor: ::
Flags: 0x10014
OrigNextHop: ::
Label: NULL
RealNextHop: ::
BkLabel: NULL
BkNextHop: N/A
Tunnel ID: Invalid
BkTunnel ID: Invalid
Interface: NULL0
BkInterface: N/A
Table 5 Command output
Field
Description
Destination
IPv6 address and prefix of the destination network or host.
Protocol
Protocol that installed the route.
SubProtID
ID of the subprotocol for routing.
Age
Time for which the route has been in the routing table.
Cost
Cost of the route.
Preference
Preference of the route.
Tag
Tag of the route.
Route status:
State
•
•
•
•
•
•
•
Active—Active unicast route.
Adv—Route that can be advertised.
Inactive—Inactive route.
NoAdv—Route that the router must not advertise.
Vrrp—Routes generated by VRRP.
Nat—Routes generated by NAT.
TunE—Tunnel.
OrigTblID
Original routing table ID.
OrigVrf
Original VPN that the route belongs to.
TableID
ID of the routing table.
OrigAs
Original AS number.
NBRID
Neighbor ID of the route.
LastAs
Last AS number.
AttrID
Attribute ID.
Neighbor
Address of the neighbor determined by the routing protocol.
Flags
Flags of the route.
OrigNextHop
Next hop address of the route.
RealNextHop
Real next hop of the route.
BkLabel
Backup label.
BkNexthop
Backup next hop.
Interface
Output interface for packets to be forwarded along the route.
BkTunnel ID
Backup tunnel ID.
14
Field
Description
BkInterface
Backup output interface.
display ipv6 routing-table acl
Use display ipv6 routing-table acl to display routing information permitted by a specific IPv6 basic ACL.
Syntax
display ipv6 routing-table [ vpn-instance vpn-instance-name ] acl acl6-number [ verbose ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN by its name, a case-sensitive string of 1 to 31
characters. Without this option, the command displays routing information for the public network.
acl6-number: Specifies a basic IPv6 ACL by its number in the range of 2000 to 2999.
verbose: Displays detailed information about all routes permitted by the basic IPv6 ACL. Without this
keyword, the command displays only brief information about active routes permitted by the basic IPv6
ACL.
Usage guidelines
If the specified IPv6 ACL does not exist or has no rules configured, the command displays information
about all IPv6 routes.
Examples
# Display brief information about active routes permitted by IPv6 ACL 2000.
<Sysname> display ipv6 routing-table acl 2000
Routes Matched by Access control list : 2000
Summary Count : 3
Destination : ::1/128
Protocol
NextHop
: ::1
Preference: 0
Interface
: InLoop0
Cost
: 0
Destination : 1:1::/64
Protocol
: Static
NextHop
: ::
Preference: 60
Interface
: NULL0
Cost
For command output, see Table 4.
# Display detailed information about all routes permitted by IPv6 ACL 2000.
<Sysname> display ipv6 routing-table acl 2000 verbose
Routes Matched by Access control list : 2000
15
: Direct
: 0
Summary Count : 3
Destination: ::1/128
Protocol: Direct
Process ID: 0
SubProtID: 0x0
Age: 08h57m19s
Cost: 0
Preference: 0
Tag: 0
State: Active NoAdv
OrigTblID: 0x0
OrigVrf: default-vrf
TableID: 0xa
OrigAs: 0
NBRID: 0x20000000
LastAs: 0
AttrID: 0xffffffff
Neighbor: ::
Flags: 0x10004
OrigNextHop: ::1
Label: NULL
RealNextHop: ::1
BkLabel: NULL
BkNextHop: N/A
Tunnel ID: Invalid
BkTunnel ID: Invalid
Interface: InLoopBack0
BkInterface: N/A
Destination: 1:1::/64
Protocol: Static
Process ID: 0
SubProtID: 0x2
Age: 08h57m19s
Cost: 0
Preference: 60
Tag: 0
State: Active Adv
OrigTblID: 0x0
OrigVrf: default-vrf
TableID: 0xa
OrigAs: 0
NBRID: 0x20000002
LastAs: 0
AttrID: 0xffffffff
Neighbor: ::
Flags: 0x10084
OrigNextHop: ::
Label: NULL
RealNextHop: ::
BkLabel: NULL
BkNextHop: N/A
Tunnel ID: Invalid
BkTunnel ID: Invalid
Interface: NULL0
BkInterface: N/A
For command output, see Table 5.
display ipv6 routing-table ipv6-address
Use display ipv6 routing-table ipv6-address to display information about routes to an IPv6 destination
address.
Use display ipv6 routing-table ipv6-address1 to ipv6-address2 to display information about routes to a
range of IPv6 destination addresses.
Syntax
display ipv6 routing-table [ vpn-instance vpn-instance-name ] ipv6-address [ prefix-length ]
[ longer-match ] [ verbose ]
display ipv6 routing-table [ vpn-instance vpn-instance-name ] ipv6-address1 to ipv6-address2
[ verbose ]
Views
Any view
16
Predefined user roles
network-admin
network-operator
Parameters
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN by its name, a case-sensitive string of 1 to 31
characters. Without this option, the command displays routing information for the public network.
ipv6-address: Specifies a destination IPv6 address.
prefix-length: Specifies the prefix length in the range of 0 to 128.
longer-match: Displays the route entry with the longest prefix.
ipv6-address1 to ipv6-address2: Specifies a destination IPv6 address range.
verbose: Displays detailed routing table information, including information about both active and
inactive routes. Without this keyword, the command displays only brief information about active routes.
Usage guidelines
Executing the command with different parameters yields different output:
•
display ipv6 routing-table ipv6-address:
{
{
The system ANDs the entered destination IPv6 address with the prefix length in each active
route entry.
The system ANDs the destination IPv6 address in each active route entry with the prefix length
in the entry.
If the two operations yield the same result for an entry, this entry is displayed.
•
display ipv6 routing-table ipv6-address prefix-length:
{
{
The system ANDs the entered destination IPv6 address with the entered prefix length.
The system ANDs the destination IPv6 address in each active route entry with the entered prefix
length.
If the two operations yield the same result for an entry and the entry has a prefix length less than
or equal to the entered prefix length, the entry is displayed.
•
display ipv6 routing-table ipv6-address longer-match:
{
{
The system ANDs the entered destination IPv6 address with the prefix length in each active
route entry.
The system ANDs the destination IPv6 address in each active route entry with the prefix length
in the entry.
If the two operations yield the same result for multiple entries, the one that has the longest prefix
length is displayed.
•
display ipv6 routing-table ipv6-address prefix-length longer-match:
{
{
The system ANDs the entered destination IPv6 address with the entered prefix length.
The system ANDs the destination IPv6 address in each active route entry with the entered prefix
length.
If the two operations yield the same result for multiple entries with a prefix length less than or equal
to the entered prefix length, the one with the longest prefix length is displayed.
•
display ipv6 routing-table ipv6-address1 to ipv6-address2:
17
The system displays route entries with destinations in the range of ipv6-address1/128 to
ipv6-address2/128.
Examples
# Display brief information about the routes to the destination IPv6 address 10::1 127.
<Sysname> display ipv6 routing-table 10::1 127
Summary Count: 3
Destination: 10::/64
Protocol
NextHop
: ::
Preference: 60
: Static
Interface
: NULL0
Cost
: 0
Destination: 10::/68
Protocol
: Static
NextHop
: ::
Preference: 60
Interface
: NULL0
Cost
: 0
Destination: 10::/120
Protocol
: Static
NextHop
: ::
Preference: 60
Interface
: NULL0
Cost
: 0
# Display brief information about the most specific route to the destination IPv6 address 10::1 and prefix
length 127.
<Sysname> display ipv6 routing-table 10::1 127 longer-match
Summary Count : 1
Destination: 10::/120
Protocol
: Static
NextHop
: ::
Preference: 60
Interface
: NULL0
Cost
: 0
# Display brief information about the routes to destination addresses in the range of 100:: to 300::.
<Sysname> display ipv6 routing-table 100:: to 300::
Summary Count : 3
Destination: 100::/64
Protocol
NextHop
: ::
Preference: 60
Interface
: NULL0
Cost
: 0
Destination: 200::/64
Protocol
: Static
NextHop
: ::
Preference: 60
Interface
: NULL0
Cost
: 0
Destination: 300::/64
Protocol
: Static
NextHop
: ::
Preference: 60
Interface
: NULL0
Cost
For command output, see Table 4.
18
: Static
: 0
display ipv6 routing-table prefix-list
Use display ipv6 routing-table prefix-list to display information about IPv6 routes permitted by an IPv6
prefix list.
Syntax
display ipv6 routing-table [ vpn-instance vpn-instance-name ] prefix-list prefix-list-name [ verbose ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN by its name, a case-sensitive string of 1 to 31
characters. Without this option, the command displays routing information for the public network.
prefix-list-name: Specifies an IPv6 prefix list by its name, a case-sensitive string of 1 to 63 characters.
verbose: Displays detailed information about all IPv6 routes permitted by the IPv6 prefixt list. Without this
keyword, the command displays brief information about active IPv6 routes permitted by the IPv6 prefix
list.
Usage guidelines
If the specified IPv6 prefix list does not exist, the command displays information about all routes.
Examples
# Create an IPv6 prefix list named test to permit the prefix ::1/128.
<Sysname> system-view
[Sysname] ipv6 prefix-list test permit ::1 128
# Display brief information about the active IPv6 route permitted by the IPv6 prefix list.
[Sysname] display ipv6 routing-table prefix-list test
Routes Matched by Prefix list : test
Summary Count : 1
Destination: ::1/128
Protocol
NextHop
: ::1
Preference: 0
Interface
: InLoop0
Cost
For command output, see Table 4.
# Display detailed information about all routes permitted by the IPv6 prefix list.
[Sysname] display ipv6 routing-table prefix-list test verbose
Routes Matched by Prefix list : test
Summary Count : 1
Destination: ::1/128
Protocol: Direct
Process ID: 0
19
: Direct
: 0
SubProtID: 0x0
Age: 08h57m19s
Cost: 0
Preference: 0
Tag: 0
State: Active NoAdv
OrigTblID: 0x0
OrigVrf: default-vrf
TableID: 0xa
OrigAs: 0
NBRID: 0x20000000
LastAs: 0
AttrID: 0xffffffff
Neighbor: ::
Flags: 0x10004
OrigNextHop: ::1
Label: NULL
RealNextHop: ::1
BkLabel: NULL
BkNextHop: N/A
Tunnel ID: Invalid
BkTunnel ID: Invalid
Interface: InLoopBack0
BkInterface: N/A
For command output, see Table 5.
display ipv6 routing-table protocol
Use display ipv6 routing-table protocol to display information about IPv6 routes installed by a protocol.
Syntax
display ipv6 routing-table [ vpn-instance vpn-instance-name ] protocol protocol [ inactive | verbose ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN by its name, a case-sensitive string of 1 to 31
characters. Without this option, the command displays routing information for the public network.
protocol: Specifies a routing protocol. It can be bgp4+, direct, isisv6, ospfv3, ripng, or static.
inactive: Displays information about inactive routes. Without this keyword, the command displays
information about both active and inactive routes.
verbose: Displays detailed routing table information. Without this keyword, the command displays brief
routing information.
Examples
# Display brief information about direct routes.
<Sysname> display ipv6 routing-table protocol direct
Summary Count : 3
Direct Routing Table Status : <Active>
Summary Count : 3
Destination: ::1/128
Protocol
NextHop
: ::1
Preference: 0
Interface
: InLoop0
Cost
20
: Direct
: 0
Destination: FE80::/10
Protocol
: Direct
NextHop
: ::
Preference: 0
Interface
: NULL0
Cost
: 0
Destination: FF00::/8
Protocol
: Direct
NextHop
: ::
Preference: 0
Interface
: NULL0
Cost
: 0
Destination: 2::2/128
Protocol
: Static
NextHop
: fe80::2
Preference: 60
Interface
: Vlan22
Cost
: 0
Destination: 2::2/128
Protocol
: Static
NextHop
: fe80::3
Preference: 60
Interface
: Vlan22
Cost
: 0
Destination: 3::3/128
Protocol
: Static
NextHop
: 2::2
Preference: 60
Interface
: Vlan22
Cost
Direct Routing Table Status : <Inactive>
Summary Count : 0
# Display brief information about static routes.
<Sysname> display ipv6 routing-table protocol static
Summary Count : 3
Static Routing table Status : <Active>
Summary Count : 3
Static Routing table Status : <Inactive>
Summary Count : 0
For command output, see Table 4.
display ipv6 routing-table statistics
Use display ipv6 routing-table statistics to display IPv6 route statistics.
Syntax
display ipv6 routing-table [ vpn-instance vpn-instance-name ] statistics
Views
Any view
Predefined user roles
network-admin
network-operator
21
: 0
Parameters
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN by its name, a case-sensitive string of 1 to 31
characters. Without this option, the command displays route statistics for the public network.
Examples
# Display IPv6 route statistics for the public network.
<Sysname> display ipv6 routing-table statistics
Proto
route
active
added
deleted
DIRECT
5
5
5
0
STATIC
3
3
3
0
RIPng
0
0
0
0
OSPFv3
0
0
0
0
IS-ISv6
0
0
0
0
BGP4+
0
0
0
0
Total
8
8
8
0
Table 6 Command output
Field
Description
Proto
Protocol that installed the route.
route
Number of routes installed by the protocol.
active
Number of active routes.
added
Number of routes added to the routing table after the router started up or the routing table was
last cleared.
deleted
Number of routes marked as deleted, which will be cleared after a period.
Total
Total number of routes.
display max-ecmp-num
Use display max-ecmp-num to display the maximum number of ECMP routes.
Syntax
display max-ecmp-num
Views
Any view
Predefined user roles
network-admin
network-operator
Examples
# Display the maximum number of ECMP routes.
<Sysname> display max-ecmp-num
Max-ECMP-Num in use: 6
Max-ECMP-Num at the next reboot: 10
22
Table 7 Command output
Field
Description
Max-ECMP-Num in use
Maximum number of current ECMP routes in use.
Max-ECMP-Num at the next reboot
Maximum number of ECMP routes at the next reboot of the device.
max-ecmp-num
Use max-ecmp-num to configure the maximum number of ECMP routes.
Use undo max-ecmp-num to restore the default.
Syntax
max-ecmp-num number
undo max-ecmp-num
Default
The maximum number of ECMP routes is 8.
Views
System view
Predefined user roles
network-admin
Parameters
number: Specifies the maximum number of ECMP routes, in the range of 1 to 32.
Examples
# Configure the maximum number of ECMP routes as 10.
<Sysname> system-view
[Sysname] max-ecmp-num 10
The configuration will take effect at the next reboot. Continue? [Y/N]:y
Reboot device to make the configuration take effect.
After reboot, the maximum number of ECMP routes is 10.
reset ip routing-table statistics protocol
Use reset ip routing-table statistics protocol to clear IPv4 route statistics.
Syntax
reset ip routing-table statistics protocol [ vpn-instance vpn-instance-name ] { protocol | all }
Views
User view
Predefined user roles
network-admin
23
Parameters
vpn-instance vpn-instance-name: Clears the IPv4 route statistics for an MPLS L3VPN specified by its name,
a case-sensitive string of 1 to 31 characters. Without this option, the command clears route statistics for
the public network.
protocol: Clears route statistics for a routing protocol. It can be bgp, direct, isis, ospf, rip, or static.
all: Clears route statistics for all IPv4 routing protocols.
Examples
# Clear all IPv4 route statistics for the public network.
<Sysname> reset ip routing-table statistics protocol all
reset ipv6 routing-table statistics protocol
Use reset ipv6 routing-table statistics protocol to clear IPv6 route statistics.
Syntax
reset ipv6 routing-table statistics protocol [ vpn-instance vpn-instance-name ] { protocol | all }
Views
User view
Predefined user roles
network-admin
Parameters
vpn-instance vpn-instance-name: Clears route statistics for an MPLS L3VPN specified by its name, a
case-sensitive string of 1 to 31 characters. Without this option, the command clears the route statistics for
the public network.
protocol: Clears route statistics for an IPv6 routing protocol. It can be bgp4+, direct, isisv6, ospfv3, ripng,
or static.
all: Clears route statistics for all IPv6 routing protocols.
Examples
# Clear all IPv6 route statistics for the public network.
<Sysname> reset ipv6 routing-table statistics protocol all
24
Static routing commands
delete static-routes all
Use delete static-routes all to delete all static routes.
Syntax
delete [ vpn-instance vpn-instance-name ] static-routes all
Views
System view
Predefined user roles
network-admin
Parameters
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN by its name, a case-sensitive string of 1 to 31
characters. Without this option, the command deletes all static routes for the public network.
Usage guidelines
When you use this command, the system will prompt you to confirm the operation before deleting all the
static routes.
To delete one static route, use the undo ip route-static command. To delete all static routes, including the
default route, use the delete static-routes all command.
Examples
# Delete all static routes.
<Sysname> system-view
[Sysname] delete static-routes all
Delete all IPv4 static routes. Continue?[Y/N]y
Related commands
ip route-static
ip route-static
Use ip route-static to configure a static route.
Use undo ip route-static to delete a static route.
Syntax
ip route-static dest-address { mask | mask-length } { next-hop-address [ bfd control-packet bfd-source
ip-address | permanent | track track-entry-number ] | interface-type interface-number
[ next-hop-address ] [ backup-interface interface-type interface-number [ backup-nexthop
backup-nexthop-address ] [ permanent ] | bfd { control-packet | echo-packet } | permanent ] |
vpn-instance d-vpn-instance-name next-hop-address [ bfd control-packet bfd-source ip-address |
permanent | track track-entry-number ] } [ preference preference-value ] [ tag tag-value ] [ description
description-text ]
25
undo ip route-static dest-address { mask | mask-length } [ next-hop-address | interface-type
interface-number [ next-hop-address ] | vpn-instance d-vpn-instance-name next-hop-address ]
[ preference preference-value ]
ip route-static vpn-instance s-vpn-instance-name dest-address { mask | mask-length } { next-hop-address
[ public ] [ bfd control-packet bfd-source ip-address | permanent | track track-entry-number ] |
interface-type interface-number [ next-hop-address ] [ backup-interface interface-type interface-number
[ backup-nexthop backup-nexthop-address ] [ permanent ] | bfd { control-packet | echo-packet } |
permanent ] | vpn-instance d-vpn-instance-name next-hop-address [ bfd control-packet bfd-source
ip-address | permanent | track track-entry-number ] } [ preference preference-value ] [ tag tag-value ]
[ description description-text ]
undo ip route-static vpn-instance s-vpn-instance-name dest-address { mask | mask-length }
[ next-hop-address [ public ] | interface-type interface-number [ next-hop-address ] | vpn-instance
d-vpn-instance-name next-hop-address ] [ preference preference-value ]
Default
No static route is configured.
Views
System view
Predefined user roles
network-admin
Parameters
vpn-instance s-vpn-instance-name: Specifies a source MPLS L3VPN by its name, a case-sensitive string of
1 to 31 characters. Each VPN has its own routing table, and the configured static route is installed in the
routing tables of the specified VPNs.
dest-address: Specifies the destination IP address of the static route, in dotted decimal notation.
mask: Specifies the mask of the IP address, in dotted decimal notation.
mask-length: Specifies the mask length in the range of 0 to 32.
vpn-instance d-vpn-instance-name: Specifies a destination MPLS L3VPN by its name, a case-sensitive
string of 1 to 31 characters. If a destination VPN is specified, packets will search for the output interface
in the destination VPN based on the configured next hop address.
next-hop-address: Specifies the IP address of the next hop, in dotted decimal notation.
backup-interface interface-type interface-number: Specifies a backup output interface by its type and
number. If the backup output interface is an NBMA interface or broadcast interface (such as a VLAN
interface), rather than a P2P interface, you must specify the backup next hop address.
backup-nexthop backup-nexthop-address: Specifies a backup next hop address.
bfd: Enables BFD to detect reachability of the static route's next hop. When the next hop is unreachable,
the system immediately switches to the backup route.
control-packet: Specifies the BFD control mode.
bfd-source ip-address: Specifies the source IP address of BFD packets. HP recommends that you specify
the loopback interface address.
permanent: Specifies the route as a permanent static route. If the output interface is down, the permanent
static route is still active.
26
track track-entry-number: Associates the static route with a track entry specified by its number in the
range of 1 to 1024. For more information about track, see High Availability Configuration Guide.
echo-packet: Specifies the BFD echo mode.
public: Indicates that the specified next hop address is on the public network.
interface-type interface-number: Specifies an output interface by its type and number. If the output
interface is an NBMA interface or broadcast interface (such as a VLAN interface), rather than a P2P
interface, the next hop address must be specified.
preference preference-value: Specifies a preference for the static route, in the range of 1 to 255. The
default is 60.
tag tag-value: Sets a tag value for marking the static route, in the range of 1 to 4294967295. The default
is 0. Tags of routes are used for route control in routing policies. For more information about routing
policies, see Layer 3—IP Routing Configuration Guide.
description description-text: Configures a description for the static route, which comprises 1 to 60
characters, including special characters like the space, but excluding the question mark (?).
Usage guidelines
If the destination IP address and the mask are both 0.0.0.0 (or 0), the configured route is a default route.
The default route is used for forwarding a packet matching no entry in the routing table.
Implement different routing policies to configure different route preferences. For example, to enable load
sharing for multiple routes to the same destination, assign the same preference to the routes; to enable
them to back up one another, assign different preferences to them.
Follow these guidelines when you specify the output interface or the next hop address of the static route:
•
If the output interface is a Null 0 interface, no next hop address is required.
•
If the output interface is a point-to-point interface (such as a PPP serial interface), you can specify
only the output interface. You do not need to change the configuration of the route even if the peer
address is changed.
•
If the output interface is a broadcast interface (such as a VLAN interface) that might have multiple
next hops, you must specify the output interface and the next hop address at the same time.
Follow these guidelines when you configure a static route:
•
Enabling BFD for a flapping route could worsen the situation. Therefore, use it with caution. For
more information about BFD, see High Availability Configuration Guide.
•
If the track module uses NQA to detect the reachability of the private network static route's next hop,
the VPN instance ID of the static route's next hop must be identical to that configured for the NQA
operation.
•
If a static route needs route recursion, the associated track entry must monitor the next hop of the
recursive route instead of that of the static route. Otherwise, a valid route might be mistakenly
considered invalid.
•
Do not specify the permanent keyword together with the bfd or track keyword.
Examples
# Configure a static route, whose destination address is 1.1.1.1/24, next hop address is 2.2.2.2, tag value
is 45, and description information is for internet.
<Sysname> system-view
[Sysname] ip route-static 1.1.1.1 24 2.2.2.2 tag 45 description for internet
27
Related commands
display ip routing-table protocol
ip route-static default-preference
Use ip route-static default-preference to configure a default preference for static routes.
Use undo ip route-static default-preference to restore the default.
Syntax
ip route-static default-preference default-preference-value
undo ip route-static default-preference
Default
The default preference of static routes is 60.
Views
System view
Predefined user roles
network-admin
Parameters
default-preference-value: Specifies a default preference for static routes, in the range of 1 to 255.
Usage guidelines
If no preference is specified for a static route, the default preference applies.
When the default preference is reconfigured, it applies to only newly added static routes.
Examples
# Set a default preference of 120 for static routes.
<Sysname> system-view
[Sysname] ip route-static default-preference 120
Related commands
display ip routing-table protocol
28
RIP commands
checkzero
Use checkzero to enable zero field check on RIPv1 messages.
Use undo checkzero to disable zero field check.
Syntax
checkzero
undo checkzero
Default
The zero field check function is enabled.
Views
RIP view
Predefined user roles
network-admin
Usage guidelines
When the zero field check is enabled, the router discards RIPv1 messages in which zero fields contain
non-zero values. If all messages are trustworthy, disable this feature to reduce the workload of the CPU.
Examples
# Disable zero field check on RIPv1 messages for RIP process 100.
<Sysname> system-view
[Sysname] rip 100
[Sysname-rip-100] undo checkzero
default cost
Use default cost to configure a default metric for redistributed routes.
Use undo default cost to restore the default.
Syntax
default cost value
undo default cost
Default
The default metric of redistributed routes is 0.
Views
RIP view
Predefined user roles
network-admin
29
Parameters
value: Specifies a default metric for redistributed routes, in the range of 0 to 16.
Usage guidelines
When you use the import-route command to redistribute routes from another routing protocol without
specifying a metric, the metric specified by the default cost command applies.
Examples
# Configure a default metric of 3 for redistributed routes.
<Sysname> system-view
[Sysname] rip 1
[Sysname-rip-1] default cost 3
Related commands
import-route
default-route
Use default-route to configure all interfaces running a RIP process to advertise a default route with a
specified metric to RIP neighbors.
Use undo default-route to restore the default.
Syntax
default-route { only | originate } [ cost cost ]
undo default-route
Default
No default route is sent to RIP neighbors.
Views
RIP view
Predefined user roles
network-admin
Parameters
only: Advertises only a default route.
originate: Advertises both a default route and other routes.
cost: Specifies a cost for the default route, in the range of 1 to 15. The default is 1.
Usage guidelines
A RIP router configured with this feature does not receive any default route from RIP neighbors.
Examples
# Configure all interfaces running RIP process 100 to send only a default route with a metric of 2 to RIP
neighbors.
<Sysname> system-view
[Sysname] rip 100
[Sysname-rip-100] default-route only cost 2
30
Related commands
rip default-route
display rip
Use display rip to display state and configuration information for a RIP process.
Syntax
display rip [ process-id ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
process-id: Specifies a RIP process by its ID in the range of 1 to 65535. If no process is specified, the
command displays state and configuration information for all RIP processes.
Examples
# Display current state and configuration information for all RIP processes.
<Sysname> display rip
Public VPN-instance name:
RIP process: 1
RIP version: 1
Preference: 100
Routing policy: abc
Fast-reroute:
Routing policy: frr
Checkzero: Enabled
Default cost: 0
Summary: Enabled
Host routes: Enabled
Maximum number of load balanced routes: 8
Update time
:
30 secs
Suppress time :
120 secs
Update output delay:
Timeout time
:
180 secs
Garbage-collect time :
120 secs
20(ms)
Output count:
3
Silent interfaces: None
Default routes: Originate
Default routes cost: 3
Verify-source: Enabled
Networks:
1.0.0.0
Configured peers: None
Triggered updates sent: 0
Number of routes changes: 1
Number of replies to queries: 0
31
Table 8 Command output
Field
Description
Public VPN-instance name/Private VPN-instance
name
Public network or VPN where the RIP process runs.
RIP process
RIP process ID.
RIP version
RIP version 1 or 2.
Preference
RIP preference.
Checkzero
Indicates whether the zero field check is enabled for
RIPv1 messages.
Default cost
Default cost of redistributed routes.
Summary
Indicates whether route summarization is enabled.
Host routes
Indicates whether to receive host routes.
Update time
RIP update interval.
Timeout time
RIP timeout time.
Suppress time
RIP suppress interval.
Update output delay
RIP packet sending interval.
Output count
Maximum number of RIP packets sent at each interval.
Garbage-collect time
RIP garbage collection interval.
Silent interfaces
Number of silent interfaces, which do not periodically
send updates.
Indicates whether a default route is sent to RIP
neighbors.
• only—Only a default route is advertised.
• originate—A default route is advertised along with
Default routes
other routes.
• disable—No default route is advertised.
Default routes cost
Metric for a default route.
Verify-source
Indicates whether the source IP address is checked for
received RIP routing updates.
Networks
Networks enabled with RIP.
Configured peers
Configured neighbors.
Triggered updates sent
Number of triggered updates sent.
Number of routes changes
Number of route changes.
Number of replies to queries
Number of RIP responses.
display rip database
Use display rip database to display active routes for a RIP process. RIP advertises active routes in RIP
routing updates.
32
Syntax
display rip process-id database
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
process-id: Specifies a RIP process by its ID in the range of 1 to 65535.
Examples
# Display active routes for RIP process 100.
<Sysname> display rip 100 database
1.0.0.0/8, cost 0, auto-summary
1.1.1.0/24, cost 16, interface summary
1.1.1.0/24, cost 0, nexthop 1.1.1.1, RIP-interface
1.1.2.0/24, cost 0, imported
2.0.0.0/8, cost 1, auto-summary
2.0.0.0/8, cost 1, nexthop 1.1.1.2
Table 9 Command output
Field
Description
cost
Cost of the route.
auto-summary
Indicates that the route is a RIP automatic summary route.
interface summary
Indicates that the route is a RIP interface summary route.
nexthop
Address of the next hop.
RIP-interface
Direct route on a RIP-enabled interface.
imported
Indicates that the route is redistributed from another routing protocol.
display rip interface
Use display rip interface to display RIP interface information for a RIP process.
Syntax
display rip process-id interface [ interface-type interface-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
process-id: Specifies a RIP process by its ID in the range of 1 to 65535.
33
interface-type interface-number: Specifies an interface by its type and number. If no interface is specified,
the command displays information about all RIP interfaces for the RIP process.
Examples
# Display information about all interfaces for RIP process 1.
<Sysname> display rip 1 interface
Interface: Vlan-interface12
Address/Mask: 1.1.1.1/24
Version: RIPv1
MetricIn: 0
MetricIn route policy: Not designated
MetricOut: 1
MetricOut route policy: Not designated
Split-horizon/Poison-reverse: On/Off
Input/Output: On/On
Default route: Off
Current number of packets/Maximum number of packets: 0/2000
Table 10 Command output
Field
Description
Interface
Name of an interface running RIP.
Address/Mask
IP address and mask of the interface.
Version
RIP version running on the interface.
MetricIn
Additional metric added to incoming routes.
MetricIn route policy
Name of the routing policy used to add an additional metric for
incoming routes. If no routing policy is used, the field displays Not
designated.
MetricOut
Additional metric added to outgoing routes.
MetricOut route policy
Name of the routing policy used to add an additional routing metric
for outgoing routes. If no routing policy is used, the field displays Not
designated.
Indicates whether split horizon is enabled:
Split-horizon
• on—Enabled.
• off—Disabled.
Indicates whether poison reverse is enabled:
Poison-reverse
Input/Output
• on—Enabled.
• off—Disabled.
Indicates whether the interface is enabled to receive and send RIP
messages:
• on—Enabled.
• off—Disabled.
Indicates whether to send a default route to RIP neighbors:
Default route
Default route cost
•
•
•
•
Only—Advertises only a default route.
Originate—Advertises both a default route and other routes.
No-originate—Advertises only non-default routes.
Off—Advertises no default route.
Metric for a default route.
34
Field
Description
Current number of packets /Maximum
number of packets
Number of RIP packets to be sent/maximum number of RIP packets
that can be sent within a certain interval.
display rip route
Use display rip route to display routing information for a RIP process.
Syntax
display rip process-id route [ ip-address { mask | mask-length } | peer ip-address | statistics ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
process-id: Specifies a RIP process by its ID in the range of 1 to 65535.
ip-address { mask | mask-length }: Displays route information for the specified IP address.
peer ip-address: Displays route information learned from the specified neighbor.
statistics: Displays route statistics, including the total number of routes and number of routes from each
neighbor.
Examples
# Display all routing information for RIP process 1.
<Sysname> display rip 1 route
Route Flags: R - RIP
A - Aging, S - Suppressed, G - Garbage-collect
---------------------------------------------------------------------------Peer 1.1.1.2 on Vlan-interface12
Destination/Mask
Nexthop
Cost
Tag
Flags
Sec
2.0.0.0/8
1.1.1.2
1
0
RA
14
Table 11 Command output
Field
Description
Route Flags
•
•
•
•
R—RIP route.
A—The route is aging.
S—The route is suppressed.
G—The route is in Garbage-collect state.
Peer X.X.X.X on interface-type interface-number
Routing information learned from a neighbor on a RIP
interface.
Destination/Mask
Destination IP address and subnet mask.
Nexthop
Next hop of the route.
Cost
Cost of the route.
35
Field
Description
Tag
Route tag.
Flags
Route state.
Sec
Remaining time of the timer corresponding to the route state.
# Display routing statistics for RIP process 1.
<Sysname> display rip 1 route statistics
Peer
Aging
Garbage
1.1.1.2
1
0
Total
1
0
Table 12 Command output
Field
Description
Peer
IP address of a neighbor.
Aging
Total number of aging routes.
Garbage
Total number of routes in the Garbage-collection state.
Total
Total number of routes learned from all RIP neighbors.
fast-reroute
Use fast-reroute to configure RIP FRR.
Use undo fast-reroute to restore the default.
Syntax
fast-reroute route-policy route-policy-name
undo fast-reroute
Default
RIP FRR is disabled.
Views
RIP view
Predefined user roles
network-admin
Parameters
route-policy route-policy-name: Uses the specified routing policy to designate a backup next hop. The
route-policy-name argument is a case-sensitive string of 1 to 63 characters.
Usage guidelines
RIP FRR is only effective for RIP routes that are learned from directly connected neighbors.
Do not use RIP FRR and BFD for RIP at the same time. Otherwise, RIP FRR might fail to work.
Equal-cost routes do not support RIP FRR. RIP FRR does not take effect when the backup route information
is the same as the primary route information.
36
Examples
# Enable RIP FRR and use routing policy frr to specify a backup next hop.
<Sysname> system-view
[Sysname] bfd echo-source-ip 1.1.1.1
[Sysname] ip prefix-list abc index 10 permit 100.1.1.0 24
[Sysname] route-policy frr permit node 10
[Sysname-route-policy-frr-10] if-match ip address prefix-list abc
[Sysname-route-policy-frr-10] apply fast-reroute backup-interface vlan-interface 1
backup-nexthop 193.1.1.8
[Sysname-route-policy-frr-10] quit
[Sysname] rip 100
[Sysname-rip-100] fast-reroute route-policy frr
filter-policy export
Use filter-policy export to configure RIP to filter outbound routes.
Use undo filter-policy export to remove the filtering.
Syntax
filter-policy { acl-number | prefix-list prefix-list-name } export [ protocol [ process-id ] | interface-type
interface-number ]
undo filter-policy export [ protocol [ process-id ] | interface-type interface-number ]
Default
RIP does not filter outbound routes.
Views
RIP view
Predefined user roles
network-admin
Parameters
acl-number: Specifies an ACL by its number in the range of 2000 to 3999 to filter outbound routes.
prefix-list prefix-list-name: Specifies an IP prefix list by its name, a string of 1 to 63 characters, to filter
outbound routes.
protocol: Filters outbound routes redistributed from the specified routing protocol, which can be bgp,
direct, isis, ospf, rip, and static.
process-id: Specifies the process ID of the specified routing protocol, in the range of 1 to 65535. Specify
a process ID when the routing protocol is rip, ospf, or isis. If no process ID is specified, the default
process ID is 1.
interface-type interface-number: Specifies an interface by its type and number.
Usage guidelines
If a protocol is specified, RIP filters only outbound routes redistributed from the specified routing protocol.
Otherwise, RIP filters all outbound routes.
If an interface is specified, RIP filters only routes advertised by the specified interface. Otherwise, RIP
filters routes advertised by all RIP interfaces.
37
To reference an advanced ACL (with a number from 3000 to 3999) in the command, configure the ACL
using one of the following methods:
•
To deny/permit a route with the specified destination, use the rule [ rule-id ] { deny | permit } ip
source sour-addr sour-wildcard command.
•
To deny/permit a route with the specified destination and mask, use the rule [ rule-id ] { deny |
permit } ip source sour-addr sour-wildcard destination dest-addr dest-wildcard command.
The source keyword specifies the destination address of a route and the destination keyword specifies the
subnet mask of the route. The specified subnet mask must be contiguous. Otherwise, the mask
configuration does not take effect.
Examples
# Use ACL 2000 to filter outbound routes.
<Sysname> system-view
[Sysname] acl number 2000
[Sysname-acl-basic-2000] rule deny source 192.168.10.0 0.0.0.255
[Sysname-acl-basic-2000] quit
[Sysname] rip 1
[Sysname-rip-1] filter-policy 2000 export
# Use IP prefix list abc to filter outbound routes.
<Sysname> system-view
[Sysname] ip prefix-list abc index 10 permit 11.0.0.0 8
[Sysname] rip 1
[Sysname-rip-1] filter-policy prefix-list abc export
# Configure ACL 3000 to permit only route 113.0.0.0/16 to pass. Use ACL 3000 to filter outbound
routes.
<Sysname> system-view
[Sysname] acl number 3000
[Sysname-acl-adv-3000] rule 10 permit ip source 113.0.0.0 0 destination 255.255.0.0 0
[Sysname-acl-adv-3000] rule 100 deny ip
[Sysname-acl-adv-3000] quit
[Sysname] rip 1
[Sysname-rip 1] filter-policy 3000 export
Related commands
•
acl (ACL and QoS Command Reference)
•
import-route
•
ip prefix-list
filter-policy import
Use filter-policy import to configure RIP to filter inbound routes.
Use undo filter-policy import to restore the default.
Syntax
filter-policy { acl-number | gateway prefix-list-name | prefix-list prefix-list-name [ gateway
prefix-list-name ] } import [ interface-type interface-number ]
undo filter-policy import [ interface-type interface-number ]
38
Default
RIP does not filter inbound routes.
Views
RIP view
Predefined user roles
network-admin
Parameters
acl-number: Specifies an ACL by its number in the range of 2000 to 3999 to filter inbound routes.
prefix-list prefix-list-name: Specifies an IP prefix list by its name, a string of 1 to 63 characters, to filter
inbound routes.
gateway prefix-list-name: Specifies an IP prefix list by its name, a string of 1 to 63 characters, to filter
routes from the gateway.
interface-type interface-number: Specifies an interface by its type and number.
Usage guidelines
To reference an advanced ACL (with a number from 3000 to 3999) in the command, configure the ACL
using one of the following methods:
•
To deny/permit a route with the specified destination, use the rule [ rule-id ] { deny | permit } ip
source sour-addr sour-wildcard command
•
To deny/permit a route with the specified destination and mask, use the rule [ rule-id ] { deny |
permit } ip source sour-addr sour-wildcard destination dest-addr dest-wildcard command.
The source keyword specifies the destination address of a route and the destination keyword specifies the
subnet mask of the route. The subnet mask must be contiguous. Otherwise, the mask configuration does
not take effect.
Examples
# Use ACL 2000 to filter inbound RIP routes.
<Sysname> system-view
[Sysname] acl number 2000
[Sysname-acl-basic-2000] rule deny source 192.168.10.0 0.0.0.255
[Sysname-acl-basic-2000] quit
[Sysname] rip 1
[Sysname-rip-1] filter-policy 2000 import
# Use IP prefix list abc to filter inbound RIP routes.
<Sysname> system-view
[Sysname] ip prefix-list abc index 10 permit 11.0.0.0 8
[Sysname] rip 1
[Sysname-rip-1] filter-policy prefix-list abc import
# Configure ACL 3000 to permit only route 113.0.0.0/16 to pass. Use ACL 3000 to filter inbound routes.
<Sysname> system-view
[Sysname] acl number 3000
[Sysname-acl-adv-3000] rule 10 permit ip source 113.0.0.0 0 destination 255.255.0.0 0
[Sysname-acl-adv-3000] rule 100 deny ip
[Sysname-acl-adv-3000] quit
[Sysname] rip 1
39
[Sysname-rip-1] filter-policy 3000 import
Related commands
•
acl (ACL and QoS Command Reference)
•
ip prefix-list
graceful-restart
Use graceful-restart to enable GR for RIP.
Use undo graceful-restart to disable RIP GR capability.
Syntax
graceful-restart
undo graceful-restart
Default
RIP GR is disabled.
Views
RIP view
Predefined user roles
network-admin
Examples
# Enable GR for RIP process 1.
<Sysname> system-view
[Sysname] rip 1
[Sysname-rip-1] graceful-restart
host-route
Use host-route to enable host route reception.
Use undo host-route to disable host route reception.
Syntax
host-route
undo host-route
Default
RIP receives host routes.
Views
RIP view
Predefined user roles
network-admin
40
Usage guidelines
A router might receive many host routes from the same subnet. These routes are not helpful for routing and
occupy many resources. To solve this problem, use the undo host-route command to disable RIP from
receiving host routes.
This command takes effect only for RIPv2.
Examples
# Disable RIP from receiving host routes.
<Sysname> system-view
[Sysname] rip 1
[Sysname-rip-1] undo host-route
import-route
Use import-route to enable route redistribution from another routing protocol.
Use undo import-route to disable route redistribution.
Syntax
import-route protocol [ process-id | all-processes | allow-ibgp ] [ cost cost | route-policy
route-policy-name | tag tag ] *
undo import-route protocol [ process-id | all-processes ]
Default
RIP does not redistribute routes from any other routing protocol.
Views
RIP view
Predefined user roles
network-admin
Parameters
protocol: Specifies a routing protocol from which RIP redistributes routes. It can be bgp, direct, isis, ospf,
rip, or static.
process-id: Specifies a process by its ID in the range of 1 to 65535. The default is 1. This argument is
available only when the protocol is isis, rip, or ospf.
all-processes: Enables route redistribution from all the processes of the specified protocol. This keyword
takes effect only when the protocol is rip, ospf, or isis.
allow-ibgp: Allows redistribution of IBGP routes. This keyword is available when the protocol argument
is set to bgp.
cost cost: Specifies a cost for redistributed routes, in the range of 0 to 16. The default cost is 0.
route-policy route-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to 63
characters.
tag tag: Specifies a tag for marking redistributed routes, in the range of 0 to 65535. The default is 0.
41
Usage guidelines
The import-route bgp command redistributes only EBGP routes. The import-route bgp allow-ibgp
command additionally redistributes IBGP routes and might cause routing loops. Therefore, use it with
caution.
This command redistributes only active routes. To view route state information, use the display ip
routing-table protocol command.
The undo import-route protocol all-processes command removes only the configuration made by the
import-route protocol all-processes command, instead of the configuration made by the import-route
protocol process-id command.
Examples
# Redistribute static routes into RIP, and set the cost for redistributed routes to 4.
<Sysname> system-view
[Sysname] rip 1
[Sysname-rip-1] import-route static cost 4
Related commands
default cost
maximum load-balancing
Use maximum load-balancing to specify the maximum number of equal-cost multi-path (ECMP) routes for
load balancing.
Use undo maximum load-balancing to restore the default.
Syntax
maximum load-balancing number
undo maximum load-balancing
Views
RIP view
Predefined user roles
network-admin
Parameters
number: Specifies the maximum number of ECMP routes.
Usage guidelines
The value range for the number argument and the default setting depend on the max-ecmp-num
command.
If you set the maximum number of ECMP routes to m by using the max-ecmp-num command, the number
argument in the maximum load-balancing command is in the range of 1 to m and defaults to m.
Examples
# Specify the maximum number of ECMP routes as 2.
<Sysname> system-view
[Sysname] rip
[Sysname-rip-1] maximum load-balancing 2
42
Related commands
max-ecmp-num
network
Use network to enable RIP on an interface attached to a specified network.
Use undo network to disable RIP on an interface attached to a specified network.
Syntax
network network-address
undo network network-address
Default
RIP is disabled on an interface.
Views
RIP view
Predefined user roles
network-admin
Parameters
network-address: Specifies a subnet address where an interface resides.
Usage guidelines
RIP runs only on an interface attached to the specified network. An interface not on the specified network
does not receive or send RIP routes, or advertise its direct routes.
For a single RIP process, the network 0.0.0.0 command can enable RIP on all interfaces. If multiple RIP
processes exist, the command is not applicable.
If a physical interface is attached to multiple networks, you cannot advertise these networks in different
RIP processes.
Examples
# Enable RIP on the interface attached to the network 129.102.0.0.
<Sysname> system-view
[Sysname] rip 100
[Sysname-rip-100] network 129.102.0.0
output-delay
Use output-delay to configure the rate at which an interface sends RIP packets.
Use undo output-delay to restore the default.
Syntax
output-delay time count count
undo output-delay
Default
An interface sends up to three RIP packets every 20 milliseconds.
43
Views
RIP view
Predefined user roles
network-admin
Parameters
time: Specifies the sending interval in the range of 10 to 100 milliseconds.
count: Specifies the maximum number of RIP packets sent at each interval, in the range of 1 to 30.
Examples
# Configure all interfaces running RIP process 1 to send up to 10 RIP packets every 60 milliseconds.
<Sysname> system-view
[Sysname] rip 1
[Sysname-rip-1] output-delay 60 count 10
preference
Use preference to specify a preference for RIP routes.
Use undo preference to restore the default.
Syntax
preference [ route-policy route-policy-name ] value
undo preference
Default
The preference of RIP routes is 100.
Views
RIP view
Predefined user roles
network-admin
Parameters
route-policy route-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to 63
characters.
value: Specifies a preference for RIP routes, in the range of 1 to 255. The smaller the value, the higher the
preference.
Usage guidelines
You can specify a routing policy by using the keyword route-policy to set a preference for matching RIP
routes.
•
The preference set by the routing policy applies to all matching RIP routes. The preference of other
routes is set by the preference command.
•
If no preference is set by the routing policy, the preference of all RIP routes is set by the preference
command.
Examples
# Set a preference of 120 for RIP routes.
44
<Sysname> system-view
[Sysname] rip 1
[Sysname-rip-1] preference 120
reset rip process
Use reset rip process to reset a RIP process.
Syntax
reset rip process-id process
Views
User view
Predefined user roles
network-admin
Parameters
process-id: Specifies a RIP process by its ID in the range of 1 to 65535.
Usage guidelines
After executing the command, you are prompted to confirm the operation.
Examples
# Reset RIP process 100.
<Sysname> reset rip 100 process
Reset RIP process? [Y/N]:y
reset rip statistics
Use reset rip statistics to clear statistics for a RIP process.
Syntax
reset rip process-id statistics
Views
User view
Predefined user roles
network-admin
network-operator
Parameters
process-id: Specifies a RIP process by its ID in the range of 1 to 65535.
Examples
# Clear statistics for RIP process 100.
<Sysname> reset rip 100 statistics
rip
Use rip to create a RIP process and enter RIP view.
45
Use undo rip to disable a RIP process.
Syntax
rip [ process-id ] [ vpn-instance vpn-instance-name ]
undo rip [ process-id ]
Default
No RIP process runs.
Views
System view
Predefined user roles
network-admin
Parameters
process-id: Specifies a RIP process by its ID in the range of 1 to 65535. The default is 1.
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN by its name, a case-sensitive string of 1 to 31
characters. If no VPN is specified, the RIP process runs on the public network.
Usage guidelines
You must create a RIP process before configuring global parameters for it. This restriction does not apply
to configuring interface parameters.
If you disable a RIP process, the configured interface parameters become invalid.
Examples
# Create a RIP process and enter RIP process view.
<Sysname> system-view
[Sysname] rip
[Sysname-rip-1]
rip authentication-mode
Use rip authentication-mode to configure RIPv2 authentication.
Use undo rip authentication-mode to cancel RIPv2 authentication.
Syntax
rip authentication-mode { md5 { rfc2082 { cipher cipher-string | plain plain-string } key-id | rfc2453
{ cipher cipher-string | plain plain-string } } | simple { cipher cipher-string | plain plain-string } }
undo rip authentication-mode
Default
RIPv2 authentication is not configured.
Views
Interface view
Predefined user roles
network-admin
46
Parameters
md5: Specifies the MD5 authentication.
rfc2082: Uses the message format defined in RFC 2082.
cipher: Sets a ciphertext key.
cipher-string: Specifies a ciphertext key, a case-sensitive string of 33 to 53 characters.
plain: Sets a plaintext key.
plain-string: Specifies a plaintext key, a case-sensitive string of 1 to 16 characters.
key-id: Specifies the RFC 2082 MD5 key ID in the range of 1 to 255.
rfc2453: Uses the message format defined in RFC 2453 (IETF standard).
simple: Specifies the simple authentication mode.
Usage guidelines
A newly configured key overwrites the old one, if any.
Although you can specify an authentication mode for RIPv1 in interface view, the configuration does not
take effect because RIPv1 does not support authentication.
For secrecy, all keys, including keys configured in plain text, are saved in cipher text.
Examples
# Configure MD5 authentication on VLAN-interface 10 and specify a plaintext key rose in the format
defined in RFC 2453.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] rip version 2
[Sysname-Vlan-interface10] rip authentication-mode md5 rfc2453 plain rose
Related commands
rip version
rip bfd enable
Use rip bfd enable to enable BFD for RIP on an interface.
Use undo rip bfd enable to restore the default.
Syntax
rip bfd enable
undo rip bfd enable
Default
BFD for RIP is disabled on an interface.
Views
Interface view
Predefined user roles
network-admin
47
Usage guidelines
RIP supports only BFD echo-mode detection.
Examples
# Enable BFD for RIP on VLAN-interface 11.
<Sysname> system-view
[Sysname] interface vlan-interface 11
[Sysname-Vlan-interface11] rip bfd enable
rip default-route
Use rip default-route to configure a RIP interface to advertise a default route with a specified metric.
Use undo rip default-route to disable a RIP interface from sending a default route.
Syntax
rip default-route { { only | originate } [ cost cost ] | no-originate }
undo rip default-route
Default
A RIP interface advertises a default route if the RIP process that the interface runs is enabled to advertise
a default route.
Views
Interface view
Predefined user roles
network-admin
Parameters
only: Advertises only a default route.
originate: Advertises both a default route and other routes.
cost: Specifies a cost for the default route, in the range of 1 to 15. The default is 1.
no-originate: Advertises only non-default routes.
Usage guidelines
An interface that is enabled to advertise a default route does not receive any default route from RIP
neighbors.
Examples
# Configure VLAN-interface 10 to advertise only a default route with a metric of 2.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] rip default-route only cost 2
# Configure VLAN-interface 10 to advertise a default route with a metric of 2 and other routes.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] rip default-route originate cost 2
48
Related commands
default-route
rip input
Use rip input to enable an interface to receive RIP messages.
Use undo rip input to disable an interface from receiving RIP messages.
Syntax
rip input
undo rip input
Default
An interface is enabled to receive RIP messages.
Views
Interface view
Predefined user roles
network-admin
Examples
# Disable VLAN-interface 10 from receiving RIP messages.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] undo rip input
rip metricin
Use rip metricin to configure an interface to add a metric to inbound routes.
Use undo rip metricin to restore the default.
Syntax
rip metricin [ route-policy route-policy-name ] value
undo rip metricin
Default
The additional metric of an inbound route is 0.
Views
Interface view
Predefined user roles
network-admin
Parameters
route-policy route-policy-name: Uses the specified routing policy to add an additional metric for the
routes matching it. The route-policy-name argument is a case-sensitive string of 1 to 63 characters.
value: Add an additional metric to inbound routes, in the range of 0 to 16.
49
Usage guidelines
When a valid RIP route is received, the system adds a metric to it and then installs it into the routing table.
The metric of the route received on the configured interface is then increased. If the sum of the additional
metric and the original metric is greater than 16, the metric of the route will be 16.
If a routing policy is referenced with the route-policy keyword, the following operations can be
performed:
•
Routes matching the policy are added with the metric specified in the apply cost command
configured in the policy. Routes not matching it are added with the metric specified in the rip
metricout command. The rip metricout command does not support the + or – keyword—used to
add or reduce a metric—specified in the apply cost command.
•
If the apply cost command is not configured in the policy, all the inbound routes are added with the
metric specified in the rip metricout command.
Examples
# Configure VLAN-interface 10 to add a metric of 6 to the inbound route 1.0.0.0/8 and to add a metric
of 2 to other inbound routes.
<Sysname> system-view
[Sysname] ip prefix-list 123 permit 1.0.0.0 8
[Sysname] route-policy abc permit node 0
[Sysname-route-policy-abc-10] if-match ip address prefix-list 123
[Sysname-route-policy-abc-10] apply cost 6
[Sysname-route-policy-abc-10] quit
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] rip metricin route-policy abc 2
Related commands
apply cost
rip metricout
Use rip metricout to configure an interface to add a metric to outbound routes.
Use undo rip metricout to restore the default.
Syntax
rip metricout [ route-policy route-policy-name ] value
undo rip metricout
Default
The additional metric for outbound routes is 1.
Views
Interface view
Predefined user roles
network-admin
Parameters
route-policy route-policy-name: Uses the specified routing policy to add an additional metric for the
routes matching it. The route-policy-name argument is a case-sensitive string of 1 to 63 characters.
50
value: Add an additional metric to outbound routes, in the range of 1 to 16.
Usage guidelines
With the command configured on an interface, the metric of RIP routes sent on the interface will be
increased.
If a routing policy is referenced with the route-policy keyword, the following operations can be
performed:
•
Routes matching the policy is added with the metric specified in the apply cost command
configured in the policy. Routes not matching it are added with the metric specified in the rip
metricout command. The rip metricout command does not support the + or – keyword—used to
add or reduce a metric—specified in the apply cost command.
•
If the apply cost command is not configured in the policy, all the outbound routes are added with
the metric specified in the rip metricout command.
Examples
# Configure VLAN-interface 10 to add a metric of 6 to the outbound route 1.0.0.0/8 and to add a
metric of 2 to other outbound routes.
<Sysname> system-view
[Sysname] ip prefix-list 123 permit 1.0.0.0 8
[Sysname] route-policy abc permit node 0
[Sysname-route-policy-abc-10] if-match ip address prefix-list 123
[Sysname-route-policy-abc-10] apply cost 6
[Sysname-route-policy-abc-10] quit
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] rip metricin route-policy abc 2
Related commands
apply cost
rip output
Use rip output to enable an interface to send RIP messages.
Use undo rip output to disable an interface from sending RIP messages.
Syntax
rip output
undo rip output
Default
An interface receives RIP messages.
Views
Interface view
Predefined user roles
network-admin
Examples
# Disable VLAN-interface 10 from sending RIP messages.
<Sysname> system-view
51
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] undo rip output
rip poison-reverse
Use rip poison-reverse to enable the poison reverse function.
Use undo rip poison-reverse to disable the poison reverse function.
Syntax
rip poison-reverse
undo rip poison-reverse
Default
The poison reverse function is disabled.
Views
Interface view
Predefined user roles
network-admin
Examples
# Enable the poison reverse function on VLAN-interface 10.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] rip poison-reverse
rip split-horizon
Use rip split-horizon to enable the split horizon function.
Use undo rip split-horizon to disable the split horizon function.
Syntax
rip split-horizon
undo rip split-horizon
Default
The split horizon function is enabled.
Views
Interface view
Predefined user roles
network-admin
Usage guidelines
•
The split horizon function prevents routing loops. If you want to disable the function, make sure that
the operation is dispensable.
•
If both split horizon and poison reverse are enabled, only the poison reverse function takes effect.
52
Examples
# Enable the split horizon function on VLAN-interface 10.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] rip split-horizon
rip summary-address
Use rip summary-address to configure RIPv2 to advertise a summary route on an interface.
Use undo rip summary-address to remove the configuration.
Syntax
rip summary-address ip-address { mask | mask-length }
undo rip summary-address ip-address { mask | mask-length }
Default
RIPv2 does not advertise a summary route.
Views
Interface view
Predefined user roles
network-admin
Parameters
ip-address: Specifies the destination IP address of the summary route.
mask: Specifies the subnet mask of the summary route, in dotted decimal notation.
mask-length: Specifies the subnet mask length of the summary route, in the range of 0 to 32.
Usage guidelines
This command takes effect only when automatic route summarization is disabled.
Examples
# Advertise a summary route on VLAN-interface 10.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] rip summary-address 10.0.0.0 255.255.255.0
Related commands
summary
rip version
Use rip version to specify a RIP version on an interface.
Use undo rip version to restore the default.
Syntax
rip version { 1 | 2 [ broadcast | multicast ] }
undo rip version
53
Default
No RIP version is configured on an interface. The interface can send RIPv1 broadcasts, and receive RIPv1
broadcasts and unicasts, and RIPv2 broadcasts, multicasts, and unicasts.
Views
Interface view
Predefined user roles
network-admin
Parameters
1: Specifies the RIP version as RIPv1.
2: Specifies the RIP version as RIPv2.
[ broadcast | multicast ]: Sends RIPv2 messages in broadcast mode or multicast mode (default).
Usage guidelines
If an interface has no RIP version configured, it uses the global RIP version. Otherwise, it uses the RIP
version configured on it.
An interface running RIPv1 can perform the following operations:
•
Sends RIPv1 broadcast messages.
•
Receives RIPv1 broadcast and unicast messages.
An interface running RIPv2 in broadcast mode can perform the following operations:
•
Sends RIPv2 broadcast messages.
•
Receives RIPv1 broadcast and unicast messages, and RIPv2 broadcast, multicast, and unicast
messages.
An interface running RIPv2 in multicast mode can perform the following operations:
•
Sends RIPv2 multicast messages.
•
Receives RIPv2 broadcast, multicast, and unicast messages.
Examples
# Configure RIPv2 in broadcast mode on VLAN-interface 10.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] rip version 2 broadcast
Related commands
version
silent-interface
Use silent-interface to disable an interface from sending RIP messages. The interface can still receive RIP
messages.
Use undo silent-interface to restore the default.
Syntax
silent-interface { interface-type interface-number | all }
undo silent-interface { interface-type interface-number | all }
54
Default
All RIP interfaces can send RIP messages.
Views
RIP view
Predefined user roles
network-admin
Parameters
interface-type interface-number: Disables an specified interface from sending RIP messages.
all: Disables all interfaces from sending RIP messages.
Examples
# Configure all VLAN interfaces to operate in silent mode except VLAN-interface 10.
<Sysname> system-view
[Sysname] rip 100
[Sysname-rip-100] silent-interface all
[Sysname-rip-100] undo silent-interface vlan-interface 10
[Sysname-rip-100] network 131.108.0.0
summary
Use summary to enable automatic RIPv2 route summarization. Natural masks are used to advertise
summary routes to reduce the size of routing tables.
Use undo summary to disable automatic RIPv2 route summarization to advertise all subnet routes.
Syntax
summary
undo summary
Default
Automatic RIPv2 route summarization is enabled.
Views
RIP view
Predefined user roles
network-admin
Usage guidelines
Automatic RIPv2 route summarization can reduce the routing table size to enhance the scalability and
efficiency for large networks.
Examples
# Disable automatic RIPv2 route summarization.
<Sysname> system-view
[Sysname] rip
[Sysname-rip-1] undo summary
55
Related commands
•
rip summary-address
•
rip version
timers
Use timers to configure RIP timers.
Use undo timers to restore the default.
Syntax
timers { garbage-collect garbage-collect-value | suppress suppress-value | timeout timeout-value |
update update-value } *
undo timers { garbage-collect | suppress | timeout | update } *
Default
The garbage-collect timer is 120 seconds, the suppress timer is 120 seconds, the timeout timer is 180
seconds, and the update timer is 30 seconds.
Views
RIP view
Predefined user roles
network-admin
Parameters
garbage-collect-value: Specifies the garbage-collect timer in the range of 1 to 3600 seconds.
suppress-value: Specifies the suppress timer in the range of 0 to 3600 seconds.
timeout-value: Specifies the timeout timer in the range of 1 to 3600 seconds. The timeout timer must be
at least three times the update timer.
update-value: Specifies the update timer in the range of 1 to 3600 seconds.
Usage guidelines
RIP uses the following timers:
•
Update timer—Specifies the interval between routing updates.
•
Timeout timer—Specifies the route aging time. If no update for a route is received before the timer
expires, RIP sets the metric of the route to 16.
•
Suppress timer—Specifies how long a RIP route stays in suppressed state. When the metric of a
route becomes 16, the route enters the suppressed state. If RIP receives an update for the route from
the same neighbor and the route in the update has a metric less than 16, RIP uses the route to
replace the suppressed route.
•
Garbage-collect timer—Specifies the interval from when the metric of a route becomes 16 to when
it is deleted from the routing table. During the garbage-collect timer length, RIP advertises the route
with a metric of 16. If no update is announced for that route before the garbage-collect timer expires,
RIP deletes the route from the routing table.
HP recommends not changing the default values of these timers.
The timer lengths must be consistent on all routers on the network.
56
Examples
# Configure the update, timeout, suppress, and garbage-collect timers as 5, 15, 15, and 30 seconds.
<Sysname> system-view
[Sysname] rip 100
[Sysname-rip-100] timers update 5 timeout 15 suppress 15 garbage-collect 30
validate-source-address
Use validate-source-address to enable source IP address check on inbound RIP routing updates.
Use undo validate-source-address to disable source IP address check.
Syntax
validate-source-address
undo validate-source-address
Default
Source IP address check on inbound RIP routing updates is enabled.
Views
RIP view
Predefined user roles
network-admin
Usage guidelines
HP recommends not disabling source IP address check.
Examples
# Disable source IP address check on inbound RIP routing updates.
<Sysname> system-view
[Sysname-rip] rip 100
[Sysname-rip-100] undo validate-source-address
version
Use version to specify a global RIP version.
Use undo version to restore the default.
Syntax
version { 1 | 2 }
undo version
Default
No global RIP version is configured. An RIP interface can send RIPv1 broadcasts and receive RIPv1
broadcasts and unicasts, and RIPv2 broadcasts, multicasts, and unicasts.
Views
RIP view
57
Predefined user roles
network-admin
Parameters
1: Specifies the RIP version as RIPv1.
2: Specifies the RIP version as RIPv2. RIPv2 messages are multicast.
Usage guidelines
An interface prefers the RIP version configured on it over the global RIP version. If no RIP version is
specified for the interface and the global version is RIPv1, the interface uses RIPv1, and it can send RIPv1
broadcasts, and receive RIPv1 broadcasts and unicasts. If no RIP version is specified for the interface and
the global version is RIPv2, the interface uses RIPv2 multicast mode, and it can send RIPv2 multicasts, and
receive RIPv2 broadcasts, multicasts, and unicasts.
Examples
# Specify the global RIP version as RIPv2.
<Sysname> system-view
[Sysname] rip 100
[Sysname-rip-100] version 2
Related commands
rip version
58
OSPF commands
abr-summary (OSPF area view)
Use abr-summary to configure a summary route on an area border router (ABR).
Use undo abr-summary to remove a summary route.
Syntax
abr-summary ip-address { mask | mask-length } [ advertise | not-advertise ] [ cost cost ]
undo abr-summary ip-address { mask | mask-length }
Default
No route summarization is configured on an ABR.
Views
OSPF area view
Predefined user roles
network-admin
Parameters
ip-address: Specifies the destination IP address of the summary route in dotted decimal notation.
mask: Specifies the mask of the IP address in dotted decimal notation.
mask-length: Specifies the mask length in the range of 0 to 32 bits.
advertise | not-advertise: Advertises the summary route or not. By default, the command advertises the
summary route.
cost cost: Specifies the cost of the summary route, in the range of 1 to 16777215. The default cost is the
largest cost value among routes that are summarized.
Usage guidelines
This command is available only on an ABR to summarize multiple contiguous networks into one network.
To enable ABR to advertise more-specific routes, issue the undo abr-summary command.
Examples
# Summarize networks 36.42.10.0/24 and 36.42.110.0/24 in Area 1 into 36.42.0.0/16.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] area 1
[Sysname-ospf-100-area-0.0.0.1] network 36.42.10.0 0.0.0.255
[Sysname-ospf-100-area-0.0.0.1] network 36.42.110.0 0.0.0.255
[Sysname-ospf-100-area-0.0.0.1] abr-summary 36.42.0.0 255.255.0.0
area (OSPF view)
Use area to create an area and enter area view.
59
Use undo area to remove an area.
Syntax
area area-id
undo area area-id
Default
No OSPF area is created.
Views
OSPF view
Predefined user roles
network-admin
Parameters
area-id: Specifies an area by its ID, an IP address or a decimal integer in the range of 0 to 4294967295
that is translated into the IP address format by the system.
Examples
# Create area 0 and enter area 0 view.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] area 0
[Sysname-ospf-100-area-0.0.0.0]
asbr-summary
Use asbr-summary to configure a summary route on an ASBR.
Use undo asbr-summary to remove a summary route on an ASBR.
Syntax
asbr-summary ip-address { mask | mask-length } [ cost cost | not-advertise | tag tag ] *
undo asbr-summary ip-address { mask | mask-length }
Default
No route summarization is configured on an ASBR.
Views
OSPF view
Predefined user roles
network-admin
Parameters
ip-address: Specifies the destination IP address of the summary route.
mask: Specifies the mask in dotted decimal notation.
mask-length: Specifies the mask length in the range of 0 to 32 bits.
60
cost cost: Specifies the cost of the summary route, in the range of 1 to 16777214. For Type-1 external
routes, the cost defaults to the largest cost among routes that are summarized. For Type-2 external routes,
the cost defaults to the largest cost among routes that are summarized plus 1.
not-advertise: Disables advertising the summary route. Without this keyword, the command advertises
the route.
tag tag: Specifies a tag for marking the summary route, in the range of 0 to 4294967295. The default is
1. The tag can be used by a routing policy to control summary route advertisement.
Usage guidelines
With the asbr-summary command configured, an ASBR summarizes redistributed routes that fall into the
specified address range into a single route and advertises the summary route in a Type-5 LSA to
neighbors. If the ASBR resides in an NSSA area, it advertises the summary route in a Type-7 LSA.
With the asbr-summary command configured, an NSSA ABR summarizes matching routes described by
Type-5 LSAs that are translated from Type-7 LSAs, and advertises the summary route to neighbors. This
command does not take effect on non NSSA ABRs.
To enable ASBR to advertise more-specific routes, issue the undo asbr-summary command.
Examples
# Summarize redistributed static routes into a single route, and specify a tag value of 2 and a cost of 100
for the summary route.
<Sysname> system-view
[Sysname] ip route-static 10.2.1.0 24 null 0
[Sysname] ip route-static 10.2.2.0 24 null 0
[Sysname] ospf 100
[Sysname-ospf-100] import-route static
[Sysname-ospf-100] asbr-summary 10.2.0.0 255.255.0.0 tag 2 cost 100
Related commands
display ospf asbr-summary
authentication-mode
Use authentication-mode to specify an authentication mode for the OSPF area.
Use undo authentication-mode to restore the default.
Syntax
authentication-mode { md5 | simple }
undo authentication-mode
Default
No authentication mode is configured for an area.
Views
OSPF area view
Predefined user roles
network-admin
Parameters
md5: Specifies the MD5 authentication mode.
61
simple: Specifies the simple authentication mode.
Usage guidelines
Routers that reside in the same area must have the same authentication mode: no authentication, simple,
or MD5.
Examples
# Configure OSPF Area 0 to use the MD5 authentication mode.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] area 0
[Sysname-ospf-100-area-0.0.0.0] authentication-mode md5
Related commands
ospf authentication-mode
bandwidth-reference (OSPF view)
Use bandwidth-reference to specify a reference bandwidth value for link cost calculation.
Use undo bandwidth-reference to restore the default value.
Syntax
bandwidth-reference value
undo bandwidth-reference
Default
The default value is 100 Mbps.
Views
OSPF view
Predefined user roles
network-admin
Parameters
value: Specifies the bandwidth reference value for link cost calculation, in the range of 1 to 4294967
Mbps.
Usage guidelines
If no cost values are configured for links, OSPF calculates their cost values by using the formula: Cost =
Reference bandwidth value/Link bandwidth. If the calculated cost is greater than 65535, the value of
65535 is used.
Examples
# Specify the reference bandwidth value as 1000 Mbps.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] bandwidth-reference 1000
default
Use default to configure default parameters for redistributed routes.
62
Use undo default to remove the configuration.
Syntax
default { cost cost | tag tag | type type } *
undo default { cost | tag | type } *
Default
The cost is 1, the tag is 1, and the route type is 2.
Views
OSPF view
Predefined user roles
network-admin
Parameters
cost cost: Specifies the default cost for redistributed routes, in the range of 0 to 16777214.
tag tag: Specifies the tag for marking redistributed routes, in the range of 0 to 4294967295.
type type: Specifies the type for redistributed routes: 1 or 2.
Examples
# Configure the default cost, tag, and type as 10, 100, and 2 for redistributed external routes.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] default cost 10 tag 100 type 2
Related commands
import-route
default-cost (OSPF area view)
Use default-cost to configure a cost for the default route advertised to the stub or NSSA area.
Use undo default-cost to restore the default value.
Syntax
default-cost cost
undo default-cost
Default
The cost is 1.
Views
OSPF area view
Predefined user roles
network-admin
Parameters
cost: Specifies a cost for the default route advertised to the Stub or NSSA area, in the range of 0 to
16777214.
63
Usage guidelines
This command takes effect only on the ABR of a stub area or the ABR/ASBR of an NSSA area.
Examples
# Configure Area 1 as a stub area, and specify the cost of the default route advertised to the stub area
as 20.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] area 1
[Sysname-ospf-100-area-0.0.0.1] stub
[Sysname-ospf-100-area-0.0.0.1] default-cost 20
Related commands
•
nssa
•
stub
default-route-advertise (OSPF view)
Use default-route-advertise to redistribute a default route into the OSPF routing domain.
Use undo default-route-advertise to restore the default.
Syntax
default-route-advertise [ [ [ always | permit-calculate-other ] | cost cost | route-policy
route-policy-name | type type ] * | summary cost cost ]
undo default-route-advertise
Default
No default route is redistributed into the OSPF routing domain.
Views
OSPF view
Predefined user roles
network-admin
Parameters
always: Generates a default route in a Type-5 LSA into the OSPF routing domain regardless of whether
or not there is a default route in the routing table. If this keyword is not specified, the router generates a
default route in a Type-5 LSA into the OSPF routing domain only when an active default route that does
not belong to the current OSPF process exists in the IP routing table.
permit-calculate-other: Enables OSPF to calculate default routes received from other routers. Without this
keyword, OSPF does not calculate default routes from other routers. If the router does not generate any
default route in a Type-5 LSA into the OSPF routing domain, the router calculates default routes from other
routers regardless of whether this keyword is specified.
cost cost: Specifies a cost for the default route, in the range of 0 to 16777214. If no cost is specified, the
default cost specified by the default cost command applies.
route-policy route-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to 63
characters. When a default route exists in the routing table and the specified routing policy is matched,
the command distributes a default route in a Type-5 LSA into the OSPF routing domain, and the routing
64
policy modifies some values in the Type-5 LSA. If the always keyword is specified at the same time, the
command can distribute a default route in a Type-5 LSA into the OSPF routing domain when the specified
routing policy is matched, regardless of whether a default route exists in the routing table, and the routing
policy modifies some values in the Type-5 LSA.
type type: Specifies a type for the Type-5 LSA: 1 or 2. If no type is specified, the default type for the
Type-5 LSA specified by the default type command applies.
summary: Advertises the specified default route in a Type-3 LSA. This keyword is available only for VPNs.
Usage guidelines
This command redistributes a default route in a Type-5 LSA, which cannot be redistributed with the
import-route command. If the local routing table has no default route, you must provide the always
keyword for the command.
The default-route-advertise summary cost command is applicable only to VPNs. It enables a PE router
to redistribute a default external route in a Type-3 LSA to CE routers.
Examples
# Generate a default route into the OSPF routing domain, regardless of whether the default route exists
in the local routing table.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] default-route-advertise always
Related commands
•
default
•
import-route
description (OSPF/OSPF area view)
Use description to configure a description for an OSPF process or area.
Use undo description to restore the default.
Syntax
description description
undo description
Default
No description is configured for an OSPF process or area.
Views
OSPF view, OSPF area view
Predefined user roles
network-admin
Parameters
description: Configures a description for the OSPF process in OSPF view, or for the OSPF area in OSPF
area view. The description argument specifies a string of 1 to 80 characters.
Usage guidelines
The description specified by this command is used to identify an OSPF process or area.
65
Examples
# Describe OSPF process 100 as abc.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] description abc
# Describe OSPF area 0 as bone area.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] area 0
[Sysname-ospf-100-area-0.0.0.0] description bone area
display ospf abr-asbr
Use display ospf abr-asbr to display routes to the ABR or ASBR.
Syntax
display ospf [ process-id ] abr-asbr
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
process-id: Specifies an OSPF process by its ID in the range of 1 to 65535.
Usage guidelines
If no process ID is specified, this command displays routes to the ABR/ASBR for all OSPF processes.
If you use this command on routers in a stub area, the commands displays no ASBR information.
Examples
# Display information about routes to the ABR or ASBR.
<Sysname> display ospf abr-asbr
OSPF Process 1 with Router ID 192.168.1.2
Routing Table to ABR and ASBR
Type
Destination
Area
Cost
Nexthop
RtType
Inter
3.3.3.3
0.0.0.0
3124
10.1.1.2
ASBR
Intra
2.2.2.2
0.0.0.0
1562
10.1.1.2
ABR
Table 13 Command output
Field
Description
Type of the route to the ABR or ASBR:
• Intra—Intra-area route.
• Inter—Inter-area route.
Type
66
Field
Description
Destination
Router ID of an ABR/ASBR.
Area
ID of the area of the next hop.
Cost
Cost from the router to the ABR/ASBR.
Nexthop
Next hop address.
RtType
Router type: ABR or ASBR.
display ospf asbr-summary
Use display ospf asbr-summary to display information about the redistributed routes that are
summarized.
Syntax
display ospf [ process-id ] asbr-summary [ ip-address { mask | mask-length } ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
process-id: Specifies an OSPF process by its ID in the range of 1 to 65535.
ip-address: Specifies an IP address in dotted decimal notation.
mask: Specifies the mask in dotted decimal notation.
mask-length: Specifies the mask length in the range of 0 to 32 bits.
Usage guidelines
If no OSPF process is specified, this command displays the summarized redistributed routes for all OSPF
processes.
If no IP address is specified, this command displays all summarized redistributed routes.
Examples
# Display information about all summarized redistributed routes.
<Sysname> display ospf asbr-summary
OSPF Process 1 with Router ID 2.2.2.2
Summary Addresses
Total Summary Address Count: 1
Summary Address
Net
: 30.1.0.0
Mask
: 255.255.0.0
67
Tag
: 20
Status
: Advertise
Cost
: 10 (Configured)
The Count of Route is : 2
Destination
Net Mask
Proto
Process
Type
Metric
30.1.2.0
255.255.255.0
OSPF
2
2
1
30.1.1.0
255.255.255.0
OSPF
2
2
1
Table 14 Command output
Field
Description
Total Summary Address Count
Total number of summary routes.
Net
Address of the summary route.
Mask
Mask of the summary route address.
Tag
Tag of the summary route.
Status
Advertisement status of the summary route.
Cost
Cost to the summary network.
The Count of Route
Number of summarized routes.
Destination
Destination address of a summarized route.
Net Mask
Network mask of a summarized route.
Proto
Routing protocol.
Process
Process ID of the routing protocol.
Type
Type of a summarized route.
Metric
Metric of a summarized route.
Related commands
asbr-summary
display ospf brief
Use display ospf brief to display OSPF brief information.
Syntax
display ospf [ process-id ] brief
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
process-id: Specifies an OSPF process by its ID in the range of 1 to 65535.
68
Usage guidelines
If no OSPF process is specified, this command displays brief information about all OSPF processes.
Examples
# Display OSPF brief information.
<Sysname> display ospf brief
OSPF Process 1 with Router ID 192.168.1.2
OSPF Protocol Information
RouterID: 192.168.1.2
Router Type:
NSSA
Route Tag: 0
Multi-VPN-Instance is not enabled
Opaque capable
ISPF is enabled
SPF-schedule-interval: 5 50 200
LSA generation interval: 5
LSA arrival interval: 1000
Transmit pacing: Interval: 20 Count: 3
Default ASE parameters: Metric: 1 Tag: 1 Type: 2
Route Preference: 10
ASE Route Preference: 150
SPF Computation Count: 22
RFC 1583 Compatible
Graceful restart interval: 120
This process is currently bound to MIB
Area Count: 1
Nssa Area Count: 1
ExChange/Loading Neighbors: 0
SNMP trap rate limit interval: 2
Area: 0.0.0.1
(MPLS TE
Count: 300
not enabled)
Authtype: None Area flag: NSSA
7/5 translator state: Disabled
7/5 translate stability timer interval: 0
SPF Scheduled Count: 5
ExChange/Loading Neighbors: 0
Interface: 192.168.1.2 (Vlan-interface1)
Cost: 1
State: DR
Type: Broadcast
MTU: 1500
Priority: 1
Designated Router: 192.168.1.2
Backup Designated Router: 192.168.1.1
Timers: Hello 10 , Dead 40 , Poll
40 , Retransmit 5 , Transmit Delay 1
FRR backup: enable
Table 15 Command output
Field
Description
OSPF Process 1 with Router ID 192.168.1.2
OSPF process ID and OSPF router ID.
69
Field
Description
RouterID
Router ID.
Router type:
Router Type
•
•
•
•
ABR.
ASBR.
NSSA.
Null.
Route Tag
Tag of redistributed routes.
Multi-VPN-Instance is not enabled
The OSPF process does not support multi-VPN-instance.
Opaque capable
The opaque LSA advertisement and reception is enabled.
ISPF is enabled
OSPF ISPF is enabled
SPF-schedule-interval
Interval for SPF calculations.
LSA generation interval
LSA generation interval.
LSA arrival interval
LSA arrival interval.
LSU packet transmit rate of the interface:
Transmit pacing
• Interval—LSU transmit interval of the interface.
• Count—Maximum number of LSU packets sent each time.
Default ASE Parameter
Default ASE Parameters: metric, tag, route type.
Route Preference
Internal route preference.
ASE Route Preference
External route preference.
SPF Computation count
SPF computation count of the OSPF process.
RFC1583 Compatible
Compatible with RFC 1583.
Area Count
Area number of the current process.
Nssa Area Count
NSSA area number of the current process.
SNMP trap rate limit interval
SNMP trap sending interval.
Count
Number of sent SNMP traps.
State of the translator that translates Type-7 LSAs to Type-5
LSAs. The value can be one of the following:
7/5 translator state
• Enabled—The translator is specified through commands.
• Elected—The translator is designated through election.
• Disabled—The device is not a translator that translates
Type-7 LSAs to Type-5 LSAs.
7/5 translate stability timer interval
Stability interval for Type-7 LSA-to-Type-5 LSA translation.
ExChange/Loading Neighbors
Neighbors in ExChange/Loading state.
Area
Area ID in the IP address format.
Authentication type of the area:
Authtype
• None—No authentication.
• Simple—Simple authentication.
• MD5—MD5 authentication.
70
Field
Description
Type of the area:
•
•
•
•
•
Area flag
Normal.
Stub.
StubNoSummary (totally stub area).
NSSA.
NSSANoSummary (totally NSSA area).
SPF scheduled Count
SPF calculation count in the OSPF area.
Interface
Interface in the area.
Cost
Interface cost.
State
Interface state.
Type
Interface network type.
MTU
Interface MTU.
Priority
Router priority.
OSPF timers:
•
•
•
•
Timers
FRR backup
Hello—Interval for sending hello packets.
Dead—Interval within which the neighbor is down.
Poll—Interval for sending hello packets.
Retransmit—Interval for retransmitting LSAs.
Indicates whether Loop Free Alternate (LFA) calculation is
enabled on an interface.
display ospf cumulative
Use display ospf cumulative to display OSPF statistics.
Syntax
display ospf [ process-id ] cumulative
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
process-id: Specifies an OSPF process by its ID in the range of 1 to 65535.
Usage guidelines
If no process is specified, this command displays statistics for all OSPF processes.
Examples
# Display OSPF statistics.
<Sysname> display ospf cumulative
OSPF Process 1 with Router ID 2.2.2.2
71
Cumulations
IO Statistics
Type
Input
Output
Hello
61
122
DB Description
2
3
Link-State Req
1
1
Link-State Update
3
3
Link-State Ack
3
2
LSAs originated by this router
Router: 4
Network: 0
Sum-Net: 0
Sum-Asbr: 0
External: 0
NSSA: 0
Opq-Link: 0
Opq-Area: 0
Opq-As: 0
LSAs Originated: 4
LSAs Received: 7
Routing Table:
Intra Area: 2
Inter Area: 3
ASE/NSSA: 0
Table 16 Command output
Field
Description
IO statistics
Statistics about input/output packets and LSAs.
Type
OSPF packet type.
Input
Packets received.
Output
Packets sent.
Hello
Hell packet.
DB Description
Database Description packet.
Link-State Req
Link-State Request packet.
Link-State Update
Link-State Update packet.
Link-State Ack
Link-State Acknowledge packet.
LSAs originated by this router
LSAs originated by this router.
Router
Number of Type-1 LSAs originated.
Network
Number of Type-2 LSAs originated.
Sum-Net
Number of Type-3 LSAs originated.
Sum-Asbr
Number of Type-4 LSAs originated.
External
Number of Type-5 LSAs originated.
72
Field
Description
NSSA
Number of Type-7 LSAs originated.
Opq-Link
Number of Type-9 LSAs originated.
Opq-Area
Number of Type-10 LSAs originated.
Opq-As
Number of Type-11 LSAs originated.
LSA originated
Number of LSAs originated.
LSA Received
Number of LSAs received.
Routing Table
Routing table information.
Intra Area
Intra-area route number.
Inter Area
Inter-area route number.
ASE
ASE route number.
display ospf error
Use display ospf error to display OSPF error information.
Syntax
display ospf [ process-id ] error
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
process-id: Specifies an OSPF process by its ID in the range of 1 to 65535.
Usage guidelines
If no process is specified, this command displays OSPF error information for all OSPF processes.
Examples
# Display OSPF error information.
<Sysname> display ospf error
OSPF Process 1 with Router ID 192.168.1.112
OSPF Packet Error Statistics
0
: OSPF Router ID confusion
0
: OSPF bad packet
0
: OSPF bad version
0
: OSPF bad checksum
0
: OSPF bad area ID
0
: OSPF drop on unnumbered interface
0
: OSPF bad virtual link
0
: OSPF bad authentication type
0
: OSPF bad authentication key
0
: OSPF packet too small
0
: OSPF Neighbor state low
0
: OSPF transmit error
0
: OSPF interface down
0
: OSPF unknown neighbor
73
0
: HELLO: Netmask mismatch
0
: HELLO: Hello timer mismatch
0
: HELLO: Dead timer mismatch
0
: HELLO: Extern option mismatch
0
: DD: MTU option mismatch
0
: DD: Unknown LSA type
0
: DD: Extern option mismatch
0
: LS ACK: Bad ack
0
: LS ACK: Unknown LSA type
0
: LS REQ: Empty request
0
: LS REQ: Bad request
0
: LS UPD: LSA checksum bad
0
: LS UPD: Unknown LSA type
0
: LS UPD: Received less recent LSA
Table 17 Command output
Field
Description
OSPF Router ID confusion
Packets with duplicate route ID.
OSPF bad packet
Packets illegal.
OSPF bad version
Packets with wrong version.
OSPF bad checksum
Packets with wrong checksum.
OSPF bad area ID
Packets with invalid area ID.
OSPF drop on unnumbered interface
Packets dropped on the unnumbered interface.
OSPF bad virtual link
Packets on wrong virtual links.
OSPF bad authentication type
Packets with invalid authentication type.
OSPF bad authentication key
Packets with invalid authentication key.
OSPF packet too small
Packets too small in length.
OSPF Neighbor state low
Packets received in low neighbor state.
OSPF transmit error
Packets with error when being transmitted.
OSPF interface down
Shutdown times of the interface.
OSPF unknown neighbor
Packets received from unknown neighbors.
HELLO: Netmask mismatch
Hello packets with mismatched mask.
HELLO: Hello timer mismatch
Hello packets with mismatched hello timer.
HELLO: Dead timer mismatch
Hello packets with mismatched dead timer.
HELLO: Extern option mismatch
Hello packets with mismatched option field.
HELLO: Neighbor unknown
Hello packets received from unknown neighbors.
DD: MTU option mismatch
DD packets with mismatched MTU.
DD: Unknown LSA type
DD packets with unknown LSA type.
DD: Extern option mismatch
DD packets with mismatched option field.
LS ACK: Bad ack
Bad LSAck packets for LSU packets.
LS ACK: Unknown LSA type
LSAck packets with unknown LSA type.
LS REQ: Empty request
LSR packets with no request information.
LS REQ: Bad request
Bad LSR packets.
LS UPD: LSA checksum bad
LSU packets with wrong LSA checksum.
LS UPD: Received less recent LSA
LSU packets without latest LSA.
LS UPD: Unknown LSA type
LSU packets with unknown LSA type.
74
display ospf graceful-restart
Use display ospf graceful-restart to display GR information for an OSPF process.
Syntax
display ospf [ process-id ] graceful-restart [ verbose ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
process-id: Specifies an OSPF process by its ID in the range of 1 to 65535.
verbose: Displays detailed GR information.
Usage guidelines
If no process ID is specified, this command displays GR information for all processes.
Examples
# Display detailed GR information.
<Sysname> display ospf graceful-restart verbose
OSPF Process 1 with Router ID 1.1.1.1
Graceful Restart information
Graceful Restart capability
: Enable(IETF)
Graceful Restart support
: Planned and un-planned,Partial
Helper capability
: Enable(IETF)
Helper support
: Planned and un-planned(IETF),Strict LSA check
Current GR state
: Normal
Graceful Restart period
: 40 seconds
Number of neighbors under Helper: 0
Number of restarting neighbors
: 0
Last Restarter exit reason
: None
Last Helper exit reason
: None
Area: 0.0.0.0
Authtype: None Area flag: Normal
Area up Interface count: 2
Interface: 40.4.0.1 (Vlan-interface40)
Restarter state: Normal
State: DR
Type: Broadcast
Neighbor count of this interface: 1
Neighbor
IP address
GR state
Last Helper exit reason
3.3.3.3
40.4.0.3
Normal
None
Virtual-link Neighbor-ID
-> 4.4.4.4, Neighbor-State: Full
75
Restarter state: Normal
Interface: 20.2.0.1 (Vlink)
Transit Area: 0.0.0.1
Neighbor
IP address
GR state
Last Helper exit reason
4.4.4.4
20.2.0.4
Normal
Reset neighbor
Table 18 Command output
Field
Description
OSPF Process 1 with Router ID 1.1.1.1
GR information for OSPF process 1 with router ID 1.1.1.1.
Graceful Restart information
Indicates whether GR is enabled:
• Enable(IETF)—IETF GR is enabled.
• Enable(Nonstandard)—Non-IETF GR is enabled.
• Disable—GR is disabled.
Graceful Restart capability
GR modes that the process supports (the modes are
displayed only when GR is enabled):
• Planned and un-planned—Supports both planned and
unplanned GR.
Graceful Restart support
• Planned only—Supports only planned GR.
• Partial—Supports partial GR.
• Global—Supports global GR.
Helper capability that the process supports:
• Enable (IETF)—Supports IETF GR Helper capability.
• Enable (Nonstandard)—Supports non IETF GR Helper
capability.
Helper capability
• Enable (IETF and nonstandard)—Supports both IETF
GR Helper capability and non IETF GR Helper
capability.
• Disable—Does not support GR Helper capability.
Displays policies that the Helper supports (the policies are
displayed only when Helper is enabled):
• Strict lsa check—The Helper supports strict LSA
checking.
Helper support
• Planned and un-planned—The Helper supports
planned and unplanned GR.
• Planned only—The Helper supports only planned GR.
GR state:
• Normal—Normal state.
• Under GR—GR is in process.
• Under Helper—The process is acting as Helper.
Current GR state
Area
Area ID in IP address format.
Authentication type of the area:
• None—No authentication.
• Simple—Simple authentication.
• MD5—MD5 authentication.
Authtype
76
Field
Description
Type of the area:
•
•
•
•
•
Area flag
Normal.
Stub.
StubNoSummary (totally stub area).
NSSA.
NSSANoSummary (totally NSSA area).
Area up Interface count
Number of up interfaces in the area.
Interface
Interface in the area.
Restarter state
Restarter state on the interface.
State
Interface state.
Type
Interface network type.
Neighbor count of this interface
Neighbors of an interface.
Neighbor
Neighbor router ID.
IP address
Neighbor IP address.
Neighbor GR state:
• Normal—Normal state.
• Under GR—GR is in process.
• Under Helper—The process is acting as GR Helper.
GR state
Last Helper exit reason
Reason that the Helper exited last time.
Virtual-link Neighbor-ID
Router ID of the virtual link's neighbor.
Neighbor-State
Neighbor state: Down, Init, 2-Way, ExStart, Exchange,
Loading, and Full.
Interface
Output interface of the virtual link.
display ospf interface
Use display ospf interface to display OSPF interface information.
Syntax
display ospf [ process-id ] interface [ interface-type interface-number | verbose ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
process-id: Specifies an OSPF process ID in the range of 1 to 65535.
interface-type interface-number: Specifies an interface by its type and number.
verbose: Displays the OSPF information for all interfaces.
77
Usage guidelines
If no OSPF process is specified, this command displays the OSPF interface information for all OSPF
processes.
If you do not provide the interface or the verbose keyword, this command displays OSPF brief
information for all interfaces.
Examples
# Display all OSPF interface brief information.
<Sysname> display ospf interface
OSPF Process 1 with Router ID 192.168.1.1
Interfaces
Area: 0.0.0.0
IP Address
Type
State
Cost
Pri
DR
BDR
192.168.1.1
PTP
P-2-P
1562
1
0.0.0.0
0.0.0.0
IP Address
Type
State
Cost
Pri
DR
BDR
172.16.0.1
Broadcast
DR
1
1
172.16.0.1
0.0.0.0
Area: 0.0.0.1
Table 19 Command output
Field
Description
Area
Area ID of the interface.
IP address
Interface IP address (regardless of whether TE is enabled or not).
Type
Interface network type: PTP, PTMP, Broadcast, or NBMA.
Interface state:
• DOWN—No protocol traffic can be sent or received on the interface.
• Waiting—The interface starts sending and receiving Hello packets and the
State
router is trying to determine the identity of the (Backup) designated router for
the network.
• p-2-p—The interface will send Hello packets at the interval of HelloInterval,
and try to establish an adjacency with the neighbor.
• DR—The router is the designated router on the network.
• BDR—The router is the backup designated router on the network.
• DROther—The router is a DROther router on the attached network.
Cost
Interface cost.
Pri
Router priority.
DR
DR on the interface's network segment.
BDR
BDR on the interface's network segment.
# Display detailed information about VLAN-interface 11.
<Sysname> display ospf interface Vlan-interface 11
OSPF Process 1 with Router ID 192.168.1.1
78
Interfaces
Interface: 172.16.0.1 (Vlan-interface11)
Cost: 1
State: DR
Type: Broadcast
MTU: 1500
Priority: 1
Designated Router: 172.16.0.1
Backup Designated Router: 0.0.0.0
Timers: Hello 10, Dead 40, Poll
40, Retransmit 5, Transmit Delay 1
FRR backup: enable
Table 20 Command output
Field
Description
Interface
Information about the interface, such as the IP address.
Timers
OSPF timers: hello, dead, poll, retransmit, and transmit delay.
FRR backup
Indicates whether LFA calculation is enabled on an interface.
display ospf lsdb
Use display ospf lsdb to display OSPF LSDB information.
Syntax
display ospf [ process-id ] lsdb [ brief | [ { asbr | ase | network | nssa | opaque-area | opaque-as |
opaque-link | router | summary } [ link-state-id ] ] [ originate-router advertising-router-id |
self-originate ] ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
process-id: Specifies an OSPF process by its ID in the range of 1 to 65535.
brief: Displays brief LSDB information.
asbr: Displays Type-4 LSA (ASBR Summary LSA) information in the LSDB.
ase: Displays Type-5 LSA (AS External LSA) information in the LSDB.
network: Displays Type-2 LSA (Network LSA) information in the LSDB.
nssa: Displays Type-7 LSA (NSSA External LSA) information in the LSDB.
opaque-area: Displays Type-10 LSA (Opaque-area LSA) information in the LSDB.
opaque-as: Displays Type-11 LSA (Opaque-AS LSA) information in the LSDB.
opaque-link: Displays Type-9 LSA (Opaque-link LSA) information in the LSDB.
router: Displays Type-1 LSA (Router LSA) information in the LSDB.
79
summary: Displays Type-3 LSA (Network Summary LSA) information in the LSDB.
link-state-id: Specifies a Link state ID, in the IP address format.
originate-router advertising-router-id: Displays information about LSAs originated by the specified router.
self-originate: Displays information about self-originated LSAs.
Usage guidelines
If no OSPF process is specified, this command displays LSDB information for all OSPF processes.
Examples
# Display OSPF LSDB information.
<Sysname> display ospf lsdb
OSPF Process 1 with Router ID 192.168.0.1
Link State Database
Area: 0.0.0.0
Type
LinkState ID
AdvRouter
Age
Len
Sequence
Metric
Router
192.168.0.2
192.168.0.2
474
36
80000004
0
Router
192.168.0.1
192.168.0.1
21
36
80000009
0
Network
192.168.0.1
192.168.0.1
321
32
80000003
0
Sum-Net
192.168.1.0
192.168.0.1
321
28
80000002
1
Sum-Net
192.168.2.0
192.168.0.2
474
28
80000002
1
Type
LinkState ID
AdvRouter
Age
Len
Sequence
Metric
Router
192.168.0.1
192.168.0.1
21
36
80000005
0
Sum-Net
192.168.2.0
192.168.0.1
321
28
80000002
2
Sum-Net
192.168.0.0
192.168.0.1
321
28
80000002
1
Area: 0.0.0.1
Type 9 Opaque (Link-Local Scope) Database
Flags: * -Vlink interface LSA
Type
LinkState ID
AdvRouter
Age
Len
Sequence
Interfaces
*Opq-Link
3.0.0.0
7.2.2.1
8
14
80000001
10.1.1.2
*Opq-Link
3.0.0.0
7.2.2.2
8
14
80000001
20.1.1.2
Table 21 Command output
Field
Description
Area
LSDB information of the area.
Type
LSA type (see Table 16).
LinkState ID
Link state ID.
AdvRouter
Advertising router.
Age
Age of the LSA.
Len
Length of the LSA.
Sequence
Sequence number of the LSA.
Metric
Cost of the LSA.
*Opq-Link
Opaque LSA generated by a virtual link.
# Display Type-2 LSA (Network LSA) information in the LSDB.
80
<Sysname> display ospf 1 lsdb network
OSPF Process 1 with Router ID 192.168.1.1
Area: 0.0.0.0
Link State Database
Type
: Network
LS ID
: 192.168.0.2
Adv Rtr
: 192.168.2.1
LS Age
: 922
Len
: 32
Options
:
Seq#
: 80000003
Checksum
Net Mask
E
: 0x8d1b
: 255.255.255.0
Attached Router
192.168.1.1
Attached Router
192.168.2.1
Area: 0.0.0.1
Link State Database
Type
: Network
LS ID
: 192.168.1.2
Adv Rtr
: 192.168.1.2
LS Age
: 782
Len
: 32
Options
:
Seq#
: 80000003
Checksum
Net Mask
NP
: 0x2a77
: 255.255.255.0
Attached Router
192.168.1.1
Attached Router
192.168.1.2
Table 22 Command output
Field
Description
Type
LSA type.
LS ID
DR IP address.
Adv Rtr
Router that advertised the LSA.
LS Age
LSA age time.
Len
LSA length.
LSA options:
Options
Seq#
•
•
•
•
•
•
O—Opaque LSA advertisement capability.
E—AS External LSA reception capability.
EA—External extended LSA reception capability.
DC—On-demand link support.
N—NSSA external LSA support.
P—Capability of an NSSA ABR to translate Type-7 LSAs into Type-5 LSAs.
LSA sequence number.
81
Field
Description
Checksum
LSA checksum.
Net Mask
Network mask.
Attached Router
ID of the router that established adjacency with the DR, and ID of the DR itself.
display ospf peer
Use display ospf peer to display information about OSPF neighbors.
Syntax
display ospf [ process-id ] peer [ verbose ] [ interface-type interface-number ] [ neighbor-id ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
process-id: Specifies an OSPF process by ID in the range of 1 to 65535.
verbose: Displays detailed neighbor information.
interface-type interface-number: Specifies an interface by its type and number.
neighbor-id: Specifies a neighbor router ID.
Usage guidelines
If no OSPF process is specified, this command displays OSPF neighbor information for all OSPF
processes.
If the verbose keyword is not specified, this command displays brief OSPF neighbor information.
If no interface is specified, this command displays the neighbor information for all interfaces.
If no neighbor ID is specified, this command displays all neighbor information.
Examples
# Display detailed OSPF neighbor information.
<Sysname> display ospf peer verbose
OSPF Process 1 with Router ID 1.1.1.1
Neighbors
Area 0.0.0.0 interface 1.1.1.1(Vlan-interface11)'s neighbors
Router ID: 1.1.1.2
Address: 1.1.1.2
State: Full
Mode: Nbr is Master
DR: 1.1.1.2
BDR: 1.1.1.1
Priority: 1
MTU: 0
Options is 0x02 (-|-|-|-|-|-|E|-)
Dead timer due in 33
sec
Neighbor is up for 02:03:35
82
GR State: Normal
Authentication Sequence: [ 0 ]
Neighbor state change count: 6
Table 23 Command output
Field
Description
Neighbor information of the interface in the specified area:
Area areaID interface
IPAddress(InterfaceName)'s neighbors
• areaID—Area to which the neighbor belongs.
• IPAddress—Interface IP address.
• InterfaceName—Interface name.
Router ID
Neighbor router ID.
Address
Neighbor router address.
GR State
GR state.
Neighbor state:
• Down—Initial state of a neighbor conversation.
• Init—The router has seen a Hello packet from the neighbor.
However, the router has not established bidirectional
communication with the neighbor (the router itself did not
appear in the neighbor's hello packet).
• Attempt— Available only in an NBMA network, Under this
state, the OSPF router has not received any information from
a neighbor for a period but can send Hello packets at a
longer interval to keep neighbor relationship.
State
• 2-Way—Communication between the two routers is
bidirectional. The router itself appears in the neighbor's Hello
packet.
• Exstart—The goal of this state is to decide which router is the
master, and to decide upon the initial Database Description
(DD) sequence number.
• Exchange—The router is sending DD packets to the neighbor,
describing its entire link-state database.
• Loading—The router sends LSRs packets to the neighbor,
requesting more recent LSAs.
• Full—The neighboring routers are fully adjacent.
Mode
Neighbor mode for LSDB synchronization.
Priority
Neighboring router priority.
DR
DR on the interface’s network segment.
BDR
BDR on the interface’s network segment.
MTU
Interface MTU.
LSA options:
Options
•
•
•
•
•
•
O—Opaque LSA advertisement capability.
E—AS External LSA reception capability.
EA—External extended LSA reception capability.
DC—On-demand link support.
N—NSSA external LSA support.
P—Capability of an NSSA ABR to translate Type-7 LSAs into
Type-5 LSAs.
83
Field
Description
Dead timer due in 33 sec
This dead timer will expire in 33 seconds.
Neighbor is up for 02:03:35
The neighbor has been up for 02:03:35.
Authentication Sequence
Authentication sequence number.
Neighbor state change count
Count of neighbor state changes.
# Display brief OSPF neighbor information.
<Sysname> display ospf peer
OSPF Process 1 with Router ID 1.1.1.1
Neighbor Brief Information
Area: 0.0.0.0
Router ID
Address
Pri Dead-Time Interface
1.1.1.2
1.1.1.2
1
40
Vlan11
State
Full/DR
Table 24 Command output
Field
Description
Area
Neighbor area.
Router ID
Neighbor router ID.
Address
Neighbor interface address.
Pri
Neighboring router priority.
Dead-Time
Dead interval remained.
Interface
Interface connected to the neighbor.
State
Neighbor state: Down, Init, Attempt, 2-Way, Exstart, Exchange,
Loading or Full.
display ospf peer statistics
Use display ospf peer statistics to display OSPF neighbor statistics.
Syntax
display ospf [ process-id ] peer statistics
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
process-id: Specifies an OSPF process by its ID in the range of 1 to 65535.
84
Usage guidelines
If no OSPF process is specified, this command displays OSPF neighbor statistics for all OSPF processes.
Examples
# Display OSPF neighbor statistics.
<Sysname> display ospf peer statistics
OSPF Process 1 with Router ID 10.3.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.2
0
0
0
0
0
0
0
1
1
Total
0
0
0
0
0
0
0
2
2
Table 25 Command output
Field
Description
Area ID
The state statistics information of all the routers in the area to which the router belongs
is displayed.
Down
Number of neighboring routers in Down state in the same area.
Attempt
Number of neighboring routers in Attempt state in the same area.
Init
Number of neighboring routers in Init state in the same area.
2-Way
Number of neighboring routers in 2-Way state in the same area.
ExStart
Number of neighboring routers in ExStart state in the same area.
Exchange
Number of neighboring routers in Exchange state in the same area.
Loading
Number of neighboring routers in Loading state in the same area.
Full
Number of neighboring routers in Full state in the same area.
Total
Total number of neighbors under the same state: Down, Attempt, Init, 2-Way, ExStart,
Exchange, Loading, or Full.
display ospf request-queue
Use display ospf request-queue to display OSPF request queue information.
Syntax
display ospf [ process-id ] request-queue [ interface-type interface-number ] [ neighbor-id ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
process-id: Specifies an OSPF process by its ID in the range of 1 to 65535.
interface-type interface-number: Specifies an interface by its type and number.
85
neighbor-id: Specifies a neighbor's router ID.
Usage guidelines
If no OSPF process is specified, this command displays the OSPF request queue information for all OSPF
processes.
If no interface is specified, this command displays the OSPF request queue information for all interfaces.
If no neighbor is specified, this command displays the OSPF request queue information for all OSPF
neighbors.
Examples
# Display OSPF request queue information.
<Sysname> display ospf request-queue
The Router's Neighbor is Router ID 2.2.2.2
Interface 10.1.1.1
Address 10.1.1.2
Area 0.0.0.0
Request list:
Type
LinkState ID
AdvRouter
Sequence
Age
Router
2.2.2.2
1.1.1.1
80000004
1
Network
192.168.0.1
1.1.1.1
80000003
1
Sum-Net
192.168.1.0
1.1.1.1
80000002
2
Table 26 Command output
Field
Description
The Router's Neighbor is Router ID
Neighbor router ID.
Address
Neighbor interface IP address.
Interface
Local interface IP address.
Area
Area ID.
Request list
Request list information.
Type
LSA type.
LinkState ID
Link state ID.
AdvRouter
Advertising router.
Sequence
LSA sequence number.
Age
LSA age.
display ospf retrans-queue
Use display ospf retrans-queue to display retransmission queue information.
Syntax
display ospf [ process-id ] retrans-queue [ interface-type interface-number ] [ neighbor-id ]
Views
Any view
Predefined user roles
network-admin
86
network-operator
Parameters
process-id: Specifies an OSPF process by its ID in the range of 1 to 65535.
interface-type interface-number: Specifies an interface by its type and number.
neighbor-id: Specifies a neighbor's router ID.
Usage guidelines
If no OSPF process is specified, this command displays retransmission queue information for all OSPF
processes.
If no interface is specified, this command displays retransmission queue information for all interfaces.
If no neighbor is specified, this command displays retransmission queue information for all neighbors.
Examples
# Display OSPF retransmission queue information.
<Sysname> display ospf retrans-queue
The Router's Neighbor is Router ID 2.2.2.2
Interface 10.1.1.1
Address 10.1.1.2
Area 0.0.0.0
Retransmit list:
Type
LinkState ID
AdvRouter
Sequence
Age
Router
2.2.2.2
2.2.2.2
80000004
1
Network
12.18.0.1
2.2.2.2
80000003
1
Sum-Net
12.18.1.0
2.2.2.2
80000002
2
Table 27 Command output
Field
Description
The Router's Neighbor is Router ID
Neighbor router ID.
Address
Neighbor interface IP address.
Interface
Interface address of the router.
Area
Area ID.
Retrans List
Retransmission list.
Type
LSA type.
LinkState ID
Link state ID.
AdvRouter
Advertising router.
Sequence
LSA sequence number.
Age
LSA age.
display ospf routing
Use display ospf routing to display OSPF routing information.
Syntax
display ospf [ process-id ] routing [ ip-address { mask | mask-length } ] [ interface interface-type
interface-number ] [ nexthop nexthop-address ] [ verbose ]
87
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
process-id: Specifies an OSPF process by its ID in the range of 1 to 65535.
ip-address: Specifies a destination IP address.
mask: Specifies the mask in dotted decimal notation.
mask-length: Specifies mask length in the range of 0 to 32 bits.
interface interface-type interface-number: Displays routes passing the specified output interface.
nexthop nexthop-address: Displays routes passing the specified next hop.
verbose: Displays detailed OSPF routing information.
Usage guidelines
If no OSPF process is specified, this command displays the routing information for all OSPF processes.
If no interface is specified, this command displays OSPF routing information for all interfaces.
If no next hop is specified, this command displays all OSPF routing information.
Examples
# Display OSPF routing information.
<Sysname> display ospf routing
OSPF Process 1 with Router ID 192.168.1.2
Routing Tables
Routing for Network
Destination
Cost
Type
NextHop
AdvRouter
Area
192.168.1.0/24
1562
Stub
192.168.1.2
192.168.1.2
0.0.0.0
172.16.0.0/16
1563
Inter
192.168.1.1
192.168.1.1
0.0.0.0
Total Nets: 2
Intra Area: 1
Inter Area: 1
ASE: 0
NSSA: 0
Table 28 Command output
Field
Description
Destination
Destination network.
Cost
Cost to destination.
Type
Route type: intra-area, transit, stub, inter-area, Type-1 external, Type-2 external.
NextHop
Next hop address.
AdvRouter
Advertising router.
Area
Area ID.
88
Field
Description
Total Nets
Total networks.
Intra Area
Total intra-area routes.
Inter Area
Total inter-area routes.
ASE
Total ASE routes.
NSSA
Total NSSA routes.
# Display detailed OSPF routing information.
<Sysname> display ospf routing verbose
OSPF Process 2 with Router ID 192.168.1.112
Routing Tables
Routing for Network
Destination: 192.168.1.0/24
Cost: 1562
Type: Stub
AdvRouter: 192.168.1.2
Area: 0.0.0.0
SubProtoID: 0x1
Preference: 10
NextHop: 192.168.1.2
NetworkType: Broadcast
BkNextHop: N/A
BkNetworkType: N/A
Destination: 172.16.0.0/16
Cost: 1563
Type: Inter
AdvRouter: 192.168.1.1
Area: 0.0.0.0
SubProtoID: 0x1
Preference: 10
NextHop: 192.168.1.1
NetworkType: Broadcast
BkNextHop: N/A
BkNetworkType: N/A
Total Nets: 2
Intra Area: 2
Inter Area: 0
ASE: 0
NSSA: 0
Table 29 Command output
Field
Description
SubProtoID
Sub protocol ID.
Preference
OSPF preference.
NbrId
Neighbor router ID.
NextHop
Primary next hop IP address.
BkNextHop
Backup next hop IP address.
NetworkType
Type of the network to which the primary next hop belongs.
BkNetworkType
Type of the network to which the backup next hop belongs.
Preference
OSPF route preference.
89
display ospf vlink
Use display ospf vlink to display OSPF virtual link information.
Syntax
display ospf [ process-id ] vlink
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
process-id: Specifies an OSPF process by its ID in the range of 1 to 65535.
Usage guidelines
If no OSPF process is specified, this command displays the OSPF virtual link information for all OSPF
processes.
Examples
# Display OSPF virtual link information.
<Sysname> display ospf vlink
OSPF Process 1 with Router ID 3.3.3.3
Virtual Links
Virtual-link Neighbor-ID
-> 2.2.2.2, Neighbor-State: Full
Interface: 10.1.2.1 (Vlan-interface11)
Cost: 1562
State: P-2-P
Type: Virtual
Transit Area: 0.0.0.1
Timers: Hello 10 , Dead 40 , Retransmit 5 , Transmit Delay 1
Table 30 Command output
Field
Description
Virtual-link Neighbor-ID
ID of the neighbor on the virtual link.
Neighbor-State
Neighbor state: Down, Init, 2-Way, ExStart, Exchange, Loading, Full.
Interface
IP address and name of the local interface on the virtual link.
Cost
Interface route cost.
State
Interface state.
Type
Virtual link.
Transit Area
Transit area ID.
Timers
Values of timers: hello, dead, retransmit, and interface transmission delay.
display router id
Use display router id to display the global router ID.
90
Syntax
display router id
Views
Any view
Predefined user roles
network-admin
network-operator
Examples
# Display the global router ID.
<Sysname> display router id
Configured router ID is 1.1.1.1
enable link-local-signaling
Use enable link-local-signaling to enable the OSPF link-local signaling (LLS) capability.
Use undo enable link-local-signaling to disable the OSPF LLS capability.
Syntax
enable link-local-signaling
undo enable link-local-signaling
Default
OSPF link-local signaling capability is disabled.
Views
OSPF view
Predefined user roles
network-admin
Examples
# Enable link-local signaling for OSPF process 1.
<Sysname> system-view
[Sysname] ospf 1
[Sysname-ospf-1] enable link-local-signaling
enable out-of-band-resynchronization
Use enable out-of-band-resynchronization to enable the OSPF out-of-band resynchronization
(OOB-Resynch) capability.
Use undo enable out-of-band-resynchronization to disable the OSPF out-of-band resynchronization
capability.
Syntax
enable out-of-band-resynchronization
undo enable out-of-band-resynchronization
91
Default
The OSPF out-of-band resynchronization capability is disabled.
Views
OSPF view
Predefined user roles
network-admin
Usage guidelines
Before you configure this command, enable the link-local signaling capability.
Examples
# Enable the out-of-band resynchronization capability for OSPF process 1.
<Sysname> system-view
[Sysname] ospf 1
[Sysname-ospf-1] enable link-local-signaling
[Sysname-ospf-1] enable out-of-band-resynchronization
Related commands
enable link-local-signaling
fast-reroute (OSPF view)
Use fast-reroute to configure OSPF FRR.
Use undo fast-reroute to restore the default.
Syntax
fast-reroute { lfa [ abr-only ] | route-policy route-policy-name }
undo fast-reroute
Default
OSPF FRR is disabled.
Views
OSPF view
Predefined user roles
network-admin
Parameters
lfa: Uses the LFA algorithm to calculate a backup next hop for all routes.
abr-only: Uses the next hop of the route to the ABR as the backup next hop.
route-policy route-policy-name: Uses a routing policy to designate a backup next hop. The
route-policy-name argument is a case-sensitive string of 1 to 63 characters.
Usage guidelines
Do not use OSPF FRR and BFD for OSPF at the same time. Otherwise, OSPF FRR might fail to work.
Do not use the fast-reroute lfa command together with the command vlink-peer.
92
Examples
# Enable FRR to calculate a backup next hop for all routes by using LFA algorithm in OSPF process 1.
<Sysname> system-view
[Sysname] ospf 1
[Sysname-ospf-1] fast-reroute lfa
filter (OSPF area view)
NOTE:
This command is available only on an ABR.
Use filter to configure OSPF to filter inbound/outbound Type-3 LSAs on an ABR.
Use undo filter to disable Type-3 LSA filtering.
Syntax
filter { acl-number | prefix-list prefix-list-name | route-policy route-policy-name } { export | import }
undo filter { export | import }
Default
Type-3 LSAs are not filtered.
Views
OSPF area view
Predefined user roles
network-admin
Parameters
acl-number: Specifies an ACL by its number in the range of 2000 to 3999 to filter inbound/outbound
Type-3 LSAs.
prefix-list-name: Specifies an IP prefix list by its name, a case-sensitive string of 1 to 63 characters, to filter
inbound/outbound Type-3 LSAs.
route-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to 63 characters, to
filter inbound/outbound Type-3 LSAs.
export: Filters Type-3 LSAs advertised to other areas.
import: Filters Type-3 LSAs advertised into the local area.
Examples
# Use IP prefix list my-prefix-list to filter inbound Type-3 LSAs, and use ACL 2000 to filter outbound
Type-3 LSAs in OSPF Area 1.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] area 1
[Sysname-ospf-100-area-0.0.0.1] filter prefix-list my-prefix-list import
[Sysname-ospf-100-area-0.0.0.1] filter 2000 export
93
filter-policy export (OSPF view)
Use filter-policy export to configure OSPF to filter redistributed routes.
Use undo filter-policy export to remove the configuration.
Syntax
filter-policy { acl-number | prefix-list prefix-list-name } export [ protocol [ process-id ] ]
undo filter-policy export [ protocol [ process-id ] ]
Default
Redistributed routes are not filtered.
Views
OSPF view
Predefined user roles
network-admin
Parameters
acl-number: Specifies an ACL by its number in the range of 2000 to 3999 to filter redistributed routes by
destination address.
prefix-list-name: Specifies an IP prefix list by its name, a case-sensitive string of 1 to 63 characters, to filter
redistributed routes by destination address.
protocol: Filters routes redistributed from the specified routing protocol, which can be bgp, direct, isis,
ospf, rip, and static. If no protocol is specified, this command filters all redistributed routes.
process-id: Specifies a process by its ID in the range of 1 to 65535. This argument is available only when
the protocol is rip, ospf or isis.
Usage guidelines
To reference an advanced ACL (with a number from 3000 to 3999) in the command, configure the ACL
using one of the following methods:
•
To deny/permit a route with the specified destination, use the rule [ rule-id ] { deny | permit } ip
source sour-addr sour-wildcard command.
•
To deny/permit a route with the specified destination and mask, use the rule [ rule-id ] { deny |
permit } ip source sour-addr sour-wildcard destination dest-addr dest-wildcard command.
The source keyword specifies the destination address of a route and the destination keyword specifies the
subnet mask of the route. The specified subnet mask must be contiguous. Otherwise, the mask
configuration does not take effect.
Examples
# Use ACL 2000 to filter redistributed routes.
<Sysname> system-view
[Sysname] acl number 2000
[Sysname-acl-basic-2000] rule deny source 192.168.10.0 0.0.0.255
[Sysname-acl-basic-2000] quit
[Sysname] ospf 100
[Sysname-ospf-100] filter-policy 2000 export
# Configure ACL 3000 to permit only route 113.0.0.0/16. Use ACL 3000 to filter redistributed routes.
94
<Sysname> system-view
[Sysname] acl number 3000
[Sysname-acl-adv-3000] rule 10 permit ip source 113.0.0.0 0 destination 255.255.0.0 0
[Sysname-acl-adv-3000] rule 100 deny ip
[Sysname-acl-adv-3000] quit
[Sysname] ospf 100
[Sysname-ospf-100] filter-policy 3000 export
Related commands
import-route
filter-policy import (OSPF view)
Use filter-policy import to configure OSPF to filter routes calculated using received LSAs.
Use undo filter-policy import to restore the default.
Syntax
filter-policy { acl-number [ gateway prefix-list-name ] | gateway prefix-list-name | prefix-list
prefix-list-name [ gateway prefix-list-name ] | route-policy route-policy-name } import
undo filter-policy import
Default
Routes calculated using received LSAs are not filtered.
Views
OSPF view
Predefined user roles
network-admin
Parameters
acl-number: Specifies an ACL by its number in the range of 2000 to 3999 to filter inbound routes by
destination.
gateway prefix-list-name: Specifies an IP prefix list by its name, a case-sensitive string of 1 to 63
characters, to filter inbound routes by next hop.
prefix-list prefix-list-name: Specifies an IP prefix list by its name, a case-sensitive string of 1 to 63
characters, to filter inbound routes by destination.
route-policy route-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to 63
characters, to filter inbound routes.
Usage guidelines
To reference an advanced ACL (with a number from 3000 to 3999) in the command or in the specified
routing policy, configure the ACL in one of the following ways:
•
To deny/permit a route with the specified destination, use the rule [ rule-id ] { deny | permit } ip
source sour-addr sour-wildcard command.
•
To deny/permit a route with the specified destination and mask, use the rule [ rule-id ] { deny |
permit } ip source sour-addr sour-wildcard destination dest-addr dest-wildcard command.
95
The source keyword specifies the destination address of a route and the destination keyword specifies the
subnet mask of the destination address. The specified subnet mask must be contiguous. Otherwise, the
mask configuration does not take effect.
Examples
# Use ACL 2000 to filter inbound routes.
<Sysname> system-view
[Sysname] acl number 2000
[Sysname-acl-basic-2000] rule deny source 192.168.10.0 0.0.0.255
[Sysname-acl-basic-2000] quit
[Sysname] ospf 100
[Sysname-ospf-100] filter-policy 2000 import
# Configure ACL 3000 to permit only route 113.0.0.0/16. Use ACL 3000 to filter inbound routes.
<Sysname> system-view
[Sysname] acl number 3000
[Sysname-acl-adv-3000] rule 10 permit ip source 113.0.0.0 0 destination 255.255.0.0 0
[Sysname-acl-adv-3000] rule 100 deny ip
[Sysname-acl-adv-3000] quit
[Sysname] ospf 100
[Sysname-ospf-100] filter-policy 3000 import
graceful-restart (OSPF view)
Use graceful-restart to enable OSPF GR.
Use undo graceful-restart to disable OSPF GR.
Syntax
graceful-restart [ ietf | nonstandard ] [ global | planned-only ] *
undo graceful-restart
Default
OSPF GR is disabled.
Views
OSPF view
Predefined user roles
network-admin
Parameters
ietf: Enables IETF GR.
nonstandard: Enables non-IETF GR.
global: Enables global GR. In global GR mode, a GR process can be completed only when all GR
Helpers exist. A GR process fails if a GR Helper fails (for example, the interface connected to the GR
Helper goes down). Without this keyword, this command enables partial GR. In partial GR mode, a GR
process can be completed if a GR Helper exists.
planned-only: Enables planned only GR. Without this keyword, this command enables both planned GR
and unplanned GR.
96
Usage guidelines
GR includes planned GR and unplanned GR:
•
Planned GR—Manually restart OSPF. Before OSPF restart, the GR Restarter sends Grace-LSAs to GR
Helpers.
•
Non-planned GR—OSPF restarts because of device failure. Before OSPF restart, the GR Restarter
does not send Grace-LSAs to GR Helpers.
Before enabling IETF GR for OSPF, enable Opaque LSA advertisement and reception with the
opaque-capability enable command.
Before enabling non-IETF GR for OSPF, enable OSPF LLS with the enable link-local-signaling command
and OOB-Resynch with the enable out-of-band-resynchronization command.
If you do not provide the nonstandard or ietf keyword, the command enables non-IETF GR for OSPF.
Examples
# Enable IETF GR for OSPF process 1.
<Sysname> system-view
[Sysname] ospf 1
[Sysname-ospf-1] opaque-capability enable
[Sysname-ospf-1] graceful-restart ietf
# Enable non-IETF GR for OSPF process 1.
<Sysname> system-view
[Sysname] ospf 1
[Sysname-ospf-1] enable link-local-signaling
[Sysname-ospf-1] enable out-of-band-resynchronization
[Sysname-ospf-1] graceful-restart nonstandard
Related commands
•
enable link-local-signaling
•
enable out-of-band-resynchronization
•
opaque-capability enable
graceful-restart helper enable
Use graceful-restart helper enable to enable OSPF GR Helper capability.
Use undo graceful-restart helper enable to disable OSPF GR Helper capability.
Syntax
graceful-restart helper enable [ planned-only ]
undo graceful-restart helper enable
Default
OSPF GR Helper capability is enabled.
Views
OSPF view
Predefined user roles
network-admin
97
Parameters
planned-only: Enable only planned GR for the GR Helper. Without this keyword, this command enables
both planned GR and unplanned GR for the GR Helper.
Usage guidelines
The planned-only keyword is available only for the IETF GR Helper.
Examples
# Enable GR Helper capability for OSPF process 1.
<Sysname> system-view
[Sysname] ospf 1
[Sysname-ospf-1] graceful-restart helper enable
graceful-restart helper strict-lsa-checking
Use graceful-restart helper strict-lsa-checking to enable strict LSA checking capability for GR Helper.
Use undo graceful-restart helper strict-lsa-checking to disable strict LSA checking capability for GR
Helper.
Syntax
graceful-restart helper strict-lsa-checking
undo graceful-restart helper strict-lsa-checking
Default
Strict LSA checking capability for GR Helper is disabled.
Views
OSPF view
Predefined user roles
network-admin
Usage guidelines
When an LSA change on the GR Helper is detected, the GR Helper device exits the GR Helper mode.
Examples
# Enable strict LSA checking capability for GR Helper in OSPF process 1.
<Sysname> system-view
[Sysname] ospf 1
[Sysname-ospf-1] graceful-restart helper strict-lsa-checking
graceful-restart interval (OSPF view)
Use graceful-restart interval to configure the GR interval.
Use undo graceful-restart interval to restore the default GR interval.
Syntax
graceful-restart interval interval-value
undo graceful-restart interval
98
Default
The GR interval is 120 seconds.
Views
OSPF view
Predefined user roles
network-admin
Parameters
interval-value: Specifies the GR interval in the range of 40 to 1800 seconds.
Usage guidelines
The value of the GR restart interval cannot be smaller than the maximum OSPF neighbor dead time of all
the OSPF interfaces. Otherwise, GR restart might fail.
Examples
# Configure the GR interval for OSPF process 1 as 100 seconds.
<Sysname> system-view
[Sysname] ospf 1
[Sysname-ospf-1] graceful-restart interval 100
Related commands
ospf timer dead
host-advertise
Use host-advertise to advertise a host route.
Use undo host-advertise to remove a host route.
Syntax
host-advertise ip-address cost
undo host-advertise ip-address
Default
No host route is advertised.
Views
OSPF area view
Predefined user roles
network-admin
Parameters
ip-address: Specifies the IP address of a host.
cost: Specifies a cost for the route, in the range of 1 to 65535.
Examples
# Advertise host route 1.1.1.1 with a cost of 100.
<Sysname> system-view
[Sysname] ospf 100
99
[Sysname-ospf-100] area 0
[Sysname-ospf-100-area-0.0.0.0] host-advertise 1.1.1.1 100
import-route (OSPF view)
Use import-route to redistribute AS-external routes from another routing protocol.
Use undo import-route to disable route redistribution from another routing protocol.
Syntax
import-route protocol [ process-id | all-processes | allow-ibgp ] [ cost cost | [ cost cost | route-policy
route-policy-name | tag tag | type type ] *
undo import-route protocol [ process-id | all-processes ]
Default
OSPF does not redistribute AS-external routes from any other routing protocol.
Views
OSPF view
Predefined user roles
network-admin
Parameters
protocol: Redistributes routes from the specified protocol, which can be bgp, direct, isis, ospf, rip, or
static.
process-id: Specifies an process by its ID in the range of 1 to 65535. The default is 1. It is available only
when the protocol is rip, ospf, or isis.
all-processes: Redistributes routes from all the processes of the specified routing protocol. This keyword
takes effect only when the protocol is rip, ospf, or isis.
allow-ibgp: Allows redistribution of IBGP routes. It is available only when the protocol is bgp.
cost cost: Specifies a route cost in the range of 0 to 16777214. The default is 1.
route-policy route-policy-name: Uses the specified routing policy to filter redistributed routes. The
route-policy-name argument is a case-sensitive string of 1 to 63 characters.
tag tag: Specifies a tag for marking external LSAs, in the range of 0 to 4294967295. The default is 1.
type type: Specifies a cost type, 1 or 2. The default is 2.
Usage guidelines
This command redistributes routes destined for other ASs from another protocol. AS external routes
include the following types:
•
Type-1 external route
•
Type-2 external route
A Type-1 external route has high reliability. Its cost is comparable with the cost of OSPF internal routes.
The cost from an OSPF router to a Type-1 external route's destination equals the cost from the router to the
ASBR plus the cost from the ASBR to the external route's destination.
A Type-2 external route has low credibility. OSPF considers the cost from the ASBR to the destination of
a Type-2 external route is much bigger than the cost from the ASBR to an OSPF internal router. The cost
100
from an internal router to a Type-2 external route's destination equals the cost from the ASBR to the Type-2
external route's destination.
The import-route command cannot redistribute default external routes.
The import-route bgp command redistributes only EBGP routes. Because the import-route bgp
allow-ibgp command redistributes both EBGP and IBGP routes and might cause routing loops, use it with
caution.
Only active routes can be redistributed. To view information about active routes, use the display ip
routing-table protocol command.
The undo import-route protocol all-processes command removes only the configuration made by the
import-route protocol all-processes command, instead of the configuration made by the import-route
protocol process-id command.
Examples
# Redistribute routes from RIP process 40 and specify the type, tag, and cost as 2, 33, and 50 for
redistributed routes.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] import-route rip 40 type 2 tag 33 cost 50
Related commands
default-route-advertise
ispf enable
Use ispf enable to enable OSPF incremental SPF (ISPF).
Use undo ispf enable to disable OSPF ISPF.
Syntax
ispf enable
undo ispf enable
Default
OSPF ISPF is enabled.
Views
OSPF view
Predefined user roles
network-admin
Usage guidelines
Upon topology changes, ISPF recomputes only the affected part of the SPT, instead of the entire SPT.
Examples
# Enable ISPF for OSPF process 100.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] ispf enable
101
log-peer-change
Use log-peer-change to enable the logging of OSPF neighbor state changes.
Use undo log-peer-change to disable the logging of OSPF neighbor state changes.
Syntax
log-peer-change
undo log-peer-change
Default
The logging of OSPF neighbor state changes is enabled.
Views
OSPF view
Predefined user roles
network-admin
Usage guidelines
TAfter you enable this feature, the information about OSPF neighbor state changes will be output to the
terminal.
Examples
# Disable the logging of neighbor state changes for OSPF process 100.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] undo log-peer-change
lsa-arrival-interval
Use lsa-arrival-interval to specify the LSA arrival interval.
Use undo lsa-arrival-interval to restore the default.
Syntax
lsa-arrival-interval interval
undo lsa-arrival-interval
Default
The LSA arrival interval is 1000 milliseconds.
Views
OSPF view
Predefined user roles
network-admin
Parameters
interval: Specifies the LSA arrival interval in the range of 0 to 60000 milliseconds.
102
Usage guidelines
If an LSA that has the same LSA type, LS ID, originating router ID as the previous LSA is received within
the interval, OSPF discards the LSA. This feature helps protect resources from being over consumed due
to frequent network changes.
The interval set with the lsa-arrival-interval command should be smaller or equal to the initial interval set
with the lsa-generation-interval command.
Examples
# Set the LSA arrival interval to 200 milliseconds.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] lsa-arrival-interval 200
Related commands
lsa-generation-interval
lsdb-overflow-interval
Use lsdb-overflow-interval to configure the interval that OSPF exits overflow state.
Use undo lsdb-overflow-interval to restore the default.
Syntax
lsdb-overflow-interval interval
undo lsdb-overflow-interval
Default
The OSPF exit overflow interval is 300 seconds.
Views
OSPF view
Predefined user roles
network-admin
Parameters
interval: Specifies the interval that OSPF exits overflow state, in the range of 0 to 2147483647 seconds.
Usage guidelines
When the number of LSAs in the LSDB exceeds the upper limit, the LSDB is in an overflow state. In this
state, OSPF does not receive any external LSAs and deletes the external LSAs generated by itself to save
system resources.
You can configure the interval that OSPF exits overflow state. An interval of 0 indicates that the timer is
not started and OSPF does not exit overflow state.
Examples
# Configure the OSPF exit overflow interval as 10 seconds.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] lsdb-overflow-interval 10
103
lsa-generation-interval
Use lsa-generation-interval to configure the OSPF LSA generation interval.
Use undo lsa-generation-interval to restore the default.
Syntax
lsa-generation-interval maximum-interval [ minimum-interval [ incremental-interval ] ]
undo lsa-generation-interval
Default
The maximum interval is 5 seconds, the minimum interval is 0 milliseconds, and the incremental interval
is 0 milliseconds.
Views
OSPF view
Predefined user roles
network-admin
Parameters
maximum-interval: Specifies the maximum LSA generation interval in the range of 1 to 60 seconds.
minimum-interval: Specifies the minimum LSA generation interval in the range of 10 to 60000
milliseconds. 0 indicates that the minimum interval can be any value.
incremental-interval: Specifies the LSA generation incremental interval in the range of 10 to 60000
milliseconds.
Usage guidelines
When network changes are not frequent, LSAs are generated at the minimum-interval. If network
changes become frequent, the LSA generation interval is incremented by incremental-interval × 2n-2 (n is
the number of generation times) each time a LSA generation occurs until the maximum-interval is
reached.
The minimum interval and the incremental interval cannot be greater than the maximum interval.
Examples
# Configure the maximum LSA generation interval as 2 seconds, minimum interval as 100 milliseconds
and incremental interval as 100 milliseconds.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] lsa-generation-interval 2 100 100
Related commands
lsa-arrival-interval
lsdb-overflow-limit
Use lsdb-overflow-limit to specify the upper limit of external LSAs in the LSDB.
Use undo lsdb-overflow-limit to restore the default.
Syntax
lsdb-overflow-limit number
104
undo lsdb-overflow-limit
Default
The number of external LSAs is not limited.
Views
OSPF view
Predefined user roles
network-admin
Parameters
number: Specifies the upper limit of external LSAs in the LSDB, in the range of 1 to 1000000.
Examples
# Specify the upper limit of external LSAs as 400000.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] lsdb-overflow-limit 400000
maximum load-balancing (OSPF view)
Use maximum load-balancing to specify the maximum number of equal-cost multi-path (ECMP) routes for
load balancing.
Use undo maximum load-balancing to restore the default.
Syntax
maximum load-balancing maximum
undo maximum load-balancing
Views
OSPF view
Predefined user roles
network-admin
Parameters
maximum: Specifies the maximum number of ECMP routes.
Usage guidelines
The value range for the maximum argument and the default setting depend on the max-ecmp-num
command.
If you set the maximum number of ECMP routes to m by using the max-ecmp-num command, the
maximum argument in the maximum load-balancing command is in the range of 1 to m and defaults to
m.
Examples
# Specify the maximum number of ECMP routes as 2.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] maximum load-balancing 2
105
Related commands
max-ecmp-num
network (OSPF area view)
Use network to enable OSPF on the interface attached to the specified network in the area.
Use undo network to disable OSPF for the interface attached to the specified network in the area.
Syntax
network ip-address wildcard-mask
undo network ip-address wildcard-mask
Default
OSPF is not enabled for any interface.
Views
OSPF area view
Predefined user roles
network-admin
View
OSPF area view
Parameters
ip-address: Specifies the IP address of a network.
wildcard-mask: Specifies the wildcard mask of the IP address. For example, the wildcard mask of mask
255.0.0.0 is 0.255.255.255.
Usage guidelines
This command enables OSPF on the interface attached to the specified network. The interface's primary
IP address must be in the specified network. If only the interface's secondary IP address is in the network,
the interface cannot run OSPF.
Examples
# Specify the interface whose primary IP address falls into 131.108.20.0/24 to run OSPF in Area 2.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] area 2
[Sysname-ospf-100-area-0.0.0.2] network 131.108.20.0 0.0.0.255
Related commands
ospf
nssa
Use nssa to configure the current area as an NSSA area.
Use undo nssa to restore the default.
106
Syntax
nssa [ default-route-advertise |
translator-stability-interval value ] *
no-import-route
|
no-summary
|
translate-always
|
undo nssa
Default
No area is configured as an NSSA area.
Views
OSPF area view
Predefined user roles
network-admin
Parameters
default-route-advertise: Usable on an NSSA ABR or an ASBR only. If it is configured on an NSSA ABR,
the ABR generates a default route in a Type-7 LSA into the NSSA area regardless of whether a default
route is available in the routing table. If it is configured on an ASBR, the ASBR generates a default route
in a Type-7 LSA only when the default route is available in the routing table.
no-import-route: Usable only on an NSSA ABR that is also the ASBR of the OSPF routing domain to
disable redistributing routes in Type-7 LSAs into the NSSA area, making sure that correct external routes
are redistributed.
no-summary: Usable only on an NSSA ABR to advertise a default route in a Type-3 summary LSA into the
NSSA area and to not advertise other summary LSAs into the area. Such an area is a totally NSSA area.
translate-always: Specifies the NSSA ABR as a translator to translate Type-7 LSAs to Type-5 LSAs.
translator-stability-interval value: Specifies the stability interval of the translator, during which the
translator can maintain its translating capability after a device with a higher priority becomes the new
translator. The value argument is the stability interval in the range of 0 to 900 seconds and defaults to 0
(which means the translator does not maintain its translating capability when a new translator arises).
Usage guidelines
All routers attached to an NSSA area must be configured with the nssa command in area view.
Examples
# Configure Area 1 as an NSSA area.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] area 1
[Sysname-ospf-100-area-0.0.0.1] nssa
Related commands
default-cost
opaque-capability enable
Use opaque-capability enable to enable opaque LSA advertisement and reception.
Use undo opaque-capability to disable opaque LSA advertisement and reception.
107
Syntax
opaque-capability enable
undo opaque-capability
Default
The feature is enabled.
Views
OSPF view
Predefined user roles
network-admin
Usage guidelines
After the opaque LSA advertisement and reception is enabled, OSPF can receive and advertise Type-9,
Type-10, and Type-11 opaque LSAs.
Examples
# Disable opaque LSA advertisement and reception.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] undo opaque-capability
ospf
Use ospf to enable an OSPF process.
Use undo ospf to disable an OSPF process.
Syntax
ospf [ process-id | router-id router-id | vpn-instance vpn- instance-name ] *
undo ospf [ process-id ]
Default
No OSPF process is enabled.
Views
System view
Predefined user roles
network-admin
Parameters
process-id: Specifies an OSPF process by its ID in the range of 1 to 65535.
router-id router-id: Specifies an OSPF router ID in dotted decimal notation.
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN by its name, a case-sensitive string of 1 to 31
characters. If no VPN is specified, the OSPF process runs on the public network.
Usage guidelines
You can enable multiple OSPF processes on a router and specify different router IDs for them.
Enable an OSPF process before performing other tasks.
108
Examples
# Enable OSPF process 100 and specify router ID 10.10.10.1.
<Sysname> system-view
[Sysname] ospf 100 router-id 10.10.10.1
[Sysname-ospf-100]
ospf authentication-mode
Use ospf authentication-mode to set the authentication mode and key ID on an interface.
Use undo ospf authentication-mode to remove specified configuration.
Syntax
For MD5/HMAC-MD5 authentication:
ospf authentication-mode { hmac-md5 | md5 } key-id { cipher cipher-string | plain plain-string }
undo ospf authentication-mode { hmac-md5 | md5 } key-id
For simple authentication:
ospf authentication-mode simple { cipher cipher-string | plain plain-string }
undo ospf authentication-mode simple
Default
No authentication is configured.
Views
Interface view
Predefined user roles
network-admin
Parameters
hmac-md5: Enables HMAC-MD5 authentication.
md5: Enables MD5 authentication.
simple: Enables simple authentication.
key-id: Specifies a key by its ID in the range of 1 to 255.
cipher: Sets a ciphertext key.
cipher-string: Specifies a ciphertext key. For simple authentication, specify a case-sensitive key of 33 to
41 characters. For MD5/HMAC-MD5 authentication, specify a key of 33 to 53 characters.
plain: Sets a plaintext key.
plain-string: Specifies a plaintext key. For simple authentication, specify a case-sensitive key of 1 to 8
characters. For MD5/HMAC-MD5 authentication, specify a key of 1 to 16 characters.
Usage guidelines
Interfaces attached to the same network segment must have the same authentication password and
authentication mode.
For secrecy, all keys, including keys configured in plain text, are saved in cipher text.
109
Examples
# Enable MD5 authentication for the network 131.119.0.0/16 in Area 1. Set the interface key ID to 15,
and plaintext authentication password to 123456.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] area 1
[Sysname-ospf-100-area-0.0.0.1] network 131.119.0.0 0.0.255.255
[Sysname-ospf-100-area-0.0.0.1] authentication-mode md5
[Sysname-ospf-100-area-0.0.0.1] quit
[Sysname-ospf-100] quit
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] ospf authentication-mode md5 15 plain 123456
# Enable simple authentication for the network 131.119.0.0/16 in Area 1. Set the plaintext authentication
password to 123456 on Ethernet 1/1.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] area 1
[Sysname-ospf-100-area-0.0.0.1] network 131.119.0.0 0.0.255.255
[Sysname-ospf-100-area-0.0.0.1] authentication-mode simple
[Sysname-ospf-100-area-0.0.0.1] quit
[Sysname-ospf-100] quit
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] ospf authentication-mode simple plain 123456
Related commands
authentication-mode
ospf bfd enable
Use ospf bfd enable to enable BFD on an OSPF interface.
Use undo ospf bfd enable to disable BFD on an OSPF interface.
Syntax
ospf bfd enable [ echo ]
undo ospf bfd enable
Default
BFD for OSPF is disabled.
Views
Interface view
Predefined user roles
network-admin
Parameters
echo: Enables BFD single-hop echo detection. Without this keyword, this command enables BFD
bidirectional control detection.
110
Usage guidelines
Do not use OSPF FRR and BFD for OSPF at the same time. Otherwise, OSPF FRR might fail to take effect.
Examples
# Enable BFD for OSPF on VLAN-interface 11.
<Sysname> system-view
[Sysname] ospf
[Sysname-ospf-1] area 0
[Sysname-ospf-1-area-0.0.0.0] network 192.168.0.0 0.0.255.255
[Sysname] interface vlan-interface 11
[Sysname-Vlan-interface11] ospf bfd enable
ospf cost
Use ospf cost to set an OSPF cost for an interface.
Use undo ospf cost to restore the default.
Syntax
ospf cost value
undo ospf cost
Default
An interface computes its OSPF cost according to the interface bandwidth.
Views
Interface view
Predefined user roles
network-admin
Parameters
value: Specifies an OSPF cost in the range of 0 to 65535 for a loopback interface and in the range of
1 to 65535 for other interfaces.
Usage guidelines
The default OSPF cost is 100 Mbps/Interface bandwidth (Mbps):
•
When the cost the interface computes is greater than 65535, the default OSPF cost is 65535.
•
When the cost the interface computes is less than 1, the default OSPF cost is 1.
The ospf cost command sets an OSPF cost for an interface. If you do not use this command, the interface
automatically computes its OSPF cost.
Examples
# Set the OSPF cost on VLAN-interface 10 to 65.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] ospf cost 65
ospf dr-priority
Use ospf dr-priority to set the router priority for DR/BDR election on an interface.
111
Use undo ospf dr-priority to restore the default value.
Syntax
ospf dr-priority priority
undo ospf dr-priority
Default
The router priority is 1.
Views
Interface view
Predefined user roles
network-admin
Parameters
priority: Specify the router priority for the interface, in the range of 0 to 255.
Usage guidelines
The greater the value, the higher the priority for DR/BDR election. If a device has a priority of 0, it will
not be elected as a DR or BDR.
Examples
# Set the router priority on VLAN-interface 10 to 8.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] ospf dr-priority 8
ospf fast-reroute lfa-backup
Use ospf fast-reroute lfa-backup to enable LFA on the interface.
Use undo ospf fast-reroute lfa-backup to disable LFA on the interface.
Syntax
ospf fast-reroute lfa-backup
undo ospf fast-reroute lfa-backup
Default
LFA is enabled on the interface.
Predefined user roles
network-admin
Usage guidelines
If you enable LFA on an interface, it can be selected as a backup interface. After you disable LFA on the
interface, it cannot be selected as a backup.
Examples
# Disable VLAN-interface 11 from calculating a backup next hop by using the LFA algorithm.
<Sysname> system-view
[Sysname] interface vlan-interface 11
[Sysname-Vlan-interface11] undo ospf fast-reroute lfa-backup
112
ospf mib-binding
Use ospf mib-binding to bind an OSPF process to MIB operation for responding to SNMP requests.
Use undo ospf mib-binding to restore the default.
Syntax
ospf mib-binding process-id
undo ospf mib-binding
Default
MIB operation is bound to the OSPF process with the smallest process ID.
Views
System view
Predefined user roles
network-admin
Parameters
process-id: Specifies an OSPF process by its ID in the range of 1 to 65535.
Examples
# Bind MIB operation to OSPF process 100.
<Sysname> system-view
[Sysname] ospf mib-binding 100
ospf mtu-enable
Use ospf mtu-enable to enable an interface to add the interface MTU into DD packets.
Use undo ospf mtu-enable to restore the default.
Syntax
ospf mtu-enable
undo ospf mtu-enable
Default
The MTU in DD packets is 0.
Views
Interface view
Predefined user roles
network-admin
Usage guidelines
After a virtual link is established through a Tunnel, two devices on the link from different vendors might
have different MTU values. To make them consistent, restore the interfaces' MTU to the default value 0.
After you configure this command, the interface checks whether the MTU in a received DD packet is
greater than its own MTU. If yes, the interface discards the packet.
113
Examples
# Enable VLAN-interface 10 to add the interface MTU value into DD packets.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] ospf mtu-enable
ospf network-type
Use ospf network-type to set the network type for an interface.
Use undo ospf network-type to restore the default network type for an interface.
Syntax
ospf network-type { broadcast | nbma | p2mp [ unicast ] | p2p }
undo ospf network-type
Default
By default, the network type of an interface depends on its link layer protocol:
•
For Ethernet and FDDI, the network type is broadcast.
•
For ATM, FR, and X.25, the network type is NBMA.
•
For PPP, LAPB, HDLC, and POS, the network type is P2P.
Views
Interface view
Predefined user roles
network-admin
Parameters
broadcast: Specifies the network type as broadcast.
nbma: Specifies the network type as NBMA.
p2mp: Specifies the network type as P2MP.
unicast: Specifies the P2MP interface to unicast OSPF packets. By default, a P2MP interface multicasts
OSPF packets.
p2p: Specifies the network type as P2P.
Usage guidelines
If a router on a broadcast network does not support multicast, configure the network type for the
connected interfaces as NBMA.
If any two routers on an NBMA network are directly connected through a virtual link, the network is fully
meshed, and you can configure the network type for the connected interfaces as NBMA. If two routers
are not directly connected, configure the P2MP network type so that the two routers can exchange
routing information through another router.
When the network type of an interface is NBMA or P2MP unicast, you must use the peer command to
specify the neighbor.
If only two routers run OSPF on a network, you can configure the network type for the connected
interfaces as P2P.
114
When the network type of an interface is P2MP unicast, all OSPF packets are unicast by the interface.
Examples
# Configure the OSPF network type for VLAN-interface 10 as NBMA.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] ospf network-type nbma
Related commands
ospf dr-priority
ospf timer dead
Use ospf timer dead to set the neighbor dead interval.
Use undo ospf timer dead to restore the default.
Syntax
ospf timer dead seconds
undo ospf timer dead
Default
The dead interval is 40 seconds for broadcast and P2P interfaces. The dead interval is 120 seconds for
P2MP and NBMA interfaces.
Views
Interface view
Predefined user roles
network-admin
Parameters
seconds: Specifies the dead interval in the range of 1 to 2147483647 seconds.
Usage guidelines
If an interface receives no hello packet from a neighbor within the dead interval, the interface considers
the neighbor down. The dead interval on an interface is at least four times the hello interval. Routers
attached to the same segment must have the same dead interval.
Examples
# Configure the dead interval for VLAN-interface 10 as 60 seconds.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] ospf timer dead 60
Related commands
ospf timer hello
ospf timer hello
Use ospf timer hello to set the hello interval on an interface.
Use undo ospf timer hello to restore the default.
115
Syntax
ospf timer hello seconds
undo ospf timer hello
Default
The hello interval is 10 seconds for P2P and broadcast interfaces, and is 30 seconds for P2MP and
NBMA interfaces.
Views
Interface view
Predefined user roles
network-admin
Parameters
seconds: Specifies the hello interval in the range of 1 to 65535 seconds.
Usage guidelines
The shorter the hello interval, the faster the topology converges, and the more resources are consumed.
Make sure the hello interval on two neighboring interfaces is the same.
Examples
# Configure the hello interval on VLAN-interface as 20 seconds.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] ospf timer hello 20
Related commands
ospf timer dead
ospf timer poll
Use ospf timer poll to set the poll interval on an NBMA interface.
Use undo ospf timer poll to restore the default.
Syntax
ospf timer poll seconds
undo ospf timer poll
Default
The poll interval is 120 seconds on an interface.
Views
Interface view
Predefined user roles
network-admin
Parameters
seconds: Specifies the poll interval in the range of 1 to 2147483647 seconds.
116
Usage guidelines
When an NBMA interface finds its neighbor is down, it sends hello packets at the poll interval.
The poll interval must be at least four times the hello interval.
Examples
# Set the poll timer interval on VLAN-interface 10 to 130 seconds.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] ospf timer poll 130
Related commands
ospf timer hello
ospf timer retransmit
Use ospf timer retransmit to set the LSA retransmission interval on an interface.
Use undo ospf timer retransmit to restore the default.
Syntax
ospf timer retransmit interval
undo ospf timer retransmit
Default
The LSA retransmission interval is 5 seconds on an interface.
Views
Interface view
Predefined user roles
network-admin
Parameters
interval: Specifies the LSA retransmission interval in the range of 1 to 3600 seconds.
Usage guidelines
After sending an LSA, an interface waits for an acknowledgement packet. If the interface receives no
acknowledgement within the retransmission interval, it retransmits the LSA.
To avoid unnecessary retransmissions, set the retransmission interval as needed.
Examples
# Set the LSA retransmission interval to 8 seconds on VLAN-interface 10.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] ospf timer retransmit 8
ospf trans-delay
Use ospf trans-delay to set the LSA transmission delay on an interface.
Use undo ospf trans-delay to restore the default.
117
Syntax
ospf trans-delay seconds
undo ospf trans-delay
Default
The LSA transmission delay is 1 second.
Views
Interface view
Predefined user roles
network-admin
Parameters
seconds: Specifies the LSA transmission delay in the range of 1 to 3600 seconds.
Usage guidelines
Each LSA in the LSDB has an age that is incremented by 1 every second, but the age does not change
during transmission. Adding a transmission delay into the age time is important in low speed networks.
Examples
# Set the LSA transmission delay to 3 seconds on VLAN-interface 10.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] ospf trans-delay 3
peer
Use peer to specify a neighbor and a DR priority for the neighbor.
Use undo peer to remove the configuration.
Syntax
peer ip-address [ cost value | dr-priority dr-priority ]
undo peer ip-address
Default
No neighbor is specified.
Views
OSPF view
Predefined user roles
network-admin
Parameters
ip-address: Specifies a neighbor IP address.
cost value: Specifies the cost to reach the neighbor, in the range of 1 to 65535.
dr-priority dr-priority: Specifies the neighbor DR priority, in the range of 0 to 255. The default neighbor
DR priority is 1.
118
Usage guidelines
On an X.25 or Frame Relay network, you can configure mappings to make the network fully meshed (any
two routers have a direct link in between), so OSPF can handle DR/BDR election as it does on a
broadcast network.
Routers on the network cannot find neighbors through broadcasting hello packets, so you must specify
neighbors and neighbor DR priorities on the routers.
After startup, a router sends a hello packet to neighbors with DR priorities higher than 0. When the DR
and BDR are elected, the DR will send hello packets to all neighbors for adjacency establishment.
The cost set with the peer command applies only to P2MP neighbors. If no cost is specified, the cost to
the neighbor equals the local interface's cost.
A router uses the priority set with the peer command to determine whether to send a hello packet to the
neighbor rather than for DR election. The DR priority set with the ospf dr-priority command is used for DR
election.
Examples
# Specify the neighbor 1.1.1.1.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] peer 1.1.1.1
Related commands
ospf dr-priority
preference
Use preference to set a preference for OSPF.
Use undo preference to restore the default.
Syntax
preference [ ase ] [ route-policy route-policy-name ] value
undo preference [ ase ]
Default
The preference is 10 for OSPF internal routes and 150 for OSPF external routes (or ASE routes).
Views
OSPF view
Predefined user roles
network-admin
Parameters
ase: Sets a preference for OSPF external routes. Without this keyword, the command sets a preference
for OSPF internal routes.
route-policy route-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to 63
characters, to set a preference for the specified routes.
value: Specifies the preference value in the range of 1 to 255. The smaller the value, the higher the
preference.
119
Usage guidelines
If multiple routing protocols find routes to the same destination, the router uses the route found by the
protocol with the highest preference.
Examples
# Set a preference of 200 for OSPF external routes.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] preference ase 200
# Use a routing policy to set a preference of 100.
<Sysname> system-view
[Sysname] ip prefix-list test index 10 permit 100.1.1.0 24
[Sysname] route-policy pre permit node 10
[Sysname-route-policy-pre-10] if-match ip-prefix test
[Sysname-route-policy-pre-10] quit
[Sysname] ospf 100
[Sysname-ospf-100] preference route-policy pre 100
reset ospf counters
Use reset ospf counters to clear OSPF statistics.
Syntax
reset ospf [ process-id ] counters
Views
User view
Predefined user roles
network-admin
Parameters
process-id: Clears the statistics an OSPF process specified by its ID in the range of 1 to 65535.
Examples
# Clear OSPF statistics for all processes.
<Sysname> reset ospf counters
reset ospf process
Use reset ospf process to restart all OSPF processes or a specified process.
Syntax
reset ospf [ process-id ] process [ graceful-restart ]
Views
User view
Predefined user roles
network-admin
120
Parameters
process-id: Specifies an OSPF process by its ID in the range of 1 to 65535.
graceful-restart: Resets the OSPF process by using GR.
Usage guidelines
If no process is specified, this command restarts all OSPF processes.
The reset ospf process command performs the following actions:
•
Clears all invalid LSAs without waiting for their timeouts.
•
Makes a newly configured Router ID take effect.
•
Starts a new round of DR/BDR election.
•
Does not remove previous OSPF configurations.
The system prompts you to select whether to reset OSPF process upon execution of this command.
Examples
# Reset all OSPF processes.
<Sysname> reset ospf process
Reset OSPF process? [Y/N]:y
reset ospf redistribution
Use reset ospf redistribution to restart route redistribution.
Syntax
reset ospf [ process-id ] redistribution
Views
User view
Predefined user roles
network-admin
Parameters
process-id: Specifies an OSPF process by its ID in the range of 1 to 65535.
Usage guidelines
If no process ID is specified, this command restarts route redistribution for all OSPF processes.
Examples
# Restart route redistribution.
<Sysname> reset ospf redistribution
rfc1583 compatible
Use rfc1583 compatible to enable compatibility with RFC 1583.
Use undo rfc1583 compatible to disable compatibility with RFC 1583.
Syntax
rfc1583 compatible
undo rfc1583 compatible
121
Default
Compatibility with RFC 1583 is enabled.
Views
OSPF view
Predefined user roles
network-admin
Usage guidelines
RFC 1583 specifies a different method than RFC 2328 for selecting the best route from multiple AS
external routes destined for the same network. Using this command makes them compatible. If RFC 2328
is compatible with RFC 1583, the intra-area route in the backbone area is preferred. If not, the intra-area
route in the non-backbone area is preferred to reduce the burden of the backbone area.
Examples
# Disable compatibility with RFC 1583.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] undo rfc1583 compatible
router id
Use router id to configure a global router ID.
Use undo router id to restore the default.
Syntax
router id router-id
undo router id
Default
No global router ID is configured.
Views
System view
Predefined user roles
network-admin
Parameters
router-id: Specifies the router ID, in the format of an IPv4 address.
Usage guidelines
OSPF uses a router ID to identify a device. If no router ID is specified, the global router ID is used.
If no global router ID is configured, the highest loopback interface IP address is used as the router ID. If
no loopback interface IP address is available, the highest physical interface IP address is used,
regardless of the interface status (up or down).
A new router ID is selected only when the interface IP address used as the router ID is removed or
changed. Other events will not trigger a router ID re-selection. For example, router ID re-selection is not
triggered when the interface goes down, you change the router ID to the address of a loopback interface
122
after a physical interface address is selected as the router ID, or a higher interface IP address is
configured as the router ID.
After a router ID is changed, you must use the reset command to enable it.
Examples
# Configure a global router ID as 1.1.1.1.
<Sysname> system-view
[Sysname] router id 1.1.1.1
silent-interface (OSPF view)
Use silent-interface to disable an interface or all interfaces from receiving and sending OSPF packets.
Use undo silent-interface to remove the configuration.
Syntax
silent-interface { interface-type interface-number | all }
undo silent-interface { interface-type interface-number | all }
Default
An interface can receive and send OSPF packets.
Views
OSPF view
Predefined user roles
network-admin
Parameters
interface-type interface-number: Specifies an interface by its type and number.
all: Specifies all interfaces.
Usage guidelines
A disabled interface is a passive interface that cannot receive or send any hello packets.
To disable a network from receiving and sending OSPF routes, issue the command on the interface
connected to the network.
Examples
# Disable VLAN-interface 10 from receiving and sending OSPF packets.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] silent-interface vlan-interface 10
snmp-agent trap enable ospf
Use snmp-agent trap enable ospf to enable the sending of SNMP traps for a specific OSPF process.
Use undo snmp-agent trap enable ospf to disable the feature.
Syntax
snmp-agent trap enable ospf [ authentication-failure | bad-packet | config-error |
grhelper-status-change | grrestarter-status-change | if-state-change | lsa-maxage | lsa-originate |
123
lsdb-approaching-overflow | lsdb-overflow | neighbor-state-change | nssatranslator-status-change |
retransmit | virt-authentication-failure | virt-bad-packet | virt-config-error | virt-retransmit |
virtgrhelper-status-change | virtif-state-change | virtneighbor-state-change ] *
undo snmp-agent trap enable ospf [ authentication-failure | bad-packet | config-error |
grhelper-status-change | grrestarter-status-change | if-state-change | lsa-maxage | lsa-originate |
lsdb-approaching-overflow | lsdb-overflow | neighbor-state-change | nssatranslator-status-change |
retransmit | virt-authentication-failure | virt-bad-packet | virt-config-error | virt-retransmit |
virtgrhelper-status-change | virtif-state-change | virtneighbor-state-change ] *
Default
OSPF trap sending is enabled.
Views
System view
Predefined user roles
network-admin
Parameters
authentication-failure: Specifies traps about authentication failures on an interface.
bad-packet: Specifies traps about error messages received on an interface.
config-error: Specifies traps about error configuration of an interface.
grhelper-status-change: Specifies traps about GR Helper state change.
grrestarter-status-change: Specifies traps about GR Restarter state change.
if-state-change: Specifies traps about interface state change.
lsa-maxage: Specifies LSA max age traps.
lsa-originate: Specifies traps about locally generated LSAs.
lsdb-approaching-overflow: Specifies traps about approaching LSDB overflows.
lsdb-overflow: Specifies LSDB overflow traps.
neighbor-state-change: Specifies traps about neighbor state change.
nssatranslator-status-change: Specifies traps about NSSA translator state change.
retransmit: Specifies traps about packets that are received and forwarded on an interface.
virt-authentication-failure: Specifies traps about authentication failures on a virtual interface.
virt-bad-packet: Specifies traps about error messages received on a virtual interface.
virt-config-error: Specifies traps about error configuration of a virtual interface.
virt-retransmit: Specifies traps about packets that are received and forwarded on a virtual interface.
virtgrhelper-status-change: Specifies traps about neighbor GR Helper state changes of a virtual
interface.
virtif-state-change: Specifies traps about virtual interface state change.
virtneighbor-state-change: Specifies traps about the neighbor state change of a virtual interface.
Examples
# Enable OSPF to send SNMP traps about authentication failures on an interface.
124
<Sysname> system-view
[Sysname] snmp-agent trap enable ospf authentication-failure
snmp trap rate-limit
Use snmp trap rate-limit to configure the number of output traps in a specific time.
Use undo snmp trap rate-limit to restore the default.
Syntax
snmp trap rate-limit interval trap-interval count trap-number
undo snmp trap rate-limit
Default
OSPF outputs 7 traps in 10 seconds.
Views
OSPF view
Predefined user roles
network-admin
Parameters
trap-interval: Specifies the trap output interval in the range of 1 to 60 seconds.
trap-number: Specifies the number of output traps in a specific time, in the range of 0 to 300.
Examples
# Configure OSPF to output 10 traps in 5 seconds.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] snmp trap rate-limit interval 5 count 10
spf-schedule-interval
Use spf-schedule-interval to set the OSPF SPF calculation interval.
Use undo spf-schedule-interval to restore the default.
Syntax
spf-schedule-interval maximum-interval [ minimum-interval [ incremental-interval ] ]
undo spf-schedule-interval
Default
The maximum calculation interval is 5 seconds, the minimum interval is 50 milliseconds, and the
incremental interval is 200 milliseconds.
Views
OSPF view
Predefined user roles
network-admin
125
Parameters
maximum-interval: Specifies the maximum OSPF SPF calculation interval in the range of 1 to 60 seconds.
minimum-interval: Specifies the minimum OSPF SPF calculation interval in the range of 10 to 60000
milliseconds.
incremental-interval: Specifies the incremental OSPF SPF calculation interval in the range of 10 to 60000
milliseconds.
Usage guidelines
Based on the LSDB, an OSPF router uses SPF to calculate a shortest path tree with itself as the root. OSPF
uses the shortest path tree to determine the next hop to a destination. By adjusting the SPF calculation
interval, you can prevent bandwidth and router resources from being over-consumed due to frequent
topology changes.
When network changes are not frequent, OSPF performs SPF calculations at the minimum-interval. If
network changes become frequent, the SPF calculation interval is incremented by the incremental-interval
each time a calculation happens until the maximum-interval is reached.
The minimum interval and the incremental interval cannot be greater than the maximum interval.
Examples
# Configure the maximum SPF calculation interval as 10 seconds, minimum interval as 500 milliseconds
and incremental interval as 300 milliseconds.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] spf-schedule-interval 10 500 300
stub (OSPF area view)
Use stub to configure an area as a stub area.
Use undo stub to restore the default.
Syntax
stub [ default-route-advertise | no-summary ] *
undo stub
Default
No area is a stub area.
Views
OSPF area view
Predefined user roles
network-admin
Parameters
default-route-advertise-always: Usable only on a stub ABR. With this keyword, the ABR advertises a
default route in a Type-3 LSA into the stub area regardless of whether FULL-state neighbors exist in the
backbone area. Without this keyword, the ABR advertises a default route in a Type-3 LSA into the stub
area only when at least one FULL-state neighbor exists in the backbone area.
126
no-summary: Usable only on a stub ABR. With this keyword, the ABR advertises only a default route in
a Type-3 LSA into the stub area without advertising any other Type-3 LSAs (such a stub area is a totally
stub area).
Usage guidelines
To remove the default-route-advertise-always or stub no-summary configuration on the ABR, execute the
stub command again to overwrite it.
To configure an area as a stub area, issue the stub command on all routers attached to the area.
Examples
# Configure Area1 as a stub area.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] area 1
[Sysname-ospf-100-area-0.0.0.1] stub
Related commands
default-cost
stub-router
Use stub-router to configure a router as a stub router.
Use undo stub-router to restore the default.
Syntax
stub-router
undo stub-router
Default
No router is a stub router.
Views
OSPF view
Predefined user roles
network-admin
Usage guidelines
The router LSAs sent by the stub router over different links contain different link type values. A value of 3
represents a link to a stub network, and the cost of the link is not changed. A value of 1, 2, or 4 represents
a point-to-point link, a link to a transit network, or a virtual link, and the cost of such links is set to 65535.
Neighbors on such links will not send packets to the stub router as long as they have a route with a
smaller cost.
Examples
# Configure a stub router.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] stub-router
127
transmit-pacing
Use transmit-pacing to configure the maximum number of LSU packets that can be sent at the specified
interval.
Use undo transmit-pacing to restore the default.
Syntax
transmit-pacing interval interval count count
undo transmit-pacing
Default
An OSPF interface sends up to three LSU packets every 20 milliseconds.
Views
OSPF view
Predefined user roles
network-admin
Parameters
interval interval: Specifies an interval at which an interface sends LSU packets, in the range of 10 to
1000 milliseconds. If the router has multiple OSPF interfaces, increase this interval to reduce the total
number of LSU packets sent by the router every second.
count count: Specifies the maximum number of LSU packets sent by an interface at each interval, in the
range of 1 to 200. If the router has multiple OSPF interfaces, decrease the maximum number to reduce
the total number of LSU packets sent by the router every second.
Examples
# Configure all the interfaces running OSPF process 1 to send up to 10 LSU packets every 30
milliseconds.
<Sysname> system-view
[Sysname] ospf 1
[Sysname-ospf-1] transmit-pacing interval 30 count 10
vlink-peer (OSPF area view)
Use vlink-peer to configure a virtual link.
Use undo vlink-peer to remove a virtual link.
Syntax
vlink-peer router-id [ dead seconds | hello seconds | { hmac-md5 | md5 } key-id { cipher cipher-string
| plain plain-string } | retransmit seconds | simple { cipher cipher-string | plain plain-string } |
trans-delay seconds ] *
undo vlink-peer router-id [ dead | hello | { hmac-md5 | md5 } key-id | retransmit | simple |
trans-delay ] *
Default
No virtual link is configured.
128
Views
OSPF area view
Predefined user roles
network-admin
Parameters
router-id: Specifies the router ID of the neighbor on the virtual link.
hello seconds: Sets the hello interval in the range of 1 to 8192 seconds. The default is 10. It must be
identical with the hello interval on the virtual link neighbor.
retransmit seconds: Sets the retransmission interval in the range of 1 to 3600 seconds. The default is 5.
trans-delay seconds: Sets the transmission delay interval in the range of 1 to 3600 seconds. The default
is 1.
dead seconds: Sets the dead interval in the range of 1 to 32768 seconds. The default is 40. It must be
identical with that on the virtual link neighbor. The dead interval is at least four times the hello interval.
md5: Enables MD5 authentication.
hmac-md5: Enables HMAC-MD5 authentication.
simple: Enables simple authentication.
key-id: Specifies the key ID for MD5 or HMAC-MD5 authentication, in the range of 1 to 255.
cipher: Sets a ciphertext key.
cipher-string: Specifies a ciphertext key. For simple authentication, specify a key of 33 to 41 characters.
For MD5/HMAC-MD5 authentication, specify a key of 33 to 53 characters.
plain: Sets a plaintext key.
plain-string: Specifies a plaintext key. For simple authentication, specify a key of 1 to 8 characters. For
MD5/HMAC-MD5 authentication, specify a key of 1 to 61 characters.
Usage guidelines
As defined in RFC 2328, all non-backbone areas must maintain connectivity to the backbone. You can
use the vlink-peer command to configure a virtual link to connect an area to the backbone.
When you configure this command, follow these guidelines:
•
The smaller the hello interval is, the faster the network converges, and the more network resources
are consumed.
•
A retransmission interval that is too small can cause unnecessary retransmissions. A large value is
appropriate for a low speed link.
•
Specify an appropriate transmission delay with the trans-delay keyword.
The authentication mode at the non-backbone virtual link end is determined by the authentication mode
at the backbone virtual link end. The two authentication modes (MD5 or simple) are independent, and
you cannot specify either mode.
For secrecy, all keys, including keys configured in plain text, are saved in cipher text.
Examples
# Configure a virtual link to the neighbor with router ID 1.1.1.1.
<Sysname> system-view
[Sysname] ospf 100
129
[Sysname-ospf-100] area 2
[Sysname-ospf-100-area-0.0.0.2] vlink-peer 1.1.1.1
Related commands
•
authentication-mode
•
display ospf vlink
130
IS-IS commands
area-authentication-mode
Use area-authentication-mode to specify an area authentication mode and a password.
Use undo area-authentication-mode to restore the default.
Syntax
area-authentication-mode { md5 | simple } { cipher cipher-string | plain plain-string } [ ip | osi ]
undo area-authentication-mode
Default
No area authentication or password is configured.
Views
IS-IS view
Predefined user roles
network-admin
Parameters
md5: Specifies the MD5 authentication mode.
simple: Specifies the simple authentication mode.
cipher: Sets a ciphertext password.
cipher-string: Specifies a ciphertext password, a case-sensitive string of 33 to 53 characters.
plain: Sets a plaintext password.
plain-string: Specifies a plaintext password, a case-sensitive string of 1 to 16 characters.
ip: Checks IP-related fields in LSPs.
osi: Checks OSI-related fields in LSPs.
Usage guidelines
The password in the specified mode is inserted into all outbound Level-1 packets (LSP, CSNP, and PSNP)
and is used to authenticate inbound Level-1 packets.
Area authentication enables IS-IS to discard routes from untrusted routers.
Routers in an area must have the same authentication mode and password.
If neither ip nor osi is specified, OSI-related fields are checked.
For secrecy, all passwords, including passwords configured in plain text, are saved in cipher text.
The actual network environment does not impact whether a password should use ip or osi.
131
Examples
# Configure the area authentication mode as simple, and set the plaintext password to 123456.
<Sysname> system-view
[Sysname] isis 1
[Sysname-isis-1] area-authentication-mode simple plain 123456
Related commands
•
domain-authentication-mode
•
isis authentication-mode
auto-cost enable
Use auto-cost enable to enable automatic link cost calculation.
Use undo auto-cost enable to disable the function.
Syntax
auto-cost enable
undo auto-cost enable
Default
This function is disabled.
Views
IS-IS view
Predefined user roles
network-admin
Usage guidelines
After automatic link cost calculation is enabled, the link cost is automatically calculated based on the
bandwidth reference value of an interface. When the cost-style is wide or wide-compatible, the cost
value of an interface is calculated by using the formula: Cost=(reference bandwidth value/link
bandwidth) × 10. For other cost styles, Table 31 applies.
Table 31 Automatic cost calculation scheme for cost styles other than wide and wide-compatible
Interface bandwidth
Cost
≤10 Mbps
60
≤100 Mbps
50
≤155 Mbps
40
≤622 Mbps
30
≤2500 Mbps
20
>2500 Mbps
10
Examples
# Enable automatic link cost calculation for IS-IS process 1.
132
<Sysname> system-view
[Sysname] isis 1
[Sysname-isis-1] auto-cost enable
Related commands
•
bandwidth-reference
•
cost-style
bandwidth-reference (IS-IS view)
Use bandwidth-reference to set the bandwidth reference value for automatic link cost calculation.
Use undo bandwidth-reference to restore the default.
Syntax
bandwidth-reference value
undo bandwidth-reference
Default
The bandwidth reference value is 100 Mbps.
Views
IS-IS view
Predefined user roles
network-admin
Parameters
value: Specifies the bandwidth reference value in the range of 1 to 2147483648 Mbps.
Examples
# Configure the bandwidth reference of IS-IS process 1 as 200 Mbps.
<Sysname> system-view
[Sysname] isis 1
[Sysname-isis-1] bandwidth-reference 200
Related commands
auto-cost enable
circuit-cost
Use circuit-cost to set a global IS-IS link cost.
Use undo circuit-cost to remove the configuration.
Syntax
circuit-cost value [ level-1 | level-2 ]
undo circuit-cost [ level-1 | level-2 ]
133
Default
No global link cost is configured.
Views
IS-IS view
Predefined user roles
network-admin
Parameters
value: Specifies the link cost value. The value range varies by cost style.
•
For styles narrow, narrow-compatible, and compatible, the cost value is in the range of 0 to 63.
•
For styles wide and wide-compatible, the cost value is in the range of 0 to 16777215.
level-1: Applies the link cost to Level-1.
level-2: Applies the link cost to Level-2.
Usage guidelines
If no level is specified, the specified cost applies to both Level-1 and Level-2.
Examples
# Set the global Level-1 link cost of IS-IS process 1 to 11.
<Sysname> system-view
[Sysname] isis 1
[Sysname-isis-1] circuit-cost 11 level-1
Related commands
•
cost-style
•
isis cost
cost-style
Use cost-style to set a cost style.
Use undo cost-style to restore the default.
Syntax
cost-style { narrow | wide | wide-compatible | { compatible | narrow-compatible } [ relax-spf-limit ] }
undo cost-style
Default
Only narrow cost style packets can be received and sent.
Views
IS-IS view
Predefined user roles
network-admin
134
Parameters
narrow: Receives and sends only narrow cost style packets. (The narrow cost is in the range of 0 to 63.)
wide: Receives and sends only wide cost style packets. (The wide cost is in the range of 0 to 16777215.)
compatible: Receives and sends both wide and narrow cost style packets.
narrow-compatible: Receives both narrow and wide cost style packets, but sends only narrow cost style
packets.
wide-compatible: Receives both narrow and wide cost style packets, but sends only wide cost style
packets.
relax-spf-limit: Allows receiving routes with a cost greater than 1023. If this keyword is not specified, any
route with a cost bigger than 1023 will be discarded. This keyword is only available when compatible or
narrow-compatible is included.
Examples
# Configure the router to send only narrow cost style packets, but receive both narrow and wide cost style
packets.
<Sysname> system-view
[Sysname] isis 1
[Sysname-isis-1] cost-style narrow-compatible
Related commands
•
circuit-cost
•
isis cost
default-route-advertise (IS-IS view)
Use default-route-advertise to advertise a default route of 0.0.0.0/0.
Use undo default-route-advertise to restore the default.
Syntax
default-route-advertise [ [ level-1 | level-1-2 | level-2 ] | route-policy route-policy-name ] *
undo default-route-advertise
Default
Default route advertisement is disabled.
Views
IS-IS view
Predefined user roles
network-admin
Parameters
level-1: Advertises a Level-1 default route.
level-1-2: Advertises both Level-1 and Level-2 default routes.
level-2: Advertises a Level-2 default route.
135
route-policy route-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to 63
characters.
Usage guidelines
If no level is specified, a Level-2 default route is advertised.
The Level-1 default route is advertised to other routers in the same area, and the Level-2 default route is
advertised to all the Level-2 and Level-1-2 routers.
You can use a routing policy to specify a level for the default route. The apply isis level-1 command in
routing policy view can generate a Level-1 default route. The apply isis level-2 command in routing policy
view can generate a Level-2 default route. The apply isis level-1-2 command in routing policy view can
generate both a Level-1 default route and Level-2 default route.
Examples
# Configure IS-IS process 1 to advertise a Level-2 default route.
<Sysname> system-view
[Sysname] isis 1
[Sysname-isis-1] default-route-advertise
display isis brief
Use display isis brief to display brief configuration information for an IS-IS process.
Syntax
display isis brief [ process-id ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
process-id: Specifies a process by its ID in the range of 1 to 65535. If no process is specified, the
command displays brief configuration information for all IS-IS processes.
Examples
# Display brief IS-IS configuration information.
<Sysname> display isis brief
IS-IS(1) Protocol Brief Information
network-entity
: 10.0000.0000.0001.00
is-level
: level-1-2
cost-style
: narrow
fast-reroute
: disable
preference
: 15
lsp-length receive
: 1497
136
lsp-length originate
level-1
: 1497
level-2
: 1497
maximum imported routes
: 1000000
timers
lsp-max-age
: 1200
lsp-refresh
: 900
SPF intervals
: 5 50 200
IPv6 enable
preference
: 15
maximum imported routes : 1000000
Table 32 Command output
Field
Description
network-entity
Network entity name.
is-level
IS-IS routing level.
cost-style
Cost style.
Whether FRR is enabled:
fast-reroute
• disable—FRR is disabled.
• enable—FRR is enabled.
preference
IS-IS route preference.
Lsp-length receive
Maximum LSP that can be received.
Lsp-length originate
Maximum LSP that can be generated.
maximum imported routes
Maximum number of redistributed Level-1/Level-2
IPv4/IPv6 routes.
Timers:
• lsp-max-age—Maximum life period of LSP.
• lsp-refresh—Refresh interval of LSPs.
• Interval between SPFs—Interval between SPF
Timers
calculations.
IPv6 enable
IPv6 is enabled.
display isis graceful-restart status
Use display isis graceful-restart status to display IS-IS GR state.
Syntax
display isis graceful-restart status [ level-1 | level-2 ] [ process-id ]
Views
Any view
137
Predefined user roles
network-admin
network-operator
Parameters
level-1: Displays the IS-IS Level-1 GR state.
level-2: Displays the IS-IS Level-2 GR state.
process-id: Specifies a process by its ID in the range of 1 to 65535.
Examples
# Display IS-IS GR state.
<Sysname> display isis graceful-restart status
Restart information for IS-IS(1)
-------------------------------Restart status: COMPLETE
Restart phase: Finish
Restart t1: 3, count 10; Restart t2: 60; Restart t3: 300
SA Bit: supported
Level-1 restart information
--------------------------Total number of interfaces: 1
Number of waiting LSPs: 0
Level-2 restart information
--------------------------Total number of interfaces: 1
Number of waiting LSPs: 0
Table 33 Command output
Field
Description
Current GR state:
• RESTARTING—In this state, forwarding can be
ensured.
Restart status
• STARTING—In this state, forwarding cannot be
ensured.
• COMPLETE—GR is completed.
Current Restart phase:
•
•
•
•
•
•
Restart phase
138
LSDB synchronization.
First SPF computation.
Redistribution.
Second SPF computation.
LSP generation.
Finish.
Field
Description
Restart t1
T1 timer, in seconds.
count
Number of T1 timer expirations.
Restart t2
T2 timer, in seconds.
Restart t3
T3 timer, in seconds.
Whether SA is supported:
SA Bit
• Supported.
• Not supported.
Total number of interfaces
Total number of IS-IS interfaces.
Number of waiting LSPs
Number of LSPs not obtained by the GR restarter from
GR helpers during LSDB synchronization.
display isis interface
Use display isis interface to display IS-IS interface information.
Syntax
display isis interface [ [ interface-type interface-number ] [ verbose ] | statistics ] [ process-id ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
interface-type interface-number: Displays statistics of a specified IS-IS interface.
verbose: Displays detailed information about an interface. If this keyword is not specified, this command
displays brief information about an interface.
statistics: Displays IS-IS interface statistics.
process-id: Displays IS-IS interface information for an IS-IS process specified by its ID in the range of 1 to
65535.
Usage guidelines
If no interface is specified, the command displays information about all interfaces.
If no IS-IS process is specified, the command displays all interface information for all processes.
Examples
# Display brief IS-IS interface information.
<Sysname> display isis interface
Interface information for IS-IS(1)
----------------------------------
139
Interface:
Vlan-interface12
Id
IPv4.State
IPv6.State
MTU
Type
DIS
001
Up
Down
547
L1/L2
Yes/No
# Display detailed IS-IS interface information.
<Sysname> display isis interface verbose
Interface information for IS-IS(1)
----------------------------------
Interface:
Vlan-interface12
Id
IPv4.State
IPv6.State
MTU
Type
DIS
001
Up
Down
547
L1/L2
Yes/No
SNPA Address
:
000c-29b2-a5e3
IP Address
:
8.8.8.7
Secondary IP Address(es)
:
IPv6 Link Local Address
:
Csnp Timer Value
:
L1
10
L2
10
Hello Timer Value
:
L1
3
L2
10
Hello Multiplier Value
:
L1
3
L2
3
Lsp Timer Value
:
L12
33
Lsp Transmit-Throttle Count
:
L12
5
Cost
:
L1
10
L2
10
Priority
:
L1
64
L2
64
IPv4 BFD
:
Disabled
IPv6 BFD
:
Disabled
Table 34 Command output
Field
Description
Interface
Interface type and number.
Id
Circuit ID.
IPv4.State
IPv4 state.
IPv6.State
IPv6 state.
MTU
Interface MTU.
Type
Interface link adjacency type.
DIS
Whether the interface is elected as the DIS or not.
SNPA Address
Subnet access point address.
IP Address
Primary IP address.
Secondary IP Address(es)
Secondary IP addresses.
IPv6 Link Local Address
IPv6 link local address.
Csnp Timer Value
Interval for sending CSNP packets.
Hello Timer Value
Interval for sending Hello packets.
140
Field
Description
Hello Multiplier Value
Number of invalid Hello packets.
Lsp Timer Value
Minimum interval for sending LSP packets.
Lsp Transmit-Throttle Count
Number of LSP packets sent each time.
Cost
Cost of the interface.
Priority
DIS priority.
Whether BFD for IS-IS is enabled:
• Disabled.
• Enabled.
IPv4 BFD
Whether BFD for IPv6 IS-IS is enabled:
• Disabled.
• Enabled.
IPv6 BFD
# Display IS-IS interface statistics.
<Sysname> display isis interface statistics
Interface Statistics information for ISIS(1)
-------------------------------------------Type
IPv4 Up/Down
IPv6 Up/Down
LAN
1/0
0/0
P2P
0/0
0/0
Table 35 Command output
Field
Description
Network type of the interface:
Type
• LAN for broadcast network.
• P2P for point-to-point network.
IPv4 UP
Number of IS-IS interfaces in up state.
IPv4 Down
Number of IS-IS interfaces in down state.
IPv6 UP
Number of IS-ISv6 interfaces in up state. If IPv6 is not
enabled, this field displays 0.
IPv6 Down
Number of IS-ISv6 interfaces in down state. If IPv6 is not
enabled, this field displays 0.
display isis lsdb
Use display isis lsdb to display IS-IS link state database.
Syntax
display isis lsdb [ [ level-1 | level-2 ] | local | [ lsp-id lspid | lsp-name lspname ] | verbose ] *
[ process-id ]
141
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
level-1: Displays the level-1 LSDB.
level-2: Displays the level-2 LSDB.
local: Displays LSP information generated locally.
lsp-id lspid: Specifies an LSP ID, in the form of sysID. Pseudo ID-fragment num, where sysID represents the
originating node or pseudo node, and Pseudo ID is separated by a dot from sysID and by a hyphen from
fragment num.
lspname: Specifies the LSP name, in the form of Symbolic name.Pseudo ID-fragment num, where Pseudo
ID is separated by a dot from Symbolic name and by a hyphen from fragment num. If the Pseudo ID is 0,
specify the LSP name in the form Symbolic name-fragment num.
verbose: Displays LSDB detailed information. Without this argument, the command displays brief
information about LSDB.
process-id: Specifies an IS-IS process by its ID in the range of 1 to 65535 to display the LSDB of the IS-IS
process.
Usage guidelines
If no level is specified, the command displays both Level-1 and Level-2 link state databases.
If no IS-IS process ID is specified, the command displays link state databases for all IS-IS processes.
Examples
# Display brief Level-1 LSDB information.
<Sysname> display isis lsdb level-1
Database information for ISIS(1)
-------------------------------Level-1 Link State Database
--------------------------LSPID
Seq Num
Checksum
Holdtime
Length
ATT/P/OL
------------------------------------------------------------------------------5555.1111.1111.00-00
0x00000006
0x8519
1150
75
0/0/0
5555.1111.1111.00-01
0x00000001
0x4995
1139
41
0/0/0
7777.8888.1111.00-00* 0x00000020
0xceeb
1159
68
0/0/0
7777.8888.1111.01-00* 0x00000004
0xb4a4
1150
55
0/0/0
*-Self LSP, +-Self LSP(Extended), ATT-Attached, P-Partition, OL-Overload
142
# Display detailed Level-1 LSDB information.
<Sysname> display isis lsdb level-1 verbose
Database information for ISIS(1)
--------------------------------
Level-1 Link State Database
---------------------------
LSPID
Seq Num
Checksum
Holdtime
Length
ATT/P/OL
------------------------------------------------------------------------------5555.1111.1111.00-00
0x00000006
SOURCE
5555.1111.1111.00
NLPID
IPV4
AREA ADDR
18
INTF ADDR
8.8.8.5
NBR
NBR
0x8519
1124
75
0/0/0
41
0/0/0
68
0/0/0
55
0/0/0
ID
5555.5555.5555.00
COST: 0
7777.8888.1111.01
COST: 10
ID
5555.1111.1111.00-01
SOURCE
0x00000001
0x4995
1113
5555.1111.1111.00
IP-Internal
8.8.8.0
255.255.255.0
7777.8888.1111.00-00* 0x00000020
SOURCE
7777.8888.1111.00
NLPID
IPV4
AREA ADDR
18
INTF ADDR
8.8.8.7
NBR
0xceeb
COST: 10
1133
ID
7777.8888.1111.01
COST: 10
IP-Internal
8.8.8.0
255.255.255.0
7777.8888.1111.01-00* 0x00000004
SOURCE
7777.8888.1111.01
NLPID
IPV4
NBR
ID
NBR
ID
0xb4a4
COST: 10
1124
5555.1111.1111.00
COST: 0
7777.8888.1111.00
COST: 0
*-Self LSP, +-Self LSP(Extended), ATT-Attached, P-Partition, OL-Overload
143
Table 36 Command output
Field
Description
LSPID
LSP ID.
Seq Num
LSP sequence number.
Checksum
LSP checksum.
Holdtime
LSP lifetime, which decreases as time elapses.
Length
LSP length.
ATT/P/OL
• ATT—Attach bit.
• P—Partition bit.
• OL—Overload bit.
1 means the LSP bit is set and 0 means the LSP bit is not set.
SOURCE
System ID of the originating router.
NLPID
Network layer protocol the originating router runs.
AREA ADDR
Area address of the originating router.
INTF ADDR
IP address of the originating router’s IS-IS interface.
INTF ADDR V6
IPv6 address of the originating router’s IS-ISv6 interface.
NBR ID
Neighbor ID of the originating router.
IP-Internal
Internal IP address and mask of the originating router.
IP-External
External IP address and mask of the originating router.
IP-Extended
Extended IP address and mask of the originating router.
COST
Cost.
Auth
Authentication information of the originating router.
IPV6
Internal IPv6 address and prefix of the originating router.
IPV6-Ext
External IPv6 address and prefix of the originating router.
display isis name-table
Use display isis name-table to display the host name to system ID mapping table.
Syntax
display isis name-table [ process-id ]
Views
Any view
Predefined user roles
network-admin
network-operator
144
Parameters
process-id: Displays the host name to system ID mapping table for an IS-IS process specified by its ID in
the range of 1 to 65535.
Examples
# Configure a name RUTA for the local IS system.
<Sysname> system-view
[Sysname] isis 1
[Sysname-isis-1] is-name RUTA
# Map the host name RUTB to the system ID 0000.0000.0041 of a remote IS.
[Sysname-isis-1] is-name map 0000.0000.0041 RUTB
# Display the IS-IS host name to system ID mapping table.
[Sysname-isis-1] display isis name-table
Name table information for ISIS(1)
--------------------------------------------------------------System ID
Hostname
Type
6789.0000.0001
RUTA
DYNAMIC
0000.0000.0041
RUTB
STATIC
Table 37 Command output
Field
Description
System ID
System ID.
Hostname
Host name.
Type
• Static.
• Dynamic.
Mapping type:
display isis peer
Use display isis peer to display IS-IS neighbor information.
Syntax
display isis peer [ statistics | verbose ] [ process-id ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
statistics: Displays IS-IS neighbor statistics.
verbose: Displays detailed IS-IS neighbor information. Without the keyword, the command displays brief
IS-IS neighbor information.
145
process-id: Displays IS-IS neighbor information for an IS-IS process specified by its ID in the range of 1
to 65535.
Usage guidelines
If no IS-IS process ID is specified, this command displays neighbor information for all IS-IS processes.
Examples
# Display brief IS-IS neighbor information.
<Sysname> display isis peer
Peer information for ISIS(1)
----------------------------
System Id: 5555.1111.1111
Interface: Vlan-interface12
State: Up
HoldTime:
23s
Circuit Id: 7777.8888.1111.01
Type: L1(L1L2)
PRI: 64
System Id: 5555.1111.1111
Interface: Vlan-interface12
State: Up
HoldTime:
28s
Circuit Id: 7777.8888.1111.01
Type: L2(L1L2)
PRI: 64
# Display detailed IS-IS neighbor information.
<Sysname> display isis peer verbose
Peer information for ISIS(1)
----------------------------
System Id: 5555.1111.1111
Interface: Vlan-interface12
State: Up
HoldTime:
27s
Circuit Id: 7777.8888.1111.01
Type: L1(L1L2)
PRI: 64
Area Address(es): 18
Peer IP Address(es):8.8.8.5
Uptime: 00:03:17
Adj Protocol:
IPv4
System Id: 5555.1111.1111
Interface: Vlan-interface12
State: Up
HoldTime:
26s
Circuit Id: 7777.8888.1111.01
Type: L2(L1L2)
Area Address(es): 18
Peer IP Address(es):8.8.8.5
Uptime: 00:03:17
Adj Protocol:
IPv4
Table 38 Command output
Field
Description
System Id
System ID of the neighbor.
Interface
Interface connecting to the neighbor.
146
PRI: 64
Field
Description
Circuit Id
Circuit ID.
State
Circuit state.
HoldTime
Within the holdtime, if no hellos are received from the neighbor, the neighbor
is considered down. If a hello is received, the holdtime is reset to the initial
value.
Circuit type:
• L1—Means the circuit type is Level-1 and the neighbor is a Level-1 router.
• L2—Means the circuit type is Level-2 and the neighbor is a Level-2 router.
• L1(L1L2)—Means the circuit type is Level-1 and the neighbor is a Level-1-2
Type
router.
• L2(L1L2)—Means the circuit type is Level-2 and the neighbor is a Level-1-2
router.
PRI
DIS priority of the neighbor.
Area Address(es)
Area address of the neighbor.
Peer IP Address(es)
IP address of the neighbor.
Uptime
Time elapsed since the neighbor relationship was formed.
Adj Protocol
Adjacency protocol.
# Display IS-IS neighbor statistics.
<Sysname> display isis peer statistics
Peer Statistics information for ISIS(1)
--------------------------------------Type
IPv4 Up/Init
IPv6 Up/Init
LAN Level-1
1/0
0/0
LAN Level-2
1/0
0/0
P2P
0/0
0/0
Table 39 Command output
Field
Description
Neighbor type:
Type
• LAN Level-1—Number of Level-1 neighbors whose network type is broadcast.
• LAN Level-2—Number of Level-2 neighbors whose network type is broadcast.
• P2P—Number of neighbors whose network type is P2P.
IPv4 Up
Number of IPv4 neighbors in up state.
IPv4 Init
Number of IPv4 neighbors in init state.
IPv6 Up
Number of IPv6 neighbors in up state.
IPv6 Init
Number of IPv6 neighbors in init state.
147
display isis redistribute
Use display isis redistribute to display the redistributed IS-IS routing information.
Syntax
display isis redistribute [ ipv4 [ ip-address mask-length ] ] [ level-1 | level-2 ] [ process-id ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
ipv4: Displays the redistributed IPv4 routing information (the default).
ip-address mask-length: Specifies the destination IP address and mask length.
process-id: Specifies the IS-IS process by its ID in the range of 1 to 65535.
level-1: Displays the IS-IS Level-1 routing information.
level-2: Displays the IS-IS Level-2 routing information.
Usage guidelines
If no IS-IS level is specified, this command displays both Level-1 and Level-2 routing information.
Examples
# Display redistributed IPv4 routing information.
<Sysname> display isis redistribute 1
Route information for IS-IS(1)
-----------------------------Level-1 IPv4 Redistribute Table
-------------------------------Type IPv4 Destination
IntCost
ExtCost
Tag
State
-------------------------------------------------------------------------------D
192.168.30.0/24
0
0
D
11.11.11.11/32
0
0
D
10.10.10.0/24
0
0
Active
Table 40 Command output
Field
Description
Route information for IS-IS(1)
IS-IS process of the redistributed routing information.
Level-1 IPv4 Redistribute Table
Redistributed IPv4 routing information of IS-IS Level-1.
Level-2 IPv4 Redistribute Table
Redistributed IPv4 routing information of IS-IS Level-2.
148
Field
Description
Redistributed route type:
•
•
•
•
•
•
Type
Direct.
IS-IS.
Static.
OSPF.
BGP.
RIP.
IPV4 Destination
IPv4 destination address.
IntCost
Internal cost of the route.
ExtCost
External cost of the route.
Tag
Tag value.
State
Indicates whether the route is valid.
display isis route
Use display isis route to display IS-IS IPv4 routing information.
Syntax
display isis route [ ipv4 [ ip-address mask-length ] ] [ [ level-1 | level-2 ] | verbose ] * [ process-id ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
ipv4: Displays IS-IS IPv4 routing information (the default).
ip-address mask-length: Displays IS-IS IPv4 routing information for the specified IP address. The
mask-length argument is in the range of 0 to 32.
verbose: Displays detailed IS-IS IPv4 routing information.
process-id: Displays IS-IS IPv4 routing information for an IS-IS process specified by its ID in the range of
1 to 65535.
level-1: Displays Level-1 IS-IS routes.
level-2: Displays Level-2 IS-IS routes.
Usage guidelines
If no level is specified, this command displays both Level-1 and Level-2 routing information.
If no IS-IS process ID is specified, this command displays routing information for all IS-IS process IDs.
149
Examples
# Display IS-IS IPv4 routing information.
<Sysname> display isis route
Route information for ISIS(1)
-----------------------------
Level-1 IPv4 Forwarding Table
-----------------------------
IPv4 Destination
IntCost
ExtCost ExitInterface
NextHop
Flags
------------------------------------------------------------------------------8.8.8.0/24
10
NULL
Vlan12
Direct
D/L/-
9.9.9.0/24
20
NULL
Vlan12
8.8.8.5
R/L/-
Flags: D-Direct, R-Added to Rib, L-Advertised in LSPs, U-Up/Down Bit Set
Level-2 IPv4 Forwarding Table
----------------------------IPv4 Destination
IntCost
ExtCost ExitInterface
NextHop
Flags
------------------------------------------------------------------------------8.8.8.0/24
10
NULL
9.9.9.0/24
20
NULL
Vlan12
Direct
D/L/-
Flags: D-Direct, R-Added to Rib, L-Advertised in LSPs, U-Up/Down Bit Set
Table 41 Command output
Field
Description
Route information for ISIS(1)
Route information for IS-IS process 1.
ISIS(1) IPv4 Level-1 Forwarding Table
IS-IS IPv4 routing information for Level-1.
ISIS(1) IPv4 Level-2 Forwarding Table
IS-IS IPv4 routing information for Level-2.
IPv4 Destination
IPv4 destination address.
IntCost
Internal cost.
ExtCost
External cost.
ExitInterface
Exit interface.
NextHop
Next hop.
150
Field
Description
Routing state flag:
• D—Direct route.
• R—The route has been added into the routing
table.
Flags
• L—The route has been advertised in an LSP.
• U—Penetration flag. Setting it to UP can prevent an
LSP sent from L2 to L1 from being sent back to L2.
# Display detailed IS-IS IPv4 routing information.
<Sysname> display isis route verbose
Route information for ISIS(1)
-----------------------------
Level-1 IPv4 Forwarding Table
-----------------------------
IPV4 Dest : 8.8.8.0/24
Int. Cost : 10
Ext. Cost : NULL
Admin Tag : -
Src Count : 2
Flag
NextHop
Interface :
ExitIndex :
:
Direct
Vlan12
: D/L/-
0x00000000
IPV4 Dest : 9.9.9.0/24
Int. Cost : 20
Ext. Cost : NULL
Admin Tag : -
Src Count : 1
Flag
NextHop
Interface :
ExitIndex :
:
8.8.8.5
Vlan12
: R/L/-
0x00000003
Flags: D-Direct, R-Added to Rib, L-Advertised in LSPs, U-Up/Down Bit Set
Level-2 IPv4 Forwarding Table
-----------------------------
IPV4 Dest : 8.8.8.0/24
Int. Cost : 10
Ext. Cost : NULL
Admin Tag : -
Src Count : 2
Flag
NextHop
Interface :
ExitIndex :
:
Direct
Vlan12
: D/L/-
0x00000000
IPV4 Dest : 9.9.9.0/24
Int. Cost : 20
Ext. Cost : NULL
Admin Tag : -
Src Count : 1
Flag
: -/-/-
Flags: D-Direct, R-Added to Rib, L-Advertised in LSPs, U-Up/Down Bit Set
151
Table 42 Command output
Field
Description
Route information for ISIS(1)
Route information for IS-IS process 1.
ISIS(1) IPv4 Level-1 Forwarding Table
IS-IS IPv4 routing information for Level-1.
ISIS(1) IPv4 Level-2 Forwarding Table
IS-IS IPv4 routing information for Level-2.
IPV4 Dest
IPv4 destination.
Int. Cost
Internal cost.
Ext. Cost
External cost.
Admin Tag
Tag.
Src Count
Count of advertising sources.
Flag
• R—The route has been installed into the routing table.
• L—The route has been flooded in an LSP.
• U—Route leaking flag. Setting it to UP can prevent an LSP sent
Route state flag:
from L2 to L1 from being sent back to L2.
Next Hop
Next hop.
Interface
Output interface.
ExitIndex
Index of the output interface.
display isis statistics
Use display isis statistics to display IS-IS statistics.
Syntax
display isis statistics [ level-1 | level-1-2 | level-2 ] [ process-id ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
level-1: Displays IS-IS Level-1 statistics.
level-1-2: Displays IS-IS Level-1-2 statistics.
level-2: Displays IS-IS Level-2 statistics.
process-id: Displays statistics for an IS-IS process specified by its ID in the range of 1 to 65535.
Usage guidelines
If no level is specified, this command displays both Level-1 and Level-2 routing information.
152
If no IS-IS process ID is specified, this command displays the statistics for all IS-IS processes.
Examples
# Display IS-IS statistics.
<Sysname> display isis statistics
Statistics information for ISIS(1)
---------------------------------Level-1 Statistics
-----------------MTR(Basic-V4)
Learnt routes information:
Total IPv4 Learnt Routes in IPv4 Routing Table: 1
Total IPv6 Learnt Routes in IPv6 Routing Table: 0
Imported routes information:
IPv4 Imported Routes:
Static: 0
Direct: 0
ISIS:
0
BGP:
0
RIP:
0
OSPF:
0
Total Number:
0
IPv6 Imported Routes:
Static: 0
Direct: 0
ISISv6: 0
BGP4+:
RIPng:
OSPFv3: 0
0
Total Number:
0
0
Lsp information:
LSP Source ID:
No. of used LSPs
7777.8888.1111
001
Level-2 Statistics
------------------
MTR(Basic-V4)
Learnt routes information:
Total IPv4 Learnt Routes in IPv4 Routing Table: 0
Total IPv6 Learnt Routes in IPv6 Routing Table: 0
Imported routes information:
IPv4 Imported Routes:
Static: 0
Direct: 0
ISIS:
BGP:
0
153
0
RIP:
0
OSPF:
Total Number:
0
0
IPv6 Imported Routes:
Static: 0
Direct: 0
ISISv6: 0
BGP4+:
RIPng:
OSPFv3: 0
0
Total Number:
0
0
Lsp information:
LSP Source ID:
No. of used LSPs
7777.8888.1111
001
Table 43 Command output
Field
Description
Statistics information for ISIS(processid)
Statistics for the IS-IS process.
Level-1 Statistics
Level-1 statistics.
Level-2 Statistics
Level-2 statistics.
Learnt routes information
Number of learned IPv4 routes.
Number of learned IPv6 routes.
• IPv4 Imported Routes—Numbers of different types of
Imported routes information
redistributed IPv4 routes.
• IPv6 Imported Routes—Numbers of different types of
redistributed IPv6 routes.
LSP information:
Lsp information
• LSP Source ID—ID of the source system.
• No. of used LSPs—Number of used LSPs.
domain-authentication-mode
Use domain-authentication-mode to specify the routing domain authentication mode and a password.
Use undo domain-authentication-mode to restore the default.
Syntax
domain-authentication-mode { md5 | simple } { cipher cipher-string | plain plain-string } [ ip | osi ]
undo domain-authentication-mode
Default
No routing domain authentication or password is configured.
Views
IS-IS view
Predefined user roles
network-admin
154
Parameters
md5: Specifies the MD5 authentication mode.
simple: Specifies the simple authentication mode.
cipher: Sets a ciphertext password.
cipher-string: Specifies a ciphertext password of 33 to 53 characters.
plain: Sets a plaintext password.
plain-string: Specifies a plaintext password of 1 to 16 characters.
ip: Checks IP-related fields in LSPs.
osi: Checks OSI-related fields in LSPs.
Usage guidelines
The configured password in the specified mode is inserted into all outgoing Level-2 packets (LSP, CSNP,
and PSNP) and is used for authenticating the incoming Level-2 packets.
All the backbone routers must have the same authentication mode and password.
If neither ip nor osi is specified, the OSI-related fields in LSPs are checked.
For secrecy, all passwords, including passwords configured in plain text, are saved in cipher text.
The actual network environment does not impact whether a password should use ip or osi.
Examples
# Configure the routing domain authentication mode as simple, and set the plaintext password to
123456.
<Sysname> system-view
[Sysname] isis 1
[Sysname-isis-1] domain-authentication-mode plain 123456
Related commands
•
area-authentication-mode
•
isis authentication-mode
fast-reroute
Use fast-reroute to configure IS-IS FRR.
Use undo fast-reroute to restore the default.
Syntax
fast-reroute { auto | route-policy route-policy-name }
undo fast-reroute
Default
IS-IS FRR is disabled.
Views
IS-IS view
155
Predefined user roles
network-admin
Parameters
auto: Calculates a backup next hop automatically for all routes.
route-policy route-policy-name: Uses the specified routing policy to designate a backup next hop. The
route-policy-name argument is a case-sensitive string of 1 to 63 characters.
Usage guidelines
Do not use FRR and BFD at the same time. Otherwise, FRR might fail to take effect.
Example
# Enable IS-IS FRR to automatically calculate a backup next hop for all routes.
<Sysname> system-view
[Sysname] isis
[Sysname-isis-1] fast-reroute auto
filter-policy export
Use filter-policy export to configure IS-IS to filter redistributed routes.
Use undo filter-policy export to remove the configuration.
Syntax
filter-policy { acl-number | prefix-list prefix-list-name | route-policy route-policy-name } export [ protocol
[ process-id ] ]
undo filter-policy export [ protocol [ process-id ] ]
Views
IS-IS view
Predefined user roles
network-admin
Parameters
acl-number: Specifies an ACL by its number in the range of 2000 to 3999 to filter redistributed routes.
prefix-list prefix-list-name: Specifies an IPv4 prefix list by its name, a case-sensitive string of 1 to 63
characters, to filter redistributed routes by destination address.
route-policy route-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to 63
characters, to filter redistributed routes.
protocol: Filters routes redistributed from the specified routing protocol, which can be bgp, direct, isis,
ospf, rip, or static. If no protocol is specified, the command filters all redistributed routes.
process-id: Specifies a process by its ID in the range of 1 to 65535. This argument is available only when
the protocol is isis, ospf, or rip. The default process ID is 1.
Usage guidelines
To use an advanced ACL (with a number from 3000 to 3999) in the command, configure the ACL using
one of the following methods:
156
•
To deny/permit a route with the specified destination, use the rule [ rule-id ] { deny | permit } ip
source sour-addr sour-wildcard command.
•
To deny/permit a route with the specified destination and mask, use the rule [ rule-id ] { deny |
permit } ip source sour-addr sour-wildcard destination dest-addr dest-wildcard command.
The source keyword specifies the destination address of a route and the destination keyword specifies the
subnet mask of the route. The specified subnet mask must be contiguous. Otherwise, the configuration
does not take effect.
Examples
# Use ACL 2000 to filter redistributed routes.
<Sysname> system-view
[Sysname] acl number 2000
[Sysname-acl-basic-2000] rule deny source 192.168.10.0 0.0.0.255
[Sysname-acl-basic-2000] quit
[Sysname] isis 1
[Sysname-isis-1] filter-policy 2000 export
# Configure ACL 3000 to permit only route 113.0.0.0/16 to pass. Use ACL 3000 to filter redistributed
routes.
<Sysname> system-view
[Sysname] acl number 3000
[Sysname-acl-adv-3000] rule 10 permit ip source 113.0.0.0 0 destination 255.255.0.0 0
[Sysname-acl-adv-3000] rule 100 deny ip
[Sysname-acl-adv-3000] quit
[Sysname] isis 1
[Sysname-isis 1] filter-policy 3000 export
Related commands
filter-policy import
filter-policy import
Use filter-policy import to configure IS-IS to filter routes calculated using received LSPs.
Use undo filter-policy import to restore the default.
Syntax
filter-policy { acl-number | prefix-list prefix-list-name | route-policy route-policy-name } import
undo filter-policy import
Default
IS-IS accepts all routes calculated using received LSPs.
Views
IS-IS view
Predefined user roles
network-admin
157
Parameters
acl-number: Specifies an ACL by its number in the range of 2000 to 3999 to filter routes calculated using
received LSPs.
prefix-list prefix-list-name: Specifies an IPv4 prefix list by its name, a case-sensitive string of 1 to 63
characters, to filter routes calculated using received LSPs by destination address.
route-policy route-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to 63
characters, to filter redistributed routes.
Usage guidelines
To use an advanced ACL (with a number from 3000 to 3999) in the command, configure the ACL using
one of the following methods:
•
To deny/permit a route with the specified destination, use the rule [ rule-id ] { deny | permit } ip
source sour-addr sour-wildcard command.
•
To deny/permit a route with the specified destination and mask, use the rule [ rule-id ] { deny |
permit } ip source sour-addr sour-wildcard destination dest-addr dest-wildcard command.
The source keyword specifies the destination address of a route and the destination keyword specifies the
subnet mask of the route. The subnet mask must be contiguous. Otherwise, the configuration does not
take effect.
Examples
# Use ACL 2000 to filter routes calculated using received LSPs.
<Sysname> system-view
[Sysname] acl number 2000
[Sysname-acl-basic-2000] rule deny source 192.168.10.0 0.0.0.255
[Sysname-acl-basic-2000] quit
[Sysname] isis 1
[Sysname-isis-1] filter-policy 2000 import
# Configure ACL 3000 to permit only route 113.0.0.0/16 to pass. Use ACL 3000 to filter routes
calculated using received LSPs.
<Sysname> system-view
[Sysname] acl number 3000
[Sysname-acl-adv-3000] rule 10 permit ip source 113.0.0.0 0 destination 255.255.0.0 0
[Sysname-acl-adv-3000] rule 100 deny ip
[Sysname-acl-adv-3000] quit
[Sysname] isis 1
[Sysname-isis 1] filter-policy 3000 import
Related commands
filter-policy export
flash-flood
Use flash-flood to enable IS-IS LSP flash flooding.
Use undo flash-flood to disable IS-IS LSP flash flooding.
158
Syntax
flash-flood [ flood-count flooding-count | max-timer-interval flooding-interval | [ level-1 | level-2 ] ] *
undo flash-flood [ level-1 | level-2 ]
Default
IS-IS LSP flash flooding is disabled.
Views
IS-IS view
Predefined user roles
network-admin
Parameters
flood-count flooding-count: Specifies the maximum number of LSPs to be flooded before the next SPF
calculation, in the range of 1 to 15. The default is 5.
max-timer-interval flooding-interval: Specifies the delay of the flash flooding, in the range of 10 to
50000 milliseconds. The default is 10.
level-1: Enables flash flooding for level-1.
level-2: Enables flash flooding for level-2.
Usage guidelines
If no level is specified, the command enables IS-IS LSP flash flooding for both Level-1 and Level-2.
Examples
# Enable fast flooding and specify the maximum LSPs to be sent as 10 and the delay time as 100
milliseconds.
<Sysname> system-view
[Sysname] isis 1
[Sysname-isis-1] flash-flood flood-count 10 max-timer-interval 100
graceful-restart
Use graceful-restart to enable IS-IS GR.
Use undo graceful-restart to disable IS-IS GR.
Syntax
graceful-restart
undo graceful-restart
Default
IS-IS GR is disabled.
Views
IS-IS view
Predefined user roles
network-admin
159
Examples
# Enable GR for IS-IS process 1.
<Sysname> system-view
[Sysname] isis 1
[Sysname-isis-1] graceful-restart
Related commands
graceful-restart suppress-sa
graceful-restart suppress-sa
Use graceful-restart suppress-sa to suppress the Suppress-Advertisement (SA) bit during restart.
Use undo graceful-restart suppress-sa to set the SA bit.
Syntax
graceful-restart suppress-sa
undo graceful-restart suppress-sa
Default
The SA bit is set during restart.
Views
IS-IS view
Predefined user roles
network-admin
Usage guidelines
Suppressing the SA bit is mainly for avoiding black hole route. If a router starts or reboots without
keeping the local forwarding table, sending packets to the router might result in a severe packet loss. To
avoid this, you can set the SA bit of the hello packet sent by the GR Restarter to 1. Upon receiving such
hello packets, the GR Helpers will not advertise the GR Restarter through LSP.
Examples
# Suppress the SA bit during Graceful Restart.
<Sysname> system-view
[Sysname] isis 1
[Sysname-isis-1] graceful-restart suppress-sa
Related commands
graceful-restart
graceful-restart t1
Use graceful-restart t1 to configure the T1 timer.
Use undo graceful-restart t1 to restore the default.
160
Syntax
graceful-restart t1 seconds count count
undo graceful-restart t1
Default
The T1 timer is 3 seconds and can expire 10 times.
Views
IS-IS view
Predefined user roles
network-admin
Parameters
seconds: Specifies the T1 timer in the range of 3 to 10 seconds.
count: Specifies the number of times that the T1 timer can expire, in the range of 1 to 20.
Usage guidelines
The T1 timer specifies the number of times that GR Restarter can send a Restart TLV with the RR bit set.
After restart, the GR Restarter sends a Restart TLV with the RR bit set to its neighbor. If the restarting router
receives a Restart TLV with the RA set from its neighbor before the T1 timer expires, the GR process starts.
Otherwise, the GR process fails.
Examples
# Configure the T1 timer of IS-IS process 1 as 5 seconds, and the expiration times as 5.
<Sysname> system-view
[Sysname] isis 1
[Sysname-isis-1] graceful-restart t1 5 count 5
Related commands
•
graceful-restart
•
graceful-restart t2
•
graceful-restart t3
graceful-restart t2
Use graceful-restart t2 to configure the T2 timer.
Use undo graceful-restart t2 to restore the default.
Syntax
graceful-restart t2 seconds
undo graceful-restart t2
Default
The T2 timer is 60 seconds.
161
Views
IS-IS view
Predefined user roles
network-admin
Parameters
seconds: Specifies the T2 timer in the range of 30 to 65535 seconds.
Usage guidelines
The T2 timer specifies the LSDB synchronization interval. Each LSDB has a T2 timer. The Level-1-2 router
has two T2 timers: a Level-1 timer and a Level-2 timer. If the LSDBs have not achieved synchronization
before the two timers expire, the GR process fails.
Examples
# Configure the T2 timer of IS-IS process 1 as 50 seconds.
<Sysname> system-view
[Sysname] isis 1
[Sysname-isis-1] graceful-restart t2 50
Related commands
•
graceful-restart
•
graceful-restart t1
•
graceful-restart t3
graceful-restart t3
Use graceful-restart t3 to configure the T3 timer.
Use undo graceful-restart t3 to restore the default.
Syntax
graceful-restart t3 seconds
undo graceful-restart t3
Default
The T3 timer is 300 seconds.
Views
IS-IS view
Predefined user roles
network-admin
Parameters
seconds: Specifies the T3 timer in the range of 300 to 65535 seconds.
Usage guidelines
The T3 timer specifies the GR interval. The GR interval is set as the holdtime in hello PDUs. Within the
interval, the neighbors maintain their adjacency with the GR Restarter. If the GR process has not
162
completed within the holdtime, the neighbors tear down the neighbor relationship and the GR process
fails.
Examples
# Configure the T3 timer of IS-IS process 1 as 500 seconds.
<Sysname> system-view
[Sysname] isis 1
[Sysname-isis-1] graceful-restart t3 500
Related commands
•
graceful-restart
•
graceful-restart t1
•
graceful-restart t2
import-route
Use import-route to redistribute routes from another routing protocol or another IS-IS process.
Use undo import-route to remove the redistribution.
Syntax
import-route protocol [ process-id | all-processes | allow-ibgp ] [ cost cost | cost-type { external |
internal } | [ level-1 | level-1-2 | level-2 ] | route-policy route-policy-name | tag tag ] *
undo import-route protocol [ process-id | all-processes ]
Default
No route redistribution is configured.
Views
IS-IS view
Predefined user roles
network-admin
Parameters
protocol: Redistributes routes from a routing protocol, which can be BGP, direct, IS-IS, OSPF, RIP, or static.
process-id: Specifies a process by its ID in the range of 1 to 65535. It is available only when the protocol
is isis, ospf, or rip.
all-processes: Redistributes routes from all the processes of the specified routing protocol. This keyword
takes effect only when the protocol is rip, ospf, or isis.
allow-ibgp: Allows redistribution of IBGP routes. It is available when the protocol is BGP.
cost: Specifies a cost for redistributed routes, which is in the range of 0 to 4261412864.
•
For the styles of narrow, narrow-compatible, and compatible, the cost is in the range of 0 to 63.
•
For the styles of wide and wide-compatible, the cost is in the range of 0 to 4261412864.
cost-type { external | internal }: Specifies the cost type. The internal type indicates internal routes, and
the external type indicates external routes. If external is specified, the cost of a redistributed route is
163
added by 64 to make internal routes take priority over external routes. The type is external by default.
The keywords are available only when the cost type is narrow, narrow-compatible, or compatible.
level-1: Redistributes routes into the Level-1 routing table.
level-1-2: Redistributes routes into both Level-1 and Level-2 routing tables.
level-2: Redistributes routes into the Level-2 routing table. If no level is specified, the routes are
redistributed into the Level-2 routing table by default.
route-policy route-policy-name: Redistributes only routes satisfying the matching criteria of the specified
routing policy. The route-policy-name argument is a case-sensitive string of 1 to 63 characters.
tag tag: Specifies a tag value for marking redistributed routes, in the range of 1 to 4294967295.
Usage guidelines
IS-IS takes all the redistributed routes as external routes to destinations outside the IS-IS routing domain.
The effective cost depends on the cost style. For the styles of narrow, narrow-compatible, and compatible,
the cost is in the range of 0 to 63. If the cost is more than 63, 63 is used. For the style of wide or
wide-compatible, the configured value is the effective value.
This import-route command cannot redistribute default routes. The command redistributes only active
routes. To display route state information, use the display ip routing-table protocol command.
The import-route bgp command redistributes only EBGP routes.
The import-route bgp allow-ibgp command redistributes both EBGP and IBGP routes. Because this
command might cause routing loops, use it with caution.
The undo import-route protocol all-processes command removes only the configuration made by the
import-route protocol all-processes command, instead of the configuration made by the import-route
protocol process-id command.
Examples
# Redistribute static routes into IS-IS, and set the cost for redistributed routes to 15.
<Sysname> system-view
[Sysname] isis 1
[Sysname-isis-1] import-route static cost 15
Related commands
import-route limit
import-route isis level-1 into level-2
Use import-route isis level-1 into level-2 to enable route advertisement from Level-1 to Level-2.
Use undo import-route isis level-1 into level-2 to disable route advertisement from Level-1 to Level-2.
Syntax
import-route isis level-1 into level-2 [ filter-policy { acl-number | prefix-list prefix-list-name | route-policy
route-policy-name } | tag tag ] *
undo import-route isis level-1 into level-2
164
Default
Route advertisement from Level-1 to Level-2 is enabled.
Views
IS-IS view
Predefined user roles
network-admin
Parameters
filter-policy: Specifies a filtering policy.
acl-number: Specifies an ACL by its number in the range of 2000 to 3999 to filter routes from Level-1 to
Level-2.
prefix-list prefix-list-name: Specifies an IPv4 prefix list by its name, a case-sensitive string of 1 to 63
characters, to filter routes from Level-1 to Level-2 by destination address.
route-policy route-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to 63
characters, to filter routes from Level-1 to Level-2.
tag tag: Specifies a tag for marking redistributed routes, in the range of 1 to 4294967295.
Usage guidelines
If a routing policy is used, the routing policy must be specified in the import-route isis level-1 into level-2
command to filter routes from Level-1 to Level-2. Other routing policies specified for route reception and
redistribution do not affect the route leaking.
If a filtering policy is configured, only Level-1 routes not filtered out can be advertised into the Level-2
area.
Examples
# Enable route advertisement from Level-1 to Level-2.
<Sysname> system-view
[Sysname] isis 1
[Sysname-isis-1] import-route isis level-1 into level-2
Related commands
•
import-route
•
import-route isis level-1 into level-2
import-route isis level-2 into level-1
Use import-route isis level-2 into level-1 to enable route advertisement from Level-2 to Level-1.
Use undo import-route isis level-2 into level-1 to disable route advertisement from Level-2 to Level-1.
Syntax
import-route isis level-2 into level-1 [ filter-policy { acl-number | prefix-list prefix-list-name | route-policy
route-policy-name } | tag tag ] *
undo import-route isis level-2 into level-1
165
Default
Route advertisement is not enabled.
Views
IS-IS view
Predefined user roles
network-admin
Parameters
filter-policy: Specifies a filtering policy.
acl-number: Specifies an ACL by its number in the range of 2000 to 3999 to filter routes from Level-2 to
Level-1.
prefix-list prefix-list-name: Specifies an IPv4 prefix list by its name, a case-sensitive string of 1 to 63
characters, to filter routes from Level-2 to Level-1 by destination address.
route-policy route-policy-name: Uses the specified routing policy to filter routes from Level-2 to Level-1. The
route-policy-name argument is a case-sensitive string of 1 to 63 characters.
tag tag: Specifies a tag for marking redistributed routes, in the range of 1 to 4294967295.
Usage guidelines
If a routing policy is used, the routing policy must be specified in the import-route isis level-2 into level-1
command to filter routes from Level-2 to Level-1. Other routing policies specified for route reception and
redistribution does not affect the route leaking.
If a filtering policy is configured, only Level-2 routes not filtered out can be advertised into the Level-1
area.
Examples
# Enable route advertisement from Level-2 to Level-1.
<Sysname> system-view
[Sysname] isis 1
[Sysname-isis-1] import-route isis level-2 into level-1
Related commands
•
import-route
•
import-route isis level-1 into level-2
import-route limit
Use import-route limit to configure the maximum number of redistributed Level 1/Level 2 IPv4 routes.
Use undo import-route limit to restore the default.
Syntax
import-route limit number
undo import-route limit
166
Default
The maximum number of redistributed Level 1/Level 2 IPv4 routes is not configured.
Views
IS-IS view
Predefined user roles
network-admin
Parameters
number: Specifies the maximum number of redistributed Level 1/Level 2 IPv4 routes, in the range of 1 to
16384.
Examples
# Configure IS-IS process 1 to redistribute up to 1000 Level 1/Level 2 IPv4 routes.
<Sysname> system-view
[Sysname] isis 1
[Sysname-isis-1] import-route limit 1000
Related commands
import-route limit
isis
Use isis to enable an IS-IS process and enter IS-IS view.
Use undo isis to disable an IS-IS process.
Syntax
isis [ process-id ] [ vpn-instance vpn-instance-name ]
undo isis [ process-id ]
Default
The system does not run any IS-IS process.
Views
System view
Predefined user roles
network-admin
Parameters
process-id: Specifies an IS-IS process by its ID in the range of 1 to 65535. The default is 1.
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN by its name, a case-sensitive string of 1 to 31
characters. If no VPN is specified, the IS-IS process runs on the public network.
Examples
# Enable IS-IS process 1 and specify the system ID as 0000.0000.0002 and area ID as 01.0001.
<Sysname> system-view
[Sysname] isis 1
167
[Sysname-isis-1] network-entity 01.0001.0000.0000.0002.00
Related commands
•
isis enable
•
network-entity
isis authentication-mode
Use isis authentication-mode to set the IS-IS authentication mode and password for an interface.
Use undo isis authentication-mode to remove the configuration.
Syntax
isis authentication-mode { md5 | simple } { cipher cipher-string | plain plain-string } [ level-1 | level-2 ]
[ ip | osi ]
undo isis authentication-mode [ level-1 | level-2 ]
Default
No neighbor relationship authentication is configured.
Views
Interface view
Predefined user roles
network-admin
Parameters
md5: Specifies the MD5 authentication mode.
simple: Specifies the simple authentication mode.
cipher: Sets a ciphertext password.
cipher-string: Specifies a ciphertext password, a case-sensitive string of 33 to 53 characters.
plain: Sets a plaintext password.
plain-string: Specifies a plaintext password, a case-sensitive string of 1 to 16 characters.
level-1: Configures the password for Level-1.
level-2: Configures the password for Level-2.
ip: Checks IP-related fields in LSPs and SNPs.
osi: Checks OSI-related fields in LSPs and SNPs.
Usage guidelines
The password in the specified mode is inserted into all outbound hello packets and is used for
authenticating inbound hello packets. Only if the authentication succeeds can the neighbor relationship
be formed.
For two routers to become neighbors, the authentication mode and password at both ends must be
identical.
For secrecy, all passwords, including passwords configured in plain text, are saved in cipher text.
168
If you configure a password without specifying a level, the password applies to both Level-1 and Level-2.
If neither ip nor osi is specified, the OSI-related fields in LSPs are checked.
The actual network environment does not impact whether a password should use ip or osi.
The level-1 and level-2 keywords are configurable on an interface that has had IS-IS enabled with the isis
enable command.
Examples
# On VLAN-interface 10, configure the authentication mode as simple, and set the plaintext password
to 123456.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] isis authentication-mode simple plain 123456
Related commands
•
area-authentication-mode
•
domain authentication-mode
isis bfd enable
Use isis bfd enable to enable BFD.
Use undo isis bfd enable to disable BFD.
Syntax
isis bfd enable
undo isis bfd enable
Default
IS-IS BFD is disabled.
Views
Interface view
Predefined user roles
network-admin
Examples
# Enable BFD for IS-IS on VLAN-interface 11.
<Sysname> system-view
[Sysname] interface vlan-interface 11
[Sysname-Vlan-interface11] isis enable
[Sysname-Vlan-interface11] isis bfd enable
isis circuit-level
Use isis circuit-level to set the circuit level for the interface.
Use undo isis circuit-level to restore the default.
169
Syntax
isis circuit-level [ level-1 | level-1-2 | level-2 ]
undo isis circuit-level
Default
An interface can establish either the Level-1 or Level-2 adjacency.
Views
Interface view
Predefined user roles
network-admin
Parameters
level-1: Sets the circuit level to Level-1.
level-1-2: Sets the circuit level to Level-1-2.
level-2: Sets the circuit level to Level-2.
Usage guidelines
For a Level-1 (Level-2) router, the circuit level can only be Level-1 (Level-2). For a Level-1-2 router, you must
specify a circuit level for a specific interface to form only the specified level neighbor relationship.
Examples
# VLAN-interface 10 is connected to a non-backbone router in the same area. Configure the circuit level
of VLAN-interface 10 as Level-1 to prevent sending and receiving Level-2 Hello packets.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] isis enable
[Sysname-Vlan-interface10] isis circuit-level level-1
Related commands
is-level
isis circuit-type p2p
Use isis circuit-type p2p to configure the network type of an interface as P2P.
Use undo isis circuit-type to remove the configuration.
Syntax
isis circuit-type p2p
undo isis circuit-type
Default
The network type of an interface depends on the physical media. (The network type of a VLAN interface
is broadcast.)
Views
Interface view
170
Predefined user roles
network-admin
Usage guidelines
Perform this configuration only for a broadcast network with only two attached routers.
Interfaces with different network types operate differently. For example, broadcast interfaces must elect a
DIS and flood CSNP packets to synchronize the LSDBs, and P2P interfaces do not need to elect a DIS,
and use a different LSDB synchronization mechanism.
If only two routers exist on a broadcast network, configure the network type of attached interfaces as P2P
to avoid DIS election and CSNP flooding, saving network bandwidth and speeding up network
convergence.
Examples
# Configure the network type of VLAN-interface 10 as P2P.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] isis enable
[Sysname-Vlan-interface10] isis circuit-type p2p
isis cost
Use isis cost to set the IS-IS cost for an interface.
Use undo isis cost to remove the configuration.
Syntax
isis cost value [ level-1 | level-2 ]
undo isis cost [ level-1 | level-2 ]
Default
No IS-IS cost is configured for an interface.
Views
Interface view
Predefined user roles
network-admin
Parameters
value: Specifies an IS-IS cost in the range of 1 to 16777215.
level-1: Applies the cost to Level-1.
level-2: Applies the cost to Level-2.
Usage guidelines
If neither level-1 nor level-2 is included, the cost applies to both level-1 and level-2.
Examples
# Configure the Level-2 IS-IS cost as 5 for VLAN-interface 10.
171
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] isis cost 5 level-2
isis dis-name
Use isis dis-name to configure a name for a DIS to represent the pseudo node on a broadcast network.
Use undo isis dis-name to restore the default.
Syntax
isis dis-name symbolic-name
undo isis dis-name
Default
No name is configured for the DIS.
Views
Interface view
Predefined user roles
network-admin
Parameters
symbolic-name: Specifies a DIS name, a string of 1 to 64 characters.
Usage guidelines
This command takes effect only on routers that have dynamic system ID to host name mapping enabled.
Examples
# Configure the DIS name as LOCALAREA.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] isis dis-name LOCALAREA
isis dis-priority
Use isis dis-priority to specify a DIS priority at a specified level for an interface.
Use undo isis dis-priority to remove the configuration.
Syntax
isis dis-priority value [ level-1 | level-2 ]
undo isis dis-priority [ level-1 | level-2 ]
Default
The priority of Level-1 and Level-2 is 64.
Views
Interface view
172
Predefined user roles
network-admin
Parameters
value: Specifies a DIS priority in the range of 0 to 127.
level-1: Applies the DIS priority to Level-1.
level-2: Applies the DIS priority to Level-2.
Usage guidelines
If neither level-1 nor level-2 is specified, the DIS priority applies to both Level-1 and Level-2.
On an IS-IS broadcast network, a router must be elected as the DIS at each routing level. Specify a DIS
priority at a level for an interface. The greater the interface’s priority is, the more likelihood it becomes
the DIS. If multiple routers in the broadcast network have the same highest DIS priority, the router with the
highest Subnetwork Point of Attachment (SNPA) address (SNPA addresses are MAC addresses on a
broadcast network) becomes the DIS.
IS-IS has no backup DIS. The router with a priority of 0 can also participate in DIS election.
Examples
# Configure the Level-2 DIS priority as 127 for VLAN-interface 10.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] isis dis-priority 127 level-2
isis enable
Use isis enable to enable an IS-IS process on an interface.
Use undo isis enable to disable IS-IS.
Syntax
isis enable [ process-id ]
undo isis enable
Default
No IS-IS process is enabled on an interface.
Views
Interface view
Predefined user roles
network-admin
Parameters
process-id: Specifies an IS-IS process by its ID in the range of 1 to 65535. The default is 1.
Examples
# Enable IS-IS process 1 globally and enable it on VLAN-interface 10.
<Sysname> system-view
173
[Sysname] isis 1
[Sysname-isis-1] network-entity 10.0001.1010.1020.1030.00
[Sysname-isis-1] quit
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] isis enable 1
Related commands
•
isis
•
network-entity
isis peer-ip-ignore
Use isis peer-ip-ignore to configure a PPP interface to not check the peer's IP address in received hello
packets.
Use undo isis peer-ip-ignore to restore the default.
Syntax
isis peer-ip-ignore
undo isis peer-ip-ignore
Default
The PPP interface checks the peer's IP address upon receiving a hello packet.
Views
Interface view
Predefined user roles
network-admin
Usage guidelines
An IS-IS PPP interface requires the sender of a hello packet be on the same network segment as it.
Otherwise, it discards the hello packet. The isis peer-ip-ignore command removes this restriction.
Examples
# Configure Serial2/0 to not check the peer's IP address in received Hello packets.
<Sysname> system-view
[Sysname] interface serial 2/0
[Sysname-Serial2/0] isis peer-ip-ignore
isis silent
Use isis silent to disable the interface from sending and receiving IS-IS packets.
Use undo isis silent to restore the default.
Syntax
isis silent
undo isis silent
174
Default
An interface is not disabled from sending and receiving IS-IS packets.
Views
Interface view
Predefined user roles
network-admin
Usage guidelines
The feature is not supported on the loopback interface.
Examples
# Disable VLAN-interface 10 from sending and receiving IS-IS packets.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] isis silent
isis small-hello
NOTE:
This command is not available in loopback interface view.
Use isis small-hello to configure the interface to send small hello packets without CLVs.
Use undo isis small-hello to restore the default.
Syntax
isis small-hello
undo isis small-hello
Default
An interface sends standard hello packets.
Views
Interface view
Predefined user roles
network-admin
Examples
# Configure VLAN-interface 10 to send small Hello packets.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] isis small-hello
isis timer csnp
Use isis timer csnp to specify on the DIS of a broadcast network the interval for sending CSNP packets.
175
Use undo isis timer csnp to remove the configuration.
Syntax
isis timer csnp seconds [ level-1 | level-2 ]
undo isis timer csnp [ level-1 | level-2 ]
Default
The default CSNP interval is 10 seconds.
Views
Interface view
Predefined user roles
network-admin
Parameters
seconds: Specifies on the DIS of a broadcast network the interval in seconds for sending CSNP packets,
ranging from 1 to 600.
level-1: Applies the interval to Level-1.
level-2: Applies the interval to Level-2.
Usage guidelines
If no level is specified, the CSNP interval applies to both Level-1 and Level-2.
This command only applies to the DIS of a broadcast network, which sends CSNP packets periodically
for LSDB synchronization.
Examples
# Configure Level-2 CSNP packets to be sent every 15 seconds over VLAN-interface 10.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] isis timer csnp 15 level-2
isis timer hello
Use isis timer hello to specify the interval for sending hello packets.
Use undo isis timer hello to remove the configuration.
Syntax
isis timer hello seconds [ level-1 | level-2 ]
undo isis timer hello [ level-1 | level-2 ]
Default
The default hello interval is 10 seconds.
Views
Interface view
176
Predefined user roles
network-admin
Parameters
seconds: Specifies the interval in seconds for sending hello packets, in the range of 3 to 255.
level-1: Specifies the interval for sending Level-1 hello packets.
level-2: Specifies the interval for sending Level-2 hello packets.
Usage guidelines
Level-1 and Level-2 hello packets are sent independently on a broadcast network, so you need to specify
an interval for each level. On a P2P link, Level-1 and Level-2 packets are both sent in P2P hello packets,
and you need not specify an interval for each level.
You can configure keywords level-1 and level-2 only on broadcast interfaces. Before you do that, enable
IS-IS on the interface.
The shorter the interval, the more system resources will be occupied. Configure a proper interval as
needed.
If no level is specified, the hello interval applies to both Level-1 and Level-2.
Examples
# Configure Level-2 hello packets to be sent every 20 seconds over VLAN-interface 10.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] isis timer hello 20 level-2
Related commands
isis timer holding-multiplier
isis timer holding-multiplier
Use isis timer holding-multiplier to specify the IS-IS hello multiplier.
Use undo isis timer holding-multiplier to remove the configuration.
Syntax
isis timer holding-multiplier value [ level-1 | level-2 ]
undo isis timer holding-multiplier [ level-1 | level-2 ]
Default
The default IS-IS hello multiplier is 3.
Views
Interface view
Predefined user roles
network-admin
Parameters
value: Specifies the number of hello intervals, in the range of 3 to 1000.
177
level-1: Applies the number to the Level-1 IS-IS neighbor.
level-2: Applies the number to the Level-2 IS-IS neighbor.
Usage guidelines
With the IS-IS hello multiplier configured, a router can uses hello packets to notify its neighbor router of
the adjacency hold time (hello multiplier times hello interval). If the neighbor router receives no hello
packets from this router within the hold time, it declares the adjacency down. You can adjust the
adjacency hold time by changing the hello multiplier or the hello interval on an interface.
Level-1 and Level-2 hello packets are sent independently on a broadcast network, so you need to specify
a hello multiplier for each level. On a P2P link, Level-1 and Level-2 packets are both sent in P2P hello
packets, and you need not specify Level-1 or Level-2.
You can configure keywords level-1 and level-2 only on broadcast interfaces. Before doing that, enable
IS-IS on the interface.
If no level is specified, the hello multiplier applies to the current level.
The value of hello multiplier multiplied by hello interval cannot be more than 65535.
Examples
# Configure the hello multiplier as 6 for VLAN-interface 10.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] isis timer holding-multiplier 6
Related commands
isis timer hello
isis timer lsp
Use isis timer lsp to configure the minimum interval for sending LSPs on the interface and specify the
maximum number of LSPs that can be sent per time.
Use undo isis timer lsp to restore the default.
Syntax
isis timer lsp time [ count count ]
undo isis timer lsp
Default
The minimum interval for sending LSPs on the interface is 33 milliseconds, and the maximum number of
LSPs that can be sent at a time is 5.
Views
Interface view
Predefined user roles
network-admin
178
Parameters
time: Specifies the minimum interval in milliseconds for sending link-state packets, in the range of 1 to
1000.
count: Specifies the maximum number of link-state packets to be sent at one time, in the range of 1 to
1000.
Usage guidelines
If a change occurs in the LSDB, IS-IS advertises the changed LSP to neighbors. You can specify the
minimum interval for sending these LSPs.
Configure a proper LSP retransmission interval to avoid unnecessary retransmissions.
Examples
# Configure the interval as 500 milliseconds for sending LSPs on interface VLAN-interface 10.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] isis timer lsp 500
Related commands
isis timer retransmit
ispf enable
Use ispf enable to enable IS-IS incremental SPF (ISPF).
Use undo ispf enable to disable IS-IS ISPF.
Syntax
ispf enable
undo ispf enable
Default
IS-IS ISPF is enabled.
Views
OSPF view
Predefined user roles
network-admin
Usage guidelines
When a network topology is changed, ISPF recomputes only the affected part of the SPT, instead of the
entire SPT.
Examples
# Enable IS-IS ISPF.
<Sysname> system-view
[Sysname] isis 1
[Sysname-isis-1] ispf enable
179
is-level
Use is-level to specify the IS level.
Use undo is-level to restore the default.
Syntax
is-level { level-1 | level-1-2 | level-2 }
undo is-level
Default
The IS level is level-1-2.
Views
IS-IS view
Predefined user roles
network-admin
Parameters
level-1: Specifies Level-1, which means IS-IS only calculates intra-area routes and maintains the Level-1
LSDB.
level-1-2: Specifies Level-1-2, which means IS-IS calculates routes and maintains the LSDBs for both Level-1
and Level-2.
level-2: Specifies Level-2, which means IS-IS calculates routes and maintains the LSDB for Level-2 only.
Usage guidelines
If only one area exists, configure all the routers as either Level-1 or Level-2, because the routers do not
need to maintain two identical LSDBs at the same time.
If the only area is an IP network, configure all the routers as Level-2 for scalability.
Examples
# Specify the IS level as Level-1 for the IS-IS process 1.
<Sysname> system-view
[Sysname] isis 1
[Sysname-isis-1] is-level level-1
is-name
Use is-name to specify a host name for the IS and enable dynamic system ID to hostname mapping.
Use undo is-name to disable dynamic system ID to hostname mapping.
Syntax
is-name sys-name
undo is-name
Default
Dynamic system ID to hostname mapping is not enabled.
180
Views
IS-IS view
Predefined user roles
network-admin
Parameters
symbolic-name: Specifies a host name for the local IS, a case-sensitive string of 1 to 64 characters.
Examples
# Configure a host name for the local IS.
<Sysname> system-view
[Sysname] isis 1
[Sysname-isis-1] is-name RUTA
is-name map
Use is-name map to configure a system ID to host name mapping for a remote IS.
Use undo is-name map to remove the mapping.
Syntax
is-name map sys-id map-sys-name
undo is-name map sys-id
Views
IS-IS view
Predefined user roles
network-admin
Parameters
sys-id: Specifies the system ID or pseudonode ID of a remote IS.
map-sys-name: Specifies a host name for the remote IS, a string of 1 to 64 characters.
Usage guidelines
Each remote IS system ID corresponds to only one name.
Examples
# Map the host name RUTB to the system ID 0000.0000.0041 of the remote IS.
<Sysname> system-view
[Sysname] isis 1
[Sysname-isis-1] is-name map 0000.0000.0041 RUTB
log-peer-change
Use log-peer-change to enable the logging of IS-IS neighbor state changes.
Use undo log-peer-change to disable the logging.
181
Syntax
log-peer-change
undo log-peer-change
Default
The logging of IS-IS neighbor state changes is enabled.
Views
IS-IS view
Predefined user roles
network-admin
Usage guidelines
This command enables sending logs about IS-IS neighbor state changes to the configuration terminal.
Examples
# Disable the logging of IS-IS neighbor state changes.
<Sysname> system-view
[Sysname] isis 1
[Sysname-isis-1] undo log-peer-change
lsp-fragments-extend
Use lsp-fragments–extend to enable LSP fragment extension for a level.
Use undo lsp-fragments–extend to disable LSP fragment extension.
Syntax
lsp-fragments-extend [ level-1 | level-1-2 | level-2 ]
undo lsp-fragments-extend
Default
LSP fragment extension is disabled.
Views
IS-IS view
Predefined user roles
network-admin
Parameters
level-1: Applies the fragment extension to Level-1 LSPs.
level-1-2: Applies the fragment extension to both Level-1 and Level-2 LSPs.
level-2: Applies the fragment extension to Level-2 LSPs.
Usage guidelines
If no level is specified, the command enables LSP fragment extension for both Level-1 and Level-2.
182
Examples
# Enable LSP fragment extension for Level-2.
<Sysname> system-view
[Sysname] isis 1
[Sysname-isis-1] lsp-fragments-extend level-2
lsp-length originate
Use lsp-length originate to configure the maximum size of generated Level-1 or Level-2 LSPs.
Use undo lsp-length originate to remove the configuration.
Syntax
lsp-length originate size [ level-1 | level-2 ]
undo lsp-length originate [ level-1 | level-2 ]
Default
The maximum size of generated Level-1 and Level-2 LSPs is 1497 bytes.
Views
IS-IS view
Predefined user roles
network-admin
Parameters
size: Specifies the maximum size of LSP packets, in the range of 512 to 16384 bytes.
level-1: Applies the size to Level-1 LSP packets.
level-2: Applies the size to Level-2 LSP packets.
Usage guidelines
If neither Level-1 nor Level-2 is specified in the command, the configured maximum size applies to the
current IS-IS level.
Examples
# Configure the maximum size of the generated Level-2 LSPs as 1024 bytes.
<Sysname> system-view
[Sysname] isis 1
[Sysname-isis-1] lsp-length originate 1024 level-2
lsp-length receive
Use lsp-length receive to configure the maximum size of received LSPs.
Use undo lsp-length receive to restore the default.
Syntax
lsp-length receive size
undo lsp-length receive
183
Default
The maximum size of received LSPs is 1497 bytes.
Views
IS-IS view
Predefined user roles
network-admin
Parameters
size: Specifies the maximum size of received LSPs, in the range of 512 to 16384 bytes.
Examples
# Configure the maximum size of received LSPs.
<Sysname> system-view
[Sysname] isis 1
[Sysname-isis-1] lsp-length receive 1024
maximum load-balancing (IS-IS view)
Use maximum load-balancing to configure the maximum number of equal-cost multi-path (ECMP) routes
for load balancing.
Use undo maximum load-balancing to restore the default.
Syntax
maximum load-balancing number
undo maximum load-balancing
Views
IS-IS view
Predefined user roles
network-admin
Parameters
number: Specifies the maximum number of ECMP routes.
Usage guidelines
The value range for the number argument and the default setting depend on the max-ecmp-num
command.
If you set the maximum number of ECMP routes to m by using the max-ecmp-num command, the number
argument in the maximum load-balancing command is in the range of 1 to m and defaults to m.
Examples
# Configure the maximum number of ECMP routes as 2.
<Sysname> system-view
[Sysname] isis 100
[Sysname-isis-100] maximum load-balancing 2
184
Related commands
max-ecmp-num
network-entity
Use network-entity to configure the Network Entity Title (NET) for an IS-IS process.
Use undo network-entity to delete a NET.
Syntax
network-entity net
undo network-entity net
Default
No NET is configured.
Views
IS-IS view
Predefined user roles
network-admin
Parameters
net: Specifies a NET as a dotted hexadecimal string in the X…X.XXXX....XXXX.00 format. The X…X
segment represents the area address, the XXXX....XXXX segment represents the system ID, and the 00
segment is the SEL.
Usage guidelines
A NET is a special NSAP address with the SEL being 0. The length of the NET is in the range of 8 bytes
to 20 bytes.
A NET comprises the following parts:
•
Area ID—With a length of 1 to 13 bytes.
•
System ID—A system ID uniquely identifies a host or router in the area and has a fixed 6-byte
length.
•
SEL—It has a value of 0 and a fixed 1-byte length.
For example, a NET of ab.cdef.1234.5678.9abc.00 specifies the area ID ab.cdef, the system ID
1234.5678.9abc, and the SEL 00.
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.
<Sysname> system-view
[Sysname] isis 1
[Sysname-isis-1] network-entity 10.0001.1010.1020.1030.00
Related commands
•
isis
•
isis enable
185
preference
Use preference to configure the preference for IS-IS.
Use undo preference to restore the default.
Syntax
preference { preference | route-policy route-policy-name } *
undo preference
Default
IS-IS preference is 15.
Views
IS-IS view
Predefined user roles
network-admin
Parameters
preference: Specifies an IS-IS protocol preference in the range of 1 to 255.
route-policy route-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to 63
characters, to assign a priority to the matching routes.
Usage guidelines
If a routing policy is specified in this command, the preference set by the routing policy applies to the
matching routes. Other routes use the preference set by the preference command.
If multiple routing protocols find routes to the same destination, the route found by the routing protocol
with the highest preference is selected as the optimal route.
Examples
# Configure the preference for IS-IS as 25.
<Sysname> system-view
[Sysname] isis 1
[Sysname-isis-1] preference 25
priority
Use priority to assign convergence priorities to specific IS-IS routes.
Use undo priority to remove the configuration.
Syntax
priority { critical | high | medium } { prefix-list prefix-list-name | tag tag-value }
undo priority { critical | high | medium } [ prefix-list | tag ]
Default
IS-IS routes have the lowest convergence priority.
186
Views
IS-IS view
Predefined user roles
network-admin
Parameters
critical: Specifies the highest convergence priority.
high: Specifies the high convergence priority.
medium: Specifies the medium convergence priority.
prefix-list prefix-list-name: Specifies an IP prefix list by its name, a case-sensitive string of 1 to 63
characters.
tag tag-value: Specifies a tag value in the range of 1 to 4294967295.
Usage guidelines
The higher the convergence priority, the faster the convergence speed.
IS-IS host routes have a medium convergence priority.
Examples
# Assign the high convergence priority to IS-IS routes permitted by IP prefix list standtest.
<Sysname> system-view
[Sysname] isis 1
[Sysname-isis-1] priority high prefix-list standtest
reset isis all
Use reset isis all to clear all IS-IS data structure information.
Syntax
reset isis all [ process-id ] [ graceful-restart ]
Views
User view
Predefined user roles
network-admin
Parameters
process-id: Specifies an IS-IS process by its ID in the range of 1 to 65535 to clear the data structure
information for an IS-IS process.
graceful-restart: Recovers the data through Graceful Restart after the data is cleared.
Usage guidelines
If no IS-IS process is specified, the command clears data structure information for all IS-IS processes.
Use this command when LSPs must be updated immediately.
187
Examples
# Clear all IS-IS data structure information.
<Sysname> reset isis all
reset isis peer
Use reset isis peer to clear data structure information for a specified IS-IS neighbor.
Syntax
reset isis peer system-id [ process-id ]
Views
User view
Predefined user roles
network-admin
Parameters
system-id: Specifies an IS-IS neighbor by its system ID.
process-id: Specifies an IS-IS process by its ID in the range of 1 to 65535 to clear data structure
information for the neighbor in the specified IS-IS process.
Usage guidelines
Use this command when you re-establish an IS-IS neighbor relationship.
Examples
# Clear the data structure information of the neighbor with the system ID 0000.0c11.1111.
<Sysname> reset isis peer 0000.0c11.1111
set-overload
Use set-overload to set the overload bit.
Use undo set-overload to clear the overload bit.
Syntax
set-overload [ on-startup [ [ start-from-nbr system-id [ timeout1 [ nbr-timeout ] ] ] | timeout2 ] [ allow
{ external | interlevel } * ]
undo set-overload
Default
The overload bit is not set.
Views
IS-IS view
Predefined user roles
network-admin
188
Parameters
on-startup: Sets the overload bit upon system startup.
start-from-nbr system-id [ timeout1 [ nbr-timeout ] ]: Starts the nbr-timeout timer when the router begins
to establish the neighbor relationship with the neighbor after system startup. If the neighbor relationship
is formed within the nbr-timeout interval, IS-IS keeps the overload bit set. If not, the bit is cleared. IS-IS
keeps the overload bit set within the timeout1 interval after the neighbor relationship is formed within the
nbr-timeout interval.
•
system-id—Specifies the neighbor.
•
timeout1—The timeout1 interval is in the range of 5 to 86400 seconds and defaults to 600
seconds.
•
nbr-timeout—The timer has an interval from 5 to 86400 seconds. The default is 1200 seconds.
timeout2: Sets the overload bit within the timeout2 interval after system startup. The interval is in the
range of 5 to 86400 seconds and defaults to 600 seconds.
allow: Allows advertising address prefixes. By default, no address prefixes are allowed to be advertised
when the overload bit is set.
external: Allows advertising IP address prefixes redistributed from other routing protocols with the allow
keyword specified.
interlevel: Allows advertising IP address prefixes learned from different IS-IS levels with the allow
keyword specified.
Usage guidelines
If the on-startup keyword is not specified, the command sets the overload bit immediately until the undo
set-overload command is executed.
If the on-startup keyword is specified, IS-IS sets the overload bit upon system startup and keeps it set
within the timeout2 interval.
Examples
# Set overload flag on the current router.
<Sysname> system-view
[Sysname] isis 1
[Sysname-isis-1] set-overload
summary (IS-IS view)
Use summary to configure a summary route.
Use undo summary to remove a summary route.
Syntax
summary ip-address { mask | mask-length } [ avoid-feedback | generate_null0_route | [ level-1 |
level-1-2 | level-2 ] | tag tag ] *
undo summary ip-address { mask | mask-length } [ level-1 | level-1-2 | level-2 ]
Default
No summarization is configured.
189
Views
IS-IS view
Predefined user roles
network-admin
Parameters
ip-address: Specifies the destination IP address of the summary route.
mask: Specifies the mask of the destination IP address, in dotted decimal format.
mask-length: Specifies the mask length of the summary route, in the range of 0 to 32.
avoid-feedback: Avoids learning summary routes by route calculation.
generate_null0_route: Generates the Null 0 route to avoid routing loops.
level-1: Summarizes only the routes redistributed to Level-1.
level-1-2: Summarizes the routes redistributed to both Level-1 and Level-2.
level-2: Summarizes only the routes redistributed to Level-2.
tag tag: Specifies a management tag in the range of 1 to 4294967295.
Usage guidelines
If no level is specified, only level-2 routes are summarized.
If no topology is specified, routes for the base topology are summarized.
You can summarize multiple contiguous networks into a single network to reduce the size of the routing
table, as well as the size of LSP and LSDB generated by the router. You can summarize native IS-IS routes
and redistributed routes. After summarization, the cost of the summary route is the smallest cost of those
summarized routes.
The router summarizes only routes generated from local LSPs.
Examples
# Configure a summary route of 202.0.0.0/8.
<Sysname> system-view
[Sysname] isis 1
[Sysname-isis-1] summary 202.0.0.0 255.0.0.0
timer lsp-generation
Use timer lsp-generation to configure LSP generation interval.
Use undo timer lsp-generation to remove the configuration.
Syntax
timer lsp-generation maximum-interval [ minimum-interval [ incremental-interval ] ] [ level-1 | level-2 ]
undo timer lsp-generation [ level-1 | level-2 ]
Default
The maximum interval is 2 seconds, the minimum interval is 0 milliseconds, and the incremental interval
is 0 milliseconds.
190
Views
IS-IS view
Predefined user roles
network-admin
Parameters
maximum-interval: Specifies the maximum interval in the range of 1 to 120 seconds.
minimum-interval: Specifies the minimum interval in the range of 10 to 60000 milliseconds.
incremental-interval: Specifies the incremental interval in the range of 10 to 60000 milliseconds.
level-1: Applies the intervals to Level-1.
level-2: Applies the intervals to Level-2. If no level is specified, the specified intervals apply to both Level-1
and Level-2.
Usage guidelines
By adjusting the LSP generation interval, you can prevent bandwidth and router resources from being
overconsumed due to frequent topology changes.
When network changes are not frequent, the minimum-interval is adopted. If network changes become
frequent, the LSP generation interval is incremented by the incremental-interval each time a generation
occurs until the maximum-interval is reached.
The minimum interval and the incremental interval cannot be greater than the maximum interval.
Examples
# Set the maximum interval, minimum interval, and incremental interval to 10 seconds, 100 milliseconds,
and 200 milliseconds.
<Sysname> system-view
[Sysname] isis 1
[Sysname-isis-1]timer lsp-generation 10 100 200
timer lsp-max-age
Use timer lsp-max-age to set the LSP maximum age in the LSDB.
Use undo timer lsp-max-age to restore the default.
Syntax
timer lsp-max-age seconds
undo timer lsp-max-age
Default
The LSP maximum age is 1200 seconds.
Views
IS-IS view
Predefined user roles
network-admin
191
Parameters
seconds: Specifies the LSP maximum aging time in the range of 1 to 65535 seconds.
Examples
# Set the maximum LSP age to 1500 seconds.
<Sysname> system-view
[Sysname] isis 1
[Sysname-isis-1] timer lsp-max-age 1500
Related commands
timer lsp-refresh
timer lsp-refresh
Use timer lsp-refresh to configure the LSP refresh interval.
Use undo timer lsp-refresh to restore the default.
Syntax
timer lsp-refresh seconds
undo timer lsp-refresh
Default
The default LSP refresh interval is 900 seconds.
Views
IS-IS view
Predefined user roles
network-admin
Parameters
seconds: Specifies the LSP refresh interval in the range of 1 to 65534 seconds.
Usage guidelines
To refresh LSPs before they are aged out, the interval configured by the timer lsp-refresh command must
be smaller than that configured by the timer lsp-max-age command.
Examples
# Configure the LSP refresh interval as 1500 seconds.
<Sysname> system-view
[Sysname] isis 1
[Sysname-isis-1] timer lsp-refresh 1500
Related commands
timer lsp-max-age
timer spf
Use timer spf to set the SPF calculation interval.
192
Use undo timer spf to restore the default.
Syntax
timer spf maximum-interval [ minimum-interval [ incremental-interval ] ]
undo timer spf
Default
The maximum interval is 5 seconds, the minimum interval is 50 milliseconds, and the incremental interval
is 200 milliseconds.
Views
IS-IS view
Predefined user roles
network-admin
Parameters
maximum-interval: Specifies the maximum SPF calculation interval in the range of 1 to 120 seconds.
minimum-interval: Specifies the minimum SPF calculation interval in the range of 10 to 60000
milliseconds.
incremental-interval: Specifies the incremental SPF calculation interval in the range of 10 to 60000
milliseconds.
Usage guidelines
Based on the LSDB, an IS-IS router uses the SPF algorithm to calculate a shortest path tree with itself being
the root, and uses the shortest path tree to determine the next hop to a destination network. By adjusting
the SPF calculation interval, you can prevent bandwidth and router resources from being overconsumed
due to frequent topology changes.
When network changes are not frequent, the minimum-interval is adopted. If network changes become
frequent, the SPF calculation interval is incremented by the incremental-interval each time a generation
happens until the maximum-interval is reached.
The minimum interval and the incremental interval cannot be greater than the maximum interval.
Examples
# Configure the maximum interval as 10 seconds, the minimum interval as 100 milliseconds, and the
incremental interval as 300 milliseconds.
<Sysname> system-view
[Sysname] isis 1
[Sysname-isis-1] timer spf 10 100 300
virtual-system
Use virtual-system to configure a virtual system ID for the IS-IS process.
Use undo virtual-system to remove a virtual system ID.
Syntax
virtual-system virtual-system-id
193
undo virtual-system virtual-system-id
Default
No virtual system ID is configured.
Views
IS-IS view
Predefined user roles
network-admin
Parameters
virtual-system-id: Specifies a virtual system ID for the IS-IS process.
Examples
# Set a virtual system ID of 2222.2222.2222 for IS-IS process 1.
<Sysname> system-view
[Sysname] isis 1
[Sysname-isis-1] virtual-system 2222.2222.2222
194
BGP commands
advertise-rib-active
Use advertise-rib-active to enable BGP to advertise optimal routes in the IP routing table.
Use undo advertise-rib-active to restore the default.
Syntax
advertise-rib-active
undo advertise-rib-active
Default
BGP advertises optimal routes in the BGP routing table, regardless of whether they are optimal in the IP
routing table.
Views
BGP view
Predefined user roles
network-admin
Usage guidelines
The advertise-rib-active command does not apply to the following routes:
•
Routes redistributed by the import-route command
•
Routes advertised by the network command
•
Default routes redistributed by the default-route imported command
This command takes effect for only the routes generated after you execute this command. To make this
command take effect for the routes generated before you execute this command, use the reset bgp
command to reset BGP sessions.
Examples
# Enable BGP to advertise optimal routes in the IP routing table.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] advertise-rib-active
aggregate
Use aggregate to create a summary route in the BGP routing table.
Use undo aggregate to remove a summary route.
Syntax
In BGP IPv4 unicast instance view/BGP-VPN IPv4 unicast instance view:
aggregate ip-address { mask | mask-length } [ as-set | attribute-policy route-policy-name |
detail-suppressed | origin-policy route-policy-name | suppress-policy route-policy-name ] *
195
undo aggregate ip-address { mask | mask-length }
In BGP IPv6 unicast instance view:
aggregate ipv6-address prefix-length [ as-set | attribute-policy route-policy-name | detail-suppressed |
origin-policy route-policy-name | suppress-policy route-policy-name ] *
undo aggregate ipv6-address prefix-length
Default
No summary route is configured.
Views
BGP IPv4 unicast instance view, BGP-VPN IPv4 unicast instance view, BGP IPv6 unicast instance view
Predefined user roles
network-admin
Parameters
ip-address: Specifies a summary address.
mask: Specifies a mask for the summary address, in dotted decimal notation.
mask-length: Specifies a mask length for the summary address, in the range of 0 to 32.
ipv6-address: Specifies an IPv6 summary address.
prefix-length: Specifies a prefix length for the IPv6 summary address, in the range of 0 to 128.
as-set: Enables the AS_PATH attribute of the summary route to contain the AS path information of all
summarized routes. The AS_PATH attribute is of the AS_SET type that requires no sequence when
arranging AS numbers. If this keyword is not specified, the AS_PATH attribute of the summary route
contains only the AS number of the local router.
attribute-policy route-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to
63 characters, to set attributes for the summary route.
detail-suppressed: Advertises only the summary route. If this keyword is not specified, BGP advertises
both the summary route and the more specific routes.
origin-policy route-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to 63
characters, to select routes to be summarized.
suppress-policy route-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to
63 characters, to filter more specific routes to be advertised.
Usage guidelines
This command creates a summary route. If the BGP routing table has routes whose destination addresses
fall within the specified network, the summary route is added to the BGP routing table. For example, if
two routes 10.1.1.0/24 and 10.1.2.0/24 exist in the BGP routing table, configuring the aggregate
10.1.0.0 16 command creates a summary route 10.1.0.0/16.
If the summarized routes have different ORIGIN attributes, the summary route selects the ORIGIN
attribute in the sequence of INCOMPLETE, EGP, and IGP. For example, if the ORIGIN attributes of the
summarized routes include INCOMPLETE and IGP, the ORIGIN attribute of the summary route is
INCOMPLETE.
If the summarized routes have different COMMUNITY attributes, the summary route that does not have
the ATOMIC_AGGREGATE attribute carries all the COMMUNITY attributes.
196
Table 44 Functions of the keywords
Keywords
Function
as-set
Enables the summary route to carry the AS path information of all summarized routes.
This feature can help avoid routing loops. However, if many routes are summarized and
are changed frequently, do not specify this keyword because this configuration causes
the summary route to flap with the more specific routes.
attribute-policy
Sets attributes except the AS-PATH attribute for the summary route. The peer route-policy
command can achieve the same purpose.
detail-suppressed
Disables advertisement of all more specific routes. To disable advertisement of some
more specific routes, use the suppress-policy keyword or the peer filter-policy
command.
Summarizes only routes satisfying a routing policy.
origin-policy
If the destination address of a route falls within the summary network but does not match
the routing policy, the route is not summarized, and is not controlled by the
detail-suppressed and suppress-policy keywords.
There is no need to configure apply clauses for the routing policy referenced by the
origin-policy keyword because they do not take effect.
suppress-policy
Disables advertisement of some more specific routes filtered by a routing policy. The
routing policy uses if-match clauses to filter routes.
There is no need to configure apply clauses for the routing policy referenced by the
suppress-policy keyword because they do not take effect.
Examples
# In BGP IPv4 unicast instance view, create a summary route 1.1.0.0/16 in the BGP routing table.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family unicast
[Sysname-bgp-ipv4] aggregate 1.1.0.0 255.255.0.0
# In BGP IPv4 unicast instance view, create a summary route 1.1.0.0/16 in the BGP routing table. Specify
the AS_PATH attribute for the summary route to contain the AS path information of all summarized routes,
and advertise only the summary route.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family unicast
[Sysname-bgp-ipv4] aggregate 1.1.0.0 255.255.0.0 as-set detail-suppressed
# In BGP IPv4 unicast instance view, create a summary route 1.1.0.0/16 in the BGP routing table, and set
the COMMUNITY attribute of the summary route to INTERNET.
<Sysname> system-view
[Sysname] route-policy commu permit node 0
[Sysname-route-policy-commu-0] apply community internet
[Sysname-route-policy-commu-0] quit
[Sysname] bgp 100
[Sysname-bgp] ipv4-family unicast
[Sysname-bgp-ipv4] aggregate 1.1.0.0 255.255.0.0 attribute-policy commu
# In BGP IPv4 unicast instance view, create a summary route 1.1.0.0/16 in the BGP routing table, and
configure BGP to not summarize route 1.1.1.0/24.
197
<Sysname> system-view
[Sysname] ip prefix-list spert deny 1.1.1.0 24
[Sysname] ip prefix-list spert permit 0.0.0.0 0 less-equal 32
[Sysname] route-policy srcrt permit node 0
[Sysname-route-policy-srcrt-0] if-match ip address prefix-list spert
[Sysname-route-policy-srcrt-0] quit
[Sysname] bgp 100
[Sysname-bgp] ipv4-family unicast
[Sysname-bgp-ipv4] aggregate 1.1.0.0 255.255.0.0 origin-policy srcrt
# In BGP IPv4 unicast instance view, create a summary route 1.1.0.0/16 in the BGP routing table, and
disable BGP to advertise the specific route 1.1.1.0/24.
<Sysname> system-view
[Sysname] ip prefix-list spert deny 1.1.1.0 24
[Sysname] ip prefix-list spert permit 0.0.0.0 0 less-equal 32
[Sysname] route-policy suprt permit node 0
[Sysname-route-policy-suprt-0] if-match ip address prefix-list spert
[Sysname-route-policy-suprt-0] quit
[Sysname] bgp 100
[Sysname-bgp] ipv4-family unicast
[Sysname-bgp-ipv4] aggregate 1.1.0.0 255.255.0.0 suppress-policy suprt
# In BGP-VPN IPv4 unicast instance view, create a summary route 1.1.0.0/16 in BGP routing table.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] ipv4-family unicast
[Sysname-bgp-ipv4-vpn1] aggregate 1.1.0.0 255.255.0.0
# In BGP IPv6 unicast instance view, create a summary route 12::/64 in the IPv6 BGP routing table.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv6-family
[Sysname-bgp-ipv6] aggregate 12:: 64
Related commands
•
display bgp routing-table ipv4 unicast
•
display bgp routing-table ipv6 unicast
•
summary automatic
balance
Use balance to enable load balancing and specify the maximum number of BGP ECMP routes for load
balancing.
Use undo balance to disable load balancing.
Syntax
balance number
undo balance
198
Default
Load balancing is not enabled.
Views
BGP IPv4 unicast instance view, BGP-VPN IPv4 unicast instance view, BGP IPv6 unicast instance view,
BGP-VPN IPv6 unicast instance view
Predefined user roles
network-admin
Parameters
number: Specifies the maximum number of BGP ECMP routes for load balancing. When it is set to 1,
load balancing is disabled.
Usage guidelines
Unlike IGP, BGP has no explicit metric for making load balancing decision. Instead, it implements load
balancing by modifying route selection rules. If multiple BGP routes destined for a network have the same
AS_PATH, ORIGIN, LOCAL_PREF, and MED attributes, you can use the balance command to implement
load balancing over these routes.
The value range for the number argument depends on the max-ecmp-num command. If you set the
maximum number of ECMP routes to m by using the max-ecmp-num command and reboot the device,
the number argument in the balance command is in the range of 1 to m.
Examples
# In BGP IPv4 unicast instance view, enable load balancing and specify the maximum number of BGP
ECMP routes used for load balancing as 2.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family unicast
[Sysname-bgp-ipv4] balance 2
# In BGP-VPN IPv6 unicast instance view, enable load balancing and specify the maximum number of
BGP ECMP routes for load balancing as 2.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] ipv6-family unicast
[Sysname-bgp-ipv6-vpn1] balance 2
Related commands
max-ecmp-num
bestroute as-path-neglect
Use bestroute as-path-neglect to configure BGP to not consider the AS_PATH during best route selection.
Use undo bestroute as-path-neglect to configure BGP to consider the AS_PATH during best route
selection.
Syntax
bestroute as-path-neglect
undo bestroute as-path-neglect
199
Default
BGP considers the AS_PATH during best route selection.
Views
BGP IPv4 unicast instance view, BGP-VPN IPv4 unicast instance view, BGP IPv6 unicast instance view,
BGP-VPN IPv6 unicast instance view
Predefined user roles
network-admin
Examples
# In BGP IPv4 unicast instance view, ignore AS_PATH in route selection.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family unicast
[Sysname-bgp-ipv4] bestroute as-path-neglect
# In BGP-VPN IPv6 unicast instance view, ignore AS_PATH in route selection.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] ipv6-family unicast
[Sysname-bgp-ipv6-vpn1] bestroute as-path-neglect
bestroute compare-med
Use bestroute compare-med to enable MED comparison for routes on a per-AS basis.
Use undo bestroute compare-med to restore the default.
Syntax
bestroute compare-med
undo bestroute compare-med
Default
MED comparison for routes on a per-AS basis is disabled.
Views
BGP IPv4 unicast instance view, BGP-VPN IPv4 unicast instance view, BGP IPv6 unicast instance view
Predefined user roles
network-admin
Usage guidelines
By default, BGP does not compare MEDs for routes from the same AS. When a router learns a new route,
it compares the route with the optimal route in its BGP routing table. If the new route is more optimal, it
becomes the optimal route in the BGP routing table. In this way, route learning sequence might affect
optimal route selection.
With the bestroute compare-med command configured, the router puts routes received from the same AS
into a group. The router then selects the route with the lowest MED from the same group, and compares
routes from different groups. This mechanism avoids the above-mentioned problem.
200
If the bestroute compare-med and balance commands are configured at the same time, the balance
command does not take effect.
Examples
# In BGP IPv4 unicast instance view, enable MED comparison for routes on a per-AS basis.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family unicast
[Sysname-bgp-ipv4] bestroute compare-med
# In BGP-VPN IPv4 unicast instance view, enable MED comparison for routes on a per-AS basis.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] ipv4-family unicast
[Sysname-bgp-ipv4-vpn1] bestroute compare-med
# In BGP IPv6 unicast instance view, enable MED comparison for routes on a per-AS basis.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv6-family unicast
[Sysname-bgp-ipv6] bestroute compare-med
bestroute med-confederation
Use bestroute med-confederation to enable MED comparison for routes received from confederation
peers.
Use undo bestroute med-confederation to restore the default.
Syntax
bestroute med-confederation
undo bestroute med-confederation
Default
MED comparison is disabled for routes received from confederation peers.
Views
BGP IPv4 unicast instance view, BGP-VPN IPv4 unicast instance view, BGP IPv6 unicast instance view
Predefined user roles
network-admin
Usage guidelines
This command enables BGP to compare the MEDs of routes received from confederation peers. However,
if a route received from a confederation peer has an AS number that does not belong to the
confederation, BGP does not compare the route with other routes. For example, a confederation has
three AS numbers 65006, 65007, and 65009. BGP receives three routes from different confederation
peers. The AS_PATH attributes of these routes are 65006 65009, 65007 65009, and 65008 65009,
and the MED values of them are 2, 3, and 1. Because the third route's AS_PATH attribute contains AS
number 65008 that does not belong to the confederation, BGP does not compare it with other routes. As
a result, the first route becomes the optimal route.
201
Examples
# In BGP IPv4 unicast instance view, enable MED comparison for routes received from confederation
peers.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family unicast
[Sysname-bgp-ipv4] bestroute med-confederation
# In BGP-VPN IPv4 unicast instance view, enable MED comparison for routes received from
confederation peers.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] ipv4-family unicast
[Sysname-bgp-ipv4-vpn1] bestroute med-confederation
# In BGP IPv6 unicast instance view, enable MED comparison for routes received from confederation
peers.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv6-family unicast
[Sysname-bgp-ipv6] bestroute med-confederation
bgp
Use bgp to enable BGP and enter the BGP view.
Use undo bgp to disable BGP.
Syntax
bgp as-number
undo bgp [ as-number ]
Default
BGP is not enabled.
Views
System view
Predefined user roles
network-admin
Parameters
as-number: Specifies a local AS by its number in the range of 1 to 4294967295.
Usage guidelines
A router can reside in only one AS, so the router can run only one BGP process.
A router supports 4-byte AS number.
Examples
# Enable BGP, set the local AS number to 100, and enter BGP view.
<Sysname> system-view
202
[Sysname] bgp 100
[Sysname-bgp]
compare-different-as-med
Use compare-different-as-med to enable MED comparison for routes from peers in different ASs.
Use undo compare-different-as-med to disable the comparison.
Syntax
compare-different-as-med
undo compare-different-as-med
Default
The comparison is disabled.
Views
BGP IPv4 unicast instance view, BGP-VPN IPv4 unicast instance view, BGP IPv6 unicast instance view
Predefined user roles
network-admin
Usage guidelines
If multiple routes to a destination exist, the route with the smallest MED is selected.
Do not use this command unless relevant ASs adopt the same IGP protocol and routing selection method.
Examples
# In BGP IPv4 unicast instance view, enable MED comparison for routes from peers in different ASs.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family unicast
[Sysname-bgp-ipv4] compare-different-as-med
# In BGP-VPN IPv4 unicast instance view, enable MED comparison for routes from peers in different ASs.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] ipv4-family unicast
[Sysname-bgp-ipv4-vpn1] compare-different-as-med
# In BGP IPv6 unicast instance view, enable MED comparison for routes from peers in different ASs.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv6-family unicast
[Sysname-bgp-ipv6] compare-different-as-med
confederation id
Use confederation id to configure a confederation ID.
Use undo confederation id to remove the specified confederation ID.
203
Syntax
confederation id as-number
undo confederation id
Default
No confederation ID is configured.
Views
BGP view
Predefined user roles
network-admin
Parameters
as-number: Specifies an AS number that identifies the confederation, in the range of 1 to 4294967295.
Usage guidelines
You can split an AS into several sub-ASs, and each sub-AS remains fully meshed. These sub-ASs form a
confederation. Key path attributes of a route, such as the Next_HOP, MED, and LOCAL_PREF, are not
discarded when crossing each sub-AS. The sub-ASs still look like one AS from the perspective of other
ASs. The AS number is the confederation ID.
Confederation can ensure the integrity of the former AS, and solve the problem of too many IBGP
connections in the AS.
Configure the same confederation ID for all routers in one confederation.
On a member outside of a confederation, to establish a BGP connection to a specific router in that
confederation, specify the AS number of the router as the confederation ID.
Examples
# Confederation 9 consists of four sub-ASs numbered 38, 39, 40 and 41. The peer 10.1.1.1 is a member
of sub-AS 38. The peer 200.1.1.1 is a member outside of confederation 9, which belongs to AS 98.
Confederation 9 looks like one AS (with AS number 9) from the perspective of the peer 200.1.1.1. This
example uses a router in sub-AS 41.
<Sysname> system-view
[Sysname] bgp 41
[Sysname-bgp] confederation id 9
[Sysname-bgp] confederation peer-as 38 39 40
[Sysname-bgp] group Confed38 external
[Sysname-bgp] peer Confed38 as-number 38
[Sysname-bgp] peer 10.1.1.1 group Confed38
[Sysname-bgp] group Remote98 external
[Sysname-bgp] peer Remote98 as-number 98
[Sysname-bgp] peer 200.1.1.1 group Remote98
Related commands
•
confederation nonstandard
•
confederation peer-as
204
confederation nonstandard
Use confederation nonstandard to enable compatibility with routers not compliant with RFC 3065 in the
confederation.
Use undo confederation nonstandard to restore the default.
Syntax
confederation nonstandard
undo confederation nonstandard
Default
The device is compatible with only routers compliant with RFC 3065 in the confederation.
Views
BGP view
Predefined user roles
network-admin
Usage guidelines
Configure this command on all routers compliant with RFC 3065 to interact with those routers not
compliant with RFC 3065 in the confederation.
Examples
# Confederation 100 comprises two sub-ASs, 64000 and 65000, and contains routers not compliant
with RFC 3065. Enable compatibility with routers not compliant with RFC 3065 in the confederation.
<Sysname> system-view
[Sysname] bgp 64000
[Sysname-bgp] confederation id 100
[Sysname-bgp] confederation peer-as 65000
[Sysname-bgp] confederation nonstandard
Related commands
•
confederation id
•
confederation peer-as
confederation peer-as
Use confederation peer-as to specify confederation peer sub-ASs.
Use undo confederation peer-as to remove specified confederation peer sub-ASs.
Syntax
confederation peer-as as-number-list
undo confederation peer-as [ as-number-list ]
Default
No confederation peer sub-ASs are specified.
Views
BGP view
205
Predefined user roles
network-admin
Parameters
as-number-list: Specifies a sub-AS number list. Up to 32 sub-ASs can be configured in one command line.
The expression is as-number-list = as-number &<1-32>. The as-number argument specifies a sub-AS
number in the range of 1 to 4294967295, and &<1-32> indicates up to 32 numbers can be specified.
Usage guidelines
Before this configuration, use the confederation id command to specify the confederation for the sub-ASs.
If the undo confederation peer-as command without the as-number-list argument is used, all
confederation peer sub-ASs are removed.
Examples
# Specify confederation peer sub-ASs 2000 and 2001.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] confederation id 10
[Sysname-bgp] confederation peer-as 2000 2001
Related commands
•
confederation id
•
confederation nonstandard
dampening
Use dampening to enable BGP route dampening.
Use undo dampening to disable route dampening.
Syntax
dampening [ half-life-reachable half-life-unreachable reuse suppress ceiling | route-policy
route-policy-name ] *
undo dampening
Default
Route dampening is disabled.
Views
BGP IPv4 unicast instance view, BGP-VPN IPv4 unicast instance view, BGP IPv6 unicast instance view,
BGP-VPN IPv6 unicast instance view
Predefined user roles
network-admin
Parameters
half-life-reachable: Specifies a half-life for active routes, in the range of 1 to 45 minutes. By default, the
value is 15 minutes.
half-life-unreachable: Specifies a half-life for suppressed routes, in the range of 1 to 45 minutes. By
default, the value is 15 minutes.
206
reuse: Specifies a reuse threshold value for suppressed routes, in the range of 1 to 20000. A suppressed
route whose penalty value decreases under the value is reused. By default, the reuse value is 750. The
reuse threshold must be less than the suppression threshold.
suppress: Specifies a suppression threshold in the range of 1 to 20000. The route with a penalty value
higher than the threshold is suppressed. The default value is 2000.
ceiling: Specifies a ceiling penalty value in the range of 1001 to 20000. The value must be bigger than
the suppress value. By default, the value is 16000.
route-policy route-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to 63
characters.
Usage guidelines
The command dampens only EBGP routes.
Examples
# In BGP IPv4 unicast instance view, configure BGP route dampening.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family unicast
[Sysname-bgp-ipv4] dampening 10 10 1000 2000 10000
# In BGP-VPN IPv4 unicast instance view, configure BGP route dampening.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] ipv4-family unicast
[Sysname-bgp-ipv4-vpn1] dampening 10 10 1000 2000 10000
# In BGP IPv6 unicast instance view, configure BGP route dampening.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv6-family unicast
[Sysname-bgp-ipv6] dampening 10 10 1000 2000 10000
# In BGP-VPN IPv6 unicast instance view, configure BGP route dampening.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] ipv6-family unicast
[Sysname-bgp-ipv6-vpn1] dampening 10 10 1000 2000 10000
Related commands
•
display bgp dampening parameter ipv4 unicast
•
display bgp dampening parameter ipv6 unicast
default local-preference
Use default local-preference to configure a default local preference.
Use undo default local-preference to restore the default.
207
Syntax
default local-preference value
undo default local-preference
Default
The default local preference is 100.
Views
BGP IPv4 unicast instance view, BGP-VPN IPv4 unicast instance view, BGP IPv6 unicast instance view,
BGP-VPN IPv6 unicast instance view
Predefined user roles
network-admin
Parameters
value: Specifies a default local preference in the range of 0 to 4294967295. The larger the value, the
higher the preference.
Usage guidelines
You can also use the apply local-preference command in a routing policy to configure the local
preference for BGP routes. If no routing policy is configured, all BGP routes use the local preference set
by the default local-preference command. If a routing policy is configured, BGP routes matching the
routing policy use the local preference set by the apply local-preference command, and other BGP routes
use the local preference set by the default local-preference command.
Examples
# In BGP IPv4 unicast instance view, set the default local preference to 180.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family unicast
[Sysname-bgp-ipv4] default local-preference 180
# In BGP-VPN IPv6 unicast instance view, set the default local preference to 180.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] ipv6-family unicast
[Sysname-bgp-ipv6-vpn1] default local-preference 180
Related commands
•
apply local-preference
•
route-policy
default med
Use default med to specify a default MED value.
Use undo default med to restore the default.
Syntax
default med med-value
undo default med
208
Default
The default med-value is 0.
Views
BGP IPv4 unicast instance view, BGP-VPN IPv4 unicast instance view, BGP IPv6 unicast instance view,
BGP-VPN IPv6 unicast instance view
Predefined user roles
network-admin
Parameters
med-value: Specifies the default MED value in the range of 0 to 4294967295.
Usage guidelines
BGP selects a MED value in the following order:
1.
MED set by the apply cost command.
2.
MED set by the med keyword in the import-route command.
3.
MED set by the default med command.
4.
Original MED of a BGP route, or MED changed from the metric of a redistributed IGP route.
Examples
# In BGP IPv4 unicast instance view, configure the default MED as 25.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family unicast
[Sysname-bgp-ipv4] default med 25
# In BGP-VPN IPv6 unicast instance view, configure the default MED as 25.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] ipv6-family unicast
[Sysname-bgp-ipv6-vpn1] default med 25
Related commands
•
apply cost
•
import-route
•
route-policy
default-route imported
Use default-route imported to enable default route redistribution into the BGP routing table.
Use undo default-route imported to restore the default.
Syntax
default-route imported
undo default-route imported
Default
Default route redistribution is not enabled.
209
Views
BGP IPv4 unicast instance view, BGP-VPN IPv4 unicast instance view, BGP IPv6 unicast instance view,
BGP-VPN IPv6 unicast instance view
Predefined user roles
network-admin
Usage guidelines
By default, BGP does not redistribute default IGP routes. You must use the default-route imported
command together with the import-route command to redistribute default IGP routes into the BGP routing
table.
Examples
# In BGP IPv4 unicast instance view, enable default route redistribution from OSPF process 1 into the BGP
routing table.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family unicast
[Sysname-bgp-ipv4] default-route imported
[Sysname-bgp-ipv4] import-route ospf 1
# In BGP-VPN IPv4 unicast instance view, enable default route redistribution from OSPF process 1 into the
BGP routing table.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] ipv4-family unicast
[Sysname-bgp-ipv4-vpn1] default-route imported
[Sysname-bgp-ipv4-vpn1] import-route ospf 1
# In BGP IPv6 unicast instance view, enable default route redistribution from OSPFv3 process 1 into the
IPv6 BGP routing table.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv6-family unicast
[Sysname-bgp-ipv6] default-route imported
[Sysname-bgp-ipv6] import-route ospfv3 1
# In BGP-VPN IPv6 unicast instance view, enable default route redistribution from OSPFv3 process 1 into
the IPv6 BGP routing table.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] ipv6-family unicast
[Sysname-bgp-ipv6-vpn1] default-route imported
[Sysname-bgp-ipv6-vpn1] import-route ospfv3 1
Related commands
import-route
210
display bgp dampening parameter ipv4 unicast
Use display bgp dampening parameter ipv4 unicast to display BGP IPv4 unicast route dampening
parameters.
Syntax
display bgp dampening parameter ipv4 [ unicast ] [ vpn-instance vpn-instance-name ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN by its name, a case-sensitive string of 1 to 31
characters. If no VPN is specified, the command displays BGP IPv4 unicast route dampening parameters
for the public network.
Usage guidelines
The command with the unicast keyword has the same effect as that without the unicast keyword.
Examples
# Display BGP IPv4 unicast route dampening parameters for the public network.
<Sysname> display bgp dampening parameter ipv4
Maximum suppression time (in seconds)
: 3973
Ceiling value
: 16000
Reuse value
: 750
Half-life time for reachable routes (in seconds)
: 900
Half-life time for unreachable routes (in seconds) : 900
Suppression threshold
: 2000
Table 45 Command output
Field
Description
Maximum suppression time
Maximum time (in seconds) for the penalty value to
decrease from the ceiling value to the reuse value.
Ceiling value
Penalty ceiling value.
Reuse value
Reuse threshold.
Related commands
dampening
display bgp dampening parameter ipv6 unicast
Use display bgp dampening parameter ipv6 unicast to display BGP IPv6 unicast route dampening
parameters.
211
Syntax
display bgp dampening parameter ipv6 [ unicast ] [ vpn-instance vpn-instance-name ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN by its name, a case-sensitive string of 1 to 31
characters. If no VPN is specified, the command displays BGP IPv6 unicast route dampening parameters
for the public network.
Usage guidelines
The command with the unicast keyword has the same effect as that without the unicast keyword.
Examples
# Display BGP IPv6 unicast route dampening parameters for the public network.
<Sysname> display bgp dampening parameter ipv6
Maximum suppression time (in seconds)
: 3973
Ceiling value
: 16000
Reuse value
: 750
Half-life time for reachable routes (in seconds)
: 900
Half-life time for unreachable routes (in seconds) : 900
Suppression threshold
: 2000
Table 46 Command output
Field
Description
Maximum suppression time
Maximum time (in seconds) for the penalty value to
decrease from the ceiling value to the reuse value.
Ceiling value
Penalty ceiling value.
Reuse value
Reuse threshold.
Related commands
dampening
display bgp group ipv4 unicast
Use display bgp group ipv4 unicast to display BGP IPv4 unicast peer group information.
Syntax
display bgp group ipv4 [ unicast ] [ vpn-instance vpn-instance-name ] [ group-name ]
Views
Any view
212
Predefined user roles
network-admin
network-operator
Parameters
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN by its name, a case-sensitive string of 1 to 31
characters. If no VPN is specified, the command displays BGP IPv4 unicast peer group information for
the public network.
group-name: Specifies a BGP IPv4 unicast peer group by its name, a case-sensitive string of 1 to 47
characters. If no group is specified, this command displays brief information about all BGP IPv4 unicast
peer groups.
Usage guidelines
The command with the unicast keyword has the same effect as that without the unicast keyword.
Examples
# Display brief information about all BGP IPv4 unicast peer groups for the public network.
BGP peer group: group1
Remote AS: 600
Type: external
Members:
1.1.1.10
BGP peer group: group2
Remote AS number: not specified
Type: external
Members:
2.2.2.2
# Display detailed information about BGP IPv4 unicast peer group group1 for the public network.
<Sysname> display bgp group ipv4 group1
BGP peer group: group1
Remote AS: 600
Type: external
Maximum number of prefixes allowed: 4294967295
Threshold: 75%
Configured hold time: 180 seconds
Keepalive time: 60 seconds
Minimum time between advertisements: 30 seconds
Peer preferred value: 0
Routing policy configured:
No routing policy is configured
Members:
Peer
1.1.1.10
213
AS
MsgRcvd
600
0
MsgSent OutQ PrefRcv Up/Down
0
0
State
0 00:00:55 Established
Table 47 Command output
Field
Description
BGP peer group
Name of the BGP peer group.
Remote AS
AS number of the peer group.
Type of the peer groups:
Type
• external—IBGP peer group.
• internal—EBGP peer group.
Maximum number of prefixes
allowed
Maximum number of routes allowed to learn from the peer.
Threshold
Percentage of received routes from the peer to maximum routes allowed
to learn from the peer. If the percentage is reached, the system
generates alarm messages.
Configured hold time
Configured Hold Interval in seconds.
Keepalive time
Keepalive interval in seconds.
Minimum time between
advertisements
Minimum route advertisement interval in seconds.
Peer preferred value
Preferred value specified for routes from the peer.
Routing policy configured for the peer group.
Routing policy configured
If no routing policy is specified, this field displays "No routing policy is
configured."
Members
Information about peers included in the peer group.
Peer
IP address of the peer.
AS
AS number of the peer.
MsgRcvd
Number of messages received.
MsgSent
Number of messages sent.
OutQ
Number of messages to be sent.
PrefRcv
Number of prefixes received.
Up/Down
Lasting time of the current BGP session state.
State
Current state of the BGP session between the local router and the peer.
display bgp group ipv6 unicast
Use display bgp group ipv6 unicast to display BGP IPv6 unicast peer group information.
Syntax
display bgp group ipv6 [ unicast ] [ vpn-instance vpn-instance-name ] [ group-name ]
Views
Any view
Predefined user roles
network-admin
214
network-operator
Parameters
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN by its name, a case-sensitive string of 1 to 31
characters. If no VPN is specified, the command displays BGP IPv6 unicast peer group information for
the public network.
group-name: Specifies a BGP IPv6 unicast peer group by its name, a case-sensitive string of 1 to 47
characters. If no group is specified, this command displays brief information about all BGP IPv6 unicast
peer groups.
Usage guidelines
The command with the unicast keyword has the same effect as that without the unicast keyword.
Examples
# Display brief information about all BGP IPv6 unicast peer groups for the public network.
<Sysname> display bgp group ipv6
BGP peer group: abc
Remote AS number: not specified
Type: external
Members:
1::1
BGP peer group: group1
Remote AS: 600
Type: external
Members:
3::3
# Display detailed information about BGP IPv6 unicast peer group group1 for the public network.
<Sysname> display bgp group ipv6 group1
BGP peer group: group1
Remote AS: 600
Type: external
Maximum number of prefixes allowed: 4294967295
Threshold: 75%
Configured hold time: 180 seconds
Keepalive time: 60 seconds
Minimum time between advertisements: 30 seconds
Peer preferred value: 0
Routing policy configured:
No routing policy is configured
Members:
Peer
AS
MsgRcvd
3::3
600
0
215
MsgSent OutQ PrefRcv Up/Down
0
0
State
0 00:00:40 Established
Table 48 Command output
Field
Description
BGP peer group
Name of the BGP peer group.
Remote AS
AS number of the peer group.
Type of the peer groups:
Type
• external—IBGP peer group.
• internal—EBGP peer group.
Maximum number of prefixes
allowed
Maximum number of routes allowed to learn from the peer.
Threshold
Percentage of received routes from the peer to maximum routes allowed
to learn from the peer. If the percentage is reached, the system
generates alarm messages.
Configured hold time
Configured Hold Interval in seconds.
Keepalive time
Keepalive interval in seconds.
Minimum time between
advertisements
Minimum route advertisement interval in seconds.
Peer preferred value
Preferred value specified for the routes from the peer.
Routing policy configured for the peer group.
Routing policy configured
If no routing policy is specified, this field displays "No routing policy is
configured."
Members
Information of the peers included in the peer group.
Peer
IPv6 address of the peer.
AS
AS number of the peer.
MsgRcvd
Number of messages received.
MsgSent
Number of messages sent.
OutQ
Number of messages to be sent.
PrefRcv
Number of prefixes received.
Up/Down
Lasting time of the current BGP session state.
State
Current state of the BGP session between the local router and the peer.
display bgp network
Use display bgp network to display information about routes advertised by the network command and
shortcut routes configured by the network short-cut command.
Syntax
display bgp network { ipv4 | ipv6 } [ unicast ] [ vpn-instance vpn-instance-name ]
Views
Any view
Predefined user roles
network-admin
216
network-operator
Parameters
ipv4: Displays IPv4 address family information.
ipv6: Displays IPv6 address family information.
unicast: Displays IPv4 or IPv6 unicast address family information regardless of whether this keyword is
specified or not.
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN by its name, a case-sensitive string of 1 to 31
characters. If no VPN is specified, the command displays routing information for the public network.
Examples
# Display information about routes advertised by the network command and shortcut routes configured
by the network short-cut command in the IPv4 unicast address family for the public network.
<Sysname> display bgp network ipv4
BGP local router ID: 192.168.1.135
Local AS number: 100
Network
Mask
20.1.1.0
255.255.255.0
40.1.1.0
255.255.255.0
30.1.1.0
255.255.255.0
Route-policy
Short-cut
No
abc
No
Yes
# Display information about routes advertised by the network command and shortcut routes configured
by the network short-cut command in the IPv6 unicast address family for the public network.
<Sysname> display bgp network ipv6
BGP local router ID: 192.168.1.135
Local AS number: 100
Network
PrefixLen
Route-policy
1::
24
No
2::
24
No
3::
64
2::
24
policy1
Short-cut
No
Yes
# Display information about routes advertised by the network command and shortcut routes configured
by the network short-cut command in the IPv4 unicast address family in VPN instance vpn1.
<Sysname> display bgp network ipv4 vpn-instance vpn1
BGP local router ID: 192.168.1.135
Local AS number: 100
Network
Mask
50.1.1.0
255.255.255.0
No
40.1.1.0
255.255.255.0
Yes
217
Route-policy
Short-cut
Table 49 Command output
Field
Description
Network
Destination network address of the routes advertised by the
network command and the shortcut routes.
Mask
Mask of the destination network address.
PrefixLen
Prefix length of the desination network address.
Route-policy
Routing policy that is applied to the route.
Indicates whether the route is a shortcut route:
• Yes
• No
Short-cut
display bgp paths
Use display bgp paths to display BGP path attribute information.
Syntax
display bgp paths [ as-regular-expression ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
as-regular-expression: Displays information about BGP path attributes whose AS_PATH attribute matches
the specified regular expression. The as-regular-expression argument is a string of 1 to 256 characters.
Without this argument, this command displays information about all BGP path attributes.
Examples
# Display information about all BGP path attributes.
<Sysname> display bgp paths
RefCount
MED
Path/Origin
3
0
?
2
0
100i
3
0
100i
1
0
?
1
0
?
1
0
?
Table 50 Command output
Field
Description
RefCount
Number of BGP routes with these path attributes.
MED
MED attribute value.
218
Field
Description
AS_PATH and ORIGIN attributes of the route:
• AS_PATH attribute—Records the ASs the route has passed to avoid routing
loops.
• ORIGIN attribute—Identifies the origin of the route:
Path/Origin
{
{
{
i—Originated in the AS. The origin of summary routes and routes advertised
with the network command is IGP.
e—Learned through EGP.
?—Unknown origin. The origin of routes redistributed from IGP protocols is
INCOMPLETE.
display bgp peer ipv4 unicast
Use display bgp peer ipv4 unicast to display BGP IPv4 unicast peer or peer group information.
Syntax
display bgp peer ipv4 [ unicast ] [ vpn-instance vpn-instance-name ] [ group-name log-info | ip-address
{ log-info | verbose } | verbose ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN by its name, a case-sensitive string of 1 to 31
characters. If no VPN is specified, the command displays BGP IPv4 unicast peer or peer group
information for the public network.
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters.
ip-address: Specifies a peer by its IP address.
log-info: Displays log information.
verbose: Displays detailed information.
Usage guidelines
If no parameter is specified, this command displays brief information about all BGP IPv4 unicast peers.
The command with the unicast keyword has the same effect as that without the unicast keyword.
Examples
# Display brief information about all BGP IPv4 unicast peers for the public network.
<Sysname> display bgp peer ipv4
BGP local router ID: 192.168.100.1
Local AS number: 100
Total number of peers: 1
219
Peers in established state: 1
Peer
10.2.1.2
AS
MsgRcvd
200
13
MsgSent OutQ PrefRcv Up/Down
16
0
State
0 00:10:34 Established
Table 51 Command output
Field
Description
Peer
IP address of the peer.
AS
AS number of the peer.
MsgRcvd
Number of messages received.
MsgSent
Number of messages sent.
OutQ
Number of messages to be sent.
PrefRcv
Number of prefixes received.
Up/Down
Lasting time of the current BGP session state.
State
Current state of the BGP session between the local router and the peer.
# Display detailed information about BGP IPv4 unicast peer 10.2.1.2 for the public network.
<Sysname> display bgp peer ipv4 10.2.1.2 verbose
Peer: 10.2.1.2
Local: 192.168.100.1
Type: EBGP link
BGP version 4, remote router ID 192.168.100.2
BGP current state: Established, Up for 00h11m10s
BGP current event: RecvKeepalive
BGP last state: OpenConfirm
Port:
Local - 179
Remote - 60672
Configured: Active Hold Time: 180 sec
Received
Keepalive Time: 60 sec
: Active Hold Time: 180 sec
Negotiated: Active Hold Time: 180 sec
Keepalive Time: 60 sec
Peer optional capabilities:
Peer support BGP multi-protocol extended
Peer support BGP route refresh capability
Peer support BGP route AS4 capability
Address family IPv4 Unicast: advertised and received
Received: Total 13 messages, Update messages 0
Sent: Total 16 messages, Update messages 0
Maximum allowed prefix number: 4294967295
Threshold: 75%
Minimum time between advertisements is 30 seconds
Optional capabilities:
Multi-protocol extended capability has been enabled
Route refresh capability has been enabled
Peer Preferred Value: 0
BFD: Enabled
Routing policy configured:
220
No routing policy is configured
Table 52 Command output
Field
Description
Peer
IP address of the peer.
Local
Local router ID.
BGP connection type between the local router and the peer:
Type
• IBGP link—IBGP connection.
• EBGP link—EBGP connection.
remote router ID
Router ID of the peer.
BGP current state
Current state of the BGP session between the local router and the peer.
Up for
Lasting time of the BGP session.
BGP current event
Current event of the BGP session between the local router and the peer.
BGP last state
Previous state of the BGP session.
Port
TCP port numbers of the local router and its peer.
Configured
Timers configured on the local router in seconds, including the holdtime
(Active Hold Time) and keepalive interval (Keepalive Time).
Received
Received timer (configured on the peer) in seconds, including the
holdtime (Active Hold Time).
Negotiated
Negotiated timers in seconds, including the holdtime (Active Hold Time)
and keepalive interval (Keepalive Time).
Peer optional capabilities
Optional capabilities supported by the peer.
Peer support BGP route AS4
capability
The peer supports 4-byte AS number.
Address family IPv4 Unicast
IPv4 unicast address family capability: Routes of the address family can
be advertised and received.
Received
Total numbers of received messages and updates.
Sent
Total numbers of sent messages and updates.
Maximum allowed prefix number
Maximum number of routes allowed to learn from the peer.
Threshold
Percentage of received routes from the peer to maximum routes allowed
to learn from the peer. If the percentage is reached, the system
generates alarm messages.
Minimum time between
advertisements
Minimum route advertisement interval in seconds.
Optional capabilities
Optional capabilities supported by the local end.
Peer Preferred Value
Preferred value specified for the routes from the peer.
BFD
Indicates whether BFD is enabled to detect the link to the BGP peer.
Routing policy configured for the peer.
Routing policy configured
If no routing policy is specified, this field displays "No routing policy is
configured."
# Display log information about BGP IPv4 unicast peer 1.1.1.1 for the public network.
221
<Sysname> display bgp peer ipv4 1.1.1.1 log-info
Peer : 1.1.1.1
Date
Time
State Notification
Error/SubError
10-Jul-2008 15:46:17 Down
Send Notification with Error 1/1
Message Header Error/Connection Not Synchronized
10-Jul-2008 09:23:00 Up
10-Jul-2008 07:46:17 Down
Receive Notification with Error 3/2
UPDATE Message Error/Unsupported optional Parameter
10-Jul-2008 06:23:00 Up
10-Jul-2008 05:46:17 Down
Send Notification with Error 6/4
Cease/Administrative Reset
Table 53 Command output
Field
Description
Peer
IP address of the peer.
Date
Date on which the Notification was sent or received.
Time
Time at which the Notification was sent or received.
BGP session state:
State
• Up—The BGP session is in Established state.
• Down—The BGP session is down.
Error code of the Notification, indicating the cause of why the BGP session is down.
Notification
Error/SubError
• Error—Refers to the error code, which identifies the type of the Notification.
• SubError—Refers to the error subcode of the Notification, which identifies the specific
information about the reported error.
display bgp peer ipv6 unicast
Use display bgp peer ipv6 unicast to display BGP IPv6 unicast peer or peer group information.
Syntax
display bgp peer ipv6 [ unicast ] [ group-name log-info | ipv6-address { log-info | verbose } | verbose ]
display bgp peer ipv6 [ unicast ] vpn-instance vpn-instance-name [ group-name log-info | ipv6-address
{ log-info | verbose } | verbose ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters.
222
ipv6-address: Specifies a peer by its IPv6 address.
log-info: Displays log information.
verbose: Displays detailed information.
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN by its name, a case-sensitive string of 1 to 31
characters. If no VPN is specified, the command displays BGP IPv6 unicast peer or peer group
information for the public network.
Usage guidelines
If no parameter is specified, the command displays brief information about all BGP IPv6 unicast peers.
The command with the unicast keyword has the same effect as that without the unicast keyword.
Examples
# Display brief information about all BGP IPv6 unicast peers for the public network.
<Sysname> display bgp peer ipv6
BGP local router ID: 192.168.1.135
Local AS number: 100
Total number of peers: 4
Peers in established state: 1
Peer
AS
MsgRcvd
MsgSent OutQ PrefRcv Up/Down
State
1::1
600
9
9
0
0 00:05:12 Established
3::3
600
0
0
0
0 00:03:16 Connect
Table 54 Command output
Field
Description
Peer
IP address of the peer.
AS
AS number of the peer.
MsgRcvd
Number of messages received.
MsgSent
Number of messages sent.
OutQ
Number of messages to be sent.
PrefRcv
Number of prefixes received.
Up/Down
Lasting time of the current BGP session state.
State
Current state of the BGP session between the local router and the peer.
# Display detailed information about BGP IPv6 unicast peer 1::2 for the public network.
<Sysname> display bgp peer ipv6 1::2 verbose
Peer: 1::2
Local: 192.168.1.136
Type: EBGP link
BGP version 4, remote router ID 192.168.1.135
BGP current state: Established, Up for 00h05m48s
BGP current event: RecvKeepalive
BGP last state: OpenConfirm
Port:
223
Local - 13184
Remote - 179
Configured: Active Hold Time: 180 sec
Received
Keepalive Time: 60 sec
: Active Hold Time: 180 sec
Negotiated: Active Hold Time: 180 sec
Keepalive Time: 60 sec
Peer optional capabilities:
Peer support BGP multi-protocol extended
Peer support BGP route refresh capability
Peer support BGP route AS4 capability
Address family IPv6 Unicast: advertised and received
Received: Total 9 messages, Update messages 1
Sent: Total 10 messages, Update messages 1
Maximum allowed prefix number: 4294967295
Threshold: 75%
Minimum time between advertisements is 30 seconds
Optional capabilities:
Multi-protocol extended capability has been enabled
Route refresh capability has been enabled
Peer preferred value: 0
BFD: Enabled
Routing policy configured:
No routing policy is configured
Table 55 Command output
Field
Description
Peer
IP address of the peer.
Local
Local router ID.
BGP connection type between the local router and the peer:
Type
• IBGP link—IBGP connection.
• EBGP link—EBGP connection.
remote router ID
Router ID of the peer.
BGP current state
Current state of the BGP session between the local router and the peer.
Up for
Lasting time of the BGP session.
BGP current event
Current event of the BGP session between the local router and the peer.
BGP last state
Previous state of the BGP session.
Port
TCP port numbers of the local router and its peer.
Configured
Timer configured on the local router in seconds, including the holdtime
(Active Hold Time) and keepalive interval (Keepalive Time).
Received
Received timer (configured on the peer) in seconds, including the
holdtime (Active Hold Time).
Negotiated
Negotiated timer in seconds, including the holdtime (Active Hold Time)
and keepalive interval (Keepalive Time).
Peer optional capabilities
Optional capabilities supported by the peer.
224
Field
Description
Peer support BGP route AS4
capability
The peer supports 4-byte AS number.
Address family IPv6 Unicast
IPv6 unicast address family capability: Routes of the address family can
be advertised and received.
Received
Total numbers of received messages and updates.
Sent
Total numbers of sent messages and updates.
Maximum allowed prefix number
Maximum number of routes allowed to learn from the peer.
Threshold
Percentage of received routes from the peer to maximum routes allowed
to learn from the peer. If the percentage is reached, the system
generates alarm messages.
Minimum time between
advertisements
Minimum route advertisement interval in seconds.
Optional capabilities
Optional capabilities supported by the local end.
Peer Preferred Value
Preferred value specified for the routes from the peer.
BFD
Indicates whether BFD is enabled to detect the link to the specified BGP
peer.
Routing policy configured for the peer.
Routing policy configured
If no routing policy is specified, this field displays "No routing policy is
configured."
# Display log information about BGP IPv6 unicast peer 1::2 for the public network.
<Sysname> display bgp peer ipv6 1::2 log-info
Peer : 1::2
Date
Time
State Notification
Error/SubError
22-Nov-2011 09:31:12 Up
Table 56 Command output
Field
Description
Peer
IP address of the peer.
Date
Date on which the Notification was sent or received.
Time
Time at which the Notification was sent or received.
BGP session state:
State
• Up—The BGP session is in Established state.
• Down—The BGP session is down.
Error code of the Notification, indicating the cause of why the BGP session is down.
Notification
Error/SubError
• Error—Refers to the error code, which identifies the type of the Notification.
• SubError—Refers to the error subcode of the Notification, which identifies the specific
information about the reported error.
225
display bgp routing-table dampened ipv4 unicast
Use display bgp routing-table dampened ipv4 unicast to display dampened BGP IPv4 unicast routes.
Syntax
display bgp routing-table dampened ipv4 [ unicast ] [ vpn-instance vpn-instance-name ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN by its name, a case-sensitive string of 1 to 31
characters. If no VPN is specified, the command displays dampened BGP IPv4 unicast routes for the
public network.
Usage guidelines
The command with the unicast keyword has the same effect as that without the unicast keyword.
Examples
# Display dampened BGP IPv4 unicast routes.
<Sysname> display bgp routing-table dampened ipv4
Total number of routes: 1
BGP local router ID is 192.168.1.135
Status codes: * - valid, > - best, d - dampened, h - history,
s - suppressed, S - stale, i - internal, e - external
Origin: i - IGP, e - EGP, ? - incomplete
Network
de 20.1.1.0/24
From
Reuse
Path/Ogn
10.1.1.2
00:56:27
100i
Table 57 Command output
Field
Description
Status codes:
Status codes
226
•
•
•
•
•
•
•
•
* – valid—Valid route.
> – best—Best route.
d – damped—Dampened route.
h – history—History route.
s – suppressed—Suppressed route.
S – Stale—Stale route.
i – internal—Internal route.
e – external—External route.
Field
Description
Origin of the route:
• i – IGP—Originated in the AS. The origin of summary routes and routes
Origin
advertised with the network command is IGP.
• e – EGP—Learned through EGP.
• ?– incomplete—Unknown origin. The origin of routes redistributed from IGP
protocols is INCOMPLETE.
Network
Destination network address.
From
IP address from which the route was received.
Reuse
Reuse time of the route.
AS_PATH and ORIGIN attributes of the route:
Path/Ogn
• AS_PATH attribute—Records the ASs the route has passed to avoid routing
loops.
• ORIGIN attribute—Identifies the origin of the route.
Related commands
•
dampening
•
reset bgp dampening ipv4 unicast
display bgp routing-table dampened ipv6 unicast
Use display bgp routing-table dampened ipv6 unicast to display dampened BGP IPv6 unicast routes.
Syntax
display bgp routing-table dampened ipv6 [ unicast ] [ vpn-instance vpn-instance-name ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN by its name, a case-sensitive string of 1 to 31
characters. If no VPN is specified, the command displays dampened BGP IPv6 unicast routes for the
public network.
Usage guidelines
The command with the unicast keyword has the same effect as that without the unicast keyword.
Examples
# Display dampened BGP IPv6 unicast routes.
<Sysname> display bgp routing-table dampened ipv6
Total number of routes: 1
BGP local router ID is 192.168.1.135
227
Status codes: * - valid, > - best, d - dampened, h - history,
s - suppressed, S - stale, i - internal, e - external
Origin: i - IGP, e - EGP, ? - incomplete
de Network : 2::
From
PrefixLen : 64
: 1::1
Reuse
: 00:39:49
Path/Ogn: 100i
Table 58 Command output
Field
Description
Status codes:
Status codes
•
•
•
•
•
•
•
•
* – valid—Valid route.
> – best—Best route.
d – damped—Dampened route.
h – history—History route.
s – suppressed—Suppressed route.
S – Stale—Stale route.
i – internal—Internal route.
e – external—External route.
Origin of the route:
• i – IGP—Originated in the AS. The origin of summary routes and routes
Origin
advertised with the network command is IGP.
• e – EGP—Learned through EGP.
• ?– incomplete—Unknown origin. The origin of routes redistributed from IGP
protocols is INCOMPLETE.
Network
Destination network address.
From
IP address from which the route was received.
Reuse
Reuse time of the route.
AS_PATH and ORIGIN attributes of the route:
Path/Ogn
• AS_PATH attribute—Records the ASs the route has passed to avoid routing
loops.
• ORIGIN attribute—Identifies the origin of the route.
Related commands
•
dampening
•
reset bgp dampening ipv6 unicast
display bgp routing-table flap-info ipv4 unicast
Use display bgp routing-table flap-info ipv4 unicast to display BGP IPv4 unicast route flap statistics.
Syntax
display bgp routing-table flap-info ipv4 [ unicast ] [ vpn-instance vpn-instance-name ] [ network-address
[ { mask | mask-length } [ longest-match ] ] | as-path-acl as-path-acl-number ]
Views
Any view
228
Predefined user roles
network-admin
network-operator
Parameters
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN by its name, a case-sensitive string of 1 to 31
characters. If no VPN is specified, the command displays BGP IPv4 unicast route flap statistics for the
public.
network-address: Specifies a destination network address.
mask: Specifies a network mask, in dotted decimal notation.
mask-length: Specifies a mask length in the range of 0 to 32.
longest-match: Displays the routing entries selected through the following steps:
1.
AND the specified network address with the specified mask.
2.
Display the route with the longest mask among the matching routes that have a mask shorter than
or equal to the specified mask.
as-path-acl as-path-acl-number: Specifies an AS path list by its number in the range of 1 to 256 to filter
BGP IPv4 unicast route flap statistics.
Usage guidelines
When you execute the display bgp routing-table flap-info ipv4 unicast command:
•
If the network-address, mask, and mask-length arguments are not specified, the command displays
flap statistics of all BGP IPv4 unicast routes for the public network or the specified VPN.
•
If only the network-address argument is specified, the system ANDs the network address with the
mask of a route. If the result matches the network address of the route, the command displays flap
statistics of the route.
•
If the network-address mask or network-address mask-length argument is specified, and the
longest-match keyword is not specified, the command displays flap statistics of the BGP IPv4
unicast route that matches both the specified destination network address and the mask (or mask
length).
The command with the unicast keyword has the same effect as that without the unicast keyword.
Examples
# Display BGP IPv4 unicast route flap statistics for the public network.
<Sysname> display bgp routing-table flap-info ipv4
Total number of routes: 1
BGP local router ID is 192.168.1.135
Status codes: * - valid, > - best, d - dampened, h - history,
s - suppressed, S - stale, i - internal, e - external
Origin: i - IGP, e - EGP, ? - incomplete
Network
de 20.1.1.0/24
229
From
Flaps
Duration
Reuse
Path/Ogn
10.1.1.2
1
00:02:36
00:53:58
100i
Table 59 Command output
Field
Description
Status codes:
Status codes
•
•
•
•
•
•
•
•
* – valid—Valid route.
> – best—Best route.
d – damped—Dampened route.
h – history—History route.
s – suppressed—Suppressed route.
S – Stale—Stale route.
i – internal—Internal route.
e – external—External route.
Origin of the route:
• i – IGP—Originated in the AS. The origin of summary routes and
Origin
routes advertised with the network command is IGP.
• e – EGP—Learned through EGP.
• ?– incomplete—Unknown origin. The origin of routes redistributed
from IGP protocols is INCOMPLETE.
Network
Destination network address.
From
Source IP address of the route.
Flaps
Number of routing flaps.
Duration
Duration time of the flap route.
Reuse
Reuse time of the route.
AS_PATH and ORIGIN attributes of the route:
Path/Ogn
• AS_PATH attribute—Records the ASs the route has passed to avoid
routing loops.
• ORIGIN attribute—Identifies the origin of the route.
Related commands
•
dampening
•
reset bgp flap-info ipv4 unicast
display bgp routing-table flap-info ipv6 unicast
Use display bgp routing-table flap-info ipv6 unicast to display BGP IPv6 unicast route flap statistics.
Syntax
display bgp routing-table flap-info ipv6 [ unicast ] [ vpn-instance vpn-instance-name ] [ network-address
[ network-address prefix-length | as-path-acl as-path-acl-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
230
Parameters
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN by its name, a case-sensitive string of 1 to 31
characters. If no VPN is specified, the command displays BGP IPv6 unicast route flap statistics for the
public network.
network-address prefix-length: Specifies the destination network address and prefix length. The value
range for the prefix-length argument is 0 to 128.
as-path-acl as-path-acl-number: Specifies an AS path list by its number in the range of 1 to 256 to filter
BGP IPv6 unicast route flap statistics.
Usage guidelines
The command with the unicast keyword has the same effect as that without the unicast keyword.
When you execute the display bgp routing-table flap-info ipv6 unicast command without specifying any
argument, the command displays flap statistics of all BGP IPv6 unicast routes for the public network.
Examples
# Display BGP IPv6 unicast route flap statistics for the public network.
<Sysname> display bgp routing-table flap-info ipv6
Total number of routes: 2
BGP local router ID is 192.168.1.135
Status codes: * - valid, > - best, d - dampened, h - history,
s - suppressed, S - stale, i - internal, e - external
Origin: i - IGP, e - EGP, ? - incomplete
de Network : 2::
From
PrefixLen : 64
: 1::1
Duration: 00:03:25
Flaps
: 5
Reuse
: 00:39:28
Path/Ogn: 100i
Table 60 Command output
Field
Description
Status codes:
Status codes
•
•
•
•
•
•
•
•
* – valid—Valid route.
> – best—Best route.
d – damped—Dampened route.
h – history—History route.
s – suppressed—Suppressed route.
S – Stale—Stale route.
i – internal—Internal route.
e – external—External route.
Origin of the route:
• i – IGP—Originated in the AS. The origin of summary routes and
Origin
routes advertised with the network command is IGP.
• e – EGP—Learned through EGP.
• ?– incomplete—Unknown origin. The origin of routes redistributed
from IGP protocols is INCOMPLETE.
231
Field
Description
Network
Destination network address.
PrefixLen
Prefix length of the destination network address.
From
Source IP address of the route.
Flaps
Number of routing flaps.
Duration
Duration time of the flap route.
Reuse
Reuse time of the route.
AS_PATH and ORIGIN attributes of the route:
Path/Ogn
• AS_PATH attribute—Records the ASs the route has passed to avoid
routing loops.
• ORIGIN attribute—Identifies the origin of the route.
Related commands
•
dampening
•
reset bgp flap-info ipv6 unicast
display bgp routing-table ipv4 unicast
Use display bgp routing-table ipv4 unicast to display BGP IPv4 unicast routing information.
Syntax
display bgp routing-table ipv4 [ unicast ] [ vpn-instance vpn-instance-name ] [ network-address [ { mask
| mask-length } [ longest-match ] ] ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN by its name, a case-sensitive string of 1 to 31
characters. If no VPN is specified, the command displays the BGP IPv4 unicast routing information for the
public network.
network-address: Specifies a destination network address.
mask: Specifies a network mask, in dotted decimal notation.
mask-length: Specifies a mask length in the range of 0 to 32.
longest-match: Displays the routing entries selected through the following steps:
1.
AND the specified network address with the specified mask.
2.
Display the route with the longest mask among the matching routes that have a mask shorter than
or equal to the specified mask.
232
Usage guidelines
•
If the network-address, mask, and mask-length arguments are not specified, the command displays
brief information about all BGP IPv4 unicast routes.
•
If only the network-address argument is specified, the system ANDs the network address with the
mask of a route. If the result matches the network address of the route, the command displays
detailed information about the route.
•
If the network-address mask or network-address mask-length argument is specified and the
longest-match keyword is not specified, the command displays detailed information about the BGP
IPv4 unicast route that matches both the specified destination network address and the mask (or
mask length).
The command with the unicast keyword has the same effect as that without the unicast keyword.
Examples
# Display brief information about all BGP IPv4 unicast routes for the public network.
<Sysname> display bgp routing-table ipv4
Total number of routes: 4
BGP local router ID is 192.168.100.1
Status codes: * - valid, > - best, d - damped, h - history,
s - suppressed, S - Stale, i - internal, e - external
Origin: i - IGP, e - EGP, ? - incomplete
>
Network
NextHop
MED
10.2.1.0/24
10.2.1.1
0
0
i
10.2.1.2
0
0
200i
192.168.1.135
0
0
i
10.2.1.2
0
0
200i
e
>
*
192.168.1.0
e
LocPrf
PrefVal Path/Ogn
Table 61 Command output
Field
Description
Status codes:
Status codes
•
•
•
•
•
•
•
•
* – valid—Valid route.
> – best—Best route.
d – damped—Dampened route.
h – history—History route.
s – suppressed—Suppressed route.
S – Stale—Stale route.
i – internal—Internal route.
e – external—External route.
Origin of the route:
• i – IGP—Originated in the AS. The origin of summary routes and routes
Origin
advertised with the network command is IGP.
• e – EGP—Learned through EGP.
• ?– incomplete—Unknown origin. The origin of routes redistributed from IGP
protocols is INCOMPLETE.
233
Field
Description
Network
Destination network address.
NextHop
Next hop IP address.
MED
MULTI_EXIT_DISC attribute.
LocPrf
Local preference value.
PrefVal
Preferred value of the route.
AS_PATH and ORIGIN attributes of the route:
• AS_PATH—Records the ASs the route has passed to avoid routing loops.
• ORIGIN—Identifies the origin of the route.
Path/Ogn
# Display detailed information about BGP IPv4 unicast routes destined to network 10.2.1.0/24 for the
public network.
<Sysname> display bgp routing-table ipv4 10.2.1.0 24
BGP local router ID: 192.168.100.1
Local AS number: 100
Paths:
2 available, 1 best
BGP routing table information of 10.2.1.0/24:
Imported route.
Original nexthop: 10.2.1.1
OutLabel
: NULL
AS-path
: (null)
Origin
: igp
Attribute value : MED 0, pref-val 0, pre 0
State
: valid, local, best,
From
: 10.2.1.2 (192.168.100.2)
Relay nexthop
: not resolved
Original nexthop: 10.2.1.2
OutLabel
: NULL
AS-path
: 200
Origin
: igp
Attribute value : MED 0, pref-val 0, pre 255
State
: external,
Table 62 Command output
Field
Description
Number of routes:
Paths
• available—Number of valid routes.
• best—Number of optimal routes.
Original nexthop
Original next hop of the route. If the route is received from a BGP update
message, the original next hop is the next hop IP address in the message.
OutLabel
Outgoing label of the route.
234
Field
Description
AS-path
AS_PATH attribute of the route, which records the ASs the route has
passed to avoid routing loops.
Origin of the route:
• igp—Originated in the AS. The origin of summary routes and routes
Origin
advertised with the network command is IGP.
• egp—Learned through EGP.
• incomplete—Unknown origin. The origin of routes redistributed from
IGP protocols is INCOMPLETE.
BGP path attributes:
Attribute value
•
•
•
•
MED—MED value.
localpref—Local preference value.
pref-val—Preferred value.
pre—Route preference.
Current state of the route:
State
•
•
•
•
•
•
valid.
internal.
external.
local.
synchronize.
best.
From
IP address of BGP peer that advertised the route.
Relay Nexthop
Next hop found by route recursion. If no next hop is found, this field
displays"not resolved."
display bgp routing-table ipv4 unicast advertise-info
Use display bgp routing-table ipv4 unicast advertise-info to display advertisement information for BGP
IPv4 unicast routes.
Syntax
display bgp routing-table ipv4 [ unicast ] [ vpn-instance vpn-instance-name ] network-address [ mask |
mask-length ] advertise-info
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN by its name, a case-sensitive string of 1 to 31
characters. If no VPN is specified, the command displays advertisement information of BGP IPv4 unicast
routes for the public network.
network-address: Specifies a destination network address.
235
mask: Specifies a network mask, in dotted decimal notation.
mask-length: Specifies a mask length in the range of 0 to 32.
Usage guidelines
•
If the mask and mask-length arguments are not specified, the system ANDs the specified network
address with the mask of a route. If the result matches the network address of the route, the
command displays advertisement information for the route.
•
If the mask or mask-length argument is specified, the command displays advertisement information
for the BGP IPv4 unicast route that matches both the specified destination network address and the
mask (or mask length).
The command with the unicast keyword has the same effect as that without the unicast keyword.
Examples
# Display advertisement information of BGP IPv4 unicast routes destined to network 10.2.1.0/24 for the
public network.
<Sysname> display bgp routing-table ipv4 10.2.1.0 24 advertise-info
BGP local router ID: 192.168.100.1
Local AS number: 100
Paths:
1 best
BGP routing table information of 10.2.1.0/24:
Advertised to peers (1 in total):
10.2.1.2
Table 63 Command output
Field
Description
Paths
Number of optimal routes destined to the specified network.
BGP routing table information of
10.2.1.0/24
Advertisement information of BGP routes destined to network
10.2.1.0/24.
Advertised to peers (1 in total)
Peers to which the route has been advertised and the number of peers.
display bgp routing-table ipv4 unicast as-path-acl
Use display bgp routing-table ipv4 unicast as-path-acl to display BGP IPv4 unicast routes permitted by
an AS path list.
Syntax
display bgp routing-table ipv4 [ unicast ] [ vpn-instance vpn-instance-name ] as-path-acl
as-path-acl-number
Views
Any view
Predefined user roles
network-admin
network-operator
236
Parameters
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN by its name, a case-sensitive string of 1 to 31
characters. If no VPN is specified, the command displays BGP IPv4 unicast routes permitted by an AS
path list for the public network.
as-path-acl-number: Specifies an AS path list by its number in the range of 1 to 256.
Usage guidelines
The command with the unicast keyword has the same effect as that without the unicast keyword.
Examples
# Display BGP routes permitted by AS path list 1.
<Sysname> display bgp routing-table ipv4 as-path-acl 1
Total number of routes: 1
BGP local router ID is 2.2.2.2
Status codes: * - valid, > - best, d - dampened, h - history,
s - suppressed, S - stale, i - internal, e - external
Origin: i - IGP, e - EGP, ? - incomplete
Network
NextHop
>e 30.1.1.0/24
20.1.1.1
MED
LocPrf
PrefVal Path/Ogn
0
200i
For command output, see Table 61.
Related commands
ip as-path
display bgp routing-table ipv4 unicast community-list
Use display bgp routing-table ipv4 unicast community-list to display BGP IPv4 unicast routing
information matching the specified BGP community list.
Syntax
display bgp routing-table ipv4 [ unicast ] [ vpn-instance vpn-instance-name ] community-list
{ { basic-community-list-number | comm-list-name } [ whole-match ] | adv-community-list-number }
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN by its name, a case-sensitive string of 1 to 31
characters. If no VPN is specified, the command displays BGP IPv4 unicast routing information matching
the specified BGP community list for the public network.
basic-community-list-number: Specifies a basic community list by its number in the range of 1 to 99.
237
comm-list-name: Specifies a community list by its name, a string of 1 to 63 characters.
whole-match: Displays routes exactly matching the specified community list. Without this keyword, the
command displays routes whose COMMUNITY attributes comprise the specified community list.
adv-community-list-number: Specifies an advanced community list by its number in the range of 100 to
199.
Usage guidelines
The command with the unicast keyword has the same effect as that without the unicast keyword.
Examples
# Display BGP routing information matching BGP community list 100.
<Sysname> display bgp routing-table ipv4 community-list 100
Total number of routes: 1
BGP local router ID is 2.2.2.2
Status codes: * - valid, > - best, d - dampened, h - history,
s - suppressed, S - stale, i - internal, e - external
Origin: i - IGP, e - EGP, ? - incomplete
Network
NextHop
>e 30.1.1.0/24
20.1.1.1
MED
LocPrf
PrefVal Path/Ogn
0
200i
For command output, see Table 61.
Related commands
ip community-list
display bgp routing-table ipv4 unicast peer
Use display bgp routing-table ipv4 unicast peer to display BGP IPv4 unicast routing information
advertised to or received from the specified BGP peer.
Syntax
display bgp routing-table ipv4 [ unicast ] [ vpn-instance vpn-instance-name ] peer ip-address
{ advertised-routes | received-routes } [ network-address [ mask | mask-length ] | statistics ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN by its name, a case-sensitive string of 1 to 31
characters. If no VPN is specified, the command displays BGP IPv4 unicast routing information
advertised to or received from the specified BGP peer for the public network.
ip-address: Specifies a peer by its IP address.
238
advertised-routes: Displays routing information advertised to the specified peer.
received-routes: Displays routing information received from the specified peer.
network-address: Specifies the IP address of the destination network.
mask: Specifies the mask of the destination network, in dotted decimal notation.
mask-length: Specifies a mask length in the range of 0 to 32.
statistics: Displays route statistics.
Usage guidelines
•
If the network-address, mask, and mask-length arguments are not specified, the command displays
all BGP IPv4 unicast routing information advertised to or received from the specified BGP peer.
•
If only the network-address argument is specified, the system ANDs the network address with the
mask of a route. If the result matches the network address of the route, the command displays
information about the route.
•
If the network-address mask or network-address mask-length argument is specified, the command
displays information about the route that matches both the specified destination network address
and the mask (or mask length).
The command with the unicast keyword has the same effect as that without the unicast keyword.
Examples
# Display all BGP IPv4 unicast routing information advertised to BGP peer 10.2.1.2 for the public
network.
<Sysname> display bgp routing-table ipv4 peer 10.2.1.2 advertised-routes
Total number of routes: 2
BGP local router ID is 192.168.100.1
Status codes: * - valid, > - best, d - damped, h - history,
s - suppressed, S - Stale, i - internal, e - external
Origin: i - IGP, e - EGP, ? - incomplete
Network
NextHop
MED
LocPrf
PrefVal Path/Ogn
>
10.2.1.0/24
10.2.1.1
0
0
i
>
192.168.1.0
192.168.1.135
0
0
i
# Display all BGP IPv4 unicast routing information received from BGP peer 10.2.1.2 for the public
network.
<Sysname> display bgp routing-table ipv4 peer 10.2.1.2 received-routes
Total number of routes: 2
BGP local router ID is 192.168.100.1
Status codes: * - valid, > - best, d - damped, h - history,
s - suppressed, S - Stale, i - internal, e - external
Origin: i - IGP, e - EGP, ? - incomplete
Network
239
NextHop
MED
LocPrf
PrefVal Path/Ogn
*
e 10.2.1.0/24
10.2.1.2
0
0
200i
e 192.168.1.0
10.2.1.2
0
0
200i
For command output, see Table 61.
# Display statistics of BGP IPv4 unicast routes advertised to BGP peer 10.2.1.2 for the public network.
<Sysname> display bgp routing-table ipv4 peer 10.2.1.2 advertised-routes statistics
Advertised routes total: 2
# Display statistics of BGP IPv4 unicast routes received from BGP peer 10.2.1.2 for the public network.
<Sysname> display bgp routing-table ipv4 peer 10.2.1.2 received-routes statistics
Received routes total: 2
Table 64 Command output
Field
Description
Advertised routes total
Total number of routes advertised to the specified peer.
Received routes total
Total number of routes received from the specified peer.
display bgp routing-table ipv4 unicast statistics
Use display bgp routing-table ipv4 unicast statistics to display BGP IPv4 unicast route statistics.
Syntax
display bgp routing-table ipv4 [ unicast ] [ vpn-instance vpn-instance-name ] statistics
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN by its name, a case-sensitive string of 1 to 31
characters. If no VPN is specified, the command displays the BGP IPv4 unicast route statistics for the
public network.
Usage guidelines
The command with the unicast keyword has the same effect as that without the unicast keyword.
Examples
# Display statistics of BGP IPv4 unicast routes for the public network.
<Sysname> display bgp routing-table ipv4 statistics
Total number of routes: 4
240
display bgp routing-table ipv6 unicast
Use display bgp routing-table ipv6 unicast to display BGP IPv6 unicast routing information.
Syntax
display bgp routing-table ipv6 [ unicast ] [ vpn-instance vpn-instance-name ] [ network-address
prefix-length | advertise-info ] ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN by its name, a case-sensitive string of 1 to 31
characters. If no VPN is specified, the command displays the BGP IPv6 unicast routing information for the
public network.
network-address prefix-length: Specifies the destination network address and prefix length. The value
range for the prefix-length argument is 0 to 128. If this argument is not specified, the command displays
brief information about all BGP IPv6 unicast routing information.
advertise-info: Displays advertisement information for BGP IPv6 unicast routes. If this keyword is not
specified, the command displays the BGP IPv6 unicast routing table.
Usage guidelines
The command with the unicast keyword has the same effect as that without the unicast keyword.
Examples
# Display brief information about all BGP IPv6 unicast routes for the public network.
<Sysname> display bgp routing-table ipv6
Total number of routes: 1
BGP local router ID is 192.168.1.136
Status codes: * - valid, > - best, d - dampened, h - history,
s - suppressed, S - stale, i - internal, e - external
Origin: i - IGP, e - EGP, ? - incomplete
>e Network : 3::
NextHop : 1::2
LocPrf
:
PrefVal : 0
OutLabel
: NULL
MED
:
Path/Ogn: 100i
241
PrefixLen : 64
Table 65 Command output
Field
Description
Status codes:
•
•
•
•
•
•
•
•
Status codes
* – valid—Valid route.
> – best—Best route.
d – damped—Dampened route.
h – history—History route.
s – suppressed—Suppressed route.
S – Stale—Stale route.
i – internal—Internal route.
e – external—External route.
Origin of the route:
• i – IGP—Originated in the AS. The origin of summary routes and routes
advertised with the network command is IGP.
Origin
• e – EGP—Learned through EGP.
• ?– incomplete—Unknown origin. The origin of routes redistributed from IGP
protocols is INCOMPLETE.
Network
Destination network address.
PrefixLen
Prefix length of the destination network address.
NextHop
Next hop IPv6 address.
LocPrf
Local preference value.
PrefVal
Preferred value of the route.
OutLabel
Outgoing label of the route.
MED
MULTI_EXIT_DISC attribute.
AS_PATH and ORIGIN attributes of the route:
• AS_PATH attribute—Records the ASs the route has passed to avoid routing
Path/Ogn
loops.
• ORIGIN attribute—Identifies the origin of the route.
# Display detailed information about BGP IPv6 unicast routes destined to network 2::/64 for the public
network.
<Sysname> display bgp routing-table ipv6 2:: 64
BGP local router ID: 192.168.1.135
Local AS number: 200
Paths:
1 available, 1 best
From
: 1::1 (192.168.1.136)
Relay nexthop
: 1::1
Original nexthop: 1::1
OutLabel
: NULL
AS-path
: 100
Origin
: igp
242
Attribute value : MED 0, pref-val 0
State
: valid, external, best,
Table 66 Command output
Field
Description
Number of routes:
• available—Number of valid routes.
• best—Number of optimal routes.
Paths
Original nexthop
Original next hop of the route. If the route is received from a BGP update
message, the original next hop is the next hop IP address in the message.
OutLabel
Outgoing label of the route.
AS-path
AS_PATH attribute of the route, which records the ASs the route has
passed to avoid routing loops.
Origin of the route:
• igp—Originated in the AS. The origin of summary routes and routes
advertised with the network command is IGP.
Origin
• egp—Learned through EGP.
• incomplete—Unknown origin. The origin of routes redistributed from
IGP protocols is INCOMPLETE.
BGP path attributes:
Attribute value
•
•
•
•
MED—MED value.
localpref—Local preference value.
pref-val—Preferred value.
pre—Route preference.
Current state of the route:
•
•
•
•
•
State
valid.
internal.
external.
local.
best.
From
IP address of BGP peer that advertised the route.
Relay Nexthop
Next hop found by route recursion. If no next hop is found, this field
displays"not resolved."
# Display advertisement information about BGP IPv6 unicast routes destined to network 2::/64 for the
public network.
<Sysname> display bgp routing-table ipv6 2:: 64 advertise-info
BGP local router ID: 192.168.1.136
Local AS number: 100
Paths:
1 best
BGP routing table information of 2::/64:
Advertised to peers (1 in total):
1::2
243
Table 67 Command output
Field
Description
Paths
Number of optimal routes destined to the specified network.
BGP routing table information of
2::/64
Advertisement information of BGP routes destined to network 2::/64.
Advertised to peers (2 in total)
Peers to which the route has been advertised, and the number of peers.
display bgp routing-table ipv6 unicast as-path-acl
Use display bgp routing-table ipv6 unicast as-path-acl to display BGP IPv6 unicast routes permitted by
an AS path list.
Syntax
display bgp routing-table ipv6 [ unicast ] [ vpn-instance vpn-instance-name ] as-path-acl
as-path-acl-number
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN by its name, a case-sensitive string of 1 to 31
characters. If no VPN is specified, the command displays BGP IPv6 unicast routes permitted by an AS
path list for the public network.
as-path-acl-number: Specifies an AS path list by its number in the range of 1 to 256.
Usage guidelines
The command with the unicast keyword has the same effect as that without the unicast keyword.
Examples
# Display BGP IPv6 unicast routes permitted by AS path list 1.
<Sysname> display bgp routing-table ipv6 as-path-acl 1
Total number of routes: 2
BGP local router ID is 192.168.1.136
Status codes: * - valid, > - best, d - dampened, h - history,
s - suppressed, S - stale, i - internal, e - external
Origin: i - IGP, e - EGP, ? - incomplete
>e Network : 2::
LocPrf
:
PrefVal : 0
OutLabel
: NULL
MED
:
Path/Ogn: 100i
244
PrefixLen : 64
NextHop : 1::2
>e Network : 3::
PrefixLen : 64
NextHop : 1::2
LocPrf
:
PrefVal : 0
OutLabel
: NULL
MED
:
Path/Ogn: 100i
For command output, see Table 65.
Related commands
ip as-path
display bgp routing-table ipv6 unicast community-list
Use display bgp routing-table ipv6 unicast community-list to display BGP IPv6 unicast routing
information matching a specified BGP community list.
Syntax
display bgp routing-table ipv6 [ unicast ] [ vpn-instance vpn-instance-name ] community-list
{ { basic-community-list-number | comm-list-name } [ whole-match ] | adv-community-list-number }
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN by its name, a case-sensitive string of 1 to 31
characters. If no VPN is specified, the command displays BGP IPv6 unicast routing information matching
the specified BGP community list for the public network.
basic-community-list-number: Specifies a basic community list by its number in the range of 1 to 99.
comm-list-name: Specifies a community list by its name, a case-sensitive string of 1 to 63 characters.
whole-match: Displays routes exactly matching the specified community list. Without this keyword, this
command displays routes whose COMMUNITY attributes comprise the specified community list.
adv-community-list-number: Specifies an advanced community list by its number in the range of 100 to
199.
Usage guidelines
The command with the unicast keyword has the same effect as that without the unicast keyword.
Examples
# Display BGP IPv6 unicast routing information matching BGP community list 100.
<Sysname> display bgp routing-table ipv6 community-list 100
Total number of routes: 2
BGP local router ID is 192.168.1.136
Status codes: * - valid, > - best, d - dampened, h - history,
245
s - suppressed, S - stale, i - internal, e - external
Origin: i - IGP, e - EGP, ? - incomplete
>e Network : 2::
PrefixLen : 64
NextHop : 1::2
LocPrf
:
PrefVal : 0
OutLabel
: NULL
MED
:
Path/Ogn: 100i
>e Network : 3::
PrefixLen : 64
NextHop : 1::2
LocPrf
:
PrefVal : 0
OutLabel
: NULL
MED
:
Path/Ogn: 100i
For command output, see Table 65.
Related commands
ip community-list
display bgp routing-table ipv6 unicast peer
Use display bgp routing-table ipv6 unicast peer to display BGP IPv6 unicast routing information
advertised to or received from the specified BGP peer.
Syntax
display bgp routing-table ipv6 [ unicast ] peer ipv6-address { advertised-routes | received-routes }
[ network-address prefix-length | statistics ]
display bgp routing-table ipv6 [ unicast ] vpn-instance vpn-instance-name peer ipv6-address
{ advertised-routes | received-routes } [ network-address prefix-length | statistics ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
ipv6-address: Specifies the IPv6 address of a peer.
advertised-routes: Displays routing information advertised to the specified peer.
received-routes: Displays routing information received from the specified peer.
network-address prefix-length: Specifies the destination network address and prefix length. The value
range for the prefix-length argument is 0 to 128. If this argument is not specified, the command displays
all BGP IPv6 unicast routing information.
statistics: Displays route statistics.
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN by its name, a case-sensitive string of 1 to 31
characters. If no VPN is specified, the command displays the BGP IPv6 unicast routing information for the
public network.
246
Usage guidelines
The command with the unicast keyword has the same effect as that without the unicast keyword.
Examples
# Display all BGP IPv6 unicast routing information advertised to BGP peer 1::1.
<Sysname> display bgp routing-table ipv6 peer 1::1 advertised-routes
Total number of routes: 1
BGP local router ID is 192.168.1.136
Status codes: * - valid, > - best, d - dampened, h - history,
s - suppressed, S - stale, i - internal, e - external
Origin: i - IGP, e - EGP, ? - incomplete
>
Network : 2::
PrefixLen : 64
NextHop : ::
LocPrf
:
MED
OutLabel
: NULL
: 0
Path/Ogn: i
# Display all BGP IPv6 unicast routing information received from BGP peer 1::1.
<Sysname> display bgp routing-table ipv6 peer 1::1 received-routes
Total number of routes: 1
BGP local router ID is 192.168.1.135
Status codes: * - valid, > - best, d - dampened, h - history,
s - suppressed, S - stale, i - internal, e - external
Origin: i - IGP, e - EGP, ? - incomplete
>e Network : 2::
PrefixLen : 64
NextHop : ::FFFF:10.1.1.1
LocPrf
:
PrefVal : 0
OutLabel
: NULL
MED
: 0
Path/Ogn: 100i
For command output, see Table 65.
# Display statistics of BGP IPv6 unicast routes advertised to BGP peer 1::1.
<Sysname> display bgp routing-table ipv6 peer 1::1 advertised-routes statistics
Advertised routes total: 1
# Display statistics of BGP IPv6 unicast routes received from BGP peer 1::1.
<Sysname> display bgp routing-table ipv6 peer 1::1 received-routes statistics
Received routes total: 1
Table 68 Command output
Field
Description
Advertised routes total
Total number of routes advertised to the specified peer.
247
Field
Description
Received routes total
Total number of routes received from the specified peer.
display bgp routing-table ipv6 unicast statistics
Use display bgp routing-table ipv6 unicast statistics to display BGP IPv6 unicast route statistics.
Syntax
display bgp routing-table ipv6 [ unicast ] [ vpn-instance vpn-instance-name ] statistics
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN by its name, a case-sensitive string of 1 to 31
characters. If no VPN is specified, the command displays the BGP IPv6 unicast route statistics for the
public network.
Usage guidelines
The command with the unicast keyword has the same effect as that without the unicast keyword.
Examples
# Display statistics of BGP IPv6 unicast routes.
<Sysname> display bgp routing-table ipv6 statistics
Total number of routes: 4
ebgp-interface-sensitive
Use ebgp-interface-sensitive to enable quick reestablishment of direct EBGP sessions.
Use undo ebgp-interface-sensitive to disable the function.
Syntax
ebgp-interface-sensitive
undo ebgp-interface-sensitive
Default
Quick reestablishment of direct EBGP sessions is enabled.
Views
BGP view
Predefined user roles
network-admin
248
Usage guidelines
This command enables BGP to quickly handle direct EBGP link failures. When a direct link to an EBGP
peer fails, BGP tears down the session and reestablishes a session to the peer immediately. If the function
is not enabled, the router does not tear down the session until the holdtime expires. However, disabling
this function can prevent routing flaps from affecting EBGP session state.
This command applies to only direct EBGP sessions.
Examples
# Enable quick reestablishment of direct EBGP sessions.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ebgp-interface-sensitive
filter-policy export
Use filter-policy export to filter outbound routes by using a specified filter.
Use undo filter-policy export to cancel filtering of outbound routes.
Syntax
In BGP IPv4 unicast instance view/BGP-VPN IPv4 unicast instance view:
filter-policy { acl-number | prefix-list prefix-list-name } export [ protocol process-id ]
undo filter-policy { acl-number | prefix-list prefix-list-name } export [ protocol process-id ]
In BGP IPv6 unicast instance view/BGP-VPN IPv6 unicast instance view:
filter-policy { acl6-number | prefix-list ipv6-prefix-name } export [ protocol process-id ]
undo filter-policy { acl6-number | prefix-list ipv6-prefix-name } export [ protocol process-id ]
Default
No outbound routing information is filtered.
Views
BGP IPv4 unicast instance view, BGP-VPN IPv4 unicast instance view, BGP IPv6 unicast instance view,
BGP-VPN IPv6 unicast instance view
Predefined user roles
network-admin
Parameters
acl-number: Specifies an ACL by its number in the range of 2000 to 3999 to match routes by destination.
acl6-number: Specifies an ACL6 by its number in the range of 2000 to 3999 to match routes by
destination.
prefix-list prefix-list-name: Specifies an IPv4 prefix list by its name, a case-sensitive string of 1 to 63
characters, to match routes by destination.
prefix-list ipv6-prefix-name: Specifies an IPv6 prefix list by its name, a case-sensitive string of 1 to 63
characters, to match routes by destination.
protocol: Filters routes redistributed from the routing protocol. In BGP IPv4 unicast instance
view/BGP-VPN IPv4 unicast instance view, it can be direct, isis, ospf, rip, or static. In BGP IPv6 unicast
instance view/BGP-VPN IPv6 unicast instance view, it can be direct, isisv6, ospfv3, ripng, or static.
249
process-id: Specifies a routing protocol by its ID in the range of 1 to 65535. In BGP IPv4 unicast instance
view/BGP-VPN IPv4 unicast instance view, it is available only when the protocol is isis, ospf, or rip. In
BGP IPv6 unicast instance view/BGP-VPN IPv6 unicast instance view, it is available only when the
protocol is isisv6, ospfv3, or ripng.
Usage guidelines
If a protocol is specified, this command filters only routes redistributed from the specified protocol. If no
protocol is specified, this command filters all redistributed routes, including routes redistributed from IGP
and injected by the network command.
If you use a basic ACL (with a number from 2000 to 2999) configured with the rule [ rule-id ] { deny |
permit } source source-address source-wildcard command, the command matches routes whose
destination addresses match the source-address source-wildcard argument without matching the masks
of the destination addresses.
To use an advanced ACL (with a number from 3000 to 3999) in the command, configure the ACL using
one of the following steps:
•
To deny/permit a route with the specified destination, use the rule [ rule-id ] { deny | permit } ip
source sour-addr sour-wildcard command.
•
To deny/permit a route with the specified destination and mask, use the rule [ rule-id ] { deny |
permit } ip source sour-addr sour-wildcard destination dest-addr dest-wildcard command to
deny/permit a route with the specified destination and mask.
The source keyword specifies the destination address of a route and the destination keyword specifies the
subnet mask of the destination. The subnet mask must be contiguous. Otherwise, the configuration does
not take effect.
Examples
# In BGP IPv4 unicast instance view, use ACL 2000 to filter outbound BGP routes.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family unicast
[Sysname-bgp-ipv4] filter-policy 2000 export
# In BGP-VPN IPv6 unicast instance view, use ACL6 2000 to filter outbound BGP routes.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] ipv6-family unicast
[Sysname-bgp-ipv6-vpn1] filter-policy 2000 export
# Configure ACL 3000 to permit only route 113.0.0.0/16 to pass, and use ACL 3000 to filter outbound
routes.
<Sysname> system-view
[Sysname] acl number 3000
[Sysname-acl-adv-3000] rule 10 permit ip source 113.0.0.0 0 destination 255.255.0.0 0
[Sysname-acl-adv-3000] rule 100 deny ip
[Sysname-acl-adv-3000] quit
[Sysname] bgp 100
[Sysname-bgp] ipv4-family unicast
[Sysname-bgp-ipv4] filter-policy 3000 export
250
Related commands
•
filter-policy import
•
peer as-path-acl
•
peer filter-policy
•
peer prefix-list
•
peer route-policy
filter-policy import
Use filter-policy import to filter inbound routing information by using a specified filter.
Use undo filter-policy import to cancel filtering inbound routing information.
Syntax
In BGP IPv4 unicast instance view/BGP-VPN IPv4 unicast instance view:
filter-policy { acl-number | prefix-list prefix-list-name } import
undo filter-policy { acl-number | prefix-list prefix-list-name } import
In BGP IPv6 unicast instance view/BGP-VPN IPv6 unicast instance view:
filter-policy { acl6-number | prefix-list ipv6-prefix-name } import
undo filter-policy { acl6-number | prefix-list ipv6-prefix-name } import
Default
No inbound routing information is filtered.
Views
BGP IPv4 unicast instance view, BGP-VPN IPv4 unicast instance view, BGP IPv6 unicast instance view,
BGP-VPN IPv6 unicast instance view
Predefined user roles
network-admin
Parameters
acl-number: Specifies an ACL by its number in the range of 2000 to 3999 to match routes by destination.
acl6-number: Specifies an ACL6 by its number in the range of 2000 to 3999 to match routes by
destination.
prefix-list prefix-list-name: Specifies an IPv4 prefix list by its name, a case-sensitive string of 1 to 63
characters, to match routes by destination.
prefix-list ipv6-prefix-name: Specifies an IPv6 prefix list by its name, a case-sensitive string of 1 to 63
characters, to match routes by destination.
Usage guidelines
If you use a basic ACL (with a number from 2000 to 2999) configured with the rule [ rule-id ] { deny |
permit } source source-address source-wildcard command, the command matches routes whose
destination network addresses match the source-address source-wildcard argument without matching
the masks of the destination addresses.
To use an advanced ACL (with a number from 3000 to 3999) in the command, configure the ACL using
one of the following steps:
251
•
To deny/permit a route with the specified destination, use the rule [ rule-id ] { deny | permit } ip
source sour-addr sour-wildcard command.
•
To deny/permit a route with the specified destination and mask, use the rule [ rule-id ] { deny |
permit } ip source sour-addr sour-wildcard destination dest-addr dest-wildcard command.
The source keyword specifies the destination address of a route and the destination keyword specifies the
subnet mask of the destination. The subnet mask must be contiguous. Otherwise, the configuration does
not take effect.
Examples
# In BGP IPv4 unicast instance view, use ACL 2000 to filter inbound BGP routes.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family unicast
[Sysname-bgp-ipv4] filter-policy 2000 import
# In BGP-VPN IPv6 unicast instance view, use ACL6 2000 to filter inbound BGP routes.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] ipv6-family unicast
[Sysname-bgp-ipv6-vpn1] filter-policy 2000 import
# Configure ACL6 3000 to permit only route 113.0.0.0/16 to pass, and use ACL 3000 to filter inbound
routes.
<Sysname> system-view
[Sysname] acl number 3000
[Sysname-acl-adv-3000] rule 10 permit ip source 113.0.0.0 0 destination 255.255.0.0 0
[Sysname-acl-adv-3000] rule 100 deny ip
[Sysname-acl-adv-3000] quit
[Sysname] bgp 100
[Sysname-bgp] ipv4-family unicast
[Sysname-bgp-ipv4] filter-policy 3000 import
Related commands
•
filter-policy export
•
peer as-path-acl
•
peer filter-policy
•
peer prefix-list
•
peer route-policy
graceful-restart
Use graceful-restart to enable BGP Graceful Restart capability.
Use undo graceful-restart to disable BGP Graceful Restart capability.
Syntax
graceful-restart
undo graceful-restart
252
Default
BGP Graceful Restart capability is disabled.
Views
BGP view
Predefined user roles
network-admin
Usage guidelines
Graceful Restart (GR) ensures continuous forwarding when BGP restarts or an active/standby switchover
occurs.
BGP peers exchange Open messages containing GR information. If both parties have GR capability,
they establish a GR-capable session.
After you execute this command, the device reestablishes BGP sessions.
Examples
# Enable Graceful Restart capability for BGP process 100.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] graceful-restart
Related commands
•
graceful-restart timer restart
•
graceful-restart timer wait-for-rib
graceful-restart timer restart
Use graceful-restart timer restart to configure the GR timer.
Use undo graceful-restart timer restart to restore the default.
Syntax
graceful-restart timer restart timer
undo graceful-restart timer restart
Default
The GR timer is 150 seconds.
Views
BGP view
Predefined user roles
network-admin
Parameters
timer: Specifies the GR time in the range of 3 to 600 seconds.
Usage guidelines
The GR Restarter sends the GR timer to the GR Helper in an Open message. When the GR Helper detects
that an active/standby switchover or a BGP restart occurs on the GR Restarter, the GR Helper marks all
253
routes learned from the GR Restarter as stale and starts the GR timer. If no BGP session is established
before the GR timer expires, the GR Helper removes the stale routes.
Before you configure this command, enable the BGP GR capability.
To apply a new GR timer, you must reestablish BGP sessions.
Examples
# Configure the GR timer as 300 seconds.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] graceful-restart
[Sysname-bgp] graceful-restart timer restart 300
Related commands
•
graceful-restart
•
graceful-restart timer wait-for-rib
graceful-restart timer wait-for-rib
Use graceful-restart timer wait-for-rib to configure the time to wait for the End-of-RIB marker.
Use undo graceful-restart timer wait-for-rib to restore the default.
Syntax
graceful-restart timer wait-for-rib timer
undo graceful-restart timer wait-for-rib
Default
The time to wait for the End-of-RIB marker is 180 seconds.
Views
BGP view
Predefined user roles
network-admin
Parameters
timer: Specifies the time to wait for the End-of-RIB marker, in the range of 3 to 300 seconds.
Usage guidelines
BGP uses this timer to control the time to receive updates from the peer. The timer is not advertised to the
peer.
After the GR Restarter and GR Helper reestablish a BGP session, they start this timer. If they do not
complete route exchange before the timer expires, the GR Restarter does not receive new routes but
updates its routing table and forwarding table with learned BGP routes, and the GR Helper removes the
stale routes.
This command controls the routing convergence speed. A smaller timer value means faster routing
convergence but possibly results in incomplete routing information.
Before configuring this command, you must enable the BGP GR capability.
254
Examples
# Set the time to wait for the End-of-RIB marker on the local end to 100 seconds.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] graceful-restart
[Sysname-bgp] graceful-restart timer wait-for-rib 100
Related commands
•
graceful-restart
•
graceful-restart timer restart
group
Use group to create a peer group.
Use undo group to delete a peer group.
Syntax
group group-name [ external | internal ]
undo group group-name
Default
No peer group is created.
Views
BGP view, BGP-VPN view
Predefined user roles
network-admin
Parameters
group-name: Specifies a name for the peer group, a case-sensitive string of 1 to 47 characters.
external: Creates an EBGP peer group.
internal: Creates an IBGP peer group.
Usage guidelines
In a large-scale network, many peers can use the same route selection policy. You can configure a peer
group and add these peers into this group. In this way, peers can share the same policy as the peer
group. When the policy of the group is modified, the modification also applies to peers in it.
If the internal or external keyword is not specified, the command creates an IBGP peer group.
If you perform configurations on a peer group and peers of the peer group, the last configuration takes
effect.
After you create a peer group, you must use the peer enable command to enable BGP to exchange
routing information with the specified peer group.
Examples
# In BGP view, create an EBGP peer group test with AS number 200, and add EBGP peers 10.1.1.1 and
10.1.2.1 into the group.
<Sysname> system-view
255
[Sysname] bgp 100
[Sysname-bgp] group test external
[Sysname-bgp] peer test as-number 200
[Sysname-bgp] peer 10.1.1.1 group test
[Sysname-bgp] peer 10.1.2.1 group test
# In BGP-VPN view, create an EBGP peer group test with AS number 200, and add EBGP peers 10.1.1.1
and 10.1.2.1 into the group.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] group test external
[Sysname-bgp-vpn1] peer test as-number 200
[Sysname-bgp-vpn1] peer 10.1.1.1 group test
[Sysname-bgp-vpn1] peer 10.1.2.1 group test
# In BGP view, create an EBGP peer group test with AS number 200, and add EBGP peers 1::1 and 1::2
into the group.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] group test external
[Sysname-bgp] peer test as-number 200
[Sysname-bgp] peer 1::1 group test
[Sysname-bgp] peer 1::2 group test
# In BGP-VPN view, create an EBGP peer group test with AS number 200, and add EBGP peers 1::1 and
1::2 into the group.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] group test external
[Sysname-bgp-vpn1] peer test as-number 200
[Sysname-bgp-vpn1] peer 1::1 group test
[Sysname-bgp-vpn1] peer 1::2 group test
Related commands
•
display bgp group ipv4 unicast
•
display bgp group ipv6 unicast
•
peer enable
•
peer group
ignore-first-as
Use ignore-first-as to configure BGP to ignore the first AS number of EBGP route updates.
Use undo ignore-first-as to restore the default.
Syntax
ignore-first-as
undo ignore-first-as
256
Default
BGP checks the first AS number of a received EBGP route update. If the first AS number is not that of the
BGP peer, the BGP router discards the route update.
Views
BGP view
Predefined user roles
network-admin
Examples
# Configure BGP to ignore the first AS number of EBGP route updates.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ignore-first-as
import-route
Use import-route to enable BGP to redistribute routes from an IGP protocol.
Use undo import-route to disable route redistribution from an IGP protocol.
Syntax
In BGP IPv4 unicast instance view/BGP-VPN IPv4 unicast instance view:
import-route protocol [ { process-id | all-processes } [ med med-value | route-policy route-policy-name ]
*]
undo import-route protocol [ process-id | all-processes ]
In BGP IPv6 unicast instance view/BGP-VPN IPv6 unicast instance view:
import-route protocol [ process-id [ med med-value | route-policy route-policy-name ] * ]
undo import-route protocol [ process-id ]
Default
BGP does not redistribute IGP routes.
Views
BGP IPv4 unicast instance view, BGP-VPN IPv4 unicast instance view, BGP IPv6 unicast instance view,
BGP-VPN IPv6 unicast instance view
Predefined user roles
network-admin
Parameters
protocol: Redistributes routes from a specified IGP protocol. In BGP IPv4 unicast instance view/BGP-VPN
IPv4 unicast instance view, it can be direct, isis, ospf, rip, or static. In BGP IPv6 unicast instance
view/BGP-VPN IPv6 unicast instance view, it can be direct, isisv6, ospfv3, ripng, or static.
process-id: Specifies a process by its ID in the range of 1 to 65535. The default is 1. In BGP IPv4 unicast
instance view/BGP-VPN IPv4 unicast instance view, it is available only when the protocol is isis, ospf, or
rip. In BGP IPv6 unicast instance view/BGP-VPN IPv6 unicast instance view, it is available only when the
protocol is isisv6, ospfv3, or ripng.
257
all-processes: Redistributes routes from all the processes of the specified IGP protocol. This keyword takes
effect only when the protocol is isis, ospf, or rip.
med med-value: Specifies a MED value for redistributed routes, in the range of 0 to 4294967295. If no
MED is specified, the metric of a redistributed route is used as its MED.
route-policy route-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to 63
characters, to filter redistributed routes or set route attributes for redistributed routes.
Usage guidelines
The import-route command cannot redistribute default IGP routes. To redistribute default IGP routes, use
the default-route imported command together with the import-route command.
Only active routes can be redistributed. You can use the display ip routing-table protocol or display ipv6
routing-table protocol command to view route state information.
The ORIGIN attribute of routes redistributed by the import-route command is INCOMPLETE.
Examples
# In BGP IPv4 unicast instance view, redistribute routes from RIP process 1, and set the MED value for
redistributed routes to 100.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family unicast
[Sysname-bgp-ipv4] import-route rip 1 med 100
# In BGP-VPN IPv4 unicast instance view, redistribute routes from RIP process 1, and reference a routing
policy imprt to exclude route 1.1.1.0/24 from route redistribution.
<Sysname> system-view
[Sysname] ip prefix-list imprt deny 1.1.1.0 24
[Sysname] ip prefix-list imprt permit 0.0.0.0 0 less-equal 32
[Sysname] route-policy imprt permit node 0
[Sysname-route-policy-imprt-0] if-match ip address prefix-list imprt
[Sysname-route-policy-imprt-0] quit
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] ipv4-family unicast
[Sysname-bgp-ipv4-vpn1] import-route rip 1 route-policy imprt
# In BGP IPv6 unicast instance view, redistribute routes from RIP process 1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv6-family unicast
[Sysname-bgp-ipv6] import-route ripng
# In BGP-VPN IPv6 unicast instance view, redistribute routes from RIP process 1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] ipv6-family unicast
[Sysname-bgp-ipv6-vpn1] import-route ripng
Related commands
•
258
display ip routing-table protocol
•
display ipv6 routing-table protocol
ip vpn-instance (BGP view)
Use ip vpn-instance to enter BGP-VPN view.
Use undo ip vpn-instance to remove all configurations in BGP-VPN view.
Syntax
ip vpn-instance vpn-instance-name
undo ip vpn-instance vpn-instance-name
Views
BGP view
Predefined user roles
network-admin
Parameters
vpn-instance-name: Specifies a VPN instance by its name, a case-sensitive string of 1 to 31 characters.
Usage guidelines
After you create a BGP peer in BGP-VPN view, the BGP routes learned from the peer are added into the
routing table of the specified VPN instance.
This command and all commands in BGP-VPN view are usually executed on provider edge (PE) or
Multi-VPN-Instance CE (MCE) devices to add routes learned from different sites into different VPN
instances.
Before you execute this command, use the ip vpn-instance command to create the VPN instance in
system view, and use the route-distinguisher command to configure a route distinguisher (RD) for the
VPN instance.
Examples
# Enter BGP-VPN view of VPN instance vpn1.
<Sysname> system-view
[Sysname] ip vpn-instance vpn1
[Sysname-vpn-instance-vpn1] route-distinguisher 100:1
[Sysname-vpn-instance-vpn1] quit
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1]
Related commands
•
ip vpn-instance (system-view) (MPLS Command reference)
•
route-distinguisher (MPLS Command reference)
ipv4-family
Use ipv4-family to create and enter BGP IPv4 unicast instance view or BGP-VPN IPv4 unicast instance
view.
259
Use undo ipv4-family to remove all configurations in BGP IPv4 unicast instance view or BGP-VPN IPv4
unicast instance view.
Syntax
ipv4-family [ unicast ]
undo ipv4-family [ unicast ]
Default
The BGP IPv4 unicast instance view or the BGP-VPN IPv4 unicast instance view is not created.
Views
BGP view, BGP-VPN view
Predefined user roles
network-admin
Parameters
unicast: Specifies the IPv4 unicast instance view. The IPv4 unicast instance view is specified for the
command regardless of whether the unicast keyword is specified.
Usage guidelines
Configurations made in BGP IPv4 unicast instance view apply to only the BGP IPv4 unicast routes of the
public network.
Configurations made in BGP-VPN IPv4 unicast instance view apply to only the BGP IPv4 unicast routes of
the specified VPN instance.
Examples
# In BGP view, create and enter BGP IPv4 unicast instance view.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family unicast
[Sysname-bgp-ipv4]
# In BGP-VPN view, create and enter BGP-VPN IPv4 unicast instance view.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] ipv4-family unicast
[Sysname-bgp-ipv4-vpn1]
ipv6-family
Use ipv6-family to create and enter BGP IPv6 unicast instance view or BGP-VPN IPv6 unicast instance
view.
Use undo ipv6-family to remove all configurations in BGP IPv6 unicast instance view or BGP-VPN IPv6
unicast instance view.
Syntax
ipv6-family [ unicast ]
undo ipv6-family [ unicast ]
260
Default
The BGP IPv6 unicast instance view or BGP-VPN IPv6 unicast instance view is not created.
Views
BGP view, BGP-VPN view
Predefined user roles
network-admin
Parameters
unicast: Specifies the IPv6 unicast instance view. The IPv6 unicast instance view is specified for the
command regardless of whether the unicast keyword is specified.
Usage guidelines
Configurations made in BGP IPv6 unicast instance view apply to only the BGP IPv6 unicast routes of the
public network.
Configurations made in BGP-VPN IPv6 unicast instance view apply to only the BGP IPv6 unicast routes of
the specified VPN instance.
Examples
# In BGP view, create and enter BGP IPv6 unicast instance view.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv6-family unicast
[Sysname-bgp-ipv6]
# In BGP-VPN view, create and enter BGP-VPN IPv6 unicast instance view.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] ipv6-family unicast
[Sysname-bgp-ipv6-vpn1]
log-peer-change
Use log-peer-change to enable the logging of session state changes globally.
Use undo log-peer-change to disable the function.
Syntax
log-peer-change
undo log-peer-change
Default
Logging of session state changes is enabled globally.
Views
BGP view
Predefined user roles
network-admin
261
Usage guidelines
After you execute the log-peer-change command, BGP logs session establishment and disconnection
events. To view the log information, use the display bgp ipv4 peer log-info command.
If you disable the logging of session state changes globally, the display bgp ipv4 peer log-info command
does not show relevant log information.
Examples
# Enable the logging of session state changes globally.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] log-peer-change
Related commands
display bgp peer ipv4 unicast
network
Use network to inject a network to the BGP routing table.
Use undo network to remove the configuration.
Syntax
In BGP IPv4 unicast instance view/BGP-VPN IPv4 unicast instance view:
network ip-address [ mask | mask-length ] [ route-policy route-policy-name ]
undo network ip-address [ mask | mask-length ]
In BGP IPv6 unicast instance view/BGP-VPN IPv6 unicast instance view:
network ipv6-address prefix-length [ route-policy route-policy-name ]
undo network ipv6-address prefix-length
Default
BGP does not advertise any local network.
Views
BGP IPv4 unicast instance view, BGP-VPN IPv4 unicast instance view, BGP IPv6 unicast instance view,
BGP-VPN IPv6 unicast instance view
Predefined user roles
network-admin
Parameters
ip-address: Specifies an IPv4 network address. If the mask or mask-length is not specified, natural mask
is used.
mask: Specifies a mask in dotted decimal notation.
mask-length: Specifies a mask length in the range of 0 to 32.
ipv6-address: Specifies an IPv6 network address.
prefix-length: Specifies a prefix length in the range of 0 to 128.
262
route-policy route-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to 63
characters, to filter routes or set the route attributes.
Usage guidelines
•
The network to be injected must be available and active in the local IP routing table.
•
The ORIGIN attribute of the route injected with the network command is IGP.
•
When you execute the undo network command, you must specify the same mask or mask
length/prefix length that you specified for the network command. Otherwise, the configuration
cannot be removed.
Examples
# In BGP IPv4 unicast instance view, inject local network 10.0.0.0/16 to the BGP routing table.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family unicast
[Sysname-bgp-ipv4] network 10.0.0.0 255.255.0.0
# In BGP-VPN IPv4 unicast instance view, inject local network 10.0.0.0/16 to the BGP routing table.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] ipv4-family unicast
[Sysname-bgp-ipv4-vpn1] network 10.0.0.0 255.255.0.0
# In BGP IPv6 unicast instance view, inject local network 2002::/64 to the IPv6 BGP routing table.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv6-family unicast
[Sysname-bgp-ipv6] network 2002:: 64
# In BGP-VPN IPv6 unicast instance view, inject local network 2002::/64 to the IPv6 BGP routing table.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] ipv6-family unicast
[Sysname-bgp-ipv6-vpn1] network 2002:: 64
network short-cut
Use network short-cut to increase the preference for a received EBGP route. This EBGP route is called
shortcut route.
Use undo network short-cut to cancel the configuration.
Syntax
In BGP IPv4 unicast instance view/BGP-VPN IPv4 unicast instance view:
network ip-address [ mask | mask-length ] short-cut
undo network ip-address [ mask | mask-length ] short-cut
In BGP IPv6 unicast instance view/BGP-VPN IPv6 unicast instance view:
network ipv6-address prefix-length short-cut
263
undo network ipv6-address prefix-length short-cut
Default
A received EBGP route has a preference of 255.
Views
BGP IPv4 unicast instance view, BGP-VPN IPv4 unicast instance view, BGP IPv6 unicast instance view,
BGP-VPN IPv6 unicast instance view
Predefined user roles
network-admin
Parameters
ip-address: Specifies an IPv4 network address. If the mask or mask-length is not specified, natural mask
is used.
mask: Specifies a mask of the network address in dotted decimal notation.
mask-length: Specifies a mask length in the range of 0 to 32.
ipv6-address: Specifies an IPv6 network address.
prefix-length: Specifies a prefix length in the range of 0 to 128.
Usage guidelines
Different routing protocols might find different routes to the same destination. However, not all of those
routes are optimal. For route selection, routing protocols, direct routes, and static routes are assigned
different preferences. The route with the highest preference is preferred.
By default, the preference of an EBGP route is lower than a local route. If a device has an EBGP route and
a local route to reach the same destination, the device does not select the EBGP route. You can use the
network shortcut command to configure the EBGP route to have the same preference as the local route
so the EBGP route is more likely to become the optimal route.
You can use the preference command to modify the preferences for external and local BGP routes.
Examples
# In BGP IPv4 unicast instance view, increase the preference of EBGP route 10.0.0.0/16.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family unicast
[Sysname-bgp-ipv4] network 10.0.0.0 255.255.0.0 short-cut
# In BGP-VPN IPv6 unicast instance view, increase the preference of EBGP route 10::/16.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] ipv6-family unicast
[Sysname-bgp-ipv6-vpn1] network 10:: 16 short-cut
Related commands
preference
peer advertise-community
Use peer advertise-community to advertise the COMMUNITY attribute to a peer or peer group.
264
Use undo peer advertise-community to disable the COMMUNITY attribute advertisement to a peer or
peer group.
Syntax
In BGP IPv4 unicast instance view/BGP-VPN IPv4 unicast instance view:
peer { group-name | ip-address } advertise-community
undo peer { group-name } advertise-community
In BGP IPv6 unicast instance view:
peer { group-name | ipv6-address } advertise-community
undo peer { group-name | ipv6-address } advertise-community
Default
No COMMUNITY attribute is advertised to any peer or peer group.
Views
BGP IPv4 unicast instance view, BGP-VPN IPv4 unicast instance view, BGP IPv6 unicast instance view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer
group must have been created.
ip-address: Specifies a peer by its IP address. The peer must have been created.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
Usage guidelines
The COMMUNITY attribute is a group of specific data carried in update messages. A route can carry
one or more COMMUNITY attribute values (each is represented by a 4-byte integer). The receiving
router processes the route (for example, determining whether to advertise the route and the scope for
advertising the route) based on the COMMUNITY attribute values.
After you execute the peer advertise-community command, routing updates advertised to the peer carry
the COMMUNITY attribute.
After you execute the undo peer advertise-community command, BGP, upon receiving a route with the
COMMUNITY attribute, removes the COMMUNITY attribute before sending the route to the peer or peer
group.
Examples
# In BGP IPv4 unicast instance view, advertise the COMMUNITY attribute to peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family unicast
[Sysname-bgp-ipv4] peer test advertise-community
# In BGP-VPN IPv4 unicast instance view, advertise the COMMUNITY attribute to peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] ipv4-family unicast
265
[Sysname-bgp-ipv4-vpn1] peer test advertise-community
# In BGP IPv6 unicast instance view, advertise the COMMUNITY attribute to peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv6-family unicast
[Sysname-bgp-ipv6] peer test advertise-community
Related commands
•
apply community
•
if-match community
•
ip community-list
peer advertise-ext-community
Use peer advertise-ext-community to advertise the extended community attribute to a peer or peer
group.
Use undo peer advertise-ext-community to disable the extended community attribute advertisement to a
peer or peer group.
Syntax
In BGP IPv4 unicast instance view/BGP-VPN IPv4 unicast instance view:
peer { group-name | ip-address } advertise-ext-community
undo peer { group-name | ip-address } advertise-ext-community
In BGP IPv6 unicast instance view:
peer { group-name | ipv6-address } advertise-ext-community
undo peer { group-name | ipv6-address } advertise-ext-community
Default
No extended community attribute is advertised to a peer or peer group.
Views
BGP IPv4 unicast instance view, BGP-VPN IPv4 unicast instance view, BGP IPv6 unicast instance view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer
group must have been created.
ip-address: Specifies a peer by its IP address. The peer must have been created.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
Usage guidelines
To satisfy increasing user demands, BGP defines a new attribute—extended community attribute. The
extended community attribute has the following advantages over the COMMUNITY attribute:
•
266
The extended community attribute has an 8-byte length.
•
The extended community attribute supports various types. You can select an extended community
attribute type as needed to implement route filtering and control. This simplifies configuration and
management.
After you execute the peer advertise-ext-community command, route updates sent to the peer or peer
group carry the extended community attribute.
After you execute the undo peer advertise-ext-community command, BGP, upon receiving a route with
the extended community attribute, removes the extended community attribute before sending the route to
the peer or peer group.
Examples
# In BGP IPv4 unicast instance view, advertise the extended community attribute to peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family unicast
[Sysname-bgp-ipv4] peer test advertise-ext-community
# In BGP-VPN IPv4 unicast instance view, advertise the extended community attribute to peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] ipv4-family unicast
[Sysname-bgp-ipv4-vpn1] peer test advertise-ext-community
# In BGP IPv6 unicast instance view, advertise the extended community attribute to peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv6-family unicast
[Sysname-bgp-ipv6] peer test advertise-ext-community
Related commands
•
apply extcommunity
•
if-match extcommunity
•
ip extcommunity-list
peer allow-as-loop
Use peer allow-as-loop to allow a local AS number to exist in the AS_PATH attribute of routes from a peer
or peer group, and to configure the number of times the local AS number can appear.
Use undo peer allow-as-loop to restore the default.
Syntax
In BGP IPv4 unicast instance view/BGP-VPN IPv4 unicast instance view:
peer { group-name | ip-address } allow-as-loop [ number ]
undo peer { group-name | ip-address } allow-as-loop
In BGP IPv6 unicast instance view:
peer { group-name | ipv6-address } allow-as-loop [ number ]
undo peer { group-name | ipv6-address } allow-as-loop
267
In BGP VPN IPv6 unicast instance view:
peer { group-name | ipv6-address } allow-as-loop [ number ]
undo peer { group-name | ipv6-address } allow-as-loop
Default
The local AS number is not allowed to exist in the AS_PATH attribute of routes from a peer or peer group.
Views
BGP IPv4 unicast instance view, BGP-VPN IPv4 unicast instance view, BGP IPv6 unicast instance view,
BGP-VPN IPv6 unicast instance view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer
group must have been created.
ip-address: Specifies a peer by its IP address. The peer must have been created.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
number: Specifies the number of times for which the local AS number can appear, in the range of 1 to
10. The default number is 1. If the number of times for which the local AS number appears in a route is
more than the specified number, BGP considers that a routing loop occurs and discards the route.
Usage guidelines
By default, BGP does not receive routes that contain the local AS number in the AS_PATH attribute to
avoid routing loops. However, in certain network environments (a Hub&Spoke network in MPLS L3VPN,
for example), the AS_PATH attribute of a route from a peer must be allowed to contain the local AS
number. Otherwise, the route cannot be advertised correctly.
Examples
# In BGP IPv4 unicast instance view, configure the number of times the local AS number can appear in
AS_PATH attribute of routes from peer group test as 2.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family unicast
[Sysname-bgp-ipv4] peer test allow-as-loop 2
# In BGP-VPN IPv6 unicast instance view, configure the number of times the local AS number can appear
in AS_PATH attribute of routes from peer group test as 2.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] ipv6-family unicast
[Sysname-bgp-ipv6-vpn1] peer test allow-as-loop 2
peer as-number (for a BGP peer)
Use peer as-number to create a BGP peer and specify its AS number.
Use undo peer to delete a BGP peer.
268
Syntax
peer { ip-address | ipv6-address } as-number as-number
undo peer { ip-address | ipv6-address }
Default
No BGP peer is created.
Views
BGP view, BGP-VPN view
Predefined user roles
network-admin
Parameters
ip-address: Specifies the IP address of a peer.
ipv6-address: Specifies the IPv6 address of a peer.
as-number: Specifies an AS number for the peer, in the range of 1 to 4294967295. If the AS numbers of
the peer and the local router are the same, the peer is an IBGP peer. If they are different, the peer is an
EBGP peer.
Usage guidelines
You can also create a peer and add it to a peer group by using the peer group command.
To modify the AS number of a peer, do not execute the peer as-number command repeatedly. Instead,
you must first delete the peer and configure it again.
After you create a peer, you must use the peer enable command to enable BGP to exchange routing
information with the specified peer.
Examples
# In BGP view, create BGP peer 1.1.1.1 and specify its AS number as 100.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer 1.1.1.1 as-number 100
# In BGP-VPN view, create BGP peer 1::1 and specify its AS number as 100.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] peer 1::1 as-number 100
Related commands
•
display bgp peer ipv4 unicast
•
display bgp peer ipv6 unicast
•
peer enable
•
peer group
peer as-number (for a BGP peer group)
Use peer as-number to specify an AS number for a peer group.
Use undo peer as-number to delete the AS number of a peer group.
269
Syntax
peer group-name as-number as-number
undo peer group-name as-number
Default
No AS number is specified for a peer group.
Views
BGP view, BGP-VPN view
Predefined user roles
network-admin
Parameters
group-name: Specifies a name for a peer group, a case-sensitive string of 1 to 47 characters. The peer
group must have been created.
as-number: Specifies an AS number for a peer group, in the range of 1 to 4294967295.
Usage guidelines
•
This command applies to only a peer group with no peers in it.
•
When you specify an AS number for a peer group and want to add peers to it, make sure the AS
number of the peers is the same as the peer group.
•
If you have specified no AS number for a peer group, peers added to it can use their own AS
numbers.
Examples
# In BGP view, specify the AS number for peer group test as 100.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer test as-number 100
# In BGP-VPN view, specify the AS number for peer group test as 100.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] peer test as-number 100
Related commands
peer group
peer as-path-acl
Use peer as-path-acl to specify an AS path list to filter routes incoming from or outgoing to a peer/peer
group.
Use undo peer as-path-acl to remove the configuration.
Syntax
In BGP IPv4 unicast instance view/BGP-VPN IPv4 unicast instance view:
peer { group-name | ip-address } as-path-acl as-path-acl-number { export | import }
undo peer { group-name | ip-address } as-path-acl as-path-acl-number { export | import }
270
In BGP IPv6 unicast instance view:
peer { group-name | ipv6-address } as-path-acl as-path-acl-number { export | import }
undo peer { group-name | ipv6-address } as-path-acl as-path-acl-number { export | import }
Default
No AS path list is specified for filtering.
Views
BGP IPv4 unicast instance view, BGP-VPN IPv4 unicast instance view, BGP IPv6 unicast instance view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer
group must have been created.
ip-address: Specifies a peer by its IPv4 address. The peer must have been created.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
as-path-acl-number: Specifies an AS path list by its number in the range of 1 to 256.
export: Filters outgoing routes.
import: Filters incoming routes.
Usage guidelines
The specified AS path list must have been created with the ip as-path command in system view.
Otherwise, all routes can pass the AS path list.
Examples
# In BGP IPv4 unicast instance view, specify the AS path list 1 to filter routes outgoing to the peer group
test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family unicast
[Sysname-bgp-ipv4] peer test as-path-acl 1 export
# In BGP-VPN IPv4 unicast instance view, specify the AS path list 1 to filter routes outgoing to the peer
group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] ipv4-family unicast
[Sysname-bgp-ipv4-vpn1] peer test as-path-acl 1 export
# In BGP IPv6 unicast instance view, specify the AS path list 1 to filter routes outgoing to the peer group
test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv6-family unicast
[Sysname-bgp-ipv6] peer test as-path-acl 1 export
271
Related commands
•
filter-policy export
•
filter-policy import
•
ip as-path
•
peer filter-policy
•
peer prefix-list
•
peer route-policy
peer bfd
Use peer bfd to enable BFD for the link to a BGP peer.
Use undo peer bfd to restore the default.
Syntax
peer { ip-address | ipv6-address } bfd
undo peer { ip-address | ipv6-address } bfd
Default
BFD is disabled.
Views
BGP view, BGP-VPN view
Predefined user roles
network-admin
Parameters
ip-address: Specifies a peer by its IP address. The peer must have been created.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
Usage guidelines
BFD helps speed up BGP routing convergence upon link failures. However, if you have enabled GR, use
BFD with caution because BFD might detect a failure before the system performs GR, resulting in GR
failure. If you have enabled both BFD and GR for BGP, do not disable BFD during a GR process to avoid
GR failure.
Examples
# In BGP view, enable BFD for the link to BGP peer 1.1.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer 1.1.1.1 bfd
# In BGP view, enable BFD for the link to BGP peer 1::1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer 1::1 bfd
# In BGP-VPN view, enable BFD for the link to BGP peer 2.2.2.2.
<Sysname> system-view
[Sysname] bgp 100
272
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] peer 2.2.2.2 bfd
# In BGP-VPN view, enable BFD for the link to BGP peer 2::2.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] peer 2::2 bfd
Related commands
•
display bgp peer ipv4 unicast
•
display bgp peer ipv6 unicast
•
display bfd session (High Availability Command Reference)
peer capability-advertise conventional
Use peer capability-advertise conventional to disable BGP multi-protocol extension and route refresh for
a peer or peer group.
Use undo peer capability-advertise conventional to enable BGP multi-protocol extension and route
refresh for a peer or peer group.
Syntax
peer { group-name | ip-address | ipv6-address } capability-advertise conventional
undo peer { group-name | ip-address | ipv6-address } capability-advertise conventional
Default
BGP multi-protocol extension and route refresh are enabled.
Views
BGP view, BGP-VPN view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer
group must have been created.
ip-address: Specifies a peer by its IP address. The peer must have been created.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
Usage guidelines
The route refresh function enables BGP to send and receive Route-refresh messages and implement BGP
session soft-reset.
The multi-protocol extension function enables BGP to advertise and receive routing information for
various protocols (for example, IPv6 routing information).
If both the peer capability-advertise conventional and peer capability-advertise route-refresh
commands are executed, the last configuration takes effect.
Examples
# In BGP view, disable multi-protocol extension and route refresh for peer 1.1.1.1.
273
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer 1.1.1.1 as-number 100
[Sysname-bgp] peer 1.1.1.1 capability-advertise conventional
# In BGP-VPN view, disable multi-protocol extension and route refresh for peer 1::1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] peer 1::1 as-number 100
[Sysname-bgp-vpn1] peer 1::1 capability-advertise conventional
Related commands
•
display bgp peer ipv4 unicast
•
display bgp peer ipv6 unicast
•
peer capability-advertise route-refresh
peer capability-advertise route-refresh
Use peer capability-advertise route-refresh to enable BGP route refresh for a specified peer or peer
group.
Use undo peer capability-advertise route-refresh to disable the function.
Syntax
peer { group-name | ip-address | ipv6-address } capability-advertise route-refresh
undo peer { group-name | ip-address | ipv6-address } capability-advertise route-refresh
Default
BGP route refresh is enabled.
Views
BGP view, BGP-VPN view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer
group must have been created.
ip-address: Specifies a peer by its IP address. The peer must have been created.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
Usage guidelines
The route refresh function enables BGP to send and receive Route-refresh messages.
BGP uses the route refresh function to implement BGP session soft-reset. After a policy is modified, the
router advertises a Route-refresh message to the peers. The peers resend their routing information to the
router. After receiving the routing information, the router filters the routing information by using the new
policy. This method allows you to refresh the BGP routing table and apply the new route selection policy
without tearing down BGP sessions.
274
BGP route refresh requires that both the local router and the peer support route refresh.
If both the peer capability-advertise route-refresh and peer capability-advertise conventional
commands are executed, the last configuration takes effect.
Examples
# In BGP view, enable BGP route refresh for peer 1.1.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer 1.1.1.1 as-number 100
[Sysname-bgp] peer 1.1.1.1 capability-advertise route-refresh
# In BGP-VPN view, enable BGP route refresh for peer 1::1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] peer 1::1 as-number 200
[Sysname-bgp-vpn1] peer 1::1 capability-advertise route-refresh
Related commands
•
display bgp peer ipv4 unicast
•
display bgp peer ipv6 unicast
•
peer capability-advertise conventional
•
peer keep-all-routes
•
refresh bgp ipv4 unicast
•
refresh bgp ipv6 unicast
peer capability-advertise suppress-4-byte-as
Use peer capability-advertise suppress-4-byte-as to enable 4-byte AS number suppression.
Use undo peer capability-advertise suppress-4-byte-as to disable the function.
Syntax
peer { group-name | ip-address | ipv6-address } capability-advertise suppress-4-byte-as
undo peer { group-name | ip-address | ipv6-address } capability-advertise suppress-4-byte-as
Default
The 4-byte AS number suppression function is disabled.
Views
BGP view, BGP-VPN view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer
group must have been created.
ip-address: Specifies a peer by its IP address. The peer must have been created.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
275
Usage guidelines
BGP supports 4-byte AS numbers. The 4-byte AS number occupies four bytes, in the range of 1 to
4294967295. By default, a device sends an Open message to the peer device for session establishment.
The Open message indicates that the device supports 4-byte AS numbers. If the peer device does not
support 4-byte AS numbers (supports only 2-byte AS numbers), the session cannot be established. To
resolve this issue, enable the 4-byte AS number suppression function. The device then sends an Open
message to inform the peer that it does not support 4-byte AS numbers, so the BGP session can be
established.
If the peer device supports 4-byte AS numbers, do not enable the 4-byte AS number suppression function.
Otherwise, the BGP session cannot be established.
Examples
# In BGP view, enable 4-byte AS number suppression for peer 1.1.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer 1.1.1.1 as-number 100
[Sysname-bgp] peer 1.1.1.1 capability-advertise suppress-4-byte-as
# In BGP-VPN instance view, enable 4-byte AS number suppression for peer 1.1.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] peer 1.1.1.1 as-number 200
[Sysname-bgp-vpn1] peer 1.1.1.1 capability-advertise suppress-4-byte-as
Related commands
•
display bgp peer ipv4 unicast
•
display bgp peer ipv6 unicast
peer connect-interface
Use peer connect-interface to specify a source interface (IP address/IPv6 address) for establishing TCP
connections to a peer or peer group.
Use undo peer connect-interface to restore the default.
Syntax
peer { group-name | ip-address | ipv6-address } connect-interface interface-type interface-number
undo peer { group-name | ip-address | ipv6-address } connect-interface
Default
BGP uses the output interface (IP address/IPv6 address) of the best route destined for the BGP peer or
peer group as the source interface for establishing a TCP connection to the peer or peer group.
Views
BGP view, BGP-VPN view
Predefined user roles
network-admin
276
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer
group must have been created.
ip-address: Specifies a peer by its IP address. The peer must have been created.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
interface-type interface-number: Specifies an interface by its type and number.
Usage guidelines
If the peer's IP address/IPv6 address belongs to an interface indirectly connected to the local router,
specify that interface as the source interface for TCP connections on the peer. For example, interface A
on the local end is directly connected to interface B on the peer. When you execute the peer x.x.x.x
as-number as-number command on the local end to specify the BGP peer, and x.x.x.x is not the IP
address of interface B, use the peer connect-interface command on the peer to specify the interface
whose IP address is x.x.x.x as the source interface for establishing a TCP connection.
If a BGP router has multiple links to a peer, and the source interface fails, BGP has to reestablish TCP
connections, causing network oscillation. To improve link availability, HP recommends that you use a
loopback interface as the source interface.
To establish multiple BGP sessions between two routers, specify the source interface for establishing TCP
connections to each peer on the local router. Otherwise, the local BGP router might fail to establish TCP
connections to a peer when using the outbound interface of the best route to the peer as the source
interface.
The source interfaces on the local router and the peer must be reachable.
To specify an indirectly connected interface (except loopback interfaces) on an EBGP peer as the source
interface, use the peer ebgp-max-hop command to allow the establishment of an EBGP session to the
indirectly connected peer.
If an interface has multiple IP addresses, use the primary IP address for establishing TCP connections. If
an interface has multiple IPv6 addresses, select an IPv6 address as defined in RFC 3484 for establishing
TCP connections.
Examples
# In BGP view, specify loopback 0 as the source interface for TCP connections to the peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer test connect-interface loopback 0
# In BGP-VPN view, specify loopback 0 as the source interface for TCP connections to the peer group
test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] peer test connect-interface loopback 0
Related commands
peer ebgp-max-hop
peer default-route-advertise
Use peer default-route-advertise to advertise a default route to a peer or peer group.
277
Use undo peer default-route-advertise to disable default route advertisement to a peer or peer group.
Syntax
In BGP IPv4 unicast instance view/BGP-VPN IPv4 unicast instance view:
peer { group-name | ip-address } default-route-advertise [ route-policy route-policy-name ]
undo peer { group-name | ip-address } default-route-advertise [ route-policy route-policy-name ]
In BGP IPv6 unicast instance view:
peer { group-name | ipv6-address } default-route-advertise [ route-policy route-policy-name ]
undo peer { group-name | ipv6-address } default-route-advertise [ route-policy route-policy-name ]
Default
No default route is advertised to a peer or peer group.
Views
BGP IPv4 unicast instance view, BGP-VPN IPv4 unicast instance view, BGP IPv6 unicast instance view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer
group must have been created.
ip-address: Specifies a peer by its IP address. The peer must have been created.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
route-policy route-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to 63
characters, to modify the route attribute.
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN by its name, a case-sensitive string of 1 to 31
characters.
Usage guidelines
The peer default-route-advertise command enables the router to send a default route with the next hop
being itself to the peer or peer group regardless of whether the default route exists in the routing table.
Examples
# In BGP IPv4 unicast instance view, advertise a default route to peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family unicast
[Sysname-bgp-ipv4] peer test default-route-advertise
# In BGP-VPN IPv4 unicast instance view, advertise a default route to peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] ipv4-family unicast
[Sysname-bgp-ipv4-vpn1] peer test default-route-advertise
# In BGP IPv6 unicast instance view, advertise a default route to peer group test.
<Sysname> system-view
278
[Sysname] bgp 100
[Sysname-bgp] ipv6-family unicast
[Sysname-bgp-ipv6] peer test default-route-advertise
peer description
Use peer description to configure a description for a peer or peer group.
Use undo peer description to remove the description for a peer or peer group.
Syntax
peer { group-name | ip-address| ipv6-address } description description-text
undo peer { group-name | ip-address| ipv6-address } description
Default
No description information is configured for a peer or peer group.
Views
BGP view, BGP-VPN view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer
group must have been created.
ip-address: Specifies a peer by its IP address. The peer must have been created.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
description-text: Specifies a description for a peer or peer group, a case-sensitive string of 1 to 79
characters.
Examples
# In BGP view, configure a description for the peer group test as ISP1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer test description ISP1
# In BGP-VPN view, configure a description for the peer group test as ISP1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] peer test description ISP1
peer ebgp-max-hop
Use peer ebgp-max-hop to enable BGP to establish an EBGP session to an indirectly-connected peer or
peer group and specify the maximum hop count.
Use undo peer ebgp-max-hop to restore the default.
Syntax
peer { group-name | ip-address | ipv6-address } ebgp-max-hop [ hop-count ]
279
undo peer { group-name | ip-address | ipv6-address } ebgp-max-hop
Default
BGP does not establish an EBGP session to an indirectly-connected peer or peer group.
Views
BGP view, BGP-VPN view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer
group must have been created.
ip-address: Specifies a peer by its IP address. The peer must have been created.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
hop-count: Specifies the maximum number of hop counts, in the range of 1 to 255. The default is 64.
Usage guidelines
EBGP peers must be directly connected. If not, use the peer ebgp-max-hop command to establish an
EBGP session over multiple hops between two peers. If direct EBGP peers use loopback interfaces to
establish a BGP session, you do not need to configure the peer ebgp-max-hop command.
Examples
# In BGP view, enable BGP to establish EBGP sessions to an indirectly-connected EBGP peer group test,
and specify the maximum hop count as 64 (default).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer test ebgp-max-hop
# In BGP-VPN view, enable BGP to establish EBGP sessions to an indirectly-connected EBGP peer group
test, and specify the maximum hop count as 64 (default).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] peer test ebgp-max-hop
peer enable
Use peer enable to enable BGP to exchange routing information for an address family with a peer or
peer group.
Use undo peer enable to disable BGP from exchanging routing information for an address family with a
peer or peer group.
Syntax
In BGP IPv4 unicast instance view/BGP-VPN IPv4 unicast instance view :
peer { group-name | ip-address } enable
undo peer { group-name | ip-address } enable
In BGP IPv6 unicast instance view:
280
peer { group-name | ipv6-address } enable
undo peer { group-name | ipv6-address } enable
In BGP-VPN IPv6 unicast instance view:
peer { group-name | ipv6-address } enable
undo peer { group-name | ipv6-address } enable
Default
BGP cannot exchange routing information with a peer or peer group.
Views
BGP IPv4 unicast instance view, BGP-VPN IPv4 unicast instance view, BGP IPv6 unicast instance view,
BGP-VPN IPv6 unicast instance view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer
group must have been created.
ip-address: Specifies a peer by its IP address. The peer must have been created.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
Usage guidelines
Executing the peer enable command in different views enables BGP to exchange routing information for
the corresponding address families with the specified peer.
•
In BGP IPv4 unicast instance view, the command enables the capability to exchange IPv4 unicast
routing information, and adds the learned routes to the BGP routing table of the public network.
•
In BGP-VPN IPv4 unicast instance view, the command enables the capability to exchange IPv4
unicast routing information, and adds the learned routes to the BGP routing table of the specified
VPN instance.
•
In BGP IPv6 unicast instance view, the command enables the capability to exchange IPv6 unicast
routing information, and adds the learned routes to the IPv6 BGP routing table of the public
network.
•
In BGP-VPN IPv6 unicast instance view, the command enables the capability to exchange IPv6
unicast routing information, and adds the learned routes to the IPv6 BGP routing table of the
specified VPN instance.
The undo peer enable command disables BGP to exchange routing information for the corresponding
address family with the peer.
Examples
# In BGP IPv4 unicast instance view, enable BGP to exchange IPv4 unicast routing information with peer
1.1.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family unicast
[Sysname-bgp-ipv4] peer 1.1.1.1 enable
281
# In BGP-VPN IPv4 unicast instance view, enable BGP to exchange IPv4 unicast routing information with
peer 1.1.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] ipv4-family unicast
[Sysname-bgp-ipv4-vpn1] peer 1.1.1.1 enable
# In BGP IPv6 unicast instance view, enable BGP to exchange IPv6 unicast routing information with peer
1::1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv6-family unicast
[Sysname-bgp-ipv6] peer 1::1 enable
# In BGP-VPN IPv6 unicast instance view, enable BGP to exchange IPv6 unicast routing information with
peer 1::1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] ipv6-family unicast
[Sysname-bgp-ipv6-vpn1] peer 1::1 enable
Related commands
•
display bgp peer ipv4 unicast
•
display bgp peer ipv6 unicast
peer fake-as
Use peer fake-as to advertise a fake AS number to a peer or peer group.
Use undo peer fake-as to restore the default.
Syntax
peer { group-name | ip-address | ipv6-address } fake-as as-number
undo peer { group-name | ip-address | ipv6-address } fake-as
Default
No fake local AS number is advertised to a peer or peer group.
Views
BGP view, BGP-VPN view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer
group must have been created.
ip-address: Specifies a peer by its IP address. The peer must have been created.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
282
as-number: Specifies a fake AS number in the range of 1 to 4294967295.
Usage guidelines
After you move a BGP router from an AS to another AS (from AS 2 to AS 3 for example), you have to
modify the AS number of the router on all its EBGP peers. To avoid such modifications, you can configure
the router to advertise a fake AS number 2 to its EBGP peers so that the EBGP peers still think that Router
A is in AS 2.
The peer fake-as command is only applicable to EBGP peers or peer groups.
If you execute the peer fake-as command on the local router, specify the local router's AS number on the
peer as the fake local AS number specified in the command.
Examples
# In BGP view, advertise a fake AS number of 200 to the peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer test fake-as 200
# In BGP-VPN view, advertise a fake AS number of 200 to the peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] peer test fake-as 200
peer filter-policy
Use peer filter-policy to filter routes advertised to or received from a peer or peer group by using an ACL.
Use undo peer filter-policy to remove the configuration.
Syntax
In BGP IPv4 unicast instance view/BGP-VPN IPv4 unicast instance view:
peer { group-name | ip-address } filter-policy acl-number { export | import }
undo peer { group-name | ip-address } filter-policy [ acl-number ] { export | import }
In BGP IPv6 unicast instance view:
peer { group-name | ipv6-address } filter-policy acl6-number { export | import }
undo peer { group-name | ipv6-address } filter-policy acl6-number { export | import }
In BGP-VPN IPv6 unicast instance view:
peer { group-name | ipv6-address } filter-policy acl6-number { export | import }
undo peer { group-name | ipv6-address } filter-policy acl6-number { export | import }
Default
No ACL-based filtering is configured.
Views
BGP IPv4 unicast instance view, BGP-VPN IPv4 unicast instance view, BGP IPv6 unicast instance view,
BGP-VPN IPv6 unicast instance view
283
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer
group must have been created.
ip-address: Specifies a peer by its IP address. The peer must have been created.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
acl-number: Specifies an ACL by its number in the range of 2000 to 3999.
acl6-number: Specifies an IPv6 ACL by its number in the range of 2000 to 3999.
export: Filters routes advertised to the peer/peer group.
import: Filters routes received from the peer/peer group.
Usage guidelines
The specified ACL referenced by the peer filter-policy command must have been created with the acl
command in system view. Otherwise, all routes can pass the ACL.
If you use a basic ACL (with a number from 2000 to 2999) configured with the rule [ rule-id ] { deny |
permit } source source-address source-wildcard command, the command matches whose destination
network addresses match the source-address source-wildcard argument without matching the masks of
the destination addresses.
If you want to use an advanced ACL (with a number from 3000 to 3999) in the command, the ACL
should be configured with the rule [ rule-id ] { deny | permit } ip source sour-addr sour-wildcard
command to deny/permit a route with the specified destination, or with the rule [ rule-id ] { deny |
permit } ip source sour-addr sour-wildcard destination dest-addr dest-wildcard command to deny/permit
a route with the specified destination and mask. The source keyword specifies the destination address of
a route and the destination keyword specifies the subnet mask of the destination. The subnet mask must
be contiguous. Otherwise, the configuration does not take effect.
Examples
# In BGP IPv4 unicast instance view, apply ACL 2000 to filter routes advertised to the peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family unicast
[Sysname-bgp-ipv4] peer test filter-policy 2000 export
# In BGP-VPN IPv6 unicast instance view, apply ACL6 2000 to filter routes advertised to the peer group
test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] ipv6-family unicast
[Sysname-bgp-ipv6-vpn1] peer test filter-policy 2000 export
Related commands
•
acl (ACL and QoS Command Reference)
•
filter-policy export
•
filter-policy import
284
•
peer as-path-acl
•
peer prefix-list
•
peer route-policy
peer group
Use peer group to add a peer to a peer group.
Use undo peer group to delete a specified peer from a peer group.
Syntax
peer { ip-address | ipv6-address } group group-name [ as-number as-number ]
undo peer { ip-address | ipv6-address } group group-name
Default
No peer exists in a peer group.
Views
BGP view, BGP-VPN view
Predefined user roles
network-admin
Parameters
ip-address: Specifies a peer by its IP address.
ipv6-address: Specifies a peer by its IPv6 address.
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer
group must have been created.
as-number as-number: Specifies an AS for a peer by its number in the range of 1 to 4294967295.
Usage guidelines
You can add a peer to a peer group in the following ways:
•
Use the peer as-number command to create a peer and specify its AS number, and then use the
peer group command to add the peer to the peer group.
{
{
{
•
If you have specified the AS number of the peer group with the peer as-number command, the
peer to be added must have the same AS number as the peer group.
To add a peer to an IBGP peer group, the peer must be an IBGP peer.
Use the peer group command to create a peer and add it to the peer group.
{
{
285
You can specify the as-number keyword for the peer group command. The AS number must be
the same as the AS number specified in the peer as-number command.
If you have specified the AS number of the peer group with the peer as-number command, you
do not need to specify the as-number keyword when you execute the peer group command,
because the AS number of the peer is the same as the peer group. To specify the as-number
keyword for the peer group command, make sure that the AS number is the same as the peer
group.
If no AS number is specified for an EBGP peer group, specify the as-number keyword when
you execute the peer group command.
{
If no AS number is specified for an IBGP peer group, you do not need to specify the as-number
keyword when you execute the peer group command, because the AS number of the IBGP
peer group is the local AS number. To specify the as-number keyword for the peer group
command, make sure that the AS number is the same as the local AS number.
If you have specified the AS number of a peer group with the peer as-number command, only the peers
with the same AS number can be added to the peer group. All peers in the group share the same AS
number. If you have not specified the AS number for a peer group, peers added to it can use their own
AS numbers.
After you add a peer to a peer group, you must use the peer enable command to enable BGP to
exchange routing information with the peer group.
Examples
# In BGP view, add peer 10.1.1.1 to the EBGP peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] group test external
[Sysname-bgp] peer 10.1.1.1 group test as-number 2004
# In BGP-VPN view, add peer 10.1.1.1 to the EBGP peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] group test external
[Sysname-bgp-vpn1] peer 10.1.1.1 group test as-number 2004
# In BGP view, add peer 1::1 to the EBGP peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] group test external
[Sysname-bgp] peer 1::1 group test as-number 2004
# In BGP-VPN view, add peer 1::1 to the EBGP peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] group test external
[Sysname-bgp-vpn1] peer 1::1 group test as-number 2004
Related commands
•
group
•
peer as-number
•
peer enable
peer ignore
Use peer ignore to disable BGP session establishment with a peer or peer group.
Use undo peer ignore to restore the default.
Syntax
peer { group-name | ip-address | ipv6-address } ignore
286
undo peer { group-name | ip-address | ipv6-address } ignore
Default
BGP can establish a session to a peer or peer group.
Views
BGP view, BGP-VPN view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer
group must have been created.
ip-address: Specifies a peer by its IP address. The peer must have been created.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
Usage guidelines
This command enables you to temporarily tear down the BGP session to a specific peer or peer group so
that you can perform network upgrade and maintenance without needing to delete and reconfigure the
peer or peer group. To recover the session, execute the undo peer ignore command.
If a session has been established to a peer, executing the peer ignore command for the peer tears down
the session and clears all related routing information.
If sessions have been established to a peer group, executing the peer ignore command for the peer
group disables the sessions to all peers in the group and clears all related routing information.
Examples
# In BGP view, disable session establishment with peer 1.1.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer 1.1.1.1 ignore
# In BGP-VPN view, disable session establishment with peer 1::1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] peer 1::1 ignore
peer keep-all-routes
Use peer keep-all-routes to save all route updates from a peer or peer group, regardless of whether the
routes have passed the configured routing policy.
Use undo peer keep-all-routes to restore the default.
Syntax
In BGP IPv4 unicast instance view/BGP-VPN IPv4 unicast instance view:
peer { group-name | ip-address } keep-all-routes
undo peer { group-name | ip-address } keep-all-routes
In BGP IPv6 unicast instance view:
287
peer { group-name | ipv6-address } keep-all-routes
undo peer { group-name | ipv6-address } keep-all-routes
Default
Route updates from a peer or peer group are not saved.
Views
BGP IPv4 unicast instance view, BGP-VPN IPv4 unicast instance view, BGP IPv6 unicast instance view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer
group must have been created.
ip-address: Specifies a peer by its IP address. The peer must have been created.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
Usage guidelines
To implement BGP session soft-reset when the local router and a peer or peer group do not support the
route refresh function, use the peer keep-all-routes command to save all route updates received from the
peer or peer group. After modifying the route selection policy, filter all saved routes with the new policy
to refresh the routing table. This method avoids tearing down BGP sessions.
Examples
# In BGP IPv4 unicast instance view, save all route updates from peer 1.1.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family unicast
[Sysname-bgp-ipv4] peer 1.1.1.1 keep-all-routes
# In BGP-VPN IPv4 unicast instance view, save all route updates from peer 1.1.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] ipv4-family unicast
[Sysname-bgp-ipv4-vpn1] peer 1.1.1.1 keep-all-routes
# In BGP IPv6 unicast instance view, save all route updates from peer 1::1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv6-family unicast
[Sysname-bgp-ipv6] peer 1::1 keep-all-routes
Related commands
•
peer capability-advertise route-refresh
•
refresh bgp ipv4 unicast
•
refresh bgp ipv6 unicast
288
peer low-memory-exempt
Use peer low-memory-exempt to configure BGP to protect EBGP peer or peer group when the memory
usage reaches level 2 threshold.
Use undo peer low-memory-exempt to restore the default.
Syntax
peer { group-name | ip-address | ipv6-address } low-memory-exempt
undo peer { group-name | ip-address | ipv6-address } low-memory-exempt
Default
When the memory usage reaches level 2 threshold, BGP tears down an EBGP session to release memory
resources periodically.
Views
BGP view, BGP-VPN instance view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer
group must have been created.
ip-address: Specifies a peer by its IP address. The peer must have been created.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
Usage guidelines
Memory usage includes the following levels of thresholds: normal, level 1, level 2, and level 3. When
level 2 threshold is reached, BGP tears down an EBGP session to release memory resources periodically
until the memory usage is exempt from level 2 threshold. You can use this command to avoid tearing
down the BGP session with a specific EBGP peer when memory usage reaches level 2 threshold.
For more information about thresholds, see Fundamentals Configuration Guide.
Examples
# In BGP view, configure BGP to protect EBGP peer 1.1.1.1 when the memory usage reaches level 2
threshold.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer 1.1.1.1 as-number 200
[Sysname-bgp] peer 1.1.1.1 low-memory-exempt
# In BGP-VPN instance view, configure BGP to protect EBGP peer 1.1.1.1 when the memory usage reaches
level 2 threshold.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] peer 1.1.1.1 as-number 200
[Sysname-bgp-vpn1] peer 1.1.1.1 low-memory-exempt
289
peer next-hop-local
Use peer next-hop-local to specify a router as the next hop for routes sent to a peer or peer group.
Use undo peer next-hop-local to restore the default.
Syntax
In BGP IPv4 unicast instance view/BGP-VPN IPv4 unicast instance view:
peer { group-name | ip-address } next-hop-local
undo peer { group-name | ip-address } next-hop-local
In BGP IPv6 unicast instance view:
peer { group-name | ipv6-address } next-hop-local
undo peer { group-name | ipv6-address } next-hop-local
Default
The router sets itself as the next hop for routes sent to an EBGP peer or peer group, but does not set itself
as the next hop for routes sent to an IBGP peer or peer group.
Views
BGP IPv4 unicast instance view, BGP-VPN IPv4 unicast instance view, BGP IPv6 unicast instance view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer
group must have been created.
ip-address: Specifies a peer by its IP address. The peer must have been created.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
Usage guidelines
To make sure that an IBGP peer can find the next hop, you can use this command to specify the router
as the next hop for routes sent to the IBGP peer.
Examples
# In BGP IPv4 unicast instance view, specify the router as the next hop for routes sent to peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family unicast
[Sysname-bgp-ipv4] peer test next-hop-local
# In BGP-VPN IPv4 unicast instance view, specify the router as the next hop for routes sent to peer group
test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] ipv4-family unicast
[Sysname-bgp-ipv4-vpn1] peer test next-hop-local
# In BGP IPv6 unicast instance view, specify the router as the next hop for routes sent to peer group test.
290
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv6-family unicast
[Sysname-bgp-ipv6] peer test next-hop-local
peer password
Use peer password to configure MD5 authentication for a peer or peer group.
Use undo peer password to remove the MD5 configuration for a peer or peer group.
Syntax
peer { group-name | ip-address | ipv6-address } password { cipher | simple } password
undo peer { group-name | ip-address | ipv6-address } password
Default
MD5 authentication is not configured for any BGP peer.
Views
BGP view, BGP-VPN instance view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer
group must have been created.
ip-address: Specifies a peer by its IP address. The peer must have been created.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
cipher: Sets a ciphertext key.
simple: Sets a plaintext key.
password: Specifies the key string. This argument is case sensitive. If cipher is specified, it must be a
ciphertext string of 33 to 137 characters. If simple is specified, it must be a string of 1 to 80 characters.
Usage guidelines
BGP peers must be configured with the same password to establish a TCP connection. MD5 verifies each
TCP segment on the TCP connection between the BGP peers.
For secrecy, all keys, including keys configured in plain text, are saved in cipher text.
Examples
# In BGP view, configure MD5 authentication between the local router 10.1.100.1 and its peer 10.1.100.2,
and specify the key as a plaintext string of aabbcc.
1.
Configure the local router:
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer 10.1.100.2 password simple aabbcc
2.
Configure the peer router:
<Sysname> system-view
[Sysname] bgp 100
291
[Sysname-bgp] peer 10.1.100.1 password simple aabbcc
# In BGP-VPN instance view, configure MD5 authentication between the local router 10.1.100.1 and its
peer 10.1.100.2, and specify the key as a plaintext string of aabbcc.
3.
Configure the local router:
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] peer 10.1.100.2 password simple aabbcc
4.
Configure the peer router:
<Sysname> system-view
[Sysname] bgp 200
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] peer 10.1.100.1 password simple aabbcc
peer preferred-value
Use peer preferred-value to specify a preferred value for routes received from a peer or peer group.
Use undo peer preferred-value to restore the default.
Syntax
In BGP IPv4 unicast instance view/BGP-VPN IPv4 unicast instance view:
peer { group-name | ip-address } preferred-value value
undo peer { group-name | ip-address } preferred-value
In BGP IPv6 unicast instance view:
peer { group-name | ipv6-address } preferred-value value
undo peer { group-name | ipv6-address } preferred-value
In BGP-VPN IPv6 unicast instance view:
peer { group-name | ipv6-address } preferred-value value
undo peer { group-name | ipv6-address } preferred-value
Default
The preferred value is 0.
Views
BGP IPv4 unicast instance view, BGP-VPN IPv4 unicast instance view, BGP IPv6 unicast instance view,
BGP-VPN IPv6 unicast instance view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer
group must have been created.
ip-address: Specifies a peer by its IP address. The peer must have been created.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
292
value: Specifies the preferred value in the range of 0 to 65535.
Usage guidelines
If multiple routes that have the same destination are learned from different peers, you can specify
different preferred values for the routes as needed to control BGP path selection. The one with the
greatest preferred value is selected as the optimal route to the destination.
The preferred value is used for route selection on the local router and is not advertised to the peer. It has
only local significance.
You can also use the apply preferred-value command in a routing policy to configure the preferred value
for BGP routes. If both the peer preferred-value and apply preferred-value commands are configured,
the apply preferred-value command applies. If the preferred value set by the apply preferred-value
command is 0 or no routing policy is configured, the peer preferred-value command applies.
Examples
# In BGP IPv4 unicast instance view, specify the preferred value as 50 for routes from peer 1.1.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family unicast
[Sysname-bgp-ipv4] peer 1.1.1.1 preferred-value 50
# In BGP-VPN IPv6 unicast instance view, specify the preferred value as 50 for routes from peer 1::1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] ipv6-family unicast
[Sysname-bgp-ipv6-vpn1] peer 1::1 preferred-value 50
Related commands
•
apply preferred-value
•
route-policy
peer prefix-list
Use peer prefix-list to reference a prefix list to filter routes received from or advertised to a peer or peer
group.
Use undo peer prefix-list to remove the configuration.
Syntax
In BGP IPv4 unicast instance view/BGP-VPN IPv4 unicast instance view:
peer { group-name | ip-address } prefix-list prefix-list-name { export | import }
undo peer { group-name | ip-address } prefix-list prefix-list-name { export | import }
In BGP IPv6 unicast instance view:
peer { group-name | ipv6-address } prefix-list ipv6-prefix-name { export | import }
undo peer { group-name | ipv6-address } prefix-list ipv6-prefix-name { export | import }
In BGP-VPN IPv6 unicast instance view:
peer { group-name | ipv6-address } prefix-list ipv6-prefix-name { export | import }
undo peer { group-name | ipv6-address } prefix-list ipv6-prefix-name { export | import }
293
Default
No prefix list based filtering is configured.
Views
BGP IPv4 unicast instance view, BGP-VPN IPv4 unicast instance view, BGP IPv6 unicast instance view,
BGP-VPN IPv6 unicast instance view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer
group must have been created.
ip-address: Specifies a peer by its IPv4 address. The peer must have been created.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-list-name: Specifies an IPv4 prefix list by its name, a case-sensitive string of 1 to 63 characters.
ipv6-prefix-name: Specifies an IPv6 prefix list by its name, a case-sensitive string of 1 to 63 characters.
export: Applies the filter to routes advertised to the specified peer/peer group.
import: Applies the filter to routes received from the specified peer/peer group.
Usage guidelines
The specified IPv4 prefix list or IPv6 prefix list must have been created with the ip prefix-list or ipv6
prefix-list command in system view. Otherwise, all routes can pass the IPv4/IPv6 prefix list.
Examples
# In BGP IPv4 unicast instance view, use the IPv4 prefix list list1 to filter routes advertised to the peer
group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family unicast
[Sysname-bgp-ipv4] peer test prefix-list list1 export
# In BGP-VPN IPv6 unicast instance view, use the IPv6 prefix list list1 to filter routes advertised to the peer
group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] ipv6-family unicast
[Sysname-bgp-ipv6-vpn1] peer test prefix-list list1 export
Related commands
•
filter-policy export
•
filter-policy import
•
ip prefix-list
•
ipv6 prefix-list
•
peer as-path-acl
•
peer filter-policy
•
peer route-policy
294
peer public-as-only
Use peer public-as-only to remove private AS numbers in BGP updates sent to an EBGP peer or peer
group.
Use undo peer public-as-only to restore the default.
Syntax
In BGP IPv4 unicast instance view/BGP-VPN IPv4 unicast instance view:
peer { group-name | ip-address } public-as-only
undo peer { group-name | ip-address } public-as-only
In BGP IPv6 unicast instance view:
peer { group-name | ipv6-address } public-as-only
undo peer { group-name | ipv6-address } public-as-only
In BGP-VPN IPv6 unicast instance view:
peer { group-name | ipv6-address } public-as-only
undo peer { group-name | ipv6-address } public-as-only
Default
BGP updates sent to an EBGP peer or peer group can carry both public and private AS numbers.
Views
BGP IPv4 unicast instance view, BGP-VPN IPv4 unicast instance view, BGP IPv6 unicast instance view,
BGP-VPN IPv6 unicast instance view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer
group must have been created.
ip-address: Specifies a peer by its IP address. The peer must have been created.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
Usage guidelines
Private AS numbers are typically used in test networks, and need not be transmitted in public networks.
The range of private AS numbers is from 64512 to 65535.
After you execute the command, you can get the following results:
•
If the AS_PATH attribute of a BGP update carries only private AS numbers, the device removes the
AS numbers before sending the update to the EBGP peer or peer group.
•
If the AS_PATH attribute carries both public and private AS numbers, the command does not take
effect. The device sends the BGP update to the EBGP peer or peer group without removing the
private AS numbers.
•
If the AS_PATH attribute carries AS numbers of the peer or peer group, the command does not take
effect. The device sends the BGP update to the peer or peer group without removing the private AS
numbers.
295
This command is only applicable to an EBGP peer or peer group.
Examples
# In BGP IPv4 unicast instance view, remove private AS numbers in BGP updates sent to EBGP peer
group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family unicast
[Sysname-bgp-ipv4] peer test public-as-only
# In BGP-VPN IPv6 unicast instance view, remove private AS numbers in BGP updates sent
to EBGP peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ip vpn-instance vpn1
[Sysname-bgp-vpn1] ipv6-family unicast
[Sysname-bgp-ipv6-vpn1] peer test public-as-only
peer reflect-client
Use peer reflect-client to configure the device as a route reflector and specify a peer or peer group as a
client.
Use undo peer reflect-client to restore the default.
Syntax
In BGP IPv4 unicast instance view/BGP-VPN IPv4 unicast instance view:
peer { group-name | ip-address } reflect-client
undo peer { group-name | ip-address } reflect-client
In BGP IPv6 unicast instance view:
peer { group-name | ipv6-address } reflect-client
undo peer { group-name | ipv6-address } reflect-client
Default
Neither the route reflector nor the client is configured.
Views
BGP IPv4 unicast instance view, BGP-VPN IPv4 unicast instance view, BGP IPv6 unicast instance view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer
group must have been created.
ip-address: Specifies a peer by its IP address. The peer must have been created.
ipv6-address: Specifies a peer by its IPv6 address. The p