Config Guide Routing
Config Guide Routing
Release
11.4
Published: 2011-11-08
This product includes memory allocation software developed by Mark Moraes, copyright © 1988, 1989, 1993, University of Toronto.
This product includes FreeBSD software developed by the University of California, Berkeley, and its contributors. All of the documentation
and software included in the 4.4BSD and 4.4BSD-Lite Releases is copyrighted by the Regents of the University of California. Copyright ©
1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994. The Regents of the University of California. All rights reserved.
GateD software copyright © 1995, the Regents of the University. All rights reserved. Gate Daemon was originated and developed through
release 3.0 by Cornell University and its collaborators. Gated is based on Kirton’s EGP, UC Berkeley’s routing daemon (routed), and DCN’s
HELLO routing protocol. Development of Gated has been supported in part by the National Science Foundation. Portions of the GateD
software copyright © 1988, Regents of the University of California. All rights reserved. Portions of the GateD software copyright © 1991, D.
L. S. Associates.
This product includes software developed by Maker Communications, Inc., copyright © 1996, 1997, Maker Communications, Inc.
Juniper Networks, Junos, Steel-Belted Radius, NetScreen, and ScreenOS are registered trademarks of Juniper Networks, Inc. in the United
States and other countries. The Juniper Networks Logo, the Junos logo, and JunosE are trademarks of Juniper Networks, Inc. All other
trademarks, service marks, registered trademarks, or registered service marks are the property of their respective owners.
Juniper Networks assumes no responsibility for any inaccuracies in this document. Juniper Networks reserves the right to change, modify,
transfer, or otherwise revise this publication without notice.
Products made or sold by Juniper Networks or components thereof might be covered by one or more of the following patents that are
owned by or licensed to Juniper Networks: U.S. Patent Nos. 5,473,599, 5,905,725, 5,909,440, 6,192,051, 6,333,650, 6,359,479, 6,406,312,
6,429,706, 6,459,579, 6,493,347, 6,538,518, 6,538,899, 6,552,918, 6,567,902, 6,578,186, and 6,590,785.
®
Junos OS Routing Protocols Configuration Guide
Release 11.4
Copyright © 2011, Juniper Networks, Inc.
All rights reserved.
Revision History
October 2011—R1 Junos OS 11.4
The information in this document is current as of the date listed in the revision history.
Juniper Networks hardware and software products are Year 2000 compliant. Junos OS has no known time-related limitations through the
year 2038. However, the NTP application is known to have some difficulty in the year 2036.
The Juniper Networks product that is the subject of this technical documentation consists of (or is intended for use with) Juniper Networks
software. Use of such software is subject to the terms and conditions of the End User License Agreement (“EULA”) posted at
http://www.juniper.net/support/eula.html. By downloading, installing or using such software, you agree to the terms and conditions
of that EULA.
Part 1 Overview
Chapter 1 Routing Protocols Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Chapter 2 Complete Routing and Routing Protocol Configuration Statements . . . . . . 17
Part 6 BGP
Chapter 33 Introduction to BGP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 975
Chapter 34 BGP Configuration Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 981
Chapter 35 Summary of BGP Configuration Statements . . . . . . . . . . . . . . . . . . . . . . . . 1293
Part 7 Indexes
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1395
Index of Statements and Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1423
Part 1 Overview
Chapter 1 Routing Protocols Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Routing Databases Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Routing Protocol Databases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Junos Routing Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Forwarding Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
How the Routing and Forwarding Tables Are Synchronized . . . . . . . . . . . . . . . 5
Route Preferences Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Alternate and Tiebreaker Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Multiple Active Routes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Understanding BGP Path Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Understanding Route Preference Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Equal-Cost Paths and Load Sharing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
IPv6 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
IPv6 Packet Headers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Header Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Extension Headers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
IPv6 Addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Address Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Address Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Address Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Address Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
IPv6 Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
destination-networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
disable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
discard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
dynamic-tunnels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
export . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
export-rib . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
fate-sharing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
forwarding-cache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
forwarding-table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
full . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
generate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
graceful-restart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
import . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
import-policy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
import-rib . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
independent-domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
indirect-next-hop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
install . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
instance-export . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
instance-import . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
interface (Multicast via Static Routes) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
interface (Multicast Scoping) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
interface-routes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
lsp-next-hop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
martians . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
maximum-paths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
maximum-prefixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
med-igp-update-interval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
metric . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
metric . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
metric (Aggregate, Generated, or Static Route) . . . . . . . . . . . . . . . . . . . . . . . 192
metric (Qualified Next Hop on Static Route) . . . . . . . . . . . . . . . . . . . . . . . . . 193
multicast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
next-hop (Access) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
next-hop (Access Internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
no-install . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
no-readvertise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
no-retain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
nonstop-routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
p2mp-lsp-next-hop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
passive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
policy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
ppm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
preference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
vlan-model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304
vrf-table-label . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304
vrf-target . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
csnp-interval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440
disable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441
disable (IS-IS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442
disable (LDP Synchronization) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443
export . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443
external-preference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444
family . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445
graceful-restart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446
hello-authentication-key . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447
hello-authentication-key-chain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448
hello-authentication-type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449
hello-interval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 450
hello-padding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451
hold-time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452
hold-time (IS-IS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452
hold-time (LDP Synchronization) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453
ignore-attached-bit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454
ignore-lsp-metrics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454
interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455
ipv4-multicast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456
ipv4-multicast-metric . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457
ipv6-multicast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457
ipv6-multicast-metric . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458
ipv6-unicast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458
ipv6-unicast-metric . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459
isis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460
label-switched-path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461
-synchronization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462
level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463
level (Global IS-IS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463
level (IS-IS Interfaces) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464
link-protection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465
loose-authentication-check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465
lsp-interval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466
lsp-lifetime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467
max-areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468
mesh-group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469
metric . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470
multicast-rpf-routes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470
no-adjacency-down-notification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471
no-adjacency-holddown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471
no-authentication-check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472
no-csnp-authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472
no-eligible-backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473
no-hello-authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473
no-ipv4-multicast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474
no-ipv4-routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474
no-ipv6-multicast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475
no-ipv6-routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475
no-ipv6-unicast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476
no-psnp-authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476
no-unicast-topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477
node-link-protection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477
overload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478
passive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479
point-to-point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 480
preference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 480
prefix-export-limit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481
priority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 482
reference-bandwidth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483
rib-group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484
shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485
spf-options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486
te-metric . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487
topologies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 488
traceoptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489
traffic-engineering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 491
wide-metrics-only . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492
Chapter 16 Introduction to OSPF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 493
OSPF Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494
OSPF Default Route Preference Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495
OSPF Routing Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495
OSPF Three-Way Handshake . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496
OSPF Version 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 497
OSPF Areas and Router Functionality Overview . . . . . . . . . . . . . . . . . . . . . . . . . 498
Areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498
Area Border Routers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498
Backbone Areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498
AS Boundary Routers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499
Backbone Router . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499
Internal Router . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499
Stub Areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499
Not-So-Stubby Areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 500
Transit Areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 500
Packets Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 500
OSPF Packet Header . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 500
Hello Packets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 501
Database Description Packets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 501
Link-State Request Packets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 501
Link-State Update Packets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 502
Link-State Acknowledgment Packets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 502
Link-State Advertisement Packet Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . 502
OSPF External Metrics Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 503
OSPF Routing Policy Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 503
Default OSPF Routing Policy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 503
Supported OSPF and OSPFv3 Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504
label-switched-path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 784
ldp-synchronization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 785
link-protection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 786
lsp-metric-into-summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 787
md5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 788
metric . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 789
metric-type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 791
neighbor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 792
network-summary-export . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 793
network-summary-import . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 794
no-domain-vpn-tag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 794
no-eligible-backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 795
no-interface-state-traps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 796
no-neighbor-down-notification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 796
no-nssa-abr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 797
no-rfc-1583 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 798
no-summaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 798
node-link-protection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 799
nssa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 800
ospf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 801
ospf3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 802
overload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 803
passive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 805
peer-interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 806
poll-interval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 807
preference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 808
prefix-export-limit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 809
priority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 810
realm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 811
reference-bandwidth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 812
retransmit-interval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 813
rib-group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 814
route-type-community . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 815
secondary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 815
sham-link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 816
sham-link-remote . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 816
shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 817
simple-password . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 818
spf-options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 819
stub . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 821
summaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 822
te-metric . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 823
traceoptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 824
traffic-engineering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 827
traffic-engineering (OSPF) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 828
traffic-engineering (Passive TE Mode) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 830
transit-delay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 831
transmit-interval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 832
type-7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 833
virtual-link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 834
Chapter 19 Introduction to RIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 835
RIP Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 835
RIP Protocol Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 835
RIP Packets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 836
RIP Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 836
Chapter 20 RIP Configuration Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 839
Configuring RIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 839
Minimum RIP Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 841
Overview of RIP Global Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 842
Overview of RIP Neighbor Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 842
Configuring Authentication for RIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 843
Configuring BFD for RIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 844
Overview of BFD Authentication for RIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 846
BFD Authentication Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 847
Security Authentication Keychains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 848
Strict Versus Loose Authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 848
Configuring BFD Authentication for RIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 848
Configuring BFD Authentication Parameters . . . . . . . . . . . . . . . . . . . . . . . . 849
Viewing Authentication Information for BFD Sessions . . . . . . . . . . . . . . . . . 850
Accepting RIP Packets with Nonzero Values in Reserved Fields . . . . . . . . . . . . . . 851
Applying Policies to RIP Routes Imported from Neighbors . . . . . . . . . . . . . . . . . 852
Configuring the Number of Route Entries in RIP Update Messages . . . . . . . . . . 852
Configuring the Metric Value Added to Imported RIP Routes . . . . . . . . . . . . . . . 852
Configuring RIP Update Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 853
Configuring Routing Table Groups for RIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 853
Configuring RIP Timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 853
Configuring Group-Specific RIP Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 854
Applying Policies to Routes Exported by RIP . . . . . . . . . . . . . . . . . . . . . . . . . 855
Configuring the Default Preference Value for RIP . . . . . . . . . . . . . . . . . . . . . 855
Configuring the Metric for Routes Exported by RIP . . . . . . . . . . . . . . . . . . . . 856
Configuring Graceful Restart for RIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 856
Disabling Strict Address Checking for RIP Messages . . . . . . . . . . . . . . . . . . . . . . 857
RIP Demand Circuits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 857
RIP Demand Circuits Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 857
RIP Demand Circuit Packets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 858
Timers Used by RIP Demand Circuits . . . . . . . . . . . . . . . . . . . . . . . . . . . 859
Example: Configuring RIP Demand Circuits . . . . . . . . . . . . . . . . . . . . . . . . . 860
Tracing RIP Protocol Traffic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 863
Example: Tracing RIP Protocol Traffic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 864
Example: Configuring RIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 864
Chapter 21 Summary of RIP Configuration Statements . . . . . . . . . . . . . . . . . . . . . . . . . 867
any-sender . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 867
authentication-key . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 868
authentication-type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 869
bfd-liveness-detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 870
check-zero . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 872
demand-circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 873
export . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 874
graceful-restart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 875
group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 876
holddown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 878
import . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 879
max-retrans-time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 880
message-size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 881
metric-in . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 882
metric-out . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 883
neighbor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 884
no-check-zero . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 885
preference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 885
receive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 886
rib-group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 887
rip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 887
route-timeout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 888
send . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 889
traceoptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 890
update-interval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 892
Chapter 22 Introduction to RIPng . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 893
RIPng Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 893
RIPng Protocol Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 893
RIPng Packets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 894
RIPng Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 894
Chapter 23 RIPng Configuration Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 895
Configuring RIPng . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 895
Minimum RIPng Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 896
Overview of RIPng Global Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 897
Overview of RIPng Neighbor Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 897
Applying Policies to RIPng Routes Imported from Neighbors . . . . . . . . . . . . . . . 897
Configuring the Metric Value Added to Imported RIPng Routes . . . . . . . . . . . . . 898
Configuring RIPng Update Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 898
Configuring RIPng Timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 898
Configuring Group-Specific RIPng Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . 899
Applying Policies to Routes Exported by RIPng . . . . . . . . . . . . . . . . . . . . . . 900
Configuring the Default Preference Value for RIPng . . . . . . . . . . . . . . . . . . . 900
Configuring the Metric for Routes Exported by RIPng . . . . . . . . . . . . . . . . . 900
Configuring Graceful Restart for RIPng . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 901
Tracing RIPng Protocol Traffic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 901
Example: Configuring RIPng . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 902
Chapter 24 Summary of RIPng Configuration Statements . . . . . . . . . . . . . . . . . . . . . . . 905
export . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 905
graceful-restart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 906
group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 907
holddown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 908
import . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 909
metric-in . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 910
metric-out . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 911
neighbor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 912
preference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 913
receive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 914
ripng . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 915
route-timeout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 915
send . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 916
traceoptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 917
update-interval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 919
Chapter 25 Introduction to ICMP Router Discovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 921
ICMP Router Discovery Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 921
Operation of a Router Discovery Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 921
Router Advertisement Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 922
ICMP Router Discovery Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 922
Chapter 26 ICMP Router Discovery Configuration Guidelines . . . . . . . . . . . . . . . . . . . . . 923
Configuring ICMP Router Discovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 923
Minimum ICMP Router Discovery Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . 924
Configuring the Addresses Included in ICMP Router Advertisements . . . . . . . . . 924
Configuring the Frequency of ICMP Router Advertisements . . . . . . . . . . . . . . . . 925
Modifying the Lifetime in ICMP Router Advertisements . . . . . . . . . . . . . . . . . . . . 925
Tracing ICMP Protocol Traffic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 925
Example: Tracing ICMP Protocol Traffic . . . . . . . . . . . . . . . . . . . . . . . . . . . . 926
Chapter 27 Summary of ICMP Router Discovery Configuration Statements . . . . . . . . 927
address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 927
advertise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 928
broadcast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 928
disable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 929
ignore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 929
ineligible . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 929
interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 930
lifetime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 931
max-advertisement-interval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 932
min-advertisement-interval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 933
multicast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 934
priority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 935
router-discovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 935
traceoptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 936
Chapter 28 Introduction to Neighbor Discovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 939
Neighbor Discovery Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 939
Router Discovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 940
Address Resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 940
Redirect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 940
Neighbor Discovery Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 940
Part 6 BGP
Chapter 33 Introduction to BGP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 975
Understanding BGP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 976
Autonomous Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 976
AS Paths and Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 976
External and Internal BGP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 977
BGP Routes Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 977
BGP Messages Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 978
Open Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 979
Update Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 979
Keepalive Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 980
Notification Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 980
Chapter 34 BGP Configuration Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 981
Examples: Configuring External BGP Peering . . . . . . . . . . . . . . . . . . . . . . . . . . . . 982
Understanding External BGP Peering Sessions . . . . . . . . . . . . . . . . . . . . . . 982
Example: Configuring External BGP Point-to-Point Peer Sessions . . . . . . . 983
Example: Configuring External BGP on Logical Systems with IPv6
Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 990
Examples: Configuring Internal BGP Peering . . . . . . . . . . . . . . . . . . . . . . . . . . . . 999
Understanding BGP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1000
Autonomous Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1000
AS Paths and Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1000
External and Internal BGP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1001
Example: Configuring Internal BGP Peer Sessions . . . . . . . . . . . . . . . . . . . . 1001
Example: Configuring Internal BGP Peering Sessions on Logical Systems . . 1012
import . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1337
include-mp-next-hop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1338
ipsec-sa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1339
iso-vpn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1340
keep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1341
labeled-unicast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1342
local-address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1344
local-as . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1346
local-interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1348
local-preference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1349
log-updown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1350
logical-systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1351
loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1352
metric-out . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1354
mtu-discovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1356
multihop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1358
multipath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1359
neighbor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1360
no advertise-peer-as . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1363
no-aggregator-id . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1364
no-client-reflect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1365
no-validate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1366
out-delay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1367
outbound-route-filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1368
passive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1369
path-count . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1370
path-selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1371
peer-as . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1373
precision-timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1375
preference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1376
prefix-limit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1377
prefix-policy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1378
receive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1379
remove-private . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1380
resolve-vpn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1381
rib . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1382
rib-group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1383
route-target . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1384
send . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1385
session-mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1386
tcp-mss . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1387
traceoptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1388
type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1391
vpn-apply-export . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1392
Part 7 Indexes
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1395
Index of Statements and Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1423
Figure 21: OSPF Network Topology with Stub Areas and NSSAs . . . . . . . . . . . . . 526
Figure 22: OSPF Network Topology with Stub Areas and NSSAs . . . . . . . . . . . . 530
Figure 23: IPv4 Unicast Realm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556
Figure 24: Summarizing Ranges of Routes in OSPF . . . . . . . . . . . . . . . . . . . . . . . 559
Figure 25: OSPF Metric Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 569
Figure 26: Configuration for Multiple Routing Instances . . . . . . . . . . . . . . . . . . . 604
Figure 27: Advertising an LSP into OSPFv2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 661
Figure 28: OSPFv2 Sham Link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 671
Figure 29: OSPFv2 Sham Link Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673
Figure 30: Sample Topology Used for an OSPF Export Network Summary
Policy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 697
Figure 31: Sample Topology Used for an OSPF Import Network Summary
Policy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 705
Figure 32: OSPF on Logical Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 713
Figure 33: OSPF with a Conditional Default Route to an ISP . . . . . . . . . . . . . . . . 720
Figure 34: OSPF with a Default Route to an ISP . . . . . . . . . . . . . . . . . . . . . . . . . . 726
Figure 35: OSPF Import Policy on Logical Systems . . . . . . . . . . . . . . . . . . . . . . . . 731
Figure 36: Sample OSPF Network Topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 746
Part 6 BGP
Chapter 33 Introduction to BGP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 975
Figure 37: ASs, EBGP, and IBGP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 977
Chapter 34 BGP Configuration Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 981
Figure 38: BGP Peering Session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 982
Figure 39: Typical Network with BGP Peer Sessions . . . . . . . . . . . . . . . . . . . . . . 983
Figure 40: Typical Network with BGP Peer Sessions . . . . . . . . . . . . . . . . . . . . . . 991
Figure 41: ASs, EBGP, and IBGP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1001
Figure 42: Typical Network with IBGP Sessions . . . . . . . . . . . . . . . . . . . . . . . . . 1003
Figure 43: Typical Network with IBGP Sessions . . . . . . . . . . . . . . . . . . . . . . . . . . 1013
Figure 44: Topology for the EBGP Case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1025
Figure 45: Topology for the RR Case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1025
Figure 46: Simple Route Reflector Topology (One Cluster) . . . . . . . . . . . . . . . . 1033
Figure 47: Basic Route Reflection (Multiple Clusters) . . . . . . . . . . . . . . . . . . . . . 1034
Figure 48: Hierarchical Route Reflection (Clusters of Clusters) . . . . . . . . . . . . . 1034
Figure 49: IBGP Network Using a Route Reflector . . . . . . . . . . . . . . . . . . . . . . . 1036
Figure 50: BGP Confederations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1050
Figure 51: Typical Network Using BGP Confederations . . . . . . . . . . . . . . . . . . . . 1052
Figure 52: Authentication for BGP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1059
Figure 53: IPsec for BGP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1065
Figure 54: Default MED Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1068
Figure 55: Typical Network with IBGP Sessions and Multiple Exit Points . . . . . . 1071
Figure 56: Typical Network with IBGP Sessions and Multiple Exit Points . . . . . 1083
Figure 57: Topology for Delaying the MED Update . . . . . . . . . . . . . . . . . . . . . . . 1097
Figure 58: Typical Network with EBGP Multihop Sessions . . . . . . . . . . . . . . . . . 1106
Figure 59: BGP Load Balancing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1116
Figure 60: Topology for Accepting a Remote Next Hop . . . . . . . . . . . . . . . . . . . . 1120
Figure 61: Typical Network with IBGP Sessions and Multiple Exit Points . . . . . . . 1132
Figure 62: BGP Preference Value Topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1147
Part 1 Overview
Chapter 1 Routing Protocols Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Table 3: Default Route Preference Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Part 6 BGP
Chapter 34 BGP Configuration Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 981
Table 12: MED Options for Routing Table Path Selection . . . . . . . . . . . . . . . . . . 1069
Table 13: Default Route Preference Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1144
Table 14: Damping Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1187
If the information in the latest release notes differs from the information in the
documentation, follow the Junos OS Release Notes.
®
To obtain the most current version of all Juniper Networks technical documentation,
see the product documentation page on the Juniper Networks website at
http://www.juniper.net/techpubs/ .
Juniper Networks supports a technical book program to publish books by Juniper Networks
engineers and subject matter experts with book publishers around the world. These
books go beyond the technical documentation to explore the nuances of network
architecture, deployment, and administration using the Junos operating system (Junos
OS) and Juniper Networks devices. In addition, the Juniper Networks Technical Library,
published in conjunction with O'Reilly Media, explores improving network security,
reliability, and availability using Junos OS configuration techniques. All the books are for
sale at technical bookstores and book outlets around the world. The current list can be
viewed at http://www.juniper.net/books .
Objectives
This guide is designed for network administrators who are configuring and monitoring a
Juniper Networks J Series, M Series, MX Series, or T Series routing platform.
Audience
This guide is designed for network administrators who are configuring and monitoring a
Juniper Networks M Series, MX Series, T Series, EX Series, or J Series router or switch.
To use this guide, you need a broad understanding of networks in general, the Internet
in particular, networking principles, and network configuration. You must also be familiar
with one or more of the following Internet routing protocols:
Personnel operating the equipment must be trained and competent; must not conduct
themselves in a careless, willfully negligent, or hostile manner; and must abide by the
instructions provided by the documentation.
Supported Platforms
For the features described in this manual, the Junos OS currently supports the following
platforms:
• J Series
• M Series
• MX Series
• T Series
• EX Series
This reference contains two indexes: a complete index that includes topic entries, and
an index of statements and commands only.
• The secondary entry, usage guidelines, refers to the section in a configuration guidelines
chapter that describes how to use the statement or command.
If you want to use the examples in this manual, you can use the load merge or the load
merge relative command. These commands cause the software to merge the incoming
configuration into the current candidate configuration. The example does not become
active until you commit the candidate configuration.
If the example configuration contains the top level of the hierarchy (or multiple
hierarchies), the example is a full example. In this case, use the load merge command.
If the example configuration does not start at the top level of the hierarchy, the example
is a snippet. In this case, use the load merge relative command. These procedures are
described in the following sections.
1. From the HTML or PDF version of the manual, copy a configuration example into a
text file, save the file with a name, and copy the file to a directory on your routing
platform.
For example, copy the following configuration to a file and name the file ex-script.conf.
Copy the ex-script.conf file to the /var/tmp directory on your routing platform.
system {
scripts {
commit {
file ex-script.xsl;
}
}
}
interfaces {
fxp0 {
disable;
unit 0 {
family inet {
address 10.0.0.1/24;
}
}
}
}
2. Merge the contents of the file into your routing platform configuration by issuing the
load merge configuration mode command:
[edit]
user@host# load merge /var/tmp/ex-script.conf
load complete
Merging a Snippet
To merge a snippet, follow these steps:
1. From the HTML or PDF version of the manual, copy a configuration snippet into a text
file, save the file with a name, and copy the file to a directory on your routing platform.
For example, copy the following snippet to a file and name the file
ex-script-snippet.conf. Copy the ex-script-snippet.conf file to the /var/tmp directory
on your routing platform.
commit {
file ex-script-snippet.xsl; }
2. Move to the hierarchy level that is relevant for this snippet by issuing the following
configuration mode command:
[edit]
user@host# edit system scripts
[edit system scripts]
3. Merge the contents of the file into your routing platform configuration by issuing the
load merge relative configuration mode command:
For more information about the load command, see the Junos OS CLI User Guide.
Documentation Conventions
Caution Indicates a situation that might result in loss of data or hardware damage.
Laser warning Alerts you to the risk of personal injury from a laser.
Table 2 on page xli defines the text and syntax conventions used in this guide.
Bold text like this Represents text that you type. To enter configuration mode, type the
configure command:
user@host> configure
Fixed-width text like this Represents output that appears on the user@host> show chassis alarms
terminal screen.
No alarms currently active
Italic text like this • Introduces important new terms. • A policy term is a named structure
• Identifies book names. that defines match conditions and
actions.
• Identifies RFC and Internet draft titles.
• Junos OS System Basics Configuration
Guide
• RFC 1997, BGP Communities Attribute
Italic text like this Represents variables (options for which Configure the machine’s domain name:
you substitute a value) in commands or
configuration statements. [edit]
root@# set system domain-name
domain-name
Text like this Represents names of configuration • To configure a stub area, include the
statements, commands, files, and stub statement at the [edit protocols
directories; interface names; ospf area area-id] hierarchy level.
configuration hierarchy levels; or labels • The console port is labeled CONSOLE.
on routing platform components.
< > (angle brackets) Enclose optional keywords or variables. stub <default-metric metric>;
# (pound sign) Indicates a comment specified on the rsvp { # Required for dynamic MPLS only
same line as the configuration statement
to which it applies.
[ ] (square brackets) Enclose a variable for which you can community name members [
substitute one or more values. community-ids ]
> (bold right angle bracket) Separates levels in a hierarchy of J-Web In the configuration editor hierarchy,
selections. select Protocols>Ospf.
Documentation Feedback
Technical product support is available through the Juniper Networks Technical Assistance
Center (JTAC). If you are a customer with an active J-Care or JNASC support contract,
or are covered under warranty, and need postsales technical support, you can access
our tools and resources online or open a case with JTAC.
• JTAC Hours of Operation —The JTAC centers have resources available 24 hours a day,
7 days a week, 365 days a year.
• Find solutions and answer questions using our Knowledge Base: http://kb.juniper.net/
To verify service entitlement by product serial number, use our Serial Number Entitlement
(SNE) Tool: https://tools.juniper.net/SerialNumberEntitlementSearch/
Overview
• Routing Protocols Concepts on page 3
• Complete Routing and Routing Protocol Configuration Statements on page 17
• Routing table—Contains all the routing information learned by all routing protocols.
• Forwarding table—Contains the routes actually used to forward packets through the
router.
In addition, the interior gateway protocols (IGPs), IS-IS, and OSPF maintain link-state
databases.
IS-IS and OSPF use the Dijkstra algorithm, and RIP and RIPng use the Bellman-Ford
algorithm to determine the best route or routes (if there are multiple equal-cost routes)
to reach each destination and install these routes into the Junos OS routing table.
When you configure a protocol on an interface, you must also configure a protocol family
on that interface.
By default, the Junos OS maintains three routing tables: one for unicast routes, another
for multicast routes, and a third for MPLS. You can configure additional routing tables to
support situations where you need to separate a particular group of routes or where you
need greater flexibility in manipulating routing information. In general, most operations
can be performed without resorting to the complexity of additional routing tables.
However, creating additional routing tables has several specific uses, including importing
interface routes into more than one routing table, applying different routing policies when
exporting the same route to different peers, and providing greater flexibility with
incongruent multicast topologies.
Each routing table is identified by a name, which consists of the protocol family followed
by a period and a small, nonnegative integer. The protocol family can be inet (Internet),
iso (ISO), or mpls (MPLS). The following names are reserved for the default routing tables
maintained by the Junos OS:
• inet.2—Unicast routes used for multicast reverse path forwarding (RPF) lookup
Forwarding Tables
The Junos OS installs all active routes from the routing table into the forwarding table.
The active routes are used to forward packets to their destinations.
The Junos OS kernel maintains a master copy of the forwarding table. It copies the
forwarding table to the Packet Forwarding Engine, which is the part of the router
responsible for forwarding packets.
For unicast routes, the Junos OS routing protocol process uses the information in its
routing table, along with the properties set in the configuration file, to choose an active
route for each destination. While the Junos OS might know of many routes to a destination,
the active route is the preferred route to that destination and is the one that is installed
in the forwarding table and used when actually routing packets.
The routing protocol process generally determines the active route by selecting the route
with the lowest preference value. The preference value is an arbitrary value in the range
32
from 0 through 4,294,967,295 (2 – 1) that the software uses to rank routes received
from different protocols, interfaces, or remote systems.
The software uses a 4-byte value to represent the route preference value. When using
the preference value to select an active route, the software first compares the primary
route preference values, choosing the route with the lowest value. If there is a tie and a
secondary preference has been configured, the software compares the secondary
preference values, choosing the route with the lowest value. The secondary preference
values must be included in a set for the preference values to be considered.
ends up with about 300 routes pointing at it. This mechanism provides load distribution
among the paths while maintaining packet ordering per destination.
BGP multipath does not apply to paths that share the same MED-plus-IGP cost yet differ
in IGP cost. Multipath path selection is based on the IGP cost metric, even if two paths
have the same MED-plus-IGP cost.
For each prefix in the routing table, the routing protocol process selects a single best
path. After the best path is selected, the route is installed in the routing table. The best
path becomes the active route if the same prefix is not learned by a protocol with a lower
(more preferred) global preference value. The algorithm for determining the active route
is as follows:
2. Choose the path with the lowest preference value (routing protocol process
preference).
Routes that are not eligible to be used for forwarding (for example, because they were
rejected by routing policy or because a next hop is inaccessible) have a preference of
–1 and are never chosen.
For non-BGP paths, choose the path with the lowest preference2 value.
4. For BGP, prefer the path with the shortest autonomous system (AS) path value
(skipped if the as-path-ignore statement is configured).
5. For BGP, prefer the route with the lower origin code.
Routes learned from an interior gateway protocol (IGP) have a lower origin code than
those learned from an exterior gateway protocol (EGP), and both have lower origin
codes than incomplete routes (routes whose origin is unknown).
6. For BGP, prefer the path with the lowest multiple exit discriminator (MED) metric.
• If nondeterministic routing table path selection behavior is not configured (that is,
if the path-selection cisco-nondeterministic statement is not included in the BGP
configuration), for paths with the same neighboring AS numbers at the front of the
AS path, prefer the path with the lowest MED metric. To always compare MEDs
whether or not the peer ASs of the compared routes are the same, include the
path-selection always-compare-med statement.
• If nondeterministic routing table path selection behavior is configured (that is, the
path-selection cisco-nondeterministic statement is included in the BGP
configuration), prefer the path with the lowest MED metric.
Confederations are not considered when determining neighboring ASs. A missing MED
metric is treated as if a MED were present but zero.
7. Prefer strictly internal paths, which include IGP routes and locally generated routes
(static, direct, local, and so forth).
8. Prefer strictly external BGP (EBGP) paths over external paths learned through internal
BGP (IBGP) sessions.
9. For BGP, prefer the path whose next hop is resolved through the IGP route with the
lowest metric.
NOTE: A path is considered a BGP equal-cost path (and will be used for
forwarding) if a tie-break is performed after the previous step. All paths
with the same neighboring AS, learned by a multipath-enabled BGP
neighbor, are considered.
BGP multipath does not apply to paths that share the same MED-plus-IGP
cost yet differ in IGP cost. Multipath path selection is based on the IGP
cost metric, even if two paths have the same MED-plus-IGP cost.
10. For BGP, if both paths are external, prefer the currently active path to minimize
route-flapping. This rule is not used if:
11. For BGP, prefer the path from the peer with the lowest router ID. For any path with an
originator ID attribute, substitute the originator ID for the router ID during router ID
comparison.
12. For BGP, prefer the path with the shortest cluster list length. The length is 0 for no list.
13. For BGP, prefer the path from the peer with the lowest peer IP address.
By default, only the multiple exit discriminators (MEDs) of routes that have the same
peer autonomous systems (ASs) are compared. You can configure routing table path
selection options to obtain different behaviors.
The third step of the algorithm, by default, evaluates the length of the AS path and
determines the active path. You can configure an option that enables Junos OS to skip
this third step of the algorithm by including the as-path-ignore option.
To configure routing table path selection behavior, include the path-selection statement:
path-selection {
(always-compare-med | cisco-non-deterministic | external-router-id);
as-path-ignore;
med-plus-igp {
igp-multiplier number;
med-multiplier number;
}
}
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
Routing table path selection can be configured in one of the following ways:
• Using the same nondeterministic behavior as does the Cisco IOS software
(cisco-non-deterministic). This behavior has two effects:
• The active path is always first. All nonactive but eligible paths follow the active path
and are maintained in the order in which they were received, with the most recent
path first. Ineligible paths remain at the end of the list.
• When a new path is added to the routing table, path comparisons are made without
removing from consideration those paths that should never be selected because
those paths lose the MED tie-breaking rule.
NOTE: The result of these two effects is that the system only sometimes
compares the MED values between paths that it should otherwise compare.
Because of this, we recommend that you not configure nondeterministic
behavior.
• Always comparing MEDs whether or not the peer ASs of the compared routes are the
same (always-compare-med).
• Comparing the router ID between external BGP paths to determine the active path
(external-router-id). By default, router ID comparison is not performed if one of the
external paths is active. You can force the router ID comparison by restarting the routing
process with the restart routing operational-mode command.
• Adding the IGP cost to the next-hop destination to the MED value before comparing
MED values for path selection.
BGP multipath does not apply to paths that share the same MED-plus-IGP cost, yet
differ in IGP cost. Multipath path selection is based on the IGP cost metric, even if two
paths have the same MED-plus-IGP cost.
Related • Example: Ignoring the AS Path Attribute When Selecting the Best Path on page 1153
Documentation
• Example: Always Comparing MEDs
The Junos OS routing protocol process assigns a default preference value (also known
as an administrative distance) to each route that the routing table receives. The default
value depends on the source of the route. The preference value is a value from 0
32
through 4,294,967,295 (2 – 1), with a lower value indicating a more preferred route.
Table 3 on page 10 lists the default preference values.
System routes 4 –
Redirects 30 –
Kernel 40 –
SNMP 50 –
Router discovery 55 –
In general, the narrower the scope of the statement, the higher precedence its preference
value is given, but the smaller the set of routes it affects. To modify the default preference
value for routes learned by routing protocols, you generally apply routing policy when
configuring the individual routing protocols. You also can modify some preferences with
other configuration statements, which are indicated in the table.
For equal-cost paths, load sharing is based on the BGP next hop. For example, if four
prefixes all point to a next hop and there is more than one equal-cost path to that next
hop, the routing protocol process uses a hash algorithm to choose the path among the
four prefixes. Also, for each prefix, the routing protocol process installs a single forwarding
entry pointing along one of the paths. The routing software does not rehash the path
taken as prefixes pointing to the next hop come and go, but it does rehash if the number
of paths to the next hop changes. Because a prefix is tied to a particular path, packet
reordering should not happen. The degree of load sharing improves as the number of
prefixes increases.
IPv6 Overview
IP version 6 (IPv6) is the latest version of IP. IP enables numerous nodes on different
networks to interoperate seamlessly. IP version 4 (IPv4) is currently used in intranets
and private networks, as well as the Internet. IPv6 is the successor to IPv4, and is based
for the most part on IPv4.
IPv4 has been widely deployed and used to network the Internet today. With the rapid
growth of the Internet, enhancements to IPv4 are needed to support the influx of new
subscribers, Internet-enabled devices, and applications. IPv6 is designed to enable the
global expansion of the Internet.
• Improved privacy and security—IPv6 supports extensions for authentication and data
integrity, which enhance privacy and security.
This section discusses the following topics that provide background information about
IPv6 headers:
Header Structure
IPv6 packet headers contain many of the fields found in IPv4 packet headers; some of
these fields have been modified from IPv4. The 40-byte IPv6 header consists of the
following 8 fields:
• Flow label—Packet flows requiring a specific class of service. The flow label identifies
all packets belonging to a specific flow, and routers can identify these packets and
handle them in a similar fashion.
• Hop limit—Maximum number of hops allowed. Previously the time-to-live (TTL) field
in IPv4.
• Next header—Next extension header to examine. Previously the protocol field in IPv4.
• Payload length—Length of the IPv6 payload. Previously the total length field in IPv4.
• Version—Version of IP.
Extension Headers
Extension headers are placed between the IPv6 header and the upper layer header in a
packet.
Extension headers are chained together using the next header field in the IPv6 header.
The next header field indicates to the router which extension header to expect next. If
there are no more extension headers, the next header field indicates the upper layer
header (TCP header, User Datagram Protocol [UDP] header, ICMPv6 header, an
encapsulated IP packet, or other items).
IPv6 Addressing
IPv6 uses a 128-bit addressing model. This creates a much larger address space than
IPv4 addresses, which are made up of 32 bits. IPv6 addresses also contain a scope field
that categorizes what types of applications are suitable for the address. IPv6 does not
support broadcast addresses, but instead uses multicast addresses to serve this role. In
addition, IPv6 also defines a new type of address called anycast.
This section discusses the following topics that provide background information about
IPv6 addressing:
Address Representation
aaaa:aaaa:aaaa:aaaa:aaaa:aaaa:aaaa:aaaa
3FFE:0000:0000:0001:0200:F8FF:FE75:50DF
3FFE:0:0:1:200:F8FF:FE75:50DF
You can compress 16-bit groups of zeros to the notation :: (two colons), as shown here,
but only once per address:
3FFE::1:200:F8FF:FE75:50DF
Address Types
• Multicast—For a set of interfaces on the same physical medium. A packet is sent to all
of the interfaces associated with the address.
Address Scope
IPv6 addresses have scope, which identifies the application suitable for the address.
Unicast and multicast addresses support scoping.
Unicast addresses support two types of scope: global scope and local scope. There are
two types of local scope: link-local addresses and site-local addresses. Link-local unicast
addresses are used within a single network link. The first ten bits of the prefix identify the
address as a link-local address. Link-local addresses cannot be used outside a network
link. Site-local unicast addresses are used within a site or intranet. A site consists of
multiple network links, and site-local addresses identify nodes inside the intranet.
Site-local addresses cannot be used outside the site.
Multicast addresses support 16 different types of scope, including node, link, site,
organization, and global scope. A 4-bit field in the prefix identifies the scope.
Address Structure
Unicast addresses identify a single interface. The address consists of n bits for the prefix,
and 128 – n bits for the interface ID.
Multicast addresses identify a set of interfaces. The address is made up of the first 8 bits
of all ones, a 4-bit flags field, a 4-bit scope field, and a 112-bit group ID:
The first octet of ones identifies the address as a multicast address. The flags field
identifies whether the multicast address is a well-known address or a transient multicast
address. The scope field identifies the scope of the multicast address. The 112-bit group
ID identifies the multicast group.
IPv6 Standards
• RFC 2463, Internet Control Message Protocol (ICMPv6) for the Internet Protocol Version 6
• RFC 2474, Definition of the Differentiated Services Field (DS Field) in the IPv4 and IPv6
Headers
• RFC 2767, Dual Stack Hosts using the “Bump-In-the-Stack” Technique (BIS)
To access Internet Requests for Comments (RFCs) and drafts, see http://www.ietf.org.
For a list of the complete configuration statement hierarchy, see the Junos OS Hierarchy
and RFC Reference.
The following lists the statements that can be included at the [edit logical-systems]
hierarchy level and are also documented in this manual.
logical-systems {
logical-system-name {
protocols {
bgp {
bgp-configuration;
}
isis {
isis-configuration;
}
ospf {
ospf-configuration;
}
ospf3 {
ospf3-configuration;
}
rip {
rip-configuration;
}
ripng {
ripng-configuration;
}
router-advertisement {
router-advertisement-configuration;
}
router-discovery {
router-discovery-configuration;
}
}
routing-instances {
routing-instance-name {
routing-instance-configuration;
}
}
routing-options {
routing-option-configuration;
}
}
}
protocols {
disable;
export [ policy-names ];
family family-name{
... family-configuration ...
graceful-restart {
disable;
restart-time seconds;
stale-routes-time seconds;
}
group group-name {
... group-configuration ...
}
hold-time seconds;
idle-after-switch-over (seconds | forever);
import [ policy-names ];
include-mp-next-hop;
ipsec-sa ipsec-sa;
keep (all | none);
local-address address;
local-as autonomous-system <private>;
local-interface interface-name;
local-preference local-preference;
log-updown;
metric-out (metric | igp (delay-med-update | <metric-offset>) | minimum-igp
<metric-offset>);
mtu-discovery;
multihop {
no-nexthop-change;
ttl ttl-value;
}
no-aggregator-id;
no-client-reflect;
outbound-route-filter{
bgp-orf-cisco-mode;
prefix-based {
accept {
(inet | inet6);
}
}
}
out-delay seconds;
passive;
path-selection {
(cisco-non-deterministic | always-compare-med | external-router-id);
med-plus-igp {
igp-multiplier number;
med-multiplier number;
}
}
peer-as autonomous-system;
preference preference;
remove-private;
tcp-mss segment-size;
traceoptions {
file filename <files number> <size size> <world-readable | no-world-readable>;
flag flag <flag-modifier> <disable>;
}
vpn-apply-export;
}
maximum number;
teardown <percentage> <idle-timeout (forever | minutes)>;
}
}
(inet-mdt | inet-mvpn | inet6-mvpn | l2-vpn) {
signaling {
accepted-prefix-limit {
maximum number;
teardown <percentage> <idle-timeout (forever | minutes)>;
}
<loops number>;
prefix-limit {
maximum number;
teardown <percentage> <idle-timeout (forever | minutes)>;
}
rib-group group-name
}
}
}
accepted-prefix-limit {
maximum number;
teardown <percentage> <idle-timeout (forever | minutes)>;
}
<loops number>;
prefix-limit {
maximum number;
teardown <percentage> <idle-timeout (forever | minutes)>;
}
rib-groupgroup-name
}
}
}
graceful-restart {
disable;
restart-time seconds;
stale-routes-time seconds;
}
hold-time seconds;
idle-after-switch-over (seconds | forever);
import [ policy-names ];
include-mp-next-hop;
ipsec-sa ipsec-sa;
keep (all | none);
local-address address;
local-as autonomous-system <private>;
local-interface;
local-preference local-preference;
log-updown;
metric-out (metric | minimum-igp <offset> | igp <offset>);
mtu-discovery;
multihop <ttl-value>;
multipath {
multiple-as;
}
no-advertise-peer-as;
no-aggregator-id;
no-client-reflect;
outbound-route-filter {
bgp-orf-cisco-mode;
prefix-based {
accept {
(inet | inet6);
}
}
}
out-delay seconds;
passive;
peer-as autonomous-system;
preference preference;
remove-private;
tcp-mss segment-size;
traceoptions {
file filename <files number> <size size> <world-readable | no-world-readable>;
flag flag <flag-modifier> <disable>;
}
type type;
vpn-apply-export;
}
flow {
no-validate policy-name;
}
labeled-unicast {
accepted-prefix-limit {
maximum number;
teardown <percentage> <idle-timeout (forever | minutes)>;
}
aggregate-label {
community community-name:
}
explicit-null {
connected-only;
}
prefix-limit {
maximum number;
teardown <percentage> <idle-timeout (forever | minutes)>;
}
resolve-vpn;
rib inet.3;
rib-group group-name;
}
}
route-target {
accepted-prefix-limit {
maximum number;
teardown <percentage> <idle-timeout (forever | minutes)>;
}
advertise-default;
external-paths number;
prefix-limit {
maximum number;
teardown <percentage> <idle-timeout (forever | minutes)>;
}
}
(inet-mdt | inet-mvpn | inet6-mvpn | l2-vpn) {
signaling {
accepted-prefix-limit {
maximum number;
teardown <percentage> <idle-timeout (forever | minutes)>;
}
<loops number>;
prefix-limit {
maximum number;
teardown <percentage> <idle-timeout (forever | minutes)>;
}
rib-group group-name
}
}
}
graceful-restart {
disable;
restart-time seconds;
stale-routes-time seconds;
}
hold-time seconds;
idle-after-switch-over (seconds | forever);
import [ policy-names ];
include-mp-next-hop;
ipsec-sa ipsec-sa;
keep (all | none);
local-address address;
local-as autonomous-system <private>;
local-interface interface-name;
local-preference local-preference;
log-updown;
metric-out (metric | minimum-igp <offset> | igp <offset>);
mtu-discovery;
multihop <ttl-value>;
multipath {
multiple-as;
}
no-advertise-peer-as;
no-aggregator-id;
no-client-reflect;
out-delay seconds;
outbound-route-filter {
bgp-orf-cisco-mode;
prefix-based {
accept {
(inet | inet6);
}
}
}
passive;
peer-as autonomous-system;
preference preference;
remove-private;
tcp-mss segment-size;
traceoptions {
file filename <files number> <size size> <world-readable | no-world-readable>;
flag flag <flag-modifier> <disable>;
}
vpn-apply-export;
IS-IS isis {
clns-routing;
disable;
export [ policy-names ];
graceful-restart {
disable;
helper-disable;
restart-duration seconds;
}
ignore-attached-bit;
interface (all | interface-name) {
bfd-liveness-detection {
authentication {
algorithm algorithm-name;
key-chain key-chain-name;
loose-check;
}
detection-time {
threshold milliseconds;
}
minimum-interval milliseconds;
minimum-receive-interval milliseconds;
transmit-interval {
threshold milliseconds;
minimum-interval milliseconds;
}
multiplier number;
}
checksum;
csnp-interval (seconds | disable);
disable;
hello-padding (adaptive | loose | strict);
ldp-synchronization {
disable;
hold-time seconds;
}
level level-number {
disable;
hello-authentication-key key;
hello-authentication-key-chain key-chain-name;
hello-authentication-type authentication;
hello-interval seconds;
hold-time seconds;
ipv4-multicast-metric number;
ipv6-multicast-metric number;
ipv6-unicast-metric number;
metric metric;
passive;
priority number;
te-metric metric;
}
link-protection;
lsp-interval milliseconds;
mesh-group (value | blocked);
no-adjacency-holddown;
no-eligible-backup;
no-ipv4-multicast;
no-ipv6-multicast;
no-ipv6-unicast;
no-unicast-topology;
node-link-protection;
passive;
point-to-point;
}
label-switched-path namelevel level metric metric;
level level-number {
authentication-key key;
authentication-key-chain key-chain-name;
authentication-type authentication;
external-preference preference;
ipv6-multicast-metric number;
no-csnp-authentication;
no-hello-authentication;
no-psnp-authentication;
preference preference;
prefix-export-limit number;
wide-metrics-only;
}
loose-authentication-check;
lsp-lifetime seconds;
max-areas number;
no-adjacency-holddown;
no-authentication-check;
no-ipv4-routing;
no-ipv6-routing;
overload {
advertise-high-metrics;
timeout seconds;
}
reference-bandwidth reference-bandwidth;
rib-group {
inet group--name;
inet6 group--name;
}
spf-options {
delay milliseconds;
holddown milliseconds;
rapid-runs number;
}
topologies {
ipv4-multicast;
ipv6-multicast;
ipv6-unicast;
}
traceoptions {
file filename <files number> <size size> <world-readable | no-world-readable>;
flag flag <flag-modifier> <disable>;
}
traffic-engineering {
disable;
family inet {
shortcuts <ignore-lsp-metrics> {
multicast-rpf-routes;
}
}
family inet6 {
shortcuts;
}
}
}
OSPF ospf {
disable;
export [ policy-names ];
external-preference preference;
graceful-restart {
disable;
helper-disable;
notify-duration seconds;
restart-duration seconds;
}
import [ policy-names ];
no-nssa-abr;
overload {
timeout seconds;
}
preference preference;
reference-bandwidth reference-bandwidth;
rib-group group-name;
sham-link {
local address;
}
spf-options {
delay milliseconds;
holddown milliseconds;
rapid-runs milliseconds;
}
traffic-engineering {
accept-unnumbered-interfaces;
multicast-rpf-routes;
no-topology;
shortcuts {
ignore-lsp-metrics;
lsp-metric-into-summary;
}
}
traceoptions {
file filename <files number> <size size> <world-readable | no-world-readable>;
flag flag <flag-modifier> <disable>;
}
area area-id {
area-range network/mask-length <restrict> <exact> <override-metric metric>;
interface interface-name {
demand-circuit;
disable;
bfd-liveness-detection {
authentication {
algorithm algorithm-name;
key-chain key-chain-name;
loose-check;
}
detection-time {
threshold milliseconds;
}
minimum-interval milliseconds;
minimum-receive-interval milliseconds;
multiplier number;
no-adaptation;
transmit-interval {
threshold milliseconds;
minimum-interval milliseconds;
}
version (1 | automatic);
}
ipsec-sa name;
}
no-interface-state-traps;
authentication {
md5 key-id {
key [ key-values ];
}
simple-password key-id;
}
dead-interval seconds;
hello-interval seconds;
interface-type type;
ldp-synchronization {
disable;
hold-time seconds;
}
metric metric;
neighbor address <eligible>;
network-summary-export [ policy-names ];
network-summary-import [ policy-names ];
passive;
poll-interval seconds;
priority number;
retransmit-interval seconds;
te-metric metric;
transit-delay seconds;
}
label-switched-path name metric metric;
nssa {
area-range network/mask-length <restrict> <exact> <override-metric metric>;
default-lsa {
default-metric metric;
metric-type type;
type-7;
}
(no-summaries | summaries);
}
peer-interface interface-name {
disable;
dead-interval seconds;
hello-interval seconds;
retransmit-interval seconds;
transit-delay seconds;
}
sham-link-remote address {
ipsec-sa name;
}
demand-circuit;
metric metric;
}
stub <default-metric metric> <(no-summaries | summaries)>;
virtual-link neighbor-id router-id transit-area area-id {
disable;
ipsec-sa name;
}
authentication {
md5 key-id;
simple-password key-id;
}
dead-interval seconds;
hello-interval seconds;
retransmit-interval seconds;
transit-delay seconds;
OSPFv3 ospf3 {
disable;
export [ policy-names ];
external-preference preference;
import [ policy-names ];
overload {
timeout seconds;
}
preference preference;
reference-bandwidth reference-bandwidth;
rib-group group-name;
spf-options {
delay milliseconds;
holddown milliseconds;
rapid-runs number;
}
traceoptions {
file filename <files number> <size size> <world-readable | no-world-readable>;
flag flag <flag-modifier> <disable>;
}
area area-id {
area-range network/mask-length <restrict> <exact> <override-metric metric>;
interface interface-name {
disable;
dead-interval seconds;
hello-interval seconds;
ipsec-sa name;
metric metric;
neighbor address <eligible>;
passive;
priority number;
retransmit-interval seconds;
transit-delay seconds;
}
inter-area-prefix-export [policy-names ];
inter-area-prefix-import [ policy-names ];
nssa {
area-range network/mask-length <restrict> <exact> <override-metric metric>;
default-lsa {
default-metric metric;
metric-type type;
type-7;
}
(no-summaries | summaries);
}
stub <default-metric metric> <(no-summaries | summaries)>;
virtual-link neighbor-id router-id transit-area area-id {
disable;
dead-interval seconds;
hello-interval seconds;
ipsec-sa name;
retransmit-interval seconds;
transit-delay seconds;
}
}
}
RIP rip {
any-sender;
authentication-key password;
authentication-type type;
(check-zero | no-check-zero);
graceful-restart {
disable;
restart-time seconds;
}
holddown seconds;
import [ policy-names ];
message-size number;
metric-in metric;
receive receive-options;
rib-group group-name;
route-timeout seconds;
send send-options;
update-interval seconds;
traceoptions {
file filename <files number> <size size> <world-readable | no-world-readable>;
flag flag <flag-modifier> <disable>;
}
group group-name {
bfd-liveness-detection {
authentication {
algorithm algorithm-name;
key-chain key-chain-name;
loose-check;
}
detection-time {
threshold milliseconds;
}
minimum-interval milliseconds;
minimum-receive-interval milliseconds;
multiplier number;
no-adaptation;
transmit-interval {
threshold milliseconds;
minimum-interval milliseconds;
}
version (0 | 1 | automatic);
}
export [ policy-names ];
metric-out metric;
preference preference;
route-timeout seconds;
update-interval seconds;
neighbor neighbor-name {
authentication-key password;
authentication-type type;
bfd-liveness-detection {
authentication {
algorithm algorithm-name;
key-chain key-chain-name;
loose-check;
}
detection-time {
threshold milliseconds;
}
minimum-interval milliseconds;
minimum-receive-interval milliseconds;
transmit-interval {
threshold milliseconds;
minimum-interval milliseconds;
}
multiplier number;
version (1 | automatic);
}
(check-zero | no-check-zero);
import [ policy-names ];
message-size number;
metric-in metric;
receive receive-options;
route-timeout seconds;
send send-options;
update-interval seconds;
}
}
}
RIPng ripng {
graceful-restart {
disable;
restart-time seconds;
}
holddown seconds;
import [ policy-names ];
metric-in metric;
receive <none>;
route-timeout seconds;
send <none>;
update-interval seconds;
traceoptions {
file filename <files number> <size size> <world-readable | no-world-readable>;
flag flag <flag-modifier> <disable>;
}
group group-name {
export [ policy-names ];
metric-out metric;
preference number;
route-timeout seconds;
update-interval seconds;
neighbor neighbor-name {
import [ policy-names ];
metric-in metric;
receive <none>;
route-timeout seconds;
send <none>;
update-interval seconds;
}
}
}
key-pair pathname;
}
timestamp {
clock-drift number;
known-peer-window seconds;
new-peer-window seconds;
}
traceoptions {
file filename <files number> <match regular-expression> <size size> <world-readable |
no-world-readable>;
flag flag;
no-remote-trace;
}
}
}
routing-instances {
routing-instance-name {
bridge-domains bridge-domain-name {
domain-type bridge;
<vlan-id (all | none | number)>;
<vlan-tags outer number inner number>;
<routing-interface routing-interface-name>;
interface interface-name;
bridge-options {
interface-mac-limit limit;
mac-statistics;
mac-table-size limit;
no-mac-learning;
static-mac mac-address;
}
}
description text;
forwarding-options;
interface interface-name;
instance-type (forwarding | layer2–control | l2vpn | no-forwarding | virtual-router |
virtual-switch | vpls | vrf);
no-vrf-advertise;
no-vrf-propagate-ttl;
route-distinguisher (as-number:number | ip-address:number);
vrf-import [ policy-names ];
vrf-export [ policy-names ];
vrf-propagate-ttl;
vrf-table-label;
vrf-target {
export community-name;
import community-name;
}
protocols {
bgp {
bgp-configuration;
}
isis {
isis-configuration;
}
l2vpn {
l2vpn-configuration;
}
ldp {
ldp-configuration;
}
msdp {
msdp-configuration;
}
ospf {
domain-id domain-id;
domain-vpn-tag number;
route-type-community (vendor | iana);
ospf-configuration;
}
ospf 3 {
domain-id domain-id;
domain-vpn-tag number;
route-type-community (vendor | iana);
ospf3-configuration;
}
pim {
pim-configuration;
}
rip {
rip-configuration;
}
vpls {
vpls-configuration;
}
}
routing-options {
aggregate {
defaults {
... aggregate-options ...
}
route destination-prefix {
policy policy-name;
... aggregate-options ...
}
}
auto-export {
(disable | enable);
family {
inet {
flow {
(disable | enable);
rib-group rib-group;
}
multicast {
(disable | enable);
rib-group rib-group;
}
unicast {
(disable | enable);
rib-group rib-group;
}
}
}
traceoptions {
file filename <files number> <size size> <world-readable | no-world-readable>;
flag flag <flag-modifier> <disable>;
}
}
autonomous-system autonomous-system <loops number> {
independent-domain <no-attrset>;
}
confederation confederation-autonomous-systems
members autonomous-system;
dynamic-tunnels tunnel-name {
destination-prefix prefix;
source-address address;
tunnel-type type-of-tunnel;
}
fate-sharing {
group group-name;
cost value;
from address {
to address;
}
flow {
route name {
match {
match-conditions;
}
then {
actions;
}
}
validation {
traceoptions {
file filename <files number> <size size> <world-readable | no-world-readable>;
flag flag <flag-modifier> <disable>;
}
}
generate {
defaults {
generate-options;
}
route destination-prefix {
policy policy-name;
generate-options;
}
}
instance-export [ policy-names ];
instance-import [ policy-names ];
interface-routes {
family (inet | inet6) {
export {
lan;
point-to-point;
}
}
rib-group group-name;
}
martians {
destination-prefix match-type <allow>;
}
maximum-paths path-limit <log-only | threshold value log-interval seconds>;
maximum-prefixes prefix-limit <log-only | threshold value log-interval seconds>;
multicast {
forwarding-cache {
threshold (suppress | reuse) value value;
}
interface interface-name {
enable;
}
scope scope-name {
interface interface-name;
prefix destination-prefix;
}
scope-policy policy-name;
ssm-groups {
addresses;
}
}
options {
syslog (level level | upto level);
}
resolution {
rib routing-table-name {
import [ policy-names ];
resolution-ribs [ routing-table-names ];
}
}
rib routing-table-name {
aggregate {
defaults {
... aggregate-options ...
}
route destination-prefix {
policy policy-name;
... aggregate-options ...
}
}
filter {
input filter-name;
}
generate {
defaults {
generate-options;
}
route destination-prefix {
policy policy-name;
generate-options;
}
}
martians {
destination-prefix match-type <allow>;
}
static {
defaults {
static-options;
}
passive group-name;
route destination-prefix {
lsp-next-hop {
metric metric;
preference preference;
}
next-hop;
p2mp-lsp-next-hop {
metric metric;
preference preference;
}
qualified-next-hop address {
interface interface-name;
metric metric;
preference preference;
}
static-options;
}
}
}
passive {
group-name {
import-policy [ policy-names ];
import-rib [ group-names ];
export-rib group-name;
}
}
route-distinguisher-id address;
route-record;
router-id address;
static {
defaults {
static-options;
}
rib-group group-name;
route destination-prefix {
bfd-liveness-detection {
authentication {
algorithm algorithm-name;
key-chain key-chain-name;
loose-check;
}
detection-time {
threshold milliseconds;
}
local-address ip-address;
minimum-interval milliseconds;
minimum-receive-interval milliseconds;
minimum-receive-ttl milliseconds;
transmit-interval {
threshold milliseconds;
minimum-interval milliseconds;
}
multiplier number;
version (1 | automatic);
}
lsp-next-hop {
metric metric;
preference preference;
}
next-hop;
qualified-next-hop address {
interface interface-name;
metric metric;
preference preference;
}
static-options;
}
}
traceoptions {
file filename <files number> <size size> <world-readable | no-world-readable>;
flag flag <flag-modifier> <disable>;
}
}
}
}
}
routing-options {
aggregate {
defaults {
... aggregate-options ...
}
route destination-prefix {
policy policy-name;
... aggregate-options ...
}
}
auto-export {
(disable | enable);
family {
inet {
flow {
(disable | enable);
rib-group rib-group;
}
multicast {
(disable | enable);
rib-group rib-group;
}
unicast {
(disable | enable);
rib-group rib-group;
}
}
}
traceoptions {
file filename <files number> <size size> <world-readable | no-world-readable>;
flag flag <flag-modifier> <disable>;
}
}
autonomous-system autonomous-system <loops number>;
confederation confederation-autonomous-system members autonomous-system;
dynamic-tunnels tunnel-name {
destination-prefix prefix;
source-address address;
tunnel-type tunnel-type;
}
fate-sharing {
group group-name;
cost value;
from address {
to address;
}
}
flow {
route name {
match {
match-conditions;
}
then {
actions;
}
}
validation {
traceoptions {
file filename <files number> <size size> <world-readable | no-world-readable>;
flag flag <flag-modifier> <disable>;
}
}
forwarding-table {
export [ policy-names ];
(indirect-next-hop | no-indirect-next-hop);
resolution-ribs [ routing-table-names ];
}
}
rib routing-table-name {
aggregate {
defaults {
... aggregate-options ...
}
rib-group group-name;
route destination-prefix {
policy policy-name;
... aggregate-options ...
}
}
filter {
input filter-name;
}
generate {
defaults {
generate-options;
}
route destination-prefix {
policy policy-name;
generate-options;
}
}
martians {
destination-prefix match-type <allow>;
}
static {
defaults {
static-options;
}
rib-group group-name;
route destination-prefix {
lsp-next-hop {
metric metric;
preference preference;
}
next-hop;
qualified-next-hop address {
interface interface-name;
metric metric;
preference preference;
}
static-options;
}
}
}
rib-groups {
group-name {
import-policy [ policy-names ];
import-rib [ group-names ];
export-rib group-name;
}
}
route-distinguisher-id address;
route-record;
router-id address;
static {
defaults {
static-options;
}
rib-group group-name;
route destination-prefix {
bfd-liveness-detection {
authentication {
algorithm algorithm-name;
key-chain key-chain-name;
loose-check;
}
detection-time {
threshold milliseconds;
}
holddown-interval milliseconds;
local-address ip-address;
minimum-interval milliseconds;
minimum-receive-interval milliseconds;
minimum-receive-ttl number;
multiplier number;
neighbor address;
no-adaptation;
transmit-interval {
threshold milliseconds;
minimum-interval milliseconds;
}
version (1 | automatic);
}
lsp-next-hop {
metric metric;
preference preference;
}
next-hop;
p2mp-lsp-next-hop {
metric metric;
preference preference;
}
qualified-next-hop (address | interface-name) {
interface interface-name;
metric metric;
preference preference;
}
source-routing {
(ip | ipv6);
}
static-options;
}
}
topologies {
(inet | inet6) {
topology name;
}
}
traceoptions {
file filename <files number> <size size> <world-readable | no-world-readable>;
flag flag <flag-modifier> <disable>;
}
}
}
This chapter discusses the following topics related to understanding and configuring
protocol-independent routing properties:
Several statements in the [edit routing-options hierarchy are valid at numerous locations
within the hierarchy. To make the complete hierarchy easier to read, the repeated
statements are listed in “Common Routing Options” on page 49 and that section is
referenced at the appropriate locations in “Complete [edit routing-options] Hierarchy”
on page 51.
(active | passive);
as-path {
routing-options {
access {
route ip-prefix</prefix-length> {
metric metric;
next-hop [ addresses ];
preference preference-value;
qualified-next-hop address;
tag route-tag;
}
}
access-internal {
route ip-prefix</prefix-length> {
next-hop [ addresses ];
qualified-next-hop address;
tag route-tag;
}
}
aggregate {
defaults {
... statements in Common Routing Options on page 49 PLUS ...
(brief | full);
discard;
}
route ip-prefix</prefix-length> {
... statements in Common Routing Options on page 49 PLUS ...
(brief | full);
discard;
policy [ policy-names ];
}
}
auto-export {
disable;
family inet {
disable;
flow {
disable;
rib-group rib-group;
}
multicast {
disable;
rib-group rib-group;
}
unicast {
disable;
rib-group rib-group;
}
}
family inet6 {
disable;
multicast {
disable;
rib-group rib-group;
}
unicast {
disable;
rib-group rib-group;
}
}
family iso {
disable;
unicast {
disable;
rib-group rib-group;
}
}
traceoptions {
file filename <files number> <size maximum-file-size> <world-readable |
no-world-readable>;
flag flag <flag-modifier> <disable>;
}
}
autonomous-system autonomous-system <asdot-notation> <loops number>;
bgp-orf-cisco-mode;
bmp {
memory-limit bytes;
station-address (ip-address | name);
station-port-number port-number;
statistics-timeout seconds;
}
confederation as-number members [ as-numbers ];
dynamic-tunnels tunnel-name {
destination-networks prefix;
source-address address;
tunnel-type tunnel-type;
}
fate-sharing {
group group-name {
cost value;
from {
address <to address>;
}
}
}
flow {
route name {
match {
destination address;
destination-port [ afs bgp biff bootpc bootps cmd cvspserver dhcp domain eklogin
ekshell exec finger ftp ftp-data http https ident imap kerberos-sec klogin kpasswd
krb-prop krbupdate kshell ldap ldp login mobileip-agent mobilip-mn msdp
netbios-dgm netbios-ns netbios-ssn nfsd nntp ntalk ntp pop3 pptp printer radacct
radius rip rkinit smtp snmp snmptrap snpp socks ssh sunrpc syslog tacacs
tacacs-ds talk telnet tftp timed who xdmcp ];
dscp [ code-points ];
fragment [ don't-fragment first-fragment is-fragment last-fragment
not-a-fragment ];
}
instance-export [ policy-names ];
instance-import [ policy-names ];
interface-routes {
family (inet | inet6) {
export {
lan;
point-to-point;
}
import [ policy-names ];
}
rib-group {
inet group-name;
inet6 group-name;
}
}
l3vpn-composite-nexthop;
martians {
ip-prefix</prefix-length> (exact | longer | orlonger |
prefix-length-range /minimum-prefix-length–/maximum-prefix-length |
through ip-prefix</prefix-length> | upto /prefix-length) <allow>;
}
maximum-paths path-limit <log-only | threshold value> <log-interval seconds>;
maximum-prefixes prefix-limit <log-only | threshold value> <log-interval seconds>;
med-igp-update-interval minutes;
multicast {
... the multicast subhierarchy appears after the main [edit routing-options] hierarchy ...
}
nonstop-routing;
options {
mark seconds;
syslog {
level level;
upto level;
}
}
ppm {
no-delegate-processing;
}
resolution {
rib routing-table-name {
import [ policy-names ];
resolution-ribs [ routing-table-names ];
}
tracefilter [ filter-policy-names ];
traceoptions {
file filename <files number> <size maximum-file-size> <world-readable |
no-world-readable>;
flag flag <flag-modifier> <disable>;
}
}
rib routing-table-name {
access {
... same statements as at the [edit routing-options access] hierarchy level ...
}
access-internal {
... same statements as at the [edit routing-options access-internal] hierarchy level ...
}
aggregate {
... same statements as at the [edit routing-options aggregate] hierarchy level ...
}
generate {
... same statements as at the [edit routing-options generate] hierarchy level ...
}
martians {
ip-prefix</prefix-length> (exact | longer | orlonger |
prefix-length-range /minimum-prefix-length–/maximum-prefix-length |
through ip-prefix</prefix-length> | upto /prefix-length) <allow>;
}
maximum-paths path-limit <log-only | threshold value> <log-interval seconds>;
maximum-prefixes prefix-limit <log-only | threshold value> <log-interval seconds>;
static {
... same statements as at the [edit routing-options static] hierarchy level ...
}
}
rib-groups {
group-name {
export-rib table-name;
import-policy [ policy-names ];
import-rib [ table-names ];
}
}
route-distinguisher-id address;
route-record;
router-id address;
source-routing {
ip;
ipv6;
}
static {
... the static subhierarchy appears after the main [edit routing-options] hierarchy ...
}
topologies {
family (inet | inet6) {
topology topology-name;
}
}
traceoptions {
file filename <files number> <size maximum-file-size> <world-readable |
no-world-readable>;
flag flag <disable>;
}
}
routing-options {
multicast {
asm-override-ssm;
backup-pe-group group-name {
backups [ addresses ];
local-address address;
}
flow-map flow-map-name {
routing-options {
static {
defaults {
... statements in Common Routing Options on page 49 PLUS ...
(install | no-install);
(readvertise | no-readvertise);
(resolve | no-resolve);
(retain | no-retain);
}
rib-group group-name;
route destination-prefix {
... statements in Common Routing Options on page 49 PLUS ...
backup-pe-group group-name;
bfd-liveness-detection {
detection-time {
threshold milliseconds;
}
holddown-interval milliseconds;
local-address ip-address;
minimum-interval milliseconds;
minimum-receive-interval milliseconds;
minimum-receive-ttl milliseconds;
multiplier number;
neighbor address;
no-adaptation;
transmit-interval {
minimum-interval milliseconds;
threshold milliseconds;
}
version (1 | automatic);
}
(discard | next-hop [ addresses ] | next-table address | receive | reject);
(install | no-install);
lsp-next-hop {
metric metric;
preference preference;
}
p2mp-lsp-next-hop lsp-name {
metric metric;
preference preference;
}
(readvertise | no-readvertise);
(resolve | no-resolve);
(retain | no-retain);
static-lsp-next-hop lsp-name {
metric metric;
preference preference-value;
}
}
}
}
All statements that configure protocol-independent routing properties are optional and
do not have to be included in the configuration for the router to operate. However, if you
are configuring BGP, you must configure an AS number and a router identifier. For OSPF,
the router uses the IP address configured on the loopback interface (lo0) as the router
identifier. If no IP address is configured on the loopback interface, the router uses the
highest IP address for the router identifier.
This chapter discusses how to perform the following tasks for configuring routing tables
and routes:
The Junos OS can maintain one or more routing tables, thus allowing the software to
store route information learned from different protocols separately. For example, it is
common for the routing software to maintain unicast routes and multicast routes in
different routing tables. You also might have policy considerations that would lead you
to create separate routing tables to manage the propagation of routing information.
Creating routing tables is optional. If you do not create any, the Junos OS uses its default
routing tables, which are inet.0 for IP version 4 (IPv4) unicast routes, inet6.0 for IP version 6
(IPv6) unicast routes, inet.1 for the IPv4 multicast forwarding cache, and inet.3 for IPv4
MPLS. If Multiprotocol BGP (MBGP) is enabled, inet.2 is used for Subsequent Address
Family Indicator (SAFI) 2 routes. If you configure a routing instance, the Junos OS creates
the default unicast routing table instance-name.inet.0. If you configure a flow route, the
Junos OS creates the flow routing table instance-name.inetflow.0.
If you want to add static, aggregate, generated, or martian routes only to the default IPv4
unicast routing table (inet.0), you do not have to create any routing tables because, by
default, these routes are added to inet.0. You can add these routes just by including the
static, aggregate, generate, and martians statements. For a list of hierarchy levels at which
you can include this statement, see the statement summary section for this statement.
To explicitly create a routing table, include the rib statement and child statements under
the rib statement.
For a list of child statements and hierarchy levels at which you can include this statement,
see the statement summary section for this statement.
The routing table name, routing-table-name, includes the protocol family, optionally
followed by a period and a number. The protocol family can be inet for the IPv4 family,
inet6 for the IPv6 family, or iso for the International Standards Organization (ISO) protocol
family. The number represents the routing instance. The first instance is 0.
[edit]
routing-options {
rib inet.0 {
static {
route 140.122.0.0/16 next-hop 192.168.0.10;
}
}
}
Configure the primary IPv6 routing table inet6.0 and add a static route to it:
[edit routing-options]
rib inet6.0 {
static {
route 8:1::1/128 next-hop 8:3::1;
}
}
The routing device uses dynamic routes to learn how to reach network destinations.
Dynamic routes are determined from the information exchanged by the routing protocols
and, as the name implies, the routes might change as network conditions change and
these changes are discovered by the routing protocols. You can configure static
(nonchanging) routes to some network destinations. The routing device uses static routes
when it does not have a route to a destination that has a better (lower) preference value,
when it cannot determine the route to a destination, or when it is forwarding unroutable
packets.
Static routes are used when the network connects to a routing device or other system
outside the network and either that system cannot run a routing protocol or you do not
want to run a routing protocol on it. In these situations, a static route is created from an
edge routing device to the outside system and then the edge routing device redistributes
the static route to IGP.
A static route is installed in the routing table only when the route is active; that is, the list
of next-hop routing devices configured for that route contains at least one next hop on
an operational interface.
You can add the same routes to more than one routing table.
To configure static routes in the default IPv4 routing table (inet.0), include the static
statement and associated child statements.
For a list of child statements hierarchy levels at which you can include this statement,
see the statement summary section for this statement.
To configure static routes in one of the other routing tables, to explicitly configure static
routes in the default IPv4 route table (inet.0), or to explicitly configure static routes in
the primary IPv6 routing table (inet6.0), include the static statement under the rib
statement.
NOTE: You cannot configure static routes for the IPv4 multicast routing table
(inet.1) or the IPv6 multicast routing table (inet6.1).
• defaults—(Optional) Specify global static route options. These options only set default
attributes inherited by all newly created static routes. These are treated as global
defaults and apply to all the static routes you configure in the static statement.
NOTE: Specifying the global static route options does not create default
routes. These options only set default attributes inherited by all newly
created static routes.
• route—Configure individual static routes. In this part of the static statement, you
optionally can configure static route options. These options apply to the individual
destination only and override any options you configured in the defaults part of the
static statement.
The following topics provide more information about configuring static routes:
• Installing Static Routes into More than One Routing Table on page 69
When you configure an individual static route in the route part of the static statement,
specify the destination of the route (in route destination-prefix) in one of the following
ways:
• default if this is the default route to the destination. This is equivalent to specifying an
IP address of 0.0.0.0/0.
When you configure an individual static route in the route part of the static statement,
specify how to reach the destination (in next-hop) in one of the following ways:
• next-hop address—IPv4 or IPv6 address of the next hop to the destination, specified
as:
If you use the next-table action, the configuration must include a term qualifier that
specifies a different table than the one specified in the next-table action. In other words,
the term qualifier in the from statement must exclude the table in the next-table action.
In the following example, the first term contains rib vrf-customer2.inet.0 as a matching
condition. The action specifies a next-hop in a different routing table,
vrf-customer1.inet.0. The second term does the opposite by using rib vrf-customer1.inet.0
in the match condition and vrf-customer2.inet.0 In the next-table action.
term 1 {
from {
protocol bgp;
rib vrf-customer2.inet.0;
community customer;
}
then {
next-hop next-table vrf-customer1.inet.0;
}
}
term 2 {
from {
protocol bgp;
rib vrf-customer1.inet.0;
community customer;
}
then {
NOTE: Within a routing instance, you cannot configure a static route with
the next-table inet.0 statement if any static route in the main routing
instance is already configured with the next-table statement to point to
the inet.0 routing table of the routing instance. For example, if you configure
on the main routing instance a static route 192.168.88.88/32 with the
next-table test.inet.0 statement and the routing instance test is also
configured with a static route 192.168.88.88/32 with the next-table inet.0
statement, the commit operation fails. Instead, you must configure a routing
table group both on the main instance and on the routing instance, which
enables you to install the static route into both routing tables. For more
information, see “Installing Static Routes into More than One Routing Table”
on page 69.
• reject—Do not forward packets addressed to this destination. Instead, drop the packets,
send ICMP (or ICMPv6) unreachable messages to the packets’ originators, and install
a reject route for this destination into the routing table.
• discard—Do not forward packets addressed to this destination. Instead, drop the
packets, do not send ICMP (or ICMPv6) unreachable messages to the packets’
originators, and install a reject route for this destination into the routing table.
• receive—Install a route for this next-hop destination into the routing table.
The receive option forces the packet to be sent to the Routing Engine.
• For receiving packets on a link's subnet address, with zeros in the host portion of the
address
Configuring independent preferences allows you to configure multiple static routes with
different preferences and metrics to the same destination. The static route with the best
preference, metric, and reachable next hop is chosen as the active route. This feature
allows you to specify preference and metric on a next-hop basis using the
qualified-next-hop statement.
qualified-next-hop address {
interface interface-name;
metric metric;
preference preference;
}
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
You can configure static routes on an unnumbered Ethernet interface by using the
qualified-next-hop option to specify the unnumbered interface as the next-hop interface
for a configured static route.
qualified-next-hop interface-name {
metric metric;
preference preference;
}
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
Keep the following points in mind when you configure static routes for unnumbered
Ethernet interfaces:
• The routing device uses the Address Resolution Protocol (ARP) to resolve the media
access control (MAC) address of the destination interface.
For information about how to configure an unnumbered Ethernet interface, see the Junos
OS Network Interfaces Configuration Guide.
• A static route to 0.0.0.0/8 with a next hop through 192.168.1.254, with a metric of 10
and preference of 10.
• A static route to 10.0.0.0/8 with a next hop through 192.168.1.254, with a metric of 6
and preference of 5.
• A static route to 10.0.0.0/8 with a next hop through 192.168.1.2, with a metric of 6 and
preference of 7.
[edit]
routing-options {
static {
defaults {
metric 10;
preference 10;
}
route 0.0.0.0/8 {
next-hop 192.168.1.254 {
retain;
no-readvertise;
}
route 10.0.0.0/8 {
next-hop [192.168.1.2];
qualified-next-hop 192.168.1.254 {
preference 5;
}
metric 6;
preference 7;
}
}
}
}
• A static route to fec0:1:1:4::/64 with a next hop through fec0:1:1:2::1, with a metric 10
and preference 10.
• A static route to fec0:1:1:5::/64 with a next hop through fec0:1:1:2::2, with a metric 6 and
preference 5.
• A static route to fec0:1:1:5::/64 with a next hop through fec0:1:1:2::3, with a metric 6 and
preference 7.
[edit]
routing-options {
rib inet6.0 {
static {
defaults {
metric 10;
preference 10;
}
route fec0:1:1:4::/64 {
next-hop fec0:1:1:2::1 {
retain;
no-readvertise;
}
route fec0:1:1:5::/64 {
next-hop fec0:1:1:2::3;
qualified-next-hop fec0:1:1:2::2 {
preference 5;
}
metric 6;
preference 7;
}
}
}
}
}
• A static route to 7.7.7.1/32 with a next hop through unnumbered interface so-0/0/0.0
with a with a metric of 5 and preference of 6.
interfaces {
lo0 {
unit 0 {
family inet {
address 5.5.5.1/32;
address 6.6.6.1/32;
}
}
}
}
so-0/0/0 {
unit 0 {
family inet {
unnumbered-address lo0.0;
}
}
}
routing-options {
static {
route 7.7.7.1/32 {
qualified next-hop so-0/0/0.0 {
metric 5;
preference 6;
}
}
}
}
Static routes can be configured with a next hop that is a label-switched path (LSP). This
is useful when implementing filter-based forwarding. You can specify an LSP as the next
hop and assign an independent preference and metric to this next hop.
To specify an LSP as the next hop for a static route, include the following statements:
lsp-next-hop lsp-name {
metric metric;
preference preference;
}
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
32
The preference value can be a number in the range from 0 through 4,294,967,295 (2 – 1)
with a lower number indicating a more preferred route. The metric value can also be a
number in the range from 0 through 4,294,967,295.
NOTE: The lsp-next-hop statement is mutually exclusive with all other types
of next hops, except for next-hop address and qualified-next-hop. Therefore,
you cannot configure next-hop reject, next-hop discard, next-hop receive, and
next-table with lsp-next-hop for the same destination.
To specify a point-to-multipoint LSP as the next hop for a static route, include the
following statements:
p2mp-lsp-next-hop {
interface interface-name;
metric metric;
preference preference;
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
Enable the qualified next-hop address on the interface by specifying the interface option.
32
The preference value can be a number from 0 through 4,294,967,295 (2 – 1). A lower
number indicates a more preferred route. The metric value can also be a number from
0 through 4,294,967,295.
You can install a static route into more than one routing table. For example, you might
want a simple configuration that allows you to install a static route into the default routing
table inet.0, as well as a second routing table inet.2. Instead of configuring the same
static route for each routing table, you can use routing table groups to insert the route
into multiple tables. To create a routing table group, include the rib-group statement.
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
To install the routing table into a configured routing table group, include the import-rib
statement:
rib-group group-name {
import-rib [ routing-table-names ];
}
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
The first routing table you list in the import-rib statement must be the one you configured
in the rib-group statement.
Examples: Installing a Static Route into More than One Routing Table
Install all routes in both inet.0 and inet.2.
[edit routing-options]
static {
rib-group foo;
route 1.1.1.0/24 reject;
}
rib-groups {
foo {
import-rib [ inet.0 inet.2 ];
}
}
autonomous-system 65432;
Install only some routes in both inet.0 and inet.2, with other routes in inet.0 only.
[edit routing-options]
rib inet.2 {
static {
route 1.1.1.0/24 reject;
}
}
static {
route 1.1.1.0/24 reject;
}
autonomous-system 65432;
Connectionless Network Services (CLNS) is an ISO Layer 3 protocol that uses network
service access point (NSAP) reachability information instead of IPv4 prefixes. You can
configure a static route for CLNS networks.
For a list of hierarchy levels at which you can include these statements, see the CLNS
statement summary sections in the Junos OS Interfaces and Routing Configuration Guide.
Specify the iso.0 routing table option to configure a primary instance CLNS static route.
Specify the instance-name.iso.0 routing table option to configure CLNS static route for
a particular routing instance. Specify the route nsap-prefix statement to configure the
destination for the CLNS static route. Specify the next-hop (interface-name | iso-net)
statement to configure the next hop, specified as an ISO network entity title (NET) or
interface name. Include the qualified-next-hop (interface-name | iso-net) statement to
configure the qualified next hop, specified as an ISO network entity title or interface name.
[edit]
routing-options {
rib iso.0 {
static {
iso-route 47.0005.80ff.f800.0000.ffff.ffff next-hop
47.0005.80ff.f800.0000.0108.0001.1921.6800.4212;
iso-route 47.0005.80ff.f800.0000.0108.0001.1921.6800.4212 next-hop t1-0/2/2.0;
iso-route 47.0005.80ff.f800.0000.eee {
qualified-next-hop 47.0005.80ff.f800.0000.0108.0001.1921.6800.4002 {
preference 20;
metric 10;
}
}
}
}
}
For information on CLNS, see “Configuring CLNS for IS-IS” on page 402 and the Junos OS
Interfaces and Routing Configuration Guide.
In the defaults and route parts of the static statement, you can specify options that define
additional information about static routes that is included with the route when it is
installed in the routing table. All static options are optional. Static options that you specify
in the defaults part of the static statement are treated as global defaults and apply to
all the static routes you configure in the static statement. Static options that you specify
in the route part of the static statement override any global static options and apply to
that destination only.
To configure static route options for IPv4 static routes, include one or more options in
the defaults or route part of the static statement.
routing-options {
static {
defaults {
(active | passive);
as-path <as-path> <origin (egp | igp | incomplete)> <atomic-aggregate> <aggregator
as-number in-address>;
community [ community-ids ];
(install | no-install);
metric metric <type type>;
(preference | preference2 | color | color2) preference <type type>;
(readvertise | no-readvertise);
(retain | no-retain);
tag string;
}
rib-group group-name;
route destination-prefix {
(active | passive);
as-path <as-path> <origin (egp | igp | incomplete)> <atomic-aggregate> <aggregator
as-number in-address>;
bfd-liveness-detection {
authentication {
algorithm algorithm-name;
key-chain key-chain-name;
loose-check;
}
detection-time {
threshold milliseconds;
}
local-address ip-address;
minimum-interval milliseconds;
minimum-receive-interval milliseconds;
minimum-receive-ttl number;
multiplier number;
neighbor address;
no-adaptation;
transmit-interval {
threshold milliseconds;
minimum-interval milliseconds
}
version (1 | automatic);
}
community [ community-ids ];
(install | no-install);
metric metric <type type>;
(preference | preference2 | color | color2) preference <type type>;
(readvertise | no-readvertise);
resolve;
(retain | no-retain);
tag string;
}
}
}
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
To configure static route options for IPv6 static routes, include one or more options in
the defaults or route part of the static statement. Each of these options is explained in
the sections that follow.
rib inet6.0 {
static {
defaults {
(active | passive);
as-path <as-path> <origin (egp | igp | incomplete)> <atomic-aggregate> <aggregator
as-number in-address>;
community [ community-ids ];
(install | metric);
metric metric <type type>;
(preference | preference2 | color | color2) preference <type type>;
(readvertise | no-readvertise);
resolve;
(retain | no-retain);
}
rib-group group-name;
route destination-prefix {
(active | passive);
as-path <as-path> <origin (egp | igp | incomplete)> <atomic-aggregate> <aggregator
as-number in-address>;
bfd-liveness-detection {
authentication {
algorithm algorithm-name;
key-chain key-chain-name;
loose-check;
}
detection-time {
threshold milliseconds;
}
local-address ip-address;
minimum-interval milliseconds;
minimum-receive-interval milliseconds;
minimum-receive-ttl number;
multiplier number;
neighbor address;
no-adaptation;
transmit-interval {
threshold milliseconds;
minimum-interval milliseconds;
}
version (1 | automatic);
}
community [ community-ids ];
(install | no-install);
metric metric <type type>;
(preference | preference2 | color | color2) preference <type type>;
(readvertise | no-readvertise);
resolve;
(retain | no-retain);
}
}
}
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
To associate a metric value with an IPv6 route, include the metric statement:
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
In the type option, you can specify the type of route. For OSPF, when routes are exported
to OSPF, type 1 routes are advertised in type 1 externals, and routes of any other type are
advertised in type 2 externals. Note that if a qualified-next-hop metric value is configured,
this value overrides the route metric.
To do this for IPv6 static routes, include one or more of the following statements:
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
32
The preference value can be a number in the range from 0 through 4,294,967,295 (2 – 1)
with a lower number indicating a more preferred route. For more information about
preference values, see “Route Preferences Overview” on page 6. Note that if a
qualified-next-hop preference value is configured, this value overrides the route
preference.
To associate community information with IPv6 routes, include the community statement:
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
as-number:community-value
as-number is the autonomous system (AS) number and can be a value in the range from 1
through 65,534. community-value is the community identifier and can be a number in the
range from 0 through 65,535.
You also can specify community-ids as one of the following well-known community
names, which are defined in RFC 1997:
You can also explicitly exclude BGP community information with a static route using the
none option. Include none when configuring an individual route in the route portion of the
static statement to override a community option specified in the defaults portion of the
statement.
To associate AS path information with IPv6 routes, include the as-path statement:
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
as-path is the AS path to include with the route. It can include a combination of individual
AS path numbers and AS sets. Enclose sets in brackets ( [ ] ). The first AS number in the
path represents the AS immediately adjacent to the local AS. Each subsequent number
represents an AS that is progressively farther from the local AS, heading toward the origin
of the path.
NOTE:
In Junos OS Release 9.1 and later, the range that you can configure for the
AS number has been extended to provide BGP support for 4-byte AS numbers
as defined in RFC 4893, BGP Support for Four-octet AS Number Space. You
can now configure a number from 1 through 4,294,967,295. All releases of
the Junos OS support 2-byte AS numbers. The 2-byte AS number range is 1
through 65,535 (this is a subset of the 4-byte range).
In Junos OS Release 9.2 and later, you can also configure a 4-byte AS number
using the AS-dot notation format of two integer values joined by a period:
<16-bit high-order value in decimal>.<16-bit low-order value in decimal>. For
example, the 4-byte AS number of 65,546 in plain-number format is
represented as 1.10 in the AS-dot notation format. You can specify a value in
the range from 0.0 through 65535.65535 in AS-dot notation format.
You also can specify the AS path using the BGP origin attribute, which indicates the origin
of the AS path information:
To attach the BGP ATOMIC_AGGREGATE path attribute to the static route, specify the
atomic-aggregate statement. This path attribute indicates that the local system selected
a less specific route rather than a more specific route.
To attach the BGP AGGREGATOR path attribute to the static route, specify the aggregator
statement. When using this statement, you must specify the last AS number that formed
the static route (encoded as two octets), followed by the IP address of the BGP system
that formed the static route.
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
To configure the software not to install active IPv6 static routes into the forwarding table,
include the no-install statement:
Even if you configure a route so it is not installed in the forwarding table, the route is still
eligible to be exported from the routing table to other protocols. To explicitly install IPv4
routes into the forwarding table, include the install statement. Include this statement
when configuring an individual route in the route portion of the static statement to override
a no-install option specified in the defaults portion of the statement.
To explicitly install IPv6 routes into the forwarding table, include the install statement.
Include this statement when configuring an individual route in the route portion of the
static statement to override a no-install statement specified in the defaults portion of
the statement.
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
To have an IPv6 static route remain in the forwarding table, include the retain statement.
Doing this greatly reduces the time required to restart a system that has a large number
of routes in its routing table.
To explicitly specify that IPv4 routes be deleted from the forwarding table, include the
no-retain statement. Include this statement when configuring an individual route in the
route portion of the static statement to override a retain option specified in the defaults
portion of the statement.
To explicitly specify that IPv6 routes be deleted from the forwarding table, include the
no-retain statement. Include this statement when configuring an individual route in the
route portion of the static statement to override a retain statement specified in the defaults
portion of the statement.
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
Controlling Retention of Inactive Static Routes in the Routing and Forwarding Tables
Static routes are only removed from the routing table if the next hop becomes
unreachable. This can occur if the local or neighbor interface goes down. To have an IPv4
static route remain installed in the routing and forwarding tables, include the passive
statement:
To have an IPv6 static route remain installed in the routing and forwarding tables, include
the passive statement:
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
Routes that have been configured to remain continually installed in the routing and
forwarding tables are marked with reject next hops when they are inactive.
To explicitly remove IPv4 static routes when they become inactive, include the active
statement. Include this statement when configuring an individual route in the route portion
of the static statement to override a passive option specified in the defaults portion of
the statement.
To explicitly remove IPv6 static routes when they become inactive, include the active
statement. Include this statement when configuring an individual route in the route portion
of the static statement to override a passive statement specified in the defaults portion
of the statement.
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
To mark an IPv6 static route as being ineligible for readvertisement, include the
no-readvertise statement:
To explicitly readvertise IPv4 static routes, include the readvertise statement. Include
the readvertise statement when configuring an individual route in the route portion of the
static statement to override a no-readvertise statement specified in the defaults portion
of the statement.
To explicitly readvertise IPv6 static routes, include the readvertise statement. Include
the readvertise statement when configuring an individual route in the route portion of the
static statement to override a no-readvertise option specified in the defaults portion of
the statement.
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
Controlling Resolution of Static Routes to Prefixes That Are Not Directly Connected
By default, static routes can point only to a directly connected next hop. You can configure
an IPv4 route to a prefix that is not directly connected by resolving the route through the
inet.0 and inet.3 routing tables. To configure an IPv4 static route to a prefix that is not a
directly connected next hop, include the resolve statement:
You can configure an IPv6 route to a prefix that is not directly connected by resolving the
route through the inet6.0 routing table. To configure an IPv6 static route to a prefix that
is not a directly connected next hop, include the resolve statement:
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
The Bidirectional Forwarding Detection (BFD) protocol is a simple hello mechanism that
detects failures in a network. Hello packets are sent at a specified, regular interval. A
neighbor failure is detected when the routing device stops receiving a reply after a specified
interval. BFD works with a wide variety of network environments and topologies. The
failure detection timers for BFD have shorter time limits than the failure detection
mechanisms of static routes, providing faster detection. These timers are also adaptive.
For example, a timer can adapt to a higher value if an adjacency fails, or a neighbor can
negotiate a higher value than the one configured. By default, BFD is supported on
single-hop static routes. In Junos OS Release 8.2 and later, BFD also supports multihop
static routes.
In Junos OS Release 9.1 and later, the BFD protocol is supported for IPv6 static routes.
Global unicast and link-local IPv6 addresses are supported for static routes. The BFD
protocol is not supported on multicast or anycast IPv6 addresses. For IPv6, the BFD
protocol supports only static routes and only in Junos OS Release 9.3 and later. IPv6 for
BFD is not supported for any other protocol. To configure the BFD protocol for IPv6 static
routes, include the bfd-liveness-detection statement at the [edit routing-options rib inet6.0
static route destination-prefix] hierarchy level.
In Junos OS Release 8.5 and later, you can configure a hold-down interval to specify how
long the BFD session must remain up before state change notification is sent. To specify
the hold-down interval, include the holddown-interval statement:
You can configure a number in the range from 0 through 255,000 milliseconds, and the
default is 0. If the BFD session goes down and then comes back up during the hold-down
interval, the timer is restarted.
NOTE: If a single BFD session includes multiple static routes, the hold-down
interval with the highest value is used.
To specify the minimum transmit and receive intervals for failure detection, include the
minimum-interval statement:
This value represents the minimum interval at which the local routing device transmits
hello intervals as well as the minimum interval that the routing device expects to receive
a reply from a neighbor with which it has established a BFD session. You can configure
a number in the range from 1 through 255,000 milliseconds. You can also specify the
minimum transmit and receive intervals separately.
To specify only the minimum receive interval for failure detection, include the
minimum-receive-interval statement:
This value represents the minimum interval at which the local routing device expects to
receive a reply from a neighbor with which it has established a BFD session. You can
configure a number in the range from 1 through 255,000 milliseconds.
To specify the number of hello packets not received by the neighbor that causes the
originating interface to be declared down, include the multiplier statement:
The default value is 3. You can configure a number in the range from 1 through 255.
To specify a threshold for detecting the adaptation of the detection time, include the
threshold statement:
}
}
}
When the BFD session detection time adapts to a value equal to or higher than the
threshold, a single trap and a system log message are sent. The detection time is based
on the multiplier of the minimum-interval or the minimum-receive-interval value. The
threshold must be a higher value than the multiplier for either of these configured values.
For example if the minimum-receive-interval is 300 ms and the multiplier is 3, the total
detection time is 900 ms. Therefore, the detection time threshold must have a value
higher than 900.
To specify only the minimum transmit interval for failure detection, include the
transmit-interval minimum-interval statement:
This value represents the minimum interval at which the local routing device transmits
hello packets to the neighbor with which it has established a BFD session. You can
configure a value in the range from 1 through 255,000 milliseconds.
To specify the transmit threshold for detecting the adaptation of the transmit interval,
include the transmit-interval threshold statement:
The threshold value must be greater than the transmit interval. When the BFD session
detection time adapts to a value higher than the threshold, a single trap and a system
log message are sent. The detection time is based on the multiplier of the
minimum-interval or the minimum-receive-interval value. The threshold must be a higher
value than the multiplier for either of these configured values.
To include an IP address for the next hop of the BFD session, include the neighbor
statement:
NOTE: You must configure the neighbor statement if the next hop specified
is an interface name. If you specify an IP address as the next hop, that address
is used as the neighbor address for the BFD session.
In Junos OS Release 9.0 and later, you can configure BFD sessions not to adapt to
changing network conditions. To disable BFD adaptation, include the no-adaptation
statement:
bfd-liveness-detection {
no-adaptation;
}
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
NOTE: If BFD is configured only on one end of a static route, the route is
removed from the routing table. BFD establishes a session when BFD is
configured on both ends of the static route.
BFD is not supported on ISO address families in static routes. BFD does
support IS-IS.
If you configure graceful Routing Engine switchover at the same time as BFD,
graceful Routing Engine switchover does not preserve the BFD state
information during a failover.
The Junos OS also supports BFD over multihop static routes. For example, you can
configure BFD over a Layer 3 path to provide path integrity over that path. You can limit
the number of hops by specifying the time-to-live (TTL).
To configure BFD over multihop static routes, include the following statements:
}
}
To specify the source address for the multihop static route and to enable multihop BFD
support, include the local-address statement.
To specify the number of hops, include the minimum-receive-ttl statement. You must
configure this statement for a multihop BFD session. You can configure a value in the
range from 1 through 255. It is optional for a single-hop BFD session. If you configure the
minimum-receive-ttl statement for a single-hop session, the value must be 255.
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
To trace BFD protocol traffic, you can specify options in the global traceoptions statement
at the [edit routing-options] hierarchy level, and you can specify BFD-specific options by
including the traceoptions statement at the [edit protocols bfd hierarchy level.
[edit protocols]
bfd {
traceoptions {
file filename <files number> <size size> <world-readable | no-world-readable>;
flag flag <flag-modifier> <disable>;
}
}
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
You can specify the following BFD-specific options in the BFD traceoptions statement:
NOTE: Use the all trace flag with caution. These flags may cause the CPU to
become very busy.
• keyed-md5—Keyed Message Digest 5 hash algorithm for sessions with transmit and
receive intervals greater than 100 ms. To authenticate the BFD session, keyed MD5
uses one or more secret keys (generated by the algorithm) and a sequence number
that is updated periodically. With this method, packets are accepted at the receiving
end of the session if one of the keys matches and the sequence number is greater than
or equal to the last sequence number received. Although more secure than a simple
password, this method is vulnerable to replay attacks. Increasing the rate at which the
sequence number is updated can reduce this risk.
• keyed-sha-1—Keyed Secure Hash Algorithm I for sessions with transmit and receive
intervals greater than 100 ms. To authenticate the BFD session, keyed SHA uses one
or more secret keys (generated by the algorithm) and a sequence number that is
updated periodically. The key is not carried within the packets. With this method,
packets are accepted at the receiving end of the session if one of the keys matches
and the sequence number is greater than the last sequence number received.
The authentication keychain contains one or more keychains. Each keychain contains
one or more keys. Each key holds the secret data and the time at which the key becomes
valid. The algorithm and keychain must be configured on both ends of the BFD session,
and they must match. Any mismatch in configuration prevents the BFD session from
being created.
BFD allows multiple clients per session, and each client can have its own keychain and
algorithm defined. To avoid confusion, we recommend specifying only one security
authentication keychain.
• show bfd session command in the Junos OS Routing Protocols and Policies Command
Reference
Beginning with Junos OS Release 9.6, you can configure authentication for BFD sessions
running over IPv4 and IPv6 static routes. Routing instances are also supported. Only three
steps are needed to configure authentication on a BFD session:
The following sections provide instructions for configuring and viewing BFD authentication
on static routes:
[edit]
2. Specify the keychain to be used to associate BFD sessions on the specified route or
routing instance with the unique security authentication keychain attributes. This
should match the keychain name configured at the [edit security authentication
key-chains] hierarchy level.
[edit]
user@host# set routing-options static route ipv4 bfd-liveness-detection authentication
keychain bfd-sr4
• At least one key, a unique integer between 0 and 63. Creating multiple keys allows
multiple clients to use the BFD session.
[edit security]
user@host# authentication-key-chains key-chain bfd-sr4 key 53 secret
$9$ggaJDmPQ6/tJgF/AtREVsyPsnCtUHm start-time 2009-06-14.10:00:00
[edit]
user@host> set routing-options static route ipv4 bfd-liveness-detection authentication
loose-check
5. (Optional) View your configuration using the show bfd session detail or show bfd
session extensive command.
6. Repeat these steps to configure the other end of the BFD session.
The following example shows BFD authentication configured for the static route at
192.168.208.26. It specifies the keyed SHA-1 authentication algorithm and a keychain
name of bfd-static. The authentication keychain is configured with two keys. Key 1 contains
the secret data “$9$ggaJDmPQ6/tJgF/AtREVsyPsnCtUHm” and a start time of June 1,
2009, at 9:46:02 AM PST. Key 2 contains the secret data “$9$a5jiKW9l.reP38ny.TszF2/9”
and a start time of June 1, 2009, at 3:29:20 PM PST.
[edit routing-options]
static route 192.168.208.26 {
bfd-liveness-detection {
authentication {
algorithm keyed-sha-1;
key-chain bfd-static;
}
}
}
[edit security]
authentication key-chains {
key-chain bfd-static {
key 1 {
secret “$9$ggaJDmPQ6/tJgF/AtREVsyPsnCtUHm”;
start-time “2009-6-1.09:46:02 -0700”;
}
key 2 {
secret “$9$a5jiKW9l.reP38ny.TszF2/9”;
start-time “2009-6-1.15:29:20 -0700”;
}
}
}
If you commit these updates to your configuration, you would see output similar to the
following. In the output for the show bfd sessions detail command, Authenticate is
displayed to indicate that BFD authentication is configured. For more information about
the configuration, use the show bfd sessions extensive command. The output for this
command provides the keychain name, the authentication algorithm and mode for each
client in the session, and the overall BFD authentication configuration status, keychain
name, and authentication algorithm and mode.
1 sessions, 1 clients
Cumulative transmit rate 1.2 pps, cumulative receive rate 1.2 pps
1 sessions, 1 clients
Cumulative transmit rate 1.2 pps, cumulative receive rate 1.2 pps
• show bfd session command in the Junos OS Routing Protocols and Policies Command
Reference
To configure an IPv4 default route, include the next-hop address and retain statements:
To configure an IPv6 static route, include the next-hop address and retain statements:
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
A common way to propagate static routes into the various routing protocols is to configure
the routes so that the next-hop routing device is the loopback address (commonly,
127.0.0.1). However, configuring static routes in this way with the Junos OS (by including
a statement such as route address/mask-length next-hop 127.0.0.1) does not propagate
the static routes, because the forwarding table ignores static routes whose next-hop
routing device is the loopback address. To propagate IPv4 static routes into the routing
protocols, include the discard statement:
To propagate IPv6 static routes into the routing protocols, include the discard statement:
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
In this configuration, you use the discard option instead of reject because discard does
not send an ICMP (or ICMPv6) unreachable message for each packet that it drops.
[edit]
user@host# set routing-options static route 0.0.0.0/0 next-hop 192.238.52.33
[edit]
user@host# show
routing-options {
static {
route 0.0.0.0/0 next-hop 192.238.52.33;
}
}
Configure IPv4 static routes that are retained in the forwarding table when the routing
software shuts down normally:
[edit]
user@host# set routing-options static route 0.0.0.0/0 next-hop 192.168.1.254 retain
[edit]
user@host# set routing-options static route 10.1.1.1/32 next-hop 127.0.0.1 retain
[edit]
user@host# show
routing-options {
static {
route 0.0.0.0/0 {
next-hop 192.168.1.254;
retain;
}
route 10.1.1.1/32 {
next-hop 127.0.0.1;
retain;
}
}
}
Configure an IPv4 static route and have it propagate into the routing protocols. In this
example, specify that the route 143.172.0.0/6 next-hop 127.0.0.1 should be discarded.
[edit]
user@host# set routing-options static route 143.172.0.0/6 discard
[edit]
user@host# show
routing-options {
static {
route 143.172.0.0/6 discard;
}
}
[edit]
user@host# set routing-options static rib-group some-group
user@host# set rib-groups some-group import-rib [inet.0 inet.2]
[edit]
user@host# show
routing-options {
static {
rib-group some-group;
}
rib-groups {
some-group {
import-rib [ inet.0 inet.2 ];
}
}
}
[edit]
user@host# set routing-options rib inet6.0 static route 0::/0 next-hop 8:3::1
[edit]
user@host# show
routing-options {
rib inet6.0 static {
route abcd::/48 next-hop 8:3::1;
}
}
Resolve an IPv6 static route to non-next-hop router 1::/64 using next-hop router 2000::1:
[edit]
user@host# set routing-options rib inet6.0 static route 1::/64 next-hop 2000::1 resolve
[edit]
user@host# show route 1::/64
Route aggregation allows you to combine groups of routes with common addresses into
a single entry in the routing table. This decreases the size of the routing table as well as
the number of route advertisements sent by the routing device.
An aggregate route becomes active when it has one or more contributing routes. A
contributing route is an active route that is a more specific match for the aggregate
destination. For example, for the aggregate destination 128.100.0.0/16, routes to
128.100.192.0/19 and 128.100.67.0/24 are contributing routes, but routes to 128.0.0.0./8,
128.0.0.0/16, and 128.100.0.0/16 are not.
A route can contribute only to a single aggregate route. However, an active aggregate
route can recursively contribute to a less specific matching aggregate route. For example,
an aggregate route to the destination 128.100.0.0/16 can contribute to an aggregate
route to 128.96.0.0/13.
When an aggregate route becomes active, it is installed in the routing table with the
following information:
• Reject next hop—If a more-specific packet does not match a more-specific route, the
packet is rejected and an ICMP unreachable message is sent to the packet’s originator.
• Preference value that results from the policy filter on the primary contributor, if a filter is
specified.
NOTE: You can configure only one aggregate route for each destination
prefix.
To configure aggregate routes in the default routing table (inet.0), include the
aggregate statement:
aggregate {
defaults {
To configure aggregate routes in one of the other routing tables, or to explicitly configure
aggregate routes in the default routing table (inet.0), include the aggregate statement:
rib routing-table-name {
aggregate {
defaults {
... aggregate-options ...
}
route destination-prefix {
policy policy-name;
... aggregate-options ...
}
}
}
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
NOTE: You cannot configure aggregate routes for the IPv4 multicast routing
table (inet.1) nor the IPv6 multicast routing table (inet6.1).
• defaults—Here you specify global aggregate route options. These are treated as global
defaults and apply to all the aggregate routes you configure in the aggregate statement.
This part of the aggregate statement is optional.
• route—Here you configure individual aggregate routes. In this part of the aggregate
statement, you optionally can configure aggregate route options. These options apply
to the individual destination only and override any options you configured in the defaults
part of the aggregate statement.
The following topics provide more information about configuring aggregate routes:
When you configure an individual aggregate route in the route part of the aggregate
statement, specify the destination of the route (in route destination-prefix) in one of the
following ways:
• default if this is the default route to the destination. This is equivalent to specifying an
IP address of 0.0.0.0/0.
In the defaults and route parts of the aggregate statement, you can specify
aggregate-options, which define additional information about aggregate routes that is
included with the route when it is installed in the routing table. All aggregate options are
optional. Aggregate options that you specify in the defaults part of the aggregate
statement are treated as global defaults and apply to all the aggregate routes you
configure in the aggregate statement. Aggregate options that you specify in the route
part of the aggregate statement override any global aggregate options and apply to that
destination only.
To configure aggregate route options, include one or more of them in the defaults or route
part of the aggregate statement:
[edit]
routing-options {
aggregate {
(defaults | route) {
(active | passive);
as-path <as-path> <origin (egp | igp | incomplete)> <atomic-aggregate> <aggregator
as-number in-address>;
community [ community-ids ];
discard;
(brief | full);
(metric | metric2 | metric3 | metric4) metric <type type>;
(preference | preference2 | color | color2) preference <type type>;
tag string;
}
}
}
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
To modify the default preference value, specify a primary preference value (preference).
You also can specify secondary preference value (preference2); and colors, which are
even finer-grained preference values (color and color2). To do this, include one or more
of the following statements:
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
32
The preference value can be a number in the range from 0 through 4,294,967,295 (2 – 1)
with a lower number indicating a more preferred route. For more information about
preference values, see “Route Preferences Overview” on page 6.
When you configure an individual route in the route part of the aggregate statement, or
when you configure the defaults for aggregate routes, you can specify a discard next hop.
This means that if a more specific packet does not match a more specific route, the
packet is rejected and a reject route for this destination is installed in the routing table,
but ICMP unreachable messages are not sent.
Being able to discard next hops allows you to originate a summary route, which can be
advertised through dynamic routing protocols, and allows you to discard received traffic
that does not match a more specific route than the summary route. To discard next hops,
include the discard option:
discard;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement. community-value is the community identifier and
can be a number in the range from 0 through 65,535.
as-number:community-value
as-number is the AS number and can be a value in the range from 1 through 65,534.
You also can specify community-ids for communities as one of the following well-known
community names, which are defined in RFC 1997:
You can explicitly exclude BGP community information with an aggregate route using
the none option. Include none when configuring an individual route in the route portion
of the aggregate statement to override a community option specified in the defaults
portion of the statement.
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
as-path is the AS path to include with the route. It can include a combination of individual
AS path numbers and AS sets. Enclose sets in brackets ( [ ] ). The first AS number in the
path represents the AS immediately adjacent to the local AS. Each subsequent number
represents an AS that is progressively farther from the local AS, heading toward the origin
of the path.
NOTE: In Junos OS Release 9.1 and later, the numeric AS range is extended
to provide BGP support for 4-byte AS numbers, as defined in RFC 4893, BGP
Support for Four-octet AS Number Space. For the AS number, you can configure
a value from 1 through 4,294,967,295. All releases of the Junos OS support
2-byte AS numbers. The 2-byte AS number range is 1 through 65,535 (this is
a subset of the 4-byte range).
In Junos OS Release 9.2 and later, you can also configure a 4-byte AS number
using the AS-dot notation format of two integer values joined by a period:
<16-bit high-order value in decimal>.<16-bit low-order value in decimal>. For
example, the 4-byte AS number of 65,546 in plain-number format is
represented as 1.10 in the AS-dot notation format. You can specify a value in
the range from 0.0 through 65535.65535 in AS-dot notation format.
You also can specify the AS path using the BGP origin attribute, which indicates the origin
of the AS path information:
To attach the BGP ATOMIC_AGGREGATE path attribute to the aggregate route, specify
the atomic-aggregate option. This path attribute indicates that the local system selected
a less specific route rather than a more specific route.
To attach the BGP AGGREGATOR path attribute to the aggregate route, specify the
aggregator option. When using this option, you must specify the last AS number that
formed the aggregate route (encoded as two octets), followed by the IP address of the
BGP system that formed the aggregate route.
To explicitly have all AS numbers from all contributing paths be included in the aggregate
route’s path, include the full option when configuring routes. Include this option when
configuring an individual route in the route portion of the aggregate statement to override
a retain option specified in the defaults portion of the statement.
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
Controlling Retention of Inactive Aggregate Routes in the Routing and Forwarding Tables
Static routes are only removed from the routing table if the next hop becomes
unreachable, which happens if there are no contributing routes. To have an aggregate
route remain continually installed in the routing and forwarding tables, include the passive
option when configuring the route:
Routes that have been configured to remain continually installed in the routing and
forwarding tables are marked with reject next hops when they are inactive.
To explicitly remove aggregate routes when they become inactive, include the active
option when configuring routes. Include this option when configuring an individual route
in the route portion of the aggregate statement to override a passive option specified in
the defaults portion of the statement.
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
You can associate a routing policy when configuring an aggregate route’s destination
prefix in the routes part of the aggregate statement. Doing so provides the equivalent of
an import routing policy filter for the destination prefix. That is, each potential contributor
to an aggregate route, along with any aggregate options, is passed through the policy
filter. The policy then can accept or reject the route as a contributor to the aggregate
route and, if the contributor is accepted, the policy can modify the default preferences.
The following algorithm is used to compare two aggregate contributing routes in order
to determine which one is the primary or preferred contributor:
1. Compare the protocol’s preferences of the contributing routes. The lower the
preference, the better the route. This is similar to the comparison that is done while
determining the best route for the routing table.
2. Compare the protocol’s preferences2 of the contributing routes. The lower preference2
value is better. If only one route has preferences2, then this route is preferred.
3. The preference values are the same. Proceed with a numerical comparison of the
prefix values.
b. If the two prefixes are numerically equal, the primary contributor is the route that
has the smallest prefix length value.
4. At this point, the two routes are the same. The primary contributor does not change.
An additional next hop is available for the existing primary contributor.
A rejected contributor still can contribute to a less specific aggregate route. If you do not
specify a policy filter, all candidate routes contribute to an aggregate route.
To associate a routing policy with an aggregate route, include the policy statement when
configuring the route:
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
After you have configured aggregate routes, you can have a protocol advertise the routes
by configuring a policy that is then exported by a routing protocol.
policy-statement advertise-aggregate-routes {
term first-term {
from protocol aggregate;
then accept;
}
term second-term {
then next policy;
}
}
protocols {
bgp {
export advertise-aggregate-routes;
...
}
}
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
Generated routes are used as the route of last resort. A packet is forwarded to the route
of last resort when the routing tables have no information about how to reach that
packet’s destination. One use of route generation is to generate a default route to use if
the routing table contains a route from a peer on a neighboring backbone.
A generated route becomes active when it has one or more contributing routes. A
contributing route is an active route that is a more specific match for the generated
destination. For example, for the destination 128.100.0.0/16, routes to 128.100.192.0/19
and 128.100.67.0/24 are contributing routes, but routes to 128.0.0.0./8, 128.0.0.0/16, and
128.100.0.0/16 are not.
A route can contribute only to a single generated route. However, an active generated
route can recursively contribute to a less specific matching generated route. For example,
a generated route to the destination 128.100.0.0/16 can contribute to a generated route
to 128.96.0.0/13.
By default, when generated routes are installed in the routing table, the next hop is chosen
from the primary contributing route.
NOTE: Currently, you can configure only one generated route for each
destination prefix.
To configure generated routes in the default routing table (inet.0), include the generate
statement:
generate {
defaults {
generate-options;
}
route destination-prefix {
policy policy-name;
generate-options;
}
}
To configure generated routes in one of the other routing tables, or to explicitly configure
generated routes in the default route table (inet.0), include the generate statement:
rib routing-table-name {
generate {
defaults {
generate-options;
}
route destination-prefix {
policy policy-name;
generate-options;
}
}
}
NOTE: You cannot configure generated routes for the IPv4 multicast routing
table (inet.1) or the IPv6 multicast routing table (inet6.1).
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
• defaults—Here you specify global generated route options. These are treated as global
defaults and apply to all the generated routes you configure in the generate statement.
This part of the generate statement is optional.
• route—Here you configure individual generated routes. In this part of the generate
statement, you optionally can configure generated route options. These options apply
to the individual destination only and override any options you configured in the defaults
part of the generate statement.
The following topics provide more information about configuring generated routes:
When you configure an individual generated route in the route part of the generate
statement, specify the destination of the route (in route destination-prefix) in one of the
following ways:
• default if this is the default route to the destination. This is equivalent to specifying an
IP address of 0.0.0.0/0.
In the defaults and route parts of the generate statement, you can specify options that
define additional information about generated routes that is included with the route
when it is installed in the routing table. All generated options are optional. Generated
options that you specify in the defaults part of the generate statement are treated as
global defaults and apply to all the generated routes you configure in the generate
statement. Generated options that you specify in the route part of the generate statement
override any global generated options and apply to that destination only.
To configure generated route options, include one or more of them in the defaults or route
part of the generate statement (for routing instances, include the statement).
[edit]
routing-options
generate {
(defaults | route) {
(active | passive);
as-path <as-path> <origin (egp | igp | incomplete)> <atomic-aggregate> <aggregator
as-number in-address>;
community [ community-ids ];
discard;
(brief | full);
(metric | metric2 | metric3 | metric4) metric <type type>;
(preference | preference2 | color | color2) preference <type type>;
tag string;
}
}
}
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
To modify the default preference value, specify a primary preference value (preference).
You also can specify a secondary preference value (preference2) and colors, which are
even finer-grained preference values (color and color2). To do this, include one or more
of the following statements:
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
32
The preference value can be a number in the range from 0 through 4,294,967,295 (2 – 1)
with a lower number indicating a more preferred route. For more information about
preference values, see “Route Preferences Overview” on page 6.
When you configure an individual route in the route part of the generate statement, or
when you configure the defaults for generated routes, you can specify a discard next hop.
This means that if a more specific packet does not match a more specific route, the
packet is rejected and a reject route for this destination is installed in the routing table,
but ICMP unreachable messages are not sent. The discard next-hop feature allows you
to originate a summary route, which can be advertised through dynamic routing protocols,
and allows you to discard received traffic that does not match a more specific route than
the summary route.
For example:
community [ community-ids ];
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
as-number:community-value
as-number is the AS number and can be a value in the range from 1 through 65,534.
You also can specify community-ids for communities as one of the following well-known
community names, which are defined in RFC 1997:
• no-export—Routes containing this community name are not advertised outside a BGP
confederation boundary.
You can explicitly exclude BGP community information with a generated route using the
none option. Include none when configuring an individual route in the route portion of the
generate statement to override a community option specified in the defaults portion of
the statement.
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
as-path is the AS path to include with the route. It can include a combination of individual
AS path numbers and AS sets. Enclose sets in brackets ( [ ] ). The first AS number in the
path represents the AS immediately adjacent to the local AS. Each subsequent number
represents an AS that is progressively farther from the local AS, heading toward the origin
of the path.
NOTE: In Junos OS Release 9.1 and later, the numeric AS range is extended
to provide BGP support for 4-byte AS numbers, as defined in RFC 4983, BGP
Support for Four-octet AS Number Space. For the AS number, you can configure
a number from 1 through 4,294,967,295. All releases of the Junos OS support
2-byte AS numbers. The 2-byte AS number range is 1 through 65,535 (this is
a subset of the 4-byte range).
In Junos OS Release 9.2 and later, you can also configure a 4-byte AS number
using the AS-dot notation format of two integer values joined by a period:
<16-bit high-order value in decimal>.<16-bit low-order value in decimal>. For
example, the 4-byte AS number of 65,546 in plain-number format is
represented as 1.10 in the AS-dot notation format. You can specify a value in
the range from 0.0 through 65535.65535 in AS-dot notation format.
You also can specify the AS path using the BGP origin attribute, which indicates the origin
of the AS path information:
To attach the BGP ATOMIC_AGGREGATE path attribute to the generated route, specify
the atomic-aggregate option. This path attribute indicates that the local system selected
a less specific route rather than a more specific route.
To attach the BGP AGGREGATOR path attribute to the generated route, specify the
aggregator option. When using this option, you must specify the last AS number that
formed the generated route (encoded as two octets), followed by the IP address of the
BGP system that formed the generated route.
tag string;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
brief;
To explicitly have all AS numbers from all contributing paths be included in the generated
route’s path, include the full state when configuring routes. Include this option when
configuring an individual route in the route portion of the generate statement to override
a retain option specified in the defaults portion of the statement.
full;
For a list of hierarchy levels at which you can include the brief or full statement, see the
statement summary sections for these statements.
Controlling Retention of Inactive Generated Routes in the Routing and Forwarding Tables
Static routes are only removed from the routing table if the next hop becomes
unreachable, which happens if there are no contributing routes. To have a generated
route remain continually installed in the routing and forwarding tables, include the passive
option when configuring the route:
Routes that have been configured to remain continually installed in the routing and
forwarding tables are marked with reject next hops when they are inactive.
To explicitly remove generated routes when they become inactive, include the active
option when configuring routes. Include this option when configuring an individual route
in the route portion of the generate statement to override a retain option specified in the
defaults portion of the statement.
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
You optionally can associate a routing policy when configuring a generated route’s
destination prefix in the routes part of the generate statement. Doing so provides the
equivalent of an import routing policy filter for the destination prefix. That is, each potential
contributor to a generated route, along with any generate options, is passed through the
policy filter. The policy can accept or reject the route as a contributor to the generated
route and, if the contributor is accepted, the policy can modify the default preferences.
The following algorithm is used to compare two generated contributing routes in order
to determine which one is the primary or preferred contributor:
1. Compare the protocol’s preference of the contributing routes. The lower the preference,
the better the route. This is similar to the comparison that is done while determining
the best route for the routing table.
2. Compare the protocol’s preference2 of the contributing routes. The lower preference2
value is better. If only one route has preference2, then this route is preferred.
3. The preference values are the same. Proceed with a numerical comparison of the
prefixes’ values.
b. If the two prefixes are numerically equal, the primary contributor is the route that
has the smallest prefix length value.
At this point, the two routes are the same. The primary contributor does not change. An
additional next hop is available for the existing primary contributor.
A rejected contributor still can contribute to less specific generated route. If you do not
specify a policy filter, all candidate routes contribute to a generated route.
To associate a routing policy with an generated route, include the policy statement:
policy policy-name;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
Martian addresses are host or network addresses about which all routing information is
ignored. They commonly are sent by improperly configured systems on the network and
have destination addresses that are obviously invalid. To view the default and configured
martian routes, run the show route martians command.
• 0.0.0.0/8
• 127.0.0.0/8
• 128.0.0.0/16
• 191.255.0.0/16
• 192.0.0.0/24
• 223.255.255.0/24
• 224.0.0.0/4
• 224.0.0.0/24
• 240.0.0.0/4
In IPv6, the loopback address and the multicast resolve and discard routes are the default
martian addresses, as shown here:
• ::1/128
• ff00::/8
• ff02::/16
Tables inet.1 and inet6.1 are multicast route tables. Table inet.1 does not include martian
routes for 224/4 or 224/24. Likewise, inet6.1 does not include martian routes for ff00::/8
and ff02::/16. The default martian route for inet6.1 is ::1/128. The default martian routes
for inet.1 are as follows:
• 0.0.0.0/8
• 127.0.0.0/8
• 128.0.0.0/16
• 191.255.0.0/16
• 192.0.0.0/24
• 223.255.255.0/24
• 240.0.0.0/4
martians {
destination-prefix match-type;
}
To add martian addresses to the list of default martian addresses in other routing tables,
or to explicitly add martian addresses to the list of default martian addresses in the
primary IPv6 routing table (inet6.0), include the martians statement:
rib inet6.0 {
martians {
destination-prefix match-type;
}
}
To add martian addresses to the list of default martian addresses in any other routing
tables, or to explicitly add martian addresses to the list of default martian addresses in
the default routing table (inet.0), include the martians statement:
rib routing-table-name {
martians {
destination-prefix match-type;
}
}
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
• default—If this is the default route to the destination. This is equivalent to specifying
the IP address 0.0.0.0/0.
In match-type, specify the type of match to apply to the destination prefix. For more
information about match types, see the Junos OS Routing Policy Configuration Guide.
To delete a martian address from the default routing table (inet.0), include the martians
statement:
martians {
destination-prefix match-type allow;
}
To delete a martian address from other routing tables, or to explicitly delete a martian
address from the primary IPv6 routing table (inet6.0), include the martians statement:
rib inet6.0 {
martians {
destination-prefix match-type allow;
}
}
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
A flow route is an aggregation of match conditions for IP packets. Flow routes are
propagated through the network using flow-specification network-layer reachability
information (NLRI) messages and installed into the flow routing table
instance-name.inetflow.0. Packets can travel through flow routes only if specific match
conditions are met.
Flow routes and firewall filters are similar in that they filter packets based on their
components and perform an action on the packets that match. Flow routes provide
traffic filtering and rate-limiting capabilities much like firewall filters. In addition, you can
propagate flow routes across different autonomous systems.
flow {
route name {
match {
match-conditions;
}
then {
actions;
}
}
term-order (legacy | standard);
validation {
traceoptions {
file filename <files number> <size size> <world-readable | no-world-readable>;
flag flag <flag-modifier> <disable>;
}
}
}
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
Flow routes are propagated by BGP through flow-specification NLRI messages. You must
enable BGP to propagate these NLRIs. For more information on configuring BGP, see
Configuring BGP.
To configure a match condition, include the match statement at the [edit routing-options
flow] hierarchy level:
destination-port TCP or User Datagram Protocol (UDP) destination port field. You cannot specify both the port and
number destination-port match conditions in the same term.
In place of the numeric value, you can specify one of the following text synonyms (the port numbers
are also listed): afs (1483), bgp (179), biff (512), bootpc (68), bootps (67), cmd (514), cvspserver (2401),
dhcp (67), domain (53), eklogin (2105), ekshell (2106), exec (512), finger (79), ftp (21), ftp-data (20),
http (80), https (443), ident (113), imap (143), kerberos-sec (88), klogin (543), kpasswd (761),
krb-prop (754), krbupdate (760), kshell (544), ldap (389), login (513), mobileip-agent (434),
mobilip-mn (435), msdp (639), netbios-dgm (138), netbios-ns (137), netbios-ssn (139), nfsd (2049),
nntp (119), ntalk (518), ntp (123), pop3 (110), pptp (1723), printer (515), radacct (1813), radius (1812),
rip (520), rkinit (2108), smtp (25), snmp (161), snmptrap (162), snpp (444), socks (1080), ssh (22),
sunrpc (111), syslog (514), tacacs-ds (65), talk (517), telnet (23), tftp (69), timed (525), who (513),
xdmcp (177), zephyr-clt (2103), or zephyr-hm (2104).
dscp number Differentiated Services code point (DSCP). The DiffServ protocol uses the type-of-service (ToS) byte
in the IP header. The most significant six bits of this byte form the DSCP.
fragment type Fragment type field. The keywords are grouped by the fragment type with which they are associated:
• dont-fragment
• first-fragment
• is-fragment
• last-fragment
• not-a-fragment
icmp-code number ICMP code field. This value or keyword provides more specific information than icmp-type. Because
the value’s meaning depends upon the associated icmp-type value, you must specify icmp-type along
with icmp-code.
In place of the numeric value, you can specify one of the following text synonyms (the field values are
also listed). The keywords are grouped by the ICMP type with which they are associated:
icmp-type number ICMP packet type field. Normally, you specify this match in conjunction with the protocol match
statement to determine which protocol is being used on the port.
In place of the numeric value, you can specify one of the following text synonyms (the field values are
also listed): echo-reply (0), echo-request (8), info-reply (16), info-request (15), mask-request (17),
mask-reply (18), parameter-problem (12), redirect (5), router-advertisement (9), router-solicit (10),
source-quench (4), time-exceeded (11), timestamp (13), timestamp-reply (14), or unreachable (3).
port number TCP or UDP source or destination port field. You cannot specify both the port match and either the
destination-port or source-port match condition in the same term.
In place of the numeric value, you can specify one of the text synonyms listed under destination-port.
protocol number IP protocol field. In place of the numeric value, you can specify one of the following text synonyms (the
field values are also listed): ah, egp (8), esp (50), gre (47), icmp (1), igmp (2), ipip (4), ipv6 (41), ospf (89),
pim (103), rsvp (46), tcp (6), or udp (17).
source-port number TCP or UDP source port field. You cannot specify the port and source-port match conditions in the
same term.
In place of the numeric field, you can specify one of the text synonyms listed under destination-port.
Actions
accept Accept a packet. This is the default.
discard Discard a packet silently, without sending an Internet Control Message Protocol (ICMP) message.
community Replace any communities in the route with the specified communities.
rate-limit bytes-per-second Limit the bandwidth on the flow route. Express the limit in bytes per second (Bps).
Flow routes received using the BGP network layer reachability information (NLRI)
messages are validated before they are installed into the flow primary instance routing
table instance.inetflow.0. The validation procedure is described in the
draft-ietf-idr-flow-spec-09.txt, Dissemination of Flow Specification Rules. You can bypass
the validation process for flow routes using BGP NLRI messages and use your own specific
import policy.
To trace validation operations, include the validation statement at the [edit routing-options
flow] hierarchy level:
BEST PRACTICE: We recommend that you configure the Junos OS to use the
term-ordering algorithm first defined in version 7 of the BGP flow specification
draft. We also recommend that you configure the Junos OS to use the same
term-ordering algorithm on all routing instances configured on a router.
To configure BGP to use the flow-specification algorithm first defined in version 7 of the
Internet draft, include the standard statement at the [edit routing-options flow term-order]
hierarchy level:
[edit routing-options]
flow {
term-order standard;
}
To revert to using the term-ordering algorithm defined in version 6, include the legacy
statement at the [edit routing-options flow term-order] hierarchy level:
[edit routing-options]
flow {
term-order legacy;
}
NOTE: The configured term order has only local significance. That is, the
term order does not propagate with flow routes sent to the remote BGP peers,
whose term order is completely determined by their own term order
configuration. Therefore, you should be careful when configuring the
order-dependent action next term when you are not aware of the term order
configuration of the remote peers. The local next term might differ from the
next term configured on the remote peer.
To apply a forwarding table filter to a forwarding table, include the filter and input
statements at the [edit forwarding-options family family-name] hierarchy level:
Forwarding table filtering is not supported with the flow routes configuration.
For more information about forwarding table filters, see the Junos OS Routing Policy
Configuration Guide.
This chapter discusses how to perform the following tasks for configuring other
protocol-independent routing properties:
An autonomous system (AS) is a set of routing devices that are under a single technical
administration and that generally use a single interior gateway protocol (IGP) and metrics
to propagate routing information within the set of routing devices. An AS appears to other
ASs to have a single, coherent interior routing plan and presents a consistent picture of
what destinations are reachable through it.
ASs are identified by a number that is assigned by the Network Information Center (NIC)
in the United States (http://www.isi.edu). In Junos OS Release 9.1 and later, you can
configure a number from 1 through 4,294,967,295 in plain-number format. The range is
extended to provide BGP support for 4-byte AS numbers, as defined in RFC 4893, BGP
Support for Four-octet AS Number Space. All releases of the Junos OS support 2-byte AS
numbers. The 2-byte AS number range is 1 through 65,535 in plain-number format (this
is a subset of the 4-byte range).
RFC 4893 introduces two new optional transitive BGP attributes, AS4_PATH and
AS4_AGGREGATOR. These new attributes are used to propagate 4-byte AS path
information across BGP speakers that do not support 4-byte AS numbers. RFC 4893
also introduces a reserved, well-known, 2-byte AS number, AS 23456. This reserved AS
number is called AS_TRANS in RFC 4893.
In Junos OS Release 9.3 and later, you can also configure a 4-byte AS number using the
AS-dot notation format of two integer values joined by a period: <16-bit high-order value
in decimal>.<16-bit low-order value in decimal>. For example, the 4-byte AS number
of 65,546 in plain-number format is represented as 1.10 in the AS-dot notation format.
In AS-dot notation format, you can specify a value for AS number from 0.0
through 65535.65535.
If you are using BGP on the routing device, you must configure an AS number.
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
To specify the number of times detection of the AS number in the AS_PATH attribute
causes the route to be discarded or hidden, include the loops option. For example, if you
configure loops 1, the route is hidden if the AS number is detected in the path one or more
times. This is the default behavior. If you configure loops 2, the route is hidden if the AS
number is detected in the path two or more times. You can specify a value in the range
from 1 through 10. The default value is 1.
The AS path attribute is modified when a route is advertised to an EBGP peer. Each time
a route is advertised to an EBGP peer, the local routing device prepends its AS number
to the existing path attribute, and a value of 1 is added to the AS number.
NOTE: When you specify the same AS number in more than one routing
instance on the local routing device, you must configure the same number
of loops for the AS number in each instance. For example, if you configure a
value of 3 for the loops statement in a VPN routing and forwarding (VRF)
routing instance that uses the same AS number as that of the master instance,
you must also configure a value of 3 loops for the AS number in the master
instance.
[edit]
routing-options {
autonomous-system 65546;
}
}
Configure the 4-byte AS number 65,546 represented in AS-dot notation format (in this
example, 1.10 is the AS-dot notation format for 65,546):
[edit]
routing-options {
autonomous-system 1.10;
}
}
[edit]
routing-options {
autonomous-system 60000;
}
}
Related • 4-Byte Autonomous System Numbers Overview in the Using 4-Byte Autonomous System
Documentation Numbers in BGP Networks Technology Overview
The router identifier is used by BGP and OSPF to identify the routing device from which
a packet originated. The router identifier usually is the IP address of the local routing
device. If you do not configure a router identifier, the IP address of the first interface to
come online is used. This is usually the loopback interface. Otherwise, the first hardware
interface with an IP address is used.
router-id address;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
NOTE: We strongly recommend that you configure the router identifier under
the [edit routing-options] hierarchy level to avoid unpredictable behavior if
the interface address on a loopback interface changes.
If you administer multiple ASs that contain a very large number of BGP systems, you can
group them into one or more confederations. Each confederation is identified by its own
AS number, which is called a confederation AS number. To external ASs, a confederation
appears to be a single AS. Thus, the internal topology of the ASs making up the
confederation is hidden.
The BGP path attributes NEXT_HOP, LOCAL_PREF, and MULTI_EXIT_DISC, which normally
are restricted to a single AS, are allowed to be propagated throughout the ASs that are
members of the same confederation.
Because each confederation is treated as if it were a single AS, you can apply the same
routing policy to all the ASs that make up the confederation.
Grouping ASs into confederations reduces the number of BGP connections required to
interconnect ASs.
If you are using BGP, you can enable the local routing device to participate as a member
of an AS confederation. To do this, include the confederation statement:
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
Specify the AS confederation identifier, along with the peer AS numbers that are members
of the confederation.
Note that peer adjacencies do not form if two BGP neighbors disagree about whether
an adjacency falls within a particular confederation.
Before you can perform flow aggregation, the routing protocol process must export the
AS path and routing information to the sampling process. To do this, include the
route-record statement:
route-record;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
You can group together one or more routing tables to form a routing table group. Within
a group, a routing protocol can import routes into all the routing tables in the group and
can export routes from a single routing table.
rib-groups group-name {
import-policy [ policy-names ];
import-rib [ routing-table-names ];
export-rib routing-table-name;
}
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
The routing table group can have any name you choose (specified in group-name). If the
group name you specify is not created explicitly, you can create it by naming it in the
rib-groups statement.
Each routing table group must contain one or more routing tables that the Junos OS uses
when importing routes (specified in the import-rib statement). The first routing table you
specify is the primary routing table, and any additional routing tables are the secondary
routing tables.
The primary routing table determines the address family of the routing table group. To
configure an IP version 4 (IPv4) routing table group, specify inet.0 as the primary routing
table. To configure an IP version 6 (IPv6) routing table group, specify inet6.0 as the
primary routing table. If you configure an IPv6 routing table group, the primary and all
secondary routing tables must be IPv6 routing tables (inet6.x).
In Junos OS Release 9.5 and later, you can include both IPv4 and IPv6 routing tables in
an IPv4 import routing table group using the import-rib statement. In releases prior to
Junos OS Release 9.5, you can only include either IPv4 or IPv6 routing tables in the same
import-rib statement. The ability to configure an import routing table group with both
IPv4 and IPv6 routing tables enables you, for example, to populate the inet6.3 routing
table with IPv6 addresses that are compatible with IPv4. Specify inet.0 as the primary
routing table, and specify inet6.3 as a secondary routing table.
Each routing table group optionally can contain one routing table group that the Junos
OS uses when exporting routes to the routing protocols (specified in the export-rib
statement).
NOTE: If you configure an import routing table group that includes both IPv4
and IPv6 routing tables, any corresponding export routing table group must
include only IPv4 routing tables.
If you have configured a routing table, configure the OSPF primary instance at the
[edit protocols ospf] hierarchy level with the statements needed for your network so that
routes are installed in inet.0 and in the forwarding table. Make sure to include the routing
table group. For more information, see “Example: Configuring Multiple Routing Instances
of OSPF” on page 256.
After specifying the routing table from which to import routes, you can apply one or more
policies to control which routes are installed in the routing table group. To apply a policy
to routes being imported into the routing table group, include the import-policy statement:
rib-groups group-name {
import-policy [ policy-names ];
}
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
[edit]
routing-options {
interface-routes {
rib-group if-rg;
}
rib-groups if-rg {
import-rib [ inet.0 inet.2 ];
}
}
Create an IPv6 routing table group so that interface routes are installed into two routing
tables, inet6.0 and inet6.2:
[edit]
routing-options {
interface-routes {
rib-group inet6 if-rg;
}
rib-groups if-rg {
import-rib [ inet6.0 inet6.2 ];
}
}
By default, IPv4 interface routes (also called direct routes) are imported into routing
table inet.0, and IPv6 interface routes are imported into routing table inet6.0. If you are
configuring alternate routing tables for use by some routing protocols, it might be
necessary to import the interface routes into the alternate routing tables. To define the
routing tables into which interface routes are imported, you create a routing table group
and associate it with the routing device’s interfaces.
To associate an IPv4 routing table group with the routing device’s interfaces and specify
which routing table groups interface routes are imported into, include the interface-routes
statement:
interface-routes {
rib-group group-name;
}
To associate an IPv6 routing table group with an interface, include the interface-routes
statement at the [edit routing-options] hierarchy level:
interface-routes {
rib-group inet6 group-name;
}
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
To create the routing table groups, include the passive statement at the
[edit routing-options] hierarchy level. For configuration information, see “Creating Routing
Table Groups” on page 123.
If you have configured a routing table, configure the OSPF primary instance at the [edit
protocols ospf] hierarchy level with the statements needed for your network so that
routes are installed in inet.0 and in the forwarding table. Make sure to include the routing
table group. For more information, see “Example: Configuring Multiple Routing Instances
of OSPF” on page 256.
export {
lan;
point-to-point;
}
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
To export LAN routes, include the lan option. To export point-to-point routes, include
the point-to-point option.
Only local routes on point-to-point interfaces configured with a destination address are
exportable.
multicast {
scope scope-name {
interface [ interface-names ];
prefix destination-prefix;
}
scope-policy policy-name;
}
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
Specify a name for the scope, its address range, and the routing device interfaces on
which you are configuring scoping.
You can apply a multicast scoping policy to the routing table. To apply a scoping policy,
include the scope-policy statement at the [edit routing-options multicast] hierarchy level.
For more information on configuring a scoping policy, see the Junos OS Routing Policy
Configuration Guide.
Configure the local scope on a Fast Ethernet interface. Configure the organization scope
on a Fast Ethernet and a SONET/SDH interface. Configure the engineering and marketing
scopes on two SONET/SDH interfaces.
[edit]
routing-options {
multicast {
scope local {
prefix 239.255.0.0/16;
fe-0/1/0.0;
}
scope organization {
prefix 239.192.0.0/14;
interface [ fe-0/1/0.0 so-0/0/0.0 ];
}
scope engineering {
prefix 239.255.255.0/24;
interface [ so-0/0/1.0 so-0/0/2.0 ];
}
scope marketing {
prefix 239.255.254.0/24;
interface [ so-0/0/1.0 so-0/0/2.0 ];
}
}
}
You can also configure multicast packets to be forwarded over a static route, such as a
static route associated with an LSP next hop. Multicast packets are accepted on an
interface and forwarded over a static route in the forwarding table. This is useful when
you want to enable multicast traffic on a specific interface without configuring PIM on
the interface.
interface interface-name;
interface interface-name {
disable;
}
For a list of hierarchy levels at which you can include these statements, see the statement
summary section for these statements.
NOTE: You cannot enable multicast traffic on an interface and configure PIM
on the same interface simultaneously.
NOTE: Static routes must be configured before you can enable multicast on
an interface. Configuring the interface statement alone does not install any
routes into the routing table. This feature relies on the static route
configuration.
IGMPv3 supports Source Specific Multicast (SSM) groups. By utilizing inclusion lists, only
sources that are specified send to the SSM group. By default, the SSM group multicast
address is limited to the IP address range 232.0.0.0 to 232.255.255.255. You can configure
additional SSM groups. Shared tree delivery is prohibited on SSM groups.
ssm-groups {
address;
}
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
multicast {
forwarding-cache {
threshold suppress value <reuse value>;
}
}
• [edit routing-options]
By default, there are no limits on the number of multicast forwarding cache entries.
Specify a value for the threshold at which to suppress new multicast forwarding cache
entries and an optional reuse value for the threshold at which the router begins to create
new multicast forwarding cache entries. The range for both is from 1 through 200,000.
If configured, the reuse value should be less than the suppression threshold value. The
suppression value is mandatory. If you do not specify the optional reuse value, then the
number of multicast forwarding cache entries is limited to the suppression value. A new
entry is created as soon as the number of multicast forwarding cache entries falls below
the suppression value.
For the active route, when there are multiple equal-cost paths to the same destination,
by default, the Junos OS chooses in a random fashion one of the next-hop addresses to
install into the forwarding table. Whenever the set of next hops for a destination changes
in any way, the next-hop address is chosen again, also in a random fashion.
You can configure the Junos OS so that, for the active route, all next-hop addresses for
a destination are installed in the forwarding table. This is called per-packet load balancing.
You can use load balancing to spread traffic across multiple paths between routing
devices. The behavior of the per-packet load-balancing function varies according to the
version of the Internet Processor ASIC in the routing device.
On routing devices with an Internet Processor I ASIC, when per-packet load balancing is
configured, traffic between routing devices with multiple paths is spread in a random
fashion across the available interfaces. The forwarding table balances the traffic headed
to a destination, transmitting packets in round-robin fashion among the multiple next
hops (up to a maximum of eight equal-cost load-balanced paths). The traffic is
load-balanced on a per-packet basis.
On routing devices with the Internet Processor II ASIC and T Series Internet Processor II
ASIC, when per-packet load balancing is configured, traffic between routing devices with
multiple paths is divided into individual traffic flows (up to a maximum of 16 equal-cost
load-balanced paths). Packets for each individual flow are kept on a single interface. To
recognize individual flows in the transit traffic, the routing device examines each of the
following:
• Source IP address
• Destination IP address
• Protocol
The routing device recognizes packets in which all of these parameters are identical, and
it ensures that these packets are sent out through the same interface. This prevents
problems that might otherwise occur with packets arriving at their destination out of
their original sequence.
policy-statement policy-name {
from {
match-conditions;
route-filter destination-prefix match-type <actions>;
prefix-list name;
}
then {
load-balance per-packet;
}
}
2. Apply the policy to routes exported from the routing table to the forwarding table. To
do this, include the forwarding-table and export statements:
forwarding-table {
export policy-name;
}
NOTE: You cannot apply the export policy to VRF routing instances.
For a list of hierarchy levels at which you can include these statements, see the statement
summary section for these statements.
NOTE: Specify all next-hops of that route, if more than one exists, when
allocating a label corresponding to a route that is being advertised.
NOTE: Configure the forwarding-options hash key for MPLS to include the
IP payload.
[edit]
policy-options {
policy-statement load-balancing-policy {
then {
load-balance per-packet;
}
}
}
routing-options {
forwarding-table {
export load-balancing-policy;
}
}
[edit]
policy-options {
policy-statement load-balancing-policy {
from {
route-filter 192.168.10/24 orlonger;
route-filter 9.114/16 orlonger;
}
then {
load-balance per-packet;
}
}
}
routing-options {
forwarding-table {
export load-balancing-policy;
}
}
To control the operation of unicast RPF check, include the unicast-reverse-path statement:
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
To consider only active paths during the unicast RPF check, include the active-paths
option. To consider all feasible paths during the unicast RPF check, include the
feasible-paths option.
You must enable unicast RPF check on an interface. To do so, include the rpf-check
statement:
For more information about configuring unicast RPF on an interface, see the Junos OS
Services Interfaces Configuration Guide.
[edit firewall]
filter rpf-special-case-dhcp-bootp {
term allow-dhcp-bootp {
from {
source-address {
0.0.0.0/32;
}
address {
255.255.255.255/32;
}
}
then {
count rpf-dhcp-bootp-traffic;
accept;
}
}
term default {
then {
log;
reject;
}
}
}
[edit]
interfaces {
so-0/0/0 {
unit 0 {
family inet {
rpf-check fail-filter rpf-special-case-dhcp-bootp;
}
}
}
}
Graceful restart allows a routing device undergoing a restart to inform its adjacent
neighbors and peers of its condition. The restarting routing device requests a grace period
from the neighbor or peer, which can then cooperate with the restarting routing device.
With a graceful restart, the restarting routing device can still forward traffic during the
restart period, and convergence in the network is not disrupted. The restart is not visible
to the rest of the network, and the restarting routing device is not removed from the
network topology.
The graceful restart request occurs only if the following conditions are met:
• The restarting routing device is not already cooperating with another restart already
in progress.
Graceful restart is disabled by default. You must configure graceful restart at the [edit
routing-options] hierarchy level to enable the feature for Layer 2 and Layer 3 VPNs.
graceful-restart {
disable;
restart-duration seconds;
}
NOTE: Configuring graceful restart for BGP resets the BGP peer routing
statistics to zero.
To disable graceful restart, include the disable statement. To configure a time period for
complete restart, include the restart-duration statement. You can specify a number
between 120 and 900.
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
route-distinguisher-id address;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
A VPN that travels through a non-MPLS network requires a generic routing encapsulation
(GRE) tunnel. This tunnel can be either a static tunnel or a dynamic tunnel. A static tunnel
is configured manually between two provider edge (PE) routers. A dynamic tunnel is
configured using BGP route resolution.
When a router receives a VPN route that resolves over a BGP next hop that does not have
an MPLS path, a GRE tunnel can be created dynamically, allowing the VPN traffic to be
forwarded to that route. Formerly, GRE tunnels had to be established manually. Only
GRE IPv4 tunnels are supported.
dynamic-tunnels tunnel-name {
destination-networks prefix;
source-address address;
tunnel-type type;
}
• [edit routing-options]
Specify the IPv4 prefix range (for example, 10/8 or 11.1/16) for the destination network
by including the destination-networks statement. Only tunnels within the specified IPv4
prefix range can be created.
destination-networks prefix;
Specify the source address for the GRE tunnels by including the source-address statement.
The source address specifies the address used as the source for the local tunnel endpoint.
It can be any local address on the router (typically the router ID or the loopback address).
source-address address;
tunnel-type type;
To control how much information the routing protocol process should log, include the
options statement.
Include the following form of the statement to log messages for a particular severity
level and all higher levels:
routing-options {
options syslog upto level;
}
Include the following form of the statement to log messages for a particular severity
level:
routing-options {
options syslog level level;
}
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
NOTE: System logging frequently deals with processes logged at the info or
notice severity level. Make sure that your regular system logging configurations
include the info or notice levels.
[edit]
user@host# set routing-options options syslog upto emergency
[edit]
user@host# show
routing-options {
options syslog upto emergency;
}
[edit]
user@host# set routing-options options syslog level alert critical
[edit]
user@host# show
routing-options {
options syslog alert critical;
}
You can configure a routing table to accept routes from specific routing tables. You can
also configure a routing table to use specific import policies to produce a route resolution
table to resolve routes.
resolution {
rib routing-table-name {
import [ policy-names ];
resolution-ribs [ routing-table-names ];
}
}
To specify the name of the routing table to modify, include the rib routing-table-name
statement. To specify one or more import policies to use for route resolution, include the
import [ policy-names ] statement. To specify one or more routing tables to use for route
resolution, include the resolution-ribs [ routing-table-names ] statement.
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
The Junos OS supports the concept of an indirect next hop for all routing protocols that
support indirectly connected next hops, also known as third-party next hops.
Because routing protocols such as IBGP can send routing information about indirectly
connected routes, the Junos OS relies on routes from intra-AS routing protocols (OSPF,
IS-IS, RIP, and static) to resolve the best directly connected next hop. The Routing Engine
performs the task of route resolution to determine the best directly connected next hop
and install the route to the Packet Forwarding Engine.
By default, the Junos OS does not maintain the route for indirect next hop to forwarding
next-hop binding on the Packet Forwarding Engine forwarding table. As a result, when
a rerouting event occurs, potentially thousands of route to forwarding next-hop bindings
must be updated, which increases the route convergence time. Figure 2 on page 136
illustrates the route to forwarding next-hop bindings with indirect next hop disabled.
You can enable the Junos OS to maintain the indirect next hop to forwarding next-hop
binding on the Packet Forwarding Engine forwarding table. As a result, fewer route to
forwarding next-hop bindings need to be updated, which improves the route convergence
time. Figure 3 on page 137 illustrates the route to forwarding next-hop bindings with indirect
next hop enabled.
indirect-next-hop;
NOTE: When virtual private LAN service (VPLS) is configured on the routing
device, the indirect-next-hop statement is configurable at the [edit
routing-options forwarding-table] hierarchy level. However, this configuration
is not applicable to indirect nexthops specific to VPLS routing instances.
no-indirect-next-hop;
NOTE: By default, the Junos Trio Modular Port Concentrator (MPC) chipset
on MX Series Routers is enabled with indirectly connected next hops and this
cannot be disabled using the no-indirect-next-hop statement.
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
Nonstop active routing (NSR) allows a routing platform with redundant Routing Engines
to switch over from a primary Routing Engine to a backup Routing Engine without alerting
peer nodes that a change has occurred. NSR uses the same infrastructure as graceful
Routing Engine switchover (GRES) to preserve interface and kernel information. However,
NSR also saves routing protocol information by running the routing protocol (rpd) process
on the backup Routing Engine. Saving this additional information makes NSR
self-contained and eliminates the need for helper routers to assist the routing platform
in restoring routing protocol information. As a result of this enhanced functionality, NSR
is a natural replacement for graceful restart protocol extensions.
If the kernel on the master Routing Engine stops operating, the master Routing Engine
experiences a hardware failure, or the administrator initiates a manual switchover,
mastership switches to the backup Routing Engine. To configure NSR, you must first
enable GRES on your routing platform.
[edit routing-options]
nonstop-routing;
NOTE: You cannot configure NSR and graceful restart protocol extensions
simultaneously. To ensure proper operation, include either the nonstop-routing
statement or the graceful-restart statement at the hierarchy level, but not
both statements at the same time.
Global routing protocol tracing operations track all general routing operations and record
them in a log file. To set protocol-specific tracing operations and to modify the global
tracing operations for an individual protocol, configure tracing for that protocol.
For a general discussion about tracing and the precedence of multiple tracing operations,
see the Junos OS System Basics Configuration Guide.
To configure global routing protocol tracing, include the traceoptions statement at the
[edit routing-options] hierarchy level:
traceoptions {
file filename <files number> <size size> <world-readable | no-world-readable>;
flag flag <disable>;
}
Using the traceoptions statement, you can specify the following global routing protocol
tracing flags:
• config-internal—Configuration internals
• general—All normal operations and routing table changes (a combination of the normal
and route trace operations)
• parse—Configuration parsing
• regex-parse—Regular-expression parsing
• state—State transitions
• timer—Timer usage
NOTE: Use the trace flag all with caution. This flag may cause the CPU to
become very busy.
The flags in a traceoptions flag statement are identifiers. When you use the set command
to configure a flag, any flags that might already be set are not modified. In the following
example, setting the timer tracing flag has no effect on the already configured task flag.
Use the delete command to delete a particular flag.
[edit]
routing-options {
traceoptions {
file routing size 10m files 10;
flag all;
}
}
[edit]
routing-options {
traceoptions {
file routing size 10m files 10;
flag all;
flag normal disable;
}
}
[edit]
routing-options {
traceoptions {
file routing size 10m files 10;
flag route;
}
}
PPM runs on the Routing Engine and Packet Forwarding Engine by default. You can only
disable PPM on the Packet Forwarding Engine. To disable distributed PPM on the Packet
Forwarding Engine, include the ppm statement:
ppm {
no-delegate-processing;
}
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
NOTE: Distributed PPM is supported only on the M7i and M10i routers with
Enhanced CFEB (CFEB-E); M120 and M320 routers; and all MX Series, T
Series, TX Matrix routers, and EX Series switches.
• BFD single-hop session for both IPv4 and IPv6, including EBGP, ISIS, and OSPF
• Rapid Spanning Tree Protocol (RSTP) and Multiple Spanning Tree Protocol (MSTP)
interface sessions
• Link Aggregation Control Protocol (LACP) sessions (MX Series and M320 routers only)
• BFD over an aggregated interface for IPv6, RSTP, MSTP, and LACP
• BFD over an IPv6 interface that does not have the global IPv6 address (or only has a
link local address)
• Multihop BFD with IBGP, static routes, EBGP multihop, and MPLS LSP
In addition, on the M120 router, when Forwarding Engine Board (FEB) redundancy is
configured and a FEB fails over, PPM sessions do not automatically switch over to the
newly active FEB.
Starting in Junos OS Release 8.2 for IPv6 and Junos OS Release 8.5 for IPv4, source
routing is disabled by default on J Series Services Routers , M Series Multiservice Edge
Routers, MX Series 3D Universal Edge Routers, T Series Core Routers, and on EX Series
switches. To enable source routing, include the source-routing statement:
source-routing {
(ip | ipv6);
}
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
Creating Policies to Control Label Allocation and Substitution for MPLS Ingress and
AS Border Routers
In Junos OS Release 10.0 and later, you can control label-advertisements on MPLS ingress
and AS border routers (ASBRs) on a per-route basis by specifying a label allocation policy
using the allocation label-allocation-policy statement at the [edit routing-instances
routing-instance-name routing-options label] hierarchy level. You can configure the label
allocation mode as either per-nexthop or per-table.
Summary of Protocol-Independent
Routing Properties Configuration
Statements
access
Syntax access {
route ip-prefix</prefix-length> {
metric route-cost;
next-hop next-hop;
preference (Access) route-distance;
qualified-next-hop next-hop;
tag tag-number
}
access-internal
Syntax access-internal {
route ip-prefix</prefix-length> {
next-hop next-hop;
qualified-next-hop next-hop
}
active
Description Configure whether static, aggregate, or generated routes are removed from the routing
and forwarding tables when they become inactive. Routes that have been configured to
remain continually installed in the routing and forwarding tables are marked with reject
next hops when they are inactive.
• active—Remove a route from the routing and forwarding tables when it becomes
inactive.
• passive—Have a route remain continually installed in the routing and forwarding tables
even when it becomes inactive.
Default active
aggregate
Syntax aggregate {
defaults {
... aggregate-options ...
}
route destination-prefix {
policy policy-name;
... aggregate-options ...
}
}
• (active | passive);
• (brief | full);
• community [ community-ids ];
• discard;
• tag string;
defaults—Specify global aggregate route options. These options only set default attributes
inherited by all newly created aggregate routes. These are treated as global defaults
and apply to all the aggregate routes you configure in the aggregate statement. This
part of the aggregate statement is optional.
as-path
Description Associate BGP autonomous system (AS) path information with a static, aggregate, or
generated route.
In Junos OS Release 9.1 and later, the numeric range for the AS number is extended to
provide BGP support for 4-byte AS numbers as defined in RFC 4893, BGP Support for
Four-octet AS Number Space. RFC 4893 introduces two new optional transitive BGP
attributes, AS4_PATH and AS4_AGGREGATOR. These new attributes are used to
propagate 4-byte AS path information across BGP speakers that do not support 4-byte
AS numbers. RFC 4893 also introduces a reserved, well-known, 2-byte AS number, AS
23456. This reserved AS number is called AS_TRANS in RFC 4893. For more information,
see “Configuring AS Numbers for BGP” on page 120. All releases of the Junos OS support
2-byte AS numbers.
In Junos OS Release 9.2 and later, you can also configure a 4-byte AS number using the
AS-dot notation format of two integer values joined by a period: <16-bit high-order value
in decimal>.<16-bit low-order value in decimal>. For example, the 4-byte AS number
of 65,546 in plain-number format is represented as 1.10 in the AS-dot notation format.
You can specify a value in the range from 0.0 through 65535.65535 in AS-dot notation
format.
Options aggregator—(Optional) Attach the BGP aggregator path attribute to the aggregate route.
You must specify the last AS number that formed the aggregate route (encoded as
two octets) for as-number, followed by the IP address of the BGP system that formed
the aggregate route for in-address.
number in the path represents the AS immediately adjacent to the local AS. Each
subsequent number represents an AS that is progressively farther from the local AS,
heading toward the origin of the path. You cannot specify a regular expression for
as-path; you must use a full, valid AS path.
origin egp—(Optional) BGP origin attribute that indicates that the path information
originated in another AS.
origin igp—(Optional) BGP origin attribute that indicates that the path information
originated within the local AS.
origin incomplete—(Optional) BGP origin attribute that indicates that the path information
was learned by some other means.
auto-export
Syntax auto-export {
(disable | enable);
family {
inet {
multicast {
(disable | enable);
rib-group rib-group;
}
unicast {
(disable | enable);
rib-group rib-group;
}
}
traceoptions {
file filename <files number> <size size> <world-readable | no-world-readable>;
flag flag <flag-modifier> <disable>;
}
}
}
family—Address family.
autonomous-system
In Junos OS Release 9.1 and later, the numeric range is extended to provide BGP support
for 4-byte AS numbers as defined in RFC 4893, BGP Support for Four-octet AS Number
Space. RFC 4893 introduces two new optional transitive BGP attributes, AS4_PATH and
AS4_AGGREGATOR. These new attributes are used to propagate 4-byte AS path
information across BGP speakers that do not support 4-byte AS numbers. RFC 4893
also introduces a reserved, well-known, 2-byte AS number, AS 23456. This reserved AS
number is called AS_TRANS in RFC 4893. All releases of the Junos OS support 2-byte
AS numbers.
In Junos OS Release 9.3 and later, you can also configure a 4-byte AS number using the
AS-dot notation format of two integer values joined by a period: <16-bit high-order value
in decimal>.<16-bit low-order value in decimal>. For example, the 4-byte AS number
of 65,546 in plain-number format is represented as 1.10 in the AS-dot notation format.
one or more times. This is the default behavior. If you configure loops 2, the route is
hidden if the AS number is detected in the path two or more times.
Range: 1 through 10
Default: 1
NOTE: When you specify the same AS number in more than one routing
instance on the local routing device, you must configure the same number
of loops for the AS number in each instance. For example, if you configure a
value of 3 for the loops statement in a VRF routing instance that uses the
same AS number as that of the master instance, you must also configure a
value of 3 loops for the AS number in the master instance.
bfd
Syntax bfd {
traceoptions {
file filename <files number> <match regular-expression> <size size> <world-readable |
no-world-readable>;
flag flag <flag-modifier> <disable>;
}
Description Configure trace options for Bidirectional Forwarding Protocol (BFD) traffic.
Default If you do not include this statement, no BFD tracing operations are performed.
Options disable—(Optional) Disable the BFD tracing operation. You can use this option to disable
a single operation when you have defined a broad group of tracing operations, such
as all.
file filename—Name of the file to receive the output of the tracing operation. Enclose the
name in quotation marks. All files are placed in the /var/log directory . We recommend
that you place global routing protocol tracing output in the routing-log file.
files number—(Optional) Maximum number of trace files. When a trace file named
trace-file reaches its maximum size, it is renamed trace-file.0, then trace-file.1, and
so on, until the maximum number of trace files is reached. Then the oldest trace file
is overwritten.
If you specify a maximum number of files, you also must specify a maximum file size with
the size option.
Range: 2 through 1000 files
Default: 2 files
flag flag—Tracing operation to perform. To specify more than one tracing operation,
include multiple flag statements. These are the BFD protocol tracing options:
size size—(Optional) Maximum size of each trace file, in kilobytes (KB), megabytes (MB),
or gigabytes (GB). When a trace file named trace-file reaches this size, it is renamed
trace-file.0. When the trace-file again reaches its maximum size, trace-file.0 is renamed
trace-file.1 and trace-file is renamed trace-file.0. This renaming scheme continues
until the maximum number of trace files is reached. Then, the oldest trace file is
overwritten.
If you specify a maximum file size, you also must specify a maximum number of trace
files with the files option.
Syntax: xk to specify KB, xm to specify MB, or xg to specify GB
Range: 10 KB through the maximum file size supported on your system
Default: 128 KB
Required Privilege routing and trace—To view this statement in the configuration.
Level routing-control and trace–control—To add this statement to the configuration.
bfd-liveness-detection
Syntax bfd-liveness-detection {
authentication {
algorithm algorithm-name;
key-chain key-chain-name;
loose-check;
}
detection-time {
threshold milliseconds;
}
holddown-interval milliseconds;
local-address ip-address;
minimum-interval milliseconds;
minimum-receive-interval milliseconds;
minimum-receive-ttl number;
multiplier number;
neighbor address;
no-adaptation;
transmit-interval {
threshold milliseconds;
minimum-interval milliseconds;
}
version (1 | automatic);
}
Description Configure bidirectional failure detection timers and authentication criteria for static
routes.
local-address ip-address—Enable a multihop BFD session and configure the source address
for the BFD session.
multiplier number—Configure number of hello packets not received by the neighbor that
causes the originating interface to be declared down.
Range: 1 through 255
Default: 3
neighbor address—Configure a next-hop address for the BFD session for a next hop
specified as an interface name.
brief
Description Configure all AS numbers from all contributing paths to be included in the aggregate or
generated route’s path.
• brief—Include only the longest common leading sequences from the contributing AS
paths. If this results in AS numbers being omitted from the aggregate route, the BGP
ATOMIC_ATTRIBUTE path attribute is included with the aggregate route.
• full—Include all AS numbers from all contributing paths in the aggregate or generated
route’s path.
Default full
color
See preference
community
Description Associate BGP community information with a static, aggregate, or generated route.
For more information about BGP community attributes, see the “Configuring the Extended
Communities Attribute” section in the Junos OS Routing Policy Configuration Guide.
For specifying the BGP community attribute only, you also can specify community-ids as
one of the following well-known community names defined in RFC 1997:
• no-export—Routes containing this community name are not advertised outside a BGP
confederation boundary.
• none—Explicitly exclude BGP community information with a static route. Include this
option when configuring an individual route in the route portion to override a community
option specified in the defaults portion.
confederation
destination-networks
Description Specify the IPv4 prefix range for the destination network by including the
destination-networks statement. Only tunnels within the specified IPv4 prefix range can
be created.
disable
Syntax disable;
discard
Syntax discard;
Description Do not forward packets addressed to this destination. Instead, drop the packets, do not
send ICMP unreachable messages to the packets’ originators, and install a reject route
for this destination into the routing table.
Default When an aggregate route becomes active, it is installed in the routing table with a reject
next hop, which means that ICMP unreachable messages are sent.
dynamic-tunnels
export
Description Apply one or more policies to routes being exported from the routing table into the
forwarding table.
export-rib
Description Name of the routing table from which the Junos OS should export routing information.
fate-sharing
Syntax fate-sharing {
cost value;
from address <to address>;
group group-name;
}
Description Specify a backup path in case the primary path becomes unusable.
You specify one or more objects within a group. The objects can be a LAN interface, a
router ID, or a point-to-point link. Sequence is insignificant.
Changing the fate-sharing database does not affect existing established LSP until the
next CSPF reoptimization. The fate-sharing database does affect fast-reroute detour
path computations.
Options group group-name—Each fate-sharing group must have a name, which can be up to
32 characters long and can contain letters, digits, periods (.) and hyphens (-). You
can define up to 512 groups.
to address—Address of egress routing device. For point-to-point link objects, you must
specify both a from and a to address.
filter
Syntax filter {
input filter-name;
}
Description Name of the routing table from which the Junos OS should export routing information.
flow
Syntax flow {
route name {
match {
match-conditions;
}
term-order (legacy | standard);
then {
actions;
}
}
validation {
traceoptions {
file filename <files number> <size size> <world-readable | no-world-readable>;
flag flag <flag-modifier> <disable>;
}
}
}
Default legacy
forwarding-cache
Syntax forwarding-cache {
threshold suppress value <reuse value>;
timeout minutes;
}
forwarding-table
Syntax forwarding-table {
export [ policy--names ];
(indirect-next-hop | no-indirect-next-hop);
unicast-reverse-path (active-paths | feasible-paths);
}
full
See brief
generate
Syntax generate {
defaults {
generate-options;
}
route destination-prefix {
policy policy-name;
generate-options;
}
}
Description Configure generated routes, which are used as routes of last resort.
• (active | passive);
• community [ community-ids ];
• discard;
• (brief | full);
• tag string;
defaults—Specify global generated route options. These options only set default attributes
inherited by all newly created generated routes. These are treated as global defaults
and apply to all the generated routes you configure in the generate statement. This
part of the generate statement is optional.
graceful-restart
Syntax graceful-restart {
disable;
restart-duration seconds;
}
import
Description Specify one or more import policies to use for route resolution.
import-policy
Description Apply one or more policies to routes imported into the routing table group. The
import-policy statement complements the import-rib statement and cannot be used
unless you first specify the routing tables to which routes are being imported.
import-rib
Description Name of the routing table into which the Junos OS should import routing information.
The first routing table name you enter is the primary routing table. Any additional names
you enter identify secondary routing tables. When a protocol imports routes, it imports
them into the primary and any secondary routing tables. If the primary route is deleted,
the secondary route also is deleted. For IPv4 import routing tables, the primary routing
table must be inet.0 or routing-instance-name.inet.0. For IPv6 import routing tables, the
primary routing table must be inet6.0.
In Junos OS Release 9.5 and later, you can configure an IPv4 import routing table that
includes both IPv4 and IPv6 routing tables. Including both types of routing tables permits
you, for example, to populate an IPv6 routing table with IPv6 addresses that are
compatible with IPv4. In releases prior to Junos OS Release 9.5, you could configure an
import routing table with only either IPv4 or IPv6 routing tables.
independent-domain
The independent domain uses transitive path attribute 128 (attribute set) messages to
tunnel the independent domain’s BGP attributes through the internal BGP (IBGP) core.
NOTE: In Junos OS Release 10.3 and later, if BGP receives attribute 128 and
you have not configured an independent domain in any routing instance, BGP
treats the received attribute 128 as an unknown attribute.
• Disabling Attribute Set Messages on Independent AS Domains for BGP Loop Detection
indirect-next-hop
NOTE:
• When virtual private LAN service (VPLS) is configured on the routing device,
the indirect-next-hop statement is configurable at the [edit routing-options
forwarding-table] hierarchy level. However, this configuration is not
applicable to indirect nexthops specific to VPLS routing instances.
input
install
Description Configure whether the Junos OS installs all static routes into the forwarding table. Even
if you configure a route so it is not installed in the forwarding table, the route is still eligible
to be exported from the routing table to other protocols.
Options install—Explicitly install all static routes into the forwarding table.
no-install—Do not install the route into the forwarding table, even if it is the route with
the lowest preference.
Default: install
instance-export
Description Apply one or more policies to routes being exported from a routing instance.
instance-import
Description Apply one or more policies to routes being imported into a routing instance.
interface
NOTE: You cannot enable multicast traffic on an interface using the enable
statement and configure PIM on the same interface simultaneously.
Options interface-name—Name of the interface on which to enable multicast traffic. Specify the
interface-name to enable multicast traffic on the interface.
Options interface-names—Names of the interfaces on which to configure scoping. Specify the full
interface name, including the physical and logical address components. To configure
all interfaces, you can specify all.
NOTE: You cannot apply a scoping policy to a specific routing instance. All
scoping policies are applied to all routing instances. However, you can apply
the scope statement to a specific routing instance.
interface-routes
Syntax interface-routes {
family (inet | inet6) {
export {
lan;
point-to-point;
}
}
rib-group group-name;
}
Description Associate a routing table group with the routing device’s interfaces and specify routing
table groups into which interface routes are imported.
lsp-next-hop
Description Specify an LSP as the next hop for a static route, and configure an independent metric
or preference on that next-hop LSP.
metric—Metric value.
32
Range: 0 through 4,294,967,295 (2 – 1)
Related • Specifying an LSP as the Next Hop for Static Routes on page 68
Documentation
martians
Syntax martians {
destination-prefix match-type <allow>;
}
Options allow—(Optional) Explicitly allow a subset of a range of addresses that has been
disallowed. The allow option is the only supported action.
• default—Default route to use when routing packets do not match a network or host in
the routing table. This is equivalent to specifying the IP address 0.0.0.0/0.
• longer—The route’s mask length is greater than the specified mask length.
• orlonger—The route’s mask length is equal to or greater than the specified mask length.
• through destination-prefix—The route matches the first prefix, the route matches the
second prefix for the number of bits in the route, and the number of bits in the route is
less than or equal to the number of bits in the second prefix.
• upto prefix-length—The route’s mask length falls between the two destination prefix
lengths, inclusive.
maximum-paths
Description Configure a limit for the number of routes installed in a routing table based upon the
route path.
OSPF 10.10.10.0/24
ISIS 10.10.10.0/24
These are two routes, but only one destination (prefix). The maximum-paths
limit applies the total number of routes (two). The maximum-prefixes limit
applies to the total number of unique prefixes (one).
Options log-interval seconds—(Optional) Minimum time interval (in seconds) between log
messages.
Range: 5 through 86,400
log-only—(Optional) Sets the route limit as an advisory limit. An advisory limit triggers
only a warning, and additional routes are not rejected.
NOTE: When the number or routes reaches the threshold value, routes are
still installed into the routing table while warning messages are sent. When
the number or routes reaches the path-limit value, then additional routes are
rejected.
maximum-prefixes
Description Configure a limit for the number of routes installed in a routing table based upon the
route prefix.
OSPF 10.10.10.0/24
ISIS 10.10.10.0/24
These are two routes, but only one destination (prefix). The maximum-paths
limit applies the total number of routes (two). The maximum-prefixes limit
applies to the total number of unique prefixes (one).
Options log-interval seconds—(Optional) Minimum time interval (in seconds) between log
messages.
Range: 5 through 86,400
log-only—(Optional) Sets the prefix limit as an advisory limit. An advisory limit triggers
only a warning, and additional routes are not rejected.
NOTE: When the number or routes reaches the threshold value, routes are
still installed into the routing table while warning messages are sent. When
the number or routes reaches the prefix-limit value, then additional routes
are rejected.
med-igp-update-interval
Description Configure a timer for how long to delay updates for the multiple-exit discriminator (MED)
path attribute for BGP groups and peers configured with the metric-out igp offset
delay-med-update statement. The timer delays MED updates for the interval configured
unless the MED is lower than the previously advertised attribute or another attribute
associated with the route has changed or if the BGP peer is responding to a refresh route
request.
metric
metric
Syntax metric route-cost;
Description Metric value for an aggregate, generated, or static route. You can specify up to four metric
values, starting with metric (for the first metric value) and continuing with metric2, metric3,
and metric4.
multicast
Syntax multicast {
forwarding-cache {
threshold suppress value <reuse value>;
}
interface interface-name {
enable;
}
scope scope-name {
interface [ interface-names ];
prefix destination-prefix;
}
ssm-groups {
address;
}
}
NOTE: You cannot apply a scoping policy to a specific routing instance. All
scoping policies are applied to all routing instances. However, you can apply
the scope statement to a specific routing instance.
next-hop (Access)
Description Configure the next-hop address for an access route. Access routes are typically
unnumbered interfaces.
Options next-hop—Specific next-hop address you want to assign to the access route.
Description Configure the next-hop address for an internal access route. Access routes are typically
unnumbered interfaces.
Options next-hop—Specific next-hop address you want to assign to the internal access route.
no-install
See install
no-readvertise
See readvertise
no-retain
See retain
nonstop-routing
Syntax nonstop-routing;
Description For routing platforms with two Routing Engines, configure a master Routing Engine to
switch over gracefully to a backup Routing Engine and to preserve routing protocol
information.
Default disabled
options
Syntax options {
syslog (level level | upto level level);
}
Description Configure the types of system logging messages sent about the routing protocols process
to the system message logging file. These messages are also displayed on the system
console. You can log messages at a particular level, or up to and including a particular
level.
Options level level—Severity of the message. It can be one or more of the following levels, in order
of decreasing urgency:
• info—Informational messages.
• notice—Conditions that are not error conditions, but might warrant special handling.
p2mp-lsp-next-hop
Syntax p2mp-lsp-next-hop {
metric metric;
preference preference;
}
Description Specify a point-to-multipoint LSP as the next hop for a static route, and configure an
independent metric or preference on that next-hop LSP.
Related • Specifying an LSP as the Next Hop for Static Routes on page 68
Documentation
passive
See active
policy
Description Associate a routing policy when configuring an aggregate or generated route’s destination
prefix in the routes part of the aggregate or generate statement. This provides the
equivalent of an import routing policy filter for the destination prefix. That is, each potential
contributor to an aggregate route, along with any aggregate options, is passed through
the policy filter. The policy then can accept or reject the route as a contributor to the
aggregate route and, if the contributor is accepted, the policy can modify the default
preferences. The contributor with the numerically smallest prefix becomes the most
preferred, or primary, contributor. A rejected contributor still can contribute to a less
specific aggregate route. If you do not specify a policy filter, all candidate routes contribute
to an aggregate route.
ppm
Syntax ppm {
no-delegate-processing;
}
Description (M120, M320, MX Series, T Series, TX Matrix routers, M7i and M10i routers with Enhanced
CFEB [CFEB-E], and EX Series switches only) Disable distributed periodic packet
management (PPM) to the Packet Forwarding Engine (on routers), to access ports (on
EX3200 and EX4200 switches), or line cards (on EX8200 switches).
After you disable PPM, PPM processing continues to run on the Routing Engine.
Default enabled
Related • Disabling Distributed Periodic Packet Management on the Packet Forwarding Engine
Documentation on page 140
preference
Description Preference value for a static, aggregated, or generated route. You also can specify a
secondary preference value (preference2), as well as colors, which are even finer-grained
preference values (color and color2).
preference (Access)
prefix
qualified-next-hop
metric—Metric value.
32
Range: 0 through 4,294,967,295 (2 – 1)
qualified-next-hop (Access)
Options next-hop—The specific qualified next-hop address you want to assign to the access route.
qualified-next-hop (Access-Internal)
Description Configure the qualified next-hop address for an internal access route.
Options next-hop—Specific qualified next-hop address you want to assign to the access route.
readvertise
Description Configure whether static routes are eligible to be readvertised by routing protocols:
Default readvertise
resolution
Syntax resolution {
rib routing-table-name {
import [ policy-names ];
resolution-ribs [ routing-table-names ];
}
}
resolution-ribs
Description Specify one or more routing tables to use for route resolution.
resolve
Syntax resolve;
Description Configure statically configured routes to be resolved to a next hop that is not directly
connected. The route is resolved through the inet.0 and inet.3 routing tables.
restart-duration
Options restart-duration seconds—Configure the time period for the restart to last.
Range: 120 through 900 seconds
Default: 90 seconds
retain
Description Configure statically configured routes to be deleted from or retained in the forwarding
table when the routing protocol process shuts down normally:
• retain—Have a static route remain in the forwarding table when the routing protocol
process shuts down normally. Doing this greatly reduces the time required to restart
a system that has a large number of routes in its routing table.
• no-retain—Delete statically configured routes from the forwarding table when the
routing protocol process shuts down normally.
Default no-retain
rib
rib (General)
Syntax rib routing-table-name {
aggregate {
defaults {
... aggregate-options ...
}
route destination-prefix {
policy policy-name;
... aggregate-options ...
}
generate {
defaults {
generate-options;
}
route destination-prefix {
policy policy-name;
generate-options;
}
}
martians {
destination-prefix match-type <allow>;
}
}
static {
defaults {
static-options;
}
rib-group group-name;
route destination-prefix {
next-hop;
static-options;
}
}
}
Explicitly creating a routing table with the routing-table-name statement is optional if you
are not adding any static, martian, aggregate, or generated routes to the routing table
and if you also are creating a routing table group. Simply including the passive statement
to indicate that a routing table is part of a routing table group is sufficient to create it.
NOTE: The IPv4 multicast routing table (inet.1) and the IPv6 multicast routing
table (inet6.1) are not supported for this statement.
Default If you do not specify a routing table name with the routing-table-name statement, the
software uses the default routing tables, which are inet.0 for unicast routes and inet.1 for
the multicast cache.
In a routing instance, the routing table name must include the routing instance name.
For example, if the routing instance name is link0, the routing table name might be
link0.inet6.0.
• protocol is the protocol family. It can be inet6 for the IPv6 family, inet for the IPv4 family,
iso for the ISO protocol family, or instance-name.iso.0 for an ISO routing instance.
• identifier is a positive integer that specifies the instance of the routing table.
Default: inet.0
rib-group
Description Configure which routing table groups interface routes are imported into.
Options group-name—Name of the routing table group. The name must start with a letter and
can include letters, numbers, and hyphens. It generally does not make sense to
specify more than a single routing table group.
• Configuring How Interface Routes Are Imported into Routing Tables on page 125
rib-groups
Syntax rib-groups {
group-name {
export-rib group-name;
import-policy [ policy-names ];
import-rib [ group-names ];
}
}
Description Group one or more routing tables to form a routing table group. A routing protocol can
import routes into all the routing tables in the group and can export routes from a single
routing table.
Each routing table group must contain one or more routing tables that the Junos OS uses
when importing routes (specified in the import-rib statement) and optionally can contain
one routing table group that the Junos OS uses when exporting routes to the routing
protocols (specified in the export-rib statement).
Options group-name—Name of the routing table group. The name must start with a letter and
can include letters, numbers, and hyphens.
route (Access)
Options ip-prefix</prefix-length>—Specific route prefix that you want to assign to the access
route.
route (Access-Internal)
Options ip-prefix</prefix-length>—Specific route prefix that you want to assign to the internal
access route.
route-distinguisher-id
Description Configure a route distinguisher identifier for a routing instance, specifying an IP address.
If a route distinguisher is configured for a particular routing instance, that value supersedes
the route distinguisher configured by this statement.
Related • Configuring Route Distinguishers for VRF and Layer 2 VPN Instances on page 133
Documentation
route-record
Syntax route-record;
Description Export the AS path and routing information to the traffic sampling process.
router-id
NOTE: We strongly recommend that you configure the router identifier under
the [edit routing-options] hierarchy level to avoid unpredictable behavior if
the interface address on a loopback interface changes.
Related • Configuring Router Identifiers for BGP and OSPF on page 122
Documentation
routing-options
scope
source-address
Description Specify the source address for the generic routing encapsulation (GRE) tunnels. The
source address specifies the address used as the source for the local tunnel endpoint.
This address can be any local address on the router (typically the router ID or the loopback
address).
source-routing
Syntax source-routing {
(ip | ipv6)
}
ssm-groups
Syntax ssm-groups {
address;
}
static
Syntax static {
defaults {
static-options;
}
rib-group group-name;
route destination-prefix {
bfd-liveness-detection {
authentication {
algorithm algorithm-name;
key-chain key-chain-name;
loose-check;
}
detection-time {
threshold milliseconds;
}
local-address ip-address;
minimum-interval milliseconds;
minimum-receive-interval milliseconds;
minimum-receive-ttl number;
multiplier number;
neighbor address;
no-adaptation;
transmit-interval {
threshold milliseconds;
minimum-interval milliseconds;
}
version (1 | automatic);
}
next-hop address;
next-hop options;
qualified-next-hop address {
metric metric;
preference preference;
}
static-options;
}
}
Description Configure static routes to be installed in the routing table. You can specify any number
of routes within a single static statement, and you can specify any number of static
options in the configuration.
Options defaults—Specify global static route options. These options only set default attributes
inherited by all newly created static routes. These are treated as global defaults and
apply to all the static routes you configure in the static statement. This part of the
static statement is optional.
• nsap-prefix—nsap-prefix is the network service access point (NSAP) address for ISO.
• discard—Do not forward packets addressed to this destination. Instead, drop the
packets, do not send ICMP unreachable messages to the packets’ originators, and
install a reject route for this destination into the routing table.
• receive—Install a route for this next-hop destination into the routing table.
The receive option forces the packet to be sent to the Routing Engine.
• For receiving packets on a link's subnet address, with zeros in the host portion of the
address
• reject—Do not forward packets addressed to this destination. Instead, drop the packets,
send ICMP unreachable messages to the packets’ originators, and install a reject route
for this destination into the routing table.
You can specify one or more of the following in static-options. Each of the options is
explained separately.
• (active | passive);
• community [ community-ids ];
• (install | no-install);
• (readvertise | no-readvertise);
• (resolve | no-resolve);
• (no-retain | retain);
• tag string;
tag
tag (Access)
threshold
Description Configure the suppression and reuse thresholds for multicast forwarding cache limits.
Options reuse value—Value at which to begin creating new multicast forwarding cache entries.
This value is optional. If configured, this number should be less than the suppress
value.
Range: 1 through 200,000
traceoptions
Syntax traceoptions {
file filename <files number> <size size> <world-readable | no-world-readable>;
flag flag <disable>;
}
Description Define tracing operations that track all routing protocol functionality in the routing device.
To specify more than one tracing operation, include multiple flag statements.
Default If you do not include this statement, no global tracing operations are performed.
Options Values:
disable—(Optional) Disable the tracing operation. You can use this option to disable a
single operation when you have defined a broad group of tracing operations, such
as all.
file filename—Name of the file to receive the output of the tracing operation. Enclose the
name within quotation marks. All files are placed in the directory /var/log. We
recommend that you place global routing protocol tracing output in the file
routing-log.
files number—(Optional) Maximum number of trace files. When a trace file named
trace-file reaches its maximum size, it is renamed trace-file.0, then trace-file.1, and
so on, until the maximum number of trace files is reached. Then, the oldest trace file
is overwritten. Note that if you specify a maximum number of files, you also must
specify a maximum file size with the size option.
Range: 2 through 1000 files
Default: 10 files
flag flag—Tracing operation to perform. To specify more than one tracing operation,
include multiple flag statements. These are the global routing protocol tracing
options:
• condition-manager—Condition-manager events
• config-internal—Configuration internals
• general—All normal operations and routing table changes (a combination of the normal
and route trace operations)
• parse—Configuration parsing
• regex-parse—Regular-expression parsing
• state—State transitions
• timer—Timer usage
size size—(Optional) Maximum size of each trace file, in kilobytes (KB), megabytes (MB),
or gigabytes (GB). When a trace file named trace-file reaches this size, it is renamed
trace-file.0. When the trace-file again reaches its maximum size, trace-file.0 is renamed
trace-file.1 and trace-file is renamed trace-file.0. This renaming scheme continues
until the maximum number of trace files is reached. Then, the oldest trace file is
overwritten. Note that if you specify a maximum file size, you also must specify a
maximum number of trace files with the files option.
Syntax: xk to specify KB, xm to specify MB, or xg to specify GB
Range: 10 KB through the maximum file size supported on your system
Default: 128 KB
Required Privilege routing and trace—To view this statement in the configuration.
Level routing-control and trace-control—To add this statement to the configuration.
tunnel-type
Description Specify the type of tunnel to be dynamically created. The only valid value is gre (for GRE
tunnels).
unicast-reverse-path
Options active-paths—Consider only active paths during the unicast reverse-path check.
Routing Instances
• Introduction to Routing Instances on page 235
• Routing Instances Configuration Guidelines on page 239
• Summary of Routing Instances Configuration Statements on page 291
You can create multiple instances of BGP, IS-IS, LDP, Multicast Source Discovery Protocol
(MSDP), OSPF version 2 (usually referred to simply as OSPF), OSPF version 3 (OSPFv3),
Protocol Independent Multicast (PIM), RIP, and static routes by including statements at
the following hierarchy levels:
NOTE: You can also create multiple routing instances for separating routing
tables, routing policies, and interfaces for individual DHCP wholesale
subscribers (retailers) in a layer 3 wholesale network. For information about
how to configure layer 3 wholesale network services, see the Junos OS
Broadband Subscriber Management Solutions Guide.
You can configure eight types of routing instances: forwarding, Layer 2 control (MX Series
routers only), Layer 2 virtual private network (VPN), nonforwarding, VPN routing and
forwarding (VRF), virtual router, virtual private LAN service (VPLS), and virtual switch
(MX Series routers only).
Each routing instance has a unique name and a corresponding IP unicast table. For
example, if you configure a routing instance with the name my-instance, the corresponding
IP unicast table is my-instance.inet.0. All routes for my-instance are installed into
my-instance.inet.0.
NOTE: The default routing instance, master, refers to the main inet.0 routing
table. The master routing instance is reserved and cannot be specified as a
routing instance.
• Routing tables
• Layer 2 Backhaul VPN—(MX Series routers only) Use this routing instance type to
provide support for Layer 2 wholesale VLAN packets with no existing corresponding
logical interface. When using this instance, the router learns both the outer tag and
inner tag of the incoming packets, when the instance-role statement is defined as
access, or the outer VLAN tag only, when the instance-role statement is defined as nni.
• Layer2-control—(MX Series routers only) Use this routing instance type for RSTP or
MSTP in customer edge interfaces of a VPLS routing instance. This instance type
cannot be used if the customer edge interface is multihomed to two provider edge
interfaces. If the customer edge interface is multihomed to two provider edge interfaces,
use the default BPDU tunneling.
• Layer 2 VPN—Use this routing instance type for Layer 2 virtual private network (VPN)
implementations.
• Virtual router—Similar to a VPN routing and forwarding instance type, but used for
non-VPN-related applications. There are no virtual routing and forwarding (VRF)
import, VRF export, VRF target, or route distinguisher requirements for this instance
type.
• Virtual switch—(MX Series routers only) Use the virtual switch instance type to isolate
a LAN segment with its Spanning Tree Protocol (STP) instance and separates its VLAN
identifier space. For more detail information about configuring a virtual switch, see the
Junos OS Layer 2 Configuration Guide and the Junos OS MX Series 3D Universal Edge Routers
Solutions Guide.
• VPLS—Use the virtual private local-area network service (VPLS) routing instance type
for point-to-multipoint LAN implementations between a set of sites in a VPN.
• VRF—Use the VPN routing and forwarding routing (VRF) instance type for Layer 3 VPN
implementations. This routing instance type has a VPN routing table as well as a
corresponding VPN forwarding table. For this instance type, there is a one-to-one
mapping between an interface and a routing instance. Each VRF instance corresponds
with a forwarding table. Routes on an interface go into the corresponding forwarding
table.
Configure global routing options and protocols for the master instance by including
statements at the [edit protocols] and [edit routing-options] hierarchy levels. Routes are
installed into the master routing instance inet.0 by default, unless a routing instance is
specified.
Multiple instances of BGP, OSPF, and RIP are used for Layer 3 VPN implementation. The
multiple instances of BGP, OSPF, and RIP keep routing information for different VPNs
separate. The VRF instance advertises routes from the customer edge (CE) router to the
provider edge (PE) router and advertises routes from the PE router to the CE router. Each
VPN receives only routing information belonging to that VPN.
Forwarding instances are used to implement filter-based forwarding for Common Access
Layer applications.
Nonforwarding instances of IS-IS and OSPF can be used to separate a very large network
into smaller administrative entities. Instead of configuring a large number of filters,
nonforwarding instances can be used to filter routes, thereby instantiating policy.
Nonforwarding instances can be used to reduce the amount of routing information
advertised throughout all components of a network. Routing information associated with
a particular instance can be announced where required, instead of being advertised to
the whole network.
Virtual router instances are similar to a VPN routing and forwarding instance type, but
used for non-VPN-related applications. There are no VRF import, VRF export, VRF target,
or route distinguisher requirements for this instance type.
Use the VPLS routing instance type for point-to-multipoint LAN implementations between
a set of sites in a VPN.
This chapter describes the following tasks for configuring routing instances:
access {
... address-assignment; ...
}
access-profile profile-name;
description text;
forwarding-options;
instance-role;
instance-type (forwarding |l2backhaul-vpn | l2vpn | layer2-control | no-forwarding |
virtual-router | virtual-switch | vpls | vrf);
interface interface-name;
bridge-domains {
bridge-domains-name {
domain-type bridge;
vlan-id (none | all | number);
vlan-tags outer number inner number;
interface interface-name;
routing-interface routing-interface-name;
bridge-options {
mac-limit limit;
mac-statistics;
mac-table-size limit;
no-mac-learning;
static-mac mac-address;
}
}
}
no-vrf-advertise;
no-vrf-propagate-ttl;
route-distinguisher (as-number:number | ip-address:number);
vrf-import [ policy-names ];
vrf-export [ policy--names ];
vrf-propagate-ttl;
vrf-table-label;
vrf-target {
export community-name;
import community-name;
}
protocols {
bgp {
... bgp-configuration ...
}
isis {
... isis-configuration ...
}
l2vpn {
... l2vpn-configuration ...
}
ldp {
... ldp-configuration ...
}
msdp {
... msdp-configuration ...
}
mstp {
... mstp-configuration ...
}
ospf {
domain-id domain-id;
domain-vpn-tag number;
route-type-community (iana | vendor);
... ospf-configuration ...
}
ospf3 {
domain-id domain-id;
domain-vpn-tag number;
route-type-community (iana | vendor);
... ospf3-configuration ...
}
pim {
... pim-configuration ...
}
rip {
... rip-configuration ...
}
ripng {
... ripng-configuration ...
}
rstp {
... rstp-configuration ...
}
vpls {
... vpls-configuration ...
}
}
routing-options {
aggregate {
defaults {
... aggregate-options ...
}
route destination-prefix {
policy policy-name;
... aggregate-options ...
}
}
auto-export {
(disable | enable);
family {
inet {
multicast {
(disable | enable);
rib-group rib-group;
}
unicast {
(disable | enable);
rib-group rib-group;
}
}
}
traceoptions {
file filename <files number> <size size> <world-readable | no-world-readable>;
flag flag <flag-modifier> <disable>;
}
}
autonomous-system autonomous-system <loops number> {
independent-domain <no-attrset>;
}
confederation confederation-autonomous-system members autonomous-system;
fate-sharing {
group group-name;
cost value;
from address [to address];
}
forwarding-table {
export [ policy--names ];
(indirect-next-hop | no-indirect-next-hop);
}
generate {
defaults {
generate-options;
}
route destination-prefix {
policy policy-name;
generate-options;
}
}
instance-export [ policy-names ];
instance-import [ policy-names ];
interface-routes {
rib-group group-name;
}
martians {
destination-prefix match-type <allow>;
}
maximum-paths path-limit <log-only | threshold value log-interval seconds>;
maximum-prefixes prefix-limit <log-only | threshold value log-interval seconds>;
multicast {
scope scope-name {
interface [ interface-names ];
prefix destination-prefix;
}
ssm-groups {
address;
}
}
options {
syslog (level level | upto level);
}
rib routing-table-name {
aggregate {
defaults {
... aggregate-options ...
}
route destination-prefix {
policy policy-name;
... aggregate-options ...
}
}
generate {
defaults {
generate-options;
}
route destination-prefix {
policy policy-name;
generate-options;
}
}
martians {
destination-prefix match-type <allow>;
}
static {
defaults {
static-options;
}
rib-group group-name;
route destination-prefix {
lsp-next-hop{
metric metric;
preference preference;
}
next-hop;
p2mp-lsp-next-hop {
metric metric;
preference preference;
}
qualified-next-hop address {
interface interface-name;
metric metric;
preference preference;
}
static-options;
}
}
}
route-record;
router-id address;
static {
defaults {
static-options;
}
rib-group group-name;
route destination-prefix {
lsp-next-hop {
metric metric;
preference preference;
}
next-hop;
p2mp-lsp-next-hop {
metric metric;
preference preference;
}
qualified-next-hop address {
interface interface-name;
metric metric;
preference preference;
}
static-options;
}
}
traceoptions {
file filename <files number> <size size> <world-readable | no-world-readable>;
flag flag <flag-modifier> <disable>;
}
}
You can configure BGP, IS-IS, Layer 2 VPN, LDP, MSDP, OSPF, OSPFv3, PIM, RIP, RIPng,
and VPLS routing instances.
[edit]
routing-instances {
routing-instance-name {
interface interface-name;
instance-type (forwarding | l2vpn | no-forwarding | virtual-router | vpls | vrf);
route-distinguisher (as-number:number | ip-address:number);
vrf-import [ policy-names ];
vrf-export [ policy-names ];
protocols {
bgp {
bgp configuration;
}
}
}
}
For more information about the BGP configuration statements, see Configuring BGP. For
more information about configuring VPNs, see the Junos OS VPNs Configuration Guide.
[edit]
routing-instances {
routing-instance-name {
interface interface-name;
instance-type (forwarding | l2vpn | no-forwarding | virtual-router | vpls | vrf);
route-distinguisher (as-number:number | ip-address:number);
vrf-import [ policy-names ];
vrf-export [ policy-names ];
protocols {
isis {
... isis configuration ...
}
}
}
}
For more information about the IS-IS configuration statements, see “Configuring IS-IS”
on page 344.
[edit]
routing-instances {
routing-instance-name {
instance-type l2vpn;
interface interface-name;
route-distinguisher (as-number:number | ip-address:number);
vrf-import [ policy-names ];
vrf-export [ policy-names ];
protocols {
l2vpn {
... l2vpn-configuration ...
}
}
}
}
For more information about configuring Layer 2 VPNs, see the Junos OS VPNs Configuration
Guide.
[edit]
routing-instances {
routing-instance-name {
instance-type (forwarding | l2vpn | no-forwarding | virtual-router | vpls | vrf);
interface interface-name;
route-distinguisher (as-number:number | ip-address:number);
vrf-import [ policy-names ];
vrf-export [ policy-names ];
protocols {
ldp {
... ldp-configuration ...
}
}
}
}
For more information about configuring LDP, see the Junos OS MPLS Applications
Configuration Guide.
LDP routing instances are used to support LDP over VPNs. For more information about
configuring multicast over VPNs, see the Junos OS VPNs Configuration Guide.
[edit]
routing-instances {
routing-instance-name {
instance-type (forwarding | l2vpn | no-forwarding | virtual-router | vpls | vrf);
interface interface-name;
route-distinguisher (as-number:number | ip-address:number);
vrf-import [ policy-names ];
vrf-export [ policy-names ];
protocols {
msdp {
... msdp-configuration ...
}
}
}
}
For more information about configuring MSDP, see the Junos OS Multicast Protocols
Configuration Guide.
[edit]
routing-instances {
routing-instance-name;
instance-type vrf;
interface interface-name;
provider-tunnel {
pim-asm {
group-address -address;
}
protocols {
mvpn;
route-target {
export-target {
target;
unicast;
}
import-target {
target {
receiver;
sender;
}
unicast {
receiver;
sender;
}
}
}
}
}
route-distinguisher (as:number | ip-address:number);
vrf-target community | export community-name | import community-name);
}
}
For more information about Multiprotocol BGP-based Multicast VPNs, see the Junos OS
VPNs Configuration Guide and the Junos OS Multicast Protocols Configuration Guide.
[edit]
routing-instances {
routing-instance-name {
interface interface-name;
instance-type (forwarding | l2vpn | no-forwarding | virtual-router | vpls | vrf);
route-distinguisher (as-number:number | ip-address:number);
vrf-import [ policy-names ];
vrf-export [ policy-names ];
protocols {
ospf {
... ospf-configuration ...
}
}
}
}
NOTE: You can configure a logical interface under only one routing instance.
For more information about the OSPF configuration statements, see Configuring OSPF.
[edit]
routing-instances {
routing-instance-name {
interface interface-name;
instance-type (no-forwarding | virtual-router | vrf);
vrf-import [ policy-names ];
vrf-export [ policy-names ];
protocols {
ospf3 {
... ospf3-configuration ...
}
}
}
}
NOTE: You can configure a logical interface under only one routing instance.
For more information about the OSPF configuration statements, see Configuring OSPF.
[edit]
routing-instances {
routing-instance-name {
instance-type (forwarding | l2vpn | no-forwarding | virtual-router | vpls | vrf);
interface interface-name;
route-distinguisher (as-number:number | ip-address:number);
vrf-import [ policy-names ];
vrf-export [ policy-names ];
protocols {
pim {
... pim-configuration ...
}
}
}
}
For more information about configuring PIM, see the Junos OS Multicast Protocols
Configuration Guide.
PIM routing instances are used to support multicast over VPNs. For more detailed
information about configuring multicast over VPNs, see the Junos OS VPNs Configuration
Guide.
[edit]
routing-instances {
routing-instance-name {
interface interface-name;
instance-type vrf;
route-distinguisher (as-number:number | ip-address:number);
vrf-import [ policy-names ];
vrf-export [ policy-names ];
protocols {
rip {
... rip-configuration ...
}
}
}
}
For more information about the RIP configuration statements, see “Configuring RIP” on
page 839. For more information about configuring VPNs, see the Junos OS VPNs Configuration
Guide.
[edit]
routing-instances {
routing-instance-name {
instance-type vpls;
interface interface-name;
route-distinguisher (as-number:number | ip-address:number);
vrf-import [ policy-names ];
vrf-export [ policy-names ];
protocols {
vpls {
... vpls configuration ...
}
}
}
}
You can configure multiple instances of BGP at the following hierarchy levels:
Multiple instances of BGP are primarily used for Layer 3 VPN support.
IGP peers and EBGP peers (both nonmultihop and multihop) are all supported for routing
instances. BGP peering is established over one of the interfaces configured under the
routing-instances hierarchy. Routes learned from the BGP peer are added to the
instance-name.inet.0 table by default. You can configure import and export policies to
control the flow of information into and out of the instance routing table.
For Layer 3 VPN support, configure BGP on the provider edge (PE) router to receive routes
from the customer edge (CE) router and to send the instances’ routes to the CE router
if necessary. You can use multiple instances of BGP to maintain separate per-site
forwarding tables for keeping VPN traffic separate on the PE router. For more detailed
information about configuring VPNs, see the Junos OS VPNs Configuration Guide.
You can configure import and export policies that allow the service provider to control
and rate-limit traffic to and from the customer.
[edit]
routing-instances {
routing-instance-name {
interface so-1/1/1.0;
interface so-1/1/1.1;
instance-type vrf;
route distinguisher (as-number:number | ip-address:number);
protocols {
bgp {
group group-name {
peer-as 01;
type external;
import route-name;
export route-name;
neighbor 10.0.0.1;
}
}
}
}
}
You can configure an EBGP multihop session for a VRF routing instance. Also, you can
set up the EBGP peer between the PE and CE routers by using the loopback address of
the CE router instead of the interface addresses.
1. Configure the IS-IS default instance at the [edit protocols isis] or [edit logical-systems
logical-system-name protocols isis] hierarchy levels with the statements needed for
your network so that routes are installed in inet.0 and in the forwarding table. Make
sure to include the routing table group.
2. Configure an IS-IS routing instance for each additional IS-IS routing entity, configuring
the following items:
• Interfaces
• Routing options
3. Configure a routing table group to install routes from the routing instance into the
inet.0 routing table. You can do this in two ways:
• Create a common routing table group so that either one of two conditions is
configured:
• Routes from the routing instances are installed in inet.0 and therefore installed
in the forwarding table.
• Routes from one router in a routing instance are forwarded to another router in
the same routing instance.
• Create a routing table group with just the routing table from one instance and inet.0
to keep the routes from going to other instances.
4. Create an export policy to export routes with a specific tag and to use that tag to
export routes back into the instances. For more information, see the Junos OS Routing
Policy Configuration Guide.
4 6
voice-policy other-policy
so-2/2/2.0 so-5/2/2.0
Backbone
1 3
so-4/2/2.0 so-3/2/2.0
7 5
other-policy voice-policy
g040730
Site C Site D
Sites A and D belong to the voice-policy routing instance. Sites B and C belong to the
other-policy instance. Router 1 and Router 3 at the edge of the backbone connect the
routing instances. Each runs a separate IS-IS instance (one per entity).
Router 1 runs three IS-IS instances: one each for Site A (voice-policy), Site C (other-policy),
and the backbone, otherwise known as the default instance. Router 3 also runs three
IS-IS instances: one each for Site B (other-policy), Site D (voice-policy), and the backbone
(default instance).
• Routes from the default instance routing table are placed in the voice-policy and
other-policy instance routing tables.
• Routes from the voice-policy routing instance are placed in the default instance routing
table.
• Routes from the other-policy routing instance are placed in the default instance routing
table.
• Routes from the voice-policy routing instance do not enter the other-policy instance
routing table.
• Routes from the other-policy routing instance do not enter the voice-policy instance
routing table.
Configuring Router 1 The following sections describe how to configure Router 1 in the backbone entity with
multiple routing instances.
Configure the routing instances for voice-policy and other-policy. Use all routes learned
from the routing tables in the routing table group inet-to-voice-and-other. Export routes
tagged as belonging to the routing instance.
[edit]
routing-instances {
voice-policy {
interface so-2/2/2.0;
protocols {
isis {
rib-group voice-to-inet;
export filter-on-voice-policy;
interface so-2/2/2.0 {
level 2 metric 20;
}
}
}
}
other-policy {
interface so-4/2/2.0;
protocols {
isis {
rib-group other-to-inet;
export filter-on-other-policy;
interface so-4/2/2.0 {
level 2 metric 20;
}
}
}
}
}
Configure the routing table group inet-to-voice-and-other to share routes with the inet.0
(in the backbone entity), voice-policy.inet.0, and other-policy.inet.0 routing tables:
[edit]
routing-options {
rib-groups {
inet-to-voice-and-other {
import-rib [ inet.0 voice-policy.inet.0 other-policy.inet.0 ];
}
}
}
Configure the routing table group voice-to-inet to share routes with the inet.0 (in the
backbone entity) and voice-policy.inet.0 routing tables:
[edit]
routing-options {
rib-groups {
voice-to-inet {
import-rib [ voice-policy.inet.0 inet.0];
}
}
}
Configure the routing table group other-to-inet to share routes with the inet.0 (in the
backbone entity) and other-policy.inet.0 routing tables:
[edit]
routing-options {
rib-groups {
other-to-inet {
import-rib [ other-policy.inet.0 inet.0];
}
}
}
Configure the default IS-IS instance so that the routes learned from the routing instances
are installed in inet.0 and the tagged routes are exported from voice-policy and
other-policy:
[edit]
protocols {
isis {
export apply-tag;
rib-group inet-to-voice-and-other;
interface so-1/0/0.0 {
level 2 metric 20;
}
interface fxp0.0 {
disable;
}
interface lo0.0 {
passive;
}
}
}
Configure routing policy for the routes learned from the routing instances:
[edit]
policy-options {
policy-statement apply-tag {
term voice-policy {
from instance voice-policy;
then {
tag 10;
accept;
}
}
term other-policy {
from instance other-policy;
then {
tag 12;
accept;
}
}
}
policy-statement filter-on-voice-policy {
from {
tag 10;
protocol isis;
}
then {
accept;
}
}
policy-statement filter-on-other-policy {
from {
tag 12;
protocol isis;
}
then {
accept;
}
}
}
Configuring Router 3 The configuration for Router 3 is the same as for Router 1 except that the interface names
might differ. In this topology, the interface so-5/2/2.0 belongs to other-policy, and
so-3/2/2.0 belongs to voice-policy.
LDP instances are used to distribute labels from a provider edge (PE) router to a customer
edge (CE) router. LDP instances in a VPN are useful in carrier-of-carrier networks, where
data is transmitted between two or more telecommunications carrier sites across a core
provider network. Each carrier may want to restrict Internet routes strictly to the PE
routers.
An advantage of using LDP instances within a VPN is that full-mesh IBGP is not required
between the PE and CE routers. A router ID is required to configure an instance of LDP.
routing-instances {
routing-instance-name {
interface interface-name;
instance-type vrf;
protocols {
ldp {
... ldp-configuration ...
}
}
}
MSDP instances are supported only for VRF instance types. You can configure multiple
instances of MSDP to support multicast over VPNs.
routing-instances {
routing-instance-name {
interface interface-name;
instance-type vrf;
route-distinguisher (as-number:number | ip-address:number);
vrf-import [ policy-names ];
vrf-export [ policy-names ];
protocols {
msdp {
... msdp-configuration ...
}
}
}
}
Requirements
Before you begin:
• Configure the device interfaces. See the Junos OS Network Interfaces Configuration Guide.
• Configure the router identifiers for the devices in your OSPF network. See “Example:
Configuring an OSPF Router Identifier” on page 510.
• Control OSPF designated router election. See “Example: Controlling OSPF Designated
Router Election” on page 511
Overview
When you configure multiple routing instances of OSPF, we recommend that you perform
the following tasks:
1. Configure the OSPFv2 or OSPFv3 default instance at the [edit protocols (ospf | ospf3)]
and [edit logical-systems logical-system-name protocols (ospf | ospf3)] hierarchy levels
with the statements needed for your network so that routes are installed in inet.0 and
in the forwarding table.
Make sure to include the routing table group.
• Interfaces
• Routing options
3. Configure a routing table group to install routes from the default route table, inet.0,
into a routing instance’s route table.
4. Configure a routing table group to install routes from a routing instance into the default
route table, inet.0.
5. Create an export policy to export routes with a specific tag, and use that tag to export
routes back into the instances. For more information, see the Junos OS Routing Policy
Configuration Guide.
Figure 5 on page 258 shows how you can use multiple routing instances of OSPFv2 or
OSPFv3 to segregate prefixes within a large network. The network consists of three
administrative entities: voice-policy, other-policy, and the default routing instance. Each
entity is composed of several geographically separate sites that are connected by the
backbone and managed by the backbone entity.
4 6
voice-policy other-policy
so-2/2/2.0 so-5/2/2.0
Backbone
1 3
so-4/2/2.0 so-3/2/2.0
7 5
other-policy voice-policy
g040730
Site C Site D
Sites A and D belong to the voice-policy routing instance. Sites B and C belong to the
other-policy instance. Device 1 and Device 3 at the edge of the backbone connect the
routing instances. Each runs a separate OSPF or OSPFv3 instance (one per entity).
Device 1 runs three OSPFv2 or OSPFv3 instances: one each for Site A (voice-policy), Site C
(other-policy), and the backbone, otherwise known as the default instance. Device 3 also
runs three OSPFv2 or OSPFv3 instances: one each for Site B (other-policy), Site D
(voice-policy), and the backbone (default instance).
When Device 1 runs the OSPFv2 or OSPFv3 instances, the following occur:
• Routes from the default instance routing table are placed in the voice-policy and
other-policy instance routing tables.
• Routes from the voice-policy routing instance are placed in the default instance routing
table.
• Routes from the other-policy routing instance are placed in the default instance routing
table.
• Routes from the voice-policy routing instance do not enter the other-policy instance
routing table.
• Routes from the other-policy routing instance do not enter the voice-policy instance
routing table.
Configuration
CLI Quick To quickly configure multiple routing instances of OSPF, copy the following commands,
Configuration remove any line breaks, and then paste the commands into the CLI.
Configuration on Device 1:
[edit]
set routing-instances voice-policy interface so-2/2/2
set routing-instances voice-policy protocols ospf rib-group voice-to-inet area 0.0.0.0
interface so-2/2/2
set routing-instances other-policy interface so-4/2/2
set routing-instances other-policy protocols ospf rib-group other-to-inet area 0.0.0.0
interface so-4/2/2
set routing-options rib-groups inet-to-voice-and-other import-rib [ inet.0 voice-policy.inet.0
other-policy.inet.0 ]
set routing-options rib-groups voice-to-inet import-rib [ voice-policy.inet.0 inet.0 ]
set routing-options rib-groups other-to-inet import-rib [ other-policy.inet.0 inet.0 ]
set protocols ospf rib-group inet-to-voice-and-other area 0.0.0.0 interface so-2/2/2
set protocols ospf rib-group inet-to-voice-and-other area 0.0.0.0 interface so-4/2/2
Configuration on Device 3:
[edit]
set routing-instances voice-policy interface so-3/2/2
set routing-instances voice-policy protocols ospf rib-group voice-to-inet area 0.0.0.0
interface so-3/2/2
set routing-instances other-policy interface so-5/2/2
set routing-instances other-policy protocols ospf rib-group other-to-inet area 0.0.0.0
interface so-5/2/2
set routing-options rib-groups inet-to-voice-and-other import-rib [ inet.0 voice-policy.inet.0
other-policy.inet.0 ]
set routing-options rib-groups voice-to-inet import-rib [ voice-policy.inet.0 inet.0 ]
set routing-options rib-groups other-to-inet import-rib [ other-policy.inet.0 inet.0 ]
set protocols ospf rib-group inet-to-voice-and-other area 0.0.0.0 interface so-3/2/2
set protocols ospf rib-group inet-to-voice-and-other area 0.0.0.0 interface so-5/2/2
[edit]
user@D1# set routing-instances voice-policy interface so-2/2/2
user@D1# set routing-instances voice-policy protocols ospf rib-group voice-to-inet
area 0.0.0.0 interface so-2/2/2
user@D1# set routing-instances other-policy interface so-4/2/2
user@D1# set routing-instances other-policy protocols ospf rib-group other-to-inet
area 0.0.0.0 interface so-4/2/2
[edit]
user@D3# set routing-instances voice-policy interface so-3/2/2
user@D3# set routing-instances voice-policy protocols ospf rib-group voice-to-inet
area 0.0.0.0 interface so-3/2/2
user@D3#set routing-instances other-policy interface so-5/2/2
user@D3# set routing-instances other-policy protocols ospf rib-group other-to-inet
area 0.0.0.0 interface so-5/2/2
2. Configure the routing table group inet-to-voice-and-other to take routes from inet.0
(default routing table) and place them in the voice-policy.inet.0 and
other-policy.inet.0 routing tables.
[edit]
user@D1# set routing-options rib-groups inet-to-voice-and-other import-rib [ inet.0
voice-policy.inet.0 other-policy.inet.0 ]
[edit]
user@D3# set routing-options rib-groups inet-to-voice-and-other import-rib [ inet.0
voice-policy.inet.0 other-policy.inet.0 ]
3. Configure the routing table group voice-to-inet to take routes from voice-policy.inet.0
and place them in the inet.0 default routing table.
[edit]
user@D1# set routing-options rib-groups voice-to-inet import-rib [ voice-policy.inet.0
inet.0 ]
[edit]
user@D3# set routing-options rib-groups voice-to-inet import-rib [ voice-policy.inet.0
inet.0 ]
4. Configure the routing table group other-to-inet to take routes from other-policy.inet.0
and place them in the inet.0 default routing table.
[edit]
user@D1# set routing-options rib-groups other-to-inet import-rib [ other-policy.inet.0
inet.0 ]
[edit]
user@D3# set routing-options rib-groups other-to-inet import-rib [ other-policy.inet.0
inet.0 ]
[edit]
user@D1# set protocols ospf rib-group inet-to-voice-and-other area 0.0.0.0 interface
so-2/2/2
user@D1# set protocols ospf rib-group inet-to-voice-and-other area 0.0.0.0 interface
so-4/2/2
[edit]
user@D3# set protocols ospf rib-group inet-to-voice-and-other area 0.0.0.0 interface
so-3/2/2
user@D3# set protocols ospf rib-group inet-to-voice-and-other area 0.0.0.0 interface
so-5/2/2
[edit]
user@host# commit
Results Confirm your configuration by entering the show routing-instances, show routing-options,
and show protocols ospf commands. If the output does not display the intended
configuration, repeat the instructions in this example to correct the configuration.
Configuration on Device 1:
Configuration on Device 3:
rib-group voice-to-inet;
area 0.0.0.0 {
interface so-3/2/2.0;
}
}
}
}
other-policy {
interface so-5/2/2.0;
protocols {
ospf {
rib-group other-to-inet;
area 0.0.0.0 {
interface so-5/2/2.0;
}
}
}
}
Verification
Confirm that the configuration is working properly.
Action From operational mode, enter the show route instance detail command.
PIM instances are supported only for VRF instance types. You can configure multiple
instances of PIM to support multicast over VPNs.
routing-instances {
routing-instance-name {
interface interface-name;
instance-type vrf;
protocols {
pim {
... pim-configuration ...
}
}
}
}
RIP instances are supported only for VRF instance types. You can configure multiple
instances of RIP for VPN support only. You can use RIP in the customer edge-provider
edge (CE-PE) environment to learn routes from the CE router and to propagate the PE
router’s instance routes in the CE router.
RIP routes learned from neighbors configured under any instance hierarchy are added to
the instance’s routing table, instance-name.inet.0.
RIP does not support routing table groups; therefore, it cannot import routes into multiple
tables as the OSPF or OSPFv3 protocol does.
routing-instances {
routing-instance-name {
interface interface-name;
instance-type vrf;
protocols {
rip {
interface interface-name;
neighbor ip-address;
}
}
}
}
You can create multiple instances of BGP, IS-IS, OSPF, OSPFv3, RIP, and static routes.
For information about how to configure a virtual switch, see the Junos OS Layer 2
Configuration Guide.
Each routing instance has a unique name and a corresponding IP unicast table. For
example, if you configure a routing instance with the name my-instance, its corresponding
IP unicast table is my-instance.inet.0. All routes for my-instance are installed into
my-instance.inet.0.
Configure global routing options and protocols for the default instance by including
statements.
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
Routes are installed into the default routing instance inet.0 by default, unless a routing
instance is specified.
NOTE: In Junos OS Release 9.0 and later, you can no longer specify a
routing-instance name of default or include special characters within the
name of a routing instance.
routing-instances {
routing-instance-name {
interface interface-name;
instance-type (forwarding | layer2-control | l2vpn | no-forwarding | virtual-router |
virtual-switch | vpls | vrf);
no-vrf-advertise;
no-vrf-propagate-ttl;
route-distinguisher (as-number:number | ip-address:number);
vrf-import [ policy-names ];
vrf-export [ policy-names ];
vrf-propagate-ttl;
vrf-table-label;
protocols {
bgp {
... bgp-configuration ...
}
isis {
isis-configuration;
}
l2vpn {
l2vpn-configuration;
}
ldp {
... ldp-configuration ...
}
msdp {
msdp-configuration;
}
ospf {
domain-id domain-id;
domain-vpn-tag number;
route-type-community (iana | vendor);
ospf-configuration;
}
ospf3 {
domain-id domain-id;
domain-vpn-tag number;
route-type-community (iana | vendor);
ospf3-configuration;
}
pim {
pim-configuration;
}
rip {
rip-configuration;
}
ripng {
ripng-configuration;
}
vpls {
vpls-configuration;
}
}
}
}
You can configure eight routing instance types at the [edit routing-instances
routing-instance-name instance-type] and [edit logical-systems logical-system-name
routing-instances routing-instance-name instance-type] hierarchy levels:
• Layer 2 VPN—Use this routing instance type for Layer 2 VPN implementations.
• Layer 2-control—(MX Series routers only) Use this routing instance type for RSTP or
MSTP in customer edge interfaces of a VPLS routing instance. This instance type
cannot be used if the customer edge interface is multihomed to two provider edge
interfaces. If the customer edge interface is multihomed to two provider edge interfaces,
use the default BPDU tunneling. For more information about configuring a layer2-control
instance type, see the Junos OS Layer 2 Configuration Guide.
• Virtual router—This routing instance is similar to a VPN routing and forwarding instance
type, but used for non-VPN-related applications. There are no VRF import, VRF export,
VRF target, or route distinguisher requirements for this instance type.
• Virtual switch—(MX Series routers only) Use the virtual switch instance type to isolate
a LAN segment with its Spanning Tree Protocol (STP) instance and separates its VLAN
identifier space. For more information about configuring a virtual switch instance type,
see the Junos OS Layer 2 Configuration Guide. and the Junos OS MX Series 3D Universal
Edge Routers Solutions Guide.
• VRF—Use this routing instance type for Layer 3 VPN implementations. For this instance
type, there is a one-to-one mapping between an interface and a routing instance. Each
VRF instance corresponds with a forwarding table. Routes on an interface go into the
corresponding forwarding table.
routing-instances {
routing-instance-name {
interface interface-name;
instance-type (forwarding | l2vpn | layer2-control | no-forwarding | virtual-router |
virtual-switch | vpls | vrf);
}
}
For more information about configuring Layer 2 VPNs, Layer 3 VPNs, and VPLS, see the
Junos OS VPNs Configuration Guide.
For more information about configuring the types of routing instances, see the following
sections:
interface interface-name;
instance-type vrf;
no-vrf-advertise;
no-vrf-propagate-ttl;
route-distinguisher (as-number:number | ip-address:number);
vrf-import [ policy-names ];
vrf-export [ policy-names ];
vrf-propagate-ttl;
vrf-table-label;
protocols {
bgp {
... bgp-configuration ...
}
isis {
... isis-configuration ...
}
l2vpn {
... l2vpn-configuration ...
}
ldp {
... ldp-configuration ...
}
msdp {
... msdp-configuration ...
}
ospf {
domain-id domain-id;
domain-vpn-tag number;
route-type-community (iana | vendor);
... ospf-configuration ...
}
ospf3 {
domain-id domain-id;
domain-vpn-tag number;
route-type-community (iana | vendor);
... ospf3-configuration ...
}
pim {
... pim-configuration ...
}
rip {
... rip-configuration ...
}
vpls {
... vpls-configuration ...
}
}
interface interface-name;
instance-type virtual-router;
protocols {
bgp {
... bgp-configuration ...
}
isis {
,,, isis-configuration ...
}
ldp {
... ldp-configuration ...
}
msdp {
... msdp-configuration ...
}
ospf {
domain-id domain-id;
domain-vpn-tag number;
route-type-community (iana | vendor);
... ospf-configuration ...
}
ospf3 {
domain-id domain-id;
domain-vpn-tag number;
route-type-community (iana | vendor);
... ospf3-configuration ...
}
pim {
... pim-configuration ...
}
rip {
... rip-configuration ...
}
}
interface interface-name;
instance-type vpls;
protocols {
vpls {
... vpls-configuration ...
}
}
Each routing instance must have a unique route distinguisher associated with it. The
route distinguisher is used to place bounds around a VPN so the same IP address prefixes
can be used in different VPNs without having them overlap.
We recommend that you use a unique route distinguisher for each routing instance that
you configure. Although you could use the same route distinguisher on all PE routers for
the same VPN, if you use a unique route distinguisher, you can determine the CE router
from which a route originated.
The route distinguisher is a 6-byte value that you can specify in one of the following
formats:
NOTE: In Junos OS Release 9.1 and later, the numeric range for AS numbers
is extended to provide BGP support for 4-byte AS numbers, as defined in
RFC 4893, BGP support for Four-octet AS Number Space. All releases of
the Junos OS support 2-byte AS numbers. To configure a route distinguisher
that includes a 4-byte AS number, append the letter “L” to the end of the
number. For example, a route distinguisher with the 4-byte AS number
7,765,000 and an administrative number of 1,000 is represented as
77765000L:1000.
In Junos OS Release 9.2 and later, you can also configure a 4-byte AS
number using the AS-dot notation format of two integer values joined by
a period: <16-bit high-order value in decimal>.<16-bit low-order value in
decimal>. For example, the 4-byte AS number of 65,546 in plain-number
format is represented as 1.10 in the AS-dot notation format.
If the router you are configuring is a BGP peer of a router that does not support 4-byte
AS numbers, you need to configure a local AS number. For more information, see
Establishing a Peer Relationship Between a 4-Byte Capable Router and a 2-Byte Capable
Router Using a 4-Byte AS Number in the Using 4-Byte Autonomous System Numbers in
BGP Networks Technology Overview.
Related • Understanding 4-Byte AS Numbers and Route Distinguishers in the Using 4-Byte
Documentation Autonomous System Numbers in BGP Networks Technology Overview
You can create a filter to classify packets to determine their forwarding path within a
router. Use filter-based forwarding to redirect traffic for analysis.
Use filter-based forwarding for service provider selection when customers have Internet
connectivity provided by different ISPs yet share a common access layer. When a shared
media (such as a cable modem) is used, a mechanism on the common access layer
looks at Layer 2 or Layer 3 addresses and distinguishes between customers. You can use
With filter-based forwarding, all packets received on an interface are considered. Each
packet passes through a filter that has match conditions. If the match conditions are
met for a filter and you have created a routing instance, filter-based forwarding is applied
to a packet. The packet is forwarded based on the next hop specified in the routing
instance. For static routes, the next hop can be a specific LSP. For more information about
configuring LSPs, see the Junos OS MPLS Applications Configuration Guide.
• Create a match filter on an ingress router. To specify a match filter, include the filter
filter-name statement at the [edit firewall] hierarchy level. For more information about
creating a match filter for packet forwarding, see the Junos OS Routing Policy Configuration
Guide. A packet that passes through the filter is compared against a set of rules to
classify it and to determine its membership in a set. Once classified, the packet is
forwarded to a routing table specified in the accept action in the filter description
language. The routing table then forwards the packet to the next hop that corresponds
to the destination address entry in the table.
• Create routing instances that specify the routing table(s) to which a packet is forwarded,
and the destination to which the packet is forwarded at the [edit routing-instances] or
[edit logical-systems logical-system-name routing-instances] hierarchy levels. For
example:
[edit]
routing-instances {
routing-table-name1 {
instance-type forwarding;
routing-options {
static {
route 0.0.0.0/0 nexthop 10.0.0.1;
}
}
}
routing-table-name2 {
instance-type forwarding;
routing-options {
static {
route 0.0.0.0/0 nexthop 10.0.0.2;
}
}
}
}
• Create a routing table group that adds interface routes to the forwarding routing
instances used in filter-based forwarding (FBF), as well as to the default routing
instance inet.0. This part of the configuration resolves the routes installed in the routing
instances to directly connected next hops on that interface. Create the routing table
group at the [edit routing-options] or [edit logical-systems logical-system-name
routing-options] hierarchy levels.
For IPv4, the following configuration installs interface routes into the default routing
instance inet.0, as well as two forwarding routing instances—routing-table-name1.inet.0
and routing-table-name2.inet.0:
[edit]
routing-options {
interface-routes {
rib-group inet group-name;
}
rib-groups {
group-name {
import-rib [ inet.0 routing-table-name1.inet.0
routing-table-name2.inet.0 ];
}
}
}
NOTE: Specify inet.0 as one of the routing instances that the interface routes
are imported into. If the default instance inet.0 is not specified, interface
routes are not imported into the default routing instance.
[edit]
policy-options {
policy-statement my-cos-forwarding {
from {
route-filter ...;
}
then {
cos-next-hop-map my-cos-map;
}
}
}
2. Create a CoS next-hop map. To specify a CoS next-hop map, include the
cos-next-hop-map statement at the [edit class-of-service] hierarchy level. For more
information about creating a CoS next-hop map, see the Junos OS Class of Service
Configuration Guide.
3. Specify the exporting of the routes to the forwarding table at the [edit routing-options]
or [edit logical-systems logical-system-name routing-options] hierarchy levels:
[edit]
routing-options {
forwarding-table {
export my-cos-forwarding;
}
}
4. Specify a static route that has multiple next hops for load balancing at the
[edit routing-options] or [edit logical-systems logical-system-name routing-options]
hierarchy levels:
[edit]
routing-options {
static {
route 12.1.1.1/32 {
next-hop [ 3.1.1.2 3.1.1.4 3.1.1.6 3.1.1.8 ];
}
}
}
You configure a VPN routing and forwarding instance (VRF) so that routes received from
the provider edge-provider edge (PE-PE) session (in the default instance) can be imported
into any of an instance’s VRF secondary routing tables. Importing depends on defined
policies. Routes to be exported should pass through the policies listed in the export list.
To configure secondary VRF import and export policies, include the following statements:
[edit]
routing-instances {
routing-instance-name {
instance-type vrf;
vrf-import [ policy-names ];
vrf-export [ policy-names ];
}
}
policy-options {
policy-statement policy-name {
from community community-name;
then accept;
}
}
• Overlapping VPNs—VPN configurations in which more than one VRF has the same
route target
For detailed information about configuring overlapping VPNs and nonforwarding instances,
see the Junos OS VPNs Configuration Guide.
The configuration statements enable the VPN AB Router CE2 to communicate with the
VPN A Router CE1 and the VPN B Router CE3, both directly connected to the Router PE1.
VPN routes that originate from the remote PE routers (the PE2 Router, in this case) are
placed in a global Layer 3 VPN routing table (bgp.l3vpn.inet.0) and routes with appropriate
route targets are imported into the routing tables, as dictated by the VRF import policy
configuration.
Configuring Router PE1 This section describes how to configure Router PE1 in the backbone entity for this
overlapping VPN by means of policy-based export.
[edit]
routing-instances {
VPN-A {
instance-type vrf;
interface fe-1/0/0.0;
route-distinguisher 10.255.14.175:3;
vrf-export A-out;
vrf-import A-in;
routing-options {
auto-export;
static {
route 1.1.1.1/32 next-hop fe-1/0/0.0;
route 1.1.1.2/32 next-hop fe-1/0/0.0;
}
}
}
VPN-AB {
instance-type vrf;
interface fe-1/1/0.0;
route-distinguisher 10.255.14.175:9;
vrf-export AB-out;
vrf-import AB-in;
routing-options {
auto-export;
static {
Configuring Router PE2 The configuration for Router PE2 is the same as that for Router PE1; however, the interface
names might differ.
There are two nonforwarding instances: data and voice. The following is the configuration
for a PE router.
[edit]
routing-instances {
data {
instance-type no-forwarding;
interface t3-0/1/3.0;
routing-options {
instance-import data-import;
auto-export;
protocols {
ospf {
export accept;
area 0.0.0.0 {
interface all;
}
}
}
}
voice {
instance-type no-forwarding;
interface t3-0/1/0.0;
routing-options {
instance-import voice-import;
auto-export;
}
protocols {
ospf {
export accept;
area 0.0.0.0 {
interface all;
}
}
}
}
}
}
[edit]
policy-options {
policy-statement master-import {
term a {
from instance master;
then {
tag 11;
accept;
}
}
term b {
from instance data;
then {
tag 10;
accept;
}
}
}
}
[edit]
policy-options {
policy-statement data-import {
term a {
from {
instance master;
tag 10;
then accept;
}
}
term b {
then reject;
}
}
policy-statement voice-import {
term a {
from {
instance master;
protocol ospf;
tag 11;
}
}
term b {
then reject;
}
}
}
Related • Example: Exporting Specific Routes from One Routing Table Into Another Routing
Documentation Table on page 278
Example: Exporting Specific Routes from One Routing Table Into Another Routing
Table
This example shows how to duplicate specific routes from one routing table into another
routing table within the same routing instance.
Requirements
No special configuration beyond device initialization is required before configuring this
example.
Overview
This example uses the auto-export statement and the rib-group statement to accomplish
the goal of exporting specific routes from one routing table to another.
• You can use the rib-group statement if it is necessary to import routes into tables other
than instance.inet.0. If a RIB group is used, the RIB group's export-rib and import-policy
statements are not used. Only the import-rib statement is used. To use a RIB group
with auto-export, the routing instance should specify explicit vrf-import and vrf-export
policies. The vrf-import and vrf-export policies can be extended to contain additional
terms to filter routes as needed for the RIB group.
In this example, access-internal routes are added into the vpna.inet.0 routing table. The
access-internal routes are also duplicated into the vpna.inet.2 routing table.
Configuration
• [xref target has no title]
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For instructions on how to do that, see Using the CLI Editor in Configuration
Mode in the Junos OS CLI User Guide.
2. Configure the routing policy that specifies particular routes for import into vpna.inet.0
and export from vpna.inet.0.
[edit policy-options]
user@host# set policy-statement vpna-export term a from protocol bgp
user@host# set policy-statement vpna-export term a then community add
vpna-comm
user@host# set policy-statement vpna-export term a then accept
user@host# set policy-statement vpna-export term b from protocol access-internal
user@host# set policy-statement vpna-export term b then accept
user@host# set policy-statement vpna-export term c then reject
user@host# set policy-statement vpna-import term a from protocol bgp
user@host# set policy-statement vpna-import term a from community vpna-comm
user@host# set policy-statement vpna-import term a then accept
user@host# set policy-statement vpna-import term b from instance vpna
user@host# set policy-statement vpna-import term b from protocol access-internal
user@host# set policy-statement vpna-import term b then accept
user@host# set policy-statement vpna-import term c then reject
user@host# set community vpna-comm members target:63000:100
The vrf-import and vrf-export statements are used to apply the vpna-import and
vpna-export routing policies configured in 2.
4. Configure the RIB group, and import routes into the vpna.inet.2 routing table.
[edit routing-options]
user@host# set rib-groups rib-group-vpna-access-internal import-rib vpna.inet.2
5. Configure the auto-export statement to enable the routes to be exported from one
routing table into another.
[edit routing-options]
user@host# set auto-export family inet unicast rib-group
rib-group-vpna-access-internal
6. Configure BGP.
[edit routing-options]
user@host# set autonomous-system 63000
Results From configuration mode, confirm your configuration by entering the show interfaces,
show policy-options, show routing-options, and show routing-instances commands. If the
output does not display the intended configuration, repeat the instructions in this example
to correct the configuration.
}
term c {
then reject;
}
}
community vpna-comm members target:63000:100;
If you are done configuring the device, enter commit from configuration mode.
Verification
Confirm that the configuration is working properly by running the show table route
vpna.inet.0 and show route table vpna.inet.2 commands.
You configure a separate label for each VRF to provide double lookup and egress filtering.
To configure a label for a VRF, include the following statements:
[edit]
routing-instances {
routing-instance-name {
instance-type vrf;
vrf-import [ policy-names ];
vrf-export [ policy-names ];
vrf-table-label;
}
}
Configuring a VPN routing and forwarding (VRF) target provides a configurable community
within a VRF routing instance and allows a single policy for import and a single policy for
export to replace the per-VRF policies for every community.
To configure a VRF target, include the vrf-target statement. Use the import and export
options to specify the allowed communities to accept from neighbors and to send to
neighbors:
vrf-target {
community;
export community-name;
import community-name;
}
NOTE: This statement does not prevent the exportation of VPN routes to
other VRF instances on the same router by configuring the [edit routing-options
auto-export] statement.
To prevent advertising VPN routes from the primary instance, include the no-vrf-advertise
statement:
no-vrf-advertise;
For most OSPF or OSPFv3 configurations involving Layer 3 VPNs, you do not need to
configure an OSPF domain ID. However, for a Layer 3 VPN connecting multiple OSPF or
OSPFv3 domains, configuring domain IDs can help you control LSA translation (for Type 3
and Type 5 LSAs) between the OSPF domains and back-door paths. The default domain
ID is 0.0.0.0. Each VPN routing table in a PE router associated with an OSPF or OSPFv3
instance is configured with the same OSPF domain ID.
For more detailed information about configuring VPNs, see the Junos OS VPNs Configuration
Guide.
Without the domain IDs, there is no way to identify which domain the routes originated
from after the OSPF or OSPFv3 routes are distributed into BGP routes and advertised
across the BGP VPN backbone. Distinguishing which OSPF or OSPFv3 domain a route
originated from allows classification of routes as Type 3 LSAs or Type 5 LSAs.
3. Configure a VRF export policy to explicitly attach the outbound extended community
ID to outbound routes.
For more information about configuring export policies, see the Junos OS Routing Policy
Configuration Guide.
This extended community ID can then be carried across the BGP VPN backbone. When
the route is redistributed back as an OSPF or OSPFv3 route on the PE router and advertised
to the CE near the destination, the domain ID identifies which domain the route originated
from. The routing instance checks incoming routes for the domain ID. The route is then
propagated as either a Type 3 LSA or Type 5 LSA.
When a PE router receives a route, it redistributes and advertises the route as either a
Type 3 LSA or a Type 5 LSA, depending on the following:
• If the receiving PE router sees a Type 3 route with a matching domain ID, the route is
redistributed and advertised as a Type 3 LSA.
• If the receiving PE router sees a Type 3 route without a domain ID (the extended
attribute field of the route’s BGP update does not include a domain ID), the route is
redistributed and advertised as a Type 3 LSA.
• If the receiving PE router sees a Type 3 route with a non-matching domain ID, the route
is redistributed and advertised as a Type 5 LSA.
• If the receiving PE router sees a Type 3 route with a domain ID, but the router does not
have a domain ID configured, the route is redistributed and advertised as a Type 5 LSA.
• If the receiving PE router sees a Type 5 route, the route is redistributed and advertised
as a Type 5 LSA, regardless of the domain ID.
On the local PE router, the prefix of the directly connected PE/CE interface is an active
direct route. This route is also an OSPF or OSPFv3 route.
In the VRF export policy, the direct prefix is exported to advertise the route to the remote
PE. This route is injected as an AS-External-LSA, much as when a direct route is exported
into OSPF or OSPFv3.
Domain ID ensures that an originated summary LSA arrives at the remote PE as a summary
LSA. Domain ID does not translate AS-external-LSAs into summary LSAs.
To configure an OSPF or OSPFv3 domain ID match condition for incoming Layer 3 VPN
routes going into a routing instance, include the domain-id statement:
domain-id domain-id;
For domain-id, specify either an IP address or an IP address and a local identifier using
the following format: ip-address:local-identifier. If you do not specify a local identifier with
the IP address, the identifier is assumed to have a value of 0.
If the router ID is not configured in the routing instance, the router ID is derived from an
interface address belonging to the routing instance.
To prevent routing loops when a domain ID is used as an alternate route preference for
the OSPF or OSPFv3 external routes generated by the PE router, the DN bit of the LSA
being distributed by the PE router must be set. If the route is distributed in a Type 5 LSA
and the DN bit is not supported by the PE router, the VPN tag is used instead.
domain-vpn-tag number;
The range is from 1 through 4,294,967,295. If you set VPN tags manually, you must set
the same value for all PE routers in the VPN.
To clear the VPN tag when it is no longer needed (when the DN bit is supported on the
PE router), include the no-domain-vpn-tag statement:
no-domain-vpn-tag;
The domain-id setting in the routing instance is for a match on inbound Layer 3 VPN
routes. A VRF export policy must be explicitly set for the outbound extended community
domain-id attribute. You must configure an export policy to attach the domain ID to
outgoing routes. To configure an export policy to attach the domain ID and route
distinguisher to the extended community ID on outbound routes, include the community
statement:
policy-statement policy-name {
term term-name {
from protocol (ospf | ospf3);
then {
community add community-name;
accept;
}
}
term b {
then reject;
}
}
community community-name members [ target:target-id domain-id:domain-id];
community name {
members [ community-ids ];
}
• [edit policy-options]
[edit]
routing-instances {
CE_A {
instance-type vrf;
interface ge-0/1/0.0;
route-distinguisher 1:100;
vrf-import vrf_import_routes;
vrf-export vrf_export_routes;
protocols {
ospf {
domain-id 1.1.1.1; # match for inbound routes
route-type-community vendor;
export vrf_import_routes;
area 0.0.0.0 {
interface ge-0/1/0.0;
}
}
}
}
}
policy-options {
policy-statement vrf_export_routes {
term a {
from protocol ospf;
then {
community add export_target;
accept;
}
}
term b {
then reject;
}
}
community export_target members [ target:1:100 domain-id:1.1.1.1:0 ];
}
[edit]
routing-options {
interface-routes {
rib-group inet inet_to_site_A;
}
}
[edit]
rib-groups {
inet_to_site_A {
import-rib [ inet.0 site_A.inet.0 ];
}
}
[edit]
protocols {
ospf {
rib-group inet_to_site_A;
}
}
[edit]
policy-options {
policy-statement announce_to_ce {
term a {
from {
protocol direct;
interface lo0.0;
}
then accept;
}
}
}
[edit]
routing-instances {
site_A {
protocols {
ospf {
export announce_to_ce;
}
}
}
}
A route limit sets an upper limit for the number of paths and prefixes installed in routing
tables. You can, for example, use a route limit to limit the number of routes received from
the CE router in a VPN. A route limit applies only to dynamic routing protocols, not to
static or interface routes.
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
Specify the log-only option to generate warning messages only (an advisory limit). Specify
the threshold option to generate warnings before the limit is reached. Specify the
log-interval option to configure the minimum time interval between log messages.
There are two modes for route limits: advisory and mandatory. An advisory limit triggers
warnings. A mandatory limit rejects additional routes after the limit is reached.
You can configure an independent autonomous system (AS) domain that is separate
from the primary routing instance domain. An AS is a set of routers that are under a single
technical administration and that generally use a single IGP and metrics to propagate
routing information within the set of routers. An AS appears to other ASs to have a single,
coherent interior routing plan and presents a consistent picture of what destinations are
reachable through it.
Configuring an independent domain allows you to keep the AS paths of the independent
domain from being shared with the AS path and AS path attributes of other domains,
including the master routing instance domain.
If you are using BGP on the router, you must configure an AS number.
The independent domain uses the transitive path attribute 128 (attribute set) to tunnel
the independent domain’s BGP attributes through the Internal BGP (IBGP) core. In Junos
OS Release 10.3 and later, if BGP receives attribute 128 and you have not configured an
independent domain in any routing instance, BGP treats the received attribute 128 as an
unknown attribute.
independent-domain;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
This chapter provides a reference for each of the routing instance configuration
statements. The statements are organized alphabetically.
access-profile
Description Specify the access profile for use by the master routing instance.
Related • Configuring Access Components for the DHCP Layer 3 Wholesale Network Solution
Documentation
• Configuring Access Components for the PPPoE Wholesale Network Solution
description
Description Provide a text description for the routing instance. If the text includes one or more spaces,
enclose it in quotation marks (" "). Any descriptive text you include is displayed in the
output of the show route instance detail command and has no effect on the operation
of the routing instance.
instance-type
Default no-forwarding
Options forwarding—Provide support for filter-based forwarding, where interfaces are not
associated with instances. All interfaces belong to the default instance. Other
instances are used for populating RPD learned routes. See “Configuring Filter-Based
Forwarding” on page 270.
layer2-control—(MX Series routers only) Provide support for RSTP or MSTP in customer
edge interfaces of a VPLS routing instance.
virtual-router—Similar to a VPN routing and forwarding instance type, but used for
non-VPN-related applications. There are no VRF import, VRF export, VRF target, or
route distinguisher requirements for this instance type.
virtual-switch—(MX Series routers only) Provide support for Layer 2 bridging. Use this
routing instances type to isolate a LAN segment with its Spanning Tree Protocol
(STP) instance and separates its VLAN identifier space.
vpls—Virtual private local-area network (LAN) service. Use this routing instance type for
point-to-multipoint LAN implementations between a set of sites in a VPN.
vrf—VPN routing and forwarding instance. Provides support for Layer 3 VPNs, where
interface routes for each instance go into the corresponding forwarding table only.
Related • Specifying the Instance Type for Routing Instances on page 266
Documentation
• Junos OS VPNs Configuration Guide
instance-role
Description Define the role of the routing instance in a Layer 2 Wholesale network.
Options access—Defines the connectivity role of the routing instance in a Layer 2 Wholesale
network as an access routing instance. When defined for this role, the same process
occurs as in a Layer 3 Wholesale network—when the first packet is received from a
given client,, authentication for the client initiates with an external entity (for example,
RADIUS). If authentication is successful, a logical interface is created with the
appropriate outer and inner VLAN tags for that client.
nni—Defines the connectivity role of the routing instance in a Layer 2 Wholesale network
as a network to network interface (NNI) routing instance. When defined for this role,
only outer VLAN tags are learned. In addition, when the NNI routing instance receives
a response from the ISP, the packets are forwarded to the appropriate client, provided
the packet has the same two tags that were verified during authentication.
Related • Specifying the Instance Type for Routing Instances on page 266
Documentation
• Configuring Separate Access Routing Instances for Layer 2 Wholesale Service Retailers
• Configuring Separate NNI Routing Instances for Layer 2 Wholesale Service Retailers
interface
Description Identify the logical, private interface between the provider edge (PE) router and the
customer edge (CE) router on the PE side.
no-vrf-advertise
Syntax no-vrf-advertise;
Description Prevent advertising VPN routes from a VRF instance to remote PEs.
ping-interval
Syntax ping-interval;
Hierarchy Level [edit logical-systems logical-system-name protocols l2circuit neighbor address interface
interface-name oam],
[edit logical-systems logical-system-name routing-instances instance-name protocols l2vpn
oam],
[edit logical-systems logical-system-name routing-instances instance-name protocols vpls
neighbor address oam],
[edit logical-systems logical-system-name routing-instances instance-name protocols vpls
mesh-group mesh-group-name neighbor address oam],
[edit logical-systems logical-system-name routing-instances instance-name protocols vpls
oam],
[edit protocols l2circuit neighbor address interface interface-name oam],
[edit routing-instances instance-name protocols l2vpn oam],
[edit routing-instances instance-name protocols vpls neighbor address oam],
[edit routing-instances instance-name protocols vpls mesh-group mesh-group-name neighbor
address oam],
[edit routing-instances instance-name protocols vpls oam]
Description Configure the time interval between ping messages for bidirectional forwarding detection
(BFD) sessions enabled over pseudowires inside a VPN.
Related • Configuring BFD for VCCV for Layer 2 VPNs, Layer 2 Circuits, and VPLS in the Junos OS
Documentation VPNs Configuration Guide
protocols
Syntax protocols {
bgp {
... bgp-configuration ...
}
isis {
... isis-configuration ...
}
ldp {
... ldp-configuration ...
}
msdp {
... msdp-configuration ...
}
mstp {
... mstp-configuration ...
}
ospf {
domain-id domain-id;
domain-vpn-tag number;
route-type-community (iana | vendor);
... ospf-configuration ...
}
ospf3 {
domain-id domain-id;
domain-vpn-tag number;
route-type-community (iana | vendor);
... ospf3-configuration ...
}
pim {
... pim-configuration ...
}
rip {
... rip-configuration ...
}
ripng {
... ripng-configuration ...
}
rstp {
rstp-configuration;
}
vstp {
vstp configuration;
}
vpls {
vpls configuration;
}
}
Description Specify the protocol for a routing instance. You can configure multiple instances of the
following supported protocols: BGP, IS-IS, LDP, MSDP, OSPF, OSPFv3, PIM, RIP, and
RIPng. Not all protocols are supported on the switches. See the switch CLI.
msdp—Specify the Multicast Source Discovery Protocol (MSDP) for a routing instance.
mstp—Specify the Multiple Spanning Tree Protocol (MSTP) for a virtual switch routing
instance.
pim—Specify the Protocol Independent Multicast (PIM) protocol for a routing instance.
ripng—Specify RIP next generation (RIPng) as the protocol for a routing instance.
rstp—Specify the Rapid Spanning Tree Protocol (RSTP) for a virtual switch routing
instance.
vstp—Specify the VLAN Spanning Tree Protocol (VSTP) for a virtual switch routing
instance.
qualified-bum-pruning-mode
Syntax qualified-bum-pruning-mode;
Related • Configuring Separate NNI Routing Instances for Layer 2 Wholesale Service Retailers
Documentation
• Junos OS VPNs Configuration Guide
route-distinguisher
Description Specify an identifier attached to a route, enabling you to distinguish to which VPN the
route belongs. Each routing instance must have a unique route distinguisher associated
with it. The route distinguisher is used to place bounds around a VPN so that the same
IP address prefixes can be used in different VPNs without having them overlap. If the
instance type is vrf, the route-distinguisher statement is required.
NOTE: In Junos OS Release 9.1 and later, the numeric range for AS numbers
is extended to provide BGP support for 4-byte AS numbers, as defined in
RFC 4893, BGP Support for Four-octet AS Number Space. All releases of the
Junos OS support 2-byte AS numbers. To configure a route distinguisher that
includes a 4-byte AS number, append the letter “L” to the end of the number.
For example, a route distinguisher with the 4-byte AS number 7,765,000 and
an administrative number of 1,000 is represented as 77765000L:1000.
In Junos OS Release 9.2 and later, you can also configure a 4-byte AS number
using the AS-dot notation format of two integer values joined by a period:
<16-bit high-order value in decimal>.<16-bit low-order value in decimal>. For
example, the 4-byte AS number of 65,546 in plain-number format is
represented as 1.10 in the AS-dot notation format.
routing-instances
Description Configure an additional routing entity for a router. You can create multiple instances of
BGP, IS-IS, OSPF, OSPFv3, and RIP for a router. You can also create multiple routing
instances for separating routing tables, routing policies, and interfaces for individual
wholesale subscribers (retailers) in a Layer 3 wholesale network.
NOTE: In Junos OS Release 9.6 and later, you can include a slash (/) in a
routing-instance name only if a logical system is not configured. That is, you
cannot include the slash character in a routing-instance name if a logical
system other than the default is explicitly configured.
routing-options
See routing-options
vrf-export
Description Define which routes are exported from a local instance table—instance-name.inet.0—to
a remote PE router. Specify one or more policy names.
Default If the instance-type is vrf, vrf-export is a required statement. The default action is to
reject.
Related • Configuring Secondary VRF Import and Export Policy on page 273
Documentation
vrf-import
Description How routes are imported into the local PE router’s VPN routing
table—instance-name.inet.0—from the remote PE router.
Default If the instance-type is vrf, vrf-import is a required statement. The default action is to
accept.
Related • Configuring Secondary VRF Import and Export Policy on page 273
Documentation
vlan-model
Options one-to-one—Specify that any received, dual-tagged VLAN packet triggers the provisioning
process in a Layer 2 Wholesale network. Using this option, the router learns VLAN
tags for each individual client. The router learns both the outer tag and inner tag of
the incoming packets, when the instance-role statement is defined as access, or the
outer VLAN tag only, when the instance-role statement is defined as nni.
Related • Specifying the Instance Type for Routing Instances on page 266
Documentation
• Configuring Separate Access Routing Instances for Layer 2 Wholesale Service Retailers
• Configuring Separate NNI Routing Instances for Layer 2 Wholesale Service Retailers
vrf-table-label
Syntax vrf-table-label;
Description Enable mapping of the inner label of a packet to a specific VRF, thereby allowing the
examination of the encapsulated IP header. All routes in the VRF configured with this
option are advertised with the label allocated per VRF.
vrf-target
Syntax vrf-target {
community;
import community;
export community;
}
Description Configure a single policy for import and a single policy for export to replace the per-VRF
policies for every community.
Multitopology Routing
• Introduction to Multitopology Routing on page 309
• Multitopology Routing Configuration Guidelines on page 313
• Summary of Multitopology Routing Configuration Statements on page 325
This chapter discusses the following topics that provide background information about
Multitopology Routing:
logical-system-name/routing-instance-name:topology-name.protocol.identifier
The routing instance string is included only if the instance is not the master. The logical
system string is included only if the logical system identifier has a value other than 0
(zero). Each routing table for a topology includes a colon (:) before the topology name
that also separates the routing-instance name from the topology name. protocol is the
protocol family, which can be inet or inet6. identifier is a positive integer that specifies
the instance of the routing table. Table 6 on page 309 shows specific examples of routing
tables for various topologies.
OSPF in Multitopology Routing uses a single instance of OSPF to carry connectivity and
IP reachability information for different topologies. That information is used to calculate
shortest-path-first (SPF) trees and routing tables. OSPF in Multitopology Routing supports
protocol extensions that include metrics that correspond to different topologies for link
and prefix reachability information. The type-of-service (TOS) metric field is used to
advertise the topology-specific metric for links and prefixes belonging to that topology.
The TOS field is redefined as MT-ID in the payload of router, summary, and Type 5 and
Type 7 autonomous-system-external link-state advertisements (LSAs).
BGP in Multitopology Routing provides the ability to resolve BGP routes against configured
topologies. An inbound policy is used to select routes for inclusion in the appropriate
routing tables for the topologies.
which enables you to match traffic on the ingress interface with a specific type of
forwarding class and then forward that traffic to the specified topology. You can further
define how traffic is handled for each forwarding class by configuring additional firewall
filters that match traffic for such values as the IP precedence field or the Differentiated
Services code point (DSCP).
This chapter discusses the following tasks for configuring Multitopology Routing (MTR).
Configuring Topologies
For Multitopology Routing to run on the router, you need to configure one or more
topologies. For each topology, you specify a string value, such as voice, that defines the
type of traffic, as well as an interface family, such as IPv4. In addition, a default topology
is automatically created. You can also enable a topology for IPv4 multicast traffic. Each
topology that you configure creates a new routing table and populates it with direct
routes from the topology. For more information about the naming conventions for routing
tables for topologies, see “Routing Table Naming Conventions for Multitopology Routing”
on page 309. To configure a custom topology, include the following statements at the
[edit routing options] hierarchy level:
[edit routing-options]
topologies {
family (inet | inet6) {
topology topology-name;
}
}
Include the family inet statement to specify IPv4 traffic. Include the family inet6 statement
to specify IPv6 traffic.
to create a topology for IPv4 multicast traffic. A default topology is also automatically
created.
Multitopology Routing OSPF (MT-OSPF) enables you to define multiple topologies and
to configure topology-specific metrics for individual links as well as to exclude individual
links from specific topologies. As a result, you can use a single instance of OSPF to carry
connectivity and IP reachability information for different topologies. Information for
different topologies is used to calculate independent shortest-path-first (SPF) trees and
routing tables. For information about configuration tasks for MT-OSPF, see the following
sections:
The default topology is automatically created and has a topology identifier of 0 (zero),
which cannot be modified. The routes that correspond to the default topology are added
to the inet.0 routing table. You can, however, modify other parameters, such as
shortest-path first (SPF) options. In addition, you can specify a topology for IPv4 multicast
traffic. The topology for IPv4 multicast has a topology identifier of 1, which you cannot
modify. The routes corresponding to this topology are added to the inet.2 routing table.
You can also configure SPF options for each topology that override the default or globally
configured SPF values. Include the following statements to configure a topology for
OSPF and SPF options for the topology at the [edit protocols ospf] hierarchy level:
For name, include the name of a topology that you configured under the [edit
routing-options] hierarchy level to create the topology.
Use ipv4-multicast for IPv4 multicast traffic. You must first enable this topology under
the [edit routing-options] hierarchy level.
topology-id number is the topology identifier. The range for topology-id number is from 32
through 127 for any topology you create, except for the default and IPv4 multicast
topologies. The identifier for those topologies is predefined and cannot be modified.
You can configure SPF options for each topology. The values you configure for each of
the following options override the default or globally configured values.
• The delay in the time between the detection of a topology change and when the SPF
algorithm actually runs
• The maximum number of times that the SPF algorithm can run in succession before
the hold-down timer begins
• The time to hold down, or wait, before running another SPF calculation after the SPF
algorithm has run in succession the configured maximum number of times
To configure the SPF delay, include the delay statement when specifying the spf-options
statement:
delay milliseconds;
By default, the SPF algorithm runs 200 milliseconds after the detection of a topology
change. The range that you can configure is from 50 through 8000 milliseconds.
To configure the maximum number of times that the SPF algorithm can run in succession,
include the rapid-runs statement when specifying the spf-options statement:
rapid-runs number;
The default number of SPF calculations that can occur in succession is 3. The range that
you can configure is from 1 through 5. Each SPF algorithm is run after the configured SPF
delay. When the maximum number of SPF calculations occurs, the hold-down timer
begins. Any subsequent SPF calculation is not run until the hold-down timer expires.
To configure the SPF hold-down timer, include the holddown statement when specifying
the spf-options statement:
holddown milliseconds;
The default is 5000 milliseconds, and the range that you can configure is from 2000
through 20,000 milliseconds. Use the hold-down timer to hold down, or wait, before
running any subsequent SPF calculations after the SPF algorithm runs for the configured
maximum number of times. If the network stabilizes during the hold-down period and
the SPF algorithm does not need to run again, the system reverts to the configured values
for the delay and rapid-runs statements.
The number that you can configure for each topology is from 0 through 4,294,967,295.
interface interface-name {
metric metric;
topology (ipv4-multicast | name);
metric metric;
}
}
All OSPF interfaces have a cost, which is a routing metric that is used in the link-state
calculation. Routes with lower total path metrics are preferred over those with higher
path metrics. The default value for the OSPF metric for an interface is 1. You can modify
the default value for an OSPF interface and configure a topology-specific metric for that
interface. The topology-specific metric applies to routes advertised from the interface
that belong only to that topology. The range that you can configure is from 1
through 65,535.
You can also configure any interface that belongs to one or more topologies to advertise
the direct interface addresses without actually running OSPF on that interface. By default,
You cannot disable an interface in the default topology and have it remain active in any
other configured topologies.
NOTE: If you disable the virtual link by including the disable statement at the
[edit protocols ospf area area-id virtual-link neighbor-id router-id transit-area
area-id] hierarchy level, you disable the virtual link for all topologies, including
the default topology. You cannot disable the virtual link only in the default
topology.
The LSP advertisement contains a local address (the from address of the LSP), a remote
address (the to address of the LSP), and a metric with the following precedence:
3. If you do not configure any of the above, use the default OSPFv2 metric of 1.
In addition, the default value of the topology-specific metric is the same as the default
metric calculated by OSPF or configured for the MPLS LSPs. You can also override this
value by configuring a specific metric for the topology. For more information about
configuring a topology-specific metric, see “Configuring Topologies” on page 313.
To disable a topology on LSPs and configure a label-switched path metric for OSPFv2,
include the following statements at the [edit protocols ospf] hierarchy level:
NOTE: You cannot disable an MPLS LSP in the default topology only and
have it remain enabled in other topologies.
For more information about advertising LSPs, see the Junos OS MPLS Applications
Configuration Guide.
To disable exporting Type 7 LSAs into LSAs, include the no-nssa-abr statement.
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
By default, internal OSPF routes have a preference value of 10, and external OSPF routes
have a preference value of 150. To modify the preference values for all topologies, include
the preference statement (for internal routes) or the external-preference statement (for
external routes):
For a complete list of hierarchy levels at which you can configure these statements, see
the statement summary sections for these statements.
You can configure a preference value of from 0 through 255 for each statement.
The reference bandwidth is used to calculate the default cost of a route using the following
formula:
The default value for the reference bandwidth is 100 Mbps (which you specify
as 100,000,000), which gives a metric of 1 for any bandwidth that is 100 Mbps or greater.
To modify the default value, include the reference-bandwidth statement:
The range that you can specify is from 9,600 through 1,000,000,000,000.
For a complete list of hierarchy levels at which you can configure this statement, see the
statement summary section for this statement.
NOTE: You can specify topology-specific metrics for routes advertised from
an interface. For more information, see “Configuring Topologies” on page 313.
Graceful restart enables a restarting router and its neighbors to continue forwarding
packets without disrupting network performance. Because neighboring routers assist in
the restart (these neighbors are called helper routers), the restarting router can quickly
resume full operation without recalculating algorithms.
Graceful restart is disabled by default. You can globally configure graceful restart for all
routing protocols at the [edit routing-options] hierarchy level. To configure graceful restart
parameters specifically for OSPF, include the graceful-restart statement at the [edit
protocols ospf] hierarchy level.
You can configure static routes to become installed in the routing table for any configured
topology. Include the rib routing-table-name statement at the [edit routing-options]
hierarchy level:
[edit routing-options]
rib routing-table-name {
static {
route destination-prefix {
next-hop;
}
static-options;
}
}
}
For route destination-prefix, specify the destination of the route in the following way:
network/mask-length, where network is the network portion of the IP address and
mask-length is the destination prefix length. You can specify an IPv4 or IPv6 address.
You can optionally specify how to reach the destination by including the next-hop
statement.
In addition, you can specify static-options, which defines additional information about
static routes that is included with the route when it is installed in the routing table. For
more information about specific static options you can optionally configure, see
“Configuring Static Route Options” on page 71.
Multitopology Routing in BGP enables you to configure a community target identifier for
each type of traffic, or topology. The target community identifies the destination to which
the route is going. BGP uses these community target identifiers to have routes imported
into the routing tables for the specific topologies. The forwarding class then determines
which table to use to forward traffic.
Multitopology Routing in BGP is also supported for BGP groups and BGP peers. To
configure for a BGP group, include the family (inet | inet6) unicast topology name
community target identifier statement at the [edit protocols bgp group group-name]
hierarchy level. To configure for a BGP peer, include the family (inet | inet6) unicast
topology name community target identifier statement at the [edit protocols bgp group
group-name neighbor address] hierarchy level.
The default behavior is for the Junos OS to resolve BGP routes against the inet.0 and
inet.3 routing tables. By default, the secondary route points to the next hop of the primary
BGP route. This means that under the default behavior, BGP cannot perform secondary
route resolution. Multitopology Routing in BGP provides support for secondary routes to
resolve to an independent set of next hops.
When Multitopology Routing in BGP resolves a route against the inet.0 routing table, a
forwarding state is generated to match the topologies for which you configured a BGP
import policy.
Each routing instance (master or virtual-router) supports one default topology to which
all forwarding classes are forwarded. For Multitopology Routing, you can configure a
firewall filter on the ingress interface to match a specific forwarding class, such as
expedited forwarding, with a specific topology. The traffic that matches the specified
forwarding class is then added to the routing table for that topology.
[edit firewall]
family (inet | inet6) {
filter filter-name {
term term-name {
from {
forwarding-class (assured-forwarding | best-effort | expedited-forwarding |
network-control)
}
then {
(topology topology-name | routing-instance routing-instance-name topology
topology-name | logical-system logical-system-name topology topology-name
| logical-system logical-system-name routing-instance routing-instance-name
topology topology-name);
}
}
}
}
To configure the family address type, specify family inet to filter IPv4 packets or family
inet6 to filter IPv6 packets.
To configure the filter name, include the filter filter-name statement. The filter name can
contain letters, numbers, and hyphens (-) and can be up to 64 characters long. To include
spaces in the name, enclose the entire name in quotation marks (“ ”).
Each filter consists of one or more terms. To configure a term, include the term term-name
statement. The term name can contain letters, numbers, and hyphens (-) and can be up
to 255 characters long. To include spaces in the name, enclose the entire name in
quotation marks (“ ”). Each term name must be unique within a filter.
Include the forwarding-class class statement to define the forwarding class against which
to match the incoming packets. You can configure the following types of forwarding
classes: assured-forwarding, expedited-forwarding, best-effort, and network-control.
You can specify multiple terms in a filter, effectively chaining together a series of
match-action operations to apply to the packets on an interface. Firewall filter terms are
evaluated in the order in which you specify them in the configuration. To reorder terms,
use the configuration mode insert command. For example, the command insert term up
before term start places the term up before the term start.
Use the topology statement to specify that packets that match the specified forwarding
class be directed to the specified topology.
For a topology in the master instance, include the topology name statement, where name
is the name of the topology.
For a topology in a nonmaster instance within a nonmaster logical system, include the
logical-system logical-system-name routing-instance routing-instance-name topology
topology-name statement, where logical-system-name is the name of the logical system,
routing-instance-name is the name of the routing instance configured within the logical
system, and topology-name is the name of the topology.
You must apply the filter to an ingress interface. Include the following statements to
apply the filter to an interface:
community
Syntax community {
target identifier;
}
Hierarchy Level [edit logical-systems logical-system-name protocols bgp family (inet | inet6) unicast topology
name],
[edit logical-systems logical-system-name protocols bgp group group-name family (inet |
inet6) unicast topology name],
[edit logical-systems logical-system-name protocols bgp group group-name neighbor address
family (inet | inet6) unicast topology name],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
bgp family (inet | inet6) unicast topology name],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
bgp group group-name family (inet | inet6) unicast topology name],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
bgp group group-name neighbor address family (inet | inet6) unicast topology name],
[edit protocols bgp family (inet | inet6) unicast topology name],
[edit protocols bgp group group-name family (inet | inet6) unicast topology name],
[edit protocols bgp group group-name neighbor address family (inet | inet6) unicast topology
name],
[edit routing-instances routing-instance-name protocols bgp family (inet | inet6) unicast
topology name],
[edit routing-instances routing-instance-name protocols bgp group group-name family (inet
| inet6) unicast topology name],
[edit routing-instances routing-instance-name protocols bgp group group-name neighbor
address family (inet | inet6) topology name]
Description Configure the community to identify the multitopology routes. BGP uses the target
community identifier to install the routes it learns in the appropriate Multitopology Routing
tables.
rib
Release Information Statement support for Multitopology Routing introduced in Junos OS Release 9.0.
Statement introduced in Junos OS Release 9.0 for EX Series switches.
Description Configure a static route to install routes in the routing table for a specific topology.
Options routing-table-name—Name of the routing table for a topology. Use the following format:
logical-system-name/routing-instance-name:topology-name.protocol.identifier. Include
the routing instance string only if the instance is not the master. The logical system
string is included only if the logical system identifier has a value other than 0 (zero).
Each routing table for a topology includes a colon (:) before the topology name.
protocol is the protocol family, which can be inet or inet6. identifier is the positive
integer that specifies the instance of the routing table. For example, to install IPv6
routes to the routing table for a topology named voice in the master instance, include
:voice.inet6.0.
topologies
Syntax topologies {
family (inet | inet6) {
topology topology-name;
}
}
Description Configure a topology for Multitopology Routing. Each topology creates a new routing
table that is populated with direct routes from the topology.
inet—IPv4
inet6—IPv6
topology
Hierarchy Level [edit firewall family (inet | inet6) filter filter-name term term-name then],
[edit firewall family (inet | inet6) filter filter-name term term-name then logical-system
logical-system-name],
[edit firewall family (inet | inet6) filter filter-name term term-name then logical-system
logical-system-name routing-instance routing-instance-name],
[edit firewall family (inet | inet6) filter filter-name term term-name then routing-instance
routing-instance-name]
Description Configure a topology for filter-based forwarding for Multitopology Routing. The firewall
filter you apply to the ingress interface is used to look up traffic against the configured
topology, and, if a route matches the conditions you configure for the term, the route is
accepted and added to the to the routing table for the specific topology.
There are multiple ways to configure a topology for filter-based forwarding, depending
on the type of instance or logical system you want to specify for the forwarding class.
See Options for more information.
NOTE: The options for logical system and routing instance precede the
topology statement with the then statement.
Hierarchy Level [edit logical-systems logical-system-name routing-options topologies family (inet | inet6)],
[edit logical-systems logical-system-name routing-instances routing-instance-name
routing-options topologies family (inet | inet6)],
[edit routing-instances routing-instance-name routing-options topologies family (inet |
inet6)],
[edit routing-options topologies family (inet | inet6)]
Options topology-name—Name of the topology. Include a string value that describes the type of
traffic, such as voice or video. For IPv4 multicast traffic, include ipv4-multicast as
the name.
topology (OSPF)
Syntax topology (default | ipv4-multicast | name) {
topology-id number;
spf-options {
delay milliseconds;
holddown milliseconds;
rapid-runs number;
}
}
Description Enable a topology for OSPF Multitopology Routing. You must first configure one or more
topologies under the [edit routing-options] hierarchy level.
Options default—Name of the default topology. This topology is automatically created and all
routes that correspond to it are automatically added to the inet.0 routing table. You
can modify certain default parameters, such as for the shortest-path-first (SPF)
algorithm.
Related • Configuring Topologies and SPF Options for MT-OSPF on page 314
Documentation
Hierarchy Level [edit logical-systems logical-system-name protocols ospf area area-id interface
interface-name],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
ospf area area-id interface interface-name],
[edit protocols ospf area area-id interface interface-name],
[edit routing-instances routing-instance-name protocols ospf area area-id interface
interface-name]
Default The default value of the topology metric is the same as the default metric value calculated
by OSPF or the value configured for the OSPF metric.
metric metric—Cost of a route from an OSPF interface. You can specify a metric value
for a topology that is different from the value specified for the interface.
Range: 1 through 65,535
Default: 1
topology-id
Default The default identifier for the default topology is 0, and the default identifier for the
topology for IPv4 multicast traffic is 1. These identifiers are predefined and cannot be
modified.
Introduction to IS-IS
This chapter discusses the following topics that provide background information about
IS-IS:
IS-IS Overview
IS-IS protocol is an interior gateway protocol (IGP) that uses link-state information to
make routing decisions.
IS-IS is a link-state IGP that uses the shortest path first (SPF) algorithm to determine
routes. IS-IS evaluates the topology changes and determines whether to perform a full
SPF recalculation or a partial route calculation (PRC). This protocol originally was
developed for routing International Organization for Standardization (ISO) Connectionless
Network Protocol (CLNP) packets.
IS-IS Terminology
An IS-IS network is a single autonomous system (AS), also called a routing domain, that
consists of end systems and intermediate systems. End systems are network entities that
send and receive packets. Intermediate systems send and receive packets and relay
(forward) packets. (Intermediate system is the Open System Interconnection [OSI] term
for a router.) ISO packets are called network protocol data units (PDUs).
In IS-IS, a single AS can be divided into smaller groups called areas. Routing between
areas is organized hierarchically, allowing a domain to be administratively divided into
smaller areas. This organization is accomplished by configuring Level 1 and Level 2
intermediate systems. Level 1 systems route within an area; when the destination is
outside an area, they route toward a Level 2 system. Level 2 intermediate systems route
between areas and toward other ASs.
An end system can have multiple NSAP addresses, in which case the addresses differ
only by the last byte (called the n-selector). Each NSAP represents a service that is
available at that node. In addition to having multiple services, a single node can belong
to multiple areas.
Each network entity also has a special network address called a network entity title (NET).
Structurally, an NET is identical to an NSAP address but has an n-selector of 00. Most
end systems and intermediate systems have one NET. Intermediate systems that
participate in multiple areas can have multiple NETs.
49.0001.00a0.c96b.c490.00
49.0001.2081.9716.9018.00
The first portion of the address is the area number, which is a variable number from 1
through 13 bytes. The first byte of the area number (49) is the authority and format
indicator (AFI). The next bytes are the assigned domain (area) identifier, which can be
from 0 through 12 bytes. In the examples above, the area identifier is 0001.
The next six bytes form the system identifier. The system identifier can be any six bytes
that are unique throughout the entire domain. The system identifier commonly is the
media access control (MAC) address (as in the first example, 00a0.c96b.c490) or the
IP address expressed in binary-coded decimal (BCD) (as in the second example,
2081.9716.9018, which corresponds to IP address 208.197.169.18). The last byte (00) is
the n-selector.
To provide help with IS-IS debugging, the Junos OS supports dynamic mapping of ISO
system identifiers to the hostname. Each system can be configured with a hostname,
which allows the system identifier-to-hostname mapping to be carried in a dynamic
hostname type length value (TLV) in IS-IS link-state protocol data units (LSPs). This
permits ISs in the routing domain to learn about the ISO system identifier of a particular
IS.
IS-IS Packets
IS-IS uses the following protocol data units (PDUs) to exchange protocol information:
• IS-IS hello (IIH) PDUs—Broadcast to discover the identity of neighboring IS-IS systems
and to determine whether the neighbors are Level 1 or Level 2 intermediate systems.
To help provide traffic engineering and MPLS with information about network topology
and loading, extensions have been added to the Junos OS implementation of IS-IS.
Specifically, IS-IS supports new TLVs that specify link attributes. These TLVs are included
in the IS-IS link-state PDUs. The link-attribute information is used to populate the traffic
engineering database, which is used by the Constrained Shortest Path First (CSPF)
algorithm to compute the paths that MPLS LSPs take. This path information is used by
RSVP to set up LSPs and reserve bandwidth for them.
To control the transmission of routes into IS-IS, or to control transmission of IS-IS routes
between different IS-IS levels, you can tag routes with certain attributes. IS-IS routes
can carry these attributes, which the routing policies can use to export and import routes
between different IS-IS levels. A sub-TLV to the IP prefix TLV is used to carry the tag or
attribute on the routes.
NOTE: Route tagging does not work when IS-IS traffic engineering is disabled.
IS-IS Standards
• ISO 9542, End System to Intermediate System Routing Exchange Protocol for Use in
Conjunction with the Protocol for the Provision of the Connectionless-mode Network
Service
• ISO 10589, Intermediate System to Intermediate System Routing Exchange Protocol for
Use in Conjunction with the Protocol for the Provision of the Connectionless-mode
Network Service
• RFC 1195, Use of OSI IS-IS for Routing in TCP/IP and Dual Environments
• RFC 5120, M-ISIS: Multi Topology (MT) Routing in Intermediate System to Intermediate
Systems (IS-ISs)
• RFC 5309, Point-to-Point Operation over LAN in Link State Routing Protocols
To access Internet RFCs and drafts, go to the Internet Engineering Task Force (IETF)
Web site at http://www.ietf.org.
This chapter discusses the following topics that provide information about configuring
IS-IS:
Configuring IS-IS
protocols {
isis {
clns-routing;
disable;
ignore-attached-bit;
graceful-restart {
disable;
helper-disable;
restart-duration seconds;
}
label-switched-path name level level metric metric;
level level-number {
authentication-key key;
authentication-key-chain key-chain-name;
authentication-type authentication;
external-preference preference;
no-csnp-authentication;
no-hello-authentication;
no-psnp-authentication;
preference preference;
prefix-export-limit number;
wide-metrics-only;
}
loose-authentication-check;
lsp-lifetime seconds;
max-areas seconds;
no-adjacency-holddown;
no-authentication-check;
no-ipv4-routing;
no-ipv6-routing;
overload {
advertise-high-metrics;
timeout seconds;
}
reference-bandwidth reference-bandwidth;
rib-group {
inet group-name;
inet6 group-name;
}
spf-options {
delay milliseconds;
holddown milliseconds;
rapid-runs number;
}
topologies {
ipv4-multicast;
ipv6-multicast;
ipv6-unicast;
}
traffic-engineering {
disable;
ignore-lsp-metrics;
family inet;
shortcuts {
multicast-rpf-routes;
}
}
family inet6;
shortcuts;
}
}
traceoptions {
file filename <files number> <size size> <world-readable | no-world-readable>;
flag flag <flag-modifier> <disable>;
}
interface (all | interface-name) {
disable;
bfd-liveness-detection {
authentication {
algorithm algorithm-name;
key-chain key-chain-name;
loose-check;
}
detection-time {
threshold milliseconds;
}
minimum-interval milliseconds;
minimum-receive-interval milliseconds;
multiplier number;
no-adaptation;
transmit-interval {
threshold milliseconds;
minimum-interval milliseconds;
}
version (1 | automatic);
}
checksum;
csnp-interval (seconds | disable);
hello-padding (adaptive | loose | strict);
ldp-synchronization {
disable;
hold-time seconds;
}
link-protection;
lsp-interval milliseconds;
mesh-group (value | blocked);
no-adjacency-holddown;
no-eligible-backup;
no-ipv4-multicast;
no-ipv6-multicast;
no-ipv6-unicast;
no-unicast-topology;
node-link-protection;
passive;
point-to-point;
level level-number {
disable;
hello-authentication-key key;
hello-authentication-key-chain key-chain-name;
hello-authentication-type authentication;
hello-interval seconds;
hold-time seconds;
ipv4-multicast-metric number;
ipv6-multicast-metric number;
ipv6-unicast-metric number;
metric metric;
passive;
priority number;
te-metric metric;
}
}
}
}
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
By default, IS-IS is enabled for Level 1 and Level 2 routers on all interfaces on which an
International Organization for Standardization (ISO) address is configured.
For IS-IS to run on the routing device, you must enable IS-IS on the routing device,
configure a network entity title (NET) on one of the routing device’s interfaces (preferably
the loopback interface, lo0), and configure the ISO family on all interfaces on which you
want IS-IS to run. When you enable IS-IS, Level 1 and Level 2 are enabled by default. The
following is the minimum IS-IS configuration. In the address statement, address is the
NET:
interfaces {
lo0 {
unit logical-unit-number {
family iso {
address address;
}
}
}
interface-type-fpc/pic/port {
unit logical-unit-number {
family iso;
}
}
}
protocols {
isis {
interface all;
}
}
NOTE: To create the IS-IS interface, you must also configure IS-IS at the [edit
protocols isis interface interface-name] hierarchy level. If you want the Junos
OS to create IS-IS interfaces automatically, include the interface all option
at the [edit protocols isis] hierarchy level.
All IS-IS protocol exchanges can be authenticated to guarantee that only trusted routing
devices participate in the autonomous system (AS) routing. By default, IS-IS
authentication is disabled on the routing device.
You can also configure more fine-grained authentication for hello packets. To do this,
see “Configuring Authentication for IS-IS Hello Packets” on page 390.
authentication-type authentication;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
authentication-key key;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
The password can contain up to 255 characters. If you include spaces, enclose all
characters in quotation marks (“ ”).
If you are using the Junos OS IS-IS software with another implementation of IS-IS, the
other implementation must be configured to use the same password for the domain, the
area, and all interfaces that are shared with a Junos implementation.
Authentication of hello packets, partial sequence number PDU (PSNP), and complete
sequence number PDU (CSNP) may be suppressed to enable interoperability with the
routing software of different vendors. Different vendors handle authentication in various
ways, and suppressing authentication for different PDU types may be the simplest way
to allow compatibility within the same network.
To configure IS-IS to generate authenticated packets, but not to check the authentication
on received packets, include the no-authentication-check statement:
no-authentication-check;
no-hello-authentication;
no-psnp-authentication;
no-csnp-authentication;
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
If you configure authentication for all peers, each peer in that group inherits the group’s
authentication.
You can update authentication keys without resetting any IS-IS neighbor sessions. This
is referred to as hitless authentication key rollover.
Hitless authentication key rollover uses authentication keychains, which consist of the
authentication keys that are being updated. The keychain includes multiple keys. Each
key in the keychain has a unique start time. At the next key’s start time, a rollover occurs
from the current key to the next key, and the next key becomes the current key.
You can choose the algorithm through which authentication is established. You can
configure MD5 or SHA-1 authentication. You associate a keychain and the authentication
algorithm with an IS-IS neighboring session. Each key contains an identifier and a secret
password.
The sending peer chooses the active key based on the system time and the start times
of the keys in the keychain. The receiving peer determines the key with which it
authenticates based on the incoming key identifier.
You can configure either RFC 5304-based encoding or RFC 5310-based encoding for the
IS-IS protocol transmission encoding format.
Related • Example: Configuring Hitless Authentication Key Rollover for IS-IS on page 350
Documentation
Requirements
Overview
Authentication guarantees that only trusted routers participate in routing updates. This
keychain authentication method is referred to as hitless because the keys roll over from
one to the next without resetting any peering sessions or interrupting the routing protocol.
Junos OS supports both RFC 5304, IS-IS Cryptographic Authentication and RFC 5310,
IS-IS Generic Cryptographic Authentication.
This example includes the following statements for configuring the keychain:
• algorithm—For each key in the keychain, you can specify an encryption algorithm. The
algorithm can be SHA-1 or MD-5.
• key—A keychain can have multiple keys. Each key within a keychain must be identified
by a unique integer value. The range of valid identifier values is from 0 through 63.
• key-chain—For each keychain, you must specify a name. This example defines two
keychains: base-key-global and base-key-inter.
• options—For each key in the keychain, you can specify the encoding for the message
authentication code:isis-enhanced or basic. The basic (RFC 5304) operation is enabled
by default.
When you configure the isis-enhanced option, Junos OS sends RFC 5310-encoded
routing protocol packets and accepts both RFC 5304-encoded and RFC 5310-encoded
routing protocol packets that are received from other devices.
When you configure basic (or do not include the options statement in the key
configuration) Junos OS sends and receives RFC 5304-encoded routing protocols
packets, and drops 5310-encoded routing protocol packets that are received from
other devices.
Because this setting is for IS-IS only, the TCP and the BFD protocol ignore the encoding
option configured in the key.
• secret—For each key in the keychain, you must set a secret password. This password
can be entered in either encrypted or plain text format in the secret statement. It is
always displayed in encrypted format.
• start-time—Each key must specify a start time in UTC format. Control gets passed
from one key to the next. When a configured start time arrives (based on the routing
device’s clock), the key with that start time becomes active. Start times are specified
in the local time zone for a routing device and must be unique within the key chain.
You can apply a keychain globally to all interfaces or more granularly to specific interfaces.
This example includes the following statements for applying the keychain to all interfaces
or to particular interfaces:
A A C A B
SONET
FE/GE/XE R3
g040568
Configuration
CLI Quick To quickly configure the hitless authentication key rollover for IS-IS, copy the following
Configuration commands and paste the commands into the CLI.
[edit]
set interfaces ge-0/0/0 unit 0 description "interface A"
set interfaces ge-0/0/0 unit 0 family inet address 10.0.0.1/30
set interfaces ge-0/0/0 unit 0 family iso
set interfaces ge-0/0/0 unit 0 family inet6 address fe80::200:f8ff:fe21:67cf/128
set interfaces ge-0/0/1 unit 0 description "interface B"
set interfaces ge-0/0/1 unit 0 family inet address 10.0.0.5/30
set interfaces ge-0/0/1 unit 0 family iso
set interfaces ge-0/0/1 unit 0 family inet6 address 10FB::C:ABC:1F0C:44DA/128
set interfaces ge-0/0/2 unit 0 description "interface C"
set interfaces ge-0/0/2 unit 0 family inet address 10.0.0.9/30
set interfaces ge-0/0/2 unit 0 family iso
set interfaces ge-0/0/2 unit 0 family inet6 address ff06::c3/128
[edit]
user@host# edit interfaces ge-0/0/0 unit 0
[edit interfaces ge-0/0/0 unit 0]
user@host# set description "interface A"
user@host# set family inet address 10.0.0.1/30
user@host# set family iso
user@host# set family inet6 address fe80::200:f8ff:fe21:67cf/128
user@host# exit
[edit]
user@host# edit interfaces ge-0/0/1 unit 0
[edit interfaces ge-0/0/1 unit 0]
user@host# set interfaces ge-0/0/1 unit 0 description "interface B"
user@host# set interfaces ge-0/0/1 unit 0 family inet address 10.0.0.5/30
user@host# set interfaces ge-0/0/1 unit 0 family iso
user@host# set interfaces ge-0/0/1 unit 0 family inet6 address
10FB::C:ABC:1F0C:44DA/128
user@host# exit
[edit]
user@host# edit interfaces ge-0/0/2 unit 0
[edit interfaces ge-0/0/2 unit 0]
user@host# set description "interface C"
user@host# set family inet address 10.0.0.9/30
user@host# set interfaces ge-0/0/2 unit 0 family iso
user@host# set interfaces ge-0/0/2 unit 0 family inet6 address ff06::c3/128
user@host# exit
[edit]
user@host# edit security authentication-key-chains key-chain base-key-global
[edit security authentication-key-chains key-chain base-key-global]
user@host# set key 63 secret "$9$jfkqfTQnCpBDiCt"
user@host# set key 63 start-time "2011-8-6.06:54:00-0700"
user@host# set key 63 algorithm hmac-sha-1
3. Apply the base-key-global keychain to all Level 1 IS-IS interfaces on Router R0.
[edit]
user@host# edit protocols isis level 1
[edit protocols isis level 1]
set authentication-key-chain base-key-global
user@host# exit
[edit]
user@host# edit protocols isis interface ge-0/0/0.0 level 1
[edit protocols isis interface ge-0/0/0.0 level 1]
set hello-authentication-key-chain base-key-inter
user@host# exit
[edit]
user@host# commit
Results Confirm your configuration by entering the show interfaces, show protocols, and show
security commands.
}
}
}
ge-0/0/2 {
unit 0 {
description "interface C";
family inet {
address 10.0.0.9/30;
}
family iso;
family inet6 {
address ff06::c3/128;
}
}
}
Verification
Related • Overview of Hitless Authentication Key Rollover for IS-IS on page 349
Documentation
You can configure interface-specific IS-IS properties by including the interface statement.
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
For interface-name, specify the full interface name, including the physical and logical
address components. To configure all interfaces, specify the interface name as all.
For more information about configuring IS-IS interface properties, see the following
topics:
The BFD failure detection timers are adaptive and can be adjusted to be faster or slower.
For example, the timers can adapt to a higher value if the adjacency fails, or a neighbor
can negotiate a higher value for a timer than the configured value. The timers adapt to
a higher value when a BFD session flap occurs more than three times in a span of 15
seconds. A back-off algorithm increases the receive (RX) interval by two if the local BFD
instance is the reason for the session flap. The transmission (TX) interval is increased by
two if the remote BFD instance is the reason for the session flap.
You can use the clear bfd adaptation command to return BFD interval timers to their
configured values. The clear bfd adaptation command is hitless, meaning that the
command does not affect traffic flow on the IS-IS routing device.
To detect failures in the network, the following set of statements are used in the
configuration.
minimum-interval Specify the minimum transmit and receive intervals for failure detection.
milliseconds
This value represents the minimum interval at which the local router transmits hellos packets as
well as the minimum interval at which the router expects to receive a reply from a neighbor with
which it has established a BFD session. You can configure a number from 1 through
255,000 milliseconds. You can also specify the minimum transmit and receive intervals separately.
NOTE: BFD is an intensive protocol that consumes system resources. Specifying a minimum interval
for BFD less than 100 ms for Routing Engine-based sessions and 10 ms for distributed BFD sessions
can cause undesired BFD flapping.
• For large-scale network deployments with a large number of BFD sessions, specify a minimum
interval of 300 ms for Routing Engine-based sessions and 100 ms for distributed BFD sessions.
• For very large-scale network deployments with a large number of BFD sessions, please contact
Juniper Networks customer support for more information.
• For BFD sessions to remain up during a Routing Engine switchover event when nonstop active
routing (NSR) is configured, specify a minimum interval of 2500 ms for Routing Engine-based
sessions. For distributed BFD sessions with NSR configured, the minimum interval
recommendations are unchanged and depend only on your network deployment.
minimum-receive-interval Specify only the minimum receive interval for failure detection.
milliseconds
This value represents the minimum interval at which the local router expects to receive a reply
from a neighbor with which it has established a BFD session. You can configure a number from 1
through 255,000 milliseconds.
multiplier number Specify the number of hello packets not received by the neighbor that causes the originating
interface to be declared down.
The default is 3, and you can configure a value from 1 through 225.
In Junos OS Release 9.0 and later, you can specify that the BFD sessions not adapt to changing
network conditions.
NOTE: We recommend that you not disable BFD adaptation unless it is preferable not to have
BFD adaptation enabled in your network.
threshold • Specify the threshold for the adaptation of the detection time.
When the BFD session detection time adapts to a value equal to or greater than the threshold,
a single trap and a system log message are sent.
• Specify the threshold for the transmit interval.
NOTE: The threshold value must be greater than the minimum transmit interval multiplied by the
multiplier number.
NOTE: You can trace BFD operations by including the traceoptions statement
at the [edit protocols bfd] hierarchy level.
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
Requirements
Before you begin, configure IS-IS on both routers. See “Minimum IS-IS Configuration” on
page 347 for information about the required IS-IS configuration.
Overview
This example shows two routers connected to each other. A loopback interface is
configured on each router. IS-IS and BFD protocols are configured on both routers.
Configuration
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
Router R1
Router R2
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see the Junos OS CLI User Guide.
NOTE: To simply configure BFD for IS-IS, only the minimum-interval statement
is required. The BFD protocol selects default parameters for all the other
configuration statements when you use the bfd-liveness-detection statement
without specifying any parameters.
NOTE: You can change parameters at any time without stopping or restarting
the existing session. BFD automatically adjusts to the new parameter value.
However, no changes to BFD parameters take place until the values
resynchronize with each BFD peer.
2. Configure the threshold for the adaptation of the detection time, which must be
greater than the multiplier number multiplied by the minimum interval.
3. Configure the minimum transmit and receive intervals for failure detection.
6. Configure the threshold for the transmit interval, which must be greater than the
minimum transmit interval.
8. Configure the multiplier number, which is the number of hello packets not received
by the neighbor that causes the originating interface to be declared down.
Results Confirm your configuration by issuing the show protocols isis interface command.
bfd-liveness-detection {
version automatic;
minimum-interval 2;
minimum-receive-interval 1;
multiplier 2;
no-adaptation;
transmit-interval {
minimum-interval 1;
threshold 3;
}
detection-time {
threshold 5;
}
}
...
bfd-liveness-detection {
version automatic;
minimum-interval 3;
minimum-receive-interval 1;
multiplier 2;
no-adaptation;
transmit-interval {
minimum-interval 1;
threshold 4;
}
detection-time {
threshold 6;
}
}
...
Verification
Purpose Make sure that the Routers R1 and R2 are connected to each other.
Action Ping the other router to check the connectivity between the two routers as per the network
topology.
Purpose Make sure that the IS-IS instance is running on both routers.
Action Use the show isis database statement to check if IS-IS instance is running on both routers,
R1 and R2.
Purpose Make sure that the BFD instance is running on both routers, R1 and R2.
Action Use the show bfd session detail statement to check if BFD instance is running on the
routers.
1 sessions, 2 clients
Cumulative transmit rate 1.0 pps, cumulative receive rate 1.0 pps
Detect Transmit
Address State Interface Time Interval Multiplier
10.0.0.1 Up so-0/0/0 2.000 1.000 2
Client ISIS R2, TX interval 0.001, RX interval 0.001
Session down time 00:00:00, previous up time 00:00:05
Local diagnostic NbrSignal, remote diagnostic NbrSignal
Remote state AdminDown, version 1
Router 2, routing table index 15
1 sessions, 1 clients
Cumulative transmit rate 1.0 pps, cumulative receive rate 1.0 pps
Meaning BFD is configured on Routers R1 and R2 for detecting failures in the IS-IS network.
• keyed-md5—Keyed Message Digest 5 hash algorithm for sessions with transmit and
receive intervals greater than 100 ms. To authenticate the BFD session, keyed MD5
uses one or more secret keys (generated by the algorithm) and a sequence number
that is updated periodically. With this method, packets are accepted at the receiving
end of the session if one of the keys matches and the sequence number is greater than
or equal to the last sequence number received. Although more secure than a simple
password, this method is vulnerable to replay attacks. Increasing the rate at which the
sequence number is updated can reduce this risk.
• keyed-sha-1—Keyed Secure Hash Algorithm I for sessions with transmit and receive
intervals greater than 100 ms. To authenticate the BFD session, keyed SHA uses one
or more secret keys (generated by the algorithm) and a sequence number that is
updated periodically. The key is not carried within the packets. With this method,
packets are accepted at the receiving end of the session if one of the keys matches
and the sequence number is greater than the last sequence number received.
The authentication keychain contains one or more keychains. Each keychain contains
one or more keys. Each key holds the secret data and the time at which the key becomes
valid. The algorithm and keychain must be configured on both ends of the BFD session,
and they must match. Any mismatch in configuration prevents the BFD session from
being created.
BFD allows multiple clients per session, and each client can have its own keychain and
algorithm defined. To avoid confusion, we recommend specifying only one security
authentication keychain.
• show bfd session command in the Junos OS Routing Protocols and Policies Command
Reference
Beginning with Junos OS Release 9.6, you can configure authentication for BFD sessions
running over IS-IS. Routing instances are also supported. Only three steps are needed to
configure authentication on a BFD session:
The following sections provide instructions for configuring and viewing BFD authentication
on IS-IS:
[edit]
user@host# set protocols isis interface if1-isis bfd-liveness-detection authentication
algorithm keyed-sha-1
2. Specify the keychain to be used to associate BFD sessions on the specified IS-IS route
or routing instance with the unique security authentication keychain attributes. This
should match the keychain name configured at the [edit security authentication
key-chains] hierarchy level.
[edit]
user@host# set protocols isis interface if1-isis bfd-liveness-detection authentication
keychain bfd-isis
• At least one key, a unique integer between 0 and 63. Creating multiple keys allows
multiple clients to use the BFD session.
[edit security]
user@host# authentication-key-chains key-chain bfd-sr4 key 53 secret
$9$ggaJDmPQ6/tJgF/AtREVsyPsnCtUHm start-time 2009-06-14.10:00:00
[edit]
user@host> set protocols isis interface if1-isis bfd-liveness-detection authentication
loose-check
5. (Optional) View your configuration using the show bfd session detail or show bfd
session extensive command.
6. Repeat these steps to configure the other end of the BFD session.
The following example shows BFD authentication configured for the if1-isis interface. It
specifies the keyed SHA-1 authentication algorithm and a keychain name of bfd-isis. The
authentication keychain is configured with two keys. Key 1 contains the secret data
“$9$ggaJDmPQ6/tJgF/AtREVsyPsnCtUHm” and a start time of June 1, 2009, at 9:46:02
AM PST. Key 2 contains the secret data “$9$a5jiKW9l.reP38ny.TszF2/9” and a start time
of June 1, 2009, at 3:29:20 PM PST.
key-chain bfd-isis;
}
}
}
[edit security]
authentication key-chains {
key-chain bfd-isis {
key 1 {
secret “$9$ggaJDmPQ6/tJgF/AtREVsyPsnCtUHm”;
start-time “2009-6-1.09:46:02 -0700”;
}
key 2 {
secret “$9$a5jiKW9l.reP38ny.TszF2/9”;
start-time “2009-6-1.15:29:20 -0700”;
}
}
}
If you commit these updates to your configuration, you would see output similar to the
following. In the output for the show bfd sessions detail command, Authenticate is
displayed to indicate that BFD authentication is configured. For more information about
the configuration, use the show bfd sessions extensive command. The output for this
command provides the keychain name, the authentication algorithm and mode for each
client in the session, and the overall BFD authentication configuration status, keychain
name, and authentication algorithm and mode.
1 sessions, 1 clients
Cumulative transmit rate 10.0 pps, cumulative receive rate 10.0 pps
1 sessions, 1 clients
Cumulative transmit rate 10.0 pps, cumulative receive rate 10.0 pps
• show bfd session command in the Junos OS Routing Protocols and Policies Command
Reference
You can enable checksum for packets on a per-interface basis. To enable checksum,
include the checksum statement:
checksum;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
By default, IS-IS sends complete sequence number (CSN) packets periodically. If the
routing device is the designated router on a LAN, IS-IS sends CSN packets every
10 seconds. If the routing device is on a point-to-point interface, it sends CSN packets
every 5 seconds. You might want to modify the default interval to protect against link-state
PDU (LSP) flooding.
csnp-interval seconds;
To configure the interface not to send any CSN packets, specify the disable option:
csnp-interval disable;
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
and labels are not exchanged), IS-IS advertises the link with the maximum cost metric.
The link is not preferred but remains in the network topology.
To advertise the maximum cost metric until LDP is operational for LDP synchronization,
include the ldp-synchronization statement:
ldp-synchronization {
disable;
hold-time seconds;
}
To disable synchronization, include the disable statement. To configure the time period
to advertise the maximum cost metric for a link that is not fully operational, include the
hold-time statement.
NOTE: When an interface has been in the holddown state for more than
three minutes, a system log message with a warning level is sent. This
message appears in both the messages file and the trace file.
For a list of hierarchy levels at which you can include these statements, see the statement
summary section for these statements.
By default, the routing device sends one link-state PDU packet out an interface every
100 milliseconds. To modify this interval, include the lsp-interval statement:
lsp-interval milliseconds;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
To disable the transmission of all link-state PDU packets, set the interval to 0.
A mesh group is a set of routing devices that are fully connected; that is, they have a fully
meshed topology. When link-state PDU packets are being flooded throughout an area,
each router within a mesh group receives only a single copy of an link-state PDU packet
instead of receiving one copy from each neighbor, thus minimizing the overhead associated
with the flooding of link-state PDU packets.
To create a mesh group and designate that an interface is part of the group, assign a
mesh-group number to all the routing device interfaces in the group:
mesh-group value;
To prevent an interface in the mesh group from flooding link-state PDUs, configure
blocking on that interface:
mesh-group blocked;
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
In certain instances, the unicast routing table used for the RPF check is also the table
used for forwarding unicast data packets. Thus, unicast and multicast routing are
congruent. In other cases, where it is preferred that multicast routing be independent of
unicast routing, the multicast routing protocols are configured to perform the RPF check
using an alternate unicast routing table inet.2.
You can configure IS-IS to calculate an alternate IPv4 multicast topology, in addition to
the normal IPv4 unicast topology, and add the corresponding routes to inet.2. The IS-IS
interface metrics for the multicast topology can be configured independently of the
unicast metrics. You can also selectively disable interfaces from participating in the
multicast topology while continuing to participate in the regular unicast topology. This
lets you exercise control over the paths that multicast data takes through a network so
that it is independent of unicast data paths. You can also configure IS-IS to calculate an
alternate IPv6 multicast topology, in addition to the normal IPv6 unicast topology.
NOTE: IS-IS only starts advertising the routes when the interface routes are
in inet.2.
Table 8 on page 371 lists the various IPv4 statements you can use to configure IS-IS
multicast topologies.
ipv4-multicast-metric number Configures the multicast metric for an alternate IPv4 multicast topology.
Table 9 on page 372 lists the various IPv6 statements you can use to configure IS-IS
multicast topologies.
ipv6-multicast-metric number Configures the multicast metric for an alternate IPv6 multicast topology.
ipv6-unicast-metric number Configures the unicast metric for an alternate IPv6 multicast topology.
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
Requirements
Before you begin, configure IS-IS on all routers. See “Minimum IS-IS Configuration” on
page 347 for information about the required IS-IS configuration.
Overview
This example shows an IS-IS multicast topology configuration. Three routers are
connected to each other. A loopback interface is configured on each router.
Configuration
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
Router R1
Router R2
Router R3
The following example requires you to navigate various levels in the configuration
hierarchy. For information about navigating the CLI, see the Junos OS CLI User Guide.
1. Enable the multicast topology for IS-IS by using the ipv4-multicast statement.
2. Enable multicast metrics on the first sonet Interface by using the ipv4-multicast-metric
statement.
Router R1
Router R2
Router R3
Router R1
Router R2
Router R3
Router R1
Router R2
Router R3
[edit]
user@host# commit
Results Confirm your configuration by using the show protocols isis statement.
Router R1
traceoptions {
file isis size 5m world-readable;
flag error;
}
topologies ipv4-multicast;
interface so-0/0/0 {
level 1 {
metric 15;
ipv4-multicast-metric 18;
}
level 2 {
metric 20;
ipv4-multicast-metric 14;
}
}
interface so-1/0/0 {
level 1 {
metric 15;
ipv4-multicast-metric 17;
}
level 2 {
metric 31;
ipv4-multicast-metric 22;
}
}
interface fxp0.0 {
disable;
}
Router R2
traceoptions {
file isis size 5m world-readable;
flag error;
}
topologies ipv4-multicast;
interface so-0/0/0 {
level 1 {
metric 13;
ipv4-multicast-metric 12;
}
level 2 {
metric 29;
ipv4-multicast-metric 23;
}
}
interface so-1/0/0 {
level 1 {
metric 14;
ipv4-multicast-metric 18;
}
level 2 {
metric 32;
ipv4-multicast-metric 26;
}
}
interface fxp0.0 {
disable;
}
Router R3
traceoptions {
file isis size 5m world-readable;
flag error;
}
topologies ipv4-multicast;
interface so-0/0/0 {
level 1 {
metric 19;
ipv4-multicast-metric 11;
}
level 2 {
metric 27;
ipv4-multicast-metric 21;
}
}
interface so-1/0/0 {
level 1 {
metric 16;
ipv4-multicast-metric 26;
}
level 2 {
metric 30;
ipv4-multicast-metric 20;
}
}
interface fxp0.0 {
disable;
}
Verification
• Verifying the Connection Between Routers R1, R2, and R3 on page 378
• Verifying That IS-IS Is Configured on page 379
• Verifying the Configured Multicast Metric Values on page 381
• Verifying the Configuration of Multicast Topology on page 382
Purpose Make sure that Routers R1, R2, and R3 are connected to each other.
Action Ping the other two routers from any router, to check the connectivity between the three
routers as per the network topology.
Meaning Routers R1, R2, and R3 have a peer relationship with each other.
Purpose Make sure that the IS-IS instance is running on Routers R1, R2, and R3, and that they are
adjacent to each other.
Action Use the show isis adjacency detail statement to check the adjacency between the routers.
Router R1
R2
Interface: so-0/0/0, Level: 1, State: Up, Expires in 8 secs
Priority: 64, Up/Down transitions: 1, Last transition: 2d 19:23:59 ago
Circuit type: 3, Speaks: IP, MAC address: 0:1b:c0:86:54:bd
Topologies: IPV4-Multicast
Restart capable: Yes, Adjacency advertisement: Advertise
LAN id: R2.02, IP addresses: 10.0.1.10
R2
Interface: so-0/0/0, Level: 2, State: Up, Expires in 8 secs
Priority: 64, Up/Down transitions: 1, Last transition: 2d 19:23:58 ago
Circuit type: 3, Speaks: IP, MAC address: 0:1b:c0:86:54:bd
Topologies: IPV4-Multicast
Restart capable: Yes, Adjacency advertisement: Advertise
LAN id: R2.02, IP addresses: 10.0.1.10
R3
Interface: so-1/0/0, Level: 1, State: Up, Expires in 7 secs
Priority: 64, Up/Down transitions: 1, Last transition: 2d 19:24:20 ago
Circuit type: 3, Speaks: IP, MAC address: 0:1b:c0:86:54:bd
Topologies: IPV4-Multicast
Restart capable: Yes, Adjacency advertisement: Advertise
LAN id: R3.02, IP addresses: 10.0.2.10
R3
Interface: so-1/0/0, Level: 2, State: Up, Expires in 6 secs
Priority: 64, Up/Down transitions: 1, Last transition: 2d 19:24:20 ago
Circuit type: 3, Speaks: IP, MAC address: 0:1b:c0:86:54:bd
Topologies: IPV4-Multicast
Restart capable: Yes, Adjacency advertisement: Advertise
LAN id: R3.02, IP addresses: 10.0.2.10
Router R2
R1
Interface: so-0/0/0, Level: 1, State: Up, Expires in 20 secs
Priority: 64, Up/Down transitions: 1, Last transition: 2d 19:27:50 ago
Circuit type: 3, Speaks: IP, MAC address: 0:1b:c0:86:54:bc
Topologies: IPV4-Multicast
Restart capable: Yes, Adjacency advertisement: Advertise
LAN id: R2.02, IP addresses: 10.0.1.9
R1
Interface: so-0/0/0, Level: 2, State: Up, Expires in 26 secs
Priority: 64, Up/Down transitions: 1, Last transition: 2d 19:27:50 ago
Circuit type: 3, Speaks: IP, MAC address: 0:1b:c0:86:54:bc
Topologies: IPV4-Multicast
Restart capable: Yes, Adjacency advertisement: Advertise
LAN id: R2.02, IP addresses: 10.0.1.9
R3
Interface: so-1/0/0, Level: 1, State: Up, Expires in 8 secs
Priority: 64, Up/Down transitions: 1, Last transition: 2d 19:27:22 ago
Circuit type: 3, Speaks: IP, MAC address: 0:1b:c0:86:54:bd
Topologies: IPV4-Multicast
Restart capable: Yes, Adjacency advertisement: Advertise
LAN id: R3.03, IP addresses: 10.0.3.10
R3
Interface: so-1/0/0, Level: 2, State: Up, Expires in 8 secs
Priority: 64, Up/Down transitions: 1, Last transition: 2d 19:27:22 ago
Circuit type: 3, Speaks: IP, MAC address: 0:1b:c0:86:54:bd
Topologies: IPV4-Multicast
Restart capable: Yes, Adjacency advertisement: Advertise
LAN id: R3.03, IP addresses: 10.0.3.10
Router R3
R2
Interface: so-0/0/0, Level: 1, State: Up, Expires in 18 secs
R2
Interface: so-0/0/0, Level: 2, State: Up, Expires in 22 secs
Priority: 64, Up/Down transitions: 1, Last transition: 2d 19:33:09 ago
Circuit type: 3, Speaks: IP, MAC address: 0:1b:c0:86:54:bc
Topologies: IPV4-Multicast
Restart capable: Yes, Adjacency advertisement: Advertise
LAN id: R3.03, IP addresses: 10.0.3.9
R1
Interface: so-1/0/0, Level: 1, State: Up, Expires in 21 secs
Priority: 64, Up/Down transitions: 1, Last transition: 2d 19:33:59 ago
Circuit type: 3, Speaks: IP, MAC address: 0:1b:c0:86:54:bc
Topologies: IPV4-Multicast
Restart capable: Yes, Adjacency advertisement: Advertise
LAN id: R3.02, IP addresses: 10.0.2.9
R1
Interface: so-1/0/0, Level: 2, State: Up, Expires in 19 secs
Priority: 64, Up/Down transitions: 1, Last transition: 2d 19:33:59 ago
Circuit type: 3, Speaks: IP, MAC address: 0:1b:c0:86:54:bc
Topologies: IPV4-Multicast
Restart capable: Yes, Adjacency advertisement: Advertise
LAN id: R3.02, IP addresses: 10.0.2.9
Meaning IS-IS is configured on Routers R1, R2, and R3 and they are adjacent to each other.
Purpose Make sure that the SPF calculations are accurate as per the configured multicast metric
values on Routers R1, R2, and R3.
Action Use the show isis spf results statement to check the SPF calculations for the network.
Router R1
Router R2
Router R3
Meaning The configured multicast metric values are used in SPF calculations for the IS-IS network.
Purpose Make sure that multicast topology is configured on Routers R1, R2, and R3.
Action Use the show isis database detail statement to verify the multicast topology configuration
on the routers.
Router R1
Router R2
Router R3
You can configure IS-IS to calculate an alternate IPv6 unicast topology, in addition to
the normal IPv4 unicast topology, and add the corresponding routes to inet6.0. The IS-IS
interface metrics for the IPv4 topology can be configured independently of the IPv6
metrics. You can also selectively disable interfaces from participating in the IPv6 topology
while continuing to participate in the IPv4 topology. This lets you exercise control over
the paths that unicast data takes through a network.
To enable an alternate IPv6 unicast topology for IS-IS, include the ipv6-unicast statement:
isis {
topologies {
ipv6-unicast;
}
}
isis {
interface interface-name {
level level-number {
ipv6-unicast-metric number;
}
}
}
To exclude an interface from the IPv6 unicast topologies for IS-IS, include the
no-ipv6-unicast statement:
isis {
interface interface-name {
no-ipv6-unicast;
}
}
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
You can use the point-to-point statement to configure a LAN interface to act like a
point-to-point interface for IS-IS. You do not need an unnumbered LAN interface, and it
has no effect if configured on an interface that is already point-to-point.
The point-to-point statement affects only IS-IS protocol procedures on that interface;
all other protocols continue to treat the interface as a LAN interface. Only two IS-IS
routing devices can be connected to the LAN interface and both must be configured as
point-to-point.
point-to-point;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
You can administratively divide a single AS into smaller groups called areas. You configure
each routing device interface to be in an area. Any interface can be in any area. The area
address applies to the entire routing device; you cannot specify one interface to be in one
area and another interface in a different area. In order to route between areas you must
have two adjacent Level 2 routers that communicate with each other.
Level 1 routers can only route within their IS-IS area. To send traffic outside their area,
Level 1 routers must send packets to the nearest intra-area Level 2 router. A routing device
can be a Level 1 router, a Level 2 router, or both. You specify the router level on a
per-interface basis, and a routing device becomes adjacent with other routing devices
on the same level on that link only.
You can configure one Level 1 routing process and one Level 2 routing process on each
interface, and you can configure the two levels differently.
level level-number {
disable;
hello-authentication-key key;
hello-authentication-key-chain key-chain-name;
hello-authentication-type authentication;
hello-interval seconds;
hold-time seconds;
ipv4-multicast-metric number;
ipv6-multicast-metric number;
ipv6-unicast-metric number;
metric metric;
passive;
priority number;
te-metric metric;
}
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
The statements within the level statement allow you to perform the following tasks when
configuring the following optional level-specific properties:
• Configuring the IS-IS Metric Value Used for Traffic Engineering on page 391
• Configuring the Designated Router Priority for IS-IS on page 391
• Advertising Interface Addresses Without Running IS-IS on page 392
disable;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
Enabling IS-IS on an interface (by including the interface statement at the [edit protocols
isis] hierarchy level), disabling it (by including the disable statement), and not actually
having IS-IS run on an interface (by including the passive statement) are mutually
exclusive states.
On SONET/SDH interface so-0/0/0, enable IS-IS for Level 1 only. With this configuration,
tracing messages periodically indicate that IS-IS is creating Level 2 link-state PDUs.
However, because IS-IS for Level 2 is disabled, these link-state PDUs are never distributed
to neighboring routers.
protocols {
isis {
traceoptions {
file isis size 1m files 10;
flag spf;
flag lsp;
flag error;
}
interface so-0/0/0 {
level 2 {
disable;
}
}
}
}
passive;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
Enabling IS-IS on an interface (by including the interface statement at the [edit protocols
isis] hierarchy level), disabling it (by including the interface disable statement), and not
actually having IS-IS run on an interface (by including the passive statement) are mutually
exclusive states.
NOTE: If neither passive mode nor family ISO are configured on the IS-IS
interface, then the routing device treats the interface as not being operational
and no direct IPv4/IPv6 routes are exported into IS-IS.
To enable hello authentication for an IS-IS level on an interface and define the password,
include the hello-authentication-type and hello-authentication-key statements. To
configure hitless authentication key rollover, include the hello-authentication-key-chain
statement:
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
To modify how often the routing device sends hello packets out of an interface, include
the hello-interval statement:
hello-interval seconds;
You can send out hello packets in sub-second intervals. To send out hello packets every
333 milliseconds, set the hello-interval value to 1.
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
Configuring the Delay Before IS-IS Neighbors Mark the Routing Device as Down
The hold time specifies how long a neighbor should consider this routing device to be
operative without receiving another hello packet. If the neighbor does not receive a hello
packet from this routing device within the hold time, it marks the routing device as being
unavailable. The default hold-time value is three times the default hello interval: 9 seconds
for a DIS router and 27 seconds for a non-DIS router.
To modify the hold-time value on the local routing device, include the hold-time statement:
hold-time seconds;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
metric metric;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
For more information about IS-IS interface metrics, see “Configuring the Reference
Bandwidth Used in IS-IS Metric Calculations” on page 392.
te-metric metric;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
router for the network. This routing device is responsible for sending network link-state
advertisements, which describe all the routing devices attached to the network. These
advertisements are flooded throughout a single area.
A routing device’s priority for becoming the designated router is indicated by an arbitrary
number from 0 through 127; routing devices with a higher value are more likely to become
the designated router. By default, routing devices have a priority value of 64.
priority number;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
passive;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
All IS-IS interfaces have a cost, which is a routing metric that is used in the IS-IS link-state
calculation. Routes with lower total path metrics are preferred over those with higher
path metrics. When there are several equal-cost routes to a destination, traffic is
distributed equally among them.
The cost of a route is described by a single dimensionless metric that is determined using
the following formula:
cost = reference-bandwidth/bandwidth
reference-bandwidth reference-bandwidth;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
For example, if you set the reference bandwidth to 1 Gbps (that is, reference-bandwidth
is set to 1,000,000,000), a 100-Mbps interface has a default metric of 10.
For more information about IS-IS route metrics, see “Configuring the Metric Value for
IS-IS Routes” on page 391.
By default, IS-IS advertises a maximum of three areas in the IS-IS hello (IIH) PDUs and
link-state PDUs. To advertise more than three ISO network addresses for a router, include
the max-areas statement:
max-areas number;
The range that you can configure is from 3 through 36, and the default is 3. This value is
included in the Maximum Address Area field of the IS-IS common PDU header included
in all outgoing PDUs.
For a list of hierarchy levels at which you an configure this statement, see the statement
summary section for this statement.
Normally, IS-IS metrics can have values up to 63, and IS-IS generates two type length
values (TLVs), one for an IS-IS adjacency and the second for an IP prefix. To allow IS-IS
to support traffic engineering, a second pair of TLVs has been added to IS-IS, one for IP
prefixes and the second for IS-IS adjacency and traffic engineering information. With
24
these TLVs, IS-IS metrics can have values up to 16,777,215 (2 – 1).
By default, the Junos OS supports the sending and receiving of wide metrics. The Junos
OS allows a maximum metric value of 63 and generates both pairs of TLVs. To configure
IS-IS to generate only the new pair of TLVs and thus to allow the wider range of metric
values, include the wide-metrics-only statement:
wide-metrics-only;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
Route preferences are used to select which route is installed in the forwarding table when
several protocols calculate routes to the same destination. The route with the lowest
preference value is selected. For more information about route preferences, see “Route
Preferences Overview” on page 6.
By default, Level 1 IS-IS internal routes have a preference value of 15, Level 2 IS-IS internal
routes have a preference of 18, Level 1 IS-IS external routes have a preference of 160, and
Level 2 external routes have a preference of 165. To change the preference values, include
the preference statement (for internal routes) or the external-preference statement:
external-preference preference;
preference preference;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
32
The preference value can range from 0 through 4,294,967,295 (2 – 1).
By default, there is no limit to the number of prefixes that can be exported into IS-IS. To
configure a limit to the number of prefixes that can be exported into IS-IS, include the
prefix-export-limit statement:
prefix-export-limit number;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
By default, link-state PDUs are maintained in network databases for 1200 seconds
(20 minutes) before being considered invalid. This length of time, called the LSP lifetime,
normally is sufficient to guarantee that link-state PDUs never expire.
lsp-lifetime seconds;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
The link-state PDU refresh interval is derived from the link-state PDU lifetime and is equal
to the lifetime minus 317 seconds.
You can advertise label-switched paths into IS-IS as point-to-point links, and the
label-switched paths can be used in SPF calculations. The advertisement contains a
local address (the from address of the label-switched path), a remote address (the to
address of the label-switched path), and a metric with the following precedence:
• Use the label-switched path metric configured for the label-switched path under MPLS.
• If you do not configure any of the above, use the default IS-IS metric of 10.
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
If the time elapsed after the IS-IS instance is enabled is less than the specified timeout,
overload mode is set.
You configure or disable overload mode in IS-IS with or without a timeout. Without a
timeout, overload mode is set until it is explicitly deleted from the configuration. With a
timeout, overload mode is set if the time elapsed since the IS-IS instance started is less
than the specified timeout.
A timer is started for the difference between the timeout and the time elapsed since the
instance started. When the timer expires, overload mode is cleared. In overload mode,
the routing device IS-IS advertisements are originated with the overload bit set. This
causes the transit traffic to avoid the overloaded routing device and take paths around
the routing device. However, the overloaded routing device’s own links are still accessible.
In overload mode, the routing device advertisement is originated with all the transit routing
device links (except stub) set to a metric of 0xFFFF. The stub routing device links are
advertised with the actual cost of the interfaces corresponding to the stub. This causes
the transit traffic to avoid the overloaded routing device and take paths around the routing
device. However, the overloaded routing device’s own links are still accessible.
You can configure the local routing device so that it appears to be overloaded. You might
want to do this when you want the routing device to participate in IS-IS routing, but do
not want it to be used for transit traffic. (Note that traffic to immediately attached
interfaces continues to transit the routing device.) To mark the routing device as
overloaded, include the overload statement:
overload {
advertise-high-metrics;
allow-route-leaking;
timeout seconds;
}
advertise-high-metrics;
When you configure the advertise-high-metrics option, the routing device in overload
mode stops passing (leaking) route information into the network. So, an L1-L2 router in
overload mode stops passing route information between L1 and L2 levels and clears its
attached bit when the advertise-high-metrics option is configured.
To allow route information to pass (leak) into the network when the routing device is in
overload mode, include the allow-route-leaking option when specifying the overload
statement:
allow-route-leaking;
NOTE: The allow-route-leaking option will not work if the routing device is in
dynamic overload mode. Dynamic overload can occur if the device has
exceeded its resource limits, such as the prefix limit.
To specify the number of seconds at which overload is reset, include the timeout option
when specifying the overload statement:
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
• The delay in the time between the detection of a topology change and when the SPF
algorithm actually runs.
• The maximum number of times that the SPF algorithm can run in succession before
the hold-down timer begins.
• The time to hold down, or wait, before running another SPF calculation after the SPF
algorithm has run in succession the configured maximum number of times.
spf-options {
delay milliseconds;
holddown milliseconds;
rapid-runs number;
}
To configure the SPF delay, include the delay statement when specifying the spf-options
statement:
delay milliseconds;
By default, the SPF algorithm runs 200 milliseconds after the detection of a topology
change. The range that you can configure is from 50 through 1000 milliseconds.
To configure the maximum number of times that the SPF algorithm can run in succession,
include the rapid-runs statement when specifying the spf-options statement:
rapid-runs number;
The default number of SPF calculations that can occur in succession is 3. The range that
you can configure is from 1 through 5. Each SPF algorithm is run after the configured SPF
delay. When the maximum number of SPF calculations occurs, the hold-down timer
begins. Any subsequent SPF calculation is not run until the hold-down timer expires.
To configure the SPF hold-down timer, include the holddown statement when specifying
the spf-options statement:
holddown milliseconds;
The default is 5000 milliseconds, and the range that you can configure is from 2000
through 10,000 milliseconds. Use the hold-down timer to hold down, or wait, before
running any subsequent SPF calculations after the SPF algorithm runs for the configured
maximum number of times. If the network stabilizes during the hold-down period and
the SPF algorithm does not need to run again, the system reverts to the configured values
for the delay and rapid-runs statements.
Graceful restart allows a routing device to restart with minimal effects to the network,
and is enabled globally for all routing protocols at the [edit routing-options] hierarchy
level. When graceful restart for IS-IS is enabled, the restarting routing device is not
removed from the network topology during the restart period. The adjacencies are
reestablished after restart is complete.
You can configure graceful restart parameters specifically for IS-IS. To do this, include
the graceful-restart statement:
graceful-restart {
helper-disable;
restart-duration seconds;
}
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
To disable graceful restart for IS-IS, specify the disable statement. Helper mode is enabled
by default. To disable the graceful restart helper capability, specify the helper-disable
statement. To configure a time period for complete restart, specify the restart-duration
statement. You can specify a number between 1 and 3600. The default value is
90 seconds.
IS-IS does not support multipoint configurations. Therefore, when configuring Frame
Relay or Asynchronous Transfer Mode (ATM) networks, you must configure them as
collections of point-to-point links, not as multipoint clouds.
If you enable IS-IS traffic engineering shortcuts and if there is a label-switched path to
a point along the path to that prefix, IS-IS installs the prefix in the inet.3 routing table and
uses the LSP as a next hop. The net result is that for BGP egress routers for which there
is no LSP, BGP automatically uses an LSP along the path to reach the egress router.
In Junos OS Release 9.3 and later, IS-IS traffic engineering shortcuts support IPv6 routes.
LSPs to be used for shortcuts continue to be signaled using IPv4. However, by default,
shortcut routes calculated through IPv6 routes are added to the inet6.3 routing table.
The default behavior is for only BGP to use LSPs in its calculations. If you configure MPLS
so that both BGP and interior gateway protocols use LSPs for forwarding traffic, shortcut
routes calculated through IPv6 are added to the inet6.0 routing table. IS-IS ensures that
the IPv6 routes running over the IPv4 MPLS LSP are correctly de-encapsulated at the
tunnel egress by pushing an extra IPv6 explicit null label between the IPv6 payload and
the IPv4 transport label.
RSVP LSPs with a higher preference than IS-IS routes are not considered during the
computation of traffic engineering shortcuts.
traffic-engineering {
family inet {
shortcuts;
}
}
family inet6 {
shortcuts;
}
}
For IPv4 traffic, include the inet statement. For IPv6 traffic, include the inet6 statement.
To ignore the metric of RSVP LSPs in shortcut decisions, include the ignore-lsp-metrics
statement:
traffic-engineering {
ignore-lsp-metrics;
}
This option avoids mutual dependency between IS-IS and RSVP, eliminating the time
period when the RSVP metric used for shortcuts is not up to date.
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
Because the inet.3 routing table is present only on ingress routers, you can configure LSP
shortcuts only on these routers.
For more information about configuring LSPs and MPLS, see the Junos OS MPLS
Applications Configuration Guide.
To configure IS-IS to ignore the metric of RSVP LSPs, include the ignore-lsp-metrics
statement:
traffic-engineering {
ignore-lsp-metrics;
}
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
For more information about configuring LSPs and MPLS, see the Junos OS MPLS
Applications Configuration Guide.
traffic-engineering {
disable;
}
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
To install routes into the multicast routing table for RPF checks, include the
multicast-rpf-routes statement:
traffic-engineering {
family inet {
shortcuts {
multicast-rpf-routes;
}
}
}
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
Configuring IS-IS to Use Protocol Preference to Determine the Traffic Engineering Database
Credibility Value
By default, the Junos OS prefers IS-IS routes in the traffic engineering database over
other IGP routes even if the routes of another IGP are configured with a lower, that is,
more preferred, preference value. The traffic engineering database assigns a credibility
value to each IGP and prefers the routes of the IGP with the highest credibility value. In
Junos OS Release 9.4 and later, you can configure IS-IS to take protocol preference into
account to determine the traffic engineering database credibility value. When protocol
preference is used to determine the credibility value, IS-IS routes are not automatically
preferred by the traffic engineering database, depending on your configuration. For
example, OSPF routes have a default preference value of 10, while IS-IS Level 1 routes
have a default preference value of 15. When protocol preference is enabled, the credibility
value is determined by deducting the protocol preference value from a base value of 512.
Using default protocol preference values, OSPF has a credibility value of 502, while IS-IS
has a credibility value of 497. Because the traffic engineering database prefers IGP routes
with the highest credibility value, OSPF routes are now preferred.
NOTE: This feature is also supported for OSPFv2. For more information, see
“Example: Enabling OSPF Traffic Engineering Support” on page 650.
To configure IS-IS to use the configured protocol preference for IGP routes to determine
the traffic engineering database credibility value, include the credibility-protocol-preference
statement at the [edit protocols isis traffic-engineering] hierarchy level:
loose-authentication-check;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
A hold-down timer delays the advertising of adjacencies by waiting until a time period
has elapsed before labeling adjacencies in the up state. You can disable this hold-down
timer, which labels adjacencies up faster. However, disabling the hold-down timer creates
more frequent link-state PDU updates and SPF computation.
no-adjacency-holddown;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
adjacency UP state when one routing device’s MTU does not meet the requirements to
establish the adjacency.
As an OSI Layer 2 protocol, IS-IS does not support data fragmentation. Therefore,
maximum packet sizes must be established and supported between two routers. During
adjacency establishment, the IS-IS protocol makes sure that the link supports a packet
size of 1,492 bytes by padding outgoing hello packets up to the maximum packet size of
1,492 bytes.
• Adaptive padding. On point-to-point connections, the hello packets are padded from
the initial detection of a new neighbor until the neighbor verifies the adjacency as Up
in the adjacency state TLV. If the neighbor does not support the adjacency state TLV,
then padding continues. On LAN connections, padding starts from the initial detection
of a new neighbor until there is at least one active adjacency on the interface. Adaptive
padding has more overhead than loose padding and is able to detect MTU asymmetry
from one side of the connection. This one-sided detection may result in generation of
extra LSPs that are flooded throughout the network. Specify the adaptive option to
configure enough padding to establish an adjacency to neighbors.
• Loose padding (the default). The hello packet is padded from the initial detection of
a new neighbor until the adjacency transitions to the Up state. Loose padding may not
be able to detect certain situations such as asymmetrical MTUs between the routing
devices. Specify the loose option to configure enough padding to initialize an adjacency
to neighbors.
• Strict padding. Padding is done on all interface types and for all adjacency states, and
is continuous. Strict padding has the most overhead. The advantage is that strict
padding detects MTU issues on both sides of a link. Specify the strict option to configure
padding to allow all adjacency states with neighbors.
For a list of hierarchy levels at which you can include this statement, see the statement
summary sections for this statement.
You can use IS-IS as the IGP to carry ISO CLNS routes through a network.
clns-routing;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
You can configure a pure CLNS network by disabling IPv4 and IPv6 for IS-IS.
no-ipv4-routing;
no-ipv6-routing;
For a list of hierarchy levels at which you can include these statements, see the statement
summary section for these statements.
You can export BGP routes into Layer 2 IS-IS by configuring an export policy and applying
the policy to IS-IS. You can export BGP routes from a specific VRF instance into IS-IS by
configuring and applying an export policy at the [edit routing-instance instance-name
protocols isis] hierarchy level. ES-IS routes from one routing instance cannot be exported
into a Layer 1 IS-IS area of another routing instance.
To configure an export policy to export BGP routes into IS-IS, include the policy-statement
statement:
policy-statement policy-name {
from {
protocol bgp;
family iso;
}
then {
accept;
}
}
To apply an export policy, include the export statement at the [edit protocols isis] hierarchy
level:
export policy-name;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for these statements.
For more information on policy configuration, see the Junos OS Routing Policy Configuration
Guide.
You can also export routes from protocols other than BGP into IS-IS. ES-IS routes are
exported to IS-IS by default. You can export ES-IS routes into IS-IS by configuring a
routing policy.
policy-options {
policy-statement dist-bgp {
from {
protocol bgp;
family iso;
}
then accept;
}
policy-statement dist-static {
from {
protocol static;
family iso;
}
then accept;
}
}
protocols {
isis {
traceoptions {
file isis size 5m world-readable;
flag error;
}
export dist-static;
no-ipv6-routing;
no-ipv4-routing;
clns-routing;
interface fe-0/0/1.0;
interface t1-0/2/1.0;
interface fxp0.0 {
disable;
}
interface lo0.0;
}
}
routing-instances {
aaaa {
instance-type vrf;
interface lo0.1;
interface t1-3/0/0.0;
interface fe-5/0/1.0;
route-distinguisher 10.245.245.1:1;
vrf-target target:11111:1;
protocols {
isis {
export dist-bgp;
no-ipv4-routing;
no-ipv6-routing;
clns-routing;
interface all;
}
}
}
Disabling IS-IS
To disable IS-IS on the routing device without removing the IS-IS configuration statements
from the configuration, include the disable statement:
isis {
disable;
}
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
[edit protocols]
user@host# delete isis disable
[edit protocols]
user@host# show
isis;
You can disable IP version 4 (IPv4) routing for IS-IS. Disabling IPv4 routing results in the
following:
• Routing device does not advertise the NLPID for IPv4 in Junos OS 0th link-state PDU
fragment.
• Routing device does not advertise any IPv4 prefixes in Junos OS link-state PDUs.
• Routing device does not advertise the NLPID for IPv4 in Junos OS hello packets.
• Routing device does not advertise any IPv4 addresses in Junos OS hello packets.
To disable IPv4 routing on the routing device, include the no-ipv4-routing statement:
isis {
no-ipv4-routing;
}
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
[edit protocols]
user@host# delete isis no-ipv4-routing
You can disable IP version 6 (IPv6) routing for IS-IS. Disabling IPv6 routing results in the
following:
• Routing device does not advertise the NLPID for IPv6 in Junos OS 0th link-state PDU
fragment.
• Routing device does not advertise any IPv6 prefixes in Junos OS link-state PDUs.
• Routing device does not advertise the NLPID for IPv6 in Junos OS hello packets.
• Routing device does not advertise any IPv6 addresses in Junos OS hello packets.
To disable IPv6 routing on the routing device, include the no-ipv6-routing statement:
isis {
no-ipv6-routing;
}
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
[edit protocols]
user@host# delete isis no-ipv6-routing
All routing protocols store the routes that they learn in the routing table. The routing table
uses this collected route information to determine the active routes to destinations. The
routing table then installs the active routes into its forwarding table and exports them
into the routing protocols. It is these exported routes that the protocols advertise.
For each protocol, you control which routes the protocol stores in the routing table and
which routes the routing table exports into the protocol from the routing table by defining
a routing policy for that protocol. For information about defining routing policy, see the
Junos OS Routing Policy Configuration Guide.
To apply routing policies that affect how the routing protocol process (rpd) exports
routes into IS-IS, include the export statement:
export [ policy-names ];
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
NOTE: For IS-IS, you cannot apply routing policies that affect how routes are
imported into the routing table; doing so with a link-state protocol can easily
lead to an inconsistent topology database.
policy-options {
policy-statement usc-hosts-only {
term first {
from {
route-filter 128.125.0.0/16 upto /31;
}
then reject;
}
then accept;
}
}
protocols {
isis {
export usc-hosts-only;
}
}
Define a policy that takes BGP routes from the Edu community and places them into
IS-IS with a metric of 14. Apply the policy to routes exported from the routing table into
IS-IS:
protocols {
isis {
export edu-to-isis;
}
}
policy-options {
community Edu members 666:5;
policy-statement edu-to-isis {
from {
protocol bgp;
community Edu;
}
to protocol isis;
then metric 14;
}
}
Define a policy that rejects all IS-IS Level 1 routes so that none are exported into IS-IS:
policy-options {
policy-statement level1 {
term first {
from level 1;
then reject;
}
then accept;
}
}
protocols {
isis {
export level1;
interface fxp0;
}
}
Define a routing policy to export IS-IS Level 1 internal-only routes into Level 2:
[edit]
protocols {
isis {
export L1-L2;
}
}
policy-statement L1-L2 {
term one {
from {
level 1;
external;
}
then reject;
}
term two {
from level 1;
to level 2;
then accept;
}
}
[edit]
protocols {
isis {
export L2-L1;
}
}
policy-statement L2-L1 {
term one {
from level 2;
to level 1;
then accept;
}
}
Installing a Default Route to the Nearest Routing Device That Operates at Both IS-IS
Levels
When a routing device that operates as both a Level 1 and Level 2 router (Router B)
determines that it can reach at least one area other than its own (for example, in Area
Y), it sets the ATTACHED bit in its Level LSP. Thereafter, the Level 1 router (Router A)
introduces a default route pointing to the nearest attached routing device that operates
as both a Level 1 and Level 2 router (Router B). See Figure 10 on page 409.
Figure 10: Install Default Route to Nearest Routing Device That Operates
at Both
Level 1 and Level 2
In Junos OS Release 9.5 and later, support for IS-IS loop-free alternate routes enables
IP fast-reroute capability for IS-IS. The Junos OS precomputes loop-free backup routes
for all IS-IS routes. These backup routes are preinstalled in the Packet Forwarding Engine,
which performs a local repair and implements the backup path when the link for a primary
next hop for a particular route is no longer available. With local repair, the Packet
Forwarding Engine can correct a path failure before it receives recomputed paths from
the Routing Engine. Local repair reduces the amount of time needed to reroute traffic to
less than 50 milliseconds. In contrast, global repair can take up to 800 milliseconds to
compute a new route. Local repair and global repair are thus complementary. Local repair
enables traffic to continue to be routed using a backup path until global repair is able to
calculate a new route.
A loop-free path is one that does not forward traffic back through the routing device to
reach a given destination. That is, a neighbor whose shortest path to the destination
traverses the routing device is not used as a backup route to that destination. To determine
loop-free alternate paths for IS-IS routes, the Junos OS runs shortest-path-first (SPF)
calculations on each one-hop neighbor. You can enable support for alternate loop-free
routes on any IS-IS interface. Because it is common practice to enable LDP on an interface
for which IS-IS is already enabled, this feature also provides support for LDP
label-switched paths (LSPs).
The level of backup coverage available through IS-IS routes depends on the actual
network topology and is typically less than 100 percent for all destinations on any given
routing device. You can extend backup coverage to include RSVP LSP paths.
The Junos OS provides two mechanisms for route redundancy for IS-IS through alternate
loop-free routes: link protection and node-link protection. When you enable link protection
or node-link protection on an IS-IS interface, the Junos OS creates an alternate path to
the primary next hop for all destination routes that traverse a protected interface. Link
protection offers per-link traffic protection. Use link protection when you assume that
only a single link might become unavailable but that the neighboring node on the primary
path would still be available through another interface.
In Figure 11 on page 410, Case 1 shows how link protection allows source Router A to switch
to Link B when the primary next hop Link A to destination Router C fails. However, if
Router B fails, Link B also fails, and the protected Link A is lost. If node-link protection is
enabled, Router A is able to switch to Link D on Router D and bypass the failed Router B
altogether. As shown in Case 2, with node-link protection enabled, Router A has a
node-link protection alternate path available through Router D to destination Router C.
That means that if Router B fails, Router A can still reach Router C because the path from
Router A to Link D remains available as an alternate backup path.
Figure 11: Link Protection and Node-Link Protection Comparison for IS-IS
Routes
D
Link D Link E
Link A
X
A B C
Link C
Link B
Link protection alternate path
X
D
Link D Link E
Link A
X
A B C
Link C
Link B
g017299
The Junos OS implementation of support for loop-free alternate paths for IS-IS routes
is based on the following standards:
To enable link protection, include the link-protection statement at the [edit protocols isis
interface interface-name] hierarchy level:
[edit]
protocols {
isis {
interface interface-name:
link-protection;
}
}
}
[edit]
protocols {
isis {
interface interface-name:
node-link-protection;
}
}
}
[edit]
protocols {
isis {
interface interface-name {
no-eligible-backup;
}
}
}
[edit]
protocols {
mpls {
label-switched-path lsp-name {
backup;
to ip-address;
}
}
When configuring an LSP, you must specify the IP address of the egress routing device
with the to statement. For detailed information about configuring LSPs and RSVP, see
the Junos OS MPLS Applications Configuration Guide.
• show isis backup label-switched-path—Displays which MPLS LSPs have been designated
as backup paths and the current status of those LSPs.
• show isis backup spf results—Displays SPF calculations for each neighbor for a given
destination. Indicates whether a specific interface or node has been designated as a
backup path and why. Use the no-coverage option to display only those nodes that do
not have backup coverage.
• show isis backup coverage—Displays the percentage of nodes and prefixes for each
type of address family that are protected.
• show isis interface detail—Displays the type of protection (link or node-link) applied
to each protected interface.
For more detailed information about these commands, see the Junos OS Routing Protocols
and Policies Command Reference.
You also need to configure a routing policy that requires all traffic to use per-packet load
balancing in order to enable Packet Forwarding Engine local repair. With local repair, the
Packet Forwarding Engine can correct a path failure and implement a backup loop-free
alternate route before it receives recomputed paths from the Routing Engine.
Configure the interfaces. Enable IS-IS and MPLS. In this example, the interfaces are also
enabled for both IPv4 and IPv6 traffic.
[edit interfaces]
ge-2/0/0 {
unit 0 {
family inet {
address 11.14.0.1/30;
}
family iso;
family inet6;
family mpls;
}
}
ge-2/0/1 {
unit 0 {
family inet {
address 11.14.1.1/30;
}
family iso;
family inet6;
family mpls;
}
}
so-3/0/1 {
unit 0 {
family inet {
address 11.16.1.1/30;
}
family iso;
family inet6;
family mpls;
}
}
so-3/0/2 {
unit 0 {
family inet {
address 11.16.0.1/30;
}
family iso;
family inet6;
family mpls;
}
}
so-6/0/0 {
unit 0 {
family inet {
address 11.12.0.1/30;
}
family iso;
family inet6;
family mpls;
}
}
Configure the IS-IS interfaces for Level 2 only, and configure MPLS to use both RSVP and
LDP label-switched paths (LSPs). Enable IS-IS node-link protection, which also
automatically extends backup coverage to all LDP LSPs.
[edit protocols]
rsvp {
interface all;
interface fxp0.0 {
disable;
}
}
mpls {
interface all;
interface fxp0.0 {
disable;
}
}
isis {
interface all {
node-link-protection; # Enable node-link protection on all IS-IS interfaces.
# Protection is automatically extended to all LDP LSPs.
level 2 metric 10;
level 1 disable;
}
interface fxp0.0 {
disable;
}
interface lo0.0 {
level 2 metric 0;
}
}
ldp {
deaggregate; # Enable forwarding equivalence class deaggregation, which results in
faster global convergence.
interface all;
interface fxp0.0 {
disable;
}
}
To enable Packet Forwarding Engine local repair, establish a policy that forces the routing
protocol process to install all the next hops for a given route. This policy ensures that the
backup route is installed in the forwarding table used by the Packet Forwarding Engine
to forward traffic to a given destination. After this policy is configured, export it to the
forwarding table of the local routerwith the export statement at the [edit routing-options
forwarding-table] hierarchy level.
[edit policy-options]
policy-statement ecmp {
term 1 {
then {
load-balance per-packet;
}
}
}
[edit routing-options]
forwarding-table {
export ecmp;
}
Disabling Adjacency Down and Neighbor Down Notification in IS-IS and OSPF
Whenever IS-IS is deactivated, the IS-IS adjacencies are brought down. IS-IS signals to
RSVP to bring down any RSVP neighbors associated with the IS-IS adjacencies, and this
further causes the associated LSPs signaled by RSVP to go down as well.
A similar process occurs whenever OSPF is deactivated. The OSPF neighbors are brought
down. OSPF signals to RSVP to bring down any of the RSVP neighbors associated with
the OSPF neighbors, and this further causes the associated LSPs signaled by RSVP to
go down as well.
If you need to migrate from IS-IS to OSPF or from OSPF to IS-IS, the IGP notification to
RSVP for an adjacency or neighbor down event needs to be ignored. Using the
no-adjacency-down-notification or no-neighbor-down-notification statements, you can
disable IS-IS adjacency down notification or OSPF neighbor down notification,
respectively, until the migration is complete. The network administrator is responsible
for configuring the statements before the migration, and then removing them from the
configuration afterward, so that IGP notification can function normally.
no-adjacency-down-notification;
no-neighbor-down-notification;
You can trace various types of IS-IS protocol traffic to help debug IS-IS protocol issues.
To trace IS-IS protocol traffic include the traceoptions statement at the [edit protocols
isis] hierarchy level:
traceoptions {
file filename <files number> <size size> <world-readable | no-world-readable>;
flag flag <flag-modifier> <disable>;
}
You can specify the following IS-IS protocol-specific trace options using the flag
statement:
• error—Errored packets
• hello—Hello packets
You can optionally specify one or more of the following flag modifiers:
NOTE: Use the flag modifier detail with caution as this may cause the CPU
to become very busy.
Global tracing options are inherited from the configuration set by the traceoptions
statement at the [edit routing-options] hierarchy level. You can override the following
global trace options for the IS-IS protocol using the traceoptions flag statement included
at the [edit protocols isis] hierarchy level:
• general—All normal operations and routing table changes (a combination of the normal
and route trace operations)
• normal—Normal events
• policy—Policy processing
• route—Routing information
• state—State transitions
NOTE: Use the trace flag all with caution as this may cause the CPU to
become very busy.
[edit]
protocols {
isis {
traceoptions {
file isis-log size 1m files 10;
flag spf;
flag lsp;
flag error;
flag normal;
}
}
}
Trace only unusual or abnormal operations to the file routing-log, and trace detailed
information about all IS-IS packets to the file isis-log:
[edit]
routing-options {
traceoptions {
file routing-log;
}
}
protocols {
isis {
traceoptions {
file isis-log size 10k files 5;
flag csn detail;
flag hello detail;
flag lsp detail;
flag psn detail;
}
}
}
[edit]
protocols {
isis {
traceoptions {
file isis-log;
flag lsp detail;
}
}
}
IS-IS LSP packets that contain errors are discarded by default. To log these errors, specify
the error tracing operation:
[edit]
protocols {
isis {
traceoptions {
file isis-log;
flag error;
}
}
}
This example shows how to configure an IS-IS network by using multiple logical systems
that are running on a single physical router. The logical systems are connected by logical
tunnel interfaces.
Requirements
You must connect the logical systems by using logical tunnel (lt) interfaces. See Example:
Connecting Logical Systems Within the Same Router Using Logical Tunnel Interfaces.
Overview
This example shows an IS-IS configuration with three logical systems running on one
physical router. Each logical system has its own routing table. The configuration enables
the protocol on all logical tunnel interfaces that participate in the IS-IS domain.
Configuration
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
1. Configure the logical tunnel interface on Logical System LS1 connecting to Logical
System LS2.
2. Configure the logical tunnel interface on Logical System LS1 connecting to Logical
System LS3.
3. Configure the logical tunnel interface on Logical System LS2 connecting to Logical
System LS1.
4. Configure the logical tunnel interface on Logical System LS2 connecting to Logical
System LS3.
5. Configure the logical tunnel interface on Logical System LS3 connecting to Logical
System LS2.
6. Configure the logical tunnel interface on Logical System LS3 connecting to Logical
System LS1.
7. Configure the ISO address on the loopback interface for the three logical systems.
[edit]
user@host# commit
family inet {
address 10.0.2.2/30;
}
family iso;
}
}
lo0 {
unit 2 {
family iso {
address 49.0001.1720.1600.2002.00;
}
}
}
}
protocols {
isis {
interface lt-0/1/0.1;
interface lt-0/1/0.4;
interface lo0.2 {
passive;
}
}
}
}
LS3 {
interfaces {
lt-0/1/0 {
unit 3 {
description LS3->LS2;
encapsulation ethernet;
peer-unit 4;
family inet {
address 10.0.2.1/30;
}
family iso;
}
unit 5 {
description LS3->LS1;
encapsulation ethernet;
peer-unit 0;
family inet {
address 10.0.1.1/30;
}
family iso;
}
}
lo0 {
unit 3 {
family iso {
address 49.0001.1234.1600.2231.00;
}
}
}
}
protocols {
isis {
interface lt-0/1/0.3;
interface lt-0/1/0.5;
interface lo0.3 {
passive;
}
}
}
}
Verification
Confirm that the configuration is working properly.
Purpose Make sure that the IS-IS adjacencies are established by checking the logical system
routing entries and by pinging the logical systems.
49.0001.1720.1600.1001/72
*[Direct/0] 3w0d 01:37:52
> via lo0.1
49.0001.1720.1600.2002/72
*[Direct/0] 3w0d 01:38:01
> via lo0.2
49.0001.1234.1600.2231/72
*[Direct/0] 3w0d 01:38:11
> via lo0.3
This example shows logical systems configured on a single physical router and explains
how to configure a default route on one logical system.
Requirements
Before you begin:
• Connect the logical systems by using logical tunnel (lt) interfaces. See Example:
Connecting Logical Systems Within the Same Router Using Logical Tunnel Interfaces.
• Enable IS-IS on the interfaces. See “Example: Configuring IS-IS on Logical Systems
Within the Same Router” on page 419.
Overview
This example shows a logical system redistributing a default route to other logical systems.
All logical systems are running IS-IS. A common reason for a default route is to provide
a path for sending traffic destined outside the IS-IS domain.
In this example, the default route is not used for forwarding traffic. The no-install
statement prevents the route from being installed in the forwarding table of Logical
System LS3. If you configure a route so it is not installed in the forwarding table, the route
is still eligible to be exported from the routing table to other protocols. The discard
statement silently drops packets without notice.
Configuration
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
[edit]
user@host# commit
Results Confirm your configuration by issuing the show logical-systems LS3 command.
}
routing-options {
static {
route 0.0.0.0/0 {
discard;
no-install;
}
}
}
}
Verification
Confirm that the configuration is working properly.
Purpose Make sure that the IS-IS policy is working by checking the routing tables.
49.0001.1234.1600.2231/72
*[Direct/0] 1w0d 10:17:19
> via lo0.3
49.0001.1720.1600.2002/72
*[Direct/0] 1w0d 10:18:12
> via lo0.2
49.0001.1720.1600.1001/72
*[Direct/0] 1w0d 10:18:35
> via lo0.1
Meaning The routing table on Logical System LS3 contains the default 0.0.0.0/0 route from
protocol Static. The routing tables on Logical System LS1 and Logical System LS2 contain
the default 0.0.0.0/0 route from protocol IS-IS. If Logical System LS1 and Logical System
LS2 receive packets destined for networks not specified in their routing tables, those
packets will be sent to Logical System LS3 for further processing. This configuration
assumes that Logical System LS3 has a connection to an ISP or another external network.
The following sections explain each of the IS-IS configuration statements. The statements
are organized alphabetically.
authentication-key
Description Authentication key (password). Neighboring routing devices use the password to verify
the authenticity of packets sent from this interface. For the key to work, you also must
include the authentication-type statement.
All routing devices must use the same password. If you are using the Junos OS IS-IS
software with another implementation of IS-IS, the other implementation must be
configured to use the same password for the domain, the area, and all interfaces adjacent
to the Juniper Networks routing device.
Default If you do not include this statement and the authentication-type statement, IS-IS
authentication is disabled.
authentication-key-chain
Related • Example: Configuring Hitless Authentication Key Rollover for IS-IS on page 350
Documentation
• Overview of Hitless Authentication Key Rollover for IS-IS on page 349
authentication-type
Description Enable authentication and specify the authentication scheme for IS-IS. If you enable
authentication, you must specify a password by including the authentication-key
statement.
Default If you do not include this statement and the authentication-key statement, IS-IS
authentication is disabled.
bfd-liveness-detection
Syntax bfd-liveness-detection {
authentication {
algorithm algorithm-name;
key-chain key-chain-name;
loose-check;
}
detection-time {
threshold milliseconds;
}
minimum-interval milliseconds;
minimum-receive-interval milliseconds;
no-adaptation;
transmit-interval {
threshold milliseconds;
minimum-interval milliseconds;
}
multiplier number;
version (1 | automatic);
}
checksum
Syntax checksum;
Description Enable checksum for packets on this interface. The checksum cannot be enabled with
MD5 hello authentication on the same interface.
clns-routing
Syntax clns-routing;
csnp-interval
Description Configure the interval between complete sequence number (CSN) packets on a LAN
interface.
Related • Configuring the Transmission Frequency for CSNP Packets on IS-IS Interfaces on
Documentation page 369
disable
disable (IS-IS)
Syntax disable;
Description Disable IS-IS on the routing device, on an interface, or on a level. At the [edit protocols
isis traffic-engineering] hierarchy level, disable IS-IS support for traffic engineering.
Enabling IS-IS on an interface (by including the interface statement at the [edit protocols
isis] or the [edit routing-instances routing-instance-name protocols isis] hierarchy level),
disabling it (by including the disable statement), and not actually having IS-IS run on an
interface (by including the passive statement) are mutually exclusive states.
Default IS-IS is enabled for Level 1 and Level 2 routers on all interfaces on which an International
Organization for Standardization (ISO) protocol family is enabled.
export
Description Apply one or more policies to routes being exported from the routing table into IS-IS.
external-preference
family
Description Configure the address family for traffic engineering IS-IS interior gateway protocol (IGP)
shortcuts. Support for IPv6 for IGP shortcuts introduced in Junos OS Release 9.3.
graceful-restart
Syntax graceful-restart {
disable;
helper-disable;
restart-duration seconds;
}
restart-duration seconds—Configure the time period for the restart to last, in seconds.
Range: 30 through 300 seconds
Default: 30 seconds
hello-authentication-key
Description Configure an authentication key (password) for hello packets. Neighboring routing devices
use the password to verify the authenticity of packets sent from an interface. For the key
to work, you also must include the hello-authentication-type statement.
hello-authentication-key-chain
Hierarchy Level [edit logical-systems name protocols isis interface interface-name level level-number],
[edit logical-systems name routing-instances instance-name protocols isis interface
interface-name level level-number],
[edit protocols isis interface interface-name level level-number],
[edit routing-instances instance-name protocols isis interface interface-name level
level-number]
Related • Example: Configuring Hitless Authentication Key Rollover for IS-IS on page 350
Documentation
• Overview of Hitless Authentication Key Rollover for IS-IS on page 349
hello-authentication-type
Hierarchy Level [edit logical-systems logical-system-name protocols isis interface interface-name level
number],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
isis interface interface-name level number],
[edit protocols isis interface interface-name level number],
[edit routing-instances routing-instance-name protocols isis interface interface-name level
number]
Description Enable authentication on an interface for hello packets. If you enable authentication on
hello packets, you must specify a password by including the hello-authentication-key
statement.
hello-interval
Hierarchy Level [edit logical-systems logical-system-name protocols isis interface interface-name level
level-number],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
isis interface interface-name level level-number],
[edit protocols isis interface interface-name level level-number],
[edit routing-instances routing-instance-name protocols isis interface interface-name level
level-number]
Description Frequency with which the routing device sends hello packets out of an interface,
in seconds.
hello-padding
hold-time
hold-time (IS-IS)
Syntax hold-time seconds;
Description Set the length of time a neighbor considers this router to be operative (up) after receiving
a hello packet. If the neighbor does not receiver another hello packet within the specified
time, it marks this routing device as inoperative (down). The hold time itself is advertised
in the hello packets.
Description Configure the time period to advertise the maximum cost metric for a link that is not fully
operational.
ignore-attached-bit
Syntax ignore-attached-bit;
Description Ignore the attached bit on IS-IS Level 1 routers. Configuring this statement allows the
routing device to ignore the attached bit on incoming Level 1 LSPs. If the attached bit is
ignored, no default route, which points to the routing device which has set the attached
bit, is installed.
ignore-lsp-metrics
Syntax ignore-lsp-metrics;
Description Ignore the metrics for RSVP label-switched paths in IS-IS traffic engineering shortcut
calculations or when you configure LDP over RSVP label-switched paths.
interface
Description Configure interface-specific IS-IS properties. To configure more than one interface, include
the interface statement multiple times.
Enabling IS-IS on an interface (by including the interface statement at the [edit protocols
isis] or the [edit routing-instances routing-instance-name protocols isis] hierarchy level),
disabling it (by including the disable statement), and not actually having IS-IS run on an
interface (by including the passive statement) are mutually exclusive states.
ipv4-multicast
Syntax ipv4-multicast;
ipv4-multicast-metric
Description Specify the multicast topology metric value for the level.
ipv6-multicast
Syntax ipv6-multicast;
ipv6-multicast-metric
Hierarchy Level [edit logical-systems logical-system-name protocols isis interface interface-name level
level-number],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
isis interface interface-name level level-number],
[edit protocols isis interface interface-name level level-number],
[edit routing-instances routing-instance-name protocols isis interface interface-name level
level-number]
Description Specify the IPv6 alternate multicast topology metric value for the level.
ipv6-unicast
Syntax ipv6-unicast;
ipv6-unicast-metric
Hierarchy Level [edit logical-systems logical-system-name protocols isis interface interface-name level
level-number],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
isis interface interface-name level level-number],
[edit protocols isis interface interface-name level level-number],
[edit routing-instances routing-instance-name protocols isis interface interface-name level
level-number]
Description Specify the IPv6 unicast topology metric value for the level.
isis
Description Enable IS-IS routing on the routing device or for a routing instance.
The isis statement is the one statement you must include in the configuration to run IS-IS
on the routing device or in a routing instance.
label-switched-path
Description Advertise LSPs into IS-IS as point-to-point links. The LSP is advertised in the appropriate
IS-IS levels as a point-to-point link and contains a local address and a remote address.
metric—Metric value.
Range: 1 through 63, or 1 through 16,777,215 (if you have configured wide metrics)
Default: 0 (for lo0), 10 (for all other interfaces)
-synchronization
Syntax ldp-synchronization {
disable;
hold-time seconds;
}
Description Enable synchronization by advertising the maximum cost metric until LDP is operational
on the link.
Related • Example: Configuring Synchronization Between LDP and IGPs on page 583
Documentation
level
Description Configure the IS-IS level. You can configure one instance of Level 1 routing and one
instance of Level 2 routing on each interface, and you can configure the two levels
differently.
link-protection
Syntax link-protection;
Description Enable link protection on the specified IS-IS interface. The Junos OS creates a backup
loop-free alternate path to the primary next hop for all destination routes that traverse
the protected interface.
loose-authentication-check
Syntax loose-authentication-check;
Description Allow the use of MD5 authentication without requiring network-wide deployment.
Related • Enabling Authentication for IS-IS Without Network-Wide Deployment on page 401
Documentation
lsp-interval
Related • Configuring the Transmission Frequency for Link-State PDUs on IS-IS Interfaces on
Documentation page 370
lsp-lifetime
Description Specify how long a link-state PDU originating from the routing device should persist in
the network. The routing device sends link-state PDUs often enough so that the link-state
PDU lifetime never expires.
max-areas
Options number—Maximum number of areas to include in the IS-IS hello (IIH) PDUs and link-state
PDUs.
Range: 3 through 36
Default: 3
mesh-group
Description Configure an interface to be part of a mesh group, which is a set of fully connected nodes.
Options blocked—Configure the interface so that it does not flood link-state PDU packets.
metric
Hierarchy Level [edit logical-systems logical-system-name protocols isis interface interface-name level
level-number],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
isis interface interface-name level level-number],
[edit protocols isis interface interface-name level level-number],
[edit routing-instances routing-instance-name protocols isis interface interface-name level
level-number]
multicast-rpf-routes
Syntax multicast-rpf-routes;
Hierarchy Level [edit logical-systems logical-system-name protocols isis traffic-engineering family inet
shortcuts],
[edit logical-systems logical-system-name routing-instances traffic-engineering family inet
shortcuts],
[edit protocols isis traffic-engineering family inet shortcuts],
[edit routing-instances routing-instance-name protocols isis traffic-engineering family inet
shortcuts]
Description Install IPv4 routes into the multicast routing table for RPF checks.
Related • Installing IPv4 Routes into the Multicast Routing Table on page 400
Documentation
no-adjacency-down-notification
Syntax no-adjacency-down-notification;
Description Disable adjacency down notification for IS-IS to allow for migration from IS-IS to OSPF
without disruption of the RSVP neighbors and associated RSVP-signaled LSPs.
Related • Disabling Adjacency Down and Neighbor Down Notification in IS-IS and OSPF on
Documentation page 415
no-adjacency-holddown
Syntax no-adjacency-holddown;
Related • Configuring Quicker Advertisement of IS-IS Adjacency State Changes on page 401
Documentation
no-authentication-check
Syntax no-authentication-check;
Description Generate authenticated packets and check the authentication on received packets, but
do not reject packets that cannot be authenticated.
no-csnp-authentication
Syntax no-csnp-authentication;
Description Suppress authentication check on complete sequence number PDU (CSNP) packets.
no-eligible-backup
Syntax no-eligible-backup;
Description Exclude the specified interface as a backup interface for IS-IS interfaces on which link
protection or node-link protection is enabled.
no-hello-authentication
Syntax no-hello-authentication;
no-ipv4-multicast
Syntax no-ipv4-multicast;
no-ipv4-routing
Syntax no-ipv4-routing;
no-ipv6-multicast
Syntax no-ipv6-multicast;
no-ipv6-routing
Syntax no-ipv6-routing;
no-ipv6-unicast
Syntax no-ipv6-unicast;
no-psnp-authentication
Syntax no-psnp-authentication;
Description Suppress authentication check on partial sequence number PDU (PSNP) packets.
no-unicast-topology
Syntax no-unicast-topology;
node-link-protection
Syntax node-ink-protection;
Description Enable node-link protection on the specified IS-IS interface. The Junos OS creates an
alternate loop-free path to the primary next hop for all destination routes that traverse
a protected interface. This alternate path avoids the primary next-hop routing device
altogether and establishes a path through a different routing device.
overload
Syntax overload {
advertise-high-metrics;
allow-route-leaking;
timeout seconds;
}
Description Configure the local routing device so that it appears to be overloaded. You might want
to do this when you want the routing device to participate in IS-IS routing, but do not
want it to be used for transit traffic. Note that traffic to immediately attached interfaces
continues to transit the routing device. You can also advertise maximum link metrics in
network layer reachability information (NLRI) instead of setting the overload bit.
NOTE: If the time elapsed after the IS-IS instance is enabled is less than the
specified timeout, overload mode is set.
NOTE: The allow-route-leaking option will not work if the routing device is in
dynamic overload mode. Dynamic overload can occur if the device has
exceeded its resource limits, such as the prefix limit.
Related • Configuring IS-IS to Make Routing Devices Appear Overloaded on page 395
Documentation
passive
Syntax passive;
Description Advertise the direct interface addresses on an interface or into a level on the interface
without actually running IS-IS on that interface or level.
This statement effectively prevents IS-IS from running on the interface. To enable IS-IS
on an interface, include the interface statement at the [edit protocols isis] or the [edit
routing-instances routing-instance-name protocols isis] hierarchy level. To disable it,
include the disable statement at those hierarchy levels. The three states are mutually
exclusive.
point-to-point
Syntax point-to-point;
preference
prefix-export-limit
priority
Hierarchy Level [edit logical-systems logical-system-name protocols isis interface interface-name level
level-number],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
isis interface interface-name level level-number],
[edit protocols isis interface interface-name level level-number],
[edit routing-instances routing-instance-name protocols isis interface interface-name level
level-number]
Description The interface’s priority for becoming the designated router. The interface with the highest
priority value becomes that level’s designated router.
Related • Configuring the Designated Router Priority for IS-IS on page 391
Documentation
reference-bandwidth
Description Set the reference bandwidth used in calculating the default interface cost. The cost is
calculated using the following formula:
cost = reference-bandwidth/bandwidth
Related • Configuring the Reference Bandwidth Used in IS-IS Metric Calculations on page 392
Documentation
rib-group
Syntax rib-group {
inet group-name;
inet6 group-name;
}
Description Install routes learned from IS-IS routing instances into routing tables in the IS-IS routing
table group. You can install IPv4 routes or IPv6 routes.
Support for IPv6 routing table groups in IS-IS enables IPv6 routes that are learned from
IS-IS routing instances to be installed into other routing tables defined in an IS-IS routing
table group.
shortcuts
Syntax shortcuts {
multicast-rpf-routes;
}
Hierarchy Level [edit logical-systems logical-system-name protocols isis traffic-engineering family (inet |
inet6)],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
isis traffic-engineering family (inet | inet6)],
[edit protocols isis traffic-engineering family (inet | inet6)],
[edit routing-instances routing-instance-name protocols isis traffic-engineering family (inet
| inet6)]
Description Configure IS-IS to use MPLS label-switched paths (LSPs) as next hops if possible when
installing routing information into the inet.3 or inet6.3 routing table.
spf-options
Syntax spf-options {
delay milliseconds;
holddown milliseconds;
rapid-runs number;
}
Description Configure options for running the shortest-path-first (SPF) algorithm. You can configure
a delay for when to run the SPF algorithm after a network topology change is detected,
the maximum number of times the SPF algorithm can run in succession, and a holddown
interval after SPF algorithm runs the maximum number of times.
Options delay milliseconds—Time interval between the detection of a topology change and when
the SPF algorithm runs.
Range: 50 through 1000 milliseconds
Default: 200 milliseconds
rapid-runs number—Maximum number of times the SPF algorithm can run in succession.
After the maximum is reached, the holddown interval begins.
Range: 1 through 5
Default: 3
te-metric
Hierarchy Level [edit logical-systems logical-system-name protocols isis interface interface-name level
level-number],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
isis interface interface-name level level-number],
[edit protocols isis interface interface-name level level-number],
[edit routing-instances routing-instance-name protocols isis interface interface-name level
level-number]
Description Metric value used by traffic engineering for information injected into the traffic engineering
database. The value of the traffic engineering metric does not affect normal IS-IS
forwarding.
topologies
Syntax topologies {
ipv4-multicast;
ipv6-multicast;
ipv6-unicast;
}
traceoptions
Syntax traceoptions {
file name <size size> <files number> <world-readable | no-world-readable>;
flag flag <flag-modifier> <disable>;
}
Description Configure IS-IS protocol-level tracing options. To specify more than one tracing operation,
include multiple flag statements.
Default The default IS-IS protocol-level tracing options are those inherited from the routing
protocols traceoptions statement included at the [edit routing-options] hierarchy level.
Options disable—(Optional) Disable the tracing operation. You can use this option to disable a
single operation when you have defined a broad group of tracing operations, such
as all.
file name—Name of the file to receive the output of the tracing operation. Enclose the
name within quotation marks (“ ”). All files are placed in the directory /var/log. We
recommend that you place IS-IS tracing output in the file isis-log.
files number—(Optional) Maximum number of trace files. When a trace file named
trace-file reaches its maximum size, it is renamed trace-file.0, then trace-file.1, and
so on, until the maximum number of trace files is reached. Then, the oldest trace file
is overwritten.
If you specify a maximum number of files, you also must specify a maximum file size with
the size option.
Range: 2 through 1000 files
Default: 10 files
flag flag—Tracing operation to perform. To specify more than one flag, include multiple
flag statements.
• hello—Hello packets
• spf—Shortest-path-first calculations
Default: If you do not specify this option, only unusual or abnormal operations are traced.
• state—State transitions
flag-modifier—(Optional) Modifier for the tracing flag. You can specify one or more of
these modifiers:
size size—(Optional) Maximum size of each trace file, in kilobytes (KB), megabytes (MB),
or gigabytes (GB). When a trace file named trace-file reaches this size, it is renamed
trace-file.0. When the trace-file again reaches its maximum size, trace-file.0 is renamed
trace-file.1 and trace-file is renamed trace-file.0. This renaming scheme continues
until the maximum number of trace files is reached. Then, the oldest trace file is
overwritten.
Note that if you specify a maximum file size, you also must specify a maximum
number of trace files with the files option.
Syntax: xk to specify KB, xm to specify MB, or xg to specify GB
Range: 10 KB through the maximum file size supported on your system
Default: 128 KB
Required Privilege routing and trace—To view this statement in the configuration.
Level routing-control and trace-control—To add this statement to the configuration.
traffic-engineering
Syntax traffic-engineering {
credibility-protocol-preference;
disable;
family inet;
shortcuts {
multicast-rpf-routes;
}
}
family inet6 {
shortcuts;
}
}
wide-metrics-only
Syntax wide-metrics-only;
Description Configure IS-IS to generate metric values greater than 63 on a per IS-IS level basis.
Introduction to OSPF
This chapter discusses the following topics that provide background information about
OSPF:
OSPF Overview
OSPF is an interior gateway protocol (IGP) that routes packets within a single autonomous
system (AS). OSPF uses link-state information to make routing decisions, making route
calculations using the shortest-path-first (SPF) algorithm (also referred to as the Dijkstra
algorithm). Each router running OSPF floods link-state advertisements throughout the
AS or area that contain information about that router’s attached interfaces and routing
metrics. Each router uses the information in these link-state advertisements to calculate
the least cost path to each network and create a routing table for the protocol.
Junos OS supports OSPF version 2 (OSPFv2) and OSPF version 3 (OSPFv3), including
virtual links, stub areas, and for OSPFv2, authentication. Junos OS does not support
type-of-service (ToS) routing.
OSPF was designed for the Transmission Control Protocol/Internet Protocol (TCP/IP)
environment and as a result explicitly supports IP subnetting and the tagging of externally
derived routing information. OSPF also provides for the authentication of routing updates.
OSPF routes IP packets based solely on the destination IP address contained in the IP
packet header. OSPF quickly detects topological changes, such as when router interfaces
become unavailable, and calculates new loop-free routes quickly and with a minimum
of routing overhead traffic.
An OSPF AS can consist of a single area, or it can be subdivided into multiple areas. In a
single-area OSPF network topology, each router maintains a database that describes
the topology of the AS. Link-state information for each router is flooded throughout the
AS. In a multiarea OSPF topology, each router maintains a database that describes the
topology of its area, and link-state information for each router is flooded throughout that
area. All routers maintain summarized topologies of other areas within an AS. Within
each area, OSPF routers have identical topological databases. When the AS or area
topology changes, OSPF ensures that the contents of all routers’ topological databases
converge quickly.
All OSPFv2 protocol exchanges can be authenticated. OSPFv3 relies on IPsec to provide
this functionality. This means that only trusted routers can participate in the AS’s routing.
A variety of authentication schemes can be used. A single authentication scheme is
configured for each area, which enables some areas to use stricter authentication than
others.
Externally derived routing data (for example, routes learned from BGP) is passed
transparently throughout the AS. This externally derived data is kept separate from the
OSPF link-state data. Each external route can be tagged by the advertising router, enabling
the passing of additional information between routers on the boundaries of the AS.
When a routing device starts, it initializes OSPF and waits for indications from lower-level
protocols that the router interfaces are functional. The routing device then uses the OSPF
hello protocol to acquire neighbors, by sending hello packets to its neighbors and receiving
their hello packets.
The routing device then attempts to form adjacencies with some of its newly acquired
neighbors. (On multiaccess networks, only the designated router and backup designated
router form adjacencies with other routing devices.) Adjacencies determine the distribution
of routing protocol packets. Routing protocol packets are sent and received only on
adjacencies, and topological database updates are sent only along adjacencies. When
adjacencies have been established, pairs of adjacent routers synchronize their topological
databases.
A routing device sends LSA packets to advertise its state periodically and when its state
changes. These packets include information about the routing device’s adjacencies,
which allows detection of nonoperational routing devices.
Using a reliable algorithm, the routing device floods LSAs throughout the area, which
ensures that all routing devices in an area have exactly the same topological database.
Each routing device uses the information in its topological database to calculate a
shortest-path tree, with itself as the root. The routing device then uses this tree to route
network traffic.
The description of the SPF algorithm up to this point has explained how the algorithm
works within a single area (intra-area routing). For internal routers to be able to route to
destinations outside the area (interarea routing), the area border routers must inject
additional routing information into the area. Because the area border routers are
connected to the backbone, they have access to complete topological data about the
backbone. The area border routers use this information to calculate paths to all
destinations outside its area and then advertise these paths to the area’s internal routers.
Autonomous system (AS) boundary routers flood information about external autonomous
systems throughout the AS, except to stub areas. Area border routers are responsible
for advertising the paths to all AS boundary routers.
In Figure 14 on page 496, Router A sends hello packets out all its OSPF-enabled interfaces
when it comes online. Router B receives the packet, which establishes that Router B can
receive traffic from Router A. Router B generates a response to Router A to acknowledge
receipt of the hello packet. When Router A receives the response, it establishes that
Router B can receive traffic from Router A. Router A then generates a final response
packet to inform Router B that Router A can receive traffic from Router B. This three-way
handshake ensures bidirectional connectivity.
As new neighbors are added to the network or existing neighbors lose connectivity, the
adjacencies in the topology map are modified accordingly through the exchange (or
absence) of LSAs. These LSAs advertise only the incremental changes in the network,
which helps minimize the amount of OSPF traffic on the network. The adjacencies are
shared and used to create the network topology in the topological database.
OSPF Version 3
OSPFv3 is a modified version of OSPF that supports IP version 6 (IPv6) addressing.
OSPFv3 differs from OSPFv2 in the following ways:
• Router and network link-state advertisements (LSAs) do not carry prefix information.
• Link-local
• Area
• AS
• Link-local addresses are used for all neighbor exchanges except virtual links.
In OSPF, a single autonomous system (AS) can be divided into smaller groups called
areas. This reduces the number of link-state advertisements (LSAs) and other OSPF
overhead traffic sent on the network, and it reduces the size of the topology database
that each router must maintain. The routing devices that participate in OSPF routing
perform one or more functions based on their location in the network.
This topic describes the following OSPF area types and routing device functions:
Areas
An area is a set of networks and hosts within an AS that have been administratively
grouped together. We recommend that you configure an area as a collection of contiguous
IP subnetted networks. Routing devices that are wholly within an area are called internal
routers. All interfaces on internal routers are directly connected to networks within the
area.
The topology of an area is hidden from the rest of the AS, thus significantly reducing
routing traffic in the AS. Also, routing within the area is determined only by the area’s
topology, providing the area with some protection from bad routing data.
Backbone Areas
An OSPF backbone area consists of all networks in area ID 0.0.0.0, their attached routing
devices, and all ABRs. The backbone itself does not have any ABRs. The backbone
distributes routing information between areas. The backbone is simply another area, so
the terminology and rules of areas apply: a routing device that is directly connected to
the backbone is an internal router on the backbone, and the backbone’s topology is
hidden from the other areas in the AS.
The routing devices that make up the backbone must be physically contiguous. If they
are not, you must configure virtual links to create the appearance of backbone connectivity.
You can create virtual links between any two ABRs that have an interface to a common
nonbackbone area. OSPF treats two routing devices joined by a virtual link as if they were
connected to an unnumbered point-to-point network.
AS Boundary Routers
Routing devices that exchange routing information with routing devices in non-OSPF
networks are called AS boundary routers. They advertise externally learned routes
throughout the OSPF AS. Depending on the location of the AS boundary router in the
network, it can be an ABR, a backbone router, or an internal router (with the exception
of stub areas). Internal routers within a stub area cannot be an AS boundary router
because stub areas cannot contain any Type 5 LSAs.
Routing devices within the area where the AS boundary router resides know the path to
that AS boundary router. Any routing device outside the area only knows the path to the
nearest ABR that is in the same area where the AS boundary router resides.
Backbone Router
Backbone routers are routing devices that have one or more interfaces connected to the
OSPF backbone area (area ID 0.0.0.0).
Internal Router
Routing devices that connect to only one OSPF area are called internal routers. All
interfaces on internal routers are directly connected to networks within a single area.
Stub Areas
Stub areas are areas through which or into which AS external advertisements are not
flooded. You might want to create stub areas when much of the topological database
consists of AS external advertisements. Doing so reduces the size of the topological
databases and therefore the amount of memory required on the internal routers in the
stub area.
Routing devices within a stub area rely on the default routes originated by the area’s ABR
to reach external AS destinations. You must configure the default-metric option on the
ABR before it advertises a default route. Once configured, the ABR advertises a default
route in place of the external routes that are not being advertised within the stub area,
so that routing devices in the stub area can reach destinations outside the area.
The following restrictions apply to stub areas: you cannot create a virtual link through a
stub area, a stub area cannot contain an AS boundary router, the backbone cannot be a
stub area, and you cannot configure an area as both a stub area and a not-so-stubby
area.
Not-So-Stubby Areas
An OSPF stub area has no external routes in it, so you cannot redistribute from another
protocol into a stub area. A not-so-stubby area (NSSA) allows external routes to be
flooded within the area. These routes are then leaked into other areas. However, external
routes from other areas still do not enter the NSSA.
The following restriction applies to NSSAs: you cannot configure an area as both a stub
area and an NSSA.
Transit Areas
Transit areas are used to pass traffic from one adjacent area to the backbone (or to
another area if the backbone is more than two hops away from an area). The traffic does
not originate in, nor is it destined for, the transit area.
• Understanding OSPF Stub Areas, Totally Stubby Areas, and Not-So-Stubby Areas on
page 522
Packets Overview
• Router ID—IP address of the router from which the packet originated.
• Area ID—Identifier of the area in which the packet is traveling. Each OSPF packet is
associated with a single area. Packets traveling over a virtual link are labeled with the
backbone area ID, 0.0.0.0. .
• Checksum—Fletcher checksum.
• Instance ID—(OSPFv3 only) Identifier used when there are multiple OSPFv3 realms
configured on a link.
Hello Packets
Routers periodically send hello packets on all interfaces, including virtual links, to establish
and maintain neighbor relationships. Hello packets are multicast on physical networks
that have a multicast or broadcast capability, which enables dynamic discovery of
neighboring routers. (On nonbroadcast networks, dynamic neighbor discovery is not
possible, so you must configure all neighbors statically as described in “Example:
Configuring an OSPFv2 Interface on a Nonbroadcast Multiaccess Network” on page 543.)
Hello packets consist of the OSPF header plus the following fields:
• Hello interval—How often the router sends hello packets. All routers on a shared network
must use the same hello interval.
• Router dead interval—How long the router waits without receiving any OSPF packets
from a router before declaring that router to be down. All routers on a shared network
must use the same router dead interval.
• Neighbor—IP addresses of the routers from which valid hello packets have been received
within the time specified by the router dead interval.
These packets consist of the OSPF header plus fields that uniquely identify the database
information that the router is seeking.
Link-state update packets consist of the OSPF header plus the following fields:
Link-state acknowledgment packets consist of the OSPF header plus the link-state
advertisement header.
• Router link advertisements—Are sent by all routers to describe the state and cost of
the router’s links to the area. These link-state advertisements are flooded throughout
a single area only.
• Network link advertisements—Are sent by designated routers to describe all the routers
attached to the network. These link-state advertisements are flooded throughout a
single area only.
• Summary link advertisements—Are sent by area border routers to describe the routes
that they know about in other areas. There are two types of summary link
advertisements: those used when the destination is an IP network, and those used
when the destination is an AS boundary router. Summary link advertisements describe
interarea routes, that is, routes to destinations outside the area but within the AS. These
link-state advertisements are flooded throughout the advertisement’s associated
areas.
Each link-state advertisement type describes a portion of the OSPF routing domain. All
link-state advertisements are flooded throughout the AS.
When OSPF exports route information from external autonomous systems (ASs), it
includes a cost, or external metric, in the route. There are two types of external metrics:
Type 1 and Type 2. The difference between the two metrics is how OSPF calculates the
cost of the route. Type 1 external metrics are equivalent to the link-state metric, where
the cost is equal to the sum of the internal costs plus the external cost. Type 2 external
metrics use only the external cost assigned by the AS boundary router. By default, OSPF
uses the Type 2 external metric.
All routing protocols store their routing information in the routing table. The routing table
uses this collected route information to determine the active routes to destinations. The
routing table then installs the active routes into its forwarding table and also exports
them back into the routing protocols. It is these exported routes that the protocols
advertise.
OSPF has a set of default rules that determine which routes it places in the routing table
and advertises from the routing table. The default rules for all routing protocols are known
as the default routing policy. The default routing policy is always present. You can further
control which routes the protocol stores in the routing table and which routes the routing
table exports into the protocol by defining a routing policy for that protocol. A routing
policy has a major impact on the flow of routing information or packets within or through
the device. The match conditions and actions allow you to configure a customized policy
to fit your needs. A user-defined routing policy preempts the default routing policy.
To create a routing policy, you must define the policy and apply it. You define the policy
by specifying the criteria that a route must match and the actions to perform if a match
occurs. You then apply the policy to OSPF.
database, which includes routes to reachable prefixes and the metrics associated with
the prefixes. The default import policy for OSPF is to accept all learned routes and import
them into the routing table. The default export policy for OSPF is to reject everything.
OSPF does not actually export its internally learned routes (the directly connected routes
on interfaces that are running the protocol). OSPF uses link-state advertisement (LSA)
flooding to advertise both local routes and learned routes, and LSA flooding is not affected
by the export policy.
The Junos OS substantially supports the following RFCs and Internet drafts, which define
standards for OSPF and OSPF version 3 (OSPFv3).
• RFC 4203, OSPF Extensions in Support of Generalized Multi-Protocol [sic] Label Switching
(GMPLS)
• RFC 4576, Using a Link State Advertisement (LSA) Options Bit to Prevent Looping in
BGP/MPLS IP Virtual Private Networks (VPNs)
• RFC 4577, OSPF as the Provider/Customer Edge Protocol for BGP/MPLS IP Virtual Private
Networks (VPNs)
The following RFCs and Internet drafts do not define standards, but provide information
about OSPF and related technologies. The IETF classifies them as “Informational.”
• RFC 5309, Point-to-Point Operation over LAN in Link State Routing Protocols
To activate OSPF on a network, you must enable the protocol on all interfaces within
the network on which OSPF traffic is to travel. To enable OSPF, you must configure one
or more interfaces on the device within an OSPF area. Once the interfaces are configured,
OSPF link-state advertisements (LSAs) are transmitted on all OSPF-enabled interfaces,
and the network topology is shared throughout the network.
To complete the minimum device configuration for a node in an OSPF network involves:
2. Configuring the router identifiers for the devices in your OSPF network
3. Creating the backbone area (area 0) for your OSPF network and adding the appropriate
interfaces to the area
NOTE: Once you complete this step, OSPF begins sending LSAs. No
additional configuration is required to enable OSPF traffic on the network.
You can further define your OSPF network depending on your network requirements.
Some optional configurations involve:
• Adding additional areas to your network and configure area border routers (ABRs)
• Reducing the amount of memory that the nodes use to maintain the topology database
by configuring stub and not-so-stubby areas
• Ensuring that only trusted routing devices participate in the autonomous systems’
routing by enabling authentication
• Controlling the flow of traffic across the network by configuring path metrics and route
selection
When describing how to configure OSPF, the following terms are used as follows:
• OSPF refers to both OSPF version 2 (OSPFv2) and OSPF version 3 (OSPFv3)
• Establish adjacencies with all routing devices on the network, thus participating in the
synchronizing of the link-state databases.
In LANs, the election of the designated router takes place when the OSPF network is
initially established. When the first OSPF links are active, the routing device with the
highest router identifier (defined by the router-id configuration value, which is typically
the IP address of the routing device, or the loopback address) is elected the designated
router. The routing device with the second highest router identifier is elected the backup
designated router. If the designated router fails or loses connectivity, the backup
designated router assumes its role and a new backup designated router election takes
place between all the routers in the OSPF network.
OSPF uses the router identifier for two main purposes: to elect a designated router, unless
you manually specify a priority value, and to identify the routing device from which a
packet is originated. At designated router election, the router priorities are evaluated first,
and the routing device with the highest priority is elected designated router. If router
priorities tie, the routing device with the highest router identifier, which is typically the
routing device’s IP address, is chosen as the designated router. If you do not configure a
router identifier, the IP address of the first interface to come online is used. This is usually
the loopback interface. Otherwise, the first hardware interface with an IP address is used.
At least one routing device on each logical IP network or subnet must be eligible to be
the designated router for OSPFv2. At least one routing device on each logical link must
be eligible to be the designated router for OSPFv3.
By default, routing devices have a priority of 128. A priority of 0 marks the routing device
as ineligible to become the designated router. A priority of 1 means the routing device
has the least chance of becoming a designated router. A priority of 255 means the routing
device is always the designated router.
Requirements
• Identify the interfaces on the routing device that will participate in OSPF. You must
enable OSPF on all interfaces within the network on which OSPF traffic is to travel.
• Configure the device interfaces. See the Junos OS Network Interfaces Configuration Guide.
Overview
In this example, you configure the OSPF router identifier by setting its router ID value to
the IP address of the device, which is 177.162.4.24.
Configuration
CLI Quick To quickly configure an OSPF router identifier, copy the following command and paste
Configuration it into the CLI.
[edit]
set routing-options router-id 177.162.4.24
[edit]
user@host# set routing-options router-id 177.162.4.24
[edit]
user@host# commit
Results Confirm your configuration by entering the show routing-options router-id command. If
the output does not display the intended configuration, repeat the instructions in this
example to correct the configuration.
Verification
After you configure the router ID and activate OSPF on the routing device, the router ID
is referenced by multiple OSPF operational mode commands that you can use to monitor
and troubleshoot the OSPF protocol. The router ID fields are clearly marked in the output.
Requirements
• Configure the device interfaces. See the Junos OS Network Interfaces Configuration Guide.
• Configure the router identifiers for the devices in your OSPF network. See “Example:
Configuring an OSPF Router Identifier” on page 510.
Overview
This example shows how to control OSPF designated router election. Within the example,
you set the OSPF interface to ge-/0/0/1 and the device priority to 200. The higher the
priority value, the greater likelihood the routing device will become the designated router.
By default, routing devices have a priority of 128. A priority of 0 marks the routing device
as ineligible to become the designated router. A priority of 1 means the routing device
has the least chance of becoming a designated router.
Configuration
CLI Quick To quickly configure an OSPF designated router election, copy the following command
Configuration and paste it into the CLI.
[edit]
set protocols ospf area 0.0.0.3 interface ge-0/0/1 priority 200
[edit]
user@host# set protocols ospf area 0.0.0.3 interface ge-0/0/1 priority 200
[edit]
user@host# commit
Results Confirm your configuration by entering the show protocols ospf command. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
To confirm your OSPFv3 configuration, enter the show protocols ospf3 command.
Verification
Purpose Based on the priority you configured for a specific OSPF interface, you can confirm the
address of the area’s designated router. The DR ID, DR, or DR-ID field displays the address
of the area’s designated router. The BDR ID, BDR, or BDR-ID field displays the address
of the backup designated router.
Action From operational mode, enter the show ospf interface and the show ospf neighbor
commands for OSPFv2, and enter the show ospf3 interface and the show ospf3 neighbor
commands for OSPFv3.
The central area of an AS, called the backbone area, has a special function and is always
assigned the area ID 0.0.0.0. (Within a simple, single-area network, this is also the ID of
the area.) Area IDs are unique numeric identifiers, in dotted decimal notation, but they
are not IP addresses. Area IDs need only be unique within an AS. All other networks or
areas in the AS must be directly connected to the backbone area by a routing device that
has interfaces in more than one area. These connecting routing devices are called area
border routers (ABRs). Figure 15 on page 513 shows an OSPF topology of three areas
connected by two ABRs.
Because all areas are adjacent to the backbone area, OSPF routers send all traffic not
destined for their own area through the backbone area. The ABRs in the backbone area
are then responsible for transmitting the traffic through the appropriate ABR to the
destination area. The ABRs summarize the link-state records of each area and advertise
destination address summaries to neighboring areas. The advertisements contain the
ID of the area in which each destination lies, so that packets are routed to the appropriate
ABR. For example, in the OSPF areas shown in Figure 15 on page 513, packets sent from
Router A to Router C are automatically routed through ABR B.
An OSPF restriction requires all areas to be directly connected to the backbone area so
that packets can be properly routed. All packets are routed first to the backbone area by
default. Packets that are destined for an area other than the backbone area are then
routed to the appropriate ABR and on to the remote host within the destination area.
In large networks with many areas, in which direct connectivity between all areas and
the backbone area is physically difficult or impossible, you can configure virtual links to
connect noncontiguous areas. Virtual links use a transit area that contains two or more
ABRs to pass network traffic from one adjacent area to another. For example, Figure 16
on page 514 shows a virtual link between a noncontiguous area and the backbone area
through an area connected to both.
g015011
Area 0.0.0.0 Virtual lin k Area 0.0.0.3
Area 0.0.0.2
In the topology shown in Figure 16 on page 514, a virtual link is established between
area 0.0.0.3 and the backbone area through area 0.0.0.2. All outbound traffic destined
for other areas is routed through area 0.0.0.2 to the backbone area and then to the
appropriate ABR. All inbound traffic destined for area 0.0.0.3 is routed to the backbone
area and then through area 0.0.0.2.
Requirements
• Configure the device interfaces. See the Junos OS Network Interfaces Configuration Guide.
• Configure the router identifiers for the devices in your OSPF network. See “Example:
Configuring an OSPF Router Identifier” on page 510.
Overview
To activate OSPF on a network, you must enable the OSPF protocol on all interfaces
within the network on which OSPF traffic is to travel. To enable OSPF, you must configure
one or more interfaces on the device within an OSPF area. Once the interfaces are
configured, OSPF LSAs are transmitted on all OSPF-enabled interfaces, and the network
topology is shared throughout the network.
In an autonomous system (AS), the backbone area is always assigned area ID 0.0.0.0
(within a simple, single-area network, this is also the ID of the area). Area IDs are unique
numeric identifiers, in dotted decimal notation. Area IDs need only be unique within an
AS. All other networks or areas in the AS must be directly connected to the backbone
area by area border routers that have interfaces in more than one area. You must also
create a backbone area if your network consists of multiple areas. In this example, you
create the backbone area and add interfaces, such as ge-0/0/0, as needed to the OSPF
area.
To use OSPF on the device, you must configure at least one OSPF area, such as the one
shown in Figure 17 on page 515.
Configuration
CLI Quick To quickly configure a single-area OSPF network, copy the following command and paste
Configuration it into the CLI. You repeat this configuration for all interfaces that are part of the OSPF
area.
[edit]
set protocols ospf area 0.0.0.0 interface ge-0/0/0
[edit]
user@host# set protocols ospf area 0.0.0.0 interface ge-0/0/0
[edit]
user@host# commit
Results Confirm your configuration by entering the show protocols ospf command. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
To confirm your OSPFv3 configuration, enter the show protocols ospf3 command.
Verification
Purpose Verify that the interface for OSPF or OSPFv3 has been configured for the appropriate
area. Confirm that the Area field displays the value that you configured.
Action From operational mode, enter the show ospf interface command for OSPFv2, and enter
the show ospf3 interface command for OSPFv3.
Requirements
• Configure the device interfaces. See the Junos OS Network Interfaces Configuration Guide.
• Configure the router identifiers for the devices in your OSPF network. See “Example:
Configuring an OSPF Router Identifier” on page 510.
• Control OSPF designated router election. See “Example: Controlling OSPF Designated
Router Election” on page 511
Overview
To activate OSPF on a network, you must enable the OSPF protocol on all interfaces
within the network on which OSPF traffic is to travel. To enable OSPF, you must configure
one or more interfaces on the device within an OSPF area. Once the interfaces are
configured, OSPF LSAs are transmitted on all OSPF-enabled interfaces, and the network
topology is shared throughout the network.
Each OSPF area consists of routing devices configured with the same area number. In
Figure 18 on page 517, Router B resides in the backbone area of the AS. The backbone
area is always assigned area ID 0.0.0.0. (All area IDs must be unique within an AS.) All
other networks or areas in the AS must be directly connected to the backbone area by
a router that has interfaces in more than one area. In this example, these area border
routers are A, C, D, and E. You create an additional area (area 2) and assign it unique area
ID 0.0.0.2, and then add interface ge-0/0/0 to the OSPF area.
To reduce traffic and topology maintenance for the devices in an OSPF AS, you can group
them into multiple areas as shown in Figure 18 on page 517.
Configuration
CLI Quick To quickly configure a multiarea OSPF network, copy the following command and paste
Configuration it into the CLI. You repeat this configuration for all interfaces that are part of the OSPF
area.
[edit]
set protocols ospf area 0.0.0.2 interface ge-0/0/0
[edit]
user@host# set protocols ospf area 0.0.0.2 interface ge-0/0/0
[edit]
user@host# commit
Results Confirm your configuration by entering the show protocols ospf command. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
To confirm your OSPFv3 configuration, enter the show protocols ospf3 command.
Verification
Purpose Verify that the interface for OSPF or OSPFv3 has been configured for the appropriate
area. Confirm that the Area field displays the value that you configured.
Action From operational mode, enter the show ospf interface command for OSPFv2, and enter
the show ospf3 interface command for OSPFv3.
Requirements
• Configure the device interfaces. See the Junos OS Network Interfaces Configuration Guide.
Overview
If any routing device on the backbone is not physically connected to the backbone, you
must establish a virtual connection between that routing device and the backbone to
connect the noncontiguous areas.
To configure an OSPF virtual link through an area, you specify the router ID (IP address)
of the routing devices at each end of the virtual link. These routing devices must be area
border routers (ABRs), with one that is physically connected to the backbone. You cannot
configure virtual links through stub areas. You must also specify the number of the area
through which the virtual link transits (also known as the transit area). You apply these
settings to the backbone area (defined by the area 0.0.0.0) configuration on the ABRs
that are part of the virtual link.
In this example, Device R1 and Device R2 are the routing devices at each end of the virtual
link, with Device R1 physically connected to the backbone, as shown in Figure 19 on
page 520. You configure the following virtual link settings:
• neighbor-id—Specifies the IP address of the routing device at the other end of the virtual
link. In this example, Device R1 has a router ID of 192.168.0.5, and Device R2 has a router
ID of 192.168.0.3.
• transit-area—Specifies the area identifier through which the virtual link transits. In this
example, area 0.0.0.3 is not connected to the backbone, so you configure a virtual link
session between area 0.0.0.3 and the backbone area through area 0.0.0.2. Area 0.0.0.2
is the transit area.
R1 Virtual link R2
g040876
Area 0.0.0.0 Area 0.0.0.2 Area 0.0.0.3
Configuration
CLI Quick • To quickly configure an OSPF virtual link on the local routing device (Device R1), copy
Configuration the following commands and paste them into the CLI.
NOTE: You must configure both routing devices that are part of the virtual
link and specify the applicable neighbor ID on each routing device.
[edit]
set routing-options router-id 192.168.0.5
set protocols ospf area 0.0.0.0 virtual-link neighbor-id 192.168.0.3 transit-area 0.0.0.2
• To quickly configure an OSPF virtual link on the remote routing device (Device R2),
copy the following commands and paste them into the CLI.
[edit]
set routing-options router-id 192.168.0.3
set protocols ospf area 0.0.0.0 virtual-link neighbor-id 192.168.0.5 transit-area 0.0.0.2
Step-by-Step To configure an OSPF virtual link on the local routing device (Device R1):
Procedure
1. Configure the router ID.
[edit]
user@R1# set routing-options router-id 192.168.0.5
NOTE: For an OSPFv3 virtual link, include the ospf3 statement at the
[edit protocols] hierarchy level.
[edit]
user@R1# edit protocols ospf area 0.0.0.0
3. Configure an OSPF virtual link and specify the transit area 0.0.0.2.
This routing device must be an ABR that is physically connected to the backbone.
Step-by-Step To configure an OSPF virtual link on the remote ABR (Device R2, the routing device at
Procedure the other end of the link):
[edit]
user@R2# set routing-options router-id 192.168.0.3
NOTE: For an OSPFv3 virtual link, include the ospf3 statement at the
[edit protocols] hierarchy level.
[edit]
user@R2# edit protocols ospf area 0.0.0.0
3. Configure an OSPF virtual link on the remote ABR and specify the transit area 0.0.0.2.
This routing device is not physically connected to the backbone.
Results Confirm your configuration by entering the show routing-options and the show protocols
ospf commands. If the output does not display the intended configuration, repeat the
instructions in this example to correct the configuration.
To confirm your OSPFv3 configuration, enter the show protocols ospf3 command.
Verification
Purpose Verify that the entries in the OSPFv2 or OSPFv3 link-state database display. The Router
field in the OSPFv2 output displays LSA information, including the type of link. If configured
as a virtual link, the Type is Virtual. For each router link, the Type field in the OSPFv3
output displays the type of interface. If configured as a virtual link, the Type is Virtual.
Action From operational mode, enter the show ospf database detail command for OSPFv2, and
enter the show ospf3 database detail command for OSPFv3.
Purpose Verify that the OSPFv2 or OSPFv3 interface is configured and status displays. The Type
field displays the type of interface. If the interface is configured as part of a virtual link,
the Type is Virtual.
Action From operational mode, enter the show ospf interface detail command for OSPFv2, and
enter the show ospf3 interface detail command for OSPFv3.
Understanding OSPF Stub Areas, Totally Stubby Areas, and Not-So-Stubby Areas
Figure 20 on page 523 shows an autonomous system (AS) across which many external
routes are advertised. If external routes make up a significant portion of a topology
database, you can suppress the advertisements in areas that do not have links outside
the network. By doing so, you can reduce the amount of memory the nodes use to maintain
the topology database and free it for other uses.
Area 0.0.0.0
g015012
To control the advertisement of external routes into an area, OSPF uses stub areas. By
designating an area border router (ABR) interface to the area as a stub interface, you
suppress external route advertisements through the ABR. Instead, the ABR advertises a
default route (through itself) in place of the external routes and generates network
summary (Type 3) link-state advertisements (LSAs). Packets destined for external routes
are automatically sent to the ABR, which acts as a gateway for outbound traffic and
routes the traffic appropriately.
NOTE: You must explicitly configure the ABR to generate a default route
when attached to a stub or not-so-stubby-area (NSSA). To inject a default
route with a specified metric value into the area, you must configure the
default-metric option and specify a metric value.
For example, area 0.0.0.3 in Figure 20 on page 523 is not directly connected to the outside
network. All outbound traffic is routed through the ABR to the backbone and then to the
destination addresses. By designating area 0.0.0.3 as a stub area, you reduce the size of
the topology database for that area by limiting the route entries to only those routes
internal to the area.
A stub area that only allows routes internal to the area and restricts Type 3 LSAs from
entering the stub area is often called a totally stubby area. You can convert area 0.0.0.3
to a totally stubby area by configuring the ABR to only advertise and allow the default
route to enter into the area. External routes and destinations to other areas are no longer
summarized or allowed into a totally stubby area.
NOTE: If you incorrectly configure a totally stubby area, you might encounter
network connectivity issues. You should have advanced knowledge of OSPF
and understand your network environment before configuring totally stubby
areas.
Similar to area 0.0.0.3 in Figure 20 on page 523, area 0.0.0.4 has no external connections.
However, area 0.0.0.4 has static customer routes that are not internal OSPF routes. You
can limit the external route advertisements to the area and advertise the static customer
routes by designating the area an NSSA. In an NSSA, the AS boundary router generates
NSSA external (Type 7) LSAs and floods them into the NSSA, where they are contained.
Type 7 LSAs allow an NSSA to support the presence of AS boundary routers and their
corresponding external routing information. The ABR converts Type 7 LSAs into AS
external (Type 5 ) LSAs and leaks them to the other areas, but external routes from other
areas are not advertised within the NSSA.
Requirements
• Configure the device interfaces. See the Junos OS Network Interfaces Configuration Guide.
• Configure the router identifiers for the devices in your OSPF network. See “Example:
Configuring an OSPF Router Identifier” on page 510.
• Control OSPF designated router election. See “Example: Controlling OSPF Designated
Router Election” on page 511
Overview
The backbone area, which is 0 in Figure 21 on page 526, has a special function and is always
assigned the area ID 0.0.0.0. Area IDs are unique numeric identifiers, in dotted decimal
notation. Area IDs need only be unique within an autonomous system (AS). All other
networks or areas (such as 3, 7, and 9) in the AS must be directly connected to the
backbone area by area border routers (ABRs) that have interfaces in more than one area.
Stub areas are areas through which or into which OSPF does not flood AS external
link-state advertisements (Type 5 LSAs). You might create stub areas when much of
the topology database consists of AS external advertisements and you want to minimize
the size of the topology databases on the internal routers in the stub area.
• You cannot configure an area as both a stub area and an not-so-stubby area (NSSA).
In this example, you configure each routing device in area 7 (area ID 0.0.0.7) as a stub
router and some additional settings on the ABR:
• stub—Specifies that this area become a stub area and not be flooded with Type 5
LSAs. You must include the stub statement on all routing devices that are in area 7
because this area has no external connections.
NOTE:
In Junos OS Release 8.5 and later, the following applies:
• OSPF advertises a local route with a prefix length of 32 as a stub link if the
loopback interface is configured with a prefix length other than 32. OSPF
also advertises the direct route with the configured mask length, as in earlier
releases.
Figure 21: OSPF Network Topology with Stub Areas and NSSAs
Area 0 Area 3
g01503 0
0.0.0.7
0.0.0.9
Customer static routes
192.168.47.5
192.168.47.6
Area 7 ...
(Stub) Area 9
(NSSA) Customer network
Configuration
CLI Quick • To quickly configure an OSPF stub area, copy the following command and paste it into
Configuration the CLI. You must configure all routing devices that are part of the stub area.
[edit]
set protocols ospf area 0.0.0.7 stub
• To quickly configure the ABR to inject a default route into the area, copy the following
command and paste it into the CLI. You apply this configuration only on the ABR.
[edit]
set protocols ospf area 0.0.0.7 stub default-metric 10
• (Optional) To quickly configure the ABR to restrict all summary advertisements and
allow only internal routes and default route advertisements into the area, copy the
following command and paste it into the CLI. You apply this configuration only on the
ABR.
[edit]
set protocols ospf area 0.0.0.7 stub no-summaries
[edit]
user@host# set protocols ospf area 0.0.0.7 stub
[edit]
user@host# set protocols ospf area 0.0.0.7 stub default-metric 10
3. (Optional) On the ABR, restrict summary LSAs from entering the area. This step
converts the stub area into a totally stubby area.
[edit]
user@host# set protocols ospf area 0.0.0.7 stub no-summaries
[edit]
user@host# commit
Results Confirm your configuration by entering the show protocols ospf command. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
Configuration on the ABR (the output also includes the optional setting):
To confirm your OSPFv3 configuration, enter the show protocols ospf3 command.
Verification
Purpose Verify that the interface for OSPF has been configured for the appropriate area. Confirm
that the output includes Stub as the type of OSPF area.
Action From operational mode, enter the show ospf interface detail command for OSPFv2, and
enter the show ospf3 interface detail command for OSPFv3.
Purpose Verify that the OSPF area is a stub area. Confirm that the output displays Normal Stub
as the Stub type.
Action From operational mode, enter the show ospf overview command for OSPFv2, and enter
the show ospf3 overview command for OSPFv3.
Requirements
• Configure the device interfaces. See the Junos OS Network Interfaces Configuration Guide.
• Configure the router identifiers for the devices in your OSPF network. See “Example:
Configuring an OSPF Router Identifier” on page 510.
• Control OSPF designated router election. See “Example: Controlling OSPF Designated
Router Election” on page 511
Overview
The backbone area, which is 0 in Figure 22 on page 530, has a special function and is always
assigned the area ID 0.0.0.0. Area IDs are unique numeric identifiers, in dotted decimal
notation. Area IDs need only be unique within an AS. All other networks or areas (such
as 3, 7, and 9) in the AS must be directly connected to the backbone area by ABRs that
have interfaces in more than one area.
An OSPF stub area has no external routes, so you cannot redistribute routes from another
protocol into a stub area. OSPF NSSAs allow external routes to be flooded within the
area.
In addition, you might have a situation when exporting Type 7 LSAs into the NSSA is
unnecessary. When an AS boundary router is also an ABR with an NSSA attached, Type
7 LSAs are exported into the NSSA by default. If the ABR is attached to multiple NSSAs,
a separate Type 7 LSA is exported into each NSSA by default. During route redistribution,
this routing device generates both Type 5 LSAs and Type 7 LSAs. You can disable exporting
Type 7 LSAs into the NSSA.
You configure each routing device in area 9 (area ID 0.0.0.9) with the following setting:
• nssa—Specifies an OSPF NSSA. You must include the nssa statement on all routing
devices in area 9 because this area only has external connections to static routes.
You also configure the ABR in area 9 with the following additional settings:
• no-summaries—Prevents the ABR from advertising summary routes into the NSSA. If
configured in combination with the default-metric statement, the NSSA only allows
routes internal to the area and advertises the default route into the area. External
routes and destinations to other areas are no longer summarized or allowed into the
NSSA. Only the ABR requires this additional configuration because it is the only routing
device within the NSSA that creates Type 3 LSAs used to receive and send traffic from
outside the area.
• default-lsa—Configures the ABR to generate a default route into the NSSA. In this
example, you configure the following:
• metric-type—(Optional) Specifies the external metric type for the default LSA, which
can be either Type 1 or Type 2. When OSPF exports route information from external
ASs, it includes a cost, or external metric, in the route. The difference between the
two metrics is how OSPF calculates the cost of the route. Type 1 external metrics
are equivalent to the link-state metric, where the cost is equal to the sum of the
internal costs plus the external cost. Type 2 external metrics use only the external
cost assigned by the AS boundary router. By default, OSPF uses the Type 2 external
metric.
• type-7—(Optional) Floods Type 7 default LSAs into the NSSA if the no-summaries
statement is configured. By default, when the no-summaries statement is configured,
a Type 3 LSA is injected into NSSAs for Junos OS release 5.0 and later. To support
backward compatibility with earlier Junos OS releases, include the type-7 statement.
The second example also shows the optional configuration required to disable exporting
Type 7 LSAs into the NSSA by including the no-nssa-abr statement on the routing device
that performs the functions of both an ABR and an AS boundary router.
Figure 22: OSPF Network Topology with Stub Areas and NSSAs
Area 0 Area 3
g01503 0
0.0.0.7
0.0.0.9
Customer static routes
192.168.47.5
192.168.47.6
Area 7 ...
(Stub) Area 9
(NSSA) Customer network
Configuration
CLI Quick To quickly configure an OSPF NSSA, copy the following command and paste it into the
Configuration CLI. You must configure all routing devices that are part of the NSSA.
[edit]
set protocols ospf area 0.0.0.9 nssa
To quickly configure an ABR that participates in an OSPF NSSA, copy the following
commands and paste them into the CLI.
[edit]
set protocols ospf area 0.0.0.9 nssa default-lsa default-metric 10
set protocols ospf area 0.0.0.9 nssa default-lsa metric-type 1
set protocols ospf area 0.0.0.9 nssa default-lsa type-7
set protocols ospf area 0.0.0.9 nssa no-summaries
[edit]
user@host# set protocols ospf area 0.0.0.9 nssa
2. On the ABR, enter OSPF configuration mode and specify the NSSA area 0.0.0.9
that you already created.
[edit ]
user@host# edit protocols ospf area 0.0.0.9 nssa
4. (Optional) On the ABR, specify the external metric type for the default route.
Results Confirm your configuration by entering the show protocols ospf command. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
Configuration on the ABR. The output also includes the optional metric-type and type-7
statements.
To confirm your OSPFv3 configuration, enter the show protocols ospf3 command.
Disabling the Export of Type 7 Link State Advertisements into Not-So-Stubby Areas
CLI Quick To quickly disable exporting Type 7 LSAs into the NSSA, copy the following command
Configuration and paste it into the CLI. You configure this setting on an AS boundary router that is also
an ABR with an NSSA area attached.
[edit]
set protocols ospf no-nssa-abr
Step-by-Step You can configure this setting if you have an AS boundary router that is also an ABR with
Procedure an NSSA area attached.
[edit]
user@host# set protocols ospf no-nssa-abr
[edit]
user@host# commit
Results Confirm your configuration by entering the show protocols ospf command. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
To confirm your OSPFv3 configuration, enter the show protocols ospf3 command.
Verification
Purpose Verify that the interface for OSPF has been configured for the appropriate area. Confirm
that the output includes Stub NSSA as the type of OSPF area.
Action From operational mode, enter the show ospf interface detail command for OSPFv2, and
enter the show ospf3 interface detail command for OSPFv3.
Purpose Verify that the OSPF area is a stub area. Confirm that the output displays Not so Stubby
Stub as the Stub type.
Action From operational mode, enter the show ospf overview command for OSPFv2, and enter
the show ospf3 overview command for OSPFv3.
Purpose Verify the type of LSAs that are in the area. If you disabled exporting Type 7 LSAs into an
NSSA, confirm that the Type field does not include NSSA as a type of LSA.
Action From operational mode, enter the show ospf overview command for OSPFv2, and enter
the show ospf3 overview command for OSPFv3.
In Junos OS Release 9.2 and later, you can configure a logical interface to belong to more
than one OSPFv2 area. Support for OSPFv3 was introduced in Junos OS Release 9.4. As
defined in RFC 5185, OSPF Multi-Area Adjacency, the ABRs establish multiple adjacencies
belonging to different areas over the same logical interface. Each multiarea adjacency
is announced as a point-to-point unnumbered link in the configured area by the routers
connected to the link. For each area, one of the logical interfaces is treated as primary,
and the remaining interfaces that are configured for the area are designated as secondary.
Any logical interface not configured as a secondary interface for an area is treated as the
primary interface for that area. A logical interface can be configured as primary interface
only for one area. For any other area for which you configure the interface, you must
configure it as a secondary interface.
Requirements
Before you begin, plan your multiarea OSPF network. See “Example: Configuring a
Multiarea OSPF Network” on page 516.
Overview
By default, a single interface can belong to only one OSPF area. You can configure a
single interface to belong in multiple OSPF areas. Doing so allows the corresponding link
to be considered an intra-area link in multiple areas and to be preferred over other
higher-cost intra-area paths. When configuring a secondary interface, consider the
following:
• Secondary interfaces are supported for LAN interfaces (the primary interface can be
a LAN interface, but any secondary interfaces are treated as point-to-point unnumbered
links over the LAN). In this scenario, you must ensure that there are only two routing
devices on the LAN or that there are only two routing devices on the LAN that have
secondary interfaces configured for a specific OSPF area.
• Any logical interface not configured as a secondary interface for an area is treated as
a primary interface for that area. A logical interface can be configured as the primary
interface only for one area. For any other area for which you configure the interface,
you must configure it as a secondary interface.
• You cannot configure the secondary statement with the interface all statement.
statement. You configure interface so-0/0/0 on ABR R1 and interface so-1/0/0 on ABR
R2.
Configuration
CLI Quick To quickly configure a secondary logical interface for an OSPF area, copy the following
Configuration commands and paste them into the CLI.
[edit]
set interfaces so-0/0/0 unit 0 family inet address 192.168.8.45/30
set routing-options router-id 10.255.0.1
set protocols ospf area 0.0.0.1 interface so-0/0/0
set protocols ospf area 0.0.0.2 interface so-0/0/0 secondary
[edit]
set interfaces so-1/0/0 unit 0 family inet address 192.168.8.37/30
set routing-options router-id 10.255.0.2
set protocols ospf area 0.0.0.1 interface so-1/0/0
set protocols ospf area 0.0.0.2 interface so-1/0/0 secondary
NOTE: For OSPFv3, on each interface specify the inet6 address family
and include the IPv6 address.
[edit]
user@R1# set interfaces so-0/0/0 unit 0 family inet address 192.168.8.45/30
[edit]
user@R2# set interfaces so-1/0/0 unit 0 family inet address 192.168.8.37/30
[edit]
user@R1# set routing-options router-id 10.255.0.1
[edit]
user@R2# set routing-options router-id 10.255.0.2
3. On each ABR, configure the primary interface for the OSPF area.
NOTE: For OSPFv3, include the ospf3 statement at the [edit protocols]
hierarchy level.
[edit]
user@R1# set protocols ospf 0.0.0.1 interface so-0/0/0
[edit ]
user@R2# set protocols ospf 0.0.0.2 interface so-1/0/0
4. On each ABR, configure the secondary interface for the OSPF area.
[edit ]
user@R1# set protocols ospf area 0.0.0.1 so-0/0/0 secondary
[edit ]
user@R2# set protocols ospf area 0.0.0.2 so-1/0/0 secondary
Results Confirm your configuration by entering the show interfaces, show routing-options, and
the show protocols ospf commands. If the output does not display the intended
configuration, repeat the instructions in this example to correct the configuration.
area 0.0.0.1 {
interface so-1/0/0.0;
}
area 0.0.0.2 {
interface so-1/0/0.0 {
secondary;
}
}
Verification
Purpose Verify that the secondary interface appears for the configured area. The Secondary field
displays if the interface is configured as a secondary interface. The output might also
show the same interface listed in multiple areas.
Action From operational mode, enter the show ospf interface detail command for OSPFv2, and
enter the show ospf3 interface detail command for OSPFv3.
Action From operational mode, enter the show ospf interface area area-id command for OSPFv2,
and enter the show ospf3 interface area area-id command for OSPFv3..
Purpose Verify the primary and secondary neighbor adjacencies. The Secondary field displays if
the neighbor is on a secondary interface.
Action From operational mode, enter the show ospf neighbor detail command for OSPFv2, and
enter the show ospf3 neighbor detail command for OSPFv3.
Requirements
Overview
The introduction of RFC 2328 changed the method used to calculate the routes in an
OSPF network. By default, the Junos OS implementation of OSPFv2 is compatible with
RFC 1583, so OSPF uses the minimum cost to determine the route to any of the networks
within the specified range. When you disable RFC 1583 compatibility, OSPF uses the
maximum cost to determine the route to any of the networks within the specified range.
To minimize the potential for routing loops, configure the same RFC compatibility on all
OSPF devices in an OSPF domain.
Configuration
CLI Quick To quickly disable OSPFv2 compatibility with RFC 1583, copy the following command
Configuration and paste it into the CLI. You configure this setting on all devices that are part of the
OSPF domain.
[edit]
set protocols ospf no-rfc-1583
[edit]
user@host# set protocols ospf no-rfc-1583
[edit]
user@host# commit
Results Confirm your configuration by entering the show protocols ospf command. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
Verification
Purpose Verify that the OSPF routing table maintains the intra-AS paths with the largest metric,
which the router uses to calculate AS external routes.
Action From operational mode, enter the show ospf route detail command.
• A demand circuit is a connection on which you can limit traffic based on user
agreements. The demand circuit can limit bandwidth or access time based on
agreements between the provider and user.
You can also configure an OSPF interface to be passive, to operate in passive traffic
engineering mode, or to be a peer interface.
• A passive interface advertises its address, but does not run the OSPF protocol
(adjacencies are not formed and hello packets are not generated).
• An interface operating in OSPF passive traffic engineering mode floods link address
information within the autonomous system (AS) and makes it available for traffic
engineering calculations.
• A peer interface can be configured for OSPFv2 routing devices. A peer interface is
required for Generalized MPLS (GMPLS) to transport traffic engineering information
through a link separate from the control channel. You establish this separate link by
configuring a peer interface. The peer interface name must match the Link Management
Protocol (LMP) peer name. A peer interface is optional for a hierarchy of RSVP
label-switched paths (LSPs). After you configure the forwarding adjacency, you can
configure OSPFv2 to advertise the traffic engineering properties of a forwarding
adjacency to a specific peer.
Point-to-point interfaces differ from multipoint in that only one OSPF adjacency is
possible. (A LAN, for instance, can have multiple addresses and can run OSPF on each
subnet simultaneously.) As such, when you configure a numbered point-to-point interface
to OSPF by name, multiple OSPF interfaces are created. One, which is unnumbered, is
the interface on which the protocol is run. An additional OSPF interface is created for
each address configured on the interface, if any, which is automatically marked as passive.
For OSPFv3, one OSPF-specific interface must be created per interface name configured
under OSPFv3. OSPFv3 does not allow interfaces to be configured by IP address.
Enabling OSPF on an interface (by including the interface statement), disabling it (by
including the disable statement), and not actually having OSPF run on an interface (by
including the passive statement) are mutually exclusive states.
NOTE: When you configure OSPFv2 on an interface, you must also include
the family inet statement at the [edit interfaces interface-name unit
logical-unit-number] hierarchy level. When you configure OSPFv3 on an
interface, you must also include the family inet6 statement at the [edit
interfaces interface-name unit logical-unit-number] hierarchy level. In Junos OS
Release 9.2 and later, you can configure OSPFv3 to support address families
other than unicast IPv6.
Requirements
• Configure the router identifiers for the devices in your OSPF network. See “Example:
Configuring an OSPF Router Identifier” on page 510.
• Control OSPF designated router election. See “Example: Controlling OSPF Designated
Router Election” on page 511
Overview
If the interface on which you are configuring OSPF supports broadcast mode (such as a
LAN), or if the interface supports point-to-point mode (such as a PPP interface or a
point-to-point logical interface on Frame Relay), you specify the interface by including
the IP address or the interface name for OSPFv2, or only the interface name for OSPFv3.
In Junos OS Release 9.3 and later, an OSPF point-to-point interface can be an Ethernet
interface without a subnet. If you configure an interface on a broadcast network,
designated router and backup designated router election is performed.
NOTE: Using both the interface name and the IP address of the same interface
produces an invalid configuration.
In this example, you configure interface ge-0/2/0 as an OSPFv2 interface in OSPF area
0.0.0.1.
Configuration
CLI Quick To quickly configure an OSPF interface on a broadcast or point-to-point network, copy
Configuration the following commands and paste them into the CLI.
[edit]
set interfaces ge-0/2/0 unit 0 family inet address 10.0.0.1
set protocols ospf area 0.0.0.1 interface ge-0/2/0
[edit]
user@host# set interfaces ge-0/2/0 unit 0 family inet address 10.0.0.1
[edit]
user@host# edit protocols ospf area 0.0.0.1
Results Confirm your configuration by entering the show interfaces and the show protocols ospf
commands. If the output does not display the intended configuration, repeat the
instructions in this example to correct the configuration.
To confirm your OSPFv3 configuration, enter the show interfaces and the show protocols
ospf3 commands.
Verification
Purpose Verify the interface configuration. Depending on your deployment, the Type field might
display LAN or P2P.
Action From operational mode, enter the show ospf interface detail command for OSPFv2, and
enter the show ospf3 interface detail command for OSPFv3.
Requirements
• Configure the router identifiers for the devices in your OSPF network. See “Example:
Configuring an OSPF Router Identifier” on page 510.
• Control OSPF designated router election. See “Example: Controlling OSPF Designated
Router Election” on page 511.
Overview
When you configure OSPFv2 on an NBMA network, you can use nonbroadcast mode
rather than point-to-multipoint mode. Using this mode offers no advantages over
point-to-multipoint mode, but it has more disadvantages than point-to-multipoint mode.
Nevertheless, you might occasionally find it necessary to configure nonbroadcast mode
to interoperate with other equipment. Because there is no autodiscovery mechanism,
you must configure each neighbor.
Nonbroadcast mode treats the NBMA network as a partially connected LAN, electing
designated and backup designated routers. All routing devices must have a direct
connection to both the designated and backup designated routers, or unpredictable
results occur.
When you configure the interface, specify either the IP address or the interface name.
Using both the IP address and the interface name produces an invalid configuration. For
nonbroadcast interfaces, specify the IP address of the nonbroadcast interface as the
interface name.
In this example, you configure the Asynchronous Transfer Mode (ATM) interface at-0/1/0
as an OSPFv2 interface in OSPF area 0.0.0.1, and you and specify the following settings:
• interface-type nbma—Sets the interface to run in NBMA mode. You must explicitly
configure the interface to run in NBMA mode.
• poll-interval—Specifies the length of time, in seconds, before the routing device sends
hello packets out of the interface before it establishes adjacency with a neighbor.
Routing devices send hello packets for a longer interval on nonbroadcast networks to
minimize the bandwidth required on slow WAN links. The range is from 1 through 255
seconds. By default, the device sends hello packets out the interface every 120 seconds
before it establishes adjacency with a neighbor.
Once the routing device detects an active neighbor, the hello packet interval changes
from the time specified in the poll-interval statement to the time specified in the
hello-interval statement.
Configuration
CLI Quick To quickly configure an OSPFv2 interface on an NBMA network, copy the following
Configuration commands and paste them into the CLI.
[edit]
set interfaces at-0/1/0 unit 0 family inet address 192.0.2.1
set protocols ospf area 0.0.0.1 interface at-0/1/0.0 interface-type nbma
set protocols ospf area 0.0.0.1 interface at-0/1/0.0 neighbor 192.0.2.2 eligible
set protocols ospf area 0.0.0.1 interface at-0/1/0.0 poll-interval 130
[edit]
user@host# set interfaces at-0/1/0 unit 0 family inet address 192.0.2.1
[edit]
user@host# edit protocols ospf area 0.0.0.1
Results Confirm your configuration by entering the show interfaces and the show protocols ospf
commands. If the output does not display the intended configuration, repeat the
instructions in this example to correct the configuration.
Verification
Purpose Verify the interface configuration. Confirm that the Type field displays NBMA.
Action From operational mode, enter the show ospf interface detail command.
Requirements
• Configure the router identifiers for the devices in your OSPF network. See “Example:
Configuring an OSPF Router Identifier” on page 510.
• Control OSPF designated router election. See “Example: Controlling OSPF Designated
Router Election” on page 511
Overview
When you configure the interface, specify either the IP address or the interface name.
Using both the IP address and the interface name produces an invalid configuration.
In this example, you configure ATM interface at-0/1/0 as an OSPFv2 interface in OSPF
area 0.0.0.1, and you and specify 192.0.2.1 as the neighbor’s IP address.
Configuration
CLI Quick To quickly configure an OSPFv2 interface on a point-to-multipoint network, copy the
Configuration following commands and paste them into the CLI.
[edit]
set interfaces at-0/1/0 unit 0 family inet address 192.0.2.2
set protocols ospf area 0.0.0.1 interface at-0/1/0 neighbor 192.0.2.1
[edit]
user@host# set interfaces at-0/1/0 unit 0 family inet address 192.0.2.2
[edit]
user@host# edit protocols ospf area 0.0.0.1
Results Confirm your configuration by entering the show interfaces and the show protocols ospf
commands. If the output does not display the intended configuration, repeat the
instructions in this example to correct the configuration.
Verification
Purpose Verify the interface configuration. Confirm that the Type field displays P2MP.
Action From operational mode, enter the show ospf interface detail command.
Requirements
• Configure the device interfaces. See the Junos OS Network Interfaces Configuration Guide.
NOTE: If you are using OSPF demand circuits over an ISDN link, you must
configure an ISDN interface and enable dial-on-demand routing. See the
Junos OS Network Interfaces Configuration Guide.
• Configure the router identifiers for the devices in your OSPF network. See “Example:
Configuring an OSPF Router Identifier” on page 510.
Overview
OSPF sends periodic hello packets to establish and maintain neighbor adjacencies and
uses link-state advertisements (LSAs) to make routing calculations and decisions. OSPF
support for demand circuits is defined in RFC 1793, Extending OSPF to Support Demand
Circuits, and suppresses the periodic hello packets and LSAs. A demand circuit is a
connection on which you can limit traffic based on user agreements. The demand circuit
can limit bandwidth or access time based on agreements between the provider and user.
You configure demand circuits on an OSPF interface. When the interface becomes a
demand circuit, all hello packets and LSAs are suppressed as soon as OSPF
synchronization is achieved. LSAs have a DoNotAge bit that stops the LSA from aging
and prevents periodic updates from being sent. Hello packets and LSAs are sent and
received on a demand-circuit interface only when there is a change in the network
topology. This reduces the amount of traffic through the OSPF interface.
This example assumes that you have a point-to-point connection between two devices
using SONET/SDH interfaces. A demand-circuit interface automatically negotiates the
demand-circuit connection with its OSPF neighbor. If the neighbor does not support
demand circuits, then no demand circuit connection is established.
In this example, you configure OSPF interface so-0/1/0 in OSPF area 0.0.0.1 as a demand
circuit.
Configuration
CLI Quick To quickly configure an OSPF demand circuit interface, copy the following command
Configuration and paste it into the CLI. You must configure both neighboring interfaces for OSPF demand
circuits for the connection to be established.
[edit]
set protocols ospf area 0.0.0.1 interface so-0/1/0 demand-circuit
NOTE: For OSPFv3, include the ospf3 statement at the [edit protocols]
hierarchy level.
[edit ]
user@host# edit protocols ospf area 0.0.0.1
Results Confirm your configuration by entering the show protocols ospf command. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
To confirm your OSPFv3 configuration, enter the show protocols ospf3 command.
Verification
Purpose Verify information about the neighboring interface. When the neighbor is configured for
demand circuits, a DC flag displays.
Action From operational mode, enter the show ospf neighbor detail command for OSPFv2, and
enter the show ospf3 neighbor detail command for OSPFv3.
Requirements
• Configure the device interfaces. See the Junos OS Network Interfaces Configuration Guide.
• Configure the router identifiers for the devices in your OSPF network. See “Example:
Configuring an OSPF Router Identifier” on page 510.
Overview
Enabling OSPF on an interface (by including the interface statement), disabling it (by
including the disable statement), and not actually having OSPF run on an interface (by
including the passive statement) are mutually exclusive states.
NOTE: If you do not want to see notifications for state changes in a passive
OSPF interface, you can disable the OSPF traps for the interface by including
the no-interface-state-traps statement. The no-interface-state-traps statement
is supported only for OSPFv2.
In this example, you configure interface ge-0/2/0 as a passive OSPF interface in area
0.0.0.1 by including the passive statement.
Configuration
CLI Quick To quickly configure a passive OSPF interface, copy the following command and paste
Configuration it into the CLI.
[edit]
set protocols ospf area 0.0.0.1 interface ge-0/2/0 passive
[edit]
user@host# edit protocols ospf area 0.0.0.1
Results Confirm your configuration by entering the show protocols ospf command. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
To confirm your OSPFv3 configuration, enter the show protocols ospf3 command.
Verification
Purpose Verify the status of the OSPF interface. If the interface is passive, the Adj count field is 0
because no adjacencies have been formed. Next to this field, you might also see the word
Passive.
Action From operational mode, enter the show ospf interface detail command for OSPFv2, and
enter the show ospf3 interface detail command for OSPFv3.
Requirements
• Configure the device interfaces. See the Junos OS Network Interfaces Configuration Guide.
• Configure the router identifiers for the devices in your OSPF network. See “Example:
Configuring an OSPF Router Identifier” on page 510.
• Configure Generalized MPLS per your network requirements. See LMP Configuration
Overview in the Junos OS MPLS Applications Configuration Guide.
Overview
You can configure an OSPFv2 peer interface for many reasons, including when you
configure Generalized MPLS (GMPLS). This example configures a peer interface for
GMPLS. GMPLS requires traffic engineering information to be transported through a link
separate from the control channel. You establish this separate link by configuring a peer
interface. The OSPFv2 peer interface name must match the Link Management Protocol
(LMP) peer name. You configure GMPLS and the LMP settings separately from OSPF.
This example assumes that GMPLS and the LMP peer named oxc1 are already configured,
and you need to configure the OSPFv2 peer interface in area 0.0.0.0.
Configuration
CLI Quick To quickly configure an OSPFv2 peer interface, copy the following command and paste
Configuration it into the CLI.
[edit]
set protocols ospf area 0.0.0.0 peer-interface oxc1
[edit]
user@host# edit protocols ospf area 0.0.0.0
Results Confirm your configuration by entering the show protocols ospf command. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
Verification
Purpose Verify the status of the OSPFv2 peer. When an OSPFv2 peer is configured for GMPLS,
the Peer Name field displays the name of the LMP peer that you created for GMPLS,
which is also the configured OSPFv2 peer.
When you configure multiple address families for OSPFv3, there is a new instance ID
field that allows multiple OSPFv3 protocol instances per link. This allows a single link to
belong to multiple areas.
You configure each realm independently. We recommend that you configure an area
and at least one interface for each realm.
These are the default import and export routing tables for each of the four address
families:
With the exception of virtual links, all configurations supported for the default IPv6 unicast
family are supported for the address families that have to be configured as realms.
Requirements
• Configure the router identifiers for the devices in your OSPF network. See “Example:
Configuring an OSPF Router Identifier” on page 510.
Overview
By default, OSPFv3 supports unicast IPv6 routes, but you can configure OSPFv3 to
support multiple address families. To support an address family other than unicast IPv6,
you configure a realm that allows OSPFv3 to advertise IPv4 unicast, IPv4 multicast, or
IPv6 multicast routes. Junos OS then maps each address family that you configure to a
separate realm with its own set of neighbors and link-state database.
When configuring OSPFv3 to support multiple address families, consider the following:
• You configure each realm independently. We recommend that you configure an area
and at least one interface for each realm.
• OSPFv3 uses IPv6 link-local addresses as the source of hello packets and next hop
calculations. As such, you must enable IPv6 on the link regardless of the additional
realm you configure.
Figure 23 on page 556 shows a connection between Routers R0 and R1. In this example,
you configure interface fe-0/1/0 on Router R0 in area 0 to advertise IPv4 unicast routes,
in addition to the default unicast IPv6 routes in area 1, by including the realm ipv4-unicast
statement. Depending on your network requirements, you can also advertise IPv4
multicast routes by including the realm-ipv4-multicast statement, and you can advertise
IPv6 multicast routes by including the realm-ipv6-multicast statement.
Area 1 R1
Area 0 R2 R0
Area 2 R3
g040877
Configuration
CLI Quick The following example requires you to navigate various levels in the configuration
Configuration hierarchy. For information about navigating the CLI, see Modifying the Junos OS
Configuration in Junos OS CLI, Release 11.4.
To quickly configure multiple address families for OSPFv3, copy the following commands
and paste them into the CLI.
[edit]
set interfaces fe-0/1/0 unit 0 family inet address 11.1.2.1/24
set interfaces fe-0/1/0 unit 0 family inet6
set protocols ospf3 area 0.0.0.0 interface fe-0/1/0
set protocols ospf3 realm ipv4-unicast area 0.0.0.0 interface fe-0/1/0
[edit]
user@host# set interfaces fe-0/1/0 unit 0 family inet address 11.1.2.1/24
user@host# set interfaces fe-0/1/0 unit 0 family inet6
[edit ]
user@host# edit protocols ospf3
4. Configure an IPv4 unicast realm. This allows OSPFv3 to support both IPv4 unicast
and IPv6 unicast routes.
Results Confirm your configuration by entering the show interfaces and the show protocols ospf
commands. If the output does not display the intended configuration, repeat the
instructions in this example to correct the configuration.
Verification
Purpose Verify the status of the link-state database for the configured realm, or address family.
Action From operational mode, enter the show ospf3 database realm ipv4-unicast command.
Purpose Verify the status of the interface for the specified OSPFv3 realm, or address family.
Action From operational mode, enter the show ospf3 interface realm ipv4-unicast command.
Area border routers (ABRs) send summary link advertisements to describe the routes to
other areas. Depending on the number of destinations, an area can get flooded with a
large number of link-state records, which can utilize routing device resources. To minimize
the number of advertisements that are flooded into an area, you can configure the ABR
to coalesce, or summarize, a range of IP addresses and send reachability information
about these addresses in a single link-state advertisement (LSA). You can summarize
one or more ranges of IP addresses, where all routes that match the specified area range
are filtered at the area boundary, and the summary is advertised in their place.
For an OSPF area, you can summarize and filter intra-area prefixes. All routes that match
the specified area range are filtered at the area boundary, and the summary is advertised
in their place. For an OSPF not-so-stubby area (NSSA), you can only coalesce or filter
NSSA external (Type 7) LSAs before they are translated into AS external (Type 5) LSAs
and enter the backbone area. All external routes learned within the area that do not fall
into the range of one of the prefixes are advertised individually to other areas.
In addition, you can also limit the number of prefixes (routes) that are exported into
OSPF. By setting a user-defined maximum number of prefixes, you prevent the routing
device from flooding an excessive number of routes into an area.
Requirements
• Configure the router identifiers for the devices in your OSPF network. See “Example:
Configuring an OSPF Router Identifier” on page 510.
• Control OSPF designated router election. See “Example: Controlling OSPF Designated
Router Election” on page 511
• Configure a static route. See “Examples: Configuring Static Routes” on page 93 in the
Junos OS Routing Protocols Configuration Guide.
Overview
You can summarize a range of IP addresses to minimize the size of the backbone router’s
link-state database. All routes that match the specified area range are filtered at the
area boundary, and the summary is advertised in their place.
Figure 24 on page 559 shows the topology used in this example. R5 is the ABR between
area 0.0.0.4 and the backbone. The networks in area 0.0.0.4 are 10.0.8.4/30, 10.0.8.0/30,
and 10.0.8.8/30, which can be summarized as 10.0.8.0/23. R3 is the ABR between NSSA
area 0.0.0.3 and the backbone. The networks in area 0.0.0.3 are 10.0.4.4/30, 10.0.4.0/30,
and 10.0.4.12/30, which can be summarized as 10.0.4.0/22. Area 0.0.0.3 also contains
external static route 3.0.0.0.8 that you will prevent from flooding throughout the network.
Area 0.0.0.0
R4
Static Route
3.0.0.8
10.0.2.4/30 10.0.2.8/30
NSSA Stub
R3 R5
10.0.2.0/30
10.0.4.12/30 10.0.8.4/30
R1 R6
10.0.4.0/30 10.0.8.8/30
10.0.4.4/30 10.0.8.0/30
R2 R7
g040889
In this example, you configure the ABRs for route summarization by including the following
settings:
• restrict—On the NSSA ABR, prevents the configured summary from being advertised.
In this example, we do not want to flood the external route outside of area 0.0.0.3.
Configuration
CLI Quick • To quickly configure route summarization for an OSPF area, copy the following
Configuration commands and paste them into the CLI. The following is the configuration on ABR R5:
[edit]
set interfaces fe-0/0/1 unit 0 family inet address 10.0.8.3
set interfaces fe-0/0/2 unit 0 family inet address 10.0.8.4
set interfaces fe-0/0/0 unit 0 family inet address 10.0.2.3
set interfaces fe-0/0/4 unit 0 family inet address 10.0.2.5
set protocols ospf area 0.0.0.4 stub
set protocols ospf area 0.0.0.4 interface fe-0/0/1
set protocols ospf area 0.0.0.4 interface fe-0/0/2
set protocols ospf area 0.0.0.0 interface fe-0/0/0
set protocols ospf area 0.0.0.0 interface fe-0/0/4
set protocols ospf area 0.0.0.4 area-range 10.0.8.0/23
• To quickly configure route summarization for an OSPF NSSA, copy the following
commands and paste them into the CLI. The following is the configuration on ABR R3:
[edit]
set interfaces fe-0/0/1 unit 0 family inet address 10.0.4.10
set interfaces fe-0/0/2 unit 0 family inet address 10.0.4.1
set interfaces fe-0/0/0 unit 0 family inet address 10.0.2.1
set interfaces fe-0/0/4 unit 0 family inet address 10.0.2.7
set protocols ospf area 0.0.0.3 interface fe-0/0/1
set protocols ospf area 0.0.0.3 interface fe-0/0/2
set protocols ospf area 0.0.0.0 interface fe-0/0/0
set protocols ospf area 0.0.0.0 interface fe-0/0/4
set protocols ospf area 0.0.0.3 area-range 10.0.4.0/22
set protocols ospf area 0.0.0.3 nssa
set protocols ospf area 0.0.0.3 nssa area-range 3.0.0.0/8 restrict
[edit]
user@R5# set interfaces fe-0/0/1 unit 0 family inet address 10.0.8.3
user@R5# set interfaces fe-0/0/2 unit 0 family inet address 10.0.8.4
user@R5# set interfaces fe-0/0/0 unit 0 family inet address 10.0.2.3
user@R5# set interfaces fe-0/0/4 unit 0 family inet address 10.0.2.5
[edit]
user@R3# set interfaces fe-0/0/1 unit 0 family inet address 10.0.4.10
NOTE: For OSPFv3, include the ospf3 statement at the [edit protocols]
hierarchy level.
[edit]
user@R5# set protocols ospf area 0.0.0.4 stub
[edit]
user@R3# set protocols ospf area 0.0.0.3 nssa
[edit]
user@R5# set protocols ospf area 0.0.0.4 area-range 10.0.8.0/23
[edit]
user@R3# set protocols ospf area 0.0.0.3 area-range 10.0.4.0/22
5. On ABR R3, restrict the external static route from leaving area 0.0.0.3.
[edit]
user@R3# set protocols ospf area 0.0.0.3 nssa area-range 3.0.0.0/8 restrict
[edit]
user@host# commit
Results Confirm your configuration by entering the show interfaces and the show protocols ospf
commands. If the output does not display the intended configuration, repeat the
instructions in this example to correct the configuration.
}
}
fe-0/0/1 {
unit 0 {
family inet {
address 10.0.8.3/32;
}
}
}
fe-0/0/2 {
unit 0 {
family inet {
address 10.0.8.4/32;
}
}
}
fe-0/0/4 {
unit 0 {
family inet {
address 10.0.2.5/32;
}
}
}
}
}
}
fe-0/0/4 {
unit 0 {
family inet {
address 10.0.2.7/32;
}
}
}
To confirm your OSPFv3 configuration, enter the show interfaces and show protocols
ospf3 commands.
Verification
Purpose Verify that the routes you configured for route summarization are being aggregated by
the ABRs before the routes enter the backbone area. Confirm route summarization by
checking the entries of the OSPF link-state database for the routing devices in the
backbone.
Action From operational mode, enter the show ospf database command for OSPFv2, and enter
the show ospf3 database command for OSPFv3.
Requirements
• Configure the device interfaces. See the Junos OS Network Interfaces Configuration Guide.
• Configure the router identifiers for the devices in your OSPF network. See “Example:
Configuring an OSPF Router Identifier” on page 510.
• Control OSPF designated router election. See “Example: Controlling OSPF Designated
Router Election” on page 511
Overview
By default, there is no limit to the number of prefixes (routes) that can be exported into
OSPF. By allowing any number of routes to be exported into OSPF, the routing device
can become overwhelmed and potentially flood an excessive number of routes into an
area.
You can limit the number of routes exported into OSPF to minimize the load on the routing
device and prevent this potential problem. If the routing device exceeds the configured
prefix export value, the routing device purges the external prefixes and enters into an
overload state. This state ensures that the routing device is not overwhelmed as it
attempts to process routing information. The prefix export limit number can be a value
from 0 through 4,294,967,295.
In this example, you configure a prefix export limit of 100,000 by including the
prefix-export-limit statement.
Configuration
CLI Quick To quickly limit the number of prefixes exported to OSPF, copy the following command
Configuration and paste it into the CLI.
[edit]
set protocols ospf prefix-export-limit 100000
NOTE: For OSPFv3, include the ospf3 statement at the [edit protocols]
hierarchy level.
[edit]
user@host# set protocols ospf prefix-export-limit 100000
[edit]
user@host# commit
Results Confirm your configuration by entering the show protocols ospf command. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
To confirm your OSPFv3 configuration, enter the show protocols ospf3 command.
Verification
Purpose Verify the prefix export counter that displays the number or routes exported into OSPF.
Action From operational mode, enter the show ospf overview command for OSPFv2, and enter
the show ospf3 overview command for OSPFv3.
The Juniper implementation of OSPF refresh and flooding reduction is based on RFC 4136,
OSPF Refresh and Flooding Reduction in Stable Topologies. However, the Juniper
implementation does not include the forced-flooding interval defined in the RFC. Not
implementing the forced-flooding interval ensures that LSAs with the DoNotAge bit set
are reflooded only when a change occurs.
• OSPFv3 realms
• Logical systems
In the following example, the OSPF interface so-0/0/1.0 is configured for flooding
reduction. As a result, all the LSAs generated by the routes that traverse the specified
interface have the DoNotAge bit set when they are initially flooded, and LSAs are refreshed
only when a change occurs.
[edit]
protocols ospf {
area 0.0.0.0 {
interface so-0/0/1.0 {
flood-reduction;
}
interface lo0.0;
interface so-0/0/0.0;
}
}
along each path alternately, in round-robin fashion. Routes with lower total path metrics
are preferred over those with higher path metrics.
You can modify the reference-bandwidth value, which is used to calculate the default
interface cost. The interface bandwidth value is not user-configurable and refers to the
actual bandwidth of the physical interface.
By default, OSPF assigns a default cost metric of 1 to any link faster than 100 Mbps, and
a default cost metric of 0 to the loopback interface (lo0). No bandwidth is associated
with the loopback interface.
To control the flow of packets across the network, OSPF allows you to manually assign
a cost (or metric) to a particular path segment. When you specify a metric for a specific
OSPF interface, that value is used to determine the cost of routes advertised from that
interface. For example, if all routers in the OSPF network use default metric values, and
you increase the metric on one interface to 5, all paths through that interface have a
calculated metric higher than the default and are not preferred.
NOTE: Any value you configure for the metric overrides the default behavior
of using the reference-bandwidth value to calculate the route cost for that
interface.
You can specify a set of bandwidth threshold values and associated metric values for
an OSPF interface or for a topology on an OSPF interface. When the bandwidth of an
interface changes, the Junos OS automatically sets the interface metric to the value
associated with the appropriate bandwidth threshold value. Junos OS uses the smallest
configured bandwidth threshold value that is equal to or greater than the actual interface
bandwidth to determine the metric value. If the interface bandwidth is greater than any
of the configured bandwidth threshold values, the metric value configured for the interface
is used instead of any of the bandwidth-based metric values configured. The ability to
recalculate the metric for an interface when its bandwidth changes is especially useful
for aggregate interfaces.
NOTE: You must also configure a metric for the interface when you enable
bandwidth-based metrics.
You can control the flow of packets through the network using route preferences. Route
preferences are used to select which route is installed in the forwarding table when
several protocols calculate routes to the same destination. The route with the lowest
preference value is selected.
By default, internal OSPF routes have a preference value of 10, and external OSPF routes
have a preference value of 150. Although the default settings are appropriate for most
environments, you might want to modify the default settings if all of the routing devices
in your OSPF network use the default preference values, or if you are planning to migrate
from OSPF to a different interior gateway protocol (IGP). If all of the devices use the
default route preference values, you can change the route preferences to ensure that
the path through a particular device is selected for the forwarding table any time multiple
equal-cost paths to a destination exist. When migrating from OSPF to a different IGP,
modifying the route preferences allows you to perform the migration in a controlled
manner.
Requirements
• Configure the device interfaces. See the Junos OS Network Interfaces Configuration Guide.
• Configure the router identifiers for the devices in your OSPF network. See “Example:
Configuring an OSPF Router Identifier” on page 510.
• Control OSPF designated router election. See “Example: Controlling OSPF Designated
Router Election” on page 511
Overview
All OSPF interfaces have a cost, which is a routing metric that is used in the link-state
calculation. Routes with lower total path metrics are preferred to those with higher path
metrics. In this example, we explore how to control the cost of OSPF network segments.
By default, OSPF assigns a default cost metric of 1 to any link faster than 100 Mbps, and
a default cost metric of 0 to the loopback interface (lo0). No bandwidth is associated
with the loopback interface. This means that all interfaces faster than 100 Mbps have
the same default cost metric of 1. If multiple equal-cost paths exist between a source
and destination address, OSPF routes packets along each path alternately, in round-robin
fashion.
Having the same default metric might not be a problem if all of the interfaces are running
at the same speed. If the interfaces operate at different speeds, you might notice that
traffic is not routed over the fastest interface because OSPF equally routes packets
across the different interfaces. For example, if your routing device has Fast Ethernet and
Gigabit Ethernet interfaces running OSPF, each of these interfaces have a default cost
metric of 1.
In the first example, you set the reference bandwidth to 10g (10 Gbps, as denoted by
10,000,000,000 bits) by including the reference-bandwidth statement. With this
configuration, OSPF assigns the Fast Ethernet interface a default metric of 100, and the
Gigabit Ethernet interface a metric of 10. Since the Gigabit Ethernet interface has the
lowest metric, OSPF selects it when routing packets. The range is 9600 through
1,000,000,000,000 bits.
Figure 25 on page 569 shows three routing devices in area 0.0.0.0 and assumes that the
link between Device R2 and Device R3 is congested with other traffic. You can also control
the flow of packets across the network by manually assigning a metric to a particular
path segment. Any value you configure for the metric overrides the default behavior of
using the reference-bandwidth value to calculate the route cost for that interface. To
prevent the traffic from Device R3 going directly to Device R2, you adjust the metric on
the interface on Device R3 that connects with Device R1 so that all traffic goes through
Device R1.
In the second example, you set the metric to 5 on interface fe-1/0/1 on Device R3 that
connects with Device R1 by including the metric statement. The range is 1 through 65,535.
fe-0/0/1 fe-0/0/1
R1 R2
fe-1/0/0
fe-1/0/1
Congested
fe-1/0/1 link
fe-1/0/0
R3 Area 0.0.0.0
g040888
Configuration
CLI Quick To quickly configure the reference bandwidth, copy the following command and paste
Configuration it into the CLI.
[edit]
set protocols ospf reference-bandwidth 10g
[edit]
user@host# set protocols ospf reference-bandwidth 10g
[edit]
user@host# commit
Results Confirm your configuration by entering the show protocols ospf command. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
To confirm your OSPFv3 configuration, enter the show protocols ospf3 command.
CLI Quick To quickly configure a metric for a specific OSPF interface, copy the following command
Configuration and paste it into the CLI.
[edit]
set protocols ospf area 0.0.0.0 interface fe-1/0/1 metric 5
[edit]
user@host# edit protocols ospf area 0.0.0.0
Results Confirm your configuration by entering the show protocols ospf command. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
To confirm your OSPFv3 configuration, enter the show protocols ospf3 command.
Verification
Purpose Verify the metric setting on the interface. Confirm that the Cost field displays the
interface’s configured metric (cost). When choosing paths to a destination, OSPF uses
the path with the lowest cost.
Action From operational mode, enter the show ospf interface detail command for OSPFv2, and
enter the show ospf3 interface detail command for OSPFv3.
Purpose When choosing paths to a destination, OSPF uses the path with the lowest total cost.
Confirm that OSPF is using the appropriate path.
Requirements
• Configure the device interfaces. See the Junos OS Network Interfaces Configuration Guide.
• Configure the router identifiers for the devices in your OSPF network. See “Example:
Configuring an OSPF Router Identifier” on page 510.
• Control OSPF designated router election. See “Example: Controlling OSPF Designated
Router Election” on page 511
Overview
You can specify a set of bandwidth threshold values and associated metric values for
an OSPF interface. When the bandwidth of an interface changes, the Junos OS
automatically sets the interface metric to the value associated with the appropriate
bandwidth threshold value. When you configure bandwidth-based metric values, you
typically configure multiple bandwidth and metric values.
In this example, you configure OSPF interface ae0 for bandwidth-based metrics by
including the bandwidth-based-metrics statement and the following settings:
• bandwidth—Specifies the bandwidth threshold in bits per second. The range is 9600
through 1,000,000,000,000,000.
• metric—Specifies the metric value to associate with a specific bandwidth value. The
range is 1 through 65,535.
Configuration
CLI Quick To quickly configure bandwidth threshold values and associated metric values for an
Configuration OSPF interface, copy the following commands, remove any line breaks, and then paste
the commands into the CLI.
[edit]
set protocols ospf area 0.0.0.0 interface ae0.0 metric 5
set protocols ospf area 0.0.0.0 interface ae0.0 bandwidth-based-metrics bandwidth 1g
metric 60
set protocols ospf area 0.0.0.0 interface ae0.0 bandwidth-based-metrics bandwidth 10g
metric 50
[edit]
user@host# edit protocols ospf area 0.0.0.0
Results Confirm your configuration by entering the show protocols ospf command. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
To confirm your OSPFv3 configuration, enter the show protocols ospf3 command.
Verification
Purpose Verify the metric setting on the interface. Confirm that the Cost field displays the
interface’s configured metric (cost). When choosing paths to a destination, OSPF uses
the path with the lowest cost.
Action From operational mode, enter the show ospf interface detail command for OSPFv2, and
enter the show ospf3 interface detail command for OSPFv3.
Requirements
This example assumes that OSPF is properly configured and running in your network,
and you want to control route selection because you are planning to migrate from OSPF
to a different IGP.
• Configure the device interfaces. See the Junos OS Network Interfaces Configuration Guide.
• Configure the IGP that you want to migrate to. See the Junos OS Routing Protocols
Configuration Guide.
Overview
Route preferences are used to select which route is installed in the forwarding table when
several protocols calculate routes to the same destination. The route with the lowest
preference value is selected.
By default, internal OSPF routes have a preference value of 10, and external OSPF routes
have a preference value of 150. You might want to modify this setting if you are planning
to migrate from OSPF to a different IGP. Modifying the route preferences enables you to
perform the migration in a controlled manner.
• You configured IS-IS per your network requirements and confirmed it is working properly.
In this example, you increase the OSPF route preference values to make them less
preferred than IS-IS routes by specifying 168 for internal OSPF routes and 169 for external
OSPF routes. IS-IS internal routes have a preference of either 15 (for Level1) or 18 (for
Level 2), and external routes have a preference of 160 (for Level 1) or 165 (for Level 2).
In general, it is preferred to leave the new protocol at its default settings to minimize
complexities and simplify any future addition of routing devices to the network. To modify
the OSPF route preference values, configure the following settings:
• preference—Specifies the route preference for internal OSPF routes. By default, internal
32
OSPF routes have a value of 10. The range is from 0 through 4,294967,295 (2 – 1).
Configuration
CLI Quick To quickly configure the OSPF route preference values, copy the following command
Configuration and paste it into the CLI.
[edit]
set protocols ospf preference 168 external-preference 169
1. Enter OSPF configuration mode and set the external and internal routing preferences.
[edit]
user@host# set protocols ospf preference 168 external-preference 169
[edit]
user@host# commit
Results Confirm your configuration by entering the show protocols ospf command. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
To confirm your OSPFv3 configuration, enter the show protocols ospf3 command.
Verification
Purpose Verify that the IGP is using the appropriate route. After the new IGP becomes the preferred
protocol (in this example, IS-IS), you should monitor the network for any issues. After
you confirm that the new IGP is working properly, you can remove the OSPF configuration
from the routing device by entering the delete ospf command at the [edit protocols]
hierarchy level.
You can configure the local routing device so that it appears to be overloaded. An
overloaded routing device determines it is unable to handle any more OSPF transit traffic,
which results in sending OSPF transit traffic to other routing devices. OSPF traffic to
directly attached interfaces continues to reach the routing device. You might configure
overload mode for many reasons, including:
• If you want the routing device to participate in OSPF routing, but do not want it to be
used for transit traffic. This could include a routing device that is connected to the
network for analysis purposes, but is not considered part of the production network,
such as network management routing devices.
You configure or disable overload mode in OSPF with or without a timeout. Without a
timeout, overload mode is set until it is explicitly deleted from the configuration. With a
timeout, overload mode is set if the time elapsed since the OSPF instance started is less
than the specified timeout.
A timer is started for the difference between the timeout and the time elapsed since the
instance started. When the timer expires, overload mode is cleared. In overload mode,
the router link-state advertisement (LSA) is originated with all the transit router links
(except stub) set to a metric of 0xFFFF. The stub router links are advertised with the
actual cost of the interfaces corresponding to the stub. This causes the transit traffic to
avoid the overloaded routing device and to take paths around the routing device. However,
the overloaded routing device’s own links are still accessible.
NOTE: The routing device can also dynamically enter the overload state,
regardless of configuring the device to appear overloaded. For example, if
the routing device exceeds the configured OSPF prefix limit, the routing device
purges the external prefixes and enters into an overload state. You can limit
the number of routes exported into OSPF to minimize the load on the routing
device and prevent this potential problem.
Requirements
• Configure the device interfaces. See the Junos OS Network Interfaces Configuration Guide.
• Configure the router identifiers for the devices in your OSPF network. See “Example:
Configuring an OSPF Router Identifier” on page 510.
• Control OSPF designated router election. See “Example: Controlling OSPF Designated
Router Election” on page 511
Overview
You can configure a local routing device running OSPF to appear to be overloaded, which
allows the local routing device to participate in OSPF routing, but not for transit traffic.
When configured, the transit interface metrics are set to the maximum value of 65535.
Configuration
CLI Quick To quickly configure a local routing device to appear as overloaded, copy the following
Configuration command and paste it into the CLI.
[edit]
set protocols ospf overload timeout 60
[edit]
user@host edit protocols ospf
Results Confirm your configuration by entering the show protocols ospf command. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration. The output includes the optional timeout statement.
To confirm your OSPFv3 configuration, enter the show protocols ospf3 command.
Verification
Purpose Verify that the traffic has moved off the upstream devices.
Action From operational mode, enter the show interfaces detail command.
Purpose Verify that the transit interface metrics are set to the maximum value of 65535 on the
downstream neighboring device.
Action From operational mode, enter the show ospf database router detail advertising-router
address command for OSPFv2, and enter the show ospf3 database router detail
advertising-router address command for OSPFv3.
Purpose Verify that overload is configured by reviewing the Configured overload field. If the overload
timer is also configured, this field also displays the time that remains before it is set to
expire.
Action From operational mode, enter the show ospf overview command for OSPFv2, and the
show ospf3 overview command for OSPFv3.
Purpose Verify the viable next hop configuration on the upstream neighboring device. If the
neighboring device is overloaded, it is not used for transit traffic and is not displayed in
the output.
Action From operational mode, enter the show route address command.
• The delay in the time between the detection of a topology change and when the SPF
algorithm actually runs.
• The maximum number of times that the SPF algorithm can run in succession before
the hold-down timer begins.
• The time to hold down, or wait, before running another SPF calculation after the SPF
algorithm has run in succession the configured number of times.
Requirements
• Configure the device interfaces. See the Junos OS Network Interfaces Configuration Guide.
• Configure the router identifiers for the devices in your OSPF network. See “Example:
Configuring an OSPF Router Identifier” on page 510.
• Control OSPF designated router election. See “Example: Controlling OSPF Designated
Router Election” on page 511
Overview
OSPF uses the SPF algorithm to determine the route to reach each destination. All routing
devices in an area run this algorithm in parallel, storing the results in their individual
topology databases. Routing devices with interfaces to multiple areas run multiple copies
of the algorithm. The SPF options control the timers used by the SPF algorithm.
Before you modify any of the default settings, you should have a good understanding of
your network environment and requirements.
This example shows how to configure the options for running the SPF algorithm. You
include the spf-options statement and the following options:
• rapid-runs—Configures the maximum number of times that the SPF algorithm can run
in succession before the hold-down timer begins. By default, the number of SPF
calculations that can occur in succession is 3. The range is from 1 through 5. Each SPF
algorithm is run after the configured SPF delay. When the maximum number of SPF
calculations occurs, the hold-down timer begins. Any subsequent SPF calculation is
not run until the hold-down timer expires.
• holddown—Configures the time to hold down, or wait, before running another SPF
calculation after the SPF algorithm has run in succession the configured maximum
number of times. By default, the hold down time is 5000 milliseconds. The range is
from 2000 through 20,000 milliseconds. If the network stabilizes during the holddown
period and the SPF algorithm does not need to run again, the system reverts to the
configured values for the delay and rapid-runs statements.
Configuration
CLI Quick To quickly configure the SPF options, copy the following commands and paste them into
Configuration the CLI.
[edit]
set protocols ospf spf-options delay 210
set protocols ospf spf-options rapid-runs 4
set protocols ospf spf-options holddown 5050
[edit]
user@host# edit protocols ospf
3. Configure the maximum number of times that the SPF algorithm can run in
succession.
Results Confirm your configuration by entering the show protocols ospf command. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
To confirm your OSPFv3 configuration, enter the show protocols ospf3 command.
Verification
Purpose Verify that SPF is operating per your network requirements. Review the SPF delay field,
the SPF holddown field, and the SPF rapid runs fields.
Action From operational mode, enter the show ospf overview command for OSPFv2, and enter
the show ospf3 overview command for OSPFv3.
Requirements
• Configure the device interfaces. See the Junos OS Network Interfaces Configuration Guide.
• Configure the router identifiers for the devices in your OSPF network. See “Example:
Configuring an OSPF Router Identifier” on page 510.
• Control OSPF designated router election. See “Example: Controlling OSPF Designated
Router Election” on page 511
Overview
In this example, configure synchronization between LDP and OSPFv2 by performing the
following tasks:
• Enable LDP on interface so-1/0/3, which is a member of OSPF area 0.0.0.0, by including
the ldp statement at the [edit protocols] hierarchy level. You can configure one or more
interfaces. By default, LDP is disabled on the routing device.
• Configure the amount of time (in seconds) the routing device advertises the maximum
cost metric for a link that is not fully operational by including the hold-time statement
at the [edit protocols ospf area area-id interface interface-name ldp-synchronization]
hierarchy level. If you do not configure the hold-time statement, the hold-time value
defaults to infinity. The range is from 1 through 65,535 seconds. In this example,
configure 10 seconds for the hold-time interval.
This example also shows how to disable synchronization between LDP and OSPFv2 by
including the disable statement at the [edit protocols ospf area area-id interface
interface-name ldp-synchronization] hierarchy level.
Configuration
CLI Quick The following example requires you to navigate various levels in the configuration
Configuration hierarchy. For information about navigating the CLI, see Modifying the Junos OS
Configuration in Junos OS CLI, Release 11.4.
To quickly enable synchronization between LDP and OSPFv2, copy the following
commands, remove any line breaks, and then paste them into the CLI.
[edit]
set protocols ldp interface so-1/0/3
set protocols ospf area 0.0.0.0 interface so-1/0/3 ldp-syncrhonization hold-time 10
[edit]
user@host# set protocols ldp interface so-1/0/3
[edit ]
user@host# edit protocols ospf area 0.0.0.0 interface so-1/0/3 ldp-synchronization
3. Configure a time period of 10 seconds to advertise the maximum cost metric for a
link that is not fully operational.
Results Confirm your configuration by entering the show protocols ldp and show protocols ospf
commands. If the output does not display the intended configuration, repeat the
instructions in this example to correct the configuration.
CLI Quick To quickly disable synchronization between LDP and OSPFv2, copy the following
Configuration command and paste it into the CLI.
[edit]
set protocols ospf area 0.0.0.0 interface so-1/0/3 ldp-synchronization disable
[edit ]
user@host# set protocols ospf area 0.0.0.0 interface so-1/0/3 ldp-synchronization
disable
[edit]
user@host# commit
Results Confirm your configuration by entering the show protocols ospf command. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
}
}
}
Verification
Purpose Verify the current state of LDP synchronization on the interface. The LDP sync state
displays information related to the current state, and the config holdtime field displays
the configured hold-time interval.
Action From operational mode, enter the show ospf interface extensive command.
NOTE: OSPFv3 does not have a built-in authentication method and relies
on IP Security (IPSec) to provide this functionality.
You define an MD5 key for each interface. If MD5 is enabled on an interface, that
interface accepts routing updates only if MD5 authentication succeeds. Otherwise,
updates are rejected. The routing device only accepts OSPFv2 packets sent using the
same key identifier (ID) that is defined for that interface.
NOTE: You can configure IPsec authentication together with either MD5
or simple authentication.
• Because only bidirectional manual SAs are supported, all OSPFv2 peers must be
configured with the same IPsec SA. You configure a manual bidirectional SA at the
[edit security ipsec] hierarchy level.
• You must configure the same IPsec SA for all virtual links with the same remote
endpoint address, for all neighbors on OSPF nonbroadcast multiaccess (NBMA) or
point-to-multipoint links, and for every subnet that is part of a broadcast link.
Because OSPF performs authentication at the area level, all routing devices within the
area must have the same authentication and corresponding password (key) configured.
For MD5 authentication to work, both the receiving and transmitting routing devices must
have the same MD5 key. In addition, a simple password and MD5 key are mutually
exclusive. You can configure only one simple password, but multiple MD5 keys.
As part of your security measures, you can change MD5 keys. You can do this by configuring
multiple MD5 keys, each with a unique key ID, and setting the date and time to switch to
the new key. Each unique MD5 key has a unique ID. The ID is used by the receiver of the
OSPF packet to determine which key to use for authentication. The key ID, which is
required for MD5 authentication, specifies the identifier associated with the MD5 key.
Use ESP with NULL encryption to provide authentication to the OSPFv3 protocol headers
only. Use AH to provide authentication to the OSPFv3 protocol headers, portions of the
IPv6 header, and portions of the extension headers. Use ESP with non-NULL encryption
for full confidentiality. You configure the actual IPsec authentication separately.
• Because only bidirectional manual SAs are supported, all OSPFv3 peers must be
configured with the same IPsec SA. You configure a manual bidirectional SA at the
[edit security ipsec] hierarchy level.
• You must configure the same IPsec SA for all virtual links with the same remote endpoint
address.
Requirements
• Configure the device interfaces. See the Junos OS Network Interfaces Configuration Guide.
• Configure the router identifiers for the devices in your OSPF network. See “Example:
Configuring an OSPF Router Identifier” on page 510.
• Control OSPF designated router election. See “Example: Controlling OSPF Designated
Router Election” on page 511
Overview
You can configure only one simple authentication key (password) on the routing device.
The simple key can be from 1 through 8 characters and can include ASCII strings. If you
include spaces, enclose all characters in quotation marks (“ “).
In this example, you specify OSPFv2 interface so-0/1/0 in area 0.0.0.0, set the
authentication type to simple-password, and define the key as PssWd4.
Configuration
CLI Quick To quickly configure simple authentication, copy the following command, removing any
Configuration line breaks, and then paste the command into the CLI. You must configure all routing
devices within the area with the same authentication and corresponding password.
[edit]
set protocols ospf area 0.0.0.0 interface so-0/1/0 authentication simple-password PssWd4
[edit]
user@host# edit protocols ospf area 0.0.0.0
Results Confirm your configuration by entering the show protocols ospf command. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
NOTE: After you configure the password, you do not see the password itself.
The output displays the encrypted form of the password you configured.
Verification
Purpose Verify that the authentication method for sending and receiving OSPF protocol packets
is configured. The Authentication Type field displays Password when configured for
simple authentication.
Action From operational mode, enter the show ospf interface and the show ospf overview
commands.
Requirements
• Configure the device interfaces. See the Junos OS Network Interfaces Configuration Guide.
• Configure the router identifiers for the devices in your OSPF network. See “Example:
Configuring an OSPF Router Identifier” on page 510.
• Control OSPF designated router election. See “Example: Controlling OSPF Designated
Router Election” on page 511
Overview
MD5 authentication uses an encoded MD5 checksum that is included in the transmitted
packet. The receiving routing device uses an authentication key (password) to verify the
packet.
You define an MD5 key for each interface. If MD5 is enabled on an interface, that interface
accepts routing updates only if MD5 authentication succeeds. Otherwise, updates are
rejected. The routing device only accepts OSPFv2 packets sent using the same key
identifier (ID) that is defined for that interface.
In this example, you create the backbone area (area 0.0.0.0), specify OSPFv2 interface
so-0/2/0, set the authentication type to md5, and then define the authentication key ID
as 5 and the password as PssWd8.
Configuration
CLI Quick To quickly configure MD5 authentication, copy the following command and paste it into
Configuration the CLI.
[edit]
set protocols ospf area 0.0.0.0 interface so-0/2/0 authentication md5 5 key PssWd8
[edit]
user@host# edit protocols ospf area 0.0.0.0
Results Confirm your configuration by entering the show protocols ospf command. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
NOTE: After you configure the password, you do not see the password itself.
The output displays the encrypted form of the password you configured.
Verification
Purpose Verify that the authentication method for sending and receiving OSPF protocol packets
is configured. When configured for MD5 authentication, the Authentication Type field
displays MD5, the Active key ID field displays the unique number you entered that identifies
the MD5 key, and the Start time field displays the date as Start time 1970 Jan 01 00:00:00
PST. Do not be alarmed by this start time. This is the default start time that the routing
device displays if the MD5 key is effective immediately.
Action From operational mode, enter the show ospf interface and the show ospf overview
commands.
Requirements
• Configure the device interfaces. See the Junos OS Network Interfaces Configuration Guide.
• Configure the router identifiers for the devices in your OSPF network. See “Example:
Configuring an OSPF Router Identifier” on page 510.
• Control OSPF designated router election. See “Example: Controlling OSPF Designated
Router Election” on page 511
Overview
MD5 authentication uses an encoded MD5 checksum that is included in the transmitted
packet. For MD5 authentication to work, both the receiving and transmitting routing
devices must have the same MD5 key.
You define an MD5 key for each interface. If MD5 is enabled on an interface, that interface
accepts routing updates only if MD5 authentication succeeds. Otherwise, updates are
rejected. The routing device only accepts OSPFv2 packets sent using the same key
identifier (ID) that is defined for that interface.
For increased security, you can configure multiple MD5 keys, each with a unique key ID,
and set the date and time to switch to a new key. The receiver of the OSPF packet uses
the ID to determine which key to use for authentication.
In this example, you configure new keys to take effect at 12:01 AM on the first day of the
next three months on OSPFv2 interface fe-0/0/1 in the backbone area (area 0.0.0.0),
and you configure the following MD5 authentication settings:
• md5—Specifies the MD5 authentication key ID. The key ID can be set to any value
between 0 and 255, with a default value of 0. The routing device only accepts OSPFv2
packets sent using the same key ID that is defined for that interface.
• key—Specifies the MD5 key. Each key can be a value from 1 through 16 characters long.
Characters can include ASCII strings. If you include spaces, enclose all characters in
quotation marks (“ “).
• start-time—Specifies the time to start using the MD5 key. This option enables you to
configure a smooth transition mechanism for multiple keys. The start time is relevant
for transmission but not for receiving OSPF packets.
NOTE: You must set the same passwords and transition dates and times on
all devices in the area so that OSPFv2 adjacencies remain active.
Configuration
CLI Quick To quickly configure multiple MD5 keys on an OSPFv2 interface, copy the following
Configuration commands, remove any line breaks, and then paste the commands into the CLI.
[edit]
set protocols ospf area 0.0.0.0 interface fe-0/1/0 authentication md5 1 key $2010HaL
set protocols ospf area 0.0.0.0 interface fe-0/1/0 authentication md5 2 key NeWpsswdFEB
start-time 2011-02-01.00:01
set protocols ospf area 0.0.0.0 interface fe-0/1/0 authentication md5 3 key NeWpsswdMAR
start-time 2011-03-01.00:01
set protocols ospf area 0.0.0.0 interface fe-0/1/0 authentication md5 4 key NeWpsswdAPR
start-time 2011-04-01.00:01
[edit]
user@host# edit protocols ospf area 0.0.0.0
3. Configure MD5 authentication and set an authentication password and key ID.
4. Configure a new key to take effect at 12:01 AM on the first day of February, March,
and April.
You configure a new authentication password and key ID for each month.
Results Confirm your configuration by entering the show protocols ospf command. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
NOTE: After you configure the password, you do not see the password itself.
The output displays the encrypted form of the password you configured.
Verification
Purpose Verify that the authentication method for sending and receiving OSPF protocol packets
is configured. When configured for MD5 authentication with a transition of keys, the Auth
type field displays MD5, the Active key ID field displays the unique number you entered
that identifies the MD5 key, and the Start time field displays the time at which the routing
device starts using an MD5 key to authenticate OSPF packets transmitted on the interface
you configured.
Action From operational mode, enter the show ospf interface and the show ospf overview
commands.
Requirements
• Configure the device interfaces. See the Junos OS Network Interfaces Configuration Guide.
• Configure the router identifiers for the devices in your OSPF network. See “Example:
Configuring an OSPF Router Identifier” on page 510.
• Control OSPF designated router election. See “Example: Controlling OSPF Designated
Router Election” on page 511
Overview
You can use IPsec authentication for both OSPFv2 and OSPFv3. You configure the actual
IPsec authentication separately and apply it to the applicable OSPF configuration.
OSPFv2
Beginning with Junos OS Release 8.3, you can use IPsec authentication to authenticate
OSPFv2 interfaces, the remote endpoint of a sham link, and the OSPFv2 virtual link by
using manual security associations (SAs) to ensure that a packet’s contents are secure
between the routing devices.
NOTE: You can configure IPsec authentication together with either MD5 or
simple authentication.
• For an OSPFv2 interface, include the ipsec-sa name statement for a specific interface:
• For a remote sham link, include the ispec-sa name statement for the remote end point
of the sham link:
NOTE: If a Layer 3 VPN configuration has multiple sham links with the
same remote endpoint IP address, you must configure the same IPsec
security association for all the remote endpoints. You configure a
Layer 3 VPN at the [edit routing-instances routing-instance-name
instance-type] hierarchy level. For more information about Layer 3 VPNs,
see the Junos OS VPNs Configuration Guide.
• For a virtual link, include the ipsec-sa name statement for a specific virtual link:
OSPFv3
OSPFv3 does not have a built-in authentication method and relies on IPsec to provide
this functionality. You use IPsec authentication to secure OSPFv3 interfaces and protect
OSPFv3 virtual links by using manual SAs to ensure that a packet’s contents are secure
between the routing devices.
• For an OSPFv3 interface, include the ipsec-sa name statement for a specific interface:
• For a virtual link, include the ipsec-sa name statement for a specific virtual link:
1. Configure IPsec authentication. To do this, define a manual SA named sa1 and specify
the processing direction, the protocol used to protect IP traffic, the security parameter
index (SPI), and the authentication algorithm and key.
spi—Configures the SPI for the manual SA. An SPI is an arbitrary value that uniquely
identifies which SA to use at the receiving host. The sending host uses the SPI to
identify and select which SA to use to secure every packet. The receiving host uses
the SPI to identify and select the encryption algorithm and key used to decrypt
packets. In this example, you specify 256.
2. Enable IPsec authentication on OSPF interface so-0/2/0.0 in the backbone area (area
0.0.0.0) by including the name of the manual SA sa1 that you configured at the [edit
security ipsec] hierarchy level.
Configuration
CLI Quick To quickly configure a manual SA to be used for IPsec authentication on an OSPF
Configuration interface, copy the following commands, remove any line breaks, and then paste the
commands into the CLI.
[edit]
set security ipsec security-association sa1
set security ipsec security-association sa1 mode transport
set security ipsec security-association sa1 manual direction bidirectional
set security ipsec security-association sa1 manual direction bidirectional protocol ah
set security ipsec security-association sa1 manual direction bidirectional spi 256
set security ipsec security-association sa1 manual direction bidirectional authentication
algorithm hmac-md5-96 key ascii-text 123456789012abc
[edit]
user@host# edit security ipsec security-association sa1
NOTE: Repeat this entire configuration on all peer OSPF routing devices.
Results Confirm your configuration by entering the show security ipsec command. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
NOTE: After you configure the password, you do not see the password itself.
The output displays the encrypted form of the password you configured.
CLI Quick To quickly apply a manual SA used for IPsec authentication to an OSPF interface, copy
Configuration the following command and paste it into the CLI.
[edit]
set protocols ospf area 0.0.0.0 interface so-0/2/0 ipsec-sa sa1
[edit]
user@host# edit protocols ospf area 0.0.0.0
NOTE: Repeat this entire configuration on all peer OSPF routing devices.
Results Confirm your configuration by entering the show protocols ospf command. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
To confirm your OSPFv3 configuration, enter the show protocols ospf3 command.
Verification
Purpose Verify the configured IPsec security association settings. Verify the following information:
• The Security association field displays the name of the configured security association.
Action From operational mode, enter the show ipsec security-associations command.
Purpose Verify that the IPsec security association that you configured has been applied to the
OSPF interface. Confirm that the IPSec SA name field displays the name of the configured
IPsec security association.
Action From operational mode, enter the show ospf interface detail command for OSPFv2, and
enter the show ospf3 interface detail command for OSPFv3.
NOTE: The default routing instance, master, refers to the main inet.0 routing
table. The master routing instance is reserved and cannot be specified as a
routing instance.
Each routing instance has a unique name and a corresponding IP unicast table. For
example, if you configure a routing instance with the name my-instance, the corresponding
IP unicast table is my-instance.inet.0. All routes for my-instance are installed into
my-instance.inet.0.
To configure a routing instance for OSPFv2, you must include at least the following
statements in the configuration:
[edit]
routing-instances {
routing-instance-name {
interface interface-name;
instance-type (forwarding | l2vpn | no-forwarding | virtual-router | vpls | vrf);
route-distinguisher (as-number:number | ip-address:number);
vrf-import [ policy-names ];
vrf-export [ policy-names ];
protocols {
ospf {
... ospf-configuration ...
}
}
}
}
NOTE: You can configure a logical interface under only one routing instance.
To configure a routing instance for OSPFv3, you must include at least the following
statements in the configuration:
[edit]
routing-instances {
routing-instance-name {
interface interface-name;
instance-type (no-forwarding | virtual-router | vrf);
vrf-import [ policy-names ];
vrf-export [ policy-names ];
protocols {
ospf3 {
... ospf3-configuration ...
}
}
}
}
NOTE: You can configure a logical interface under only one routing instance.
Multiple instances of OSPF are used for Layer 3 VPN implementations. The multiple
instances of OSPF keep routing information for different VPNs separate. The VRF instance
advertises routes from the customer edge (CE) router to the provider edge (PE) router
and advertises routes from the PE router to the CE router. Each VPN receives only routing
information belonging to that VPN.
You can create multiple instances of OSPF by including statements at the following
hierarchy levels:
rib-group group-name;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
Requirements
• Configure the device interfaces. See the Junos OS Network Interfaces Configuration Guide.
• Configure the router identifiers for the devices in your OSPF network. See “Example:
Configuring an OSPF Router Identifier” on page 510.
• Control OSPF designated router election. See “Example: Controlling OSPF Designated
Router Election” on page 511
Overview
When you configure multiple routing instances of OSPF, we recommend that you perform
the following tasks:
1. Configure the OSPFv2 or OSPFv3 default instance at the [edit protocols (ospf | ospf3)]
and [edit logical-systems logical-system-name protocols (ospf | ospf3)] hierarchy levels
with the statements needed for your network so that routes are installed in inet.0 and
in the forwarding table.
Make sure to include the routing table group.
• Interfaces
• Routing options
3. Configure a routing table group to install routes from the default route table, inet.0,
into a routing instance’s route table.
4. Configure a routing table group to install routes from a routing instance into the default
route table, inet.0.
5. Create an export policy to export routes with a specific tag, and use that tag to export
routes back into the instances. For more information, see the Junos OS Routing Policy
Configuration Guide.
Figure 5 on page 258 shows how you can use multiple routing instances of OSPFv2 or
OSPFv3 to segregate prefixes within a large network. The network consists of three
administrative entities: voice-policy, other-policy, and the default routing instance. Each
entity is composed of several geographically separate sites that are connected by the
backbone and managed by the backbone entity.
4 6
voice-policy other-policy
so-2/2/2.0 so-5/2/2.0
Backbone
1 3
so-4/2/2.0 so-3/2/2.0
7 5
Site C Site D
Sites A and D belong to the voice-policy routing instance. Sites B and C belong to the
other-policy instance. Device 1 and Device 3 at the edge of the backbone connect the
routing instances. Each runs a separate OSPF or OSPFv3 instance (one per entity).
Device 1 runs three OSPFv2 or OSPFv3 instances: one each for Site A (voice-policy), Site C
(other-policy), and the backbone, otherwise known as the default instance. Device 3 also
runs three OSPFv2 or OSPFv3 instances: one each for Site B (other-policy), Site D
(voice-policy), and the backbone (default instance).
When Device 1 runs the OSPFv2 or OSPFv3 instances, the following occur:
• Routes from the default instance routing table are placed in the voice-policy and
other-policy instance routing tables.
• Routes from the voice-policy routing instance are placed in the default instance routing
table.
• Routes from the other-policy routing instance are placed in the default instance routing
table.
• Routes from the voice-policy routing instance do not enter the other-policy instance
routing table.
• Routes from the other-policy routing instance do not enter the voice-policy instance
routing table.
Configuration
CLI Quick To quickly configure multiple routing instances of OSPF, copy the following commands,
Configuration remove any line breaks, and then paste the commands into the CLI.
Configuration on Device 1:
[edit]
set routing-instances voice-policy interface so-2/2/2
set routing-instances voice-policy protocols ospf rib-group voice-to-inet area 0.0.0.0
interface so-2/2/2
set routing-instances other-policy interface so-4/2/2
set routing-instances other-policy protocols ospf rib-group other-to-inet area 0.0.0.0
interface so-4/2/2
set routing-options rib-groups inet-to-voice-and-other import-rib [ inet.0 voice-policy.inet.0
other-policy.inet.0 ]
set routing-options rib-groups voice-to-inet import-rib [ voice-policy.inet.0 inet.0 ]
set routing-options rib-groups other-to-inet import-rib [ other-policy.inet.0 inet.0 ]
set protocols ospf rib-group inet-to-voice-and-other area 0.0.0.0 interface so-2/2/2
set protocols ospf rib-group inet-to-voice-and-other area 0.0.0.0 interface so-4/2/2
Configuration on Device 3:
[edit]
set routing-instances voice-policy interface so-3/2/2
set routing-instances voice-policy protocols ospf rib-group voice-to-inet area 0.0.0.0
interface so-3/2/2
set routing-instances other-policy interface so-5/2/2
set routing-instances other-policy protocols ospf rib-group other-to-inet area 0.0.0.0
interface so-5/2/2
set routing-options rib-groups inet-to-voice-and-other import-rib [ inet.0 voice-policy.inet.0
other-policy.inet.0 ]
set routing-options rib-groups voice-to-inet import-rib [ voice-policy.inet.0 inet.0 ]
set routing-options rib-groups other-to-inet import-rib [ other-policy.inet.0 inet.0 ]
set protocols ospf rib-group inet-to-voice-and-other area 0.0.0.0 interface so-3/2/2
set protocols ospf rib-group inet-to-voice-and-other area 0.0.0.0 interface so-5/2/2
[edit]
user@D1# set routing-instances voice-policy interface so-2/2/2
user@D1# set routing-instances voice-policy protocols ospf rib-group voice-to-inet
area 0.0.0.0 interface so-2/2/2
user@D1# set routing-instances other-policy interface so-4/2/2
user@D1# set routing-instances other-policy protocols ospf rib-group other-to-inet
area 0.0.0.0 interface so-4/2/2
[edit]
user@D3# set routing-instances voice-policy interface so-3/2/2
user@D3# set routing-instances voice-policy protocols ospf rib-group voice-to-inet
area 0.0.0.0 interface so-3/2/2
user@D3#set routing-instances other-policy interface so-5/2/2
user@D3# set routing-instances other-policy protocols ospf rib-group other-to-inet
area 0.0.0.0 interface so-5/2/2
2. Configure the routing table group inet-to-voice-and-other to take routes from inet.0
(default routing table) and place them in the voice-policy.inet.0 and
other-policy.inet.0 routing tables.
[edit]
user@D1# set routing-options rib-groups inet-to-voice-and-other import-rib [ inet.0
voice-policy.inet.0 other-policy.inet.0 ]
[edit]
user@D3# set routing-options rib-groups inet-to-voice-and-other import-rib [ inet.0
voice-policy.inet.0 other-policy.inet.0 ]
3. Configure the routing table group voice-to-inet to take routes from voice-policy.inet.0
and place them in the inet.0 default routing table.
[edit]
user@D1# set routing-options rib-groups voice-to-inet import-rib [ voice-policy.inet.0
inet.0 ]
[edit]
user@D3# set routing-options rib-groups voice-to-inet import-rib [ voice-policy.inet.0
inet.0 ]
4. Configure the routing table group other-to-inet to take routes from other-policy.inet.0
and place them in the inet.0 default routing table.
[edit]
user@D1# set routing-options rib-groups other-to-inet import-rib [ other-policy.inet.0
inet.0 ]
[edit]
user@D3# set routing-options rib-groups other-to-inet import-rib [ other-policy.inet.0
inet.0 ]
[edit]
[edit]
user@D3# set protocols ospf rib-group inet-to-voice-and-other area 0.0.0.0 interface
so-3/2/2
user@D3# set protocols ospf rib-group inet-to-voice-and-other area 0.0.0.0 interface
so-5/2/2
[edit]
user@host# commit
Results Confirm your configuration by entering the show routing-instances, show routing-options,
and show protocols ospf commands. If the output does not display the intended
configuration, repeat the instructions in this example to correct the configuration.
Configuration on Device 1:
Configuration on Device 3:
Verification
Action From operational mode, enter the show route instance detail command.
You configure OSPF timers on the interface of the routing device participating in OSPF.
Depending on the timer, the configured interval must be the same on all routing devices
on a shared network (area).
• Hello interval—Routing devices send hello packets at a fixed interval on all interfaces,
including virtual links, to establish and maintain neighbor relationships. The hello
interval specifies the length of time, in seconds, before the routing device sends a hello
packet out of an interface. This interval must be the same on all routing devices on a
shared network. By default, the routing device sends hello packets every 10 seconds
(broadcast and point-to-point networks) and 30 seconds (nonbroadcast multiple
access (NBMA) networks).
Once the routing device detects an active neighbor, the hello packet interval changes
from the time specified in the poll interval to the time specified in the hello interval.
• LSA retransmission interval—When a routing device sends LSAs to its neighbors, the
routing device expects to receive an acknowledgment packet from each neighbor
within a certain amount of time. The LSA retransmission interval specifies the length
of time, in seconds, that the routing device waits to receive an LSA packet before
retransmitting the LSA to an interface’s neighbors. By default, the routing device waits
5 seconds for an acknowledgment before retransmitting the LSA.
• Dead interval—If a routing device does not receive a hello packet from a neighbor within
a fixed amount of time, the routing device modifies its topology database to indicate
that the neighbor is nonoperational. The dead interval specifies the length of time, in
seconds, that the routing device waits before declaring that a neighboring routing
device is unavailable. This is an interval during which the routing device receives no
hello packets from the neighbor. This interval must be the same on all routing devices
on a shared network. By default, this interval is four times the default hello interval,
which is 40 seconds (broadcast and point-to-point networks) and 120 seconds (NBMA
networks).
Requirements
• Configure the device interfaces. See the Junos OS Network Interfaces Configuration Guide.
• Configure the router identifiers for the devices in your OSPF network. See “Example:
Configuring an OSPF Router Identifier” on page 510.
• Control OSPF designated router election. See “Example: Controlling OSPF Designated
Router Election” on page 511
Overview
The default OSPF timer settings are optimal for most networks. However, depending on
your network requirements, you might need to modify the timer settings. This example
explains why you might need to modify the following timers:
• Hello interval
• Dead interval
• Transit delay
The hello interval and the dead interval optimize convergence times by efficiently tracking
neighbor status. By lowering the values of the hello interval and the dead interval, you
can increase the convergence of OSPF routes if a path fails. These intervals must be the
same on all routing devices on a shared network. Otherwise, OSPF cannot establish the
appropriate adjacencies.
In the first example, you lower the hello interval to 2 seconds and the dead interval to 8
seconds on point-to-point OSPF interfaces fe-0/0/1 and fe-1/0/1 in area 0.0.0.0 by
configuring the following settings:
• hello-interval—Specifies the length of time, in seconds, before the routing device sends
a hello packet out of an interface. By default, the routing device sends hello packets
every 10 seconds. The range is from 1 through 255 seconds.
• dead-interval—Specifies the length of time, in seconds, that the routing device waits
before declaring that a neighboring routing device is unavailable. This is an interval
during which the routing device receives no hello packets from the neighbor. By default,
the routing device waits 40 seconds (four times the hello interval). The range is 1
through 65,535 seconds.
The link-state advertisement (LSA) retransmission interval optimizes the sending and
receiving of LSA and acknowledgement packets. You must configure the LSA
retransmission interval to be equal to or greater than 3 seconds to avoid triggering a
retransmit trap because the Junos OS delays LSA acknowledgments by up to 2 seconds.
If you have a virtual link, you might find increased performance by increasing the value
of the LSA retransmission interval.
In the second example, you increase the LSA retransmission timer to 8 seconds on OSPF
interface fe-0/0/1 in area 0.0.0.1 by configuring the following setting:
Transit Delay
The transit delay sets the time the routing device uses to age a link-state update packet.
If you have a slow link (for example, one with an average propagation delay of multiple
seconds), you should increase the age of the packet by a similar amount. Doing this
ensures that you do not receive a packet back that is younger than the original copy.
In the final example, you increase the transit delay to 2 seconds on OSPF interface fe-1/0/1
in area 0.0.0.1. By configuring the following setting, this causes the routing device to age
the link-state update packet by 2 seconds:
Configuration
• Configuring the Hello Interval and the Dead Interval on page 612
• Controlling the LSA Retransmission Interval on page 613
• Specifying the Transit Delay on page 614
CLI Quick To quickly configure the hello and dead intervals, copy the following commands and
Configuration paste them into the CLI.
[edit]
set protocols ospf area 0.0.0.0 interface fe-0/0/1 hello-interval 2
set protocols ospf area 0.0.0.0 interface fe-0/0/1 dead-interval 8
set protocols ospf area 0.0.0.0 interface fe-1/0/1 hello-interval 2
set protocols ospf area 0.0.0.0 interface fe-1/0/1 dead-interval 8
[edit]
user@host# edit protocols ospf area 0.0.0.0
Results Confirm your configuration by entering the show protocols ospf command. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
To confirm your OSPFv3 configuration, enter the show protocols ospf3 command.
CLI Quick To quickly configure the LSA retransmission interval, copy the following command and
Configuration paste it into the CLI.
[edit]
set protocols ospf area 0.0.0.1 interface fe-0/0/1 retransmit-interval 8
[edit]
user@host# edit protocols ospf area 0.0.0.1
Results Confirm your configuration by entering the show protocols ospf command. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
To confirm your OSPFv3 configuration, enter the show protocols ospf3 command.
CLI Quick To quickly configure the transit delay, copy the following command and paste it into the
Configuration CLI.
[edit]
set protocols ospf area 0.0.0.1 interface fe-1/0/1 transit-delay 2
[edit]
user@host# edit protocols ospf area 0.0.0.1
Results Confirm your configuration by entering the show protocols ospf command. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
To confirm your OSPFv3 configuration, enter the show protocols ospf3 command.
Verification
Purpose Verify that the interface for OSPF or OSPFv3 has been configured with the applicable
timer values. Confirm that the Hello field, the Dead field, and the ReXmit field display
the values that you configured.
Action From operational mode, enter the show ospf interface detail for OSPFv2, and enter the
show ospf3 interface detail command for OSPFv3.
and topologies. A pair of routing devices exchange BFD packets. Hello packets are sent
at a specified, regular interval. A neighbor failure is detected when the routing device
stops receiving a reply after a specified interval. The BFD failure detection timers have
shorter time limits than the OSPF failure detection mechanisms, providing faster detection.
These timers are also adaptive and can be adjusted to be more or less aggressive. For
example, the timer can adapt to a higher value if an adjacency fails, or a neighbor can
negotiate a higher value than the one configured.
NOTE: BFD is supported for OSPFv3 in Junos OS Release 9.3 and later.
• multiplier—Multiplier for hello packets. This setting configures the number of hello
packets that are not received by a neighbor, which causes the originating interface to
be declared down. By default, three missed hello packets cause the originating interface
to be declared down.
greater than the minimum transmit interval. If you attempt to commit a configuration
with a threshold value less than the minimum transmit interval, the routing device
displays an error and does not accept the configuration.
• version—BFD version. This setting configures the BFD version used for detection. You
can explicitly configure BFD version 1, or the routing device can automatically detect
the BFD version. By default, the routing device automatically detects the BFD version
automatically, which is either 0 or 1.
Requirements
• Configure the device interfaces. See the Junos OS Network Interfaces Configuration Guide.
• Configure the router identifiers for the devices in your OSPF network. See “Example:
Configuring an OSPF Router Identifier” on page 510.
• Control OSPF designated router election. See “Example: Controlling OSPF Designated
Router Election” on page 511
Overview
An alternative to adjusting the OSPF hello interval and dead interval settings to increase
route convergence is to configure BFD. The BFD Protocol is a simple hello mechanism
that detects failures in a network. The BFD failure detection timers have shorter timer
limits than the OSPF failure detection mechanisms, thereby providing faster detection.
BFD is useful on interfaces that are unable to detect failure quickly, such as Ethernet
interfaces. Other interfaces, such as SONET interfaces, already have built-in failure
detection. Configuring BFD on those interfaces is unnecessary.
You configure BFD on a pair of neighboring OSPF interfaces. Unlike the OSPF hello interval
and dead interval settings, you do not have to enable BFD on all interfaces in an OSPF
area.
• full-neighbors-only—In Junos OS Release 9.5 and later, configures the BFD Protocol
to establish BFD sessions only for OSPF neighbors with full neighbor adjacency. The
default behavior is to establish BFD sessions for all OSPF neighbors.
Configuration
CLI Quick To quickly configure the BFD protocol for OSPF, copy the following commands, remove
Configuration any line breaks, and then paste the commands into the CLI.
[edit]
set protocols ospf area 0.0.0.0 interface fe-0/0/1 bfd-liveness-detection minimum-interval
300
set protocols ospf area 0.0.0.0 interface fe-0/0/1 bfd-liveness-detection multiplier 4
set protocols ospf area 0.0.0.0 interface fe-0/0/1 bfd-liveness-detection full-neighbors-only
Step-by-Step To configure the BFD protocol for OSPF on one neighboring interface:
Procedure
1. Create an OSPF area.
[edit]
user@host# edit protocols ospf area 0.0.0.0
4. Configure the number of missed hello packets that cause the originating interface
to be declared down.
5. Configure BFD sessions only for OSPF neighbors with full neighbor adjacency.
Results Confirm your configuration by entering the show protocols ospf command. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
minimum-interval 300;
multiplier 4;
full-neighbors-only;
}
}
}
To confirm your OSPFv3 configuration, enter the show protocols ospf3 command.
Verification
Purpose Verify that the OSPF interfaces have active BFD sessions.
• The Interface field displays the interface you configured for BFD.
• The State field displays the state of the neighbor and should show Full to reflect the
full neighbor adjacency that you configured.
• The Transmit Interval field displays the time interval you configured to send BFD
packets.
Action From operational mode, enter the show bfd session detail command.
• Tracing BFD Protocol Traffic on page 86 in the Junos OS Routing Protocols Configuration
Guide
• keyed-md5—Keyed Message Digest 5 hash algorithm for sessions with transmit and
receive intervals greater than 100 ms. To authenticate the BFD session, keyed MD5
uses one or more secret keys (generated by the algorithm) and a sequence number
that is updated periodically. With this method, packets are accepted at the receiving
end of the session if one of the keys matches and the sequence number is greater than
or equal to the last sequence number received. Although more secure than a simple
password, this method is vulnerable to replay attacks. Increasing the rate at which the
sequence number is updated can reduce this risk.
• keyed-sha-1—Keyed Secure Hash Algorithm I for sessions with transmit and receive
intervals greater than 100 ms. To authenticate the BFD session, keyed SHA uses one
or more secret keys (generated by the algorithm) and a sequence number that is
updated periodically. The key is not carried within the packets. With this method,
packets are accepted at the receiving end of the session if one of the keys matches
and the sequence number is greater than the last sequence number received.
The security authentication keychain defines the authentication attributes used for
authentication key updates. When the security authentication keychain is configured and
associated with a protocol through the keychain name, authentication key updates can
occur without interrupting routing and signaling protocols.
The authentication keychain contains one or more keychains. Each keychain contains
one or more keys. Each key holds the secret data and the time at which the key becomes
valid. The algorithm and keychain must be configured on both ends of the BFD session,
and they must match. Any mismatch in configuration prevents the BFD session from
being created.
BFD allows multiple clients per session, and each client can have its own keychain and
algorithm defined. To avoid confusion, we recommend specifying only one security
authentication keychain.
The following sections provide instructions for configuring and viewing BFD authentication
on OSPF:
[edit]
2. Specify the keychain to be used to associate BFD sessions on the specified OSPF
route or routing instance with the unique security authentication keychain attributes.
This keychain should match the keychain name configured at the [edit security
authentication key-chains] hierarchy level.
[edit]
user@host# set protocols ospf area 0.0.0.1 interface if2-ospf bfd-liveness-detection
authentication keychain bfd-ospf
• At least one key, a unique integer between 0 and 63. Creating multiple keys allows
multiple clients to use the BFD session.
• The time at which the authentication key becomes active, in the format
yyyy-mm-dd.hh:mm:ss.
[edit security]
user@host# authentication-key-chains key-chain bfd-ospf key 53 secret
$9$ggaJDmPQ6/tJgF/AtREVsyPsnCtUHm start-time 2009-06-14.10:00:00
[edit]
user@host> set protocols ospf interface if2-ospf bfd-liveness-detection authentication
loose-check
5. (Optional) View your configuration using the show bfd session detail or show bfd
session extensive command.
6. Repeat the steps in this procedure to configure the other end of the BFD session.
NOTE: BFD authentication is only supported in the Canada and United States
version of the Junos OS image and is not available in the export version.
You can view the existing BFD authentication configuration using the show bfd session
detail and show bfd session extensive commands.
The following example shows BFD authentication configured for the if2-ospf BGP group.
It specifies the keyed SHA-1 authentication algorithm and a keychain name of bfd-ospf.
The authentication keychain is configured with two keys. Key 1 contains the secret data
“$9$ggaJDmPQ6/tJgF/AtREVsyPsnCtUHm” and a start time of June 1, 2009, at 9:46:02
AM PST. Key 2 contains the secret data “$9$a5jiKW9l.reP38ny.TszF2/9” and a start time
of June 1, 2009, at 3:29:20 PM PST.
If you commit these updates to your configuration, you would see output similar to the
following. In the output for the show bfd sessions detail command, Authenticate is
displayed to indicate that BFD authentication is configured.
1 sessions, 1 clients
Cumulative transmit rate 10.0 pps, cumulative receive rate 10.0 pps
For more information about the configuration, use the show bfd sessions extensive
command. The output for this command provides the keychain name, the authentication
algorithm and mode for each client in the session, and the overall BFD authentication
configuration status, keychain name, and authentication algorithm and mode.
NOTE: On a broadcast link with a single neighbor, when the neighbor initiates
an OSPFv3 graceful restart operation, the restart might be terminated at the
point when the local routing device assumes the role of a helper. A change
in the LSA is considered a topology change, which terminates the neighbor’s
restart operation.
Graceful restart is disabled by default. You can either globally enable graceful restart for
all routing protocols, or you can enable graceful restart specifically for OSPF.
When a device enabled for OSPF graceful restart restarts, it retains routes learned before
the restart in its forwarding table. The device does not allow new OSPF link-state
advertisements (LSAs) to update the routing table. This device continues to forward
traffic to other OSPF neighbors (or helper routers), and sends only a limited number of
LSAs during the restart period. To reestablish OSPF adjacencies with neighbors, the
restarting device must send a grace LSA to all neighbors. In response, the helper routers
enter helper mode (the ability to assist a neighboring device attempting a graceful restart)
and send an acknowledgment back to the restarting device. If there are no topology
changes, the helper routers continue to advertise LSAs as if the restarting device had
remained in continuous OSPF operation.
NOTE: Helper mode is enabled by default when you start the routing platform,
even if graceful restart is not enabled. You can disable helper mode
specifically for OSPF.
When the restarting device receives replies from all the helper routers, the restarting
device selects routes, updates the forwarding table, and discards the old routes. At this
point, full OSPF adjacencies are reestablished and the restarting device receives and
processes OSPF LSAs as usual. When the helper routers no longer receive grace LSAs
from the restarting device or when the topology of the network changes, the helper
routers also resume normal operation.
Beginning with Junos OS Release 11.4, you can configure restart signaling-based helper
mode for OSPFv2 graceful restart configurations. The Junos OS implementation is based
on RFC 4811, OSPF Out-of-Band Link State Database (LSDB) Resynchronization, RFC 4812,
OSPF Restart Signaling, and RFC 4813, OSPF Link-Local Signaling. In restart signaling-based
helper mode implementations, the restarting device informs its restart status to its
neighbors only after the restart is complete. When the restart is complete, the restarting
device sends hello messages to its helper routers with the restart signal (RS) bit set in
the hello packet header. When a helper router receives a hello packet with the RS bit set
in the header, the helper router returns a hello message to the restarting device. The reply
hello message from the helper router contains the ResyncState flag and the
ResyncTimeout timer that enable the restarting device to keep track of the helper routers
that are syncing up with it. When all helpers complete the synchronization, the restarting
device exits the restart mode.
OSPF supports two types of graceful restart: planned and unplanned. During a planned
restart, the restarting routing device informs the neighbors before restarting. The neighbors
act as if the routing device is still within the network topology, and continue forwarding
traffic to the restarting routing device. A grace period is set to specify when the neighbors
should consider the restarting routing device as part of the topology. During an unplanned
restart, the routing device restarts without warning.
Requirements
• Configure the router identifiers for the devices in your OSPF network. See “Example:
Configuring an OSPF Router Identifier” on page 510.
• Control OSPF designated router election. See “Example: Controlling OSPF Designated
Router Election” on page 511
Overview
Graceful restart allows a routing device undergoing a restart to inform its adjacent
neighbors and peers of its condition. During a graceful restart, the restarting routing device
and its neighbors continue forwarding packets without disrupting network performance.
By default, graceful restart is disabled. You can globally enable graceful restart for all
routing protocols by including the graceful-restart statement at the [edit routing-options]
hierarchy level, or you can enable graceful restart specifically for OSPF by including the
graceful-restart statement at the [edit protocols (ospf|ospf3)] hierarchy level.
The first example shows how to enable graceful restart and configure the optional settings
for the grace period interval. In this example, interfaces fe-1/1/1 and fe-1/1/2 are in OSPF
area 0.0.0.0, and you configure those interfaces for graceful restart. The grace period
interval for OSPF graceful restart is determined as equal to or less than the sum of the
notify-duration time interval and the restart-duration time interval. The grace period is
the number of seconds that the routing device’s neighbors continue to advertise the
routing device as fully adjacent, regardless of the connection state between the routing
device and its neighbors.
The notify-duration configures the amount of time (in seconds) the routing device notifies
helper routers that it has completed graceful restart by sending purged grace LSAs over
all interfaces. By default, the routing device sends grace LSAs for 30 seconds. The range
is from 1 through 3600 seconds.
The restart-duration configures the amount of time the routing device waits (in seconds)
to complete reacquisition of OSPF neighbors from each area. By default, the routing
device allows 180 seconds. The range is from 1 through 3600 seconds.
The second example shows how to disable graceful restart for OSPF by including the
disable statement.
Configuration
CLI Quick To quickly enable graceful restart for OSPF, copy the following commands and paste
Configuration them into the CLI.
[edit]
set interfaces fe-1/1/1 unit 0 family inet address 10.0.0.4
set interfaces fe-1/1/2 unit 0 family inet address 10.0.0.5
set protocols ospf area 0.0.0.0 interface fe-1/1/1
set protocols ospf area 0.0.0.0 interface fe-1/1/2
set protocols ospf graceful-restart restart-duration 190
set protocols ospf graceful-restart notify-duration 40
[edit]
user@host# set interfaces fe-1/1/1 unit 0 family inet address 10.0.0.4
user@host# set interfaces fe-1/1/1 unit 0 family inet address 10.0.0.5
[edit]
user@host# set protocols ospf area 0.0.0.0 interface fe-1/1/1
user@host# set protocols ospf area 0.0.0.0 interface fe-1/1/2
[edit]
user@host# edit protocols ospf graceful-restart
Results Confirm your configuration by entering the show interfaces and show protocols ospf
commands. If the output does not display the intended configuration, repeat the
instructions in this example to correct the configuration.
interface fe-1/1/2.0;
}
To confirm your OSPFv3 configuration, enter the show interfaces and the show protocols
ospf3 commands.
CLI Quick To quickly disable graceful restart for OSPF, copy the following command and paste it
Configuration into the CLI.
[edit]
set protocols ospf graceful-restart disable
This command does not affect the global graceful restart configuration setting.
[edit]
user@host# set protocols ospf graceful-restart disable
[edit]
user@host# commit
Results Confirm your configuration by entering the show protocols ospf command. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
To confirm your OSPFv3 configuration, enter the show protocols ospf3 command.
Verification
Purpose Verify information about your OSPF graceful restart configuration. The Restart field
displays the status of graceful restart as either enabled or disabled, the Restart duration
field displays the time period for complete reacquisition of OSPF neighbors, and the
Restart grace period displays the time period for which the neighbors should consider
the restart routing device as part of the topology.
Action From operational mode, enter the show ospf overview command for OSPFv2, and enter
the show ospf3 overview command for OSPFv3.
Purpose Verify the status of graceful restart. The Restart State field displays Pending if the restart
has not completed or Complete if the restart has finished, and the Path selection timeout
field indicates the amount of time remaining until graceful restart is declared complete.
There is a more detailed Restart State field that displays a list of protocols that have
completed graceful restart or have not yet completed graceful restart for the specified
routing table.
Action From operational mode, enter the show route instance detail command.
Example: Configuring the Helper Capability Mode for OSPFv2 Graceful Restart
This example shows how to disable and reenable the helper mode capability for OSPFv2
graceful restart.
Requirements
• Configure the router identifiers for the devices in your OSPF network. See “Example:
Configuring an OSPF Router Identifier” on page 510.
• Control OSPF designated router election. See “Example: Controlling OSPF Designated
Router Election” on page 511
Overview
The OSPF graceful restart helper capability assists a neighboring routing device attempting
a graceful restart. By default, the helper capability is globally enabled when you start the
routing platform. This means that the helper capability is enabled when you start OSPF,
even if graceful restart is not globally enabled or specifically enabled for OSPF. You can
further modify your graceful restart configuration to disable the helper capability.
Beginning with Junos OS Release 11.4, you can configure restart signaling-based helper
mode for OSPFv2 graceful restart configurations. Both the standard and restart
signaling-based helper modes are enabled by default.
In the first example, interfaces fe-1/1/1 and fe-1/1/2 are in OSPFv2 area 0.0.0.0, and you
configure those interfaces for graceful restart. You then disable the standard OSPFv2
graceful restart helper capability by including the helper-disable standard statement.
This configuration is useful if you have an environment that contains other vendor
equipment that is configured for restart signaling-based graceful restart.
The second example shows how to reenable the standard OSPFv2 restart helper capability
that you disabled in the first example.
Configuration
CLI Quick To quickly enable graceful restart for OSPFv2 with helper mode disabled, copy the
Configuration following commands and paste them into the CLI.
[edit]
set interfaces fe-1/1/1 unit 0 family inet address 10.0.0.4
set interfaces fe-1/1/2 unit 0 family inet address 10.0.0.5
set protocols ospf area 0.0.0.0 interface fe-1/1/1
set protocols ospf area 0.0.0.0 interface fe-1/1/2
set protocols ospf graceful-restart helper-disable standard
Step-by-Step To enable graceful restart for OSPFv2 with helper mode disabled:
Procedure
1. Configure the interfaces.
[edit]
user@host# set interfaces fe-1/1/1 unit 0 family inet address 10.0.0.4
user@host# set interfaces fe-1/1/1 unit 0 family inet address 10.0.0.5
[edit]
user@host# set protocols ospf area 0.0.0.0 interface fe-1/1/1
user@host# set protocols ospf area 0.0.0.0 interface fe-1/1/2
[edit]
[edit]
user@host# commit
Results Confirm your configuration by entering the show interfaces and the show protocols ospf
commands. If the output does not display the intended configuration, repeat the
instructions in this example to correct the configuration.
CLI Quick To quickly reenable standard helper-mode for OSPFv2, copy the following command
Configuration and paste it into the CLI.
[edit]
delete protocols ospf graceful-restart helper-disable standard
[edit]
user@host# delete protocols ospf graceful-restart helper-disable standard
[edit]
user@host# commit
Results After you reenable standard helper mode, the show protocols ospf command no longer
displays the graceful restart configuration.
Verification
Purpose Verify information about your OSPFv2 graceful restart configuration. The Restart field
displays the status of graceful restart as either enabled or disabled, the Graceful restart
helper mode field displays the status of the standard helper mode capability as enabled
or disabled, and the Restart-signaling helper mode field displays the status of the restart
signaling-based helper mode as enabled or disabled. By default, both standard and
restart signaling-based helper modes are enabled.
Action From operational mode, enter the show ospf overview command.
Purpose Verify the status of graceful restart. The Restart State field displays Pending if the restart
has not completed, or Complete if the restart has finished. The Path selection timeout
field indicates the amount of time remaining until graceful restart is declared complete.
There is a more detailed Restart State field that displays a list of protocols that have
completed graceful restart or have not yet completed graceful restart for the specified
routing table.
Action From operational mode, enter the show route instance detail command.
Example: Configuring the Helper Capability Mode for OSPFv3 Graceful Restart
This example shows how to disable and reenable the helper mode capability for OSPFv3
graceful restart.
Requirements
• Configure the router identifiers for the devices in your OSPF network. See “Example:
Configuring an OSPF Router Identifier” on page 510.
• Control OSPF designated router election. See “Example: Controlling OSPF Designated
Router Election” on page 511
Overview
The OSPF graceful restart helper capability assists a neighboring routing device attempting
a graceful restart. By default, the helper capability is globally enabled when you start the
routing platform. This means that the helper capability is enabled when you start OSPF,
even if graceful restart is not globally enabled or specifically enabled for OSPF. You can
further modify your graceful restart configuration to disable the helper capability.
In the first example, interfaces fe-1/1/1 and fe-1/1/2 are in OSPFv3 area 0.0.0.0, and you
configure those interfaces for graceful restart. You then disable the OSPFv3 graceful
restart helper capability by including the helper-disable statement.
The second example shows how to reenable the OSPFv3 restart helper capability that
you disabled in the first example.
Configuration
CLI Quick To quickly enable graceful restart for OSPFv3 with helper mode disabled, copy the
Configuration following commands and paste them into the CLI.
[edit]
set interfaces fe-1/1/1 unit 0 family inet6 address 2002:0a00:0004::
set interfaces fe-1/1/2 unit 0 family inet6 address 2002:0a00:0005::
set protocols ospf3 area 0.0.0.0 interface fe-1/1/1
set protocols ospf3 area 0.0.0.0 interface fe-1/1/2
set protocols ospf3 graceful-restart helper-disable
Step-by-Step To enable graceful restart for OSPFv3 with helper mode disabled:
Procedure
1. Configure the interfaces.
[edit]
user@host# set interfaces fe-1/1/1 unit 0 family inet6 address 2002:0a00:0004::
user@host# set interfaces fe-1/1/1 unit 0 family inet address 2002:0a00:0005::
[edit]
user@host# set protocols ospf3 area 0.0.0.0 interface fe-1/1/1
user@host# set protocols ospf3 area 0.0.0.0 interface fe-1/1/2
[edit]
user@host# set protocols ospf3 graceful-restart helper-disable
[edit]
user@host# commit
Results Confirm your configuration by entering the show interfaces and the show protocols ospf3
commands. If the output does not display the intended configuration, repeat the
instructions in this example to correct the configuration.
CLI Quick To quickly reenable helper-mode for OSPFv3, copy the following command and paste
Configuration it into the CLI.
[edit]
delete protocols ospf3 graceful-restart helper-disable
[edit]
user@host# delete protocols ospf3 graceful-restart helper-disable
[edit]
user@host# commit
Results After you reenable standard helper mode, the show protocols ospfs command no longer
displays the graceful restart configuration.
Verification
Purpose Verify information about your OSPFv3 graceful restart configuration. The Restart field
displays the status of graceful restart as either enabled or disabled, and the Helper mode
field displays the status of the helper mode capability as either enabled or disabled.
Action From operational mode, enter the show ospf3 overview command.
Purpose Verify the status of graceful restart. The Restart State field displays Pending if the restart
has not completed, or Complete if the restart has finished. The Path selection timeout
field indicates the amount of time remaining until graceful restart is declared complete.
There is a more detailed Restart State field that displays a list of protocols that have
completed graceful restart or have not yet completed graceful restart for the specified
routing table.
Action From operational mode, enter the show route instance detail command.
Requirements
• Configure the router identifiers for the devices in your OSPF network. See “Example:
Configuring an OSPF Router Identifier” on page 510.
• Control OSPF designated router election. See “Example: Controlling OSPF Designated
Router Election” on page 511
Overview
You can disable strict LSA checking to prevent the termination of graceful restart by a
helping router. You might configure this option for interoperability with other vendor
devices. The OSPF graceful restart helper capability must be enabled if you disable strict
LSA checking. By default, LSA checking is enabled.
In this example, interfaces fe-1/1/1 and fe-1/1/2 are in OSPF area 0.0.0.0, and you configure
those interfaces for graceful restart. You then disable strict LSA checking by including
the no-strict-lsa-checking statement.
Configuration
CLI Quick To quickly enable graceful restart for OSPF with strict LSA checking disabled, copy the
Configuration following commands and paste them into the CLI.
[edit]
set interfaces fe-1/1/1 unit 0 family inet address 10.0.0.4
set interfaces fe-1/1/2 unit 0 family inet address 10.0.0.5
Step-by-Step To enable graceful restart for OSPF with strict LSA checking disabled:
Procedure
1. Configure the interfaces.
[edit]
user@host# set interfaces fe-1/1/1 unit 0 family inet address 10.0.0.4
user@host# set interfaces fe-1/1/1 unit 0 family inet address 10.0.0.5
[edit]
user@host# set protocols ospf area 0.0.0.0 interface fe-1/1/1
user@host# set protocols ospf area 0.0.0.0 interface fe-1/1/2
[edit]
user@host# set protocols ospf graceful-restart no-strict-lsa-checking
[edit ]
user@host# commit
Results Confirm your configuration by entering the show interfaces and the show protocols ospf
commands. If the output does not display the intended configuration, repeat the
instructions in this example to correct the configuration.
}
}
}
user@host# show protocols ospf
graceful-restart {
no-strict-lsa-checking;
}
area 0.0.0.0 {
interface fe-1/1/1.0;
interface fe-1/1/2.0;
}
To confirm your OSPFv3 configuration, enter the show interfaces and the show protocols
ospf3 commands.
Verification
Purpose Verify information about your OSPF graceful restart configuration. The Restart field
displays the status of graceful restart as either enabled or disabled.
Action From operational mode, enter the show ospf overview command for OSPFv2, and enter
the show ospf3 overview command for OSPFv3.
Purpose Verify the status of graceful restart. The Restart State field displays Pending if the restart
has not completed, or Complete if the restart has finished. The Path selection timeout
field indicates the amount of time remaining until graceful restart is declared complete.
There is a more detailed Restart State field that displays a list of protocols that have
completed graceful restart or have not yet completed graceful restart for the specified
routing table.
Action From operational mode, enter the show route instance detail command.
A loop-free path is one that does not forward traffic back through the routing device to
reach a given destination. That is, a neighbor whose shortest path first to the destination
traverses the routing device that is not used as a backup route to that destination. To
determine loop-free alternate paths for OSPF routes, Junos OS runs shortest-path-first
(SPF) calculations on each one-hop neighbor. You can enable support for alternate
loop-free routes on any OSPF interface. Because it is common practice to enable LDP
on an interface for which OSPF is already enabled, this feature also provides support for
LDP label-switched paths (LSPs.)
The level of backup coverage available through OSPF routes depends on the actual
network topology and is typically less than 100 percent for all destinations on any given
routing device. You can extend backup coverage to include RSVP LSP paths.
Junos OS provides two mechanisms for route redundancy for OSPF through alternate
loop-free routes:
• Link protection—Offers per-link traffic protection. Use link protection when you assume
that only a single link might become unavailable but that the neighboring node on the
primary path would still be available through another interface.
When you enable link protection or node-link protection on an OSPF interface, Junos OS
creates an alternate path to the primary next hop for all destination routes that traverse
a protected interface.
• Logical systems
• Include the link-protection statement at the [edit protocols (ospf | ospf3) area area-id
interface interface-name] hierarchy level.
BEST PRACTICE: When you configure link protection for OSPF, you must
also configure a per-packet load-balancing routing policy to ensure that the
routing protocol process installs all the next hops for a given route in the
routing table.
In the following example, the OSPF interface so-0/0/0.0 in area 0.0.0.0 is configured
for link protection. If a link for a destination route that traverses this interface becomes
unavailable, Junos OS creates a loop-free backup path through another interface on the
neighboring node, thus avoiding the link that is no longer available.
[edit]
protocols {
ospf {
area 0.0.0.0 {
interface so-0/0/0.0 {
link-protection;
}
}
}
}
• Logical systems
• Include the node-link-protection statement at the [edit protocols (ospf | ospf3) area
area-id interface interface-name] hierarchy level.
In the following example, the OSPF interface so-0/0/0.0 in area 0.0.0.0 is configured
for node-link protection. If a link for a destination route that traverses this interface
becomes unavailable, Junos OS creates a loop-free backup path through a different
routing device altogether, thus avoiding the primary next-hop routing device.
[edit]
protocols {
ospf {
area 0.0.0.0 {
interface so-0/0/0.0 {
node-link-protection;
}
}
}
}
• Include the no-eligible-backup statement at the [edit protocols (ospf | ospf3) area
area-id interface interface-name] hierarchy level.
In the following example, interface so-0/0/0.0 has been configured to prohibit backup
traffic for traffic destined for a protected interface. This means that if a neighboring
next-hop path or node for a protected interface fails, interface so-0/0/0.0 cannot be
used to transmit traffic to a backup path.
[edit]
protocols {
ospf {
area 0.0.0.0 {
interface so-0/0/0.0 {
no-eligible-backup;
}
}
}
}
• Disable the calculation of backup next hops for an OSPF instance or a specific topology
in an instance.
• Prevent the installation of backup next hops in the routing table or the forwarding table
for an OSPF instance or a specific topology in an instance.
• Limit the calculation of backup next hops to a subset of paths as defined in RFC 5286,
Basic Specification for IP Fast Reroute: Loop-Free Alternates.
You can disable the backup SPF algorithm for an OSPF instance or specific topology in
an instance. Doing so prevents the calculation of backup next hops for that OSPF instance
or topology.
To disable the calculation of backup next hops for an OSPF instance or topology:
• Include the disable statement at the [edit protocols (ospf | ospf3) backup-spf-options]
or [edit protocols ospf backup-spf-options topology topology-name] hierarchy level.
In the following example, the calculation of backup next hops is disabled for the OSPF
topology voice:
[edit]
protocols {
ospf {
topology voice {
backup-spf-options {
disable;
}
}
}
}
You can configure the routing device to prevent the installation of backup next hops in
the routing table or the forwarding table for an OSPF instance, or a specific topology in
an OSPF instance. The SPF algorithm continues to calculate backup next hops, but they
are not installed.
To prevent the routing device from installing backup next hops in the routing table or the
forwarding table:
• Include the no-install statement at the [edit protocols (ospf | ospf3) backup-spf-options]
or the [edit protocols ospf topology topology-name] hierarchy level.
In the following example, backup next hops for the OSPF topology voice are not installed
in the routing table or forwarding table. Any calculated backup next hops for other OSPF
instances or topologies continue to be installed.
[edit]
protocols {
ospf {
topology voice {
backup-spf-options {
no-install;
}
}
}
}
You can limit the calculation of backup next hops to downstream paths, as defined in
RFC 5286. You can specify for Junos OS to use only downstream paths as backup next
hops for protected interfaces for an OSPF instance or a specific topology in an OSPF
instance. In a downstream path, the distance from the backup neighbor to the destination
must be smaller than the distance from the calculating routing device to the destination.
Using only downstream paths as loop-free alternate paths for protected interfaces
ensures that these paths do not result in microloops. However, you might experience less
than optimal backup coverage for your network.
In the following example, only downstream paths are calculated as backup next hops
for the topology voice:
[edit]
protocols {
ospf {
topology voice {
backup-spf-options {
downstream-paths-only;
}
}
}
}
When configuring an LSP, you must specify the IP address of the egress router.
NOTE: RSVP LSPs can be used as backup paths only for the default topology
for OSPFv2 and not for a configured topology. Additionally, RSVP LSP cannot
be used a backup paths for non-default instances for OSPFv2 or OSPFv3.
2. Specify the address of the egress router by including the to ip-address statement at
the [edit protocols mpls label-switched-path] hierarchy level.
In the following example, the RSVP LSP f-to-g is configured as a backup LSP for protected
OSPF interfaces. The egress router is configured with the IP address 192.168.1.4.
[edit]
protocols {
mpls {
label-switched-path f-to-g {
to 192.168.1.4;
backup;
}
}
To help provide traffic engineering and MPLS with information about network topology
and loading, extensions have been added to the Junos OS implementation of OSPF.
When traffic engineering is enabled on the routing device, you can enable OSPF traffic
engineering support. When you enable traffic engineering for OSPF, the shortest-path-first
(SPF) algorithm takes into account the various label-switched paths (LSPs) configured
under MPLS and configures OSPF to generate opaque link-state advertisements (LSAs)
that carry traffic engineering parameters. The parameters are used to populate the traffic
engineering database. The traffic engineering database is used exclusively for calculating
explicit paths for the placement of LSPs across the physical topology. The Constrained
Shortest Path First (CSPF) algorithm uses the traffic engineering database to compute
the paths that MPLS LSPs take. RSVP uses this path information to set up LSPs and to
reserve bandwidth for them.
preference is used to determine the credibility value, IS-IS routes are not automatically
preferred by the traffic engineering database, depending on your configuration.
• shortcuts—Configures IGP shortcuts, which allows OSPF to use an LSP as the next
hop as if it were a logical interface from the ingress routing device to the egress routing
device. The address specified in the to statement at the [edit protocols mpls
label-switched-path lsp-path-name] hierarchy level on the ingress routing device must
match the router ID of the egress routing device for the LSP to function as a direct link
to the egress routing device and to be used as input to the OSPF SPF calculations.
When used in this way, LSPs are no different from Asynchronous Transfer Mode (ATM)
and Frame Relay virtual circuits (VCs), except that LSPS carry only IPv4 traffic.
OSPFv2 installs the prefix for IPv4 routes in the inet.0 routing table, and the LSPs are
installed by default in the inet.3 routing table.
OSPFv3 LSPs used for shortcuts continue to be signaled using IPv4. However, by
default, shortcut IPv6 routes calculated through OSPFv3 are added to the inet6.3
routing table. The default behavior is for BGP only to use LSPs in its calculations. If you
configure MPLS so that both BGP and IGPs use LSPs for forwarding traffic, IPv6 shortcut
routes calculated through OSPFv3 are added to the inet6.0 routing table.
When you enable traffic engineering on the routing device, you can also configure an
OSPF metric that is used exclusively for traffic engineering. The traffic engineering metric
is used for information injected into the traffic engineering database. Its value does not
affect normal OSPF forwarding.
Requirements
• Configure the device interfaces. See the Junos OS Network Interfaces Configuration Guide.
• Configure BGP per your network requirements. See the Junos OS Routing Protocols
Configuration Guide
• Configure MPLS per your network requirements. See the Junos OS MPLS Applications
Configuration Guide.
Overview
You can configure OSPF to treat an LSP as a link and have other routing devices in the
network use this LSP. To accomplish this, you configure MPLS and OSPF traffic
engineering to advertise the LSP metric in summary LSAs.
In this example, there are four routing devices in area 0.0.0.0, and you want OSPF to
treat the LSP named R1-to-R4 that goes from the ingress Device R1 to the egress Device
R4 as a link.
For OSPF, you enable traffic engineering on all four routing devices in the area by including
the traffic-engineering statement. This configuration ensures that the shortest-path-first
(SPF) algorithm takes into account the LSPs configured under MPLS and configures
OSPF to generate LSAs that carry traffic engineering parameters. You further ensure that
OSPF uses the MPLS LSP as the next hop and advertises the LSP metric in summary
LSAs, by including the optional shortcuts lsp-metric-into-summary statement on the
ingress Device R1.
For MPLS, you enable traffic engineering so that MPLS performs traffic engineering on
both BGP and IGP destinations by including the traffic-engineering bgp-igp statement,
and you include the LSP named R1-to-R4 by including the label-switched-path
lsp-path-name to address statement on the ingress Device R1. The address specified in
the to statement on the ingress Device R1 must match the router ID of the egress Device
R4 for the LSP to function as a direct link to the egress routing device and to be used as
input to the OSPF SPF calculations. In this example, the router ID of the egress Device
R4 is 10.0.0.4.
Configuration
The following example requires you to navigate various levels in the configuration
hierarchy. For information about navigating the CLI, see Modifying the Junos OS
Configuration in Junos OS CLI, Release 11.4.
CLI Quick To quickly enable OSPF traffic engineering support to advertise the LSP metric in summary
Configuration LSAs, copy the following commands and paste them into the CLI.
Configuration on R1:
[edit]
set routing-options router-id 10.0.0.1
set protocols ospf area 0.0.0.0 interface all
set protocols ospf area 0.0.0.0 interface fxp0.0 disable
set protocols ospf traffic-engineering shortcuts lsp-metric-into-summary
set protocols mpls traffic-engineering bgp-igp
set protocols mpls label-switched-path R1-to-R4 to 10.0.0.4
Configuration on R2:
[edit]
set routing-options router-id 10.0.0.2
set protocols ospf area 0.0.0.0 interface all
set protocols ospf area 0.0.0.0 interface fxp0.0 disable
set protocols ospf traffic-engineering
Configuration on R3:
[edit]
set routing-options router-id 10.0.0.3
set protocols ospf area 0.0.0.0 interface all
set protocols ospf area 0.0.0.0 interface fxp0.0 disable
set protocols ospf traffic-engineering
Configuration on R4:
[edit]
set routing-options router-id 10.0.0.4
set protocols ospf area 0.0.0.0 interface all
set protocols ospf area 0.0.0.0 interface fxp0.0 disable
set protocols ospf traffic-engineering
Step-by-Step To enable OSPF traffic engineering support to advertise LSP metrics in summary LSAs:
Procedure
1. Configure the router ID.
[edit]
user@R1# set routing-options router-id 10.0.0.1
[edit]
user@R2# set routing-options router-id 10.0.0.2
[edit]
user@R3# set routing-options router-id 10.0.0.3
[edit]
user@R4# set routing-options router-id 10.0.0.4
[edit]
user@R1# set protocols ospf area 0.0.0.0 interface all
user@R1# set protocols ospf area 0.0.0.0 interface fxp0.0 disable
[edit]
user@R2# set protocols ospf area 0.0.0.0 interface all
user@R2# set protocols ospf area 0.0.0.0 interface fxp0.0 disable
[edit]
user@R3# set protocols ospf area 0.0.0.0 interface all
user@R3# set protocols ospf area 0.0.0.0 interface fxp0.0 disable
[edit]
user@R4# set protocols ospf area 0.0.0.0 interface all
user@R4# set protocols ospf area 0.0.0.0 interface fxp0.0 disable
[edit]
user@R1 set protocols ospf traffic-engineering shortcuts lsp-metric-into-summary
[edit]
user@R2 set protocols ospf traffic-engineering
[edit]
user@R3 set protocols ospf traffic-engineering
[edit]
user@R4 set protocols ospf traffic-engineering
[edit ]
user@R1 set protocol mpls traffic-engineering bgp-igp
user@R1 set protocols mpls label-switched-path R1-to-R4 to 10.0.0.4
[edit]
user@host# commit
Results Confirm your configuration by entering the show routing-options, show protocols ospf,
and show protocols mpls commands. If the output does not display the intended
configuration, repeat the instructions in this example to correct the configuration.
}
area 0.0.0.0 {
interface all;
interface fxp0.0 {
disable;
}
}
To confirm your OSPFv3 configuration, enter the show routing-options, show protocols
ospf3, and show protocols mpls commands.
Verification
Purpose Verify that traffic engineering has been enabled for OSPF. By default, traffic engineering
is disabled.
Action From operational mode, enter the show ospf overview command for OSPFv2, and enter
the show ospf3 overview for OSPFv3.
Purpose Verify the OSPF information in the traffic engineering database. The Protocol field displays
OSPF and the area from which the information was learned.
Action From operational mode, enter the show ted database command.
Verifying That the Traffic Engineering Database Is Learning Node Information from OSPF
Purpose Verify that OSPF is reporting node information. The Protocol name field displays OSPF
and the area from which the information was learned.
Action From operational mode, enter the show ted protocol command.
Example: Configuring the Traffic Engineering Metric for a Specific OSPF Interface
This example shows how to configure the OSPF metric value used for traffic engineering.
Requirements
• Configure the device interfaces. See the Junos OS Network Interfaces Configuration Guide.
• Configure OSPF for traffic engineering. See “Example: Enabling OSPF Traffic Engineering
Support” on page 650
Overview
You can configure an OSPF metric that is used exclusively for traffic engineering. To
modify the default value of the traffic engineering metric, include the te-metric statement.
The OSPF traffic engineering metric does not affect normal OSPF forwarding. By default,
the traffic engineering metric is the same value as the OSPF metric. The range is 1 through
65,535.
In this example, you configure the OSPF traffic engineering metric on OSPF interface
fe-0/1/1 in area 0.0.0.0.
Configuration
CLI Quick To quickly configure the OSPF traffic engineering metric for a specific interface, copy the
Configuration following command and paste it into the CLI.
[edit]
set protocols ospf area 0.0.0.0 interface fe-0/1/1 te-metric 10
Step-by-Step To configure an OSPF traffic engineering metric for a specific interface used only for
Procedure traffic engineering:
[edit]
user@host# edit protocols ospf area 0.0.0.0
Results Confirm your configuration by entering the show protocols ospf command. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
To confirm your OSPFv3 configuration, enter the show protocols ospf3 command.
Verification
Purpose Verify the traffic engineering metric value. Confirm that Metric field displays the configured
traffic engineering metric.
Action From operational mode, enter the show ted database extensive command.
To flood this link address information within the AS and make it available for traffic
engineering calculations, you must configure OSPF passive mode for traffic engineering
on each inter-AS interface. You must also supply the remote address for OSPF to
distribute and include it in the traffic engineering database. OSPF traffic engineering
mode allows MPLS label-switched paths (LSPs) to dynamically discover OSPF AS
boundary routers and to allow routers to establish a traffic engineering LSP across multiple
autonomous systems.
Requirements
• Configure the device interfaces. See the Junos OS Network Interfaces Configuration Guide.
• Configure BGP per your network requirements. See the Junos OS Routing Protocols
Configuration Guide.
• Configure the LSP per your network requirements. See the Junos OS MPLS Applications
Configuration Guide.
• Configure the router identifiers for the devices in your OSPF network. See “Example:
Configuring an OSPF Router Identifier” on page 510.
• Control OSPF designated router election. See “Example: Controlling OSPF Designated
Router Election” on page 511
Overview
You can configure OSPF passive mode for traffic engineering on an inter-AS interface.
The address used for the remote node of the OSPF passive traffic engineering link must
be the same as the address used for the EBGP link. In this example, you configure interface
so-1/1/0 in area 0.0.0.1 as the inter-AS link to distribute traffic engineering information
with OSPF within the AS and include the following settings:
• remote-node-id—Specifies the IP address at the far end of the inter-AS link. In this
example, the remote IP address is 192.168.207.2.
Configuration
To quickly configure OSPF passive mode for traffic engineering, copy the following
command, remove any line breaks, and paste it into the CLI.
[edit]
set protocols ospf area 0.0.0.1 interface so-1/1/0 passive traffic-engineering remote-node-id
192.168.207.2
[edit]
user@host# set protocols ospf area 0.0.0.1
Results Confirm your configuration by entering the show protocols ospf command. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
To confirm your OSPFv3 configuration, enter the show protocols ospf3 command.
Verification
Purpose Verify the status of OSPF interfaces. If the interface is passive, the Adj count field is 0
because no adjacencies have been formed. Next to this field, you might also see the word
Passive.
Action From operational mode, enter the show ospf interface detail command for OSPFv2, and
enter the show ospf3 interface detail command for OSPFv3.
2. Use the LSP metric configured for the label-switched path under MPLS.
3. If you do not configure any of the above, use the default OSPFv2 metric of 1.
NOTE: If you want an LSP that is announced into OSPFv2 to be used in SPF
calculations, there must be a reverse link (that is, a link from the tail end of
the LSP to the head end). You can accomplish this by configuring an LSP in
the reverse direction and also announcing it in OSPFv2.
Requirements
Before you begin, configure the device interfaces. See the Junos OS Network Interfaces
Configuration Guide.
Overview
To advertise an LSP into OSPFv2, you define the LSP and configure OSPFv2 to route
traffic using the LSP. By doing this, you can use the LSP to control the shortest path
between two points on the network. You might choose to do this if you want to have
OSPF traffic routed along the LSP instead of having OSPF use the default best-effort
routing.
In this example, you configure the following to advertise an LSP into OSPFv2:
• BGP
For all routing devices, configure the local AS number 65000 and define the IBGP
group that recognizes the specified BGP systems as peers. All members are internal
to the local AS, so you configure an internal group with a full list of peers. You also
include the peer AS group, which is the same as the local AS number that you configure.
• MPLS
For all routing devices, configure the protocol family on each transit logical interface
and enable MPLS on all interfaces, except for the management interface (fxp0.0).
Specify the mpls protocol family type.
• RSVP
For all routing devices, enable RSVP on all interfaces, except for the management
interface (fxp0.0). You enable RSVP on the devices in this network to ensure that the
interfaces can signal the LSP.
• OSPFv2
For all routing devices, use the loopback address to assign the router ID, administratively
group all of the devices into OSPF area 0.0.0.0, add all of the interfaces participating
in OSPF to area 0.0.0.0, and disable OSPF on the management interface (fxp0.0).
• Label-switched path
On the ingress routing device R1, which is the beginning (or head end) of the LSP,
configure an LSP with an explicit path. The explicit path indicates that the LSP must
go to the next specified IP address in the path without traversing other nodes. In this
example, you create an LSP named R1-to-R6, and you specify the IP address of the
egress routing device R6.
On the ingress routing device R1, you advertise the LSP as a point-to-point link into
OSPFv2. You can optionally assign a metric to have the LSP be the more or less
preferred path to the destination.
Figure 27 on page 661 shows a sample network topology that consists of the following:
• BGP is configured on all routing devices, with one local autonomous system (AS)
65000 that contains three routing devices:
AS 65000
LSP R1-to-R6
g040908
Area 0.0.0.0
Configuration
The following examples require you to navigate various levels in the configuration
hierarchy. For information about navigating the CLI, see Modifying the Junos OS
Configuration in Junos OS CLI, Release 11.4.
To configure the devices to advertise an LSP into OSPFv2, perform the following tasks:
Configuring BGP
CLI Quick To quickly configure BGP on each routing device, copy the following commands and
Configuration paste them into the CLI.
[edit]
set routing-options autonomous-system 65000
set protocols bgp group internal-peers type internal
set protocols bgp group internal-peers local-address 10.0.0.1
set protocols bgp group internal-peers neighbor 10.0.0.3
[edit]
set routing-options autonomous-system 65000
set protocols bgp group internal-peers type internal
set protocols bgp group internal-peers local-address 10.0.0.3
set protocols bgp group internal-peers neighbor 10.0.0.1
set protocols bgp group internal-peers neighbor 10.0.0.6
set protocols bgp group internal-peers peer-as 65000
[edit]
set routing-options autonomous-system 65000
set protocols bgp group internal-peers type internal
set protocols bgp group internal-peers local-address 10.0.0.6
set protocols bgp group internal-peers neighbor 10.0.0.1
set protocols bgp group internal-peers neighbor 10.0.0.3
set protocols bgp group internal-peers peer-as 65000
[edit]
user@R1# set routing-options autonomous-system 65000
[edit]
user@R3# set routing-options autonomous-system 65000
[edit]
user@R6# set routing-options autonomous-system 65000
[edit]
user@R1# set protocols bgp group internal-peers type internal
user@R1# set protocols bgp group internal-peers local-address 10.0.0.1
user@R1# set protocols bgp group internal-peers neighbor 10.0.0.3
user@R1# set protocols bgp group internal-peers neighbor 10.0.0.6
user@R1# set protocols bgp group internal-peers peer-as 65000
[edit]
user@R3# set protocols bgp group internal-peers type internal
user@R3# set protocols bgp group internal-peers local-address 10.0.0.3
user@R3# set protocols bgp group internal-peers neighbor 10.0.0.1
user@R3# set protocols bgp group internal-peers neighbor 10.0.0.6
user@R3# set protocols bgp group internal-peers peer-as 65000
[edit]
user@R6# set protocols bgp group internal-peers type internal
user@R6# set protocols bgp group internal-peers local-address 10.0.0.6
user@R6# set protocols bgp group internal-peers neighbor 10.0.0.1
user@R6# set protocols bgp group internal-peers neighbor 10.0.0.3
user@R6# set protocols bgp group internal-peers peer-as 65000
[edit]
user@host# commit
Results Confirm your configuration by entering the show routing-options and show protocols bgp
commands. If the output does not display the intended configuration, repeat the
instructions in this example to correct the configuration.
Configuration on R1:
Configuration on R3:
Configuration on R6:
Configuring MPLS
CLI Quick To quickly configure MPLS on all of the routing devices in AS 65000, copy the following
Configuration commands and paste them into the CLI.
[edit]
[edit]
set interfaces so-0/0/2 unit 0 family mpls
set interfaces so-0/0/3 unit 0 family mpls
set protocols mpls interface all
set protocols mpls interface fxp0.0 disable
[edit]
set interfaces so-0/0/3 unit 0 family mpls
set protocols mpls interface all
set protocols mpls interface fxp0.0 disable
[edit ]
user@R1# set interfaces so-0/0/2 unit 0 family mpls
[edit ]
user@R3# set interfaces so-0/0/2 unit 0 family mpls
user@R3# set interfaces so-0/0/3 unit 0 family mpls
[edit ]
user@R6# set interfaces so-0/0/3 unit 0 family mpls
2. Enable MPLS.
[edit ]
user@R1# set protocols mpls interface all
[edit ]
user@R3# set protocols mpls interface all
[edit ]
user@R6# set protocols mpls interface all
[edit ]
user@R1# set protocols mpls interface fxp0.0 disable
[edit ]
user@R3# set protocols mpls interface fxp0.0 disable
[edit ]
user@R6# set protocols mpls interface fxp0.0 disable
[edit]
user@host# commit
Results Confirm your configuration by entering the show interfaces and show protocols mpls
commands. If the output does not display the intended configuration, repeat the
instructions in this example to correct the configuration.
Configuring RSVP
CLI Quick To quickly configure RSVP on all of the routing devices in AS 65000, copy the following
Configuration commands and paste them into the CLI.
[edit]
set protocols rsvp interface so-0/0/2
set protocols rsvp interface fxp0.0 disable
[edit]
set protocols rsvp interface so-0/0/2
set protocols rsvp interface so-0/0/3
set protocols rsvp interface fxp0.0 disable
[edit]
set protocols rsvp interface so-0/0/3
set protocols rsvp interface fxp0.0 disable
[edit ]
user@R1# set protocols rsvp interface so-0/0/2
[edit ]
user@R3# set protocols rsvp interface so-0/0/2
user@R3# set protocols rsvp interface so-0/0/3
[edit ]
user@R6# set protocols rsvp interface so-0/0/3
[edit ]
user@R1# set protocols rsvp interface fxp0.0 disable
[edit ]
user@R3# set protocols rsvp interface fxp0.0 disable
[edit ]
user@R6# set protocols rsvp interface fxp0.0 disable
[edit]
user@host# commit
Results Confirm your configuration by entering the show protocols rsvp command. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
Configuring OSPF
CLI Quick To quickly configure OSPF, copy the following commands and paste them into the CLI.
Configuration
Configuration on Device R1:
[edit]
set routing-options router-id 10.0.0.1
set protocols ospf area 0.0.0.0 interface all
set protocols ospf area 0.0.0.0 interface fxp0.0 disable
[edit]
set routing-options router-id 10.0.0.3
set protocols ospf area 0.0.0.0 interface all
set protocols ospf area 0.0.0.0 interface fxp0.0 disable
[edit]
set routing-options router-id 10.0.0.6
set protocols ospf area 0.0.0.0 interface all
set protocols ospf area 0.0.0.0 interface fxp0.0 disable
[edit]
user@R1# set routing-options router-id 10.0.0.1
[edit]
user@R3# set routing-options router-id 10.0.0.3
[edit]
user@R6# set routing-options router-id 10.0.0.6
[edit]
user@R1# set protocols ospf area 0.0.0.0 interface all
[edit]
user@R3# set protocols ospf area 0.0.0.0 interface all
[edit]
user@R6# set protocols ospf area 0.0.0.0 interface all
[edit]
user@R1# set protocols ospf area 0.0.0.0 interface fxp0.0 disable
[edit]
user@R3# set protocols ospf area 0.0.0.0 interface fxp0.0 disable
[edit]
user@R6# set protocols ospf area 0.0.0.0 interface fxp0.0 disable
[edit ]
user@host# commit
Results Confirm your configuration by entering the show routing-options and the show protocols
ospf commands. If the output does not display the intended configuration, repeat the
instructions in this example to correct the configuration.
interface fxp0.0 {
disable;
}
}
CLI Quick To quickly configure the LSP on the ingress routing device Router R1, copy the following
Configuration command and paste it into the CLI.
[edit]
set protocols mpls label-switched-path R1-to-R6 to 10.0.0.6
[edit]
user@R1# edit protocols mpls
[edit ]
user@R1# commit
Results Confirm your configuration by entering the show protocols mpls command. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
CLI Quick To quickly advertise the LSP into OSPFv2 and optionally include a metric for the LSP on
Configuration Device R1, copy the following commands and paste them into the CLI.
[edit]
set protocols ospf area 0.0.0.0 label-switched-path R1-to-R6
set protocols ospf area 0.0.0.0 label-switched-path R1-to-R6 metric 2
[edit]
user@R1# edit protocols ospf
2. Include the label-switched-path statement, and specify the LSP R1-to-R6 that you
created.
[edit ]
user@R1# set protocols ospf area 0.0.0.0 label-switched-path R1-to-R6 metric 2
[edit ]
user@R1# commit
Results Confirm your configuration by entering the show protocols ospf command. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
Verification
Purpose Verify that another neighbor is listed and is reachable over the LSP. The interface field
indicates the name of the LSP.
Action From operational mode, enter the show ospf neighbor command.
Each sham link is identified by the combination of a local endpoint address and a remote
endpoint address. Figure 28 on page 671 shows an OSPFv2 sham link. Router CE1 and
Router CE2 are located in the same OSPFv2 area. These customer edge (CE) routing
devices are linked together by a Layer 3 VPN over Router PE1 and Router PE2. In addition,
Router CE1 and Router CE2 are connected by an intra-area link used as a backup.
OSPFv2 treats the link through the Layer 3 VPN as an interarea link. By default, OSPFv2
prefers intra-area links to interarea links, so OSPFv2 selects the backup intra-area link
as the active path. This is not acceptable in a configuration where the intra-area link is
not the expected primary path for traffic between the CE routing devices. You can
configure the metric for the sham link to ensure that the path over the Layer 3 VPN is
preferred to a backup path over an intra-area link connecting the CE routing devices.
For the remote endpoint, you can configure the OSPFv2 interface as a demand circuit,
configure IPsec authentication (you configure the actual IPsec authentication separately),
and define the metric value.
You should configure an OSPFv2 sham link under the following circumstances:
If there is no intra-area link between the CE routing devices, you do not need to configure
an OSPFv2 sham link.
NOTE: In Junos OS Release 9.6 and later, an OSPFv2 sham link is installed
in the routing table as a hidden route. Additionally, a BGP route is not exported
to OSPFv2 if a corresponding OSPF sham link is available.
Requirements
• Configure the device interfaces. See the Junos OS Network Interfaces Configuration Guide.
• Configure the Layer 3 VPN per your network requirements. See the Junos OS VPNs
Configuration Guide.
• Configure the VPN import and VPN export policies per your network requirements. See
the Junos OS VPNs Configuration Guide.
• Configure the router identifiers for the devices in your OSPF network. See “Example:
Configuring an OSPF Router Identifier” on page 510.
• If required, control OSPF designated router election. See “Example: Controlling OSPF
Designated Router Election” on page 511
Overview
The sham link is an unnumbered point-to-point intra-area link and is advertised by means
of a type 1 link-state advertisement (LSA). Sham links are valid only for routing instances
and OSPFv2.
Each sham link is identified by a combination of the local endpoint address and a remote
endpoint address and the OSPFv2 area to which it belongs. You manually configure the
sham link between two PE devices, both of which are within the same VPN routing and
forwarding (VRF) routing instance, and you specify the address for the local end point
of the sham link. This address is used as the source for the sham link packets and is also
used by the remote PE routing device as the sham link remote end point. You can also
include the optional metric option to set a metric value for the remote end point. The
metric value specifies the cost of using the link. Routes with lower total path metrics are
preferred over those with higher path metrics.
• Configure the VRF routing instance that supports Layer 3 VPNs on the PE routing device,
and associate the sham link with an existing OSPF area. The OSPFv2 sham link
configuration is also included in the routing instance. You configure the sham link’s
local endpoint address, which is the loopback address of the local VPN, and the remote
endpoint address, which is the loopback address of the remote VPN. In this example,
the VRF routing instance is named example-sham-links.
Configuration
CLI Quick To quickly enable OSPFv2 sham links on PE1, copy the following commands, remove any
Configuration line breaks, and then paste the commands into the CLI.
[edit]
set interfaces lo0 unit 1 family inet address 10.1.1.1/32
set routing-instances example-sham-links instance-type vrf
set routing-instances example-sham-links interface fe-0/1/0
set routing-instances example-sham-links interface lo0.1
set routing-instances example-sham-links route-distinguisher 1.1.1.1:1
set routing-instances example-sham-links vrf-import vpn-test-import
set routing-instances example-sham-links vrf-export vpn-test-export
set routing-instances example-sham-links protocols ospf sham-link local 10.1.1.1
set routing-instances example-sham-links protocols ospf area 0.0.0.0 sham-link-remote
10.2.2.2 metric 10
set routing-instances example-sham-links protocols ospf area 0.0.0.0 interface fe-0/1/0
set routing-instances example-sham-links protocols ospf area 0.0.0.0 interface lo0.1
To quickly enable OSPFv2 sham links on PE2, copy the following commands, remove
any line breaks, and then paste the commands into the CLI.
[edit]
set interfaces lo0 unit 1 family inet address 10.2.2.2/32
set routing-instances example-sham-links instance-type vrf
set routing-instances example-sham-links interface fe-0/2/0
set routing-instances example-sham-links interface lo0.1
set routing-instances example-sham-links route-distinguisher 1.1.1.1:1
set routing-instances example-sham-links vrf-import vpn-test-import
set routing-instances example-sham-links vrf-export vpn-test-export
set routing-instances example-sham-links protocols ospf sham-link local 10.2.2.2
set routing-instances example-sham-links protocols ospf area 0.0.0.0 sham-link-remote
10.1.1.1 metric 10
set routing-instances example-sham-links protocols ospf area 0.0.0.0 interface fe-0/2/0
set routing-instances example-sham-links protocols ospf area 0.0.0.0 interface lo0.1
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Modifying the Junos OS
Configuration in Junos OS CLI, Release 11.4.
[edit]
user@PE1# set interfaces lo0 unit 1 family inet address 10.1.1.1/32
[edit]
user@PE2# set interfaces lo0 unit 1 family inet address 10.2.2.2/32
[edit]
user@PE1# edit routing instances example-sham-links
[edit routing instances example-sham-links]
user@PE1#set instance-type vrf
[edit routing instances example-sham-links]
user@PE1#set interface fe-0/1/0
[edit routing instances example-sham-links]
user@PE1#set interface lo0.1
[edit routing instances example-sham-links]
user@PE1#set route-distinguisher 1.1.1.1:1
[edit routing instances example-sham-links]
user@PE1#set vrf-import vpn-test-import
[edit routing instances example-sham-links]
user@PE1#set vrf-export vpn-test-export
[edit]
user@PE2# edit routing instances example-sham-links
[edit routing instances example-sham-links]
user@PE2# set instance-type vrf
[edit routing instances example-sham-links]
user@PE2# set interface fe-0/2/0
[edit routing instances example-sham-links]
user@PE2# set interface lo0.1
[edit routing instances example-sham-links]
user@PE2# set route-distinguisher 1.1.1.1:1
[edit routing instances example-sham-links]
user@PE2# set vrf-import vpn-test-import
[edit routing instances example-sham-links]
user@PE2# set vrf-export vpn-test-export
[edit routing instances example-sham-links]
Results Confirm your configuration by entering the show interfaces and the show routing-instances
commands. If the output does not display the intended configuration, repeat the
instructions in this example to correct the configuration.
Verification
Purpose Verify the sham link interface. The sham link is treated as an interface in OSPFv2, with
the named displayed as shamlink.<unique identifier>, where the unique identifier is a
number. For example, shamlink.0. The sham link appears as a point-to-point interface.
Action From operational mode, enter the show ospf interface instance instance-name command.
Verifying the Local and Remote End Points of the Sham Link
Purpose Verify the local and remote end points of the sham link. The MTU for the sham link
interface is always zero.
Action From operational mode, enter the show ospf interface instance instance-name detail
command.
Action From operational mode, enter the show ospf neighbor instance instance-name command.
Purpose Verify that the router LSA originated by the instance carries the sham link adjacency as
an unnumbered point-to-point link. The link data for sham links is a number ranging from
0x80010000 through 0x8001ffff.
Action From operational mode, enter the show ospf database instance instance-name command.
When you enable OSPF database protection, the maximum number of LSAs you specify
includes all LSAs whose advertising router ID is not equal to the local router ID
(nonself-generated LSAs). These might include external LSAs as well as LSAs with any
scope such as the link, area, and autonomous system (AS).
Once the specified maximum LSA count is exceeded, the database typically enters into
the ignore state. In this state, all neighbors are brought down, and nonself-generated
LSAs are destroyed. In addition, the database sends out hellos but ignores all received
packets. As a result, the database does not form any full neighbors, and therefore does
not learn about new LSAs. However, if you have configured the warning-only option, only
a warning is issued and the database does not enter the ignore state but continues to
operate as before.
• A warning threshold for issuing a warning message before the LSA limit is reached.
• An ignore state time during which the database must remain in the ignore state and
after which normal operations can be resumed.
• An ignore state count that limits the number of times the database can enter the ignore
state, after which it must enter the isolate state. The isolate state is very similar to the
ignore state, but has one important difference: once the database enters the isolate
state, it must remain there until you issue a command to clear database protection
before it can return to normal operations.
• A reset time during which the database must stay out of the ignore or isolate state
before it is returned to a normal operating state.
• Logical systems
• OSPFv3 realms
• ignore-count number—Specify the number of times the database can enter the
ignore state before it goes into the isolate state.
• ignore-time seconds—Specify the time limit the database must remain in the ignore
state before it resumes regular operations.
• reset-time seconds—Specify the time during which the database must operate
without being in either the ignore or isolate state before it is reset to a normal
operating state.
4. (Optional) Include the warning-only statement to prevent the database from entering
the ignore state or isolate state when the maximum LSA count is exceeded.
NOTE: If you include the warning-only statement, values for the other
optional statements at the same hierarchy level are not used when the
maximum LSA number is exceeded.
5. Verify your configuration by checking the database protection fields in the output of
the show ospf overview command.
In the import statement, you list the name of the routing policy used to filter OSPF external
routes from being installed into the routing tables of OSPF neighbors. You can filter the
routes, but not link-state address (LSA) flooding. An external route is a route that is
outside the OSPF Autonomous System (AS). The import policy does not impact the
OSPF database. This means that the import policy has no impact on the link-state
advertisements.
In the export statement, you list the name of the routing policy to be evaluated when
routes are being exported from the routing table into OSPF.
By default, if a routing device has multiple OSPF areas, learned routes from other areas
are automatically installed into area 0 of the routing table.
To specify more than one policy and create a policy chain, you list the policies using a
space as a separator. If multiple policies are specified, the policies are evaluated in the
order in which they are specified. As soon as an accept or reject action is executed, the
policy chain evaluation ends.
Routing policies are made up of one or more terms. A term is a named structure in which
match conditions and actions are defined. You can define one or more terms. The name
can contain letters, numbers, and hyphens ( - ) and can be up to 255 characters long. To
include spaces in the name, enclose the entire name in double quotation marks.
• Match conditions are criteria that a route must match before the actions can be applied.
If a route matches all criteria, one or more actions are applied to the route.
• Actions specify whether to accept or reject the route, control how a series of policies
are evaluated, and manipulate the characteristics associated with a route.
A match condition defines the criteria that a route must match for an action to take place.
You can define one or more match conditions for each term. If a route matches all of the
match conditions for a particular term, the actions defined for that term are processed.
Each term can include two statements, from and to, that define the match conditions:
• In the from statement, you define the criteria that an incoming route must match. You
can specify one or more match conditions. If you specify more than one, they all must
match the route for a match to occur.
The from statement is optional. If you omit the from and the to statements, all routes
are considered to match.
NOTE: In export policies, omitting the from statement from a routing policy
term might lead to unexpected results. For more information, see Applying
Routing Policies and Policy Chains to Routing Protocols in the Junos OS
Routing Policy Configuration Guide.
• In the to statement, you define the criteria that an outgoing route must match. You
can specify one or more match conditions. If you specify more than one, they all must
match the route for a match to occur.
The order of the match conditions in a term is not important because a route must match
all match conditions in a term for an action to be taken.
For a complete list of match conditions, see Configuring Match Conditions in Routing
Policy Terms in the Junos OS Routing Policy Configuration Guide.
An action defines what the routing device does with the route when the route matches
all the match conditions in the from and to statements for a particular term. If a term
does not have from and to statements, all routes are considered to match and the actions
apply to all routes.
Each term can have one or more of the following types of actions. The actions are
configured under the then statement.
• Flow control actions, which affect whether to accept or reject the route and whether
to evaluate the next term or routing policy.
The then statement is optional. If you omit it, one of the following occurs:
• If the routing policy has no more terms, the next routing policy, if one exists, is evaluated.
• If there are no more terms or routing policies, the accept or reject action specified by
the default policy is executed.
For a complete list of routing policy actions, see Configuring Actions in Routing Policy
TermsJunos OS Routing Policy Configuration Guide
Requirements
Overview
In this example, you create a routing policy called injectpolicy1 and a routing term called
injectterm1. The policy injects OSPF routes into the BGP routing table.
Configuration
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
4. Specify that the route is to be accepted if the previous conditions are matched.
[edit]
Results Confirm your configuration by entering the show policy-options and show protocols bgp
commands from configuration mode. If the output does not display the intended
configuration, repeat the instructions in this example to correct the configuration.
If you are done configuring the device, enter commit from configuration mode.
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
Results Confirm your configuration by entering the show policy-options and show routing-options
commands from configuration mode. If the output does not display the intended
configuration, repeat the instructions in this example to correct the configuration.
If you are done configuring the device, enter commit from configuration mode.
Verification
Troubleshooting
Using the show log Command to Examine the Actions of the Routing Policy
Problem The routing table contains unexpected routes, or routes are missing from the routing
table.
Solution If you configure policy tracing as shown in this example, you can run the show log
ospf-bgp-policy-log command to diagnose problems with the routing policy. The show
log ospf-bgp-policy-log command displays information about the routes that the
injectpolicy1 policy term analyzes and acts upon.
Requirements
• Configure the device interfaces. See the Junos OS Network Interfaces Configuration Guide.
• Configure static routes. See “Examples: Configuring Static Routes” on page 93 in the
Junos OS Routing Protocols Configuration Guide.
Overview
In this example, you create a routing policy called exportstatic1 and a routing term called
exportstatic1. The policy injects static routes into OSPF. This example includes the
following settings:
• policy-statement—Defines the routing policy. You specify the name of the policy and
further define the elements of the policy. The policy name must be unique and can
contain letters, numbers, and hyphens ( - ) and be up to 255 characters long.
• term—Defines the match condition and applicable actions for the routing policy. The
term name can contain letters, numbers, and hyphens ( - ) and be up to 255 characters
long. You specify the name of the term and define the criteria that an incoming route
must match by including the from statement and the action to take if the route matches
the conditions by including the then statement. In this example you specify the static
protocol match condition and the accept action.
• export—Applies the export policy you created to be evaluated when routes are being
exported from the routing table into OSPF.
Configuration
CLI Quick To quickly create a policy that injects static routes into OSPF, copy the following
Configuration commands and paste them into the CLI.
[edit]
set policy-options policy-statement exportstatic1 term exportstatic1 from protocol static
set policy-options policy-statement exportstatic1 term exportstatic1 then accept
set protocols ospf export exportstatic1
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Modifying the Junos OS
Configuration in Junos OS CLI, Release 11.4.
[edit]
user@host# edit policy-options policy-statement exportstatic1
NOTE: For OSPFv3, include the ospf3 statement at the [edit protocols]
hierarchy level.
[edit]
user@host# set protocols ospf export exportstatic1
[edit]
user@host# commit
Results Confirm your configuration by entering the show policy-options and show protocols ospf
commands. If the output does not display the intended configuration, repeat the
instructions in this example to correct the configuration.
To confirm your OSPFv3 configuration, enter the show policy-options and the show
protocols ospf3 commands.
Verification
• Verifying That the Expected Static Routes Are Present on page 686
• Verifying That AS External LSAs Are Added to the Routing Table on page 686
Purpose On the routing device where you configured the export policy, verify that the routing
device originates an AS external LSA for the static routes that are added to the routing
table.
Action From operational mode, enter the show ospf database command for OSPFv2, and enter
the show ospf3 database command for OSPFv3.
Requirements
• Configure static routes. See “Examples: Configuring Static Routes” on page 93 in the
Junos OS Routing Protocols Configuration Guide.
• Configure the router identifiers for the devices in your OSPF network. See “Example:
Configuring an OSPF Router Identifier” on page 510.
• Control OSPF designated router election. See “Example: Controlling OSPF Designated
Router Election” on page 511.
Overview
External routes are learned by AS boundary routers. External routes can be advertised
throughout the OSPF domain if you configure the AS boundary router to redistribute the
route into OSPF. An external route might be learned by the AS boundary router from a
routing protocol other than OSPF, or the external route might be a static route that you
configure on the AS boundary router.
For OSPFv3, the link-state advertisement (LSA) is referred to as the interarea prefix LSA
and performs the same function as a network-summary LSA performs for OSPFv2. An
area border router (ABR) originates an interarea prefix LSA for each IPv6 prefix that must
be advertised into an area.
OSPF import policy allows you to prevent external routes from being added to the routing
tables of OSPF neighbors. The import policy does not impact the OSPF database. This
means that the import policy has no impact on the link-state advertisements. The filtering
is done only on external routes in OSPF. The intra-area and interarea routes are not
considered for filtering. The default action is to accept the route when the route does
not match the policy.
• policy-statement—Defines the routing policy. You specify the name of the policy and
further define the elements of the policy. The policy name must be unique and can
contain letters, numbers, and hyphens ( - ) and be up to 255 characters long.
• export—Applies the export policy you created to be evaluated when network summary
LSAs are flooded into an area. In this example, the export policy is named export_static.
• import—Applies the import policy you created to prevent external routes from being
added to the routing table. In this example, the import policy is named filter_routes.
The devices you configure in this example represent the following functions:
• R1—Device R1 is in area 0.0.0.0 and has a direct connection to device R2. R1 has an
OSPF export policy configured. The export policy redistributes static routes from R1’s
routing table into R1’s OSPF database. Because the static route is in R1’s OSPF database,
the route is advertised in an LSA to R1’s OSPF neighbor. R1’s OSPF neighbor is device
R2.
• R2—Device R2 is in area 0.0.0.0 and has a direct connection to device R1. R2 has an
OSPF import policy configured that matches the static route to the 10.0.16.0/30 network
and prevents the static route from being installed in R2’s routing table. R2’s OSPF
neighbor is device R1.
Configuration
CLI Quick To quickly configure an OSPF import policy, copy the following commands, removing
Configuration any line breaks, and then paste the commands into the CLI.
[edit]
set interfaces so-0/2/0 unit 0 family inet address 10.0.2.1/30
set protocols ospf export export_static
set protocols ospf area 0.0.0.0 interface so-0/2/0
set policy-options policy-statement export_static from protocol static
set policy-options policy-statement export_static then accept
[edit]
set interfaces so-0/2/0 unit 0 family inet address 10.0.2.2/30
set protocols ospf import filter_routes
set protocols ospf area 0.0.0.0 interface so-0/2/0
set policy-options policy-statement filter_routes from route-filter 10.0.16.0/30 exact
set policy-options policy-statement filter_routes then reject
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Modifying the Junos OS
Configuration in Junos OS CLI, Release 11.4.
[edit]
user@R1# set interfaces so-0/2/0 unit 0 family inet address 10.0.2.1/30
[edit]
user@R2# set interfaces so-0/2/0 unit 0 family inet address 10.0.2.2/30
NOTE: For OSPFv3, include the ospf3 statement at the [edit protocols]
hierarchy level.
[edit]
user@R1# set protocols ospf area 0.0.0.0 interface so-0/2/0
[edit]
user@R2# set protocols ospf area 0.0.0.0 interface so-0/2/0
[edit]
user@R1# set protocols ospf export export_static
user@R1# set policy-options policy-statement export_static from protocol static
user@R1# set policy-options policy-statement export_static then accept
[edit]
user@R2# set protocols ospf import filter_routes
user@R2# set policy-options policy-statement filter_routes from route-filter
10.0.16.0/30 exact
user@R2# set policy-options policy-statement filter_routes then reject
[edit]
user@host# commit
Results Confirm your configuration by entering the show interfaces, show policy-options, and
show protocols ospf commands on the appropriate device. If the output does not display
the intended configuration, repeat the instructions in this example to correct the
configuration.
then accept;
}
To confirm your OSPFv3 configuration, enter the show interfaces, show policy-options,
show routing-options, and show protocols ospf3 commands on the appropriate device.
Verification
Purpose Verify that OSPF is advertising the static route in the OSPF database.
Action From operational mode, enter the show ospf database for OSPFv2, and enter the show
ospf3 database command for OSPFv3.
Example: Configuring a Route Filter Policy to Specify Priority for Prefixes Learned Through
OSPF
This example shows how to create an OSPF import policy that prioritizes specific prefixes
learned through OSPF.
Requirements
• Configure the device interfaces. See the Junos OS Network Interfaces Configuration Guide.
• Configure the router identifiers for the devices in your OSPF network. See “Example:
Configuring an OSPF Router Identifier” on page 510.
• Control OSPF designated router election See “Example: Controlling OSPF Designated
Router Election” on page 511
Overview
In a network with a large number of OSPF routes, it can be useful to control the order in
which routes are updated in response to a network topology change. In Junos OS
Release 9.3 and later, you can specify a priority of high, medium, or low for prefixes
included in an OSPF import policy. In the event of an OSPF topology change, high priority
prefixes are updated in the routing table first, followed by medium and then low priority
prefixes.
OSPF import policy can only be used to set priority or to filter OSPF external routes. If an
OSPF import policy is applied that results in a reject terminating action for a nonexternal
route, then the reject action is ignored and the route is accepted anyway. By default, such
a route is now installed in the routing table with a priority of low. This behavior prevents
traffic black holes, that is, silently discarded traffic, by ensuring consistent routing within
the OSPF domain.
In general, OSPF routes that are not explicitly assigned a priority are treated as priority
medium, except for the following:
• Local routes that are not added to the routing table are assigned a priority of low.
• External routes that are rejected by import policy and thus not added to the routing
table are assigned a priority of low.
Any available match criteria applicable to OSPF routes can be used to determine the
priority. Two of the most commonly used match criteria for OSPF are the route-filter and
tag statements.
In this example, the routing device is in area 0.0.0.0, with interfaces fe-0/1/0 and fe-1/1/0
connecting to neighboring devices. You configure an import routing policy named
ospf-import to specify a priority for prefixes learned through OSPF. Routes associated
with these prefixes are installed in the routing table in the order of the prefixes’ specified
priority. Routes matching 200.3.0.0/16 orlonger are installed first because they have a
priority of high. Routes matching 200.2.0.0/16 orlonger are installed next because they
have a priority of medium. Routes matching 200.1.0.0/16 orlonger are installed last because
they have a priority of low. You then apply the import policy to OSPF.
NOTE: The priority value takes effect when a new route is installed, or when
there is a change to an existing route.
Configuration
CLI Quick To quickly configure an OSPF import policy that prioritizes specific prefixes learned
Configuration through OSPF, copy the following commands, removing any line breaks, and then paste
the commands into the CLI.
[edit]
set interfaces fe-0/1/0 unit 0 family inet address 192.168.8.4/30
set interfaces fe-0/1/0 unit 0 family inet address 192.168.8.5/30
set policy-options policy-statement ospf-import term t1 from route-filter 200.1.0.0/16
orlonger
set policy-options policy-statement ospf-import term t1 then priority low
set policy-options policy-statement ospf-import term t1 then accept
set policy-options policy-statement ospf-import term t2 from route-filter 200.2.0.0/16
orlonger
set policy-options policy-statement ospf-import term t2 then priority medium
set policy-options policy-statement ospf-import term t2 then accept
set policy-options policy-statement ospf-import term t3 from route-filter 200.3.0.0/16
orlonger
set policy-options policy-statement ospf-import term t3 then priority high
set policy-options policy-statement ospf-import term t3 then accept
set protocols ospf import ospf-import
set protocols ospf area 0.0.0.0 interface fe-0/1/0
set protocols ospf area 0.0.0.0 interface fe-1/1/0
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Modifying the Junos OS
Configuration in Junos OS CLI, Release 11.4.
[edit]
user@host# set interfaces fe-0/1/0 unit 0 family inet address 192.168.8.4/30
user@host# set interfaces fe-0/2/0 unit 0 family inet address 192.168.8.5/30
NOTE: For OSPFv3, include the ospf3 statement at the [edit protocols]
hierarchy level.
[edit]
user@host# set protocols ospf area 0.0.0.0 interface fe-0/1/0
user@host# set protocols ospf area 0.0.0.0 interface fe-0/2/0
3. Configure the policy to specify the priority for prefixes learned through OSPF.
[edit ]
user@host# set policy-options policy-statement ospf-import term t1 from route-filter
200.1.0.0/16 orlonger
user@host# set policy-options policy-statement ospf-import term t1 then priority
low
user@host# set policy-options policy-statement ospf-import term t1 then accept
user@host# set policy-options policy-statement ospf-import term t2 from route-filter
200.2.0.0/16 orlonger
user@host# set policy-options policy-statement ospf-import term t2 then priority
medium
user@host# set policy-options policy-statement ospf-import term t2 then accept
user@host# set policy-options policy-statement ospf-import term t3 from route-filter
200.3.0.0/16 orlonger
user@host# set policy-options policy-statement ospf-import term t3 then priority
high
user@host# set policy-options policy-statement ospf-import term t3 then accept
[edit]
user@host# set protocols ospf import ospf-import
[edit]
user@host# commit
Results Confirm your configuration by entering the show interfaces, show policy-options, and the
show protocols ospf commands. If the output does not display the intended configuration,
repeat the instructions in this example to correct the configuration.
unit 0 {
family inet {
address 192.168.8.5/30;
}
}
}
To confirm your OSPFv3 configuration, enter the show interfaces, show policy-options,
and show protocols ospf3 commands.
Verification
Purpose Verify the priority assigned to the prefix in the OSPF routing table.
Action From operational mode, enter the show ospf route detail for OSPFv2, and enter the show
ospf3 route detail command for OSPFv3.
• Configuring Match Conditions in Routing Policy Terms in the Junos OS Routing Policy
Configuration Guide
• Configuring Actions in Routing Policy Terms in the Junos OS Routing Policy Configuration
Guide
• Import and Export Policies for Network Summaries Overview on page 695
• Example: Configuring an OSPF Export Policy for Network Summaries on page 695
• Example: Configuring an OSPF Import Policy for Network Summaries on page 704
The export policy enables you to specify which summary LSAs are flooded into an area.
The import policy enables you to control which routes learned from an area are used to
generate summary LSAs into other areas. You define a routing policy at the [edit
policy-options policy-statement policy-name] hierarchy level. As with all OSPF export
policies, the default for network-summary LSA export policies is to reject everything.
Similarly, as with all OSPF import policies, the default for network-summary LSA import
policies is to accept all OSPF routes.
Requirements
• Configure the router identifiers for the devices in your OSPF network. See “Example:
Configuring an OSPF Router Identifier” on page 510.
• Control OSPF designated router election. See “Example: Controlling OSPF Designated
Router Election” on page 511
Overview
OSPF uses network-summary LSAs to transmit route information across area boundaries.
Depending on your network environment, you might want to further filter the
network-summary LSAs between OSPF areas. For example, if you create OSPF areas to
define administrative boundaries, you might not want to advertise internal route
information between those areas. To further improve the control of route distribution
between multiple OSPF areas, you can configure network summary policies on the ABR
for the area that you want to filter the advertisement of network-summary LSAs.
NOTE: For OSPFv3, the LSA is referred to as the interarea prefix LSA and
performs the same function as a network-summary LSA performs for OSPFv2.
An ABR originates an interarea prefix LSA for each IPv6 prefix that must be
advertised into an area. In this topic, the terms network summary policy and
network-summary policy are used to describe both OSPFv2 and OSPFv3
functionality.
• You should have a thorough understanding of your network before configuring these
policies. Incorrect network summary policy configuration might result in an unintended
result such as suboptimal routing or dropped traffic.
• We recommend that you use the route-filter policy match condition for these types of
policies.
• We recommend that you use the accept and reject routing policy terms for these types
of policies.
Figure 30 on page 697 shows a sample topology with three OSPF areas. R4 generates
network summaries for the routes in area 4 and sends them out of area 4 to area 0. R3
generates network summaries for the routes in area 3 and sends them out of area 3 to
area 0.
Figure 30: Sample Topology Used for an OSPF Export Network Summary
Policy
R1 R5
fe-0/1/0 fe-1/1/0
fe-0/0/1
10.0.4.12 10.0.8.4
fe-1/1/0 10.0.8.8 fe-1/1/0
10.0.4.4 R3 R4
fe-1/0/0 fe-0/0/1 fe-0/0/1 fe-1/0/0
10.0.4.0 10.0.8.8
fe-0/0/1
fe-1/0/0 fe-1/0/0
R2 R6
g040906
In this example, you configure R4 with an export network summary policy named
export-policy that only allows routes that match the 10.0.4.4 prefix from area 3 into area
4. The export policy controls the network-summary LSAs that R4 floods into area 4. This
results in only the allowed interarea route to enter area 4, and all other interarea routes
to be purged from the OSPF database and the routing table of the devices in area 4. You
first define the policy and then apply it to the ABR by including the
network-summary-export statement for OSPFv2 or the inter-area-prefix-export statement
for OSPFv3.
• R3—Device R3 participates in area 3 and area 0. R3 is the ABR between area 3 and
area 0, and passes network-summary LSAs between the areas. Interface fe-1/0/0 has
an IP address of 10.0.4.2/30 and connects to R2. Interface fe-1/1/0 has an IP address
of 10.0.4.14/30 and connects to R1. Interface fe-0/0/1 has an IP address of 10.0.2.3/30
and connects to R4.
• R4—Device R4 participates in area 0 and area 4. R4 is the ABR between area 0 and
area 4, and passes network-summary LSAs between the areas. Interface fe-0/0/1 has
an IP address of 10.0.2.4/30 and connects to R3. Interface fe-1/1/0 has an IP address
of 10.0.8.3/30 and connects to R5. Interface fe-1/0/0 has an IP address of 10.0.8.6/30
and connects to R6.
Configuration
CLI Quick To quickly configure an OSPF export policy for network summaries, copy the following
Configuration commands, removing any line breaks, and then paste the commands into the CLI.
[edit]
set interfaces fe-0/1/0 unit 0 family inet address 10.0.4.13/30
set interfaces fe-0/0/1 unit 0 family inet address 10.0.4.5/30
set protocols ospf area 0.0.0.3 interface fe-0/1/0
set protocols ospf area 0.0.0.3 interface fe-0/0/1
[edit]
set interfaces fe-0/1/0 unit 0 family inet address 10.0.4.6/30
set interfaces fe-1/0/0 unit 0 family inet address 10.0.4.3/30
set protocols ospf area 0.0.0.3 interface fe-0/1/0
set protocols ospf area 0.0.0.3 interface fe-1/0/0
[edit]
set interfaces fe-1/0/0 unit 0 family inet address 10.0.4.2/30
set interfaces fe-1/1/0 unit 0 family inet address 10.0.4.14/30
set interfaces fe-0/0/1 unit 0 family inet address 10.0.2.3/30
set protocols ospf area 0.0.0.3 interface fe-1/0/0
set protocols ospf area 0.0.0.3 interface fe-1/1/0
set protocols ospf area 0.0.0.0 interface fe-0/0/1
[edit]
set interfaces fe-0/0/1 unit 0 family inet address 10.0.2.4/30
set interfaces fe-1/1/0 unit 0 family inet address 10.0.8.3/30
set interfaces fe-1/0/0 unit 0 family inet address 10.0.8.6/30
set policy-options policy-statement export-policy term term1 from route-filter 10.0.4.4/30
prefix-length-range /30-/30
set policy-options policy-statement export-policy term term1 then accept
set protocols ospf area 0.0.0.0 interface fe-0/0/1
set protocols ospf area 0.0.0.4 interface fe-0/1/0
set protocols ospf area 0.0.0.4 interface fe-1/0/0
set protocols ospf area 0.0.0.4 network-summary-export export-policy
[edit]
set interfaces fe-1/1/0 unit 0 family inet address 10.0.8.5/30
set protocols ospf area 0.0.0.4 interface fe-0/1/0
[edit]
set interfaces fe-1/0/0 unit 0 family inet address 10.0.8.7/30
set protocols ospf area 0.0.0.4 interface fe-1/0/0
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Modifying the Junos OS
Configuration in Junos OS CLI, Release 11.4.
[edit]
user@R1# set interfaces fe-0/1/0 unit 0 family inet address 10.0.4.13/30
user@R1# set interfaces fe-0/0/1 unit 0 family inet address 10.0.4.5/30
[edit]
user@R2# set interfaces fe-0/1/0 unit 0 family inet address 10.0.4.6/30
user@R2# set interfaces fe-1/0/0 unit 0 family inet address 10.0.4.3/30
[edit]
user@R3# set interfaces fe-1/0/0 unit 0 family inet address 10.0.4.2/30
user@R3# set interfaces fe-1/1/0 unit 0 family inet address 10.0.4.14/30
user@R3#set interfaces fe-0/0/1 unit 0 family inet address 10.0.2.3/30
[edit]
user@R4# set interfaces fe-0/0/1 unit 0 family inet address 10.0.2.4/30
user@R4# set interfaces fe-1/1/0 unit 0 family inet address 10.0.8.3/30
user@R4# set interfaces fe-1/0/0 unit 0 family inet address 10.0.8.6/30
[edit]
user@R5# set interfaces fe-1/1/0 unit 0 family inet address 10.0.8.5/30
[edit]
user@R6# set interfaces fe-1/0/0 unit 0 family inet address 10.0.8.7/30
NOTE: For OSPFv3, include the ospf3 statement at the [edit protocols]
hierarchy level.
[edit]
user@R1# set protocols ospf area 0.0.0.3 interface fe-0/1/0
user@R1# set protocols ospf area 0.0.0.3 interface fe-0/0/1
[edit]
user@R2# set protocols ospf area 0.0.0.3 interface fe-0/1/0
user@R2# set protocols ospf area 0.0.0.3 interface fe-1/0/0
[edit]
user@R3# set protocols ospf area 0.0.0.3 interface fe-1/0/0
user@R3# set protocols ospf area 0.0.0.3 interface fe-1/1/0
user@R3# set protocols ospf area 0.0.0.0 interface fe-0/0/1
[edit]
user@R4# set protocols ospf area 0.0.0.0 interface fe-0/0/1
[edit]
user@R5# set protocols ospf area 0.0.0.4 interface fe-1/1/0
[edit]
user@R6# set protocols ospf area 0.0.0.4 interface fe-1/0/0
[edit ]
user@R4# set policy-options policy-statement export-policy term term1 from
route-filter 10.0.4.4/30 prefix-length-range /30-/30
user@R4# set policy-options policy-statement export-policy term term1 then accept
[edit]
user@R4# set protocols ospf area 0.0.0.4 network-summary-export export-policy
[edit]
user@host# commit
Results Confirm your configuration by entering the show interfaces, show policy-options, and
show protocols ospf commands on the appropriate device. If the output does not display
the intended configuration, repeat the instructions in this example to correct the
configuration.
interface fe-0/0/1.0;
}
interface fe-1/1/0.0;
}
To confirm your OSPFv3 configuration, enter the show interfaces, show policy-options,
and show protocols ospf3 commands on the appropriate device.
Verification
Purpose Verify that the OSPF database for the devices in area 4 includes the interarea route that
we permitted on the ABR R4. The other interarea routes that are not specified should
age out or no longer be present in the OSPF database.
Action From operational mode, enter the show ospf database netsummary area 0.0.0.4 command
for OSPFv2, and enter the show ospf3 database netsummary area 0.0.0.4 command for
OSPFv3.
Purpose Verify that the routes corresponding to the rejected network summaries are no longer
present in R4’s, R5’s, or R6’s routing table.
Action From operational mode, enter the show route protocol ospf command for both OSPFv2
and OSPFv3.
Requirements
• Configure the router identifiers for the devices in your OSPF network. See “Example:
Configuring an OSPF Router Identifier” on page 510.
• Control OSPF designated router election. See “Example: Controlling OSPF Designated
Router Election” on page 511.
Overview
OSPF uses network-summary LSAs to transmit route information across area boundaries.
Depending on your network environment, you might want to further filter the
network-summary LSAs between OSPF areas. For example, if you create OSPF areas to
define administrative boundaries, you might not want to advertise internal route
information between those areas. To further improve the control of route distribution
between multiple OSPF areas, you can configure network summary policies on the ABR
for the area that you want to filter the advertisement of network-summary LSAs.
NOTE: For OSPFv3, the LSA is referred to as the interarea prefix LSA and
performs the same function as a network-summary LSA performs for OSPFv2.
An ABR originates an interarea prefix LSA for each IPv6 prefix that must be
advertised into an area. In this topic, the terms network summary policy and
network-summary policy are used to describe both OSPFv2 and OSPFv3
functionality.
• You should have a thorough understanding of your network before configuring these
policies. Incorrect network summary policy configuration might result in an unintended
result such as suboptimal routing or dropped traffic.
• We recommend that you use the route-filter policy match condition for these types of
policies.
• We recommend that you use the accept and reject routing policy terms for these types
of policies.
Figure 31 on page 705 shows a sample topology with three OSPF areas. R4 generates
network summaries for the routes in area 4 and sends them out of area 4 to area 0. R3
generates network summaries for the routes in area 3 and sends them out of area 3 to
area 0.
Figure 31: Sample Topology Used for an OSPF Import Network Summary
Policy
R1 R5
fe-0/1/0 fe-1/1/0
fe-0/0/1
10.0.4.12 10.0.8.4
fe-1/1/0 10.0.8.8 fe-1/1/0
10.0.4.4 R3 R4
fe-1/0/0 fe-0/0/1 fe-0/0/1 fe-1/0/0
10.0.4.0 10.0.8.8
fe-0/0/1
fe-1/0/0 fe-1/0/0
R2 R6
g040906
In this example, you configure R3 with an import network summary policy named
import-policy so R3 only generates network summaries for the route 10.0.4.12/30. The
import policy controls the routes and therefore the network summaries that R3 advertises
out of area 3, so applying this policy means that R3 only advertises route 10.0.4.12/30
out of area 3. This results in existing network summaries from other interarea routes
getting purged from the OSPF database in area 0 and area 4, as well as the routing tables
of the devices in areas 0 and area 4. You first define the policy and then apply it to the
ABR by including the network-summary-import statement for OSPFv2 or the
inter-area-prefix-import statement for OSPFv3.
• R3—Device R3 participates in area 3 and area 0. R3 is the ABR between area 3 and
area 0, and passes network-summary LSAs between the areas. Interface fe-1/0/0 has
an IP address of 10.0.4.2/30 and connects to R2. Interface fe-1/1/0 has an IP address
of 10.0.4.14/30 and connects to R1. Interface fe-0/0/1 has an IP address of 10.0.2.3/30
and connects to R4.
• R4—Device R4 participates in area 0 and area 4. R4 is the ABR between area 0 and
area 4, and passes network-summary LSAs between the areas. Interface fe-0/0/1 has
an IP address of 10.0.2.4/30 and connects to R3. Interface fe-1/1/0 has an IP address
of 10.0.8.3/30 and connects to R5. Interface fe-1/0/0 has an IP address of 10.0.8.6/30
and connects to R6.
Configuration
CLI Quick To quickly configure an OSPF import policy for network summaries, copy the following
Configuration commands, removing any line breaks, and then paste the commands into CLI.
[edit]
set interfaces fe-0/1/0 unit 0 family inet address 10.0.4.13/30
set interfaces fe-0/0/1 unit 0 family inet address 10.0.4.5/30
set protocols ospf area 0.0.0.3 interface fe-0/1/0
set protocols ospf area 0.0.0.3 interface fe-0/0/1
[edit]
set interfaces fe-0/1/0 unit 0 family inet address 10.0.4.6/30
set interfaces fe-1/0/0 unit 0 family inet address 10.0.4.3/30
set protocols ospf area 0.0.0.3 interface fe-0/1/0
set protocols ospf area 0.0.0.3 interface fe-1/0/0
[edit]
set interfaces fe-1/0/0 unit 0 family inet address 10.0.4.2/30
set interfaces fe-1/1/0 unit 0 family inet address 10.0.4.14/30
set interfaces fe-0/0/1 unit 0 family inet address 10.0.2.3/30
set policy-options policy-statement import-policy term term1 from route-filter 10.0.4.12/30
prefix-length-range /30-/30
set policy-options policy-statement import-policy term term1 then accept
set protocols ospf area 0.0.0.3 interface fe-1/0/0
set protocols ospf area 0.0.0.3 interface fe-1/1/0
set protocols ospf area 0.0.0.0 interface fe-0/0/1
set protocols ospf area 0.0.0.3 network-summary-import import-policy
[edit]
set interfaces fe-0/0/1 unit 0 family inet address 10.0.2.4/30
set interfaces fe-1/1/0 unit 0 family inet address 10.0.8.3/30
set interfaces fe-1/0/0 unit 0 family inet address 10.0.8.6/30
set protocols ospf area 0.0.0.0 interface fe-0/0/1
set protocols ospf area 0.0.0.4 interface fe-1/1/0
set protocols ospf area 0.0.0.4 interface fe-1/0/0
[edit]
set interfaces fe-1/1/0 unit 0 family inet address 10.0.8.5/30
set protocols ospf area 0.0.0.4 interface fe-1/1/0
[edit]
set interfaces fe-1/0/0 unit 0 family inet address 10.0.8.7/30
set protocols ospf area 0.0.0.4 interface fe-1/0/0
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Modifying the Junos OS
Configuration in Junos OS CLI, Release 11.4.
[edit]
user@R1# set interfaces fe-0/1/0 unit 0 family inet address 10.0.4.13/30
user@R1# set interfaces fe-0/0/1 unit 0 family inet address 10.0.4.5/30
[edit]
user@R2# set interfaces fe-0/1/0 unit 0 family inet address 10.0.4.6/30
user@R2# set interfaces fe-1/0/0 unit 0 family inet address 10.0.4.3/30
[edit]
user@R3# set interfaces fe-1/0/0 unit 0 family inet address 10.0.4.2/30
user@R3# set interfaces fe-1/1/0 unit 0 family inet address 10.0.4.14/30
user@R3#set interfaces fe-0/0/1 unit 0 family inet address 10.0.2.3/30
[edit]
user@R4# set interfaces fe-0/0/1 unit 0 family inet address 10.0.2.4/30
user@R4# set interfaces fe-1/1/0 unit 0 family inet address 10.0.8.3/30
user@R4# set interfaces fe-1/0/0 unit 0 family inet address 10.0.8.6/30
[edit]
user@R5# set interfaces fe-1/1/0 unit 0 family inet address 10.0.8.5/30
[edit]
user@R6# set interfaces fe-1/0/0 unit 0 family inet address 10.0.8.7/30
NOTE: For OSPFv3, include the ospf3 statement at the [edit protocols]
hierarchy level.
[edit]
user@R1# set protocols ospf area 0.0.0.3 interface fe-0/1/0
user@R1# set protocols ospf area 0.0.0.3 interface fe-0/0/1
[edit]
user@R2# set protocols ospf area 0.0.0.3 interface fe-0/1/0
user@R2# set protocols ospf area 0.0.0.3 interface fe-1/0/0
[edit]
user@R3# set protocols ospf area 0.0.0.3 interface fe-1/0/0
[edit]
user@R4# set protocols ospf area 0.0.0.0 interface fe-0/0/1
user@R4# set protocols ospf area 0.0.0.4 interface fe-1/1/0
user@R4# set protocols ospf area 0.0.0.4 interface fe-1/0/0
[edit]
user@R5# set protocols ospf area 0.0.0.4 interface fe-1/1/0
[edit]
user@R6# set protocols ospf area 0.0.0.4 interface fe-1/0/0
[edit ]
user@R3# set policy-options policy-statement import-policy term term1 from
route-filter 10.0.4.12/30 prefix-length-range /30-/30
user@R3# set policy-options policy-statement export-policy term term1 then accept
[edit]
user@R3# set protocols ospf area 0.0.0.4 network-summary-import import-policy
[edit]
user@host# commit
Results Confirm your configuration by entering the show interfaces, show policy-options, and
show protocols ospf commands on the appropriate device. If the output does not display
the intended configuration, repeat the instructions in this example to correct the
configuration.
area 0.0.0.0 {
interface fe-0/0/1.0;
}
area 0.0.0.3 {
network-summary-export export-policy;
interface fe-1/0/0.0;
interface fe-1/1/0.0;
}
family inet {
address 10.0.8.5/30;
}
}
}
To confirm your OSPFv3 configuration, enter the show interfaces, show policy-options,
and show protocols ospf3 commands on the appropriate device.
Verification
Purpose Verify that the OSPF database for the devices in area 4 includes the interarea route that
we are advertising from R3. Any other routes from area 3 should not be advertised into
area 4, so those entries should age out or no longer be present in the OSPF database.
Action From operational mode, enter the show ospf database netsummary area 0.0.0.4 command
for OSPFv2, and enter the show ospf3 database netsummary area 0.0.0.4 command for
OSPFv3.
Purpose Verify that the specified route is included in R4’s, R5’s, or R6’s routing table. Any other
routes from area 3 should not be advertised into area 4.
Action From operational mode, enter the show route protocol ospf command for both OSPFv2
and OSPFv3.
• Configuring Match Conditions in Routing Policy Terms in the Junos OS Routing Policy
Configuration Guide
• Configuring Actions in Routing Policy Terms in the Junos OS Routing Policy Configuration
Guide
With Junos OS, you can partition a single physical router into multiple logical devices that
perform independent routing tasks. Because logical systems perform a subset of the
tasks once handled by the main router, logical systems offer an effective way to maximize
the use of a single routing or switching platform. Logical systems have their own unique
routing tables, interfaces, policies, and routing instances.
You can configure both OSPF Version 2 (OSPFv2) and OSPF Version 3 (OSPFv3) for
logical systems. In the case of OSPFv3, you can also configure OSPFv3 realms for logical
systems, which allows OSPFv3 to advertise address families other than unicast IPv6.
You configure OSPF for logical systems at the following hierarchy levels:
Requirements
You must connect the logical systems by using logical tunnel (lt) interfaces. See Example:
Connecting Logical Systems Within the Same Router Using Logical Tunnel Interfaces.
Overview
This example shows the configuration of a single OSPF area with three logical systems
running on one physical router. Each logical system has its own routing table. The
configuration enables the protocol on all logical system interfaces that participate in the
OSPF domain and specifies the area that the interfaces are in.
Router 1
Area 0.0.0.0
lt-1/2/0.0
LS1 10.0.1.2
lt-1/2/0.2
10.0.0.1 lt-1/2/0.5
10.0.1.1
LS3
lt-1/2/0.3
10.0.2.1
lt-1/2/0.1
10.0.0.2
lt-1/2/0.4
LS2 10.0.2.2
g040567
Configuration
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
1. Configure the logical tunnel interface on Logical System LS1 connecting to Logical
System LS2.
[edit]
user@host# set logical-systems LS1 interfaces lt-1/2/0 unit 2 description LS1->LS2
user@host# set logical-systems LS1 interfaces lt-1/2/0 unit 2 encapsulation ethernet
user@host# set logical-systems LS1 interfaces lt-1/2/0 unit 2 peer-unit 1
user@host# set logical-systems LS1 interfaces lt-1/2/0 unit 2 family inet address
10.0.0.1/30
2. Configure the logical tunnel interface on Logical System LS1 connecting to Logical
System LS3.
[edit]
user@host# set logical-systems LS1 interfaces lt-1/2/0 unit 0 description LS1->LS3
user@host# set logical-systems LS1 interfaces lt-1/2/0 unit 0 encapsulation ethernet
user@host# set logical-systems LS1 interfaces lt-1/2/0 unit 0 peer-unit 5
user@host# set logical-systems LS1 interfaces lt-1/2/0 unit 0 family inet address
10.0.1.2/30
3. Configure the logical tunnel interface on Logical System LS2 connecting to Logical
System LS1.
[edit]
user@host# set logical-systems LS2 interfaces lt-1/2/0 unit 1 description LS2->LS1
user@host# set logical-systems LS2 interfaces lt-1/2/0 unit 1 encapsulation ethernet
user@host# set logical-systems LS2 interfaces lt-1/2/0 unit 1 peer-unit 2
user@host# set logical-systems LS2 interfaces lt-1/2/0 unit 1 family inet address
10.0.0.2/30
4. Configure the logical tunnel interface on Logical System LS2 connecting to Logical
System LS3.
[edit]
user@host# set logical-systems LS2 interfaces lt-1/2/0 unit 4 description LS2->LS3
user@host# set logical-systems LS2 interfaces lt-1/2/0 unit 4 encapsulation ethernet
user@host# set logical-systems LS2 interfaces lt-1/2/0 unit 4 peer-unit 3
user@host# set logical-systems LS2 interfaces lt-1/2/0 unit 4 family inet address
10.0.2.2/30
5. Configure the logical tunnel interface on Logical System LS3 connecting to Logical
System LS2.
[edit]
user@host# set logical-systems LS3 interfaces lt-1/2/0 unit 3 description LS3->LS2
user@host# set logical-systems LS3 interfaces lt-1/2/0 unit 3 encapsulation ethernet
user@host# set logical-systems LS3 interfaces lt-1/2/0 unit 3 peer-unit 4
user@host# set logical-systems LS3 interfaces lt-1/2/0 unit 3 family inet address
10.0.2.1/30
6. Configure the logical tunnel interface on Logical System LS3 connecting to Logical
System LS1.
[edit]
user@host# set logical-systems LS3 interfaces lt-1/2/0 unit 5 description LS3->LS1
user@host# set logical-systems LS3 interfaces lt-1/2/0 unit 5 encapsulation ethernet
user@host# set logical-systems LS3 interfaces lt-1/2/0 unit 5 peer-unit 0
user@host# set logical-systems LS3 interfaces lt-1/2/0 unit 5 family inet address
10.0.1.1/30
[edit]
user@host# set logical-systems LS1 protocols ospf area 0.0.0.0 interface lt-1/2/0.0
user@host# set logical-systems LS1 protocols ospf area 0.0.0.0 interface lt-1/2/0.2
user@host# set logical-systems LS2 protocols ospf area 0.0.0.0 interface lt-1/2/0.1
user@host# set logical-systems LS2 protocols ospf area 0.0.0.0 interface lt-1/2/0.4
user@host# set logical-systems LS3 protocols ospf area 0.0.0.0 interface lt-1/2/0.5
user@host# set logical-systems LS3 protocols ospf area 0.0.0.0 interface lt-1/2/0.3
[edit]
user@host# commit
show logical-systems
LS1 {
interfaces {
lt-1/2/0 {
unit 0 {
description LS1->LS3;
encapsulation ethernet;
peer-unit 5;
family inet {
address 10.0.1.2/30;
}
}
unit 2 {
description LS1->LS2;
encapsulation ethernet;
peer-unit 1;
family inet {
address 10.0.0.1/30;
}
}
}
}
protocols {
ospf {
area 0.0.0.0 {
interface lt-1/2/0.0;
interface lt-1/2/0.2;
}
}
}
}
LS2 {
interfaces {
lt-1/2/0 {
unit 1 {
description LS2->LS1;
encapsulation ethernet;
peer-unit 2;
family inet {
address 10.0.0.2/30;
}
}
unit 4 {
description LS2->LS3;
encapsulation ethernet;
peer-unit 3;
family inet {
address 10.0.2.2/30;
}
}
}
}
protocols {
ospf {
area 0.0.0.0 {
interface lt-1/2/0.1;
interface lt-1/2/0.4;
}
}
}
}
LS3 {
interfaces {
lt-1/2/0 {
unit 3 {
description LS3->LS2;
encapsulation ethernet;
peer-unit 4;
family inet {
address 10.0.2.1/30;
}
}
unit 5 {
description LS3->LS1;
encapsulation ethernet;
peer-unit 0;
family inet {
address 10.0.1.1/30;
}
}
}
}
protocols {
ospf {
area 0.0.0.0 {
interface lt-1/2/0.5;
interface lt-1/2/0.3;
}
}
}
}
Verification
Purpose Make sure that the OSPF adjacencies are established by checking the OSPF neighbor
tables, checking the routing tables, and pinging the logical systems.
Requirements
• Connect the logical systems by using logical tunnel (lt) interfaces. See Example:
Connecting Logical Systems Within the Same Router Using Logical Tunnel Interfaces.
• Enable OSPF on the interfaces. See “Example: Configuring OSPF on Logical Systems
Within the Same Router” on page 713.
Overview
In this example, OSPF area 0 contains three logical systems that are configured on a
single physical router. One logical system has a default route to an external peer, for
example, an ISP. The route policy is conditional such that if the connection to the external
peer goes down, the default route is no longer active in the routing tables of the logical
systems in area 0. This policy prevents blackholing of traffic. Blackholing occurs when
packets are dropped without notification.
In this example, the default route is not used for forwarding traffic. The no-install
statement prevents the route from being installed in the forwarding table of Logical
System LS3. If you configure a route so it is not installed in the forwarding table, the route
is still eligible to be exported from the routing table to other protocols.
Router 1
Area 0.0.0.0
lt-1/2/0.0
LS1 10.0.1.2
lt-1/2/0.2
10.0.0.1 lt-1/2/0.5
10.0.1.1
so-0/0/2
10.0.45.2
LS3 ISP
so-0/0/2
lt-1/2/0.3 10.0.45.2
10.0.2.1
lt-1/2/0.1
10.0.0.2
lt-1/2/0.4
LS2 10.0.2.2
g040570
Configuration
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
set logical-systems LS3 interfaces so-0/0/2 unit 0 family inet address 10.0.45.2/30
set logical-systems LS3 routing-options static route 0.0.0.0/0 next-hop 10.0.45.1
set logical-systems LS3 routing-options static route 0.0.0.0/0 no-install
set logical-systems LS3 policy-options policy-statement ospf-default from protocol
static
set logical-systems LS3 policy-options policy-statement ospf-default from route-filter
0.0.0.0/0 exact
set logical-systems LS3 policy-options policy-statement ospf-default then accept
set logical-systems LS3 protocols ospf export ospf-default
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
[edit]
user@host# set logical-systems LS3 interfaces so-0/0/2 unit 0 family inet address
10.0.45.2/30
[edit]
user@host> set cli logical-system LS3
[edit]
user@host:LS3# set routing-options static route 0.0.0.0/0 next-hop 10.0.45.1
user@host:LS3# set routing-options static route 0.0.0.0/0 no-install
[edit]
user@host:LS3# set policy-options policy-statement ospf-default from protocol
static
user@host:LS3# set policy-options policy-statement ospf-default from route-filter
0.0.0.0/0 exact
user@host:LS3# set policy-options policy-statement ospf-default then accept
[edit]
user@host:LS3# set protocols ospf export ospf-default
[edit]
user@host:LS3# commit
Results Confirm your configuration by issuing the show logical-systems LS3 command.
}
}
}
Verification
Purpose Make sure connectivity is established between Logical System LS3 and the ISP’s router.
user@host:LS3>ping 10.0.45.1
PING 10.0.45.1 (10.0.45.1): 56 data bytes
64 bytes from 10.0.45.1: icmp_seq=0 ttl=64 time=1.185 ms
64 bytes from 10.0.45.1: icmp_seq=1 ttl=64 time=1.199 ms
64 bytes from 10.0.45.1: icmp_seq=2 ttl=64 time=1.186 ms
Meaning The routing table shows that the route to the 10.0.45.0 network is reachable. The ping
command confirms reachability.
Purpose Make sure that the OSPF policy is redistributing the static route by checking the routing
tables of Logical System LS1 and Logical System LS2.
Meaning The routing tables on Logical System LS1 and Logical System LS2 contain the default
0.0.0.0/0 route from protocol OSPF. If Logical System LS1 and Logical System LS2
receive packets destined for networks not specified in their routing tables, those packets
will be sent to Logical System LS3 for further processing.
Purpose Deactivate the interface to make sure that the route is removed from the routing tables
if the external network becomes unreachable.
Meaning The routing tables on Logical System LS1 and Logical System LS2 do not contain the
default 0.0.0.0/0. This verifies that the default route is no longer present in the OSPF
domain. To reactivate the so-0/0/2 interface, issue the activate logical-systems LS3
interfaces so-0/0/2 configuration-mode command.
Requirements
• Connect the logical systems by using logical tunnel (lt) interfaces. See Example:
Connecting Logical Systems Within the Same Router Using Logical Tunnel Interfaces.
• Enable OSPF on the interfaces. See “Example: Configuring OSPF on Logical Systems
Within the Same Router” on page 713.
Overview
This example shows a logical system redistributing a default route to other logical systems.
All logical systems are running OSPF. A common reason for a default route is to provide
a path for sending traffic destined outside the OSPF domain.
In this example, the default route is not used for forwarding traffic. The no-install
statement prevents the route from being installed in the forwarding table of Logical
System LS3. If you configure a route so it is not installed in the forwarding table, the route
is still eligible to be exported from the routing table to other protocols. The discard
statement silently drops packets without notice.
Router 1
Area 0.0.0.0
lt-1/2/0.0
LS1 10.0.1.2
lt-1/2/0.2
10.0.0.1 lt-1/2/0.5
10.0.1.1
LS3 ISP
lt-1/2/0.3
lt-1/2/0.1 10.0.2.1
10.0.0.2
lt-1/2/0.4
LS2 10.0.2.2
g040569
Configuration
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
[edit]
user@host> set cli logical-system LS3
[edit]
user@host:LS3# set routing-options static route 0.0.0.0/0 discard
user@host:LS3# set routing-options static route 0.0.0.0/0 no-install
[edit]
user@host:LS3# set policy-options policy-statement ospf-default from protocol
static
user@host:LS3# set policy-options policy-statement ospf-default from route-filter
0.0.0.0/0 exact
user@host:LS3# set policy-options policy-statement ospf-default then accept
[edit]
user@host:LS3# set protocols ospf export ospf-default
[edit]
user@host:LS3# commit
Results Confirm your configuration by issuing the show logical-systems LS3 command.
peer-unit 0;
family inet {
address 10.0.1.1/30;
}
}
}
}
protocols {
ospf {
export ospf-default;
area 0.0.0.0 {
interface lt-1/2/0.5;
interface lt-1/2/0.3;
}
}
}
policy-options {
policy-statement ospf-default {
from {
protocol static;
route-filter 0.0.0.0/0 exact;
}
then accept;
}
}
routing-options {
static {
route 0.0.0.0/0 {
discard;
no-install;
}
}
}
Verification
Purpose Make sure that the OSPF policy is working by checking the routing tables.
Meaning The routing table on Logical System LS3 contains the default 0.0.0.0/0 route from
protocol Static. The routing tables on Logical System LS1 and Logical System LS2 contain
the default 0.0.0.0/0 route from protocol OSPF. If Logical System LS1 and Logical System
LS2 receive packets destined for networks not specified in their routing tables, those
packets will be sent to Logical System LS3 for further processing. This configuration
assumes that Logical System LS3 has a connection to an ISP or another external network.
Requirements
This example shows logical systems that are configured within a single physical router.
The logical systems connect to each other by using logical tunnel (lt) interfaces. See
Example: Connecting Logical Systems Within the Same Router Using Logical Tunnel
Interfaces. Alternatively, you can use multiple physical routers.
Overview
External routes are learned by Autonomous System Border Routers (ASBRs). External
routes can be advertised throughout the OSPF domain if you configure the ASBR to
redistribute the route into OSPF. An external route might be learned by the ASBR from
a routing protocol other than OSPF, or the external route might be a static route that you
configure on the ASBR.
OSPF import policy allows you to prevent external routes from being added to the routing
tables of OSPF neighbors. The import policy does not impact the OSPF database. This
means that the import policy has no impact on the link-state advertisements.
OSPF import policies have practical applications. Suppose, for example, that you are
using OSPF to advertise a static route to the devices in your datacenter because you
want some of the devices in the datacenter to use the static route. However, you want
other devices in the datacenter to ignore the static route. So, you apply the OSPF import
policy on the devices that you want to ignore the static route. The filtering is done only
on external routes in OSPF. The intra-area and inter-area routes are not considered for
filtering. The default action is to accept the route when the route does not match the
policy.
R1
Area 0.0.0.0
LS1
lt-1/2/0.2
10.0.0.1
10.0.60.1/30
LS3 R2 10.0.16.0/30
10.0.60.2/30
lt-1/2/0.1 lt-1/2/0.3
10.0.0.2 10.0.2.1
LS2 lt-1/2/0.4
10.0.2.2
g040580
In this example, the logical systems operate as follows:
1. LS3—Logical System LS3 has a static route to the 10.0.16.0/30 network. The next
hop for the static route is 10.0.60.1. LS3 has an OSPF export policy configured. The
export policy redistributes static routes from LS3’s routing table into LS3’s OSPF
database. Because the static route is in LS3’s OSPF database, the route is advertised
in a link state advertisement (LSA) to LS3’s OSPF neighbor. LS3’s OSPF neighbor is
Logical System LS2.
2. LS2—Logical System LS2 receives the route advertisement from LS3. LS2 then installs
the route into LS2’s OSPF database. LS2 has an OSPF import policy configured that
matches the static route to the 10.0.16.0/30 network and prevents the static route
from being installed in LS2’s routing table. However, because the route is in LS2’s
OSPF database, LS2 advertises the route to its OSPF neighbor, Logical System LS1.
3. LS1—Logical System LS1 receives the route advertisement from LS2. LS1 then installs
the route into LS1’s OSPF database. LS1 does not have an OSPF import policy
configured that matches the static route to the 10.0.16.0/30 network . Therefore, the
route gets installed in LS1’s routing table.
Configuration
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
LS3 set logical-systems LS3 interfaces so-0/0/0 unit 0 family inet address 10.0.60.2/30
set logical-systems LS3 interfaces lt-1/2/0 unit 3 description LS3->LS2
set logical-systems LS3 interfaces lt-1/2/0 unit 3 encapsulation ethernet
set logical-systems LS3 interfaces lt-1/2/0 unit 3 peer-unit 4
set logical-systems LS3 interfaces lt-1/2/0 unit 3 family inet address 10.0.2.1/30
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
[edit]
user@R1# set logical-systems LS3 interfaces so-0/0/0 unit 0 family inet address
10.0.60.2/30
user@R1# set logical-systems LS3 interfaces lt-1/2/0 unit 3 description LS3->LS2
user@R1# set logical-systems LS3 interfaces lt-1/2/0 unit 3 encapsulation ethernet
user@R1# set logical-systems LS3 interfaces lt-1/2/0 unit 3 peer-unit 4
user@R1# set logical-systems LS3 interfaces lt-1/2/0 unit 3 family inet address
10.0.2.1/30
user@R1# set logical-systems LS2 interfaces lt-1/2/0 unit 1 description LS2->LS1
user@R1# set logical-systems LS2 interfaces lt-1/2/0 unit 1 encapsulation ethernet
user@R1# set logical-systems LS2 interfaces lt-1/2/0 unit 1 peer-unit 2
user@R1# set logical-systems LS2 interfaces lt-1/2/0 unit 1 family inet address
10.0.0.2/30
user@R1# set logical-systems LS2 interfaces lt-1/2/0 unit 4 description LS2->LS3
user@R1# set logical-systems LS2 interfaces lt-1/2/0 unit 4 encapsulation ethernet
user@R1# set logical-systems LS2 interfaces lt-1/2/0 unit 4 peer-unit 3
user@R1# set logical-systems LS2 interfaces lt-1/2/0 unit 4 family inet address
10.0.2.2/30
user@R1# set logical-systems LS1 interfaces lt-1/2/0 unit 2 description LS1->LS2
[edit]
user@R1# set logical-systems LS3 protocols ospf area 0.0.0.0 interface lt-1/2/0.3
user@R1# set logical-systems LS2 protocols ospf area 0.0.0.0 interface lt-1/2/0.1
user@R1# set logical-systems LS2 protocols ospf area 0.0.0.0 interface lt-1/2/0.4
user@R1# set logical-systems LS1 protocols ospf area 0.0.0.0 interface lt-1/2/0.2
[edit]
user@R1# set logical-systems LS3 routing-options static route 10.0.16.0/30 next-hop
10.0.60.1
[edit]
user@R1# set logical-systems LS3 protocols ospf export export_static
user@R1# set logical-systems LS3 policy-options policy-statement export_static
from protocol static
user@R1# set logical-systems LS3 policy-options policy-statement export_static
then accept
[edit]
user@R1# set logical-systems LS2 protocols ospf import filter_routes
user@R1# set logical-systems LS2 policy-options policy-statement filter_routes
from route-filter 10.0.16.0/30 exact
user@R1# set logical-systems LS2 policy-options policy-statement filter_routes
then reject
[edit]
user@R1# commit
protocols {
ospf {
area 0.0.0.0 {
interface lt-1/2/0.2;
}
}
}
}
LS2 {
interfaces {
lt-1/2/0 {
unit 1 {
description LS2->LS1;
encapsulation ethernet;
peer-unit 2;
family inet {
address 10.0.0.2/30;
}
}
unit 4 {
description LS2->LS3;
encapsulation ethernet;
peer-unit 3;
family inet {
address 10.0.2.2/30;
}
}
}
}
protocols {
ospf {
import filter_routes;
area 0.0.0.0 {
interface lt-1/2/0.1;
interface lt-1/2/0.4;
}
}
}
policy-options {
policy-statement filter_routes {
from {
route-filter 10.0.16.0/30 exact;
}
then reject;
}
}
}
LS3 {
interfaces {
so-0/0/0 {
unit 0 {
family inet {
address 10.0.60.2/30;
}
}
}
lt-1/2/0 {
unit 3 {
description LS3->LS2;
encapsulation ethernet;
peer-unit 4;
family inet {
address 10.0.2.1/30;
}
}
}
}
protocols {
ospf {
export export_static;
area 0.0.0.0 {
interface lt-1/2/0.3;
}
}
}
policy-options {
policy-statement export_static {
from protocol static;
then accept;
}
}
routing-options {
static {
route 10.0.16.0/30 next-hop 10.0.60.1;
}
}
}
Verification
-----
logical-system: LS1
logical-system: LS3
Meaning The Extern *10.0.16.0 output shows that OSPF is advertising the external route.
Purpose Make sure that Logical System LS3 and Logical System LS1 have the route to the
10.0.16.0/30 network installed in their respective routing tables. Make sure that Logical
System LS2 does not have the route installed in its routing table.
logical-system: LS1
logical-system: LS3
Meaning The route to 10.0.16.0/30 is not installed in Logical System LS2’s routing table. The route
to 10.0.16.0/30 is installed in Logical System LS1’s routing table as a route learned from
OSPF. Because it is an OSPF external route, it has a preference value of 150 (instead of
10). By default, routes resulting from OSPF external LSAs are installed with a preference
value of 150. The route to 10.0.16.0/30 is installed in Logical System LS3’s routing table
as a static route.
• graceful-restart—Graceful-restart events
• hello—Hello packets, which are used to establish neighbor adjacencies and to determine
whether neighbors are reachable
You can optionally specify one or more of the following flag modifiers:
NOTE: Use the detail flag modifier with caution as it might cause the CPU to
become very busy.
Global tracing options are inherited from the configuration set by the traceoptions
statement at the [edit routing-options] hierarchy level. You can override the following
global trace options for the OSPF protocol using the traceoptions flag statement included
at the [edit protocols ospf] hierarchy level:
• general—All normal operations and routing table changes (a combination of the normal
and route trace operations)
• normal—Normal events
• policy—Policy processing
• route—Routing information
• state—State transitions
NOTE: Use the trace flag all with caution as it might cause the CPU to become
very busy.
Requirements
This example assumes that OSPF is properly configured and running in your network,
and you want to trace OSPF protocol traffic for debugging purposes.
Overview
You can trace OSPF protocol traffic to help debug OSPF protocol issues. When you trace
OSPF protocol traffic, you specify the name of the file and the type of information you
want to trace. All files are placed in a directory on the routing device’s hard disk. On M
Series and T Series routers, trace files are stored in the /var/log directory.
This example shows a few configurations that might be useful when debugging OSPF
protocol issues. The verification output displayed is specific to each configuration.
TIP: To keep track of your log files, create a meaningful and descriptive name
so it is easy to remember the content of the trace file. We recommend that
you place global routing protocol tracing output in the file routing-log, and
OSPF tracing output in the file ospf-log.
In the first example, you globally enable tracing operations for all routing protocols that
are actively running on your routing device to the file routing-log. With this configuration,
you keep the default settings for the trace file size and the number of trace files. After
enabling global tracing operations, you enable tracing operations to provide detailed
information about OSPF packets, including link-state advertisements, requests, and
updates, database description packets, and hello packets to the file ospf-log, and you
configure the following options:
• size—Specifies the maximum size of each trace file, in KB, MB, or GB. In this example,
you configure 10 KB as the maximum size. When the file reaches its maximum size, it
is renamed with a .0 extension. When the file again reaches its maximum size, it is
renamed with a .1 extension, and the newly created file is renamed with a .0 extension.
This renaming scheme continues until the maximum number of trace files is reached.
Then, the oldest trace file is overwritten. If you specify a maximum file size, you must
also specify a maximum number of trace files with the files option. You specify k for
KB, m for MB, and g for GB. By default, the trace file size is 128 KB. The file size range
is 10 KB through the maximum file size supported on your system.
• files—Specifies the maximum number of trace files. In this example, you configure a
maximum of 5 trace files. When a trace file reaches its maximum size, it is renamed
with a .0 extension, then a .1 extension, and so on until the maximum number of trace
files is reached. When the maximum number of files is reached, the oldest trace file is
overwritten. If you specify a maximum number of files, you must also specify a maximum
file size with the size option. By default, there are 10 files. The range is 2 through 1000
files.
In the second example, you trace all SPF calculations to the file ospf-log by including
the spf flag. You keep the default settings for the trace file size and the number of trace
files.
In the third example, you trace the creation, receipt, and retransmission of all LSAs to
the file ospf-log by including the lsa-request, lsa-update, and lsa-ack flags. You keep the
default settings for the trace file size and the number of trace files.
Configuration
• Configuring Global Tracing Operations and Tracing OSPF Packet Information on page 740
• Tracing SPF Calculations on page 742
• Tracing Link-State Advertisements on page 743
CLI Quick To quickly enable global tracing operations for all routing protocols actively running on
Configuration your routing device and to trace detailed information about OSPF packets, copy the
following commands and paste them into the CLI.
[edit]
set routing-options traceoptions file routing-log
set protocols ospf traceoptions file ospf-log
set protocols ospf traceoptions file files 5 size 10k
set protocols ospf traceoptions flag lsa-ack
set protocols ospf traceoptions flag database-description
set protocols ospf traceoptions flag hello
set protocols ospf traceoptions flag lsa-update
set protocols ospf traceoptions flag lsa-request
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Modifying the Junos OS
Configuration in Junos OS CLI, Release 11.4.
To configure global routing tracing operations and tracing operations for OSPF packets:
1. Configure tracing at the routing options level to collect information about the active
routing protocols on your routing device.
[edit]
user@host# edit routing-options traceoptions
[edit]
user@host# edit protocols ospf traceoptions
user@host# set file ospf-log
Results Confirm your configuration by entering the show routing-options and the show protocols
ospf commands. If the output does not display the intended configuration, repeat the
instructions in this example to correct the configuration.
To confirm your OSPFv3 configuration, enter the show routing-options and the show
protocols ospf3 commands.
CLI Quick To quickly trace SPF calculations, copy the following commands and paste them into
Configuration the CLI.
[edit]
set protocols ospf traceoptions file ospf-log
set protocols ospf traceoptions flag spf
[edit]
user@host# edit protocols ospf traceoptions
user@host# set file ospf-log
Results Confirm your configuration by entering the show protocols ospf command. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
To confirm your OSPFv3 configuration, enter the show protocols ospf3 command.
CLI Quick To quickly trace the creation, receipt, and retransmission of all LSAs, copy the following
Configuration commands and paste them into the CLI.
[edit]
set protocols ospf traceoptions file ospf-log
set protocols ospf traceoptions flag lsa-request
set protocols ospf traceoptions flag lsa-update
set protocols ospf traceoptions flag lsa-ack
[edit]
user@host# edit protocols ospf traceoptions
user@host# set file ospf-log
Results Confirm your configuration by entering the show protocols ospf command. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
flag lsa-request;
flag lsa-update;
flag lsa-ack;
}
To confirm your OSPFv3 configuration, enter the show protocols ospf3 command.
Verification
Purpose Verify that the Trace options field displays the configured trace operations, and verify
that the Trace file field displays the location on the routing device where the file is saved,
the name of the file to receive the output of the tracing operation, and the size of the file.
Action From operational mode, enter the show ospf overview extensive command for OSPFv2,
and enter the show ospf3 overview extensive command for OSPFv3.
• Junos OS Tracing and Logging Operations in the Junos OS System Basics Configuration
Guide
• Tracing Global Routing Protocol Operations on page 138 in the Junos OS Routing Protocols
Configuration Guide
Action From the CLI, enter the show ospf interface command.
Sample Output
user@host> show ospf interface
Intf State Area DR ID BDR ID Nbrs
at-5/1/0.0 PtToPt 0.0.0.0 0.0.0.0 0.0.0.0 1
ge-2/3/0.0 DR 0.0.0.0 192.168.4.16 192.168.4.15 1
Meaning The output shows a list of the device interfaces that are configured for OSPF. Verify the
following information:
• Under Area, each interface shows the area for which it was configured.
• Under Intf and State, the device loopback (lo0.0) interface and LAN interface that are
linked to the OSPF network's designated router (DR) are identified.
• Under DR ID, the IP address of the OSPF network's designated router appears.
Action From the CLI, enter the show ospf neighbor command.
Sample Output
user@host> show ospf neighbor
Address Intf State ID Pri Dead
192.168.254.225 fxp3.0 2Way 10.250.240.32 128 36
192.168.254.230 fxp3.0 Full 10.250.240.8 128 38
192.168.254.229 fxp3.0 Full 10.250.240.35 128 33
10.1.1.129 fxp2.0 Full 10.250.240.12 128 37
10.1.1.131 fxp2.0 Full 10.250.240.11 128 38
10.1.2.1 fxp1.0 Full 10.250.240.9 128 32
10.1.2.81 fxp0.0 Full 10.250.240.10 128 33
Meaning The output shows a list of the device's OSPF neighbors and their addresses, interfaces,
states, router IDs, priorities, and number of seconds allowed for inactivity (“dead” time).
Verify the following information:
• The device's own loopback address and the loopback addresses of any routers with
which the device has an immediate adjacency are listed.
• Under State, each neighbor shows a state of Full. Because full OSPF connectivity is
established over a series of packet exchanges between clients, the OSPF link might
take several seconds to establish. During that time, the state might be displayed as
Attempt, Init, or 2way, depending on the stage of negotiation.
If, after 30 seconds, the state is not Full, the OSPF configuration between the neighbors
is not functioning correctly.
For example, Figure 36 on page 746 shows a sample network with an OSPF topology.
In this topology, OSPF is being run on all interfaces. Each segment in the network is
identified by an address with a /24 prefix, with interfaces on either end of the segment
being identified by unique IP addresses.
Action From the CLI, enter the show ospf route command.
Sample Output
user@host> show ospf route
Prefix Path Route NH Metric NextHop Nexthop
Type Type Type Interface addr/label
10.10.10.1/24 Intra Network IP 1 ge-0/0/2.0 10.0.21.1
10.10.10.2/24 Intra Network IP 1 ge-0/0/2.0 10.0.21.1
10.10.10.4/24 Intra Network IP 1 ge-0/0/1.0 10.0.13.1
10.10.10.5/24 Intra Network IP 1 ge-0/0/2.0 10.0.21.1
10.10.10.6/24 Intra Network IP 1 ge-0/0/1.0 10.0.13.1
10.10.10.10/24 Intra Network IP 1 ge-0/0/2.0 10.0.21.1
10.10.10.11/24 Intra Network IP 1 ge-0/0/1.0 10.0.13.1
10.10.10.13/24 Intra Network IP 1 ge-0/0/1.0
10.10.10.16/24 Intra Network IP 1 ge-0/0/1.0 10.0.13.1
10.10.10.19/24 Intra Network IP 1 ge-0/0/1.0 10.0.13.1
10.10.10.20/24 Intra Network IP 1 ge-0/0/2.0 10.0.21.1
10.10.10.21/24 Intra Network IP 1 ge-0/0/2.0
Meaning The output lists each route, sorted by IP address. Routes are shown with a route type of
Network, and loopback addresses are shown with a route type of Router.
For the example shown in Figure 36 on page 746, verify that the OSPF routing table has
21 entries, one for each network segment and one for each router's loopback address.
2. In the Host Name box, type the name of a host for which you want to verify reachability
from the device.
Sample Output
Meaning Each numbered row in the output indicates a routing “hop” in the path to the host. The
three-time increments indicate the round-trip time (RTT) between the device and the
hop, for each traceroute packet. To ensure that the OSPF network is healthy, verify the
following information:
• The final hop in the list is the host you want to reach.
• The number of expected hops to the host matches the number of hops in the traceroute
output. The appearance of more hops than expected in the output indicates that a
network segment is likely not reachable. In this case, verify the routes with the show
ospf route command.
For information about show ospf route, see “Verifying the Number of OSPF Routes” on
page 746
Related • Junos OS Feature Support Reference for SRX Series and J Series Devices
Documentation
• OSPF Configuration Overview on page 508
The following sections explain each of the OSPF configuration statements, which are
organized alphabetically. The term OSPF refers to both OSPF version 2 (OSPFv2) and
OSPF version 3 (OSPFv3).
area
Description Specify the area identifier for this routing device to use when participating in OSPF routing.
All routing devices in an area must use the same area identifier to establish adjacencies.
Specify multiple area statements to configure the routing device as an area border router.
An area border router does not automatically summarize routes between areas. Use the
area-range statement to configure route summarization. By definition, an area border
router must be connected to the backbone area either through a physical link or through
a virtual link. To create a virtual link, include the virtual-link statement.
To specify that the routing device is directly connected to the OSPF backbone, include
the area 0.0.0.0 statement.
All routing devices on the backbone must be contiguous. If they are not, use the virtual-link
statement to create the appearance of connectivity to the backbone.
Options area-id—Area identifier. The identifier can be up to 32 bits. It is common to specify the
area number as a simple integer or an IP address. Area number 0.0.0.0 is reserved
for the OSPF backbone area.
area-range
Hierarchy Level [edit logical-systems logical-system-name protocols (ospf | ospf3) area area-id],
[edit logical-systems logical-system-name protocols (ospf | ospf3) area area-id nssa],
[edit logical-systems logical-system-name realm (ipv4-unicast | ipv4-multicast |
ipv6-multicast) area area-id],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
(ospf | ospf3) area area-id],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
(ospf | ospf3) area area-id nssa],
[edit logical-systems logical-system-name routing-instances routing-instance-name realm
(ipv4-unicast | ipv4-multicast | ipv6-multicast) area area-id],
[edit protocols (ospf | ospf3) area area-id],
[edit protocols (ospf | ospf3) area area-id nssa],
[edit protocols ospf3 realm (ipv4-unicast | ipv4-multicast | ipv6-multicast) area area-id],
[edit routing-instances routing-instance-name protocols (ospf | ospf3) area area-id],
[edit routing-instances routing-instance-name protocols (ospf | ospf3) area area-id nssa],
[edit routing-instances routing-instance-name realm (ipv4-unicast | ipv4-multicast |
ipv6-multicast) area area-id]
Description (Area border routers only) For an area, summarize a range of IP addresses when sending
summary link advertisements (within an area). To summarize multiple ranges, include
multiple area-range statements.
Default By default, area border routers do not summarize routes being sent from one area to
other areas, but rather send all routes explicitly.
override-metric metric—(Optional) Override the metric for the IP address range and
configure a specific metric value.
restrict—(Optional) Do not advertise the configured summary. This hides all routes that
are contained within the summary, effectively creating a route filter.
Range: 1 through 16,777,215
authentication
Syntax authentication {
md5 key-identifier {
key key-value;
start-time YYYY-MM-DD.hh:mm;
}
simple-password key;
}
Hierarchy Level [edit logical-systems logical-system-name protocols ospf area area-id interface
interface-name],
[edit logical-systems logical-system-name protocols ospf area area-id virtual-link],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
ospf area area-id interface interface-name],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
ospf area area-id virtual-link],
[edit protocols ospf area area-id interface interface-name],
[edit protocols ospf area area-id virtual-link],
[edit routing-instances routing-instance-name protocols ospf area area-id interface
interface-name],
[edit routing-instances routing-instance-name protocols ospf area area-id virtual-link]
Description Configure an authentication key (password). Neighboring routers use the password to
verify the authenticity of packets sent from this interface.
All routers that are connected to the same IP subnet must use the same authentication
scheme and password.
backup-spf-options
Description Configure options for running the shortest-path-first (SPF) algorithm for backup next
hops for protected OSPF interfaces. Use these options to override the default behavior
of having Junos OS calculate backup paths for all the topologies in an OSPF instance
when at least one OSPF interface is configured with link protection or node-link protection.
These options also enable you to change the default behavior for a specific topology in
an OSPF instance.
Options disable—Do not calculate backup next hops for the specified OSPF instance or topology.
no-install—Do not install the backup next hops for the specified OSPF instance or topology.
Related • Configuring Backup SPF Options for Protected OSPF Interfaces on page 645
Documentation
• link-protection on page 786
bandwidth-based-metrics
Syntax bandwidth-based-metrics {
bandwidth value;
metric number;
}
Hierarchy Level [edit logical-systems logical-system-name protocols (ospf | ospf3) area area-id interface
interface-name],
[edit logical-systems logical-system-name protocols ospf area area-id interface
interface-name topology topology-name],
[edit logical-systems logical-system-name protocols ospf3 realm (ipv4-unicast |
ipv4-multicast | ipv6-multicast) area area-id interface interface-name],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
(ospf | ospf3) area area-id interface interface-name],
[edit logical-systems logical-system-name protocols ospf area area-id interface
interface-name topology topology-name],
[edit logical-systems logical-system-name routing-instances routing-instances protocols
ospf3 realm (ipv4-unicast | ipv4-multicast | ipv6-multicast) area area-id interface
interface-name],
[edit protocols (ospf | ospf3) area area-id interface interface-name],
[edit protocols ospf area area-id interface interface-name topology topology-name],
[edit protocols ospf3 realm (ivp4-unicast | ipv4-multicast | ipv6-multicast) area area-id
interface interface-name],
[edit routing-instances routing-instance-name protocols (ospf | ospf3) area area-id interface
interface-name],
[edit routing-instances routing-instance-name protocols ospf area area-id interface
interface-name topology topology-name],
[edit routing-instances routing-instance-name protocols ospf3 realm (ipv4-unicast |
ipv4-multicast | ipv6-multicast) area area-id interface interface-name]
Description Specify a set of bandwidth threshold values and associated metric values for an OSPF
interface or for a topology on an OSPF interface. When the bandwidth of an interface
changes, Junos OS automatically sets the interface metric to the value associated with
the appropriate bandwidth threshold value.
NOTE: You must also configure a static metric value for the OSPF interface
or topology with the metric statement. Junos OS uses this value to calculate
the cost of a route from the OSPF interface or topology if the bandwidth for
the interface is higher than of any bandwidth threshold values configured for
bandwidth-based metrics.
bfd-liveness-detection
Syntax bfd-liveness-detection {
authentication {
algorithm algorithm-name;
key-chain key-chain-name;
loose-check;
}
detection-time {
threshold milliseconds;
}
full-neighbors-only
minimum-interval milliseconds;
minimum-receive-interval milliseconds;
no-adaptation;
transmit-interval {
threshold milliseconds;
minimum-interval milliseconds;
}
multiplier number;
version (1 | automatic);
}
Hierarchy Level [edit logical-systems logical-system-name protocols (ospf | ospf3) area area-id interface
interface-name],
[edit logical-systems logical-system-name protocols ospf3 realm (ipv4-unicast |
ipv4-multicast | ipv6-multicast) area area-id interface interface-name],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
(ospf | ospf3) area area-id interface interface-name],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
ospf3 realm (ipv4-unicast | ipv4-multicast | ipv6-multicast) area area-id interface
interface-name],
[edit protocols (ospf | ospf3) area area-id interface interface-name],
[edit protocols ospf3 realm (ipv4-unicast | ipv4-multicast | ipv6-multicast) area area-id
interface interface-name],
[edit routing-instances routing-instance-name protocols (ospf | ospf3) area area-id interface
interface-name],
[edit routing-instances routing-instance-name protocols ospf3 realm (ipv4-unicast |
ipv4-multicast | ipv6-multicast) area area-id interface interface-name]
full-neighbors-only—Establish BFD sessions only for OSPF neighbors in the full state. The
default behavior is to establish BFD sessions for all OSPF neighbors.
database-protection
Syntax database-protection {
ignore-count number;
ignore-time seconds;
maximum-lsa number;
reset-time seconds;
warning-only;
warning-threshold percent;
}
Description Configure the maximum number of link-state advertisements (LSAs) that are not
generated by the router or switch in a given OSPF instance.
Options ignore-count number—Configure the number of times the database can enter the ignore
state. When the ignore count is exceeded, the database enters the isolate state.
Range: 1 through 32
Default: 5
ignore-time seconds—Configure the time the database must remain in the ignore state
before it resumes regular operations (enters retry state).
Range: 30 through 3,600 seconds
Default: 300 seconds
reset-time seconds—Configure the time period during which the database must operate
without being in the ignore or isolate state before it is reset to a normal operating
state.
Range: 60 through 86,400 seconds
Default: 600 seconds
warning-only—Specify that only a warning should be issued when the maximum LSA
number is exceeded. If configured, no other action is taken against the database.
dead-interval
Hierarchy Level [edit logical-systems logical-system-name protocols ospf area area-id peer-interface
interface-name],
[edit logical-systems logical-system-name protocols (ospf | ospf3) area area-id interface
interface-name],
[edit logical-systems logical-system-name protocols (ospf | ospf3) area area-id virtual-link],
[edit logical-systems logical-system-name protocols ospf3 realm (ipv4-unicast |
ipv4-multicast | ipv6-multicast) area area-id interface interface-name],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
(ospf | ospf3) area area-id interface interface-name],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
(ospf | ospf3) area area-id virtual-link],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
ospf3 realm (ipv4-unicast | ipv4-multicast | ipv6-multicast) area area-id interface
interface-name],
[edit protocols ospf area area-id peer-interface interface-name],
[edit protocols (ospf | ospf3) area area-id interface interface-name],
[edit protocols (ospf | ospf3) area area-id virtual-link],
[edit protocols ospf3 realm (ipv4-unicast | ipv4-multicast | ipv6-multicast) area area-id
interface interface-name],
[edit routing-instances routing-instance-name protocols (ospf | ospf3) area area-id interface
interface-name],
[edit routing-instances routing-instance-name protocols (ospf | ospf3) area area-id
virtual-link],
[edit routing-instances routing-instance-name protocols ospf3 realm (ipv4-unicast |
ipv4-multicast | ipv6-multicast) area area-id interface interface-name]
Description Specify how long OSPF waits before declaring that a neighboring routing device is
unavailable. This is an interval during which the routing device receives no hello packets
from the neighbor.
default-lsa
Syntax default-lsa {
default-metric metric;
metric-type type;
type-7;
}
Hierarchy Level [edit logical-systems logical-system-name protocols (ospf | ospf3) area area-id nssa],
[edit logical-systems logical-system-name protocols ospf3 realm (ipv4-unicast |
ipv4-multicast | ipv6-multicast) area area-id nssa],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
(ospf | ospf3) area area-id nssa],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
ospf3 realm (ipv4-unicast | ipv4-multicast | ipv6-multicast) area area-id nssa],
[edit protocols (ospf | ospf3) area area-id nssa],
[edit protocols ospf3 realm (ipv4-unicast | ipv4-multicast | ipv6-multicast) area area-id
nssa],
[edit routing-instances routing-instance-name protocols (ospf | ospf3) area area-id nssa],
[edit routing-instances routing-instance-name protocols ospf3 realm (ipv4-unicast |
ipv4-multicast | ipv6-multicast) area area-id nssa]
Description On area border routers only, for a not-so-stubby area (NSSA), inject a default link-state
advertisement (LSA) with a specified metric value into the area. The default route
matches any destination that is not explicitly reachable from within the area.
default-metric
Hierarchy Level [edit logical-systems logical-system-name protocols (ospf | ospf3) area area-id nssa
default-lsa],
[edit logical-systems logical-system-name protocols (ospf | ospf3) area area-id stub],
[edit logical-systems logical-system-name protocols ospf3 realm (ipv4-unicast |
ipv4-multicast | ipv6-multicast) area area-id nssa default-lsa],
[edit logical-systems logical-system-name protocols ospf3 realm (ipv4-unicast |
ipv4-multicast | ipv6-multicast) area area-id stub],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
(ospf | ospf3) area area-id nssa default-lsa],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
(ospf | ospf3) area area-id stub],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
ospf3 realm (ipv4-unicast | ipv4-multicast | ipv6-multicast) area area-id nssa default-lsa],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
ospf3 realm (ipv4-unicast | ipv4-multicast | ipv6-multicast) area area-id stub],
[edit protocols (ospf | ospf3) area area-id nssa default-lsa],
[edit protocols (ospf | ospf3) area area-id stub],
[edit protocols ospf3 realm (ipv4-unicast | ipv4-multicast | ipv6-multicast) area area-id nssa
default-lsa],
[edit protocols ospf3 realm (ipv4-unicast | ipv4-multicast | ipv6-multicast) area area-id
stub],
[edit routing-instances routing-instance-name protocols (ospf | ospf3) area area-id nssa
default-lsa],
[edit routing-instances routing-instance-name protocols (ospf | ospf3) area area-id stub],
[edit routing-instances routing-instance-name protocols ospf3 realm (ipv4-unicast |
ipv4-multicast | ipv6-multicast) area area-id nssa default-lsa],
[edit routing-instances routing-instance-name protocols ospf3 realm (ipv4-unicast |
ipv4-multicast | ipv6-multicast) area area-id stub]
Description On area border routers only, for a stub area, inject a default route with a specified metric
value into the area. The default route matches any destination that is not explicitly
reachable from within the area.
demand-circuit
Syntax demand-circuit;
Hierarchy Level [edit logical-systems logical-system-name protocols (ospf | ospf3) area area-id interface
interface-name],
[edit logical-systems logical-system-name protocols ospf3 realm (ipv4-unicast |
ipv4-multicast | ipv6-multicast) area area-id interface interface-name],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
ospf area area-id sham-link-remote],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
(ospf | ospf3) area area-id interface interface-name],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
ospf3 realm (ipv4-unicast | ipv4-multicast | ipv6-multicast) area area-id interface
interface-name],
[edit protocols (ospf | ospf3) area area-id interface interface-name],
[edit protocols ospf3 realm (ipv4-unicast | ipv4-multicast | ipv6-multicast) area area-id
interface interface-name],
[edit routing-instances routing-instance-name protocols (ospf | ospf3) area area-id interface
interface-name],
[edit routing-instances routing-instance-name protocols ospf area area-id sham-link-remote],
[edit routing-instances routing-instance-name protocols ospf3 realm (ipv4-unicast |
ipv4-multicast | ipv6-multicast) area area-id interface interface-name]
disable
Hierarchy Level [edit logical-systems logical-system-name protocols (ospf | ospf3) area area-id interface
interface-name],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
(ospf | ospf3) area area-id interface interface-name],
[edit protocols (ospf | ospf3) area area-id interface interface-name],
[edit routing-instances routing-instance-name protocols (ospf | ospf3) area area-id interface
interface-name]
Related • Example: Configuring Synchronization Between LDP and IGPs on page 583
Documentation
disable (OSPF)
Syntax disable;
domain-id
Description Specify a domain ID for a route. The domain ID identifies the OSPF domain from which
the route originated.
Options domain-id—You can specify either an IP address or an IP address and a local identifier
using the following format: ip-address:local-identifier. If you do not specify a local
identifier with the IP address, the identifier is assumed to have a value of 0.
Default: If the router ID is not configured in the routing instance, the router ID is derived
from an interface address belonging to the routing instance.
domain-vpn-tag
Description Set a virtual private network (VPN) tag for OSPFv2 external routes generated by the
provider edge (PE) router.
export
Description Apply one or more policies to routes being exported from the routing table into OSPF.
external-preference
flood-reduction
Syntax flood-reduction;
Hierarchy Level [edit protocols (ospf | ospf3) area area-id interface interface-name],
[edit logical-systems logical-system-name protocols (ospf | ospf3) area area-id interface
interface-name],
[edit routing-instances routing-instance-name protocols (ospf | ospf3) area area-id interface
interface-name],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
(ospf | ospf3) area area-id interfaces interface-name],
[edit protocols ospf3 realm (ipv4-multicast | ipv4-unicast | ipv6-multicast) area area-id
interfaces interface-name],
[edit logical-systems logical-system-name protocols ospf3 realm (ipv4-multicast |
ipv4-unicast | ipv6-multicast) area area-id interfaces interface-name],
[edit routing-instances routing-instance-name protocols ospf3 realm (ipv4-multicast |
ipv4-unicast | ipv6-multicast) area area-id interfaces interface-name],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
ospf3 realm (ipv4-multicast | ipv4-unicast | ipv6-multicast) area area-id interfaces
interface-name],
[edit protocols (ospf | ospf3) area area-id virtual-link neighbor-id router-id transit-area
area-id],
[edit logical-systems logical-system-name protocols (ospf | ospf3) area area-id virtual-link
neighbor-id router-id transit–area transit-area area-id],
[edit routing-instances routing-instance-name protocols (ospf | ospf3) area area-id virtual-link
neighbor-id router-id transit-area area-id],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
(ospf | ospf3) area area-id virtual-link neighbor-id router-id transit-area area-id],
[edit routing-instances routing-instance-name protocols ospf area area-id sham-link-remote
address ],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
ospf area area-id sham-link-remote address],
[edit protocols ospf area area-id peer-interface interface-name],
[edit logical-systems logical-system-name protocols ospf area area-id peer-interface
interface-name]
Description Specify to send self-generated link-state advertisements (LSAs) with the DoNotAge bit
set. As a result, self-originated LSAs are not reflooded every 30 minutes, as required by
OSPF by default. An LSA is refreshed only when the content of the LSA changes, which
reduces OSPF traffic overhead in stable topologies.
Related • Configuring OSPF Refresh and Flooding Reduction in Stable Topologies on page 565
Documentation
graceful-restart
Syntax graceful-restart {
disable;
helper-disable <standard | restart-signaling | both>;
no-strict-lsa-checking;
notify-duration seconds;
restart-duration seconds;
}
notify-duration seconds—Estimated time to send out purged grace LSAs over all the
interfaces.
Range: 1 through 3600 seconds
Default: 30 seconds
• Example: Configuring the Helper Capability Mode for OSPFv3 Graceful Restart on
page 635
• Example: Disabling Strict LSA Checking for OSPF Graceful Restart on page 639
hello-interval
Hierarchy Level [edit logical-systems logical-system-name protocols ospf area area-id peer-interface
interface-name],
[edit logical-systems logical-system-name protocols (ospf | ospf3) area area-id interface
interface-name],
[edit logical-systems logical-system-name protocols (ospf | ospf3) area area-id virtual-link],
[edit logical-systems logical-system-name protocols ospf3 realm (ipv4-unicast |
ipv4-multicast | ipv6-multicast) area area-id interface interface-name],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
(ospf | ospf3) area area-id interface interface-name],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
(ospf | ospf3) area area-id virtual-link],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
ospf3 realm (ipv4-unicast | ipv4-multicast | ipv6-multicast) area area-id interface
interface-name],
[edit protocols ospf area area-id peer-interface interface-name],
[edit protocols (ospf | ospf3) area area-id interface interface-name],
[edit protocols (ospf | ospf3) area area-id virtual-link],
[edit protocols ospf3 realm (ipv4-unicast | ipv4-multicast | ipv6-multicast) area area-id
interface interface-name],
[edit routing-instances routing-instance-name protocols (ospf | ospf3) area area-id interface
interface-name],
[edit routing-instances routing-instance-name protocols (ospf | ospf3) area area-id
virtual-link],
[edit routing-instances routing-instance-name protocols ospf3 realm (ipv4-unicast |
ipv4-multicast | ipv6-multicast) area area-id interface interface-name]
Description Specify how often the routing device sends hello packets out the interface. The hello
interval must be the same for all routing devices on a shared logical IP network.
hold-time
Hierarchy Level [edit logical-systems logical-system-name protocols ospf area area-id interface
interface-name],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
ospf area area-id interface interface-name],
[edit protocols ospf area area-id interface interface-name],
[edit routing-instances routing-instance-name protocols ospf area area-id interface
interface-name]
Description Configure the time period to advertise the maximum cost metric for a link that is not fully
operational.
Related • Example: Configuring Synchronization Between LDP and IGPs on page 583
Documentation
ignore-lsp-metrics
Syntax ignore-lsp-metrics;
Description Ignore RSVP LSP metrics in OSPF traffic engineering shortcut calculations.
import
Description Filter OSPF routes from being added to the routing table.
inter-area-prefix-export
Description Apply an export policy for OSPFv3 to specify which interarea prefix link-state
advertisements (LSAs) are flooded into an area.
Related • Import and Export Policies for Network Summaries Overview on page 695
Documentation
• inter-area-prefix-import on page 778
inter-area-prefix-import
Description Apply an import policy for OSPFv3 to specify which routes learned from an area are used
to generate interarea prefixes into other areas.
Related • Import and Export Policies for Network Summaries Overview on page 695
Documentation
• inter-area-prefix-export on page 777
interface
Hierarchy Level [edit logical-systems logical-system-name protocols (ospf | ospf3) area area-id],
[edit logical-systems logical-system-name protocols ospf3 realm (ipv4-unicast |
ipv4-multicast | ipv6-multicast) area area-id],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
(ospf | ospf3) area area-id],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
ospf3 realm (ipv4-unicast | ipv4-multicast | ipv6-multicast) area area-id],
[edit protocols (ospf | ospf3) area area-id],
You must include at least one interface statement in the configuration to enable OSPF
on the routing device.
NOTE: You cannot run both OSPF and ethernet-tcc encapsulation between
two Juniper Networks routing devices.
interface-type
Hierarchy Level [edit logical-systems logical-system-name protocols (ospf | ospf3) area area-id interface
interface-name],
[edit logical-systems logical-system-name protocols ospf3 realm (ipv4-multicast |
ipv4-unicast | ipv6-multicast) area area-id interface interface-name],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
(ospf | ospf3) area area-id interface interface-name],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
ospf3 realm (ipv4-multicast | ipv4-unicast | ipv6-multicast) area area-id interface
interface-name],
[edit protocols (ospf | ospf3) area area-id interface interface-name],
[edit protocols ospf3 realm (ipv4-multicast | ipv4-unicast | ipv6-multicast) area area-id
interface interface-name],
[edit routing-instances routing-instance-name protocols (ospf | ospf3) area area-id interface
interface-name],
[edit routing-instances routing-instance-name protocols ospf3 realm (ipv4-multicast |
ipv4-unicast | ipv6-multicast) area area-id interface interface-name]
By default, the software chooses the correct interface type based on the type of physical
interface. Therefore, you should never have to set the interface type. The exception to
this is for NBMA interfaces, which default to an interface type of point-to-multipoint. To
have these interfaces explicitly run in Nonbroadcast multiaccess (NBMA) mode, configure
the nbma interface type, using the IP address of the local ATM interface.
In Junos OS Release 9.3 and later, a point-to-point interface can be an Ethernet interface
without a subnet.
Default The software chooses the correct interface type based on the type of physical interface.
p2p—Point-to-point interface.
ipsec-sa
Hierarchy Level [edit logical-systems logical-system-name protocols (ospf | ospf3) area area-id interface
interface-name],
[edit logical-systems logical-system-name protocols (ospf | ospf3) area area-id virtual-link],
[edit logical-systems logical-system-name protocols ospf3 realm (ipv4-unicast |
ipv4-multicast | ipv6-multicast) area area-id interface interface-name],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
(ospf | ospf3) area area-id interface interface-name],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
ospf area area-id sham-link-remote address],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
(ospf | ospf3) area area-id virtual-link],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
ospf3 realm (ipv4-unicast | ipv4-multicast | ipv6-multicast) area area-id interface
interface-name],
[edit protocols (ospf | ospf3) area area-id interface interface-name],
[edit protocols (ospf | ospf3) area area-id virtual-link],
[edit protocols ospf3 realm (ipv4-unicast | ipv4-multicast | ipv6-multicast) area area-id
interface interface-name],
[edit routing-instances routing-instance-name protocols (ospf | ospf3) area area-id interface
interface-name],
[edit routing-instances routing-instance-name protocols ospf area area-id sham-link-remote
address],
[edit routing-instances routing-instance-name protocols (ospf | ospf3) area area-id
virtual-link],
[edit routing-instances routing-instance-name protocols ospf3 realm (ipv4-unicast |
ipv4-multicast | ipv6-multicast) area area-id interface interface-name]
Description Apply IPsec authentication to an OSPF interface or virtual link or to an OSPFv2 remote
sham link.
label-switched-path
metric—Metric value.
Range: 1 through 65,535
Default: 1
ldp-synchronization
Syntax ldp-synchronization {
disable;
hold-time seconds;
}
Hierarchy Level [edit logical-systems logical-system-name protocols ospf area area-id interface
interface-name],
[edit logical-systems logical-system-name protocols ospf3 realm ipv4-unicast area area-id
interface interface-name],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
ospf area area-id interface interface-name],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
ospf3 realm ipv4-unicast area area-id interface interface-name],
[edit protocols ospf area area-id interface interface-name],
[edit protocols ospf3 realm ipv4-unicast area area-id interface interface-name],
[edit routing-instances routing-instance-name protocols ospf area area-id interface
interface-name],
[edit routing-instances routing-instance-name protocols ospf3 realm ipv4-unicast area
area-id interface interface-name]
Description Enable synchronization by advertising the maximum cost metric until LDP is operational
on the link.
Related • Example: Configuring Synchronization Between LDP and IGPs on page 583
Documentation
link-protection
Syntax link-protection;
Hierarchy Level [edit protocols (ospf | ospf3) area area-name interface interface-name],
[edit logical-systems logical-system-name protocols (ospf | ospf3) area area-name interface
interface-name],
[edit routing-instances routing-instance-name protocols (ospf | ospf3) area area-name
interface interface-name],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
(ospf | ospf3) area area-name interface interface-name],
[edit protocols ospf3 realm ipv4-unicast area area-id],
[edit logical-systems logical-system-name protocols ospf3 realm ipv4-unicast area area-id],
[edit routing-instances routing-instance-name protocols ospf3 realm ipv4-unicast area
area-id],
[edit protocols ospf area area-id interface interface-name topology (default | name)],
[edit logical-systems logical-system-name protocols ospf area area-id interface
interface-name topology (default | name)],
[edit routing-instances routing-instance-name protocols ospf area area-id interface
interface-name topology (default | name)]
Description Enable link protection on the specified OSPF interface. Junos OS creates a backup
loop-free alternate path to the primary next hop for all destination routes that traverse
the protected interface.
NOTE: This feature calculates alternate next hop paths for unicast routes
only. Therefore, this statement is not supported with the OSPF IPv4 multicast
topology or with the OSPFv3 IPv4 multicast and IPv6 multicast realms.
lsp-metric-into-summary
Syntax lsp-metric-into-summary;
md5
Hierarchy Level [edit logical-systems logical-system-name protocols ospf area area-id interface
interface-name authentication],
[edit logical-systems logical-system-name protocols ospf area area-id virtual-link
authentication],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
ospf area area-id interface interface-name authentication],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
ospf area area-id virtual-link authentication],
[edit protocols ospf area area-id interface interface-name authentication],
[edit protocols ospf area area-id virtual-link authentication],
[edit routing-instances routing-instance-name protocols ospf area area-id interface
interface-name authentication],
[edit routing-instances routing-instance-name protocols ospf area area-id virtual-link
authentication]
key key-values—One or more MD5 key strings. The MD5 key values can be from 1 through
16 characters long. You can specify more than one key value within the list. Characters
can include ASCII strings. If you include spaces, enclose all characters in quotation
marks (“ ”).
metric
Hierarchy Level [edit logical-systems logical-system-name protocols (ospf | ospf3) area area-id interface
interface-name],
[edit logical-systems logical-system-name protocols ospf area area-id interface
interface-name topology (ipv4-multicast | name)],
[edit logical-systems logical-system-name protocols ospf3 realm (ipv4-unicast |
ipv4-multicast | ipv6-multicast) area area-id interface interface-name],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
(ospf | ospf3) area area-id interface interface-name],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
ospf area area-id sham-link-remote],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
ospf area area-id interface interface-name topology (ipv4-multicast | name)],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
ospf3 realm (ipv4-unicast | ipv4-multicast | ipv6-multicast) area area-id interface
interface-name],
[edit protocols (ospf | ospf3) area area-id interface interface-name],
[edit protocols ospf area area-id interface interface-name topology (ipv4-multicast | name)],
[edit protocols ospf3 realm (ipv4-unicast | ipv4-multicast | ipv6-multicast) area area-id
interface interface-name],
[edit routing-instances routing-instance-name protocols (ospf | ospf3) area area-id interface
interface-name],
[edit routing-instances routing-instance-name protocols ospf area area-id sham-link-remote],
[edit routing-instances routing-instance-name protocols ospf area area-id interface
interface-name topology (ipv4-multicast | name)],
[edit routing-instances routing-instance-name protocols ospf3 realm (ipv4-unicast |
ipv4-multicast | ipv6-multicast) area area-id interface interface-name]
Description Specify the cost of an OSPF interface. The cost is a routing metric that is used in the
link-state calculation.
To set the cost of routes exported into OSPF, configure the appropriate routing policy.
Related • Example: Controlling the Cost of Individual OSPF Network Segments on page 568
Documentation
• Example: Configuring OSPFv2 Sham Links on page 671
metric-type
Hierarchy Level [edit logical-systems logical-system-name protocols (ospf | ospf3) area area-id nssa
default-lsa],
[edit logical-systems logical-system-name protocols ospf3 realm (ipv4-unicast |
ipv4-multicast | ipv6-multicast)] area area-id nssadefault-lsa],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
(ospf | ospf3) area area-id nssa default-lsa],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
ospf3 realm (ipv4-unicast | ipv4-multicast | ipv6-multicast)] area area-id nssa default-lsa],
[edit protocols (ospf | ospf3) area area-id nssa default-lsa],
[edit protocols ospf3 realm (ipv4-unicast | ipv4-multicast | ipv6-multicast)] area area-id
nssa default-lsa],
[edit routing-instances routing-instance-name protocols (ospf | ospf3) area area-id nssa
default-lsa],
[edit routing-instances routing-instances protocols ospf3 realm (ipv4-unicast | ipv4-multicast
| ipv6-multicast)] area area-id nssa default-lsa]
Description Specify the external metric type for the default LSA.
Usage Guidelines The configured metric determines the method used to compute the cost to a destination:
• The Type 1 external metric is equivalent to the link-state metric. The path cost uses
the advertised external path cost and the path cost to the AS boundary router (the
route is equal to the sum of all internal costs and the external cost).
• The Type 2 external metric uses the cost assigned by the AS boundary router (the route
is equal to the external cost alone). By default, OSPF uses the Type 2 external metric.
neighbor
Hierarchy Level [edit logical-systems logical-system-name protocols (ospf | ospf3) area area-id interface
interface-name],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
(ospf | ospf3) area area-id interface interface-name],
[edit protocols (ospf | ospf3) area area-id interface interface-name],
[edit routing-instances routing-instance-name protocols (ospf | ospf3) area area-id interface
interface-name]
network-summary-export
Description Apply an export policy that specifies which network-summary link-state advertisements
(LSAs) are flooded into an OSPFv2 area.
Related • Import and Export Policies for Network Summaries Overview on page 695
Documentation
• Example: Configuring an OSPF Export Policy for Network Summaries on page 695
network-summary-import
Description Apply an import policy that specifies which routes learned from an OSPFv2 area are used
to generate network-summary link-state advertisements to other areas.
Related • Import and Export Policies for Network Summaries Overview on page 695
Documentation
• Example: Configuring an OSPF Import Policy for Network Summaries on page 704
no-domain-vpn-tag
Syntax no-domain-vpn-tag;
Description Disable the virtual private network (VPN) tag for OSPFv2 and OSPFv3 external routes
generated by the provider edge (PE) router when the VPN tag is no longer needed.
Options None.
no-eligible-backup
Syntax no-eligbile-backup;
Hierarchy Level [edit protocols (ospf | ospf3) area area-id interface interface-name],
[edit logical-systems logical-system-name protocols (ospf | ospf3) area area-id interface
interface-name],
[edit routing-instances routing-instance-name protocols (ospf | ospf3) area area-id interface
interface-name],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
(ospf | ospf3) area area-id interface interface-name],
[edit protocols ospf3 realm ipv4-unicast area area-id interface interface-name],
[edit logical-systems logical-system-name protocols ospf3 realm ipv4-unicast area area-id
interface interface-name],
[edit routing-instances routing-instance-name protocols ospf3 realm ipv4-unicast area
area-id interface interface-name],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
ospf3 realm ipv4-unicast area area-id interface interface-name],
[edit protocols ospf area area-id interface interface-name topology (default | name)],
[edit logical-systems logical-system-name protocols ospf area area-id interface
interface-name topology (default | name)],
[edit routing-instances routing-instance-name protocols ospf area area-id interface
interface-name topology (default | name)],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
ospf area area-id interface interface-name topology (default | name)],
Description Exclude the specified interface as a backup interface for OSPF interfaces on which link
protection or node-link protection is enabled.
Related • Excluding an OSPF Interface as a Backup for a Protected Interface on page 645
Documentation
• link-protection on page 786
no-interface-state-traps
Syntax no-interface-state-traps;
Hierarchy Level [edit logical-systems logical-system-name protocols ospf area area-id interface
interface-name],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
ospf area area-id interface interface-name],
[edit protocols ospf area area-id interface interface-name],
[edit routing-instances routing-instance-name protocols ospf area area-id interface
interface-name],
Description Disable the OSPF traps for interface state changes. This statement is particularly useful
for OSPF interfaces in passive mode.
Default This statement is disabled by default. You must include the no-interface-state-traps
statement to disable OSPF traps for interface state changes.
no-neighbor-down-notification
Syntax no-neighbor-down-notification;
Hierarchy Level [edit logical-systems logical-system-name protocols ospf area area-id interface
interface-name],
[edit protocols ospf area area-id interface interface-name]
Description Disable neighbor down notification for OSPF to allow for migration from OSPF to IS-IS
without disruption of the RSVP neighbors and associated RSVP-signaled LSPs.
Related • Disabling Adjacency Down and Neighbor Down Notification in IS-IS and OSPF on
Documentation page 415
no-nssa-abr
Syntax no-nssa-abr;
no-rfc-1583
Syntax no-rfc-1583;
Description Disable compatibility with RFC 1583, OSPF Version 2. If the same external destination is
advertised by AS boundary routers that belong to different OSPF areas, disabling
compatibility with RFC 1583 can prevent routing loops.
Related • Example: Disabling OSPFv2 Compatibility with RFC 1583 on page 538
Documentation
no-summaries
See summaries
node-link-protection
Syntax node-link-protection;
Hierarchy Level [edit protocols (ospf | ospf3) protocols area area-id interface interface-name],
[edit logical-systems logical-system-name protocols (ospf | ospf3) area area-id interface
interface-name],
[edit routing-instances routing-instance-name protocols (ospf | ospf3) area area-id interface
interface-name],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
(ospf | ospf3) area area-id interface interface-name],
[edit protocols ospf3 realm ipv4-unicast area area-id interface interface-name],
[edit logical-systems logical-system-name protocols ospf3 realm ipv4-unicast area area-id
interface interface-name],
[edit routing-instances routing-instance-name protocols ospf3 realm ipv4-unicast area
area-id interface interface-name],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
ospf3 realm ipv4-unicast area area-id interface interface-name],
Description Enable node-link protection on the specified OSPF interface. Junos OS creates an alternate
loop-free path to the primary next hop for all destination routes that traverse a protected
interface. This alternate path avoids the primary next-hop router altogether and
establishes a path through a different router.
NOTE: This feature is not supported for the OSPF IPv4 multicast topology
or for the OSPFv3 IPv4 multicast or IPv6 multicast topologies because
node-link protection creates alternate next-hop paths only for unicast routes.
nssa
Syntax nssa {
area-range network/mask-length <restrict> <exact> <override-metric metric>;
default-lsa {
default-metric metric;
metric-type type;
type-7;
}
(no-summaries | summaries);
}
Hierarchy Level [edit logical-systems logical-system-name protocols (ospf | ospf3) area area-id],
[edit logical-systems logical-system-name protocols ospf3 realm (ipv4-unicast |
ipv4-multicast | ipv6-multicast)],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
(ospf | ospf3) area area-id],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
ospf3 realm (ipv4-unicast | ipv4-multicast | ipv6-multicast)],
[edit protocols (ospf | ospf3) area area-id],
[edit protocols ospf3 realm (ipv4-unicast | ipv4-multicast | ipv6-multicast)],
[edit routing-instances routing-instance-name protocols (ospf | ospf3) area area-id],
[edit routing-instances routing-instance-name protocols ospf3 realm (ipv4-unicast |
ipv4-multicast | ipv6-multicast)]
Description Configure a not-so-stubby area (NSSA). An NSSA allows external routes to be flooded
within the area. These routes are then leaked into other areas.
You cannot configure an area as being both a stub area and an NSSA.
ospf
You must include the ospf statement to enable OSPF on the routing device.
ospf3
overload
Syntax overload {
timeout seconds;
}
Description Configure the local routing device so that it appears to be overloaded. You might do this
when you want the routing device to participate in OSPF routing, but do not want it to
be used for transit traffic.
Related • Example: Configuring OSPF to Make Routing Devices Appear Overloaded on page 577
Documentation
• Configuring a Topology to Appear Overloaded on page 316
passive
Syntax passive {
traffic-engineering {
remote-node-id address;
}
}
Hierarchy Level [edit logical-systems logical-system-name protocols (ospf | ospf3) area area-id interface
interface-name],
[edit logical-systems logical-system-name protocols ospf3 realm (ipv4-unicast |
ipv4-multicast | ipv6-multicast) area area-id interface interface-name],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
(ospf | ospf3) area area-id interface interface-name],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
ospf3 realm (ipv4-unicast | ipv4-multicast | ipv6-multicast) area area-id interface
interface-name],
[edit protocols (ospf | ospf3) area area-id interface interface-name],
[edit protocols ospf3 realm (ipv4-unicast | ipv4-multicast | ipv6-multicast) area area-id
interface interface-name],
[edit routing-instances routing-instance-name protocols (ospf | ospf3) area area-id interface
interface-name],
[edit routing-instances routing-instance-name protocols ospf3 realm (ipv4-unicast |
ipv4-multicast | ipv6-multicast) area area-id interface interface-name]
Description Advertise the direct interface addresses on an interface without actually running OSPF
on that interface. A passive interface is one for which the address information is advertised
as an internal route in OSPF, but on which the protocol does not run.
Enable OSPF on an interface by including the interface statement at the [edit protocols
(ospf | ospf3) area area-id] or the [edit routing-instances routing-instance-name protocols
ospf area area-id] hierarchy levels. Disable it by including the disable statement, To prevent
OSPF from running on an interface, include the passive statement. These three states
are mutually exclusive.
peer-interface
Options interface-name—Name of the peer interface. To configure all interfaces, you can specify
all.
poll-interval
Hierarchy Level [edit logical-systems logical-system-name protocols (ospf | ospf3) area area-id interface
interface-name],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
(ospf | ospf3) area area-id interface interface-name],
[edit protocols (ospf | ospf3) area area-id interface interface-name],
[edit routing-instances routing-instance-name protocols (ospf | ospf3) area area-id interface
interface-name]
Description For nonbroadcast interfaces only, specify how often the router sends hello packets out
of the interface before it establishes adjacency with a neighbor.
preference
prefix-export-limit
Related • Example: Limiting the Number of Prefixes Exported to OSPF on page 563
Documentation
• Configuring a Prefix Export Limit for MT-OSPF on page 316
priority
Hierarchy Level [edit logical-systems logical-system-name protocols (ospf | ospf3) area area-id interface
interface-name],
[edit logical-systems logical-system-name protocols ospf3 realm (ipv4-unicast |
ipv4-multicast | ipv6-multicast)] area area-id interface interface-name],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
(ospf | ospf3) area area-id interface interface-name],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
ospf3 realm (ipv4-unicast | ipv4-multicast | ipv6-multicast)] area area-id interface
interface-name],
[edit protocols (ospf | ospf3) area area-id interface interface-name],
[edit protocols ospf3 realm (ipv4-unicast | ipv4-multicast | ipv6-multicast)] area area-id
interface interface-name],
[edit routing-instances routing-instance-name protocols (ospf | ospf3) area area-id interface
interface-name],
[edit routing-instances routing-instance-name protocols ospf3 realm (ipv4-unicast |
ipv4-multicast | ipv6-multicast)] area area-id interface interface-name]
Description Specify the routing device’s priority for becoming the designated routing device. The
routing device that has the highest priority value on the logical IP network or subnet
becomes the network’s designated router. You must configure at least one routing device
on each logical IP network or subnet to be the designated router. You also should specify
a routing device’s priority for becoming the designated router on point-to-point interfaces.
Options number—Routing device’s priority for becoming the designated router. A priority value
of 0 means that the routing device never becomes the designated router. A value
of 1 means that the routing device has the least chance of becoming a designated
router.
Range: 0 through 255
Default: 128
realm
Description Configure OSPFv3 to advertise address families other than unicast IPv6. Junos OS maps
each address family you configure to a separate realm with its own set of neighbors and
link-state database.
Related • Example: Configuring Multiple Address Families for OSPFv3 on page 554
Documentation
reference-bandwidth
Description Set the reference bandwidth used in calculating the default interface cost. The cost is
calculated using the following formula:
cost = ref-bandwidth/bandwidth
Related • Example: Controlling the Cost of Individual OSPF Network Segments on page 568
Documentation
• metric on page 789
retransmit-interval
Hierarchy Level [edit logical-systems logical-system-name protocols ospf area area-id peer-interface
interface-name],
[edit logical-systems logical-system-name protocols (ospf | ospf3) area area-id interface
interface-name],
[edit logical-systems logical-system-name protocols (ospf | ospf3) area area-id virtual-link],
[edit logical-systems logical-system-name protocols ospf3 realm (ipv4-unicast |
ipv4-multicast | ipv6-multicast) area area-id interface interface-name],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
(ospf | ospf3) area area-id interface interface-name],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
(ospf | ospf3) area area-id virtual-link],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
ospf3 realm (ipv4-unicast | ipv4-multicast | ipv6-multicast) area area-id interface
interface-name],
[edit protocols ospf area area-id peer-interface interface-name],
[edit protocols (ospf | ospf3) area area-id interface interface-name],
[edit protocols (ospf | ospf3) area area-id virtual-link],
[edit protocols ospf3 realm (ipv4-unicast | ipv4-multicast | ipv6-multicast) area area-id
interface interface-name],
[edit routing-instances routing-instance-name protocols (ospf | ospf3) area area-id interface
interface-name],
[edit routing-instances routing-instance-name protocols (ospf | ospf3) area area-id
virtual-link],
[edit routing-instances routing-instance-name protocols ospf3 realm (ipv4-unicast |
ipv4-multicast | ipv6-multicast) area area-id interface interface-name]
Description Specify how long the routing device waits to receive a link-state acknowledgment packet
before retransmitting link-state advertisements (LSAs) to an interface’s neighbors.
rib-group
Description Install routes learned from OSPF routing instances into routing tables in the OSPF routing
table group.
route-type-community
Description Specify an extended community value to encode the OSPF route type. Each extended
community is coded as an eight-octet value. This statement sets the most significant
bit to either an IANA or vendor-specific route type.
Options iana—Encode a route type with the value 0x0306. This is the default value.
secondary
Syntax secondary;
Hierarchy Level [edit logical-systems logical-system-name protocols ospf area area-id interface
interface-name],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
ospf area area-id interface interface-name],
[edit protocols ospf area area-id interface interface-name],
[edit routing-instances routing-instance-name protocols ospf area area-id interface
interface-name]
Description Configure an interface to belong to another OSPF area. A logical interface can be
configured as primary interface only for one area. For any other area for which you
configure the interface, you must configure it as a secondary interface.
sham-link
Syntax sham-link {
local address;
}
sham-link-remote
shortcuts
Syntax shortcuts {
lsp-metric-into-summary;
}
Description Configure OSPF to use MPLS label-switched paths (LSPs) as shortcut next hops. By
default, shortcut routes calculated through OSPFv2 are installed in the inet.3 routing
table, and shortcut routes calculated through OSPFv3 are installed in the inet6.3 routing
table.
simple-password
Hierarchy Level [edit logical-systems logical-system-name protocols ospf area area-id interface
interface-name authentication],
[edit logical-systems logical-system-name protocols ospf area area-id virtual-link
authentication],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
ospf area area-id interface interface-name authentication],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
ospf area area-id virtual-link authentication],
[edit protocols ospf area area-id interface interface-name authentication],
[edit protocols ospf area area-id virtual-link authentication],
[edit routing-instances routing-instance-name protocols ospf area area-id interface
interface-name authentication],
[edit routing-instances routing-instance-name protocols ospf area area-id virtual-link
authentication]
spf-options
Syntax spf-options {
delay milliseconds;
holddown milliseconds;
rapid-runs number;
}
Description Configure options for running the shortest-path-first (SPF) algorithm. You can configure
the following:
• A delay for when to run the SPF algorithm after a network topology change is detected.
• The maximum number of times the SPF algorithm can run in succession.
• A hold-down interval after the SPF algorithm runs the maximum number of times.
Options delay milliseconds—Time interval between the detection of a topology change and when
the SPF algorithm runs.
Range: 50 through 8000 milliseconds
Default: 200 milliseconds
rapid-runs number—Maximum number of times the SPF algorithm can run in succession.
After the maximum is reached, the hold down interval begins.
Range: 1 through 5
Default: 3
Related • Example: Configuring SPF Algorithm Options for OSPF on page 580
Documentation
• Configuring Topologies and SPF Options for MT-OSPF on page 314
stub
Hierarchy Level [edit logical-systems logical-system-name protocols (ospf | ospf3) area area-id],
[edit logical-systems logical-system-name protocols ospf3 realm (ipv4-unicast |
ipv4-multicast | ipv6-multicast)],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
(ospf | ospf3) area area-id],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
ospf3 realm (ipv4-unicast | ipv4-multicast | ipv6-multicast)],
[edit protocols (ospf | ospf3) area area-id],
[edit protocols ospf3 realm (ipv4-unicast | ipv4-multicast | ipv6-multicast)],
[edit routing-instances routing-instance-name protocols (ospf | ospf3) area area-id],
[edit routing-instances routing-instance-name protocols ospf3 realm (ipv4-unicast |
ipv4-multicast | ipv6-multicast)]
Description Specify that this area not be flooded with AS external link-state advertisements (LSAs).
You must include the stub statement when configuring all routing devices that are in the
stub area.
You cannot configure an area to be both a stub area and a not-so-stubby area (NSSA).
Options no-summaries—(Optional) Do not advertise routes into the stub area. If you include the
default-metric option, only the default route is advertised.
summaries
Hierarchy Level [edit logical-systems logical-system-name protocols (ospf | ospf3) area area-id nssa],
[edit logical-systems logical-system-name protocols ospf3 realm (ipv4-unicast |
ipv4-multicast | ipv6-multicast) area area-id nssa],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
(ospf | ospf3) area area-id nssa],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
ospf3 realm (ipv4-unicast | ipv4-multicast | ipv6-multicast) area area-id nssa],
[edit protocols (ospf | ospf3) area area-id nssa],
[edit protocols ospf3 realm (ipv4-unicast | ipv4-multicast | ipv6-multicast)] area area-id
nssa],
[edit routing-instances routing-instance-name protocols (ospf | ospf3) area area-id nssa],
[edit routing-instances routing-instance-name protocols ospf3 realm (ipv4-unicast |
ipv4-multicast | ipv6-multicast) area area-id nssa]
Description Configure whether or not area border routers advertise summary routes into an
not-so-stubby area (NSSA):
te-metric
Hierarchy Level [edit logical-systems logical-system-name protocols ospf area area-id interface
interface-name],
[edit protocols ospf area area-id interface interface-name]
Description Metric value used by traffic engineering for information injected into the traffic engineering
database. The value of the traffic engineering metric does not affect normal OSPF
forwarding.
Related • Example: Configuring the Traffic Engineering Metric for a Specific OSPF Interface on
Documentation page 654
traceoptions
Syntax traceoptions {
file filename <files number> <size size> <world-readable | no-world-readable>;
flag flag <flag-modifier> <disable>;
}
To specify more than one tracing operation, include multiple flag statements.
Default The default OSPF protocol-level tracing options are those inherited from the routing
protocols traceoptions statement included at the [edit routing-options] hierarchy level.
Options disable—(Optional) Disable the tracing operation. You can use this option to disable a
single operation when you have defined a broad group of tracing operations, such
as all.
file filename—Name of the file to receive the output of the tracing operation. Enclose the
name within quotation marks. All files are placed in the directory /var/log. We
recommend that you place OSPF tracing output in the file ospf-log.
files number—(Optional) Maximum number of trace files. When a trace file named
trace-file reaches its maximum size, it is renamed trace-file.0, then trace-file.1, and
so on, until the maximum number of trace files is reached. Then, the oldest trace file
is overwritten.
If you specify a maximum number of files, you also must specify a maximum file size
with the size option.
Range: 2 through 1000 files
Default: 10 files
flag flag—Tracing operation to perform. To specify more than one tracing operation,
include multiple flag statements.
• graceful-restart—Graceful-restart events.
• hello—Hello packets, which are used to establish neighbor adjacencies and to determine
whether neighbors are reachable.
• normal—All normal operations. If you do not specify this option, only unusual or
abnormal operations are traced.
• state—State transitions.
flag-modifier—(Optional) Modifier for the tracing flag. You can specify one or more of
these modifiers:
size size—(Optional) Maximum size of each trace file, in kilobytes (KB), megabytes (MB),
or gigabytes (GB). When a trace file named trace-file reaches this size, it is renamed
trace-file.0. When the trace-file again reaches its maximum size, trace-file.0 is renamed
trace-file.1 and trace-file is renamed trace-file.0. This renaming scheme continues
until the maximum number of trace files is reached. Then, the oldest trace file is
overwritten.
If you specify a maximum file size, you also must specify a maximum number of trace
files with the files option.
Syntax: xk to specify KB, xm to specify MB, or xg to specify GB
Range: 10 KB through the maximum file size supported on your system
Default: 128 KB
Required Privilege routing and trace—To view this statement in the configuration.
Level routing-control and trace-control—To add this statement to the configuration.
traffic-engineering
traffic-engineering (OSPF)
Syntax traffic-engineering {
<advertise-unnumbered-interfaces>;
<credibility-protocol-preference>;
ignore-lsp-metrics;
multicast-rpf-routes;
no-topology;
shortcuts {
lsp-metric-into-summary;
}
}
NOTE: You must enable OSPF traffic engineering shortcuts to use the
multicast-rpf-routes statement. You must not allow LSP advertisements into
OSPF when configuring the multicast-rpf-routes statement.
Hierarchy Level [edit logical-systems logical-system-name protocols (ospf | ospf3) area area-id interface
interface-name passive],
[edit logical-systems logical-system-name protocols ospf3 realm (ipv4-unicast |
ipv4-multicast | ipv6-multicast) area area-id interface interface-name passive],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
(ospf | ospf3) area area-id interface interface-name passive],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
ospf3 realm (ipv4-unicast | ipv4-multicast | ipv6-multicast) area area-id interface
interface-name passive],
[edit protocols (ospf | ospf3) area area-id interface interface-name passive],
[edit protocols ospf3 realm (ipv4-unicast | ipv4-multicast | ipv6-multicast) area area-id
interface interface-name passive],
[edit routing-instances routing-instance-name protocols (ospf | ospf3) area area-id interface
interface-name passive],
[edit routing-instances routing-instance-name protocols ospf3 realm (ipv4-unicast |
ipv4-multicast | ipv6-multicast) area area-id interface interface-name passive]
Description Configure an interface in OSPF passive traffic engineering mode to enable dynamic
discovery of OSPF AS boundary routers.
Options remote-node-id address—The IP address at the far end of the inter-AS link.
Related • Example: Configuring OSPF Passive Traffic Engineering Mode on page 656
Documentation
• Junos OS MPLS Applications Configuration Guide
transit-delay
Hierarchy Level [edit logical-systems logical-system-name protocols ospf area area-id peer-interface
interface-name],
[edit logical-systems logical-system-name protocols (ospf | ospf3) area area-id interface
interface-name],
[edit logical-systems logical-system-name protocols (ospf | ospf3) area area-id virtual-link],
[edit logical-systems logical-system-name protocols ospf3 realm (ipv4-unicast |
ipv4-multicast | ipv6-multicast) area area-id interface interface-name],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
ospf area area-id interface interface-name],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
ospf area area-id virtual-link],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
ospf3 realm (ipv4-unicast | ipv4-multicast | ipv6-multicast) area area-id interface
interface-name],
[edit protocols ospf area area-id peer-interface interface-name],
[edit protocols (ospf | ospf3) area area-id interface interface-name],
[edit protocols (ospf | ospf3) area area-id virtual-link],
[edit protocols ospf3 realm (ipv4-unicast | ipv4-multicast | ipv6-multicast)] area area-id
interface interface-name],
[edit routing-instances routing-instance-name protocols ospf area area-id interface
interface-name],
[edit routing-instances routing-instance-name protocols ospf area area-id virtual-link],
[edit routing-instances routing-instance-name protocols ospf3 realm (ipv4-unicast |
ipv4-multicast | ipv6-multicast) area area-id interface interface-name]
Description Set the estimated time required to transmit a link-state update on the interface. When
calculating this time, make sure to account for transmission and propagation delays.
transmit-interval
Hierarchy Level [edit logical-systems logical-system-name protocols (ospf | ospf3) area area-id interface
interface-name],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
(ospf | ospf3) area area-id interface interface-name],
[edit protocols (ospf | ospf3) area area-id interface interface-name],
[edit routing-instances routing-instance-name protocols (ospf | ospf3) area area-id interface
interface-name]
Description Set the interval at which OSPF packets are transmitted on an interface.
type-7
Syntax type-7;
Hierarchy Level [edit logical-systems logical-system-name protocols (ospf | ospf3) area area-id nssa
default-lsa],
[edit logical-systems logical-system-name protocols ospf3 realm (ipv4-unicast |
ipv4-multicast | ipv6-multicast) area area-id nssa default-lsa],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
(ospf | ospf3) area area-id nssa default-lsa],
[edit logical-systems logical-system-name protocols ospf3 realm (ipv4-unicast |
ipv4-multicast | ipv6-multicast) area area-id nssa default-lsa],
[edit protocols (ospf | ospf3) area area-id nssa default-lsa],
[edit protocols ospf3 realm (ipv4-unicast | ipv4-multicast | ipv6-multicast) area area-id nssa
default-lsa],
[edit routing-instances routing-instance-name protocols (ospf | ospf3) area area-id nssa
default-lsa],
[edit routing-instances routing-instance-name protocols ospf3 realm (ipv4-unicast |
ipv4-multicast | ipv6-multicast) area area-id nssa default-lsa]
Description Flood Type 7 default link-state advertisements (LSAs) if the no-summaries statement
is configured.
By default, when the no-summaries statement is configured, a Type 3 LSA is injected into
not-so-stubby areas (NSSAs) for Junos OS Release 5.0 and later. To support backward
compatibility with earlier Junos OS releases, include the type-7 statement. This statement
enables NSSA ABRs to advertise a Type 7 default LSA into the NSSA if you have also
included the no-summaries statement in the configuration.
virtual-link
Hierarchy Level [edit logical-systems logical-system-name protocols (ospf | ospf3) area area-id],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
ospf area area-id],
[edit protocols (ospf | ospf3) area area-id],
[edit routing-instances routing-instance-name protocols ospf area area-id]
Description For backbone areas only, create a virtual link to use in place of an actual physical link. All
area border routers and other routing devices on the backbone must be contiguous. If
this is not possible and there is a break in OSPF connectivity, use virtual links to create
connectivity to the OSPF backbone. When configuring virtual links, you must configure
links on the two routing devices that form the end points of the link, and both of these
routing devices must be area border routers. You cannot configure links through stub
areas.
Options neighbor-id router-id—IP address of the routing device at the remote end of the virtual
link.
transit-area area-id—Area identifier of the area through which the virtual link transits.
Virtual links are not allowed to transit the backbone area.
Introduction to RIP
This chapter discusses the following topics that provide background information about
RIP:
RIP Overview
RIP version 1 packets contain the minimal information necessary to route packets through
a network. However, this version of RIP does not support authentication or subnetting.
• The longest network path cannot exceed 15 hops (assuming that each network, or
hop, has a cost of 1).
• RIP uses only a fixed metric to select a route. Other IGPs use additional parameters,
such as measured delay, reliability, and load.
RIP Packets
RIP packets contain the following fields:
• Address family identifier—Address family used by the originating router. The family is
always IP.
RIP Standards
To access Internet Requests for Comments (RFCs) and drafts, go to the Internet
Engineering Task Force (IETF) Web site at http://www.ietf.org.
Configuring RIP
protocols {
rip {
any-sender;
authentication-key password;
authentication-type type;
(check-zero | no-check-zero);
graceful-restart {
disable;
restart-time seconds;
}
holddown seconds;
import [ policy-names ];
message-size number;
metric-in metric;
receive receive-options;
rib-group group-name;
route-timeout seconds;
send send-options;
update-interval seconds;
traceoptions {
file filename <files number> <size size> <world-readable | no-world-readable>;
flag flag <flag-modifier> <disable>;
}
group group-name {
bfd-liveness-detection {
authentication {
algorithm algorithm-name;
key-chain key-chain-name;
loose-check;
}
detection-time {
threshold milliseconds;
}
minimum-interval milliseconds;
minimum-receive-interval milliseconds;
multiplier number;
no-adaptation;
transmit-interval {
threshold milliseconds;
minimum-interval milliseconds;
}
version (1 | automatic);
}
demand-circuit;
export [ policy-names ];
max-retrans-time seconds;
metric-out metric;
preference number;
route-timeout seconds;
update-interval seconds;
neighbor neighbor-name {
authentication-key password;
authentication-type type;
bfd-liveness-detection {
authentication {
algorithm algorithm-name;
key-chain key-chain-name;
loose-check;
}
detection-time {
threshold milliseconds;
}
minimum-interval milliseconds;
minimum-receive-interval milliseconds;
multiplier number;
transmit-interval {
threshold milliseconds;
minimum-interval milliseconds;
}
version (1 | automatic);
}
(check-zero | no-check-zero);
demand-circuit;
import [ policy-names ];
max-retrans-time seconds;
message-size number;
metric-in metric;
metric-out metric;
receive receive-options;
route-timeout seconds;
send send-options;
update-interval seconds;
}
}
}
}
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
To have a router exchange routes with other routers, you must configure RIP groups and
neighbors. RIP routes received from routers not configured as RIP neighbors are ignored.
Likewise, RIP routes are advertised only to routers configured as RIP neighbors, with an
appropriate RIP export policy applied.
For a routing device to accept RIP routes, you must include at least the rip, group, and
neighbor statements. Routes received from routing devices that are not configured as
neighbors are ignored. All other RIP configuration statements are optional. This minimum
configuration defines one neighbor. Include one neighbor statement for each interface
on which you want to receive routes. The local routing device imports all routes by default
from this neighbor and does not advertise routes. The routing device can receive both
version 1 and version 2 update messages, with 25 route entries per message. For routing
instances, include the statements at the [edit routing-instances routing-instance-name
protocols rip] hierarchy level.
protocols {
rip {
group group-name {
neighbor interface-name {
}
}
}
}
NOTE: When you configure RIP on an interface, you must also include the
family inet statement at the [edit interfaces interface-name unit
logical-unit-number] hierarchy level.
To define RIP global properties, which apply to all RIP neighbors, include one or more of
the following statements.
authentication-key password;
authentication-type type;
(check-zero | no-check-zero);
import [ policy-names ];
message-size number;
metric-in metric;
receive receive-options;
rib-group group-name;
send send-options;
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
For more information about configuring RIP global properties, see the following topics:
• Accepting RIP Packets with Nonzero Values in Reserved Fields on page 851
• Configuring the Number of Route Entries in RIP Update Messages on page 852
• Configuring the Metric Value Added to Imported RIP Routes on page 852
neighbor neighbor-name {
authentication-key password;
authentication-type type;
bfd-liveness-detection {
authentication {
algorithm algorithm-name;
key-chain key-chain-name;
loose-check;
}
detection-time {
threshold milliseconds;
}
minimum-interval milliseconds;
minimum-receive-interval milliseconds;
transmit-interval {
threshold milliseconds;
minimum-interval milliseconds;
}
multiplier number;
version (0 | 1 | automatic);
}
(check-zero | no-check-zero);
import [ policy-names ];
message-size number;
metric-in metric;
receive receive-options;
send send-options;
}
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
For more information about configuring RIP neighbor properties, see the following topics:
• Accepting RIP Packets with Nonzero Values in Reserved Fields on page 851
• Configuring the Number of Route Entries in RIP Update Messages on page 852
• Configuring the Metric Value Added to Imported RIP Routes on page 852
You can configure the router to authenticate RIP route queries. By default, authentication
is disabled. You can use the following authentication method:
authentication-key password;
authentication-type type;
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
The password can be up to 16 contiguous characters and can include any ASCII strings.
The Bidirectional Forwarding Detection (BFD) protocol is a simple hello mechanism that
detects failures in a network. Hello packets are sent at a specified, regular interval. A
neighbor failure is detected when the routing device stops receiving a reply after a specified
interval. BFD works with a wide variety of network environments and topologies. BFD
failure detection times are shorter than RIP detection times, providing faster reaction
times to various kinds of failures in the network. These timers are also adaptive. For
example, a timer can adapt to a higher value if the adjacency fails, or a neighbor can
negotiate a higher value for a timer than the one configured.
NOTE: To enable BFD for RIP, both sides of the connection must receive an
update message from the peer. By default, RIP does not export any routes.
Therefore you must enable update messages to be sent by configuring an
export policy for routes before a BFD session is triggered.
bfd-liveness-detection {
detection-time {
threshold milliseconds;
}
minimum-interval milliseconds;
minimum-receive-interval milliseconds;
multiplier number;
no-adaptation;
transmit-interval {
threshold milliseconds;
minimum-interval milliseconds;
}
version (1 | automatic);
}
To specify the threshold for the adaptation of the detection time, include the threshold
statement:
detection-time {
threshold milliseconds;
}
When the BFD session detection time adapts to a value equal to or higher than the
threshold, a single trap and a system log message are sent.
To specify the minimum transmit and receive interval for failure detection, include the
minimum-interval statement:
minimum-interval milliseconds;
This value represents the minimum interval at which the local routing device transmits
hello packets as well as the minimum interval at which the routing device expects to
receive a reply from a neighbor with which it has established a BFD session. You can
configure a value in the range from 1 through 255,000 milliseconds. You can also specify
the minimum transmit and receive intervals separately.
To specify only the minimum receive intervals for failure detection, include the
minimum-receive-interval statement:
minimum-receive-interval milliseconds;
This value represents the minimum interval at which the local routing device expects to
receive a reply from a neighbor with which it has established a BFD session. You can
configure a value in the range from 1 through 255,00 milliseconds.
To specify the number of hello packets not received by a neighbor that causes the
originating interface to be declared down, include the multiplier statement:
multiplier number;
The default is 3, and you can configure a value in the range from 1 through 255.
To specify only the minimum transmit interval for failure detection, include the
minimum-interval statement:
transmit-interval {
minimum-interval milliseconds;
}
This value represents the minimum interval at which the local routing device transmits
hello packets to the neighbor with which it has established a BFD session. You can
configure a value in the range from 1 through 255,000 milliseconds.
To specify the threshold for detecting the adaptation of the transmit interval, include
the threshold statement:
transmit-interval {
threshold milliseconds;
}
To specify the BFD version used for detection, include the version statement:
version (1 | automatic);
You can trace BFD operations by including the traceoptions statement at the [edit
protocols bfd] hierarchy level. For more information, see “Tracing BFD Protocol Traffic”
on page 86.
In Junos OS Release 9.0 and later, you can configure BFD sessions not to adapt to
changing network conditions. To disable BFD adaptation, include the no-adaptation
statement:
no-adaptation;
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
• keyed-md5—Keyed Message Digest 5 hash algorithm for sessions with transmit and
receive intervals greater than 100 ms. To authenticate the BFD session, keyed MD5
uses one or more secret keys (generated by the algorithm) and a sequence number
that is updated periodically. With this method, packets are accepted at the receiving
end of the session if one of the keys matches and the sequence number is greater than
or equal to the last sequence number received. Although more secure than a simple
password, this method is vulnerable to replay attacks. Increasing the rate at which the
sequence number is updated can reduce this risk.
• keyed-sha-1—Keyed Secure Hash Algorithm I for sessions with transmit and receive
intervals greater than 100 ms. To authenticate the BFD session, keyed SHA uses one
or more secret keys (generated by the algorithm) and a sequence number that is
updated periodically. The key is not carried within the packets. With this method,
packets are accepted at the receiving end of the session if one of the keys matches
and the sequence number is greater than the last sequence number received.
The authentication keychain contains one or more keychains. Each keychain contains
one or more keys. Each key holds the secret data and the time at which the key becomes
valid. The algorithm and keychain must be configured on both ends of the BFD session,
and they must match. Any mismatch in configuration prevents the BFD session from
being created.
BFD allows multiple clients per session, and each client can have its own keychain and
algorithm defined. To avoid confusion, we recommend specifying only one security
authentication keychain.
• show bfd session command in the Junos OS Routing Protocols and Policies Command
Reference
Beginning with Junos OS Release 9.6, you can configure authentication for BFD sessions
running over RIP. Only three steps are needed to configure authentication on a BFD
session:
The following sections provide instructions for configuring and viewing BFD authentication
on RIP:
[edit]
user@host# set protocols rip bfd-liveness-detection authentication algorithm
keyed-sha-1
user@host# set protocols rip group rip-gr2 bfd-liveness-detection authentication
algorithm keyed-sha-1
user@host# set protocols rip group rip-gr2 neighbor 10.10.32.7 bfd-liveness-detection
authentication algorithm keyed-sha-1
2. Specify the keychain to be used to associate BFD sessions on RIP with the unique
security authentication keychain attributes. The keychain you specify must match a
keychain name configured at the [edit security authentication key-chains] hierarchy
level.
[edit]
user@host# set protocols rip bfd-liveness-detection authentication keychain bfd-rip
user@host# set protocols rip group rip-gr2 bfd-liveness-detection authentication
keychain bfd-rip
user@host# set protocols rip group rip-gr2 neighbor 10.10.32.7 bfd-liveness-detection
authentication keychain bfd-rip
• At least one key, a unique integer between 0 and 63. Creating multiple keys allows
multiple clients to use the BFD session.
[edit security]
[edit]
user@host> set protocols rip bfd-liveness-detection authentication loose-check
user@host> set protocols rip group rip-gr2 bfd-liveness-detection authentication
loose-check
user@host> set protocols rip group rip-gr2 neighbor 10.10.32.7 bfd-liveness-detection
authentication loose-check
5. (Optional) View your configuration using the show bfd session detail or show bfd
session extensive command.
6. Repeat these steps to configure the other end of the BFD session.
The following example shows BFD authentication configured for the rip-gr2 BGP group.
It specifies the keyed SHA-1 authentication algorithm and a keychain name of bfd-rip.
The authentication keychain is configured with two keys. Key 1 contains the secret data
“$9$ggaJDmPQ6/tJgF/AtREVsyPsnCtUHm” and a start time of June 1, 2009 at 9:46:02
AM PST. Key 2 contains the secret data “$9$a5jiKW9l.reP38ny.TszF2/9” and a start time
of June 1, 2009 at 3:29:20 PM PST.
}
}
If you commit these updates to your configuration, you would see output similar to the
following. In the output for the show bfd sessions detail command, Authenticate is
displayed to indicate that BFD authentication is configured. For more information about
the configuration, use the show bfd sessions extensive command. The output for this
command provides the keychain name, the authentication algorithm and mode for each
client in the session, and the overall BFD authentication configuration status, keychain
name, and authentication algorithm and mode.
• show bfd session command in the Junos OS Routing Protocols and Policies Command
Reference
Some of the reserved fields in RIP version 1 packets must be zero, while in RIP version 2
packets most of these reserved fields can contain nonzero values. By default, RIP discards
version 1 packets that have nonzero values in the reserved fields and version 2 packets
that have nonzero values in the fields that must be zero. This default behavior implements
the RIP version 1 and version 2 specifications.
If you find that you are receiving RIP version 1 packets with nonzero values in the reserved
fields or RIP version 2 packets with nonzero values in the fields that must be zero, you
can configure RIP to receive these packets in spite of the fact that they are being sent in
violation of the specifications in RFC 1058 and RFC 2453. To receive packets whose
reserved fields are nonzero, include the no-check-zero statement:
no-check-zero;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
To filter routes being imported by the local routing device from its neighbors, include the
import statement and list the names of one or more policies to be evaluated. If you specify
more than one policy, they are evaluated in order (first to last) and the first matching
policy is applied to the route. If no match is found, the local routing device does not import
any routes.
import [ policy-names ];
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
By default, RIP includes 25 route entries in each update message. To change the number
of route entries in an update message, include the message-size statement:
message-size number;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement
By default, RIP imports routes from the neighbors configured with the neighbor statement.
These routes include those learned from RIP as well as those learned from other protocols.
By default, the current route metric of routes that RIP imports from its neighbors is
incremented by 1.
To change the default metric to be added to incoming routes, include the metric-in
statement:
metric-in metric;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
You can configure whether the RIP update messages conform to RIP version 1 only, to
RIP version 2 only, or to both versions. You can also disable the sending or receiving of
update messages. To configure the sending and receiving of update messages, include
the receive and send statements:
receive receive-options;
send send-options;
For a list of hierarchy levels at which you can include these statements and a list of the
valid options, see the statement summary sections for these statements.
You can install routes learned through RIP into multiple routing tables by configuring a
routing table group. RIP routes are installed into each routing table that belongs to that
routing table group. To configure a routing table group for RIP routes, include the
rib-group statement:
rib-group group-name;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
RIP routes expire when either a route timeout limit is met or a route metric reaches infinity,
and the route is no longer valid. However, the expired route is retained in the routing table
for a time period so that neighbors can be notified that the route has been dropped. This
time period is set by configuring the hold-down timer. Upon expiration of the hold-down
timer, the route is removed from the routing table.
To configure the hold-down timer for RIP, include the holddown statement:
holddown seconds;
seconds can be a value from 10 through 180. The default value is 120 seconds.
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
You can set a route timeout interval. If a route is not refreshed after being installed into
the routing table by the specified time interval, the route is removed from the routing
table.
To configure the route timeout for RIP, include the route-timeout statement:
route-timeout seconds;
seconds can be a value from 30 through 360. The default value is 180 seconds.
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
You can set an update time interval to periodically send out routes learned by RIP to
neighbors.
update-interval seconds;
seconds can be a value from 10 through 60. The default value is 30 seconds.
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
You can group together neighbors that share the same export policy and export metric
defaults. You configure group-specific RIP properties by including the group statement
at the [edit protocols rip] hierarchy level. Each group must contain at least one neighbor.
You should create a group for every export policy you have. To configure neighbors, see
“Overview of RIP Neighbor Properties” on page 842.
minimum-interval milliseconds;
minimum-receive-interval milliseconds;
transmit-interval {
threshold milliseconds;
minimum-interval milliseconds;
}
multiplier number;
version (0 | 1 | automatic);
}
export [ policy-names ];
preference number;
metric-out metric;
neighbor neighbor-options;
}
export [ policy-names ];
To configure export policy globally for all RIP neighbors, include the export statement.
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
You can define one or more export policies. If no routes match the policies, the local
routing device does not export any routes to its neighbors. Export policies override any
metric values determined through calculations involving the values configured with the
metric-in and metric-out statements (discussed in “Configuring the Metric Value Added
to Imported RIP Routes” on page 852 and “Configuring Group-Specific RIP Properties” on
page 854, respectively).
NOTE: The export policy on RIP does not support manipulating routing
information of the next hop.
For more information about creating policies, see the Junos OS Routing Policy Configuration
Guide.
software selects the route with the lowest preference and installs this route into the
forwarding table. (For more information about preferences, see “Route Preferences
Overview” on page 6.)
To modify the default RIP preference value, include the preference statement:
preference preference;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
32
preference can be a value from 0 through 4,294,967,295 (2 – 1).
The metric associated with a RIP route (unless modified by an export policy) is the normal
RIP metric. For example, a RIP route with a metric of 5 learned from a neighbor configured
with a metric-in value of 2 is advertised with a combined metric of 7 when advertised to
RIP neighbors in the same group. However, if this route was learned from a RIP neighbor
in a different group or from a different protocol, the route is advertised with the metric
value configured for that group with the metric-out statement. The default value for the
metric-out statement is 1.
The metric for a route may be modified with an export policy. That metric is seen when
the route is exported to the next hop.
To increase the metric for routes advertised outside a group, include the metric-out
statement:
metric-out metric;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
Graceful restart is disabled by default. You can globally enable graceful restart for all
routing protocols at the [edit routing-options] hierarchy level.
You can configure graceful restart parameters specifically for RIP. To do this, include the
graceful-restart statement:
graceful-restart {
restart-time seconds;
}
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
To disable graceful restart for RIP, specify the disable statement. To configure a time
period for the restart to finish, specify the restart-time statement.
If the sender of a RIP message does not belong to the subnet of the interface, the message
is discarded. This situation may cause problems with dropped packets when RIP is running
on point-to-point interfaces, or when the addresses on the interfaces do not fall in the
same subnet. You can resolve this by disabling strict address checks on the RIP traffic.
any-sender;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
By configuring RIP demand circuits, a specific event triggers the device to send an update,
thereby eliminating the periodic transmission of RIP packets over the neighboring interface.
To save overhead, the device sends RIP information only when changes occur in the
routing database, such as:
The device sends update requests, update responses, and acknowledgments. In addition,
the device retransmits updates and requests until valid acknowledgments are received.
The device dynamically learns RIP neighbors. If the neighboring interface goes down, RIP
flushes routes learned from the neighbor’s IP address.
Routes learned from demand circuits do not age like other RIP entries because demand
circuits are in a permanent state. Routes in a permanent state are only removed under
the following conditions:
You can also set the RIP hold-down timer and the RIP demand circuit retransmission
timer to regulate performance. The demand circuit uses these timers to determine if
there is a change that requires update messages to be sent. There is also a database
timer that runs only when RIP flushes learned routes from the routing table.
When you configure an interface for RIP demand circuits, the supported command field
packet types are different than those for RIP version 1 and RIP version 2. RIP packets for
RIP demand circuits contain three additional packet types and an extended 4-byte update
header. Both RIP version 1 and RIP version 2 support the three packet types and the
extended 4-byte header. Table 11 on page 858 describes the three packet types.
Update Request Update request messages seek information for the device’s routing table.
This message is sent when the device is first powered on or when a down
demand circuit comes up. The device sends this message every 5 seconds
(by default) until an update response message is received.
Update Response Update response messages are sent in response to an update request
message, which occurs when the device is first powered on or when a down
demand circuit comes up. Each update response message contains a
sequence number that the neighbor uses to acknowledge the update
request.
NOTE: These packets are only valid on interfaces configured for RIP demand
circuits. If a demand circuit receives a RIP packet that does not contain these
packet types, it silently discards the packet and logs an error message similar
to the following:
Ignoring RIP packet with invalid version 0 from neighbor 10.0.0.0 and source
10.0.0.1
RIP demand circuits use the RIP hold-down timer and the RIP demand circuit
retransmission timer to regulate performance and to determine if there is a change in
the network that requires the device to send update messages. The hold-down timer is
a global RIP timer that affects the entire RIP configuration; whatever range you configure
for RIP applies to RIP demand circuits. The retransmission timer affects only RIP demand
circuits. In addition, there is a database timer that runs only when RIP flushes learned
routes from the routing table.
• Hold-down timer (global RIP timer)—Use the hold-down timer to configure the number
of seconds that RIP waits before updating the routing table. The value of the hold-down
timer affects the entire RIP configuration, not just the demand circuit interfaces. The
hold-down timer starts when a route timeout limit is met, when a formerly reachable
route is unreachable, or when a demand circuit interface is down. When the hold-down
timer is running, routes are advertised as unreachable on other interfaces. When the
hold-down timer expires, the route is removed from the routing table if all destinations
are aware that the route is unreachable or the remaining destinations are down. By
default, RIP waits 120 seconds between routing table updates. The range is from 10
to 180 seconds.
• Retransmission timer (RIP demand circuit timer)—RIP demand circuits send update
messages every 5 seconds to an unresponsive peer. Use the retransmission timer to
limit the number of times a demand circuit resends update messages to an unresponsive
peer. If the configured retransmission threshold is reached, routes from the next hop
router are marked as unreachable and the hold-down timer starts. The value of the
retransmission timer affects only the demand circuit interfaces. To determine the
number of times to resend the update message, use the following calculation:
The retransmission range is from 5 through 180 seconds, which corresponds to sending
an update message a minimum of 1 time (5 seconds) and a maximum of 36 times (180
seconds).
• Database timer (global timeout timer)—Routes learned from demand circuits do not
age like other RIP entries because demand circuits are in a permanent state. On a RIP
demand circuit, the database timer starts upon receipt of the update response message
with the flush flag sent from a RIP demand circuit peer. When the neighbor receives
this message, all routes from that peer are flushed, and the database timer starts and
runs for the configured route timeout interval. When the database timer is running,
routes are still advertised as reachable on other interfaces. When the database timer
expires, the device advertises all routes from its peer as unreachable.
Requirements
Before you begin, configure the device interfaces. See the Junos OS Network Interfaces
Configuration Guide.
Overview
NOTE: When you configure RIP demand circuits, any silent removal of the
RIP configuration will go unnoticed by the RIP peer and lead to stale entries
in the routing table. To clear the stale entries, deactivate and reactivate RIP
on the neighboring devices.
In this example, you configure interface so-0/1/0 with the following settings:
retransmission threshold is reached, routes from the next hop router are marked as
unreachable and the hold-down timer starts. The value of the retransmission timer
affects only the demand circuit interfaces. To determine the number of times to resend
the update message, use the following calculation:
For example, if you want the demand circuit to send only two update messages to an
unresponsive peer, the calculation is: 5 * 2 = 10. When you configure the retransmission
timer, you enter 10 seconds.
The retransmission range is from 5 through 180 seconds, which corresponds to sending
an update message a minimum of 1 time (5 seconds) and a maximum of 36 times (180
seconds).
Configuration
In the following example, you configure a neighboring interface to be a RIP demand circuit
and save the configuration.
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For instructions on how to do that, see Using the CLI Editor in Configuration
Mode in the Junos OS CLI User Guide.
[edit]
user@host# set interfaces so-0/1/0 unit 0 family inet address 192.0.2.0/24
[edit]
user@host# edit protocols rip
user@host# commit
Results Confirm your configuration by entering the show interfaces and show protocols rip
commands. If the output does not display the intended configuration, repeat the
instructions in this example to correct the configuration.
Verification
Action To verify that the demand circuit configuration is in effect, run the show rip neighbor
operational mode command.
When you configure demand circuits, the show rip neighbor command displays a DC flag
next to the neighboring interface configured for demand circuits.
NOTE: If you configure demand circuits at the RIP neighbor hierarchy level,
the output shows only the neighboring interface that you specifically
configured as a demand circuit. If you configure demand circuits at the RIP
group hierarchy level, all of the interfaces in the group are configured as
demand circuits. Therefore, the output shows all of the interfaces in that
group as demand circuits.
You can trace various types of RIP protocol traffic to help debug RIP protocol issues. To
trace RIP protocol traffic include the traceoptions statement at the [edit protocols rip]
hierarchy level:
traceoptions {
file filename <files number> <size size> <world-readable | no-world-readable>;
flag flag <flag-modifier> <disable>;
}
You can specify the following RIP protocol-specific trace options using the flag statement:
• auth—RIP authentication
You can optionally specify one or more of the following flag modifiers:
NOTE: Use the detail flag modifier with caution as this may cause the CPU
to become very busy.
Global tracing options are inherited from the configuration set by the traceoptions
statement at the [edit routing-options] hierarchy level. You can override the following
global trace options for the RIP protocol using the traceoptions flag statement included
at the [edit protocols rip] hierarchy level:
• general—All normal operations and routing table changes (a combination of the normal
and route trace operations)
• normal—Normal events
• policy—Policy processing
• route—Routing information
• state—State transitions
NOTE: Use the trace flag all with caution because this may cause the CPU
to become very busy.
[edit]
routing-options {
traceoptions {
file /var/log/routing-log;
flag errors;
}
}
protocols {
rip {
traceoptions {
file /var/log/rip-log;
flag packets detail;
}
}
}
Configure RIP (for routing instances, include the statements at the [edit routing-instances
routing-instance-name protocols rip] hierarchy level):
[edit policy-options]
policy-statement redist-direct {
from protocol direct;
then accept;
}
[edit]
interfaces {
so-0/0/0 {
unit 0 {
family inet;
}
}
at-1/1/0 {
unit 0 {
family inet;
}
}
at-1/1/0 {
unit 42 {
family inet;
}
}
at-1/1/1 {
unit 42 {
family inet;
}
}
}
policy-statement redist-direct {
from protocol direct;
then accept;
}
[edit protocols rip]
metric-in 3;
receive both;
group wan {
metric-out 2;
export redist-direct;
neighbor so-0/0/0.0;
neighbor at-1/1/0.0;
neighbor at-1/1/0.42;
neighbor at-1/1/1.42 {
receive version-2;
}
}
group local {
neighbor ge-2/3/0.0 {
metric-in 1;
send broadcast;
}
}
The following sections explain each of the individual RIP statements in the [edit protocols
rip] hierarchy. The statements are organized alphabetically.
any-sender
Syntax any-sender;
Hierarchy Level [edit logical-systems logical-system-name protocols rip group group-name neighbor
neighbor-name],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
rip group group-name neighbor neighbor-name],
[edit protocols rip group group-name neighbor neighbor-name],
[edit routing-instances routing-instance-name protocols rip group group-name neighbor
neighbor-name]
Related • Disabling Strict Address Checking for RIP Messages on page 857
Documentation
authentication-key
Options password—Authentication password. If the password does not match, the packet is
rejected. The password can be from 1 through 16 contiguous characters long and
can include any ASCII strings.
authentication-type
Description Configure the type of authentication for RIP route queries received on an interface.
Default If you do not include this statement and the authentication-key statement, RIP
authentication is disabled.
• md5—Use the MD5 algorithm to create an encoded checksum of the packet. The
encoded checksum is included in the transmitted packet. The receiving routing device
uses the authentication key to verify the packet, discarding it if the digest does not
match. This algorithm provides a more secure authentication scheme.
bfd-liveness-detection
Syntax bfd-liveness-detection {
authentication {
algorithm algorithm-name;
key-chain key-chain-name;
<loose-check>;
}
detection-time {
threshold milliseconds;
}
minimum-interval milliseconds;
minimum-receive-interval milliseconds;
transmit-interval {
threshold milliseconds;
minimum-interval milliseconds;
}
multiplier number;
no-adaptation;
version (1 | automatic);
}
check-zero
Description Check whether the reserved fields in a RIP packet are zero:
• check-zero—Discard version 1 packets that have nonzero values in the reserved fields
and version 2 packets that have nonzero values in the fields that must be zero. This
default behavior implements the RIP version 1 and version 2 specifications.
• no-check-zero—Receive RIP version 1 packets with nonzero values in the reserved fields
or RIP version 2 packets with nonzero values in the fields that must be zero. This is in
spite of the fact that they are being sent in violation of the specifications in RFC 1058
and RFC 2453.
Default check-zero
Related • Accepting RIP Packets with Nonzero Values in Reserved Fields on page 851
Documentation
demand-circuit
Syntax demand-circuit;
Description Configure a neighboring interface to act as a RIP demand circuit. To complete the demand
circuit, you must configure both ends of the pair as demand circuits. When configured,
the device sends RIP information only when changes occur in the routing database.
Default Disabled. You must explicitly configure two neighboring interfaces to act as a RIP demand
circuit.
export
graceful-restart
Syntax graceful-restart {
disable;
restart-time seconds;
}
group
metric-in metric;
metric-out metric;
receive receive-options;
route-timeout seconds;
send send-options;
update-interval seconds;
}
}
Description Configure a set of RIP neighbors that share an export policy and metric. The export policy
and metric govern what routes to advertise to neighbors in a given group.
holddown
Description Configure the time period the expired route is retained in the routing table before being
removed.
When the hold-down timer runs on RIP demand circuits, routes are advertised as
unreachable on other interfaces. When the hold-down timer expires, the route is removed
from the routing table if all destinations are aware that the route is unreachable or the
remaining destinations are down.
Options seconds—Estimated time to wait before making updates to the routing table.
Range: 10 through 180 seconds
Default: 180 seconds
import
Description Apply one or more policies to routes being imported by the local router from its neighbors.
max-retrans-time
Description RIP demand circuits send update messages every 5 seconds to an unresponsive peer.
Configure the retransmission timer to limit the number of times the demand circuit resends
update messages to an unresponsive peer. If the configured retransmission threshold is
reached, routes from the next hop router are marked as unreachable and the hold-down
timer starts. You must configure a pair of RIP demand circuits for this timer to take effect.
To determine the number of times to resend the update message, use the following
calculation:
Options seconds—The total amount of time the demand circuit resends update messages to an
unresponsive peer. The seconds range corresponds to sending an update message
a minimum of 1 time (5 seconds) and a maximum of 36 times (180 seconds).
Range: 5 through 180 seconds
Default: 5 seconds
message-size
Description Specify the number of route entries to be included in every RIP update message. To
ensure interoperability with other vendors’ equipment, use the standard of 25 route entries
per message.
Related • Configuring the Number of Route Entries in RIP Update Messages on page 852
Documentation
metric-in
Description Specify the metric to add to incoming routes when advertising into RIP routes that were
learned from other protocols. Use this statement to configure the routing device to prefer
RIP routes learned through a specific neighbor.
Related • Configuring the Metric Value Added to Imported RIP Routes on page 852
Documentation
metric-out
Hierarchy Level [edit logical-systems logical-system-name protocols rip group group-name neighbor
neighbor-name],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
rip group group-name neighbor neighbor-name],
[edit protocols rip group group-name neighbor neighbor-name],
[edit routing-instances routing-instance-name protocols rip group group-name neighbor
neighbor-name]
Description Specify the metric value to add to routes transmitted to the neighbor. Use this statement
to control how other routing devices prefer RIP routes sent from this neighbor.
Related • Configuring the Metric for Routes Exported by RIP on page 856
Documentation
neighbor
Description Configure neighbor-specific RIP parameters, thereby overriding the defaults set for the
routing device.
no-check-zero
See check-zero
preference
Description Specify the preference of external routes learned by RIP as compared to those learned
from other routing protocols.
Related • Configuring the Default Preference Value for RIP on page 855
Documentation
receive
Default: both
rib-group
Description Install RIP routes into multiple routing tables by configuring a routing table group.
rip
route-timeout
Options seconds—Estimated time to wait before making updates to the routing table.
Range: 30 through 360 seconds
Default: 180 seconds
send
Default: multicast
traceoptions
Syntax traceoptions {
file filename <files number> <size size> <world-readable | no-world-readable>;
flag flag <flag-modifier> <disable>;
}
Default The default RIP protocol-level trace options are inherited from the global traceoptions
statement.
Options disable—(Optional) Disable the tracing operation. One use of this option is to disable a
single operation when you have defined a broad group of tracing operations, such
as all.
file filename—Name of the file to receive the output of the tracing operation. Enclose the
name in quotation marks. We recommend that you place RIP tracing output in the
file /var/log/rip-log.
files number—(Optional) Maximum number of trace files. When a trace file named
trace-file reaches its maximum size, it is renamed trace-file.0, then trace-file.1, and
so on, until the maximum number of trace files is reached. Then, the oldest trace file
is overwritten.
If you specify a maximum number of files, you must also specify a maximum file size
with the size option.
Range: 2 through 1000 files
Default: 10 files
flag—Tracing operation to perform. To specify more than one tracing operation, include
multiple flag statements.
• auth—RIP authentication
• request—RIP information packets such as request, poll, and poll entry packets
Default: If you do not specify this option, only unusual or abnormal operations are traced.
• state—State transitions
flag-modifier—(Optional) Modifier for the tracing flag. You can specify one or more of
these modifiers:
size size—(Optional) Maximum size of each trace file, in kilobytes (KB) or megabytes
(MB). When a trace file named trace-file reaches this size, it is renamed trace-file.0.
When the trace-file again reaches its maximum size, trace-file.0 is renamed trace-file.1
and trace-file is renamed trace-file.0. This renaming scheme continues until the
maximum number of trace files is reached. Then, the oldest trace file is overwritten.
If you specify a maximum file size, you must also specify a maximum number of trace
files with the files option.
Syntax: xk to specify KB, xm to specify MB, or xg to specify GB
Range: 10 KB through the maximum file size supported on your system
Default: 128 KB
update-interval
Description Configure an update time interval to periodically send out routes learned by RIP to
neighbors.
Options seconds—Estimated time to wait before making updates to the routing table.
Range: 10 through 60 seconds
Default: 30 seconds
Introduction to RIPng
This chapter discusses the following topics that provide background information about
RIP next generation (RIPng):
RIPng Overview
RIP next generation (RIPng) is an interior gateway protocol (IGP) that uses a
distance-vector algorithm to determine the best route to a destination, using the hop
count as the metric. RIPng is a routing protocol that exchanges routing information used
to compute routes and is intended for IP version 6 (IPv6)-based networks.
RIPng is a User Datagram Protocol (UDP)-based protocol and uses UDP port 521.
• The longest network path cannot exceed 15 hops (assuming that each network, or
hop, has a cost of 1).
• RIPng depends on counting to infinity to resolve certain unusual situations. When the
network consists of several hundred routers, and when a routing loop has formed, the
amount of time and network bandwidth required to resolve a next hop might be great.
• RIPng uses only a fixed metric to select a route. Other IGPs use additional parameters,
such as measured delay, reliability, and load.
RIPng Packets
A RIPng packet header contains the following fields:
• Version number—Specifies the version of RIPng that the originating router is running.
This is currently set to Version 1.
The rest of the RIPng packet contains a list of routing table entries that contain the
following fields:
• Route tag—A route attribute that must be advertised and redistributed with the route.
Primarily, the route tag distinguishes external RIPng routes from internal RIPng routes
in cases where routes must be redistributed across an exterior gateway protocol (EGP).
RIPng Standards
To access Internet Requests for Comments (RFCs) and drafts, go to the Internet
Engineering Task Force (IETF) Web site at http://www.ietf.org.
This chapter discusses the following topics that provide information for configuring and
monitoring RIPng:
Configuring RIPng
To configure RIP next generation (RIPng), you include the following statements:
protocols {
ripng {
graceful-restart {
disable;
restart-time seconds;
}
holddown seconds;
import [ policy-names ];
metric-in metric;
receive <none>;
route-timeout seconds;
send <none>;
update-interval seconds;
traceoptions {
file filename <files number> <size size> <world-readable | no-world-readable>;
flag flag <flag-modifier> <disable>;
}
group group-name {
export [ policy-names ];
metric-out metric;
preference number;
route-timeout seconds;
update-interval seconds;
neighbor neighbor-name {
import [ policy-names ];
metric-in metric;
receive <none>;
route-timeout seconds;
send <none>;
update-interval seconds;
}
}
}
}
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
NOTE: By default, RIPng routes are not redistributed. You must configure
export policy needs to redistribute RIPng routes.
To have a router exchange routes with other routers, you must configure RIPng groups
and neighbors. RIPng routes received from routers not configured as RIPng neighbors
are ignored. Likewise, RIPng routes are advertised only to routers configured as RIPng
neighbors.
For a routing device to accept RIPng routes, you must configure at least one RIPng group
and the associated neighbor. Routes received from routing devices that are not configured
as neighbors are ignored. All other RIPng configuration statements are optional. Include
one neighbor statement for each interface on which you want to receive routes. The local
routing device imports all routes by default from this neighbor and does not advertise
routes.
[edit]
protocols {
ripng {
group group-name {
neighbor interface-name;
}
}
}
NOTE: When you configure RIPng on an interface, you must also include the
family inet statement at the [edit interfaces interface-name unit
logical-unit-number] hierarchy level.
To define RIPng global properties, which apply to all RIPng neighbors, include one or
more of the following statements.
import [ policy-names ];
metric-in metric;
receive receive-options;
send send-options;
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
For more information about configuring RIPng global properties, see the following topics:
• Configuring the Metric Value Added to Imported RIPng Routes on page 898
neighbor neighbor-name {
import [ policy-names ];
metric-in metric;
receive receive-options;
send send-options;
}
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
For more information about configuring RIPng neighbor properties, see the following
topics:
• Configuring the Metric Value Added to Imported RIPng Routes on page 898
To filter routes being imported by the local routing device from its neighbors, include the
import statement and list the names of one or more policies to be evaluated. If you specify
more than one policy, they are evaluated in order (first to last) and the first matching
policy is applied to the route. If no match is found, the local routing device does not import
any routes.
import [ policy-names ];
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
By default, RIPng imports routes from the neighbors configured with the neighbor
statement. These routes include those learned from RIPng as well as those learned from
other protocols. By default, the current route metric of routes that RIPng imports from
its neighbors is incremented by 1.
To change the default metric to be added to incoming routes, include the metric-in
statement:
metric-in metric;
metric can be a value from 1 through 15. A value of 16 indicates infinity, or unreachable.
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
You can enable and disable the sending or receiving of update messages. By default,
sending and receiving update messages is enabled. To disable the sending and receiving
of update messages, include the receive none and send none statements:
receive none;
send none;
To enable the sending and receiving of update messages, include the receive and send
statements:
receive;
send;
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
RIPng routes expire when either a route timeout limit is met or a route metric reaches
infinity, and the route is no longer valid. However, the expired route is retained in the
routing table for a time period so that neighbors can be notified that the route has been
dropped. This time period is set by configuring the hold-down timer. Upon expiration of
the hold-down timer, the route is removed from the routing table.
To configure the hold-down timer for RIPng, include the holddown statement:
holddown seconds;
seconds can be a value from 10 through 180. The default value is 120 seconds.
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
You can set a route timeout interval. If a route is not refreshed after being installed into
the routing table by the specified time interval, the route is removed from the routing
table.
To configure the route timeout for RIPng, include the route-timeout statement:
route-timeout seconds;
seconds can be a value from 30 through 360. The default value is 180 seconds.
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
You can set an update time interval to periodically send out routes learned by RIPng to
neighbors.
update-interval seconds;
seconds can be a value from 10 through 60. The default value is 30 seconds.
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
You can group together neighbors that share the same export policy and export metric
defaults. You configure group-specific RIPng properties by including the group statement:
group group-name {
export [ policy-names ];
metric-out metric;
neighbor {
... neighbor-options ...
}
preference number;
}
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
Each group must contain at least one neighbor. You should create a group for each export
policy that you have. For information about configuring neighbors, see “Overview of RIPng
Neighbor Properties” on page 897.
export [ policy--names ];
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
You can define one or more export policies. If no routes match the policies, the local
routing device does not export any routes to its neighbors. Export policies override any
metric values determined through calculations involving the values configured with the
metric-in and metric-out statements (discussed in “Configuring the Metric Value Added
to Imported RIPng Routes” on page 898 and“Configuring the Metric for Routes Exported
by RIP” on page 856 respectively).
To modify the default RIPng preference value, include the preference statement:
preference preference;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement:
32
preference can be a value from 0 through 4,294,967,295 (2 – 1).
If a route being exported was learned from a member of the same RIPng group, the metric
associated with that route (unless modified by an export policy) is the normal RIPng
metric. For example, a RIPng route with a metric of 5 learned from a neighbor configured
with a metric-in value of 2 is advertised with a combined metric of 7 when advertised to
RIPng neighbors in the same group. However, if this route was learned from a RIPng
neighbor in a different group or from a different protocol, the route is advertised with the
metric value configured for that group with the metric-out statement. The default value
for metric-out is 1.
To modify the metric for routes advertised outside a group, include the metric-out
statement:
metric-out metric;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
Graceful restart is disabled by default. You can globally enable graceful restart for all
routing protocols under the [edit routing-options] hierarchy level.
You can configure graceful restart parameters specifically for RIPng. To do this, include
the graceful-restart statement:
graceful-restart {
restart-time seconds;
}
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
To disable graceful restart for RIPng, specify the disable statement. To configure a time
period for the restart to finish, specify the restart-time statement.
You can trace various RIPng protocol traffic to help debug RIP protocol issues. To trace
RIP protocol traffic include the traceoptions statement at the [edit protocols ripng]
hierarchy level:
traceoptions {
file filename <files number> <size size> <world-readable | no-world-readable>;
flag flag <flag-modifier> <disable>;
}
You can specify the following RIPng protocol-specific trace options using the flag
statement:
You can optionally specify one or more of the following flag modifiers:
NOTE: Use the detail flag modifier with caution as this may cause the CPU
to become very busy.
Global tracing options are inherited from the configuration set by the traceoptions
statement at the [edit routing-options] hierarchy level. You can override the following
global trace options for the RIPng protocol using the traceoptions flag statement included
at the [edit protocols ripng] hierarchy level:
• general—All normal operations and routing table changes (a combination of the normal
and route trace operations)
• normal—Normal events
• policy—Policy processing
• route—Routing information
• state—State transitions
NOTE: Use the trace flag all with caution as this may cause the CPU to
become very busy.
Configure RIPng:
[edit policy-options]
policy-statement redist-direct {
from protocol direct;
then accept;
}
[edit protocols ripng]
metric-in 3;
group wan {
metric-out 2;
export redist-direct;
neighbor so-0/0/0.0;
neighbor at-1/1/0.0;
neighbor at-1/1/0.42;
neighbor at-1/1/1.42 {
receive version-2;
}
}
group local {
neighbor ge-2/3/0.0 {
metric-in 1;
send broadcast;
}
}
The following sections explain each of the RIP next generation (RIPng) statements in
the [edit protocols ripng] hierarchy. The statements are organized alphabetically.
export
Description Apply a policy or list of policies to routes being exported to the neighbors.
graceful-restart
Syntax graceful-restart {
disable;
restart-time seconds;
}
group
Description Configure a set of RIPng neighbors that share an export policy and metric. The export
policy and metric govern what routes to advertise to neighbors in a given group.
holddown
Description Configure the time period the expired route is retained in the routing table before being
removed.
Options seconds—Estimated time to wait before making updates to the routing table.
Default: 180 seconds
Range: 10 through 180 seconds
import
Description Apply one or more policies to routes being imported into the local routing device from
the neighbors.
metric-in
Description Specify the metric to add to incoming routes when advertising into RIPng routes that
were learned from other protocols. Use this statement to configure the routing device to
prefer RIPng routes learned through a specific neighbor.
Related • Configuring the Metric Value Added to Imported RIPng Routes on page 898
Documentation
metric-out
Hierarchy Level [edit logical-systems logical-system-name protocols ripng group group-name neighbor
neighbor-name],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
ripng group group-name neighbor neighbor-name],
[edit protocols ripng group group-name neighbor neighbor-name],
[edit routing-instances routing-instance-name protocols ripng group group-name neighbor
neighbor-name]
Description Specify the metric value to add to routes transmitted to the neighbor. Use this statement
to control how other routing devices prefer RIPng routes sent from this neighbor.
Related • Configuring the Metric for Routes Exported by RIPng on page 900
Documentation
neighbor
Description Configure neighbor-specific RIPng parameters, thereby overriding the defaults set for
the routing device.
preference
Description Specify the preference of external routes learned by RIPng as compared to those learned
from other routing protocols.
Related • Configuring the Default Preference Value for RIPng on page 900
Documentation
receive
ripng
route-timeout
Options seconds—Estimated time to wait before making updates to the routing table.
Range: 30 through 360 seconds
Default: 180 seconds
send
traceoptions
Syntax traceoptions {
file filename <files number> <size size> <world-readable | no-world-readable>;
flag flag <flag-modifier> <disable>;
}
Default The default RIPng protocol-level trace options are inherited from the global traceoptions
statement.
Options disable—(Optional) Disable the tracing operation. One use of this option is to disable a
single operation when you have defined a broad group of tracing operations, such
as all.
file filename—Name of the file to receive the output of the tracing operation. Enclose the
name in quotation marks. We recommend that you place RIPng tracing output in
the file /var/log/ripng-log.
files number—(Optional) Maximum number of trace files. When a trace file named
trace-file reaches its maximum size, it is renamed trace-file.0, then trace-file.1, and
so on, until the maximum number of trace files is reached. Then, the oldest trace file
is overwritten.
If you specify a maximum number of files, you must also specify a maximum file size
with the size option.
Range: 2 through 1000 files
Default: 10 files
flag flag—Tracing operation to perform. To specify more than one tracing operation,
include multiple flag statements.
• request—RIPng information packets such as request, poll, and poll entry packets
Default: If you do not specify this option, only unusual or abnormal operations are traced.
• state—State transitions
flag-modifier—(Optional) Modifier for the tracing flag. You can specify one or more of
these modifiers:
size size—(Optional) Maximum size of each trace file, in kilobytes (KB), megabytes (MB),
or gigabytes (GB). When a trace file named trace-file reaches this size, it is renamed
trace-file.0. When the trace-file again reaches its maximum size, trace-file.0 is renamed
trace-file.1 and trace-file is renamed trace-file.0. This renaming scheme continues
until the maximum number of trace files is reached. Then, the oldest trace file is
overwritten.
If you specify a maximum file size, you must also specify a maximum number of trace
files with the files option.
Syntax: xk to specify KB, xm to specify MB, or xg to specify GB
Range: 10 KB through the maximum file size supported on your system
Default: 128 KB
update-interval
Description Configure an update time interval to periodically send out routes learned by RIP to
neighbors.
Options seconds—Estimated time to wait before making updates to the routing table.
Range: 10 through 60 seconds
Default: 30 seconds
This chapter discusses the following topics that provide background information about
ICMP router discovery:
Router discovery uses Internet Control Message Protocol (ICMP) router advertisements
and router solicitation messages to allow a host to discover the addresses of operational
routers on the subnet. Hosts must discover routers before they can send IP datagrams
outside their subnet.
Router discovery allows a host to discover the addresses of operational routers on the
subnet. The Junos OS implementation of router discovery supports server mode only.
Each router periodically multicasts a router advertisement from each of its multicast
interfaces, announcing the IP address of that interface. Hosts listen for advertisements
to discover the addresses of their neighboring routers. When a host starts, it can send a
multicast router solicitation to ask for immediate advertisements.
The router discovery messages do not constitute a routing protocol. They enable hosts
to discover the existence of neighboring routers, but do not determine which router is
best to reach a particular destination.
to containing the router addresses, these packets also announce the existence of the
server itself.
The server can either transmit broadcast or multicast router advertisement packets.
Multicast packets are sent to 224.0.0.1, which is the all-hosts multicast address. When
packets are sent to the all-hosts multicast address, or when an interface is configured
for the limited-broadcast address 255.255.255.255, all IP addresses configured on the
physical interface are included in the router advertisement. When the packets are being
sent to a network or subnet broadcast address, only the address associated with that
network or subnet is included in the router advertisement.
When the routing protocol process first starts on the server router, the server sends router
advertisement packets every few seconds. Then, the server sends these packets less
frequently, commonly every 10 minutes.
The server responds to route solicitation packets it receives from a client. The response
is sent unicast unless a router advertisement packet is due to be sent out momentarily.
NOTE: The Junos OS does not support the ICMP router solicitation message
with the source address as 0.0.0.0.
The preference level specifies the router’s preference to become the default router. When
a host chooses a default router address, it chooses the address with the highest
preference. You can configure the preference level by including the priority statement as
described in “Configuring the Addresses Included in ICMP Router Advertisements” on
page 924.
The lifetime field indicates the maximum length of time that the advertised addresses
are to be considered valid by hosts in the absence of further advertisements. You can
configure the advertising rate by including the max-advertisement-interval and
min-advertisement-interval statements, and you can configure the lifetime by including
the lifetime statement. For configuration instructions, see “Configuring the Frequency of
ICMP Router Advertisements” on page 925 and “Modifying the Lifetime in ICMP Router
Advertisements” on page 925.
To access Internet Requests for Comments (RFCs) and drafts, go to the Internet
Engineering Task Force (IETF) Web site at http://www.ietf.org.
This chapter describes the following tasks for configuring ICMP router discovery:
To configure a router as a server for Internet Control Message Protocol (ICMP) router
discovery, you can include the following statements in the configuration:
protocols {
router-discovery {
disable;
traceoptions {
file filename <files number> <size size> <world-readable | no-world-readable>;
flag flag <detail> <disable>;
}
interface interface-name {
min-advertisement-interval seconds;
max-advertisement-interval seconds;
lifetime seconds;
}
address address {
(advertise | ignore);
(broadcast | multicast);
(priority number | ineligible);
}
}
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
To configure the router to be a router discovery server, you must include at least the
following statement in the configuration. All other router discovery configuration
statements are optional.
protocols {
router-discovery;
}
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
NOTE: When you configure ICMP on an interface, you must also include the
family inet statement at the [edit interfaces interface-name unit
logical-unit-number] hierarchy level.
To specify which addresses the router should include in its router advertisements, include
the address statement:
address address {
(advertise | ignore);
(broadcast | multicast);
(priority number | ineligible);
}
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
Specify the IP address of the router, and optionally specify the following information
about the router:
• Whether the server should include this address in its router advertisements—By default,
the address is advertised. To disable this function, include the ignore statement.
• Preference of the address to become the default router—In the priority statement, a
higher value for number indicates that the address has a greater preference for becoming
the default router. The default value is 0, which means that the address has the least
chance of becoming the default router. If the router at this address should never become
the default router, include the ineligible statement. To modify the preference, include
the preference statement. number can be a value in the range from 0
through 0x80000000. The default is 0.
The router discovery server sends router advertisement messages, which include route
information and indicate to network hosts that the router is still operational. The server
sends these messages periodically, with a time range defined by minimum and maximum
values. By default, the server sends router advertisements every 400 to 600 seconds.
To modify these times, include the min-advertisement-interval and
max-advertisement-interval statements:
min-advertisement-interval seconds;
max-advertisement-interval seconds;
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
The lifetime field in router advertisement messages indicates how long a host should
consider the advertised address to be valid. If this amount of time passes and the host
has not received a router advertisement from the server, the route marks the advertised
addresses as invalid. By default, addresses are considered to be valid for 1800 seconds
(30 minutes).
lifetime seconds;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
To trace ICMP protocol traffic, you can specify options in the global traceoptions statement
included at the [edit routing-options] hierarchy level, and you can specify ICMP-specific
options by including the traceoptions statement:
traceoptions {
file filename <files number> <size size> <world-readable | no-world-readable>;
flag flag <flag-modifier> <disable>;
}
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
You can specify the following ICMP-specific options in the ICMP flag statement:
• all—Trace everything.
NOTE: Use the trace flags detail and all with caution. These flags may
cause the CPU to become very busy.
For general information about tracing and global tracing options, see “Tracing Global
Routing Protocol Operations” on page 138.
[edit]
routing-options {
traceoptions {
file routing-log;
}
}
protocols {
router-discovery {
traceoptions {
file icmp-log;
flag state;
}
}
}
The following sections explain each of the Internet Control Message Protocol (ICMP)
router discovery configuration statements. The statements are organized alphabetically.
address
Options address—IP address. To specify more than one address, specify multiple addresses or
include multiple address statements.
Related • Configuring the Addresses Included in ICMP Router Advertisements on page 924
Documentation
advertise
Description Specify whether the server should advertise the IP address in its router advertisement
packets:
Default advertise
Related • Configuring the Addresses Included in ICMP Router Advertisements on page 924
Documentation
broadcast
Description Specify when the server should include the IP addresses in router advertisement packets.
On the same physical interfaces, some addresses might be included only in multicast
packets, while others might be included only in broadcast packets.
If you specify broadcast, the server includes the addresses in router advertisement packets
only if the packets are broadcast.
Default multicast if the router supports IP multicast; broadcast if the router does not support IP
multicast.
disable
Syntax disable;
ignore
See advertise
ineligible
See priority
interface
Description Specify physical interfaces on which to configure timers for router advertisement
messages.
Options interface-name—Name of an interface. Specify the full interface name, including the
physical and logical address components. To configure all interfaces, specify all.
lifetime
Description How long the addresses sent by the server in its router advertisement packets are valid.
This time must be long enough so that another router advertisement packet is sent before
the lifetime has expired. The lifetime value is placed in the advertisement lifetime field
of the router advertisement packet.
Options seconds—Lifetime value. A value of 0 indicates that one or more addresses are no longer
valid.
Range: Three times the value set by the max-advertisement-interval statement through
2 hours, 30 minutes (9000 seconds)
Default: 1800 seconds (30 minutes, which is three times the default value for the
max-advertisement-interval statement)
max-advertisement-interval
Description Maximum time the router waits before sending periodic router advertisement packets
out the interface. These packets are broadcast or multicast, depending on how the
address corresponding to this physical interface is configured.
min-advertisement-interval
Description Minimum time the router waits before sending router advertisement packets out the
interface in response to route solicitation packets it receives from a client. These packets
are broadcast or multicast, depending on how the address corresponding to this physical
interface is configured.
multicast
Description Specify when the server should include the IP addresses in router advertisement packets.
On the same physical interfaces, some addresses might be included only in multicast
packets, while others might be included only in broadcast packets.
If you specify multicast, the server includes the addresses in router advertisement packets
only if the packets are multicast. If the router supports IP multicast, and if the interface
supports IP multicast, multicast is the default. Otherwise, the addresses are included in
broadcast router advertisement packets. If the router does not support IP multicast, the
addresses are not included.
Default multicast if the router supports IP multicast; broadcast if the router does not support IP
multicast.
priority
Description Preference of the address to become a default router. This preference is set relative to
the preferences of other router addresses on the same subnet.
priority number—Preference of the addresses for becoming the default router. A higher
value indicates that the address has a greater preference for becoming the default
router.
Range: 0 through 0x80000000
Default: 0 (This address has the least chance of becoming the default router.)
Related • Configuring the Addresses Included in ICMP Router Advertisements on page 924
Documentation
router-discovery
traceoptions
Syntax traceoptions {
file filename <files number> <size size> <world-readable | no-world-readable>;
flag flag <flag-modifier> <disable>;
}
To specify more than one tracing operation, include multiple flag statements.
Default The default ICMP protocol-level tracing options are inherited from the routing protocols
traceoptions statement included at the [edit routing-options] hierarchy level.
Options disable—(Optional) Disable the tracing operation. One use of this option is to disable a
single operation when you have defined a broad group of tracing operations, such
as all.
file filename—Name of the file to receive the output of the tracing operation. Enclose the
name within quotation marks. All files are placed in the directory /var/log. We
recommend that you place ICMP tracing output in the file icmp-log.
files number—(Optional) Maximum number of trace files. When a trace file named
trace-file reaches its maximum size, it is renamed trace-file.0, then trace-file.1, and
so on, until the maximum number of trace files is reached. Then, the oldest trace file
is overwritten.
If you specify a maximum number of files, you also must specify a maximum file size with
the size option.
Range: 2 through 1000 files
Default: 2 files
flag flag—Tracing operation to perform. To specify more than one tracing operation,
include multiple flag statements. These are the ICMP-specific tracing options:
• packets—All packets
Default: If you do not specify this option, only unusual or abnormal operations are traced.
• state—State transitions
• timer—Timer usage
flag-modifier—(Optional) Modifier for the tracing flag. You can specify one or more of
these modifiers:
size size—(Optional) Maximum size of each trace file, in kilobytes (KB), megabytes (MB),
or gigabytes (GB). When a trace file named trace-file reaches this size, it is renamed
trace-file.0. When the trace-file again reaches its maximum size, trace-file.0 is renamed
trace-file.1 and trace-file is renamed trace-file.0. This renaming scheme continues
until the maximum number of trace files is reached. Then, the oldest trace file is
overwritten.
If you specify a maximum file size, you also must specify a maximum number of trace
files with the files option.
Syntax: xk to specify KB, xm to specify MB, or xg to specify GB
Range: 10 KB through the maximum file size supported on your system
Default: 1 MB
Required Privilege routing and trace—To view this statement in the configuration.
Level routing-control and trace-control—To add this statement to the configuration.
This chapter discusses the following topics that provide background information about
neighbor discovery:
Neighbor discovery is a protocol that allows different nodes on the same link to advertise
their existence to their neighbors, and to learn about the existence of their neighbors.
The router discovery messages do not constitute a routing protocol. They enable hosts
to discover the existence of neighboring routers, but are not used to determine which
router is best to reach a particular destination.
Neighbor discovery uses the following Internet Control Message Protocol version 6
(ICMPv6) messages: router solicitation, router advertisement, neighbor solicitation,
neighbor advertisement, and redirect.
Neighbor discovery for IPv6 replaces the following IPv4 protocols: router discovery
(RDISC), Address Resolution Protocol (ARP), and ICMPv4 redirect.
Junos OS Release 9.3 and later supports Secure Neighbor Discovery (SEND). SEND
enables you to secure Neighbor Discovery protocol (NDP) messages. It is applicable in
environments where physical security on a link is not assured and attacks on NDP
messages are a concern. The Junos OS secures NDP messages through cryptographically
generated addresses (CGAs).
Router Discovery
Router advertisements can contain a list of prefixes. These prefixes are used for address
autoconfiguration, to maintain a database of onlink (on the same data link) prefixes, and
for duplication address detection. If a node is onlink, the router forwards packets to that
node. If the node is not onlink, the packets are sent to the next router for consideration.
For IPv6, each prefix in the prefix list can contain a prefix length, a valid lifetime for the
prefix, a preferred lifetime for the prefix, an onlink flag, and an autoconfiguration flag.
This information enables address autoconfiguration and the setting of link parameters
such as maximum transmission unit (MTU) size and hop limit.
Address Resolution
For IPv6, ICMPv6 neighbor discovery replaces Address Resolution Protocol (ARP) for
resolving network addresses to link-level addresses. Neighbor discovery also handles
changes in link-layer addresses, inbound load balancing, anycast addresses, and proxy
advertisements.
Nodes requesting the link-layer address of a target node multicast a neighbor solicitation
message with the target address. The target sends back a neighbor advertisement
message containing its link-layer address.
Neighbor solicitation and advertisement messages are used for detecting duplicate
unicast addresses on the same link. Autoconfiguration of an IP address depends on
whether there is a duplicate address on that link. Duplicate address detection is a
requirement for autoconfiguration.
Neighbor solicitation and advertisement messages are also used for neighbor
unreachability detection. Neighbor unreachability detection involves detecting the
presence of a target node on a given link.
Redirect
Redirect messages are sent to inform a host of a better next-hop router to a particular
destination or an onlink neighbor. This is similar to ICMPv4 redirect.
The Junos OS substantially supports the following RFCs, which define standards for
neighbor discovery:
• RFC 4443, Internet Control Message Protocol (ICMPv6) for the Internet Protocol
Version 6 Specification
To access Internet RFCs and drafts, go to the Internet Engineering Task Force (IETF)
website at http://www.ietf.org.
This chapter describes the following tasks for configuring and monitoring neighbor
discovery router advertisement messages:
To configure neighbor discovery, include the following statements. You configure router
advertisement on a per-interface basis.
protocols {
router-advertisement {
interface interface-name {
current-hop-limit number;
default-lifetime seconds;
(link-mtu | no-link-mtu);
(managed-configuration |no-managed-configuration);
max-advertisement-interval seconds;
min-advertisement-interval seconds;
(other-stateful-configuration | no-other-stateful-configuration);
prefix prefix {
(autonomous | no-autonomous);
(on-link | no-on-link);
preferred-lifetime seconds;
valid-lifetime seconds;
}
reachable-time milliseconds;
retransmit-timer milliseconds;
traceoptions {
file filename <files number> <size size> <world-readable | no-world-readable>;
flag flag <detail> <disable>;
}
}
}
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
To configure the router to send router advertisement messages, you must include at
least the following statements in the configuration. All other router advertisement
configuration statements are optional.
protocols {
router-advertisement {
interface interface-name {
prefix prefix;
}
}
}
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
interface interface-name;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
physical<:channel>.logical
NOTE: The Junos OS enters the Neighbor Discovery Protocol (NDP) packets
into the routing platform cache even if there is no known route to the source.
NOTE: If you are using Virtual Router Redundancy Protocol (VRRP) for IPv6,
you must include the virtual-router-only statement on both the master and
backup VRRP on the IPv6 router.
The current hop limit field in the router advertisement messages indicates the default
value placed in the hop count field of the IP header for outgoing packets. To configure
the hop limit, include the current-hop-limit statement:
current-hop-limit number;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
The default lifetime in router advertisement messages indicates the lifetime associated
with the default router. To modify the default lifetime timer, include the default-lifetime
statement:
default-lifetime seconds;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
By default, the default router lifetime is three times the maximum advertisement interval.
For more information about the maximum advertisement interval, see “Configuring the
Frequency of Neighbor Discovery Advertisements” on page 945.
In Junos OS Release 10.3 and later, you can configure the link-mtu statement to include
the maximum transmission unit (MTU) option in router advertisement messages. The
MTU option included in router advertisement messages ensures that all nodes on a link
use the same MTU value in situations where the link MTU is not well known.
By default, the MTU option field is not included in router advertisement messages.
To include the MTU option in router advertisement messages, include the link-mtu
statement:
link-mtu;
To stop including the MTU option in router advertisement messages, include the
no-link-mtu statement:
no link-mtu;
[edit]
user@host# set interfaces ge-2/0/0 unit 0 family inet6 address 2001:DB8::/32
2. Configure the interface to send router advertisement messages that include the MTU
option.
[edit]
user@host# set protocols router-advertisement interface ge-2/0/0 link-mtu
You can set two fields in the router advertisement message to enable stateful
autoconfiguration on a host: the managed configuration field and the other stateful
configuration field. Setting the managed configuration field enables the host to use a
stateful autoconfiguration protocol for address autoconfiguration, along with any stateless
autoconfiguration already configured. Setting the other stateful configuration field enables
autoconfiguration of other nonaddress-related information.
To set the managed configuration field and enable address autoconfiguration, include
the managed-configuration statement:
managed-configuration;
nomanaged-configuration;
To set the other stateful configuration field and enable autoconfiguration of other types
of information, include the other-stateful-configuration statement:
other-stateful-configuration;
no-other-stateful-configuration;
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
min-advertisement-interval seconds;
max-advertisement-interval seconds;
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
By default, the maximum advertisement interval is 600 seconds and the minimum
advertisement interval is one-third the maximum interval, or 200 seconds.
Configuring the Delay Before Neighbor-Discovery Neighbors Mark the Router as Down
After receiving a reachability confirmation from a neighbor, a node considers that neighbor
reachable for a certain amount of time without receiving another confirmation. This
mechanism is used for neighbor unreachability detection, a mechanism for finding link
failures to a target node.
reachable-time milliseconds;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
retransmit-timer milliseconds;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
Router advertisement messages carry prefixes and information about them. A prefix is
onlink when it is assigned to an interface on a specified link. The prefixes specify whether
they are onlink or not onlink. A node considers a prefix to be onlink if it is represented by
one of the link’s prefixes, a neighboring router specifies the address as the target of a
redirect message, a neighbor advertisement message is received for the (target) address,
or any neighbor discovery message is received from the address. These prefixes are also
used for address autoconfiguration. The information about the prefixes specifies the
lifetime of the prefixes, whether the prefix is autonomous, and whether the prefix is onlink.
You can perform the following tasks when configuring the prefix information:
on-link;
no-on-link;
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
autonomous;
no-autonomous;
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
preferred-lifetime seconds;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
The preferred lifetime value must never exceed the valid lifetime value.
valid-lifetime seconds;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
The valid lifetime value must never be smaller than the preferred lifetime value.
You can trace various Neighbor Discovery protocol traffic to help debug Neighbor Discovery
protocol issues. To trace Neighbor Discovery protocol traffic include the traceoptions
statement at the [edit protocols router-advertisement] hierarchy level:
traceoptions {
file filename <files number> <size size> <world-readable | no-world-readable>;
flag flag <flag-modifier> <disable>;
}
Global tracing options are inherited from the configuration set by the traceoptions
statement at the [edit routing-options] hierarchy level. You can override the following
global trace options for the Neighbor Discovery protocol using the traceoptions flag
statement included at the [edit protocols router-advertisement] hierarchy level:
• general—All normal operations and routing table changes (a combination of the normal
and route trace operations)
• normal—Normal events
• policy—Policy processing
• route—Routing information
• state—State transitions
NOTE: Use the trace flag all with caution as this may cause the CPU to
become very busy.
The following sections explain each of the neighbor discovery router advertisement
configuration statements. The statements are organized alphabetically.
autonomous
Description Specify whether prefixes in the router advertisement messages are used for stateless
address autoconfiguration:
Default autonomous
Related • Setting the Prefix for Stateless Address Autoconfiguration on page 946
Documentation
current-hop-limit
Description Default value placed in the hop count field of the IP header for outgoing packets.
Options number—Hop limit. A value of 0 means the limit is unspecified by this router.
Range: 0 through 255
Default: 64
Related • Configuring the Hop Count in Outgoing Neighbor Discovery Packets on page 943
Documentation
default-lifetime
Options seconds—Default lifetime. A value of 0 means this router is not the default router.
Range: Maximum advertisement interval value through 9000 seconds
Default: Three times the maximum advertisement interval value
interface
Description Configure router advertisement properties on an interface. To configure more than one
interface, include the interface statement multiple times.
Options interface-name—Name of an interface. Specify the full interface name, including the
physical and logical address components.
link-mtu
Description Specify whether to include the maximum transmission unit (MTU) option in router
advertisement messages:
Related • Configuring the MTU Option for Neighbor Discovery Advertisements on page 943
Documentation
managed-configuration
Description Specify whether to enable the host to use a stateful autoconfiguration protocol for
address autoconfiguration, along with any stateless autoconfiguration already configured:
max-advertisement-interval
min-advertisement-interval
no-autonomous
See autonomous
no-managed-configuration
See managed-configuration
no-on-link
See on-link
no-other-stateful-configuration
See other-stateful-configuration
on-link
other-stateful-configuration
preferred-lifetime
Description Specify how long the prefix generated by stateless autoconfiguration remains preferred.
Options seconds—Preferred lifetime, in seconds. If you set the preferred lifetime to 0xffffffff, the
lifetime is infinite. The preferred lifetime is never greater than the valid lifetime.
Default: 604,800 seconds
prefix
reachable-time
Description Set the length of time that a node considers a neighbor reachable until another reachability
confirmation is received from that neighbor.
Related • Configuring the Delay Before Neighbor-Discovery Neighbors Mark the Router as Down
Documentation on page 945
retransmit-timer
router-advertisement
traceoptions
Syntax traceoptions {
file filename <files number> <size size> <world-readable | no-world-readable>;
flag flag <disable>;
}
Default The default trace options are inherited from the global traceoptions statement.
Options disable—(Optional) Disable the tracing operation. One use of this option is to disable a
single operation when you have defined a broad group of tracing operations, such
as all.
file filename—Name of the file to receive the output of the tracing operation. Enclose the
name in quotation marks. We recommend that you place router advertisement
tracing output in the file /var/log/router-advertisement-log.
files number—(Optional) Maximum number of trace files. When a trace file named
trace-file reaches its maximum size, it is renamed trace-file.0, then trace-file.1, and
so on, until the maximum number of trace files is reached. Then, the oldest trace file
is overwritten. If you specify a maximum number of files, you must also specify a
maximum file size with the size option.
Range: 2 through 1000 files
Default: 10 files
flag flag—Tracing operation to perform. To specify more than one tracing operation,
include multiple flag statements.
Default: If you do not specify this option, only unusual or abnormal operations are traced.
• state—State transitions
• timer—Timer usage
size size—(Optional) Maximum size of each trace file, in kilobytes (KB) or megabytes
(MB). When a trace file named trace-file reaches this size, it is renamed trace-file.0.
When the trace-file again reaches its maximum size, trace-file.0 is renamed trace-file.1
and trace-file is renamed trace-file.0. This renaming scheme continues until the
maximum number of trace files is reached. Then, the oldest trace file is overwritten.
If you specify a maximum file size, you must also specify a maximum number of trace
files with the files option.
Syntax: xk to specify KB, xm to specify MB, or xg to specify GB
Range: 10 KB through the maximum file size supported on your system
Default: 128 KB
valid-lifetime
Description Specify how long the prefix remains valid for onlink determination.
Options seconds—Valid lifetime, in seconds. If you set the valid lifetime to 0xffffffff, the lifetime
is infinite.
Default: 2,592,000 seconds
This chapter discusses the following topics that describe how to configure Secure
Neighbor Discovery:
The Secure Neighbor Discovery (SEND) Protocol provides support for protecting Neighbor
Discovery Protocol (NDP) messages. SEND is applicable in environments where physical
security on a link is not ensured and attacks on NDP messages are a concern. The Junos
OS implementation secures NDP messages through cryptographically generated
addresses (CGAs).
You must also enable IPv6 on at least one interface. Because SEND relies on dynamically
generated CGAs, it does not support static IPv6 addresses.
protocols {
neighbor-discovery {
secure {
security-level {
(default | secure-messages-only);
}
cryptographic-address {
key-length number;
key-pair pathname;
}
timestamp {
clock-drift number;
known-peer-window seconds;
new-peer-window seconds;
}
traceoptions {
file <filename> <files number> <match regular-expression> <size size>
<world-readable | no-world-readable>;
flag flag;
no-remote-trace;
}
}
}
}
protocols {
neighbor-discovery {
secure {
security-level {
(default | secure-messages-only);
}
}
}
}
Specify default to send and receive both secure and unsecured Neighbor Discovery
Protocol (NDP) packets. To configure SEND to accept secured NDP messages only and
to drop unsecured ones. specify secure-messages-only.
protocols {
neighbor-discovery {
secure {
cryptographic-address {
key-length number;
key-pair pathname;
}
}
}
For information about how to configure parameters for cryptographic addresses, see the
following sections:
key-pair pathname;
For a complete list of hierarchy levels at which you can configure this statement, see the
statement summary section for this statement.
key-length number;
For a complete list of hierarchy levels at which you can configure this statement, see the
statement summary section for this statement.
The Secure Neighbor Discovery (SEND) Protocol supports several timestamp options,
which are used to ensure that unsolicited solicitation and redirect messages are not being
replayed. To configure timestamp parameters, include the following statements:
protocols {
neighbor-discovery {
secure {
timestamp {
new-peer-window seconds;
known-peer-window seconds;
clock-drift value;
}
}
}
}
Use the known-peer-window seconds statement to specify the expected interval between
subsequent incoming SEND messages. The default is 1 second. A message from a known
peer that arrives after the specified interval is discarded.
Use the clock drift value statement to specify a fractional value of 100 for the allowable
drift in time between the synchronization of peers. The default is 0.01, or 1 percent.
You can trace Secure Neighbor Discovery protocol traffic to help debug Secure Neighbor
Discovery protocols issues. To trace Secure Neighbor Discovery protocol traffic include
the traceoptions statement at the [edit protocols neighbor-discovery secure] hierarchy
level:
traceoptions {
file <filename> <files number> <match regular-expression> <size size> <world-readable |
no-world-readable>;
flag flag;
no-remote-trace;
}
You can specify the following Secure Neighbor Discovery protocol-specific trace options
using the flag statement:
• rsa—RSA events
Global tracing options are inherited from the configuration set by the traceoptions
statement at the [edit routing-options] hierarchy level. You can override the following
global trace options for the IS-IS protocol using the traceoptions flag statement included
at the [edit protocols neighbor-discovery secure] hierarchy level:
NOTE: Use the trace flag all with caution since this may cause the CPU to
become very busy.
The following sections explain each of the Secure Neighbor Discovery configuration
statements. The statements are organized alphabetically.
cryptographic-address
Syntax cryptographic-address {
key-length number;
key-pair pathname;
}
Description Configure parameters for cryptographically generated addresses for Secure Neighbor
Discovery.
key-length
Description Specify the length of the RSA key used to generate the public-private key pair for the
cryptographic address.
Default 1024
key-pair
Description Specify the directory path of the public-private key file generated for the cryptographic
address.
Options pathname—Directory path of the public-private key file. The default location of the file
is /var/etc/rsa_key directory.
Related • Specifying the Pathname for the Key File on page 963
Documentation
neighbor-discovery
Syntax neighbor-discovery {
secure {
security-level {
(default | secure-messages-only);
}
cryptographic-address {
key-length number;
key-pair pathname;
}
timestamp {
clock-drift number;
known-peer-window number;
new-peer-window number;
}
traceoptions {
file <filename> <files number> <match regular-expression> <size size>
<world-readable | no-world-readable>;
flag flag;
no-remote-trace;
}
}
}
Default Disabled
secure
Syntax secure {
security-level {
(default | secure-messages-only);
}
cryptographic-address {
key-length number;
key-pair pathname;
}
timestamp {
clock-drift number;
known-peer-window seconds;
new-peer-window seconds;
}
traceoptions {
file <filename> <files number> <match regular-expression> <size size> <world-readable |
no-world-readable>;
flag flag;
no-remote-trace;
}
}
security-level
Syntax security-level {
(default | secure-messages-only);
}
Description Configure the type of security mode for Secure Neighbor Discovery.
timestamp
Syntax timestamp {
clock-drift value;
known-peer-window seconds;
new-peer-window seconds;
}
Description Configure timestamp options, which are used to ensure that solicitation and redirect
messages are not being replayed.
Options clock-drift value—Specify the allowable drift in time between the synchronization of
peers. For value, specify a fractional value of 100.
Default: 0.01
traceoptions
Syntax traceoptions {
file <filename> <files number> <match regular-expression> <size size> <world-readable |
no-world-readable>;
flag flag;
no-remote-trace;
}
Description Configure tracing operations for Secure Neighbor Discovery events. To specify more than
one tracing operation, include multiple flag statements.
Options file filename—Name of the file to receive the tracing operation. Enclose the name within
quotation marks. All files are placed in the directory /var/log.
files number—(Optional) Maximum number of trace files. When a trace file named
trace-file reaches its maximum size, it is renamed trace-file.0, then trace-file.1 and so
on, until the maximum number of trace files is reached. Then the oldest trace file is
overwritten.
If you specify a maximum number of files, you must also specify a maximum file size
with the size option.
Range: 2 through 1000 files
Default: 10 files
flag—Tracing operation to perform. To specify more than one tracing operation, include
multiple flag statements.
• rsa—RSA events.
match—(Optional) Specify a regular expression to match the output of the trace file you
want to log.
size size—(Optional) Maximum size of each trace file, in kilobytes (KB) or megabytes
(MB). When a trace file named trace-file reaches this size, it is renamed trace-file.0.
When the trace-file again reaches its maximum size, trace-file.0 is renamed trace-file.1,
and trace-file is renamed trace-file.0. This renaming scheme continues until the
maximum number of trace files is reached. Then the oldest trace file is overwritten.
Syntax: xk to specify KB, xm to specify MB, or xg to specify GB
Range: 10 KB through the maximum file size supported on your system
Default: 128 KB
Required Privilege routing and trace—To view this statement in the configuration.
Level routing-control and trace-control—To add this statement to the configuration.
BGP
• Introduction to BGP on page 975
• BGP Configuration Guidelines on page 981
• Summary of BGP Configuration Statements on page 1293
Introduction to BGP
This chapter discusses the following topics that provide background information about
BGP:
Understanding BGP
BGP is an exterior gateway protocol (EGP) that is used to exchange routing information
among routers in different autonomous systems (ASs). BGP routing information includes
the complete route to each destination. BGP uses the routing information to maintain a
database of network reachability information, which it exchanges with other BGP systems.
BGP uses the network reachability information to construct a graph of AS connectivity,
which enables BGP to remove routing loops and enforce policy decisions at the AS level.
Multiprotocol BGP (MBGP) extensions enable BGP to support IP version 6 (IPv6). MBGP
defines the attributes MP_REACH_NLRI and MP_UNREACH_NLRI, which are used to carry
IPv6 reachability information. Network layer reachability information (NLRI) update
messages carry IPv6 address prefixes of feasible routes.
BGP allows for policy-based routing. You can use routing policies to choose among
multiple paths to a destination and to control the redistribution of routing information.
BGP uses TCP as its transport protocol, using port 179 for establishing connections.
Running over a reliable transport protocol eliminates the need for BGP to implement
update fragmentation, retransmission, acknowledgment, and sequencing.
The Junos OS routing protocol software supports BGP version 4. This version of BGP
adds support for Classless Interdomain Routing (CIDR), which eliminates the concept
of network classes. Instead of assuming which bits of an address represent the network
by looking at the first octet, CIDR allows you to explicitly specify the number of bits in
the network address, thus providing a means to decrease the size of the routing tables.
BGP version 4 also supports aggregation of routes, including the aggregation of AS paths.
Autonomous Systems
An autonomous system (AS) is a set of routers that are under a single technical
administration and normally use a single interior gateway protocol and a common set
of metrics to propagate routing information within the set of routers. To other ASs, an
AS appears to have a single, coherent interior routing plan and presents a consistent
picture of what destinations are reachable through it.
routing loops and select among groups of routes to enforce administrative preferences
and routing policy decisions.
A BGP system shares network reachability information with adjacent BGP systems, which
are referred to as neighbors or peers.
BGP systems are arranged into groups. In an IBGP group, all peers in the group—called
internal peers—are in the same AS. Internal peers can be anywhere in the local AS and
do not have to be directly connected to one another. Internal groups use routes from an
IGP to resolve forwarding addresses. They also propagate external routes among all
other internal routers running IBGP, computing the next hop by taking the BGP next hop
received with the route and resolving it using information from one of the interior gateway
protocols.
In an EBGP group, the peers in the group—called external peers—are in different ASs and
normally share a subnet. In an external group, the next hop is computed with respect to
the interface that is shared between the external peer and the local router.
• AS path, which is a list of numbers of the ASs that a route passes through to reach the
local router. The first number in the path is that of the last AS in the path—the AS
closest to the local router. The last number in the path is the AS farthest from the local
router, which is generally the origin of the path.
• Path attributes, which contain additional information about the AS path that is used
in routing policy.
BGP stores its routes in the Junos OS routing table (inet.0). The routing table stores the
following information about BGP routes:
• Local routing information that BGP applies to routes because of local policies
For each prefix in the routing table, the routing protocol process selects a single best
path, called the active path. Unless you configure BGP to advertise multiple paths to the
same destination, BGP advertises only the active path.
The BGP router that first advertises a route assigns it one of the following values to
identify its origin. During route selection, the lowest origin value is preferred.
• 0—The router originally learned the route through an IGP (OSPF, IS-IS, or a static route).
• 1—The router originally learned the route through an EGP (most likely BGP).
All BGP messages have the same fixed-size header, which contains a marker field that
is used for both synchronization and authentication, a length field that indicates the
length of the packet, and a type field that indicates the message type (for example, open,
update, notification, keepalive, and so on).
Open Messages
After a TCP connection is established between two BGP systems, they exchange BGP
open messages to create a BGP connection between them. Once the connection is
established, the two systems can exchange BGP messages and data traffic.
Open messages consist of the BGP header plus the following fields:
• Hold time—Proposed hold-time value. You configure the local hold time with the BGP
hold-time statement, as described in Configuring the Delay Before BGP Peers Mark the
Routing Device as Down.
• BGP identifier—IP address of the BGP system. This address is determined when the
system starts and is the same for every local interface and every BGP peer. You can
configure the BGP identifier by including the router-id statement at the [edit
routing-options] or [edit logical-systems logical-system-name routing-options] hierarchy
level, as described in Assigning a BGP Identifier. By default, BGP uses the IP address
of the first interface it finds in the router.
• Parameter field length and the parameter itself—These are optional fields.
Update Messages
BGP systems send update messages to exchange network reachability information. BGP
systems use this information to construct a graph that describes the relationships among
all known ASs.
Update messages consist of the BGP header plus the following optional fields:
• Withdrawn routes—IP address prefixes for the routes being withdrawn from service
because they are no longer deemed reachable
• Total path attribute length—Length of the path attributes field; it lists the path attributes
for a feasible route to a destination
• Path attributes—Properties of the routes, including the path origin, the multiple exit
discriminator (MED), the originating system’s preference for the route, and information
about aggregation, communities, confederations, and route reflection
Keepalive Messages
BGP systems exchange keepalive messages to determine whether a link or host has
failed or is no longer available. Keepalive messages are exchanged often enough so that
the hold timer does not expire. These messages consist only of the BGP header.
Notification Messages
BGP systems send notification messages when an error condition is detected. After the
message is sent, the BGP session and the TCP connection between the BGP systems
are closed. Notification messages consist of the BGP header plus the error code and
subcode, and data that describes the error.
AS 10
OSPF RIP
AS 3
A B
BGP
g015013
In Figure 38 on page 982, Router A is a gateway router for AS 3, and Router B is a gateway
router for AS 10. For traffic internal to either AS, an interior gateway protocol (IGP) is
used (OSPF, for instance). To route traffic between peer ASs, a BGP session is used.
You arrange BGP routing devices into groups of peers. Different peer groups must have
different group types, AS numbers, or route reflector cluster identifiers.
To define a BGP group that recognizes only the specified BGP systems as peers, statically
configure all the system’s peers by including one or more neighbor statements. The peer
neighbor’s address can be either an IPv6 or IPv4 address.
As the number of external BGP (EBGP) groups increases, the ability to support a large
number of BGP sessions might become a scaling issue. The preferred way to configure
a large number of BGP neighbors is to configure a few groups consisting of multiple
neighbors per group. Supporting fewer EBGP groups generally scales better than
supporting a large number of EBGP groups. This becomes more evident in the case of
hundreds of EBGP groups when compared with a few EBGP groups with multiple peers
in each group.
After the BGP peers are established, BGP routes are not automatically advertised by the
BGP peers. At each BGP-enabled device, policy configuration is required to export the
local, static, or IGP-learned routes into the BGP RIB and then advertise them as BGP
routes to the other peers. BGP's advertisement policy, by default, does not advertise any
non-BGP routes (such as local routes) to peers.
Requirements
Before you begin, if the default BGP policy is not adequate for your network, configure
routing policies to filter incoming BGP routes and to advertise BGP routes.
Overview
Figure 39 on page 983 shows a network with BGP peer sessions. In the sample network,
Device E in AS 17 has BGP peer sessions to a group of peers called external-peers. Peers
A, B, and C reside in AS 22 and have IP addresses 10.10.10.2, 10.10.10.6, and 10.10.10.10.
Peer D resides in AS 79, at IP address 10.21.7.2. This example shows the configuration on
Device E.
10.2 A
AS 22
10.1
AS 17 E 10.5 10.6 B
10.9
7.1
10.10
C
7.2
D
AS 79
g040727
Configuration
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
[edit interfaces]
user@E# set ge-1/2/0 unit 0 description to-A
user@E# set ge-1/2/0 unit 0 family inet address 10.10.10.1/30
user@E# set ge-0/0/1 unit 5 description to-B
user@E# set ge-0/0/1 unit 5 family inet address 10.10.10.5/30
user@E# set ge-0/1/0 unit 9 description to-C
user@E# set ge-0/1/0 unit 9 family inet address 10.10.10.9/30
user@E# set ge-1/2/1 unit 21 description to-D
user@E# set ge-1/2/1 unit 21 family inet address 10.21.7.1/30
[edit routing-options]
user@E# set autonomous-system 17
3. Create the BGP group, and add the external neighbor addresses.
5. Add Peer D, and set the AS number at the individual neighbor level.
Results From configuration mode, confirm your configuration by entering the show interfaces,
show protocols, and show routing-options commands. If the output does not display the
intended configuration, repeat the instructions in this example to correct the configuration.
[edit]
user@E# show interfaces
ge-1/2/0 {
unit 0 {
description to-A;
family inet {
address 10.10.10.1/30;
}
}
}
ge-0/0/1 {
unit 5 {
description to-B;
family inet {
address 10.10.10.5/30;
}
}
}
ge-0/1/0 {
unit 9 {
description to-C;
family inet {
address 10.10.10.9/30;
}
}
}
ge-1/2/1 {
unit 21 {
description to-D;
family inet {
address 10.21.7.1/30;
}
}
}
[edit]
user@E# show protocols
bgp {
group external-peers {
type external;
peer-as 22;
neighbor 10.10.10.2;
neighbor 10.10.10.6;
neighbor 10.10.10.10;
neighbor 10.21.7.2 {
peer-as 79;
}
}
}
[edit]
user@E# show routing-options
autonomous-system 17;
If you are done configuring the device, enter commit from configuration mode.
Verification
Purpose Verify that BGP is running on configured interfaces and that the BGP session is active for
each neighbor address.
Action From operational mode, run the show bgp neighbor command.
Output Queue[0]: 0
Action From operational mode, run the show bgp group command.
Holdtime: 0
Total peers: 4 Established: 4
10.10.10.2+179
10.10.10.6+54781
10.10.10.10+55012
10.21.7.2+61867
inet.0: 0/0/0/0
Action From operational mode, run the show bgp summary command.
Purpose By using the ping tool on each peer address in the network, verify that all peers in the
network are reachable from each device.
2. In the Remote Host box, type the name of a host for which you want to verify
reachability from the device.
Sample Output
Meaning If a host is active, it generates an ICMP response. If this response is received, the round-trip
time is listed in the time field.
Requirements
Overview
Junos OS supports EBGP peer sessions by means of IPv6 link-local addresses. An IPv6
peer session can be configured when a 128-bit IPv6 address is specified in the neighbor
statement. The peer address is identified as link-local by means of the local-interface
statement.
The local-interface statement is valid only for 128-bit IPv6 link-local addresses and is
mandatory for configuring an IPv6 EBGP link-local peer session.
Configuring EBGP peering using link-local addresses is only applicable for directly
connected interfaces. There is no support for multihop peering.
This example uses Frame Relay interface encapsulation on logical tunnel (lt) interfaces.
This is a requirement because only Frame Relay encapsulation is supported when IPv6
addresses are configured on the lt interfaces.
Figure 40 on page 991 shows a network with BGP peer sessions. In the sample network,
Router R1 has five logical systems configured. Device E in autonomous system (AS) 17
has BGP peer sessions to a group of peers called external-peers. Peers A, B, and C reside
in AS 22 and have IPv6 addresses fe80::a0a:a02, fe80::a0a:a06, and fe80::a0a:a0a.
Peer D resides in AS 79, at IP address fe80::a15:702. This example shows the configuration
on Device E.
R1
2001:db8:0:1::/64 AS 22
AS 17 2001:db8:0:2::/64
E B
2001:db8:0:3::/64
C
2001:db8:0:4::/64
AS 79
g040726
Configuration
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
1. Run the show interfaces terse command to verify that the physical router has a
logical tunnel (lt) interface.
[edit routing-options]
user@R1:E# set autonomous-system 17
4. Create the BGP group, and add the external neighbor addresses.
When you configure IPv6 external BGP neighbor addresses, you must include the
local-interface statement and specify the name of the local interface that connects
to the neighbor.
6. Add Peer D, and set the AS number at the individual neighbor level.
Results From configuration mode, confirm your configuration by entering the show logical-systems
command. If the output does not display the intended configuration, repeat the
instructions in this example to correct the configuration.
[edit]
user@R1# show logical-systems
A{
interfaces {
lt-1/2/0 {
unit 1 {
description to-E;
encapsulation frame-relay;
dlci 1;
peer-unit 25;
family inet6 {
address fe80::a0a:a02/126;
}
}
}
}
protocols {
bgp {
group external-peers {
type external;
peer-as 17;
neighbor fe80::a0a:a01 {
local-interface lt-1/2/0.1;
}
}
}
}
routing-options {
autonomous-system 22;
}
}
B{
interfaces {
lt-1/2/0 {
unit 6 {
description to-E;
encapsulation frame-relay;
dlci 6;
peer-unit 5;
family inet6 {
address fe80::a0a:a06/126;
}
}
}
}
protocols {
bgp {
group external-peers {
type external;
peer-as 17;
neighbor fe80::a0a:a05 {
local-interface lt-1/2/0.6;
}
}
}
}
routing-options {
autonomous-system 22;
}
}
C{
interfaces {
lt-1/2/0 {
unit 10 {
description to-E;
encapsulation frame-relay;
dlci 10;
peer-unit 9;
family inet6 {
address fe80::a0a:a0a/126;
}
}
}
}
protocols {
bgp {
group external-peers {
type external;
peer-as 17;
neighbor fe80::a0a:a09 {
local-interface lt-1/2/0.10;
}
}
}
}
routing-options {
autonomous-system 22;
}
}
D{
interfaces {
lt-1/2/0 {
unit 7 {
description to-E;
encapsulation frame-relay;
dlci 7;
peer-unit 21;
family inet6 {
address fe80::a15:702/126;
}
}
}
}
protocols {
bgp {
group external-peers {
type external;
peer-as 17;
neighbor fe80::a15:701 {
local-interface lt-1/2/0.7;
}
}
}
}
routing-options {
autonomous-system 79;
}
}
E{
interfaces {
lt-1/2/0 {
unit 5 {
description to-B;
encapsulation frame-relay;
dlci 6;
peer-unit 6;
family inet6 {
address fe80::a0a:a05/126;
}
}
unit 9 {
description to-C;
encapsulation frame-relay;
dlci 10;
peer-unit 10;
family inet6 {
address fe80::a0a:a09/126;
}
}
unit 21 {
description to-D;
encapsulation frame-relay;
dlci 7;
peer-unit 7;
family inet6 {
address fe80::a15:701/126;
}
}
unit 25 {
description to-A;
encapsulation frame-relay;
dlci 1;
peer-unit 1;
family inet6 {
address fe80::a0a:a01/126;
}
}
}
}
protocols {
bgp {
group external-peers {
type external;
peer-as 22;
neighbor fe80::a0a:a02 {
local-interface lt-1/2/0.25;
}
neighbor fe80::a0a:a06 {
local-interface lt-1/2/0.5;
}
neighbor fe80::a0a:a0a {
local-interface lt-1/2/0.9;
}
neighbor fe80::a15:702 {
local-interface lt-1/2/0.21;
peer-as 79;
}
}
}
}
routing-options {
autonomous-system 17;
}
}
If you are done configuring the device, enter commit from configuration mode.
Verification
Purpose Verify that BGP is running on configured interfaces and that the BGP session is active for
each neighbor address.
Action From operational mode, run the show bgp neighbor command.
Action From operational mode, run the show bgp group command.
Action From operational mode, run the show bgp summary command.
Understanding BGP
BGP is an exterior gateway protocol (EGP) that is used to exchange routing information
among routers in different autonomous systems (ASs). BGP routing information includes
the complete route to each destination. BGP uses the routing information to maintain a
database of network reachability information, which it exchanges with other BGP systems.
BGP uses the network reachability information to construct a graph of AS connectivity,
which enables BGP to remove routing loops and enforce policy decisions at the AS level.
Multiprotocol BGP (MBGP) extensions enable BGP to support IP version 6 (IPv6). MBGP
defines the attributes MP_REACH_NLRI and MP_UNREACH_NLRI, which are used to carry
IPv6 reachability information. Network layer reachability information (NLRI) update
messages carry IPv6 address prefixes of feasible routes.
BGP allows for policy-based routing. You can use routing policies to choose among
multiple paths to a destination and to control the redistribution of routing information.
BGP uses TCP as its transport protocol, using port 179 for establishing connections.
Running over a reliable transport protocol eliminates the need for BGP to implement
update fragmentation, retransmission, acknowledgment, and sequencing.
The Junos OS routing protocol software supports BGP version 4. This version of BGP
adds support for Classless Interdomain Routing (CIDR), which eliminates the concept
of network classes. Instead of assuming which bits of an address represent the network
by looking at the first octet, CIDR allows you to explicitly specify the number of bits in
the network address, thus providing a means to decrease the size of the routing tables.
BGP version 4 also supports aggregation of routes, including the aggregation of AS paths.
Autonomous Systems
An autonomous system (AS) is a set of routers that are under a single technical
administration and normally use a single interior gateway protocol and a common set
of metrics to propagate routing information within the set of routers. To other ASs, an
AS appears to have a single, coherent interior routing plan and presents a consistent
picture of what destinations are reachable through it.
The routing information that BGP systems exchange includes the complete route to each
destination, as well as additional information about the route. The route to each
destination is called the AS path, and the additional route information is included in path
attributes. BGP uses the AS path and the path attributes to completely determine the
network topology. Once BGP understands the topology, it can detect and eliminate
routing loops and select among groups of routes to enforce administrative preferences
and routing policy decisions.
BGP supports two types of exchanges of routing information: exchanges among different
ASs and exchanges within a single AS. When used among ASs, BGP is called external
BGP (EBGP) and BGP sessions perform inter-AS routing. When used within an AS, BGP
is called internal BGP (IBGP) and BGP sessions perform intra-AS routing. Figure 37 on
page 977 illustrates ASs, IBGP, and EBGP.
A BGP system shares network reachability information with adjacent BGP systems, which
are referred to as neighbors or peers.
BGP systems are arranged into groups. In an IBGP group, all peers in the group—called
internal peers—are in the same AS. Internal peers can be anywhere in the local AS and
do not have to be directly connected to one another. Internal groups use routes from an
IGP to resolve forwarding addresses. They also propagate external routes among all
other internal routers running IBGP, computing the next hop by taking the BGP next hop
received with the route and resolving it using information from one of the interior gateway
protocols.
In an EBGP group, the peers in the group—called external peers—are in different ASs and
normally share a subnet. In an external group, the next hop is computed with respect to
the interface that is shared between the external peer and the local router.
Requirements
No special configuration beyond device initialization is required before you configure this
example.
Overview
In this example, you configure internal BGP (IBGP) peer sessions. The loopback interface
(lo0) is used to establish connections between IBGP peers. The loopback interface is
always up as long as the device is operating. If there is a route to the loopback address,
the IBGP peer session stays up. If a physical interface address is used instead and that
interface goes up and down, the IBGP peer session also goes up and down. Thus, if the
device has link redundancy, the loopback interface provides fault tolerance in case the
physical interface or one of the links goes down.
When a device peers with a remote device’s loopback interface address, the local device
expects BGP update messages to come from (be sourced by) the remote device’s
loopback interface address. The local-address statement enables you to specify the
source information in BGP update messages. If you omit the local-address statement,
the expected source of BGP update messages is based on the device’s source address
selection rules, which normally results in the egress interface address being the expected
source of update messages. When this happens, the peer session is not established
because a mismatch exists between the expected source address (the egress interface
of the peer) and the actual source (the loopback interface of the peer). To make sure
that the expected source address matches the actual source address, specify the loopback
interface address in the local-address statement.
Because IBGP supports multihop connections, IBGP neighbors can be located anywhere
within the autonomous system (AS) and often do not share a link. A recursive route
lookup resolves the loopback peer address to an IP forwarding next hop. In this example,
this service is provided by OSPF. Although interior gateway protocol (IGP) neighbors do
not need to be directly connected, they do need to be fully meshed. In this case, fully
meshed means that each device is logically connected to every other device through
neighbor peer relationships. The neighbor statement creates the mesh.
After the BGP peers are established, BGP routes are not automatically advertised by the
BGP peers. At each BGP-enabled device, policy configuration is required to export the
local, static, or IGP-learned routes into the BGP routing information base (RIB) and then
advertise them as BGP routes to the other peers. BGP's advertisement policy, by default,
does not advertise any non-BGP routes (such as local routes) to peers.
In the sample network, the devices in AS 17 are fully meshed in the group internal-peers.
The devices have loopback addresses 192.168.6.5, 192.163.6.4, and 192.168.40.4.
Figure 42 on page 1003 shows a typical network with internal peer sessions.
192.168.6.5
AS 17 A
192.163.6.4
C B
192.168.40.4
g040732
Configuration
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
Configuring Device A
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
[edit interfaces]
user@A# set lo0 unit 1 family inet address 192.168.6.5/32
2. Configure BGP.
The neighbor statements are included for both Device B and Device C, even though
Device A is not directly connected to Device C.
3. Configure OSPF.
Other useful options for this scenario might be to accept routes learned through
OSPF or local routes.
[edit routing-options]
user@A# set router-id 192.168.6.5
user@A# set autonomous-system 17
Results From configuration mode, confirm your configuration by entering the show interfaces,
show policy-options, show protocols, and show routing-options commands. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
}
}
ospf {
area 0.0.0.0 {
interface lo0.1 {
passive;
}
interface ge-0/1/0.1;
}
}
If you are done configuring the device, enter commit from configuration mode.
Configuring Device B
Step-by-Step The following example requires that you navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode.
[edit interfaces]
user@B# set lo0 unit 2 family inet address 192.163.6.4/32
2. Configure BGP.
The neighbor statements are included for both Device B and Device C, even though
Device A is not directly connected to Device C.
3. Configure OSPF.
Other useful options for this scenario might be to accept routes learned through
OSPF or local routes.
[edit routing-options]
user@B# set router-id 192.163.6.4
user@B# set autonomous-system 17
Results From configuration mode, confirm your configuration by entering the show interfaces,
show policy-options, show protocols, and show routing-options commands. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
If you are done configuring the device, enter commit from configuration mode.
Configuring Device C
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
[edit interfaces]
user@C# set lo0 unit 3 family inet address 192.168.40.4/32
2. Configure BGP.
The neighbor statements are included for both Device B and Device C, even though
Device A is not directly connected to Device C.
3. Configure OSPF.
Other useful options for this scenario might be to accept routes learned through
OSPF or local routes.
[edit routing-options]
user@C# set router-id 192.168.40.4
user@C# set autonomous-system 17
Results From configuration mode, confirm your configuration by entering the show interfaces,
show policy-options, show protocols, and show routing-options commands. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
area 0.0.0.0 {
interface lo0.3 {
passive;
}
interface ge-0/1/0.6;
}
}
If you are done configuring the device, enter commit from configuration mode.
Verification
Purpose Verify that BGP is running on configured interfaces and that the BGP session is active for
each neighbor address.
Action From operational mode, enter the show bgp neighbor command.
Action From operational mode, enter the show bgp group command.
192.168.40.4+179
inet.0: 0/5/5/0
Action From operational mode, enter the show bgp summary command.
Purpose Verify that the export policy configuration is causing the BGP routes to be installed in the
routing tables of the peers.
Action From operational mode, enter the show route protocol bgp command.
Requirements
Overview
In the sample network, the devices in AS 17 are fully meshed in the group internal-peers.
The devices have loopback addresses 192.168.6.5, 192.163.6.4, and 192.168.40.4.
Figure 42 on page 1003 shows a typical network with internal peer sessions.
192.168.6.5
AS 17 A
192.163.6.4
C B
192.168.40.4
g040731
Configuration
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
Device A
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
2. Configure BGP.
On Logical System A, the neighbor statements are included for both Device B and
Device C, even though Logical System A is not directly connected to Device C.
3. Configure OSPF.
Other useful options for this scenario might be to accept routes learned through
OSPF or local routes.
Results From configuration mode, confirm your configuration by entering the show logical-systems
command. If the output does not display the intended configuration, repeat the
configuration instructions in this example to correct it.
A{
interfaces {
lt-0/1/0 {
unit 1 {
description to-B;
encapsulation ethernet;
peer-unit 2;
family inet {
address 10.10.10.1/30;
}
}
}
lo0 {
unit 1 {
family inet {
address 192.168.6.5/32;
}
}
}
}
protocols {
bgp {
group internal-peers {
type internal;
local-address 192.168.6.5;
export send-direct;
neighbor 192.163.6.4;
neighbor 192.168.40.4;
}
}
ospf {
area 0.0.0.0 {
interface lo0.1 {
passive;
}
interface lt-0/1/0.1;
}
}
}
policy-options {
policy-statement send-direct {
term 2 {
from protocol direct;
then accept;
}
}
}
routing-options {
router-id 192.168.6.5;
autonomous-system 17;
}
}
B{
interfaces {
lt-0/1/0 {
unit 2 {
description to-A;
encapsulation ethernet;
peer-unit 1;
family inet {
address 10.10.10.2/30;
}
}
unit 5 {
description to-C;
encapsulation ethernet;
peer-unit 6;
family inet {
address 10.10.10.5/30;
}
}
}
lo0 {
unit 2 {
family inet {
address 192.163.6.4/32;
}
}
}
}
protocols {
bgp {
group internal-peers {
type internal;
local-address 192.163.6.4;
export send-direct;
neighbor 192.168.40.4;
neighbor 192.168.6.5;
}
}
ospf {
area 0.0.0.0 {
interface lo0.2 {
passive;
}
interface lt-0/1/0.2;
interface lt-0/1/0.5;
}
}
}
policy-options {
policy-statement send-direct {
term 2 {
from protocol direct;
then accept;
}
}
}
routing-options {
router-id 192.163.6.4;
autonomous-system 17;
}
}
C{
interfaces {
lt-0/1/0 {
unit 6 {
description to-B;
encapsulation ethernet;
peer-unit 5;
family inet {
address 10.10.10.6/30;
}
}
}
lo0 {
unit 3 {
family inet {
address 192.168.40.4/32;
}
}
}
}
protocols {
bgp {
group internal-peers {
type internal;
local-address 192.168.40.4;
export send-direct;
neighbor 192.163.6.4;
neighbor 192.168.6.5;
}
}
ospf {
area 0.0.0.0 {
interface lo0.3 {
passive;
}
interface lt-0/1/0.6;
}
}
}
policy-options {
policy-statement send-direct {
term 2 {
from protocol direct;
then accept;
}
}
}
routing-options {
router-id 192.168.40.4;
autonomous-system 17;
}
}
If you are done configuring the device, enter commit from configuration mode.
Verification
Purpose Verify that BGP is running on configured interfaces and that the BGP session is active for
each neighbor address.
Action From the operational mode, enter the show bgp neighbor command.
Export: [ send-direct ]
Options: <Preference LocalAddress Refresh>
Local Address: 192.168.6.5 Holdtime: 90 Preference: 170
Number of flaps: 0
Peer ID: 192.168.40.4 Local ID: 192.168.6.5 Active Holdtime: 90
Keepalive Interval: 30 Peer index: 1
BFD: disabled, down
NLRI for restart configured on peer: inet-unicast
NLRI advertised by peer: inet-unicast
NLRI for this session: inet-unicast
Peer supports Refresh capability (2)
Restart time configured on the peer: 120
Stale routes from peer are kept for: 300
Restart time requested by this peer: 120
NLRI that peer supports restart for: inet-unicast
NLRI that restart is negotiated for: inet-unicast
NLRI of received end-of-rib markers: inet-unicast
NLRI of all end-of-rib markers sent: inet-unicast
Peer supports 4 byte AS extension (peer-as 17)
Peer does not support Addpath
Table inet.0 Bit: 10000
RIB State: BGP restart is complete
Send state: in sync
Active prefixes: 0
Received prefixes: 2
Accepted prefixes: 2
Suppressed due to damping: 0
Advertised prefixes: 2
Last traffic (seconds): Received 15 Sent 22 Checked 68
Input messages: Total 15688 Updates 2 Refreshes 0 Octets 298111
Output messages: Total 15688 Updates 2 Refreshes 0 Octets 298184
Output Queue[0]: 0
Action From the operational mode, enter the show bgp group command.
Action From the operational mode, enter the show bgp summary command.
Action From the operational mode, enter the show route protocol bgp command.
If you configure both route reflection and VPNs on the same routing device, the following
modifications to the route reflection configuration cause current BGP sessions to be
reset:
• Adding a cluster ID—If a BGP session shares the same autonomous system (AS) number
with the group where you add the cluster ID, all BGP sessions are reset regardless of
whether the BGP sessions are contained in the same group.
• Creating a new route reflector—If you have an internal BGP (IBGP) group with an AS
number and create a new route reflector group with the same AS number, all BGP
sessions in the IBGP group and the new route reflector group are reset.
• Changing configuration statements that affect BGP peers, such as renaming a BGP
group, resets the BGP sessions.
• If you change the address family specified in the [edit protocols bgp family] hierarchy
level, all current BGP sessions on the routing device are dropped and then reestablished.
Example: Preventing BGP Session Flaps When VPN Families Are Configured
This example shows a workaround for a known issue in which BGP sessions sometimes
go down and then come back up (in other words, flap) when virtual private network
(VPN) families are configured. If any VPN family (for example, inet-vpn, inet6-vpn,
inet-mpvn, inet-mdt, inet6-mpvn, l2vpn, iso-vpn, and so on) is configured on a BGP master
instance, a flap of either a route reflector (RR) internal BGP (IBGP) session or an external
BGP (EBGP) session causes flaps of other BGP sessions configured with the same VPN
family.
Requirements
• Configure BGP.
• Configure VPNs.
Overview
The reason for the flapping behavior is related to BGP operation in Junos OS when
originating VPN routes.
BGP has the following two modes of operation with respect to originating VPN routes:
• If BGP does not need to propagate VPN routes because the session has no EBGP peer
and no RR clients, BGP exports VPN routes directly from the instance.inet.0 routing
table to other PE routers. This behavior is efficient in that it avoids the creation of two
copies of many routes (one in the instance.inet.0 table and one in the bgp.l3vpn.0
table).
• If BGP does need to propagate VPN routes because the session has an EBGP peer or
RR clients, BGP first exports the VPN routes from the instance.inet.0 table to the
bgp.l3vpn.0 table. Then BGP exports the routes to other PE routers. In this scenario,
two copies of the route are needed to enable best-route selection. A PE router might
receive the same VPN route from a CE device and also from an RR client or EBGP peer.
When, because of a configuration change, BGP transitions from needing two copies of
a route to not needing two copies of a route (or the reverse), all sessions over which VPN
routes are exchanged go down and then come back up. Although this example focuses
on the family inet-vpn unicast statement, the concept applies to all VPN network layer
reachability information (NLRI) families. This issue impacts logical systems as well. All
BGP sessions in the master instance related to the VPN NLRI family are brought down
to implement the table advertisement change for the VPN NLRI family. Changing an RR
to a non-RR or the reverse (by adding or removing the cluster statement) causes the
table advertisement change. Also, configuring the first EBGP session or removing the
EBGP session from the configuration in the master instance for a VPN NLRI family causes
the table advertisement change.
The way to prevent these unnecessary session flaps is to configure an extra RR client or
EBGP session as a passive session with a neighbor address that does not exist. This
example focuses on the EBGP case, but the same workaround works for the RR case.
When a session is passive, the routing device does not send Open requests to a peer.
Once you configure the routing device to be passive, the routing device does not originate
the TCP connection. However, when the routing device receives a connection from the
peer and an Open message, it replies with another BGP Open message. Each routing
device declares its own capabilities.
Figure 44 on page 1025 shows the topology for the EBGP case. Router R1 has an IBGP
session with Routers R2 and R3 and an EBGP session with Router R4. All sessions have
the family inet-vpn unicast statement configured. If the R1-R4 EBGP session flaps, the
R1-R2 and R1-R3 BGP sessions flap also.
IBGP
R3
IBGP
R1 R2
EBGP
g040893
R4
Figure 45 on page 1025 shows the topology for the RR case. Router R1 is the RR, and
Router R3 is the client. Router R1 has IBGP sessions with Routers R2 and R3. All sessions
have the family inet-vpn unicast statement configured. If the R1-R3 session flaps, the
R1-R2 and R1-R4 sessions flap also.
R3
Route Reflector
Client
IBGP
R1 R2
Route Reflector
IBGP
g040894
R4
Configuration
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
bgp.l2vpn.0: 0/0/0/0
13.13.13.13 100 3 6 0 0 1:14 Establ
bgp.l3vpn.0: 0/0/0/0
bgp.l2vpn.0: 0/0/0/0
Mar 10 18:27:40 R1: rpd[1464]: bgp_peer_delete:6589: NOTIFICATION sent to 4.4.4.1 (External AS 200): code
6 (Cease) subcode 3 (Peer Unconfigured), Reason: Peer Deletion
Mar 10 18:27:40 R1: rpd[1464]: bgp_adv_main_update:7253: NOTIFICATION sent to 12.12.12.12 (Internal AS
100): code 6 (Cease) subcode 6 (Other Configuration Change), Reason: Configuration change - VPN table
advertise
Mar 10 18:27:40 R1: rpd[1464]: bgp_adv_main_update:7253: NOTIFICATION sent to 13.13.13.13 (Internal AS
100): code 6 (Cease) subcode 6 (Other Configuration Change), Reason: Configuration change - VPN table
advertise
3. Run the show bgp summary command to view the session flaps.
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
1. Add a passive EBGP session with a neighbor address that does not exist in the peer
autonomous system (AS).
2. Run the show bgp summary command to verify that the real sessions have been
established and the passive session is idle.
Verification
Purpose Try to cause the flap issue after the workaround is configured.
Purpose Make sure that the IBGP sessions do not flap after the EBGP session is deactivated.
bgp.l2vpn.0 0 0 0 0 0 0
Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn
State|#Active/Received/Accepted/Damped...
4.4.4.1 200 5 4 0 0 28 Establ
bgp.l3vpn.0: 0/0/0/0
bgp.l2vpn.0: 0/0/0/0
12.12.12.12 100 10314 10244 0 0 3d 5:19:55 Establ
bgp.l3vpn.0: 0/0/0/0
13.13.13.13 100 10311 10246 0 0 3d 5:20:31 Establ
bgp.l3vpn.0: 0/0/0/0
100.100.100.100 500 0 0 0 0 2d 23:40:58 Idle
Once a policy is created and named, it must be applied before it is active. You apply
routing policies using the import and export statements at the protocols>protocol-name
level in the configuration hierarchy.
In the import statement, you list the name of the routing policy to be evaluated when
routes are imported into the routing table from the routing protocol.
In the export statement, you list the name of the routing policy to be evaluated when
routes are being exported from the routing table into a dynamic routing protocol. Only
active routes are exported from the routing table.
To specify more than one policy and create a policy chain, you list the policies using a
space as a separator. If multiple policies are specified, the policies are evaluated in the
order in which they are specified. As soon as an accept or reject action is executed, the
policy chain evaluation ends.
Requirements
Overview
In this example, you create a routing policy called injectpolicy1 and a routing term called
injectterm1. The policy injects OSPF routes into the BGP routing table.
Configuration
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
4. Specify that the route is to be accepted if the previous conditions are matched.
[edit]
user@host# set protocols bgp export injectpolicy1
Results Confirm your configuration by entering the show policy-options and show protocols bgp
commands from configuration mode. If the output does not display the intended
configuration, repeat the instructions in this example to correct the configuration.
If you are done configuring the device, enter commit from configuration mode.
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
Results Confirm your configuration by entering the show policy-options and show routing-options
commands from configuration mode. If the output does not display the intended
configuration, repeat the instructions in this example to correct the configuration.
If you are done configuring the device, enter commit from configuration mode.
Verification
Troubleshooting
Using the show log Command to Examine the Actions of the Routing Policy
Problem The routing table contains unexpected routes, or routes are missing from the routing
table.
Solution If you configure policy tracing as shown in this example, you can run the show log
ospf-bgp-policy-log command to diagnose problems with the routing policy. The show
log ospf-bgp-policy-log command displays information about the routes that the
injectpolicy1 policy term analyzes and acts upon.
To use route reflection in an AS, you designate one or more routers as a route
reflector—typically, one per point of presence (POP). Route reflectors have the special
BGP ability to readvertise routes learned from an internal peer to other internal peers.
So rather than requiring all internal peers to be fully meshed with each other, route
reflection requires only that the route reflector be fully meshed with all internal peers.
The route reflector and all its internal peers form a cluster, as shown in Figure 46 on
page 1033.
NOTE: For some Juniper Networks devices, you must have an Advanced BGP
Feature license installed on each device that uses a route reflector. For license
details, see the Junos OS Initial Configuration Guide for Security Devices.
Figure 46 on page 1033 shows Router RR configured as the route reflector for Cluster 127.
The other routers are designated internal peers within the cluster. BGP routes are
advertised to Router RR by any of the internal peers. RR then readvertises those routes
to all other peers within the cluster.
You can configure multiple clusters and link them by configuring a full mesh of route
reflectors (see Figure 47 on page 1034).
Figure 47 on page 1034 shows Route Reflectors RR1, RR2, RR3, and RR4 as fully meshed
internal peers. When a router advertises a route to RR1, RR1 readvertises the route to the
other route reflectors, which, in turn, readvertise the route to the remaining routers within
the AS. Route reflection allows the route to be propagated throughout the AS without
the scaling problems created by the full mesh requirement.
However, as clusters become large, a full mesh with a route reflector becomes difficult
to scale, as does a full mesh between route reflectors. To help offset this problem, you
can group clusters of routers together into clusters of clusters for hierarchical route
reflection (see Figure 48 on page 1034).
Figure 48 on page 1034 shows RR2, RR3, and RR4 as the route reflectors for Clusters 127,
19, and 45, respectively. Rather than fully mesh those route reflectors, the network
administrator has configured them as part of another cluster (Cluster 6) for which RR1
is the route reflector. When a router advertises a route to RR2, RR2 readvertises the route
to all the routers within its own cluster, and then readvertises the route to RR1. RR1
readvertises the route to the routers in its cluster, and those routers propagate the route
down through their clusters.
Requirements
No special configuration beyond device initialization is required before you configure this
example.
Overview
Generally, internal BGP (IBGP)-enabled devices need to be fully meshed, because IBGP
does not readvertise updates to other IBGP-enabled devices. The full mesh is a logical
mesh achieved through configuration of multiple neighbor statements on each
IBGP-enabled device. The full mesh is not necessarily a physical full mesh. Maintaining
a full mesh (logical or physical) does not scale well in large deployments.
Figure 49 on page 1036 shows an IBGP network with Device A acting as an RR. Device B
and Device C are clients of the RR. Device D and Device E are outside the cluster, so they
are nonclients of the RR.
On Device A, the RR, you must form peer relationships with all of the IBGP-enabled
devices by including the neighbor statement for the clients (Device B and Device C) and
the nonclients (Device D and Device E). You must also include the cluster statement and
a cluster identifier. The cluster identifier can be any 32-bit value. This example uses the
loopback interface IP address of the RR.
On Device B and Device C, the RR clients, you only need one neighbor statement that
forms a peer relationship with the RR, Device A.
On Device D and Device E, the nonclients, you need a neighbor statement for each
nonclient device (D-to-E and E-to-D). You also need a neighbor statement for the RR
(D-to-A and E-to-A). Device D and Device E do not need neighbor statements for the
client devices (Device B and Device C).
AS 17
192.168.5.5
192.168.0.1
192.168.6.5
Route Reflector
192.163.6.4
C B
192.168.40.4
g040867
Configuration
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
To configure IBGP in the network using Juniper Networks Device A as a route reflector:
[edit interfaces]
user@A# set fe-0/0/0 unit 1 description to-B
user@A# set fe-0/0/0 unit 1 family inet address 10.10.10.1/30
user@A# set fe-0/0/1 unit 3 description to-D
user@A# set fe-0/0/1 unit 3 family inet address 10.10.10.9/30
user@A# set lo0 unit 1 family inet address 192.168.6.5/32
2. Configure BGP, including the cluster identifier and neighbor relationships with all
IBGP-enabled devices in the autonomous system (AS).
Also apply the policy that redistributes OSPF routes into BGP.
[edit routing-options]
user@A# set router-id 192.168.6.5
user@A# set autonomous-system 17
Results From configuration mode, confirm your configuration by entering the show interfaces,
show protocols, show policy-options, and show routing-options commands. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
ospf {
area 0.0.0.0 {
interface lo0.1 {
passive;
}
interface fe-0/0/0.1;
interface fe-0/0/1.3;
}
}
If you are done configuring the device, enter commit from configuration mode.
NOTE: Repeat these steps for each nonclient BGP peer within the cluster
that you are configuring if the other nonclient devices are from Juniper
Networks. Otherwise, consult the device’s documentation for instructions.
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
[edit interfaces]
user@B# set fe-0/0/0 unit 2 description to-A
user@B# set fe-0/0/0 unit 2 family inet address 10.10.10.2/30
user@B# set fe-0/0/1 unit 5 description to-C
user@B# set fe-0/0/1 unit 5 family inet address 10.10.10.5/30
user@B# set lo0 unit 2 family inet address 192.163.6.4/32
Also apply the policy that redistributes OSPF routes into BGP.
3. Configure OSPF.
[edit routing-options]
user@B# set router-id 192.163.6.4
user@B# set autonomous-system 17
Results From configuration mode, confirm your configuration by entering the show interfaces,
show protocols, show policy-options, and show routing-options commands. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
}
ospf {
area 0.0.0.0 {
interface lo0.2 {
passive;
}
interface fe-0/0/0.2;
interface fe-0/0/1.5;
}
}
If you are done configuring the device, enter commit from configuration mode.
NOTE: Repeat these steps for each client BGP peer within the cluster that
you are configuring if the other client devices are from Juniper Networks.
Otherwise, consult the device’s documentation for instructions.
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
[edit interfaces]
user@D# set fe-0/0/0 unit 4 description to-A
user@D# set fe-0/0/0 unit 4 family inet address 10.10.10.10/30
user@D# set fe-0/0/1 unit 7 description to-E
user@D# set fe-0/0/1 unit 7 family inet address 10.10.10.13/30
user@D# set lo0 unit 4 family inet address 192.168.0.1/32
2. Configure the BGP neighbor relationships with the RR and with the other nonclient
peers.
Also apply the policy that redistributes OSPF routes into BGP.
3. Configure OSPF.
[edit routing-options]
user@D# set router-id 192.168.0.1
user@D# set autonomous-system 17
Results From configuration mode, confirm your configuration by entering the show interfaces,
show protocols, show policy-options, and show routing-options commands. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
neighbor 192.168.6.5;
neighbor 192.168.5.5;
}
}
ospf {
area 0.0.0.0 {
interface lo0.4 {
passive;
}
interface fe-0/0/0.4;
interface fe-0/0/1.7;
}
}
If you are done configuring the device, enter commit from configuration mode.
NOTE: Repeat these steps for each nonclient BGP peer within the cluster
that you are configuring if the other nonclient devices are from Juniper
Networks. Otherwise, consult the device’s documentation for instructions.
Verification
Purpose Verify that BGP is running on configured interfaces and that the BGP session is established
for each neighbor address.
Action From operational mode, enter the show bgp neighbor command.
Active prefixes: 0
Received prefixes: 6
Accepted prefixes: 1
Suppressed due to damping: 0
Advertised prefixes: 6
Last traffic (seconds): Received 18 Sent 20 Checked 12
Input messages: Total 15 Updates 5 Refreshes 0 Octets 447
Output messages: Total 554 Updates 4 Refreshes 0 Octets 32307
Output Queue[0]: 0
Action From operational mode, enter the show bgp group command.
Action From operational mode, enter the show bgp summary command.
Purpose Verify that the routing table contains the IBGP routes.
Within a sub-AS, the same internal BGP (IBGP) full mesh requirement exists. Connections
to other confederations are made with standard external BGP (EBGP), and peers outside
the sub-AS are treated as external. To avoid routing loops, a sub-AS uses a confederation
sequence, which operates like an AS path but uses only the privately assigned sub-AS
numbers.
The confederation AS appears whole to other confederation ASs. The AS path received
by other ASs shows only the globally assigned AS number. It does not include the
confederation sequence or the privately assigned sub-AS numbers. The sub-AS numbers
are removed when the route is advertised out of the confederation AS. Figure 50 on
page 1050 shows an AS divided into four confederations.
AS 3
Sub-AS 64517 Sub-AS 64550
IBGP IBGP
EBGP
g015021
IBGP IBGP
Figure 50 on page 1050 shows AS 3 divided into four sub-ASs, 64517, 64550, 65300, and
65410, which are linked through EBGP sessions. Because the confederations are
connected by EBGP, they do not need to be fully meshed. EBGP routes are readvertised
to other sub-ASs.
Requirements
Overview
Like route reflectors, BGP confederations reduce the number of peer sessions and TCP
sessions to maintain connections between IBGP routing devices. BGP confederation is
another way to solve the scaling problems created by the IBGP full mesh requirement.
BGP confederations effectively break up a large AS into subautonomous systems. Each
sub-AS must be uniquely identified within the confederation AS by a sub-AS number.
Typically, sub-AS numbers are taken from the private AS numbers between 64512 and
65535. Within a sub-AS, the same IBGP full mesh requirement exists. Connections to
other confederations are made with standard EBGP, and peers outside the sub-AS are
treated as external. To avoid routing loops, a sub-AS uses a confederation sequence,
which operates like an AS path but uses only the privately assigned sub-AS numbers.
Figure 51 on page 1052 shows a sample network in which AS 17 has two separate
confederations: sub-AS 64512 and sub-AS 64513, each of which has multiple routers.
Within a sub-AS, an IGP is used to establish network connectivity with internal peers.
Between sub-ASs, an EBGP peer session is established.
Configuration
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
Step-by-Step This procedure shows the steps for the devices that are in sub-AS 64512.
Procedure
The autonomous-system statement sets the sub-AS number of the device.
The following example requires you to navigate various levels in the configuration
hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
[edit routing-options]
user@host# set autonomous-system 64512
The number 17 represents the main AS. The members statement lists all the sub-ASs
in the main AS.
3. On the border device in sub-AS 64512, configure an EBGP connection to the border
device in AS 64513.
4. Configure an IBGP group for peering with the devices within sub-AS 64512.
Results From configuration mode, confirm your configuration by entering the show routing-options
and show protocols commands. If the output does not display the intended configuration,
repeat the instructions in this example to correct the configuration.
neighbor 192.168.8.1;
neighbor 192.168.15.1;
}
}
If you are done configuring the device, enter commit from configuration mode.
Repeat these steps for Sub-AS 64513.
Verification
Purpose Verify that BGP is running on configured interfaces and that the BGP session is active for
each neighbor address.
Action From the CLI, enter the show bgp neighbor command.
Sample Output
user@host> show bgp neighbor
Peer: 10.255.245.12+179 AS 35 Local: 10.255.245.13+2884 AS 35
Type: Internal State: Established (route reflector client)Flags: Sync
Last State: OpenConfirm Last Event: RecvKeepAlive
Last Error: None
Options: Preference LocalAddress HoldTime Cluster AddressFamily Rib-group Refresh
Active prefixes: 0
Received prefixes: 2
Suppressed due to damping: 0
Last traffic (seconds): Received 3 Sent 3 Checked 3
Input messages: Total 9 Updates 6 Refreshes 0 Octets 403
Output messages: Total 7 Updates 3 Refreshes 0 Octets 365
Output Queue[0]: 0
Output Queue[1]: 0
Trace options: detail packets
Trace file: /var/log/bgpgr size 131072 files 10
Meaning The output shows a list of the BGP neighbors with detailed session information. Verify
the following information:
• For Type, each peer is configured as the correct type (either internal or external).
Action From the CLI, enter the show bgp group command.
Sample Output
user@host> show bgp group
Group Type: Internal AS: 10045 Local AS: 10045
Name: pe-to-asbr2 Flags: Export Eval
Export: [ match-all ]
Total peers: 1 Established: 1
10.0.0.4+179
bgp.l3vpn.0: 1/1/0
vpn-green.inet.0: 1/1/0
Meaning The output shows a list of the BGP groups with detailed group information. Verify the
following information:
• For Group Type, each group has the correct type (either internal or external).
• For Total peers, the expected number of peers within the group is shown.
• For Established, the expected number of peers within the group have BGP sessions in
the Established state.
• The IP addresses of all the peers within the group are present.
Action From the CLI, enter the show bgp summary command.
Sample Output
user@host> show bgp summary
Groups: 1 Peers: 3 Down peers: 0
Table Tot Paths Act Paths Suppressed History Damp State Pending
inet.0 6 4 0 0 0 0
Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn
State|#Active/Received/Damped...
10.0.0.2 65002 88675 88652 0 2 42:38 2/4/0
0/0/0
10.0.0.3 65002 54528 54532 0 1 2w4d22h 0/0/0
0/0/0
10.0.0.4 65002 51597 51584 0 0 2w3d22h 2/2/0
0/0/0
Meaning The output shows a summary of BGP session information. Verify the following information:
• For Down Peers, the total number of unestablished peers is 0. If this value is not zero,
one or more peering sessions are not yet established.
• Under Up/Dwn State, the BGP state reflects the number of paths received from the
neighbor, the number of these paths that have been accepted, and the number of
routes being damped (such as 0/0/0). If the field is Active, it indicates a problem in
the establishment of the BGP session.
Router and route authentication enables routers to share information only if they can
verify, based on a password (key), that they are talking to a trusted source. The hashed
key is sent along with the route being sent to another router. The receiving router compares
this key to its own configured key. If they are the same, it accepts the route. By using a
hashing algorithm, the key is not sent over the wire in plain text. Instead, a keyed hash is
calculated using the configured key. The routing update is used as the input text along
with the key into the hashing function. This hash is sent along with the route update to
the receiving router. The receiving router compares the received hash with a hash it
generates on the route update using the preshared key configured on it. If the two hashes
are the same, the route is assumed to be from a trusted source. The key is known only
to the sending and receiving routers.
The sending peer uses the following rules to identify the active authentication key:
• The start-time is less than or equal to the current time (in other words, not in the future).
• The start time is greater than that of all other keys in the chain whose start time is less
than the current time (in other words, closest to the current time).
The receiving peer determines the key with which it authenticates based upon the
incoming key identifier.
The sending peer identifies the current authentication key based on a configured start
time and then generates a hash value using the current key. The sending peer then Inserts
a TCP enhanced authentication option object into the BGP update message. The object
contains an object ID (assigned by IANA), and the object length, the current key, and a
hash value.
The receiving peer examines the incoming TCP enhanced authentication option, looks
up the received authentication key, and determines whether the key is acceptable based
on the start time, the system time, and the tolerance parameter. If the key is accepted,
the receiving peer calculates a hash and authenticates the update message.
Initial application of a keychain to a TCP session causes the session to reset. However,
once the keychain is applied, the addition or removal of a password from the keychain
does not cause the TCP session to reset. Also, the TCP session does not reset when the
keychain changes from one authentication algorithm to another.
Requirements
Overview
When you configure authentication, the algorithm creates an encoded checksum that is
included in the transmitted packet. The receiving routing device uses an authentication
key (password) to verify the packet’s checksum.
This example includes the following statements for configuring and applying the keychain:
• key—A keychain can have multiple keys. Each key within a keychain must be identified
by a unique integer value. The range of valid identifier values is from 0 through 63.
The key can be up to 126 characters long. Characters can include any ASCII strings. If
you include spaces, enclose all characters in quotation marks (“ ”).
• key-chain—For each keychain, you must specify a name. This example defines one
keychain: bgp-auth. You can have multiple keychains on a routing device. For example,
you can have a keychain for BGP, a keychain for OSPF, and a keychain for LDP.
• secret—For each key in the keychain, you must set a secret password. This password
can be entered in either encrypted or plain text format in the secret statement. It is
always displayed in encrypted format.
• start-time—Each key must specify a start time in UTC format. Control gets passed
from one key to the next. When a configured start time arrives (based on the routing
device’s clock), the key with that start time becomes active. Start times are specified
in the local time zone for a routing device and must be unique within the key chain.
This example configures a keychain named bgp-auth. Key 0 will be sent and accepted
starting at 2011-6-23.20:19:33 -0700, and will stop being sent and accepted when the
next key in the keychain (key 1) becomes active. Key 1 becomes active one year later at
2012-6-23.20:19:33 -0700, and will not stop being sent and accepted unless another key
is configured with a start time that is later than the start time of key 1. A clock-skew
tolerance of 30 seconds applies to the receiver accepting the keys. During the tolerance
period, either the current or previous key is acceptable. The keys are shared-secret
passwords. This means that the neighbors receiving the authenticated routing updates
must have the same authentication keychain configuration, including the same keys
(passwords). So Router R0 and Router R1 must have the same authentication-key-chain
configuration if they are configured as peers. This example shows the configuration on
only one of the routing devices.
Topology Diagram
R0 R1
g041117
Configuration
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
Step-by-Step The following example requires that you navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
To configure Router R1 to accept route filters from Device CE1 and perform outbound
route filtering using the received filters:
[edit routing-options]
user@R1# set autonomous-system 65533
The start time of each key must be unique within the keychain.
4. Apply the authentication keychain to BGP and set the hashing algorithm.
Results From configuration mode, confirm your configuration by entering the show protocols,
show routing-options, and show security commands. If the output does not display the
intended configuration, repeat the instructions in this example to correct the configuration.
neighbor 172.16.2.1;
authentication-key-chain bgp-auth;
authentication-algorithm md5;
}
}
If you are done configuring the device, enter commit from configuration mode.
Repeat the procedure for every BGP-enabled device in the network, using the appropriate
interface names and addresses for each BGP-enabled device.
Verification
Purpose Make sure that the AutheKeyChain option appears in the output of the show bgp neighbor
command.
Action From operational mode, enter the show bgp neighbor command.
Action From operational mode, enter the monitor traffic interface fe-0/0/1 command.
Purpose Check the number of packets dropped by TCP because of authentication errors.
Action From operational mode, enter the show system statistics tcp | match auth command.
Purpose Check the number of packets dropped by TCP because of authentication errors.
Action From operational mode, enter the show security keychain detail command.
The Junos OS implementation of IPsec supports two types of security: host to host and
gateway to gateway. Host-to-host security protects BGP sessions with other routers. An
SA to be used with BGP must be configured manually and use transport mode. Static
values must be configured on both ends of the security association. To apply host
protection, you configure manual SAs in transport mode and then reference the SA by
name in the BGP configuration to protect a session with a given peer.
Manual SAs require no negotiation between the peers. All values, including the keys, are
static and specified in the configuration. Manual SAs statically define the security
parameter index values, algorithms, and keys to be used and require matching
configurations on both end points of the tunnel (on both peers). As a result, each peer
must have the same configured options for communication to take place.
In transport mode, IPsec headers are inserted after the original IP header and before the
transport header.
The security parameter index is an arbitrary value used in combination with a destination
address and a security protocol to uniquely identify the SA.
Requirements
• Configure BGP.
Overview
The SA is configured at the [edit security ipsec security-association name] hierarchy level
with the mode statement set to transport. In transport mode, Junos OS does not support
authentication header (AH) or encapsulating security payload (ESP) header bundles.
Junos OS supports only the BGP protocol in transport mode.
This example specifies bidirectional IPsec to decrypt and authenticate the incoming and
outgoing traffic using the same algorithm, keys, and SPI in both directions, unlike inbound
and outbound SAs that use different attributes in both directions.
A more specific SA overrides a more general SA. For example, if a specific SA is applied
to a specific peer, that SA overrides the SA applied to the whole peer group.
Topology Diagram
R0 R1
g041117
Configuration
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
[edit]
set security ipsec security-association test-sa mode transport
set security ipsec security-association test-sa manual direction bidirectional protocol
esp
set security ipsec security-association test-sa manual direction bidirectional spi 1000
set security ipsec security-association test-sa manual direction bidirectional encryption
algorithm 3des-cbc
set security ipsec security-association test-sa manual direction bidirectional encryption
key ascii-text
"$9$kPT3AtO1hr6/u1IhvM8X7Vb2JGimfz.PtuB1hcs2goGDkqf5Qndb.5QzCA0BIRrvx7VsgJ"
set protocols bgp group 1 neighbor 1.1.1.1 ipsec-sa test-sa
Step-by-Step The following example requires that you navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
When you use an ASCII text key, the key must contain exactly 24 characters.
Results From configuration mode, confirm your configuration by entering the show protocols and
show security commands. If the output does not display the intended configuration,
repeat the instructions in this example to correct the configuration.
If you are done configuring the device, enter commit from configuration mode. Repeat
the configuration on Router R0, changing only the neighbor address.
Verification
Purpose Make sure that the correct settings appear in the output of the show ipsec
security-associations command.
Action From operational mode, enter the show ipsec security-associations command.
Meaning The output is straighforward for most fields except the AUX-SPI field. The AUX-SPI is
the value of the auxiliary security parameter index. When the value is AH or ESP, AUX-SPI
is always 0. When the value is AH+ESP, AUX-SPI is always a positive integer.
The MED attribute has a value that is referred to as a metric. If all other factors in
determining an exit point are equal, the exit point with the lowest metric is preferred.
If a MED is received over an external BGP link, it is propagated over internal links to other
BGP-enabled devices within the AS.
BGP update messages include a MED metric if the route was learned from BGP and
already had a MED metric associated with it, or if you configure the MED metric in the
configuration file.
A MED metric is advertised with a route according to the following general rules:
• A more specific metric overrides a less specific metric. That is, a group-specific metric
overrides a global BGP metric, and a peer-specific metric overrides a global BGP or
group-specific metric.
• A metric defined with a routing policy overrides a metric defined with the metric-out
statement.
• If the received route does not have an associated MED metric, and if you do not explicitly
configure a metric value, no metric is advertised. When you do not explicitly configure
a metric value, the MED value is equivalent to zero (0) when advertising an active route.
Because the AS path rather than the number of hops between hosts is the primary criterion
for BGP route selection, an AS with multiple connections to a peer AS can have multiple
equivalent AS paths. When the routing table contains two routes to the same host in a
neighboring AS, an MED metric assigned to each route can determine which to include
in the forwarding table. The MED metric you assign can force traffic through a particular
exit point in an AS.
Figure 54 on page 1068 illustrates how MED metrics are used to determine route selection.
Figure 54 on page 1068 shows AS 1 and AS 2 connected by two separate BGP links to
Routers C and D. Host E in AS 1 is located nearer to Router C. Host F, also in AS 1, is located
nearer to Router D. Because the AS paths are equivalent, two routes exist for each host,
one through Router C and one through Router D. To force all traffic destined for Host E
through Router C, the network administrator for AS 2 assigns an MED metric for each
router to Host E at its exit point. An MED metric of 10 is assigned to the route to Host E
through Router C, and an MED metric of 20 is assigned to the route to Host E through
Router D. BGP routers in AS 2 then select the route with the lower MED metric for the
forwarding table.
By default, only the MEDs of routes that have the same peer ASs are compared. However,
you can configure the routing table path selection options listed in Table 12 on page 1069
to compare MEDs in different ways. The MED options are not mutually exclusive and can
be configured in combination or independently. For the MED options to take effect, you
must configure them uniformly all through your network. The MED option or options you
configure determine the route selected. Thus we recommend that you carefully evaluate
your network for preferred routes before configuring the MED options.
Always comparing MEDs Ensures that the MEDs for paths from Useful when all enterprises participating
(always-compare-med) peers in different ASs are always in a network agree on a uniform policy
compared in the route selection process. for setting MEDs. For example, in a
network shared by two ISPs, both must
agree that a certain path is the better
path to configure the MED values
correctly.
Adding IGP cost to MED (med-plus-igp) Before comparing MED values for path Useful when the downstream AS requires
selection, adds to the MED the cost of the the complete cost of a certain route that
IGP route to the BGP next-hop is received across multiple ASs.
destination.
Applying Cisco IOS nondeterministic Specifies the nondeterministic behavior We recommend that you do not
behavior (cisco-non-deterministic) of the Cisco IOS software: configure this option, because the
nondeterministic behavior sometimes
• The active path is always first. All prevents the system from properly
nonactive but eligible paths follow the comparing the MEDs between paths.
active path and are maintained in the
order in which they were received.
Ineligible paths remain at the end of
the list.
• When a new path is added to the
routing table, path comparisons are
made among all routes, including those
paths that must never be selected
because they lose the MED
tie-breaking rule.
Requirements
No special configuration beyond device initialization is required before you configure this
example.
Overview
To directly configure a MED metric to advertise in BGP update messages, include the
metric-out statement:
metric is the primary metric on all routes sent to peers. It can be a value in the range
32
from 0 through 4,294,967,295 (2 – 1).
• minimum-igp—Sets the metric to the minimum metric value calculated in the interior
gateway protocol (IGP) to get to the BGP next hop. If a newly calculated metric is
greater than the minimum metric value, the metric value remains unchanged. If a newly
calculated metric is lower, the metric value is lowered to that value.
• igp—Sets the metric to the most recent metric value calculated in the IGP to get to the
BGP next hop.
• offset—Specifies a value for offset to increase or decrease the metric that is used from
the metric value calculated in the IGP. The metric value is offset by the value specified.
The metric calculated in the IGP (by specifying either igp or igp-minimum) is increased
if the offset value is positive. The metric calculated in the IGP (by specifying either igp
or igp-minimum) is decreased if the offset value is negative.
31 31
offset can be a value in the range from –2 through 2 – 1. Note that the adjusted metric
32
can never go below 0 or above 2 – 1.
Figure 55 on page 1071 shows a typical network with internal peer sessions and multiple
exit points to a neighboring autonomous system (AS).
Figure 55: Typical Network with IBGP Sessions and Multiple Exit Points
R2
AS123
12.12.12.0/24 24.24.24.0/24
R1 R4
AS123 AS4
13.13.13.0/24 34.34.34.0/24
R3
g041151
AS123
Configuration
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
Configuring Device R1
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
2. Configure BGP.
3. Configure OSPF.
Other useful options for this scenario might be to accept routes learned through
OSPF or local routes.
[edit routing-options]
user@R1# set autonomous-system 123
user@R1# set router-id 192.168.1.1
Results From configuration mode, confirm your configuration by entering the show interfaces,
show policy-options, show protocols, and show routing-options commands. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
unit 1 {
family inet {
address 12.12.12.1/24;
}
}
}
fe-1/2/1 {
unit 2 {
family inet {
address 13.13.13.1/24;
}
}
}
lo0 {
unit 1 {
family inet {
address 192.168.1.1/32;
}
}
}
If you are done configuring the device, enter commit from configuration mode.
Configuring Device R2
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
2. Configure BGP.
3. Configure OSPF.
Other useful options for this scenario might be to accept routes learned through
OSPF or local routes.
[edit routing-options]
user@R2# set autonomous-system 123
user@R2# set router-id 192.168.2.1
Results From configuration mode, confirm your configuration by entering the show interfaces,
show policy-options, show protocols, and show routing-options commands. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
}
interface fe-1/2/0.3;
interface fe-1/2/1.4;
}
}
If you are done configuring the device, enter commit from configuration mode.
Configuring Device R3
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
2. Configure BGP.
3. Configure OSPF.
Other useful options for this scenario might be to accept routes learned through
OSPF or local routes.
[edit routing-options]
user@R3# set autonomous-system 123
user@R3# set router-id 192.168.3.1
Results From configuration mode, confirm your configuration by entering the show interfaces,
show policy-options, show protocols, and show routing-options commands. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
type external;
export send-direct;
peer-as 4;
neighbor 34.34.34.4;
}
}
ospf {
area 0.0.0.0 {
interface lo0.3 {
passive;
}
interface fe-1/2/0.5;
interface fe-1/2/1.6;
}
}
If you are done configuring the device, enter commit from configuration mode.
Configuring Device R4
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
Other useful options for this scenario might be to accept routes learned through
OSPF or local routes.
3. Configure BGP.
4. Configure a MED value of 30 for neighbor Device R3, and a MED value of 20 for
neighbor Device R2.
This configuration causes autonomous system (AS) 123 (of which Device R1, Device
R2, and Device R3 are members) to prefer the path through Device R2 to reach AS
4.
[edit routing-options]
user@R4# set autonomous-system 4
user@R4# set router-id 192.168.4.1
Results From configuration mode, confirm your configuration by entering the show interfaces,
show policy-options, show protocols, and show routing-options commands. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
If you are done configuring the device, enter commit from configuration mode.
Verification
Purpose Verify that the active path goes through Device R2.
Action From operational mode, enter the show route protocol bgp command.
Meaning The asterisk (*) shows that the preferred path is through Device R2. The reason for the
path selection is listed as MED 20.
Purpose Make sure that Device R4 is sending update messages with a value of 20 to Device R2
and a value of 30 to Device R3.
Action From operational mode, enter the show route advertising-protocol bgp 24.24.24.2
command.
Meaning The MED column shows that Device R4 is sending the correct MED values to its two
external BGP (EBGP) neighbors.
Requirements
No special configuration beyond device initialization is required before you configure this
example.
Overview
To configure a route-filter policy that modifies the advertised MED metric in BGP update
messages, include the metric statement in the policy action.
Figure 56 on page 1083 shows a typical network with internal peer sessions and multiple
exit points to a neighboring autonomous system (AS).
Figure 56: Typical Network with IBGP Sessions and Multiple Exit Points
R2
AS123
12.12.12.0/24 24.24.24.0/24
R1 R4
AS123 AS4
13.13.13.0/24 34.34.34.0/24
R3
g041151
AS123
Configuration
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
Configuring Device R1
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
2. Configure BGP.
3. Configure OSPF.
Other useful options for this scenario might be to accept routes learned through
OSPF or local routes.
[edit routing-options]
user@R1# set autonomous-system 123
user@R1# set router-id 192.168.1.1
Results From configuration mode, confirm your configuration by entering the show interfaces,
show policy-options, show protocols, and show routing-options commands. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
autonomous-system 123;
router-id 192.168.1.1;
If you are done configuring the device, enter commit from configuration mode.
Configuring Device R2
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
2. Configure BGP.
3. Configure OSPF.
Other useful options for this scenario might be to accept routes learned through
OSPF or local routes.
[edit routing-options]
Results From configuration mode, confirm your configuration by entering the show interfaces,
show policy-options, show protocols, and show routing-options commands. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
area 0.0.0.0 {
interface lo0.2 {
passive;
}
interface fe-1/2/0.3;
interface fe-1/2/1.4;
}
}
If you are done configuring the device, enter commit from configuration mode.
Configuring Device R3
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
2. Configure BGP.
3. Configure OSPF.
Other useful options for this scenario might be to accept routes learned through
OSPF or local routes.
[edit routing-options]
user@R3# set autonomous-system 123
user@R3# set router-id 192.168.3.1
Results From configuration mode, confirm your configuration by entering the show interfaces,
show policy-options, show protocols, and show routing-options commands. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
}
group external {
type external;
export send-direct;
peer-as 4;
neighbor 34.34.34.4;
}
}
ospf {
area 0.0.0.0 {
interface lo0.3 {
passive;
}
interface fe-1/2/0.5;
interface fe-1/2/1.6;
}
}
If you are done configuring the device, enter commit from configuration mode.
Configuring Device R4
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
Other useful options for this scenario might be to accept routes learned through
OSPF or local routes.
3. Configure BGP.
[edit policy-options]
set policy-statement med-10 from route-filter 144.144.144.144/32 exact
set policy-statement med-10 then metric 10
set policy-statement med-10 then accept
set policy-statement med-30 from route-filter 0.0.0.0/0 longer
set policy-statement med-30 then metric 30
set policy-statement med-30 then accept
5. Configure the two EBGP neighbors, applying the two MED policies to Device R3,
and a MED value of 20 to Device R2.
[edit routing-options]
user@R4# set autonomous-system 4
user@R4# set router-id 192.168.4.1
Results From configuration mode, confirm your configuration by entering the show interfaces,
show policy-options, show protocols, and show routing-options commands. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
If you are done configuring the device, enter commit from configuration mode.
Verification
Purpose Verify that the active path goes through Device R2.
Action From operational mode, enter the show route protocol bgp command.
Meaning The output shows that the preferred path to the routes advertised by Device R4 is through
Device R2 for all routes except 144.144.144.144/32. For 144.144.144.144/32, the preferred
path is through Device R3.
Purpose Make sure that Device R4 is sending update messages with a value of 20 to Device R2
and a value of 30 to Device R3.
Action From operational mode, enter the show route advertising-protocol bgp 24.24.24.2
command.
Meaning The MED column shows that Device R4 is sending the correct MED values to its two EBGP
neighbors.
[edit]
routing-options {
router-id 10.0.0.1;
autonomous-system 23;
}
policy-options {
policy-statement from-otago {
from community otago;
then metric 20;
}
community otago members [56:2379 23:46944];
}
protocols {
bgp {
import from-otago;
group 23 {
type external;
peer-as 56;
neighbor 192.168.0.1 {
traceoptions {
file bgp-log-peer;
flag packets;
}
log-updown;
}
}
}
}
Example: Associating the MED Path Attribute with the IGP Metric and Delaying MED Updates
This example shows how to associate the multiple exit discriminator (MED) path attribute
with the interior gateway protocol (IGP) metric, and configure a timer to delay update
of the MED attribute.
Requirements
No special configuration beyond device initialization is required before you configure this
example.
Overview
BGP can be configured to advertise the MED attribute for a route based on the IGP
distance of its internal BGP (IBGP) route next-hop. The IGP metric enables internal routing
to follow the shortest path according to the administrative setup. In some deployments,
it might be ideal to communicate IGP shortest-path knowledge to external BGP (EBGP)
peers in a neighboring autonomous system (AS). This allows those EBGP peers to forward
traffic into your AS using the shortest paths possible.
Routes learned from an EBGP peer usually have a next hop on a directly connected
interface, and thus the IGP value is equal to zero. Zero is the value advertised. The IGP
metric is a nonzero value when a BGP peer sends third-party next hops that require the
local system to perform next-hop resolution—IBGP configurations, configurations within
confederation peers, or EBGP configurations that include the multihop command. In
these scenarios, it might make sense to associate the MED value with the IGP metric by
including the metric-out minimum-igp or metric-out igp option.
The drawback of associating the MED with the IGP metric is the risk of excessive route
advertisements when there are IGP instabilities in the network. Configuring a delay for
the MED update provides a mechanism to reduce route advertisements in such scenarios.
The delay works by slowing down MED updates when the IGP metric for the next hop
changes. The approach uses a timer to periodically advertise MED updates. When the
timer expires, the MED attribute for routes with metric-out igp delay-updates configured
is updated to the current IGP metric of the next hop. The BGP-enabled device sends out
advertisements for routes for which the MED attribute has changed.
The delay-updates option identifies the BGP groups (or peers) for which the MED updates
must be suppressed. The time for advertising MED updates is set to 10 minutes by default.
You can increase the interval up to 600 minutes by including the med-igp-update-interval
statement in the routing-options configuration.
NOTE: If you have nonstop active routing (NSR) enabled and a switchover
occurs, the delayed MED updates might be advertised as soon as the
switchover occurs.
When you configure the metric-out igp option, the IGP metric directly tracks the IGP cost
to the IBGP peer. When the IGP cost goes down, so does the advertised MED value.
Conversely, when the IGP cost goes up, the MED value goes up as well.
When you configure the metric-out minimum-igp option, the advertised MED value changes
only when the IGP cost to the IBGP peer goes down. An increase in the IGP cost does not
affect the MED value. The router monitors and remembers the lowest IGP cost until the
routing process (rpd) is restarted. The BGP peer sends an update only if the MED is lower
than the previously advertised value or another attribute associated with the route has
changed, or if the BGP peer is responding to a refresh route request.
This example uses the metric statement in the OSPF configuration to demonstrate that
when the IGP metric changes, the MED also changes after the configured delay interval.
The OSPF metric can range from 1 through 65,535.
AS 1
R2
R1 R3
AS 2
R4 R5
R6 R8
R7
g041155
AS 3
In this example, the MED value advertised by Device R1 is associated with the IGP running
in AS 1. The MED value advertised by Device R1 impacts the decisions of the neighboring
AS (AS 2) when AS 2 is forwarding traffic into AS 1.
Configuration
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
Configuring Device R1
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
2. Configure IBGP.
3. Configure EBGP.
The default for the MED update is 10 minutes when you include the
delay-med-update option. When you exclude the delay-med-update option, the
MED update occurs immediately after the IGP metric changes.
[edit routing-options]
user@R1# set med-igp-update-interval 12
You can configure the interval from 10 minutes through 600 minutes.
6. Configure OSPF.
The metric statement is used here to demonstrate what happens when the IGP
metric changes.
Other useful options for this scenario might be to accept routes learned through
OSPF or local routes.
[edit routing-options]
user@R1# set router-id 192.168.0.1
user@R1# set autonomous-system 1
Results From configuration mode, confirm your configuration by entering the show interfaces,
show policy-options, show protocols, and show routing-options commands. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
If you are done configuring the device, enter commit from configuration mode. Repeat
the configuration steps on the other devices in the topology, as needed for your network.
Verification
Purpose Verify that Device R1 is advertising to Device R4 a BGP MED value that reflects the IGP
metric.
Action From operational mode, enter the show route advertising-protocol bgp command.
Meaning The 601 value in the MED column shows that the MED value has been updated to reflect
the configured OSPF metric.
Verifying That the MED Value Changes When the OSPF Metric Changes
Purpose Make sure that when you raise the OSPF metric to 700, the MED value is updated to
reflect this change.
Action From configuration mode, enter the set protocols ospf area 0 interface fe-1/2/0.2 metric
700 command.
Meaning The 701 value in the MED column shows that the MED value has been updated to reflect
the configured OSPF metric.
Purpose Change the configuration to use the minimum-igp statement instead of the igp statement.
When you increase the OSPF metric, the MED value remains unchanged, but when you
decrease the OSPF metric, the MED value reflects the new OSPF metric.
Action From configuration mode, delete the igp statement, add the minimum-igp statement,
and increase the OSPF metric.
Meaning When the minimum-igp statement is configured, the MED value changes only when a
shorter path is available.
Requirements
No special configuration beyond device initialization is required before you configure this
example.
Overview
The configuration to enable multihop EBGP sessions requires connectivity between the
two EBGP peers. This example uses static routes to provide connectivity between the
devices.
Unlike directly connected EBGP sessions in which physical address are typically used in
the neighbor statements, you must use loopback interface addresses for multihop EBGP
by specifying the loopback interface address of the indirectly connected peer. In this way,
EBGP multihop is similar to internal BGP (IBGP).
Finally, you must add the multihop statement. Optionally, you can set a maximum
time-to-live (TTL) value with the ttl statement. The TTL is carried in the IP header of
BGP packets. If you do not specify a TTL value, the system’s default maximum TTL value
is used. The default TTL value is 64 for multihop EBGP sessions. Another option is to
retain the BGP next-hop value for route advertisements by including the
no-nexthop-change statement.
Device C and Device E have an established EBGP session. Device D is not a BGP-enabled
device. All of the devices have connectivity via static routes.
AS 17 AS 18
C D E
g041150
Configuration
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
Device C
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
To configure Device C:
1. Configure the interface to the directly connected device (to-D), and configure the
loopback interface.
3. Configure the multihop statement to enable Device C and Device E to become EBGP
peers.
Because the peers are two hops away from each other, the example uses the ttl 2
statement.
You must configure a route to both the loopback interface address and to the
address on the physical interface.
[edit routing-options]
user@C# set static route 10.10.10.14/32 next-hop 10.10.10.10
user@C# set static route 192.168.6.7/32 next-hop 10.10.10.10
5. Configure the local router ID and the autonomous system (AS) number.
[edit routing-options]
user@C# set router-id 192.168.40.4
user@C# set autonomous-system 17
Other useful options for this scenario might be to accept routes learned through
OSPF or local routes.
Results From configuration mode, confirm your configuration by entering the show interfaces,
show protocols, show policy-options, and show routing-options commands. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
}
}
}
If you are done configuring the device, enter commit from configuration mode.
Repeat these steps for all BFD sessions in the topology.
Configuring Device D
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
To configure Device D:
2. Configure the interfaces to the directly connected devices, and configure a loopback
interface.
3. Configure connectivity to the other devices using static routes to the loopback
interface addresses.
On Device D, you do not need static routes to the physical addresses because Device
D is directly connected to Device C and Device E.
[edit routing-options]
user@D# set static route 192.168.40.4/32 next-hop 10.10.10.9
user@D# set static route 192.168.6.7/32 next-hop 10.10.10.14
[edit routing-options]
user@D# set router-id 192.168.6.6
Results From configuration mode, confirm your configuration by entering the show interfaces and
show routing-options commands. If the output does not display the intended configuration,
repeat the instructions in this example to correct the configuration.
router-id 192.168.6.6;
If you are done configuring the device, enter commit from configuration mode.
Repeat these steps for all BFD sessions in the topology.
Configuring Device E
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
To configure Device E:
2. Configure the interface to the directly connected device (to-D), and configure the
loopback interface.
4. Configure the multihop statement to enable Device C and Device E to become EBGP
peers.
Because the peers are two hops away from each other, the example uses the ttl 2
statement.
You must configure a route to both the loopback interface address and to the
address on the physical interface.
[edit routing-options]
user@E# set static route 10.10.10.8/30 next-hop 10.10.10.13
user@E# set static route 192.168.40.4/32 next-hop 10.10.10.13
6. Configure the local router ID and the autonomous system (AS) number.
[edit routing-options]
user@E# set router-id 192.168.6.7
user@E# set autonomous-system 18
Other useful options for this scenario might be to accept routes learned through
OSPF or local routes.
Results From configuration mode, confirm your configuration by entering the show interfaces,
show protocols, show policy-options, and show routing-options commands. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
router-id 192.168.6.7;
autonomous-system 18;
If you are done configuring the device, enter commit from configuration mode.
Verification
Verifying Connectivity
Purpose Make sure that Device C can ping Device E, specifying the loopback interface address as
the source of the ping request.
The loopback interface address is the source address that BGP will use.
Action From operational mode, enter the ping 10.10.10.14 source 192.168.40.4 command from
Device C, and enter the ping 10.10.10.9 source 192.168.6.7 command from Device E.
Action From operational mode, enter the show bgp summary command.
Meaning The output shows that both devices have one peer each. No peers are down.
Purpose Check to make sure that routes are being advertised by BGP.
Action From operational mode, enter the show route advertising-protocol bgp neighbor command.
Meaning The send-static routing policy is exporting the static routes from the routing table into
BGP. BGP is advertising these routes between the peers because the BGP peer session
is established.
• Load balancing across multiple links between two routing devices belonging to different
autonomous systems (ASs)
• Load balancing across multiple links between two routing devices belonging to different
external confederation peers
BGP multipath does not apply to paths that share the same MED-plus-IGP cost, yet differ
in IGP cost. Multipath path selection is based on the IGP cost metric, even if two paths
have the same MED-plus-IGP cost.
Requirements
• Configure BGP.
• Configure a routing policy that exports routes (such as direct routes or IGP routes)
from the routing table into BGP.
Overview
Topology
AS 65000 AS 65001
10.0.1.1 R2
10.0.2.2
10.0.1.2
R1
10.0.0.1 10.0.2.1
10.0.0.2
R3
g040875
Configuration
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
Step-by-Step The following example requires that you navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
[edit routing-options]
user@R1# set forwarding-table export loadbal
[edit routing-options]
user@R1# set autonomous-system 65000
Results From configuration mode, confirm your configuration by entering the show protocols,
show policy-options, and show routing-options commands. If the output does not display
the intended configuration, repeat the instructions in this example to correct the
configuration.
[edit]
user@R1# show protocols
bgp {
group external {
type external;
peer-as 65001;
multipath;
neighbor 10.0.1.1;
neighbor 10.0.0.2;
}
}
[edit]
user@R1# show policy-options
policy-statement loadbal {
from {
route-filter 10.0.0.0/16 orlonger;
}
then {
load-balance per-packet;
}
}
[edit]
user@R1# show routing-options
autonomous-system 65000;
forwarding-table {
export loadbal;
}
If you are done configuring the device, enter commit from configuration mode.
Verification
Verifying Routes
Purpose Verify that routes are learned from both routers in the neighboring AS.
Meaning The active path, denoted with an asterisk (*), has two next hops: 10.0.1.1 and 10.0.0.2 to
the 10.0.2.0 destination. The 10.0.1.1 next hop is copied from the inactive path to the
active path.
Verifying Forwarding
Purpose Verify that both next hops are installed in the forwarding table.
Action From operational mode, run the show route forwarding-table command.
Requirements
No special configuration beyond device initialization is required before you configure this
example.
Overview
When you enable a single-hop EBGP peer to accept a remote next hop, you must also
configure an import routing policy on the EBGP peer that specifies the remote next-hop
address.
This example includes an import routing policy, agg_route, that enables a single-hop
external BGP peer (Device R1) to accept the remote next-hop 1.1.10.10 for the route to
the 1.1.230.0/23 network. At the [edit protocols bgp] hierarchy level, the example includes
the import agg_route statement to apply the policy to the external BGP peer and includes
the accept-remote-nexthop statement to enable the single-hop EBGP peer to accept
the remote next hop.
AS 65500 AS 65000
R0 R1
lo0:10.255.14.177
R2
g041156
AS 65000
Configuration
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
Device R0
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
2. Configure EBGP.
[edit routing-options]
user@R0# set static route 1.1.10.10/32 reject
user@R0# set static route 1.1.230.0/23 reject
6. Export the agg_route and test_route policies from the routing table into BGP.
[edit routing-options]
user@R0# set autonomous-system 65500
Results From configuration mode, confirm your configuration by entering the show interfaces,
show policy-options, show protocols, and show routing-options commands. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
type external;
export [ test_route agg_route ];
peer-as 65000;
multipath;
neighbor 1.1.0.2;
neighbor 1.1.1.2;
}
}
If you are done configuring the device, enter commit from configuration mode.
Configuring Device R1
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
2. Configure OSPF.
4. Configure IBGP.
5. Configure EBGP.
7. Configure a routing policy that enables a single-hop external BGP peer (Device R1)
to accept the remote next-hop 1.1.10.10 for the route to the 1.1.230.0/23 network.
8. Import the agg_route policy into the routing table on Device R1.
[edit routing-options]
user@R1# set autonomous-system 65000
Results From configuration mode, confirm your configuration by entering the show interfaces,
show policy-options, show protocols, and show routing-options commands. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
}
lo0 {
unit 2 {
family inet {
address 10.255.71.24/32;
}
}
}
If you are done configuring the device, enter commit from configuration mode.
Configuring Device R2
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
2. Configure OSPF.
3. Configure IBGP.
[edit routing-options]
user@R1# set autonomous-system 65000
Results From configuration mode, confirm your configuration by entering the show interfaces,
show protocols, and show routing-options commands. If the output does not display the
intended configuration, repeat the instructions in this example to correct the configuration.
type internal;
local-address 10.255.14.177;
neighbor 10.255.71.24;
}
}
ospf {
area 0.0.0.0 {
interface fe-1/2/0.6;
interface 10.255.14.177;
}
}
If you are done configuring the device, enter commit from configuration mode.
Verification
• Verifying That the Multipath Route with the Indirect Next Hop Is in the Routing
Table on page 1128
• Deactivating and Reactivating the accept-remote-nexthop Statement on page 1129
Verifying That the Multipath Route with the Indirect Next Hop Is in the Routing Table
Action From operational mode, enter the show route 1.1.230.0 extensive command.
1
AS path: 65500 I
Accepted Multipath
Localpref: 100
Router ID: 10.255.14.179
Indirect next hops: 1
Protocol next hop: 1.1.10.10
Indirect next hop: 91c0000 262142
Indirect path forwarding next hops: 2
Next hop type: Router
Next hop: 1.1.0.1 via fe-1/2/0.3
Next hop: 1.1.1.1 via fe-1/2/2.5
1.1.10.10/32 Originating RIB: inet.0
Node path count: 1
Forwarding nexthops: 2
Nexthop: 1.1.0.1 via fe-1/2/0.3
Nexthop: 1.1.1.1 via fe-1/2/2.5
BGP Preference: 170/-101
Next hop type: Indirect
Address: 0x90c44d8
Next-hop reference count: 4
Source: 1.1.1.1
Next hop type: Router, Next hop index: 262143
Next hop: 1.1.0.1 via fe-1/2/0.3, selected
Next hop: 1.1.1.1 via fe-1/2/2.5
Protocol next hop: 1.1.10.10
Indirect next hop: 91c0000 262142
State: <NotBest Ext>
Inactive reason: Not Best in its group - Update source
Local AS: 65000 Peer AS: 65500
Age: 2:55:27 Metric2: 0
Task: BGP_65500.1.1.1.1+53260
AS path: 65500 I
Accepted
Localpref: 100
Router ID: 10.255.14.179
Indirect next hops: 1
Protocol next hop: 1.1.10.10
Indirect next hop: 91c0000 262142
Indirect path forwarding next hops: 2
Next hop type: Router
Next hop: 1.1.0.1 via fe-1/2/0.3
Next hop: 1.1.1.1 via fe-1/2/2.5
1.1.10.10/32 Originating RIB: inet.0
Node path count: 1
Forwarding nexthops: 2
Nexthop: 1.1.0.1 via fe-1/2/0.3
Nexthop: 1.1.1.1 via fe-1/2/2.5
Meaning The output shows that Device R1 has a route to the 1.1.230.0 network with the multipath
feature enabled (Accepted Multipath). The output also shows that the route has an
indirect next hop of 1.1.10.10.
Purpose Make sure that the multipath route with the indirect next hop is removed from the routing
table when you deactivate the accept-remote-nexthop statement.
Action 1. From configuration mode, enter the deactivate protocols bgp accept-remote-nexthop
command.
user@R1# commit
3. From configuration mode, reactivate the statement by entering the activate protocols
bgp accept-remote-nexthop command.
user@R1# commit
Meaning When the accept-remote-nexthop statement is deactivated, the multipath route to the
1.1.230.0 network is removed from the routing table .
The LOCAL_PREF path attribute is always advertised to IBGP peers and to neighboring
confederations. It is never advertised to external BGP (EBGP) peers. The default behavior
is to not modify the LOCAL_PREF path attribute if it is present.
The LOCAL_PREF path attribute applies at export time only, when the routes are exported
from the routing table into BGP.
If a BGP route is received without a LOCAL_PREF attribute, the route is stored in the
routing table and advertised by BGP as if it were received with a LOCAL_PREF value
of 100. A non-BGP route that is advertised by BGP is advertised with a LOCAL_PREF value
of 100 by default.
Requirements
No special configuration beyond device initialization is required before you configure this
example.
Overview
To change the local preference metric advertised in the path attribute, you must include
32
the local-preference statement, specifying a value from 0 through 4,294,967,295 (2 – 1).
There are several reasons you might want to prefer one path over another. For example,
compared to other paths, perhaps one path is less expensive to use, has higher bandwidth,
or is more stable.
Figure 61 on page 1132 shows a typical network with internal peer sessions and multiple
exit points to a neighboring AS.
Figure 61: Typical Network with IBGP Sessions and Multiple Exit Points
R2
AS123
12.12.12.0/24 24.24.24.0/24
R1 R4
AS123 AS4
13.13.13.0/24 34.34.34.0/24
R3
g041151
AS123
To reach Device R4, Device R1 can go through either Device R2 or Device R3. By default,
the local preference is 100 for both routes. When the local preferences are equal, Junos
OS has rules for breaking the tie and choosing a path. (See “Understanding BGP Path
Selection” on page 7.) In this example, the active route is through Device R2 because
Device R2’s router ID is lower than Device R3’s router ID. After showing the default behavior
without an explicit setting for the local preference, this example shows how to configure
a local preference of 300 on Device R3, thereby making Device R3 the preferred path to
reach Device R4.
Configuration
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
Configuring Device R1
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
2. Configure BGP.
3. Configure OSPF.
Other useful options for this scenario might be to accept routes learned through
OSPF or local routes.
[edit routing-options]
user@R1# set autonomous-system 123
user@R1# set router-id 192.168.1.1
Results From configuration mode, confirm your configuration by entering the show interfaces,
show policy-options, show protocols, and show routing-options commands. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
unit 1 {
family inet {
address 12.12.12.1/24;
}
}
}
fe-1/2/1 {
unit 2 {
family inet {
address 13.13.13.1/24;
}
}
}
lo0 {
unit 1 {
family inet {
address 192.168.1.1/32;
}
}
}
If you are done configuring the device, enter commit from configuration mode.
Configuring Device R2
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
2. Configure BGP.
3. Configure OSPF.
Other useful options for this scenario might be to accept routes learned through
OSPF or local routes.
[edit routing-options]
user@R2# set autonomous-system 123
user@R2# set router-id 192.168.2.1
Results From configuration mode, confirm your configuration by entering the show interfaces,
show policy-options, show protocols, and show routing-options commands. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
}
interface fe-1/2/0.3;
interface fe-1/2/1.4;
}
}
If you are done configuring the device, enter commit from configuration mode.
Configuring Device R3
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
2. Configure BGP.
3. Configure OSPF.
Other useful options for this scenario might be to accept routes learned through
OSPF or local routes.
[edit routing-options]
user@R3# set autonomous-system 123
user@R3# set router-id 192.168.3.1
Results From configuration mode, confirm your configuration by entering the show interfaces,
show policy-options, show protocols, and show routing-options commands. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
type external;
export send-direct;
peer-as 4;
neighbor 34.34.34.4;
}
}
ospf {
area 0.0.0.0 {
interface lo0.3 {
passive;
}
interface fe-1/2/0.5;
interface fe-1/2/1.6;
}
}
If you are done configuring the device, enter commit from configuration mode.
Configuring Device R4
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
2. Configure BGP.
Other useful options for this scenario might be to accept routes learned through
OSPF or local routes.
[edit routing-options]
user@R4# set autonomous-system 4
user@R4# set router-id 192.168.4.1
Results From configuration mode, confirm your configuration by entering the show interfaces,
show policy-options, show protocols, and show routing-options commands. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
router-id 192.168.4.1;
If you are done configuring the device, enter commit from configuration mode.
Verification
Purpose Verify that the active path goes through Device R2.
Action From operational mode, enter the show route protocol bgp command.
Meaning The asterisk (*) shows that the preferred path is through Device R2. In the default
configuration, Device R2 has a lower router ID than Device R3. The router ID is controlling
the path selection.
Action From configuration mode, enter the set local-preference 300 command.
Purpose Verify that the active path goes through Device R3.
Action From operational mode, enter the show route protocol bgp command.
Meaning The asterisk (*) shows that the preferred path is through Device R3. In the altered
configuration, Device R3 has a higher local preference than Device R2. The local preference
is controlling the path selection.
32
through 4,294,967,295 (2 – 1), with a lower value indicating a more preferred route.
Table 3 on page 10 lists the default preference values.
System routes 4 –
Redirects 30 –
Kernel 40 –
SNMP 50 –
Router discovery 55 –
In general, the narrower the scope of the statement, the higher precedence its preference
value is given, but the smaller the set of routes it affects. To modify the default preference
value for routes learned by routing protocols, you generally apply routing policy when
configuring the individual routing protocols. You also can modify some preferences with
other configuration statements, which are indicated in the table.
Requirements
No special configuration beyond device initialization is required before you configure this
example.
Overview
Routing information can be learned from multiple sources, such as through static
configuration, BGP, or an interior gateway protocol (IGP). When Junos OS determines a
route’s preference to become the active route, it selects the route with the lowest
preference as the active route and installs this route into the forwarding table. By default,
the routing software assigns a preference of 170 to routes that originated from BGP. Of
all the routing protocols, BGP has the highest default preference value, which means
that routes learned by BGP are the least likely to become the active route.
Some vendors have a preference (distance) of 20 for external BGP (EBGP) and a distance
of 200 for internal BGP (IGBP). Junos OS uses the same value (170) for both EBGP and
IBGP. However, this difference between vendors has no operational impact because
Junos OS always prefers EBGP routes over IBGP routes.
Another area in which vendors differ is in regard to IGP distance compared to BGP
distance. For example, some vendors assign a distance of 110 to OSPF routes. This is
higher than the EBGP distance of 20 , and results in the selection of an EBGP route over
an equivalent OSPF route. In the same scenario, Junos OS chooses the OSPF route,
because of the default preference 10 for an internal OSPF route and 150 for an external
OSPF route, which are both lower than the 170 preference assigned to all BGP routes.
In a multivendor environment, you might want to change the preference value for BGP
routes so that Junos OS chooses an EBGP route instead of an OSPF route. To accomplish
this goal, one option is to include the preference statement in the EBGP configuration.
To modify the default BGP preference value, include the preferece statement, specifying
32
a value from 0 through 4,294,967,295 (2 – 1).
Topology
In the sample network, Device R1 and Device R2 have EBGP routes to each other and also
OSPF routes to each other.
• Accept the default preference values of 170 for BGP and 10 for OSPF.
AS 65500
R1
R2
lo0:
10.255.14.177
g041157
AS 65000
Configuration
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
Step-by-Step The following example requires that you navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
[edit interfaces]
user@R1# set fe-1/2/0 unit 4 family inet address 1.12.0.1/30
user@R1# set lo0 unit 2 family inet address 10.255.71.24/32
[edit routing-options]
user@R1# set autonomous-system 65500
4. Configure OSPF.
Results From configuration mode, confirm your configuration by entering the show interfaces,
show policy-options, show protocols, and show routing-options commands. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
}
}
}
If you are done configuring the device, enter commit from configuration mode.
Repeat these steps on Device R2.
Verification
Purpose Make sure that the routing tables on Device R1 and Device R2 reflect the fact that Device
R1 is using the configured EBGP preference of 8, and Device R2 is using the default EBGP
preference of 170.
Meaning The output shows that on Device R1, the active path to Device R2’s loopback interface
(10.255.14.177/32) is a BGP route. The output also shows that on Device R2, the active
path to Device R1’s loopback interface (10.255.71.24/32) is an OSPF route.
2. Choose the path with the lowest preference value (routing protocol process
preference).
Routes that are not eligible to be used for forwarding (for example, because they were
rejected by routing policy or because a next hop is inaccessible) have a preference of
–1 and are never chosen.
For non-BGP paths, choose the path with the lowest preference2 value.
4. For BGP, prefer the path with the shortest autonomous system (AS) path value
(skipped if the as-path-ignore statement is configured).
5. For BGP, prefer the route with the lower origin code.
Routes learned from an interior gateway protocol (IGP) have a lower origin code than
those learned from an exterior gateway protocol (EGP), and both have lower origin
codes than incomplete routes (routes whose origin is unknown).
6. For BGP, prefer the path with the lowest multiple exit discriminator (MED) metric.
• If nondeterministic routing table path selection behavior is not configured (that is,
if the path-selection cisco-nondeterministic statement is not included in the BGP
configuration), for paths with the same neighboring AS numbers at the front of the
AS path, prefer the path with the lowest MED metric. To always compare MEDs
whether or not the peer ASs of the compared routes are the same, include the
path-selection always-compare-med statement.
• If nondeterministic routing table path selection behavior is configured (that is, the
path-selection cisco-nondeterministic statement is included in the BGP
configuration), prefer the path with the lowest MED metric.
Confederations are not considered when determining neighboring ASs. A missing MED
metric is treated as if a MED were present but zero.
7. Prefer strictly internal paths, which include IGP routes and locally generated routes
(static, direct, local, and so forth).
8. Prefer strictly external BGP (EBGP) paths over external paths learned through internal
BGP (IBGP) sessions.
9. For BGP, prefer the path whose next hop is resolved through the IGP route with the
lowest metric.
NOTE: A path is considered a BGP equal-cost path (and will be used for
forwarding) if a tie-break is performed after the previous step. All paths
with the same neighboring AS, learned by a multipath-enabled BGP
neighbor, are considered.
BGP multipath does not apply to paths that share the same MED-plus-IGP
cost yet differ in IGP cost. Multipath path selection is based on the IGP
cost metric, even if two paths have the same MED-plus-IGP cost.
10. For BGP, if both paths are external, prefer the currently active path to minimize
route-flapping. This rule is not used if:
11. For BGP, prefer the path from the peer with the lowest router ID. For any path with an
originator ID attribute, substitute the originator ID for the router ID during router ID
comparison.
12. For BGP, prefer the path with the shortest cluster list length. The length is 0 for no list.
13. For BGP, prefer the path from the peer with the lowest peer IP address.
By default, only the multiple exit discriminators (MEDs) of routes that have the same
peer autonomous systems (ASs) are compared. You can configure routing table path
selection options to obtain different behaviors.
The third step of the algorithm, by default, evaluates the length of the AS path and
determines the active path. You can configure an option that enables Junos OS to skip
this third step of the algorithm by including the as-path-ignore option.
To configure routing table path selection behavior, include the path-selection statement:
path-selection {
(always-compare-med | cisco-non-deterministic | external-router-id);
as-path-ignore;
med-plus-igp {
igp-multiplier number;
med-multiplier number;
}
}
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
Routing table path selection can be configured in one of the following ways:
• Using the same nondeterministic behavior as does the Cisco IOS software
(cisco-non-deterministic). This behavior has two effects:
• The active path is always first. All nonactive but eligible paths follow the active path
and are maintained in the order in which they were received, with the most recent
path first. Ineligible paths remain at the end of the list.
• When a new path is added to the routing table, path comparisons are made without
removing from consideration those paths that should never be selected because
those paths lose the MED tie-breaking rule.
NOTE: The result of these two effects is that the system only sometimes
compares the MED values between paths that it should otherwise compare.
Because of this, we recommend that you not configure nondeterministic
behavior.
• Always comparing MEDs whether or not the peer ASs of the compared routes are the
same (always-compare-med).
• Comparing the router ID between external BGP paths to determine the active path
(external-router-id). By default, router ID comparison is not performed if one of the
external paths is active. You can force the router ID comparison by restarting the routing
process with the restart routing operational-mode command.
• Adding the IGP cost to the next-hop destination to the MED value before comparing
MED values for path selection.
BGP multipath does not apply to paths that share the same MED-plus-IGP cost, yet
differ in IGP cost. Multipath path selection is based on the IGP cost metric, even if two
paths have the same MED-plus-IGP cost.
Example: Ignoring the AS Path Attribute When Selecting the Best Path
If multiple BGP routes to the same destination exist, BGP selects the best path based
on the route attributes of the paths. One of the route attributes that affects the best-path
decision is the length of the AS paths of each route. Routes with shorter AS paths are
preferred over those with longer AS paths. Although not typically practical, some scenarios
might require that the AS path length be ignored in the route selection process. This
example shows how to configure a routing device to ignore the AS path attribute.
Requirements
No special configuration beyond device initialization is required before you configure this
example.
Overview
On externally connected routing devices, the purpose of skipping the AS path comparison
might be to force an external BGP (EBGP) versus internal BGP (IBGP) decision to remove
traffic from your network as soon as possible. On internally connected routing devices,
you might want your IBGP-only routers to default to the local externally connected
gateway. The local IBGP-only (internal) routers skip the AS path comparison and move
down the decision tree to use the closest interior gateway protocol (IGP) gateway (lowest
IGP metric). Doing this might be an effective way to force these routers to use a LAN
connection instead of their WAN connection.
In this example, Device R2 is learning about the loopback interface address on Device
R4 (4.4.4.4/32) from Device R1 and Device R3. Device R1 is advertising 4.4.4.4/32 with
an AS-path of 1 5 4, and Device R3 is advertising 4.4.4.4/32 with an AS-path of 3 4. Device
R2 selects the path for 4.4.4.4/32 from Device R3 as the best path because the AS path
is shorter than the AS path from Device R1.
This example modifies the BGP configuration on Device R2 so that the AS-path length
is not used in the best-path selection.
Device R1 has a lower router ID (1.1.1.1) than Device R3 (1.1.1.1). If all other path selection
criteria are equal (or, as in this case, ignored), the route learned from Device R1 is used.
Because the AS-path attribute is being ignored, the best path is toward Device R1 because
of its lower router ID value.
AS 4
R4
AS 5
R5
R1 R2 R3
AS 1 AS 2 AS 3
g041166
Configuration
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
Configuring Device R2
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
[edit interfaces]
user@R2# set fe-1/2/0 unit 2 family inet address 192.168.10.2/24
user@R2# set fe-1/2/1 unit 3 family inet address 192.168.20.2/24
user@R2# set lo0 unit 2 family inet address 2.2.2.2/32
2. Configure EBGP.
3. Configure the autonomous system (AS) path attribute to be ignored in the Junos
OS path selection algorithm.
[edit policy-options]
user@R2# set policy-statement send-direct term 1 from protocol direct
user@R2# set policy-statement send-direct term 1 then accept
user@R2# set policy-statement send-local term 1 from protocol local
user@R2# set policy-statement send-local term 1 then accept
user@R2# set policy-statement send-static term 1 from protocol static
user@R2# set policy-statement send-static term 1 then accept
6. Configure the autonomous system (AS) number and the router ID.
[edit routing-options]
user@R2# set router-id 2.2.2.2
user@R2# set autonomous-system 2
Results From configuration mode, confirm your configuration by entering the show interfaces,
show policy-options, show protocols, and show routing-options commands. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
family inet {
address 2.2.2.2/32;
}
}
}
If you are done configuring the device, enter commit from configuration mode. Repeat
the configuration on the other devices in the network, changing the interface names and
IP addresses, as needed.
Verification
Purpose Make sure that from Device R2, the active path to get to AS 4 is through AS 1 and AS 5,
not through AS 3.
From operational mode, enter the show route 4.4.4.4 protocol bgp command.
Meaning The asterisk (*) is next to the path learned from R1, meaning that this is the active path.
The AS path for the active path is 1 5 4, which is longer than the AS path (3 4) for the
nonactive path learned from Router R3.
For example, ISP A, with an AS of 1000, acquires ISP B, with an AS of 100. ISP B’s
customer, ISP C, does not want to change its configuration. After ISP B becomes part of
ISP A, a local AS number of 100 is configured for use in EBGP peer sessions with ISP C.
This means that the local AS value of 100 is prepended before the global AS value of
1000 in the AS path used to export routes to direct external peers in ISP C.
The Junos OS implementation of the local AS attribute supports the following options:
• Local AS with private option—When you use the private option, the local AS is used
during the establishment of the BGP session with an EBGP neighbor but is hidden in
the AS path sent to other EBGP peers. Only the global AS is included in the AS path
sent to external peers.
The private option is useful for establishing local peering with routing devices that
remain configured with their former AS or with a specific customer that has not yet
modified its peer arrangements. The local AS is used to establish the BGP session with
the EBGP neighbor but is hidden in the AS path sent to external peers in another AS.
Include the private option so that the local AS is not prepended before the global AS
in the AS path sent to external peers. When you specify the private option, the local
AS is prepended only in the AS path sent to the EBGP neighbor.
For example, in Figure 64 on page 1162, Router 1 and Router 2 are in AS 64496, Router 4
is in AS 64511, and Router 3 is in AS 64510. Router 2 used to belong to AS 64497, which
has merged with another network and now belongs to AS 64496. Because Router 3
still peers with Router 2 using its former AS, 64497, Router 2 needs to be configured
with a local AS of 64497 to maintain peering with Router 3. Configuring a local AS of
64497 permits Router 2 to add AS 64497 when advertising routes to Router 3. Router 3
sees an AS path of 64497 64496 for the prefix 10/8.
192.168.1
1 2 4
IBGP EBGP
.1 .2
AS 64497
192.168.10 10.0.0.0/8
EBGP 10.222.0.0/16
.2
3
g017007
AS 64510
To prevent Router 2 from adding the local AS number in its announcements to other
peers, use the local-as 64497 private statement. This statement configures Router 2
to not include local AS 64497 when announcing routes to Router 1 and to Router 4. In
this case, Router 4 sees an AS path of 64496 64510 for the prefix 10.222/16.
• Local AS with alias option—In Junos OS Release 9.5 and later, you can configure a
local AS as an alias. During the establishment of the BGP open session, the AS used
in the Open message alternates between the local AS and the global AS. If the local
AS is used to connect with the EBGP neighbor, then only the local AS is prepended to
the AS path when the BGP peer session is established. If the global AS is used to
connect with the EBGP neighbor, then only the global AS is prepended to the AS path
when the BGP peer session is established. The use of the alias option also means that
the local AS is not prepended to the AS path for any routes learned from that EBGP
neighbor. Therefore, the local AS remains hidden from other external peers.
Configuring a local AS with the alias option is especially useful when you are migrating
the routing devices in an acquired network to the new AS. During the migration process,
some routing devices might be configured with the new AS while others remain
configured with the former AS. For example, it is good practice to start by migrating
first to the new AS any routing devices that function as route reflectors. However, as
you migrate the route reflector clients incrementally, the route reflector has to peer
with routing devices configured with the former AS as well as routing devices configured
with the new AS. To establish local peer sessions, it can be useful for the BGP peers
in the network to be able to use both the local AS and the global AS. At the same time,
you want to hide this local AS from external peers and use only the global AS in the
AS path when exporting routes to another AS. In such situations, choose the alias
option.
Include the alias option to configure the local AS as an alias to the global AS configured
at the [edit routing-options] hierarchy level. When you configure a local AS as an alias,
during the establishment of the BGP open session, the AS used in the Open message
alternates between the local AS and the global AS. The local AS is prepended to the
AS path only when the peer session with an EBGP neighbor is established using that
local AS. The local AS is hidden in the AS path sent to any other external peers. Only
the global AS is prepended to the AS path when the BGP session is established using
the global AS.
NOTE: The private and alias options are mutually exclusive. You cannot
configure both options with the same local-as statement.
• Local AS with option not to prepend the global AS—In Junos OS Release 9.6 and
later, you can configure a local AS with the option not to prepend the global AS. Only
the local AS is included in the AS path sent to external peers.
Use the no-prepend-global-as option when you want to strip the global AS number
from outbound BGP updates. This option is useful in a virtual private network (VPN)
scenario where you want to hide the global AS from the VPN.
Include the no-prepend-global-as option to have the global AS configured at the [edit
routing-options] hierarchy level stripped from the AS path sent to external peers. When
you use this option, only the local AS is included in the AS path.
• Number of loops option—The local AS feature also supports the ability to specify the
number of times detection of the AS number in the AS_PATH attribute causes the
route to be discarded or hidden. For example, if you configure loops 1, the route is hidden
if the AS number is detected in the path one or more times. This is the default behavior.
If you configure loops 2, the route is hidden if the AS number is detected in the path
two or more times.
For the loops number statement, you can configure 1 through 10.
NOTE: If you configure the local AS values for any BGP group, the detection
of routing loops is performed using both the AS and the local AS values for
all BGP groups.
If the local AS for the EBGP or IBGP peer is the same as the current AS, do
not use the local-as statement to specify the local AS number.
When you configure the local AS within a VRF, this impacts the AS path
loop-detection mechanism. All of the local-as statements configured on
the device are part of a single AS domain. The AS path loop-detection
mechanism is based on looking for a matching AS present in the domain.
Requirements
No special configuration beyond device initialization is required before you configure this
example.
Overview
Use the local-as statement when ISPs merge and want to preserve a customer’s
configuration, particularly the AS with which the customer is configured to establish a
peer relationship. The local-as statement simulates the AS number already in place in
customer routers, even if the ISP’s router has moved to a different AS.
This example shows how to use the local-as statement to configure a local AS. The
local-as statement is supported for BGP at the global, group, and neighbor hierarchy
levels.
When you configure the local-as statement, you must specify an AS number. You can
specify a number from 1 through 4,294,967,295 in plain-number format. In Junos OS
Release 9.1 and later, the range for autonomous system (AS) numbers is extended to
provide BGP support for 4-byte AS numbers as defined in RFC 4893, BGP Support for
Four-octet AS Number Space. In Junos OS Release 9.3 and later, you can also configure
a 4-byte AS number using the AS-dot notation format of two integer values joined by a
period: <16-bit high-order value in decimal>.<16-bit low-order value in decimal>. For
example, the 4-byte AS number of 65,546 in plain-number format is represented as 1.10
in the AS-dot notation format. You can specify a value from 0.0 through 65535.65535
in AS-dot notation format. Junos OS continues to support 2-byte AS numbers. The 2-byte
AS number range is 1 through 65,535 (this is a subset of the 4-byte range).
R1 R2 R3
g041158
AS 100 AS 200 AS 300
In this example, Device R2 used to belong to AS 250 and now is in AS 200. Device R1 and
Device R3 are configured to peer with AS 250 instead of the new AS number (AS 200).
Device R2 has the new AS number configured with the autonoumous-system 200
statement. What enables the peering sessions to work is the addition of the local-as 250
statement in the BGP configuration. Because local-as 250 is configured, Device R2 includes
both the global AS (200) and the local AS (250) in BGP inbound and outbound updates.
Configuration
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
Configuring Device R1
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
[edit interfaces]
user@R1# set fe-1/2/0 unit 1 family inet address 10.0.0.1/30
user@R1# set lo0 unit 1 family inet address 192.168.0.1/32
[edit policy-options]
user@R1# set policy-statement send-direct term 1 from protocol direct
user@R1# set policy-statement send-direct term 1 then accept
user@R1# set policy-statement send-static term 1 from protocol static
user@R1# set policy-statement send-static term 1 then accept
4. Configure a static route to the remote network between Device R2 and Device R3.
[edit routing-options]
[edit routing-options]
user@R1# set autonomous-system 100
Results From configuration mode, confirm your configuration by entering the show interfaces,
show policy-options, show protocols, and show routing-options commands. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
If you are done configuring the device, enter commit from configuration mode.
Configuring Device R2
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
[edit interfaces]
user@R2# set fe-1/2/0 unit 2 family inet address 10.0.0.2/30
2. Configure EBGP.
[edit routing-options]
user@R2# set autonomous-system 200
[edit policy-options]
user@R2# set policy-statement send-direct term 1 from protocol direct
user@R2# set policy-statement send-direct term 1 then accept
user@R2# set policy-statement send-static term 1 from protocol static
user@R2# set policy-statement send-static term 1 then accept
Results From configuration mode, confirm your configuration by entering the show interfaces,
show policy-options, show protocols, and show routing-options commands. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
}
}
fe-1/2/1 {
unit 3 {
family inet {
address 10.1.0.1/30;
}
}
}
lo0 {
unit 2 {
family inet {
address 192.168.0.2/32;
}
}
}
If you are done configuring the device, enter commit from configuration mode.
Configuring Device R3
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
[edit interfaces]
user@R3# set fe-1/2/0 unit 4 family inet address 10.1.0.2/30
user@R3# set lo0 unit 3 family inet address 192.168.0.3/32
2. Configure EBGP.
[edit routing-options]
user@R3# set autonomous-system 300
4. Configure a static route to the remote network between Device R1 and Device R2.
[edit routing-options]
user@R3# set static route 10.0.0.0/30 next-hop 10.1.0.1
[edit policy-options]
user@R3# set policy-statement send-direct term 1 from protocol direct
user@R3# set policy-statement send-direct term 1 then accept
user@R3# set policy-statement send-static term 1 from protocol static
user@R3# set policy-statement send-static term 1 then accept
Results From configuration mode, confirm your configuration by entering the show interfaces,
show policy-options, show protocols, and show routing-options commands. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
}
}
}
If you are done configuring the device, enter commit from configuration mode.
Verification
Purpose Make sure that Device R2 has the local and global AS settings configured.
Action From operational mode, enter the show bgp neighbors command.
Holdtime: 90 Preference: 170 Local AS: 250 Local System AS: 200
Number of flaps: 0
Peer ID: 192.168.0.1 Local ID: 192.168.0.2 Active Holdtime: 90
Keepalive Interval: 30 Peer index: 0
BFD: disabled, down
Local Interface: fe-1/2/0.2
NLRI for restart configured on peer: inet-unicast
NLRI advertised by peer: inet-unicast
NLRI for this session: inet-unicast
Peer supports Refresh capability (2)
Stale routes from peer are kept for: 300
Peer does not support Restarter functionality
NLRI that restart is negotiated for: inet-unicast
NLRI of received end-of-rib markers: inet-unicast
NLRI of all end-of-rib markers sent: inet-unicast
Peer supports 4 byte AS extension (peer-as 100)
Peer does not support Addpath
Table inet.0 Bit: 10000
RIB State: BGP restart is complete
Send state: in sync
Active prefixes: 1
Received prefixes: 3
Accepted prefixes: 2
Suppressed due to damping: 0
Advertised prefixes: 4
Last traffic (seconds): Received 6 Sent 14 Checked 47
Input messages: Total 258 Updates 3 Refreshes 0 Octets 4969
Output messages: Total 258 Updates 2 Refreshes 0 Octets 5037
Output Queue[0]: 0
Meaning The Local AS: 250 and Local System AS: 200 output shows that Device R2 has the
expected settings. Also, the options list includes LocalAS.
Purpose Make sure that the sessions are established and that the local AS number 250 is displayed.
Action From operational mode, enter the show bgp summary command.
Meaning Device R1 and Device R3 appear to be peering with a device in AS 250, even though Device
R2 is actually in AS 200.
Purpose Make sure that the routes are in the routing tables and that the AS paths show the local
AS number 250.
Action From configuration mode, enter the set route protocol bgp command.
Meaning Device R1 and Device R3 appear to have routes with AS paths that include AS 250, even
though Device R2 is actually in AS 200.
Requirements
No special configuration beyond device initialization is required before you configure this
example.
Overview
Use the local-as statement when ISPs merge and want to preserve a customer’s
configuration, particularly the AS with which the customer is configured to establish a
peer relationship. The local-as statement simulates the AS number already in place in
customer routers, even if the ISP’s router has moved to a different AS.
When you use the private option, the local AS is used during the establishment of the
BGP session with an external BGP (EBGP) neighbor but is hidden in the AS path sent to
other EBGP peers. Only the global AS is included in the AS path sent to external peers.
The private option is useful for establishing local peering with routing devices that remain
configured with their former AS or with a specific customer that has not yet modified its
peer arrangements. The local AS is used to establish the BGP session with the EBGP
neighbor but is hidden in the AS path sent to external peers in another AS.
Include the private option so that the local AS is not prepended before the global AS in
the AS path sent to external peers. When you specify the private option, the local AS is
prepended only in the AS path sent to the EBGP neighbor.
AS 64496
Local AS
R1 R3 R4
64497
g041160
R2
Device R2 is hiding the private local AS from all the routers, except Device R3. The private
option applies to the routes that Device R1 receives (learns) from Device R3 and that
Device R1, in turn, readvertises to other routers. When these routes, learned from Device
R3, are readavertised by Device R1 to Device R2, the private local AS is missing from the
AS path advertised to Device R2.
Configuration
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
Configuring Device R1
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
[edit routing-options]
user@R1# set autonomous-system 64496
Results From configuration mode, confirm your configuration by entering the show interfaces,
show policy-options, show protocols, and show routing-options commands. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
}
}
fe-1/2/1 {
unit 5 {
family inet {
address 192.168.10.1/24;
}
}
}
lo0 {
unit 2 {
family inet {
address 10.1.1.1/32;
}
}
}
If you are done configuring the device, enter commit from configuration mode.
Repeat the configuration as needed for the other devices in the topology.
Verification
Purpose Make sure that Device R2 does not have AS 64497 in its AS paths to Device R3 and Device
R4.
Action From operational mode, enter the show route protocol bgp command.
Purpose Make sure that Device R2 does not have AS 64497 in its AS paths to Device R3 and Device
R4.
Action From operational mode, enter the show route protocol bgp command.
Meaning Device R3’s route to Device R2 (prefix 10.1.1.2) includes both the local and the global AS
configured on Device R1 (64497 and 64496, respectively).
• A remote AS for which you provide connectivity is multihomed, but only to the local
AS.
Most companies acquire their own AS number. Some companies also use private AS
numbers to connect to their public AS network. These companies might use a different
private AS number for each region in which their company does business. In any
implementation, announcing a private AS number to the Internet must be avoided. Service
providers can use the remove-private statement to prevent advertising private AS numbers
to the Internet.
In an enterprise scenario, suppose that you have multiple AS numbers in your company,
some of which are private AS numbers, and one with a public AS number. The one with
a public AS number has a direct connection to the service provider. In the AS that connects
directly to the service provider, you can use the remove-private statement to filter out
any private AS numbers in the advertisements that are sent to the service provider.
The AS numbers are stripped from the AS path starting at the left end of the AS path
(the end where AS paths have been most recently added). The routing device stops
searching for private ASs when it finds the first nonprivate AS or a peer’s private AS. If
the AS path contains the AS number of the external BGP (EBGP) neighbor, BGP does
not remove the private AS number.
The operation takes place after any confederation member ASs have already been
removed from the AS path, if applicable.
The software is preconfigured with knowledge of the set of AS numbers that is considered
private, a range that is defined in the Internet Assigned Numbers Authority (IANA) assigned
numbers document. The set of AS numbers reserved as private are in the range
from 64,512 through 65,534, inclusive.
Requirements
No special configuration beyond device initialization is required before you configure this
example.
Overview
Service providers and enterprise networks use the remove-private statement to prevent
advertising private AS numbers to the Internet. The remove-private statement works in
the outbound direction. You configure the remove-private statement on a device that
has a public AS number and that is connected to one or more devices that have private
AS numbers. Generally, you would not configure this statement on a device that has a
private AS number.
R1 ISP R2
g041165
In this example, Device R1 is connected to its service provider using private AS number
65535. The example shows the remove-private statement configured on Device ISP to
prevent Device R1’s private AS number from being announced to Device R2. Device R2
sees only the AS number of the service provider.
Configuration
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
Device ISP set interfaces fe-1/2/0 unit 2 family inet address 192.168.10.10/24
set interfaces fe-1/2/1 unit 3 family inet address 192.168.20.20/24
set interfaces lo0 unit 2 family inet address 10.10.0.1/32
set protocols bgp group ext type external
set protocols bgp group ext neighbor 192.168.10.1 peer-as 65535
set protocols bgp group ext neighbor 192.168.20.1 remove-private
set protocols bgp group ext neighbor 192.168.20.1 peer-as 200
set routing-options autonomous-system 100
Device ISP
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
[edit interfaces]
2. Configure EBGP.
3. For the neighbor in autonomous system (AS) 200 (Device R2), remove private AS
numbers from the advertised AS paths.
[edit routing-options]
user@ISP# set autonomous-system 100
Results From configuration mode, confirm your configuration by entering the show interfaces,
show protocols, and show routing-options commands. If the output does not display the
intended configuration, repeat the instructions in this example to correct the configuration.
peer-as 200;
}
}
}
If you are done configuring the device, enter commit from configuration mode. Repeat
the configuration on Device R1 and Device R2, changing the interface names and IP
address, as needed, and adding the routing policy configuration.
Verification
Purpose Make sure that Device ISP has the remove-private setting enabled in its neighbor session
with Device R2.
Action From operational mode, enter the show bgp neighbor 192.168.20.1 command.
Meaning The RemovePrivateAS option shows that Device ISP has the expected setting.
Purpose Make sure that the devices have the expected routes and AS paths.
Action From operational mode, enter the show route protocol bgp command.
Meaning Device ISP has the private AS number 65535 in its AS path to Device R1. However, Device
ISP does not advertise this private AS number to Device R2. This is shown in the routing
table of Device R2. Device R2’s path to Device R1 contains only the AS number for Device
ISP.
Purpose Verify that without the remove-private statement, the private AS number appears in
Device R2’s routing table.
Action From configuration mode on Device ISP, enter the deactivate remove-private command
and then recheck the routing table on Device R2.
Meaning Private AS number 65535 appears in Device R2’s AS path to Device R1.
Flap damping reduces the number of update messages by marking routes as ineligible
for selection as the active or preferable route. Marking routes in this way leads to some
delay, or suppression, in the propagation of route information, but the result is increased
network stability. You typically apply flap damping to external BGP (EBGP) routes (routes
in different ASs). You can also apply flap damping within a confederation, between
confederation member ASs. Because routing consistency within an AS is important, do
not apply flap damping to internal BGP (IBGP) routes. (If you do, it is ignored.)
By default, route flap damping is not enabled. Damping is applied to external peers and
to peers at confederation boundaries.
When you enable damping, default parameters are applied, as summarized in Table 14
on page 1187.
max-suppress minutes Maximum hold-down time for a route, in minutes. 60 (minutes) 1 through 720
To change the default BGP flap damping values, you define actions by creating a named
set of damping parameters and including it in a routing policy with the damping action.
For the damping routing policy to work, you also must enable BGP route flap damping.
Requirements
Before you begin, configure router interfaces and configure routing protocols, as explained
in Routing Policies Configuration Overview.
Overview
In this example, you configure a routing policy called policy1 and a corresponding routing
term called term1. Within the term, you configure the route filter to include source routes
greater than or equal to 10.210.0.0/16 and destination routes greater than or equal to
10.215.0.0/16. Then you group the source and destination prefixes into a forwarding class
called forwarding-class1 and apply policy1 to the forwarding table. The routing policy is
evaluated when routes are being exported from the routing table into the forwarding
table. Only the active routes are exported from the routing table.
Configuration
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
1. Specify the routes to dampen and associate each group of routes with a group
name.
[edit]
user@host# set protocols bgp damping
[edit ]
user@host# set protocols bgp group groupA neighbor 172.16.15.14 import
dampenpolicy1
NOTE: You can refer to the same routing policy one or more times in
the same or different import statement.
Results Confirm your configuration by entering the show policy-options and show protocols bgp
commands from configuration mode. If the output does not display the intended
configuration, repeat the configuration instructions in this example to correct it.
If you are done configuring the device, enter commit from configuration mode.
Verification
Purpose Verify that the policy and term are configured on the device and that the appropriate
damping parameters are specified within the term.
Purpose Verify that damping is enabled for BGP and that the routing policy is applied to the routing
protocol.
Action From operational mode, enter the show protocols bgp command.
To enable MP-BGP, you configure BGP to carry network layer reachability information
(NLRI) for address families other than unicast IPv4 by including the family inet statement:
family inet {
(any | flow | labeled-unicast | multicast | unicast) {
accepted-prefix-limit {
maximum number;
teardown <percentage> <idle-timeout (forever | minutes)>;
}
<loops number>;
prefix-limit {
maximum number;
teardown <percentage> <idle-timeout (forever | minutes)>;
}
rib-group group-name;
}
}
To enable MP-BGP to carry NLRI for the IPv6 address family, include the family inet6
statement:
family inet6 {
(any | labeled-unicast | multicast | unicast) {
accepted-prefix-limit {
maximum number;
teardown <percentage> <idle-timeout (forever | minutes)>;
}
<loops number>;
prefix-limit {
maximum number;
teardown <percentage> <idle-timeout (forever | minutes)>;
}
rib-group group-name;
}
}
On routers only, to enable MP-BGP to carry Layer 3 virtual private network (VPN) NLRI
for the IPv4 address family, include the family inet-vpn statement:
family inet-vpn {
(any | flow | multicast | unicast) {
accepted-prefix-limit {
maximum number;
teardown <percentage> <idle-timeout (forever | minutes)>;
}
<loops number>;
prefix-limit {
maximum number;
teardown <percentage> <idle-timeout (forever | minutes)>;
}
rib-group group-name;
}
}
On routers only, to enable MP-BGP to carry Layer 3 VPN NLRI for the IPv6 address family,
include the family inet6-vpn statement:
family inet6-vpn {
(any | multicast | unicast) {
accepted-prefix-limit {
maximum number;
teardown <percentage> <idle-timeout (forever | minutes)>;
}
<loops number>;
prefix-limit {
maximum number;
teardown <percentage> <idle-timeout (forever | minutes)>;
}
rib-group group-name;
}
}
On routers only, to enable MP-BGP to carry multicast VPN NLRI for the IPv4 address
family and to enable VPN signaling, include the family inet-mvpn statement:
family inet-mvpn {
signaling {
accepted-prefix-limit {
maximum number;
teardown <percentage> <idle-timeout (forever | minutes)>;
}
<loops number>;
prefix-limit {
maximum number;
teardown <percentage> <idle-timeout (forever | minutes)>;
}
}
}
To enable MP-BGP to carry multicast VPN NLRI for the IPv6 address family and to enable
VPN signaling, include the family inet6-mvpn statement:
family inet6-mvpn {
signaling {
accepted-prefix-limit {
maximum number;
teardown <percentage> <idle-timeout (forever | minutes)>;
}
<loops number>;
prefix-limit {
maximum number;
teardown <percentage> <idle-timeout <forever | minutes>;
}
}
}
For more information about multiprotocol BGP-based multicast VPNs, see the Junos OS
Multicast Protocols Configuration Guide.
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
NOTE: If you change the address family specified in the [edit protocols bgp
family] hierarchy level, all current BGP sessions on the routing device are
dropped and then reestablished.
In Junos OS Release 9.6 and later, you can specify a loops value for a specific BGP address
family.
By default, BGP peers carry only unicast routes used for unicast forwarding purposes. To
configure BGP peers to carry only multicast routes, specify the multicast option. To
configure BGP peers to carry both unicast and multicast routes, specify the any option.
When MP-BGP is configured, BGP installs the MP-BGP routes into different routing tables.
Each routing table is identified by the protocol family or address family indicator (AFI)
and a subsequent address family identifier (SAFI).
The following list shows all possible AFI and SAFI combinations:
Routes installed in the inet.2 routing table can only be exported to MP-BGP peers because
they use the SAFI, identifying them as routes to multicast sources. Routes installed in
the inet.0 routing table can only be exported to standard BGP peers.
The inet.2 routing table should be a subset of the routes that you have in inet.0, since it
is unlikely that you would have a route to a multicast source to which you could not send
unicast traffic. The inet.2 routing table stores the unicast routes that are used for multicast
reverse-path-forwarding checks and the additional reachability information learned by
MP-BGP from the NLRI multicast updates. An inet.2 routing table is automatically created
when you configure MP-BGP (by setting NLRI to any).
• Limiting the Number of Prefixes Received on a BGP Peer Session on page 1193
• Limiting the Number of Prefixes Accepted on a BGP Peer Session on page 1194
• Configuring BGP Routing Table Groups on page 1195
• Resolving Routes to PE Routing Devices Located in Other ASs on page 1195
• Allowing Labeled and Unlabeled Routes on page 1195
You can limit the number of prefixes received on a BGP peer session, and log rate-limited
messages when the number of injected prefixes exceeds a set limit. You can also tear
down the peering when the number of prefixes exceeds the limit.
To configure a limit to the number of prefixes that can be received on a BGP session,
include the prefix-limit statement:
prefix-limit {
maximum number;
teardown <percentage> <idle-timeout (forever | minutes)>;
}
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
For maximum number, specify a value in the range from 1 through 4,294,967,295. When
the specified maximum number of prefixes is exceeded, a system log message is sent.
If you include the teardown statement, the session is torn down when the maximum
number of prefixes is exceeded. If you specify a percentage, messages are logged when
the number of prefixes exceeds that percentage of the specified maximum limit. After
the session is torn down, it is reestablished in a short time (unless you include the
idle-timeout statement). If you include the idle-timeout statement, the session can be
kept down for a specified amount of time, or forever. If you specify forever, the session
is reestablished only after the you issue a clear bgp neighbor command.
NOTE: In Junos OS Release 9.2 and later, you can alternatively configure a
limit to the number of prefixes that can be accepted on a BGP peer session.
For more information, see “Understanding Multiprotocol BGP” on page 1190.
In Junos OS Release 9.2 and later, you can limit the number of prefixes that can be
accepted on a BGP peer session. When that specified limit is exceeded, a system log
message is sent. You can also specify to reset the BGP session if the limit to the number
of specified prefixes is exceeded.
To configure a limit to the number of prefixes that can be accepted on a BGP peer session,
include the accepted-prefix-limit statement:
accepted-prefix-limit {
maximum number;
teardown <percentage> <idle-timeout (forever | minutes)>;
}
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
For maximum number, specify a value in the range from 1 through 4,294,967,295.
Include the teardown statement to reset the BGP peer session when the number of
accepted prefixes exceeds the configured limit. You can also include a percentage value
from 1 through 100 to have a system log message sent when the number of accepted
prefixes exceeds that percentage of the maximum limit. By default, a BGP session that
is reset is reestablished within a short time. Include the idle-timeout statement to prevent
the BGP session from being reestablished for a specified period of time. You can configure
a timeout value from 1 through 2400 minutes. Include the forever option to prevent the
BGP session from being reestablished until you issue the clear bgp neighbor command.
NOTE: Alternatively, you can configure a limit to the number of prefixes that
can be received (as opposed to accepted) on a BGP peer session. For more
information, see “Limiting the Number of Prefixes Received on a BGP Peer
Session” on page 1193.
When a BGP session receives a unicast or multicast NLRI, it installs the route in the
appropriate table (inet.0 or inet6.0 for unicast, and inet.2 or inet6.2 for multicast). To
add unicast prefixes to both the unicast and multicast tables, you can configure BGP
routing table groups. This is useful if you cannot perform multicast NLRI negotiation.
rib-group group-name;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
You can allow labeled routes to be placed in the inet.3 routing table for route resolution.
These routes are then resolved for provider edge (PE) routing device connections where
the remote PE is located across another autonomous system (AS). For a PE routing
device to install a route in the VPN routing and forwarding (VRF) routing instance, the
next hop must resolve to a route stored within the inet.3 table.
To resolve routes into the inet.3 routing table, include the resolve-vpn statement:
resolve-vpn group-name;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
You can allow both labeled and unlabeled routes to be exchanged in a single session.
The labeled routes are placed in the inet.3 routing table, and both labeled and unlabeled
unicast routes can be sent to or received by the routing device.
To allow both labeled and unlabeled routes to be exchanged, include the rib inet.3
statement:
rib inet.3;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
Requirements
No special configuration beyond device initialization is required before you configure this
example.
Overview
In this example, the BGP neighbors are IPv4 prefixes. The IPv4-compatible IPv6 prefixes
are configured on the interfaces to preclude the configuration of static routes.
• BGP derives next-hop prefixes using the IPv4-compatible IPv6 prefix. For example, the
IPv4 next-hop prefix 10.19.1.1 translates to the IPv6 next-hop prefix ::ffff:10.19.1.1.
• An IPv6 connection must be configured over the link. The connection must be either
an IPv6 tunnel or a dual-stack configuration.
• When configuring IPv4-compatible IPv6 prefixes, use a mask that is longer than 96 bits.
Figure 68: Topology for Configuring IPv6 BGP Routes over IPv4 Transport
R1 R2 R3
g041158
Configure IPv4 transport from interface ge-0/1/0 with an IPv4 prefix 11.19.1.2/24 to interface
ge-1/1/1 with an IPv4 prefix 11.19.1.1/24 to carry IPv6 BGP routes.
Configuration
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
Configuring Device R1
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
1. Configure the interfaces, including both an IPv4 address and an IPv6 address.
[edit interfaces]
user@R1# set fe-1/2/0 unit 1 family inet address 192.168.10.1/24
user@R1# set fe-1/2/0 unit 1 family inet6 address ::192.168.10.1/120
user@R1# set lo0 unit 1 family inet address 10.10.10.1/32
2. Configure EBGP.
IPv4 unicast routes are enabled by default. The configuration is shown here for
completeness.
[edit policy-options]
user@R1# set policy-statement send-direct term 1 from protocol direct
user@R1# set policy-statement send-direct term 1 then accept
user@R1# set policy-statement send-static term 1 from protocol static
user@R1# set policy-statement send-static term 1 then accept
[edit routing-options]
user@R1# set rib inet6.0 static route ::192.168.20.0/120 next-hop ::192.168.10.10
user@R1# set static route 192.168.20.0/24 next-hop 192.168.10.10
[edit routing-options]
user@R1# set autonomous-system 100
Results From configuration mode, confirm your configuration by entering the show interfaces,
show policy-options, show protocols, and show routing-options commands. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
If you are done configuring the device, enter commit from configuration mode. Repeat
the configuration on Device R2 and Device R3, changing the interface names and IP
addresses, as needed.
Verification
Purpose Make sure that BGP is enabled to carry IPv6 unicast routes.
Action From operational mode, enter the show bgp neighbor command.
Meaning The various occurrences of inet6-unicast in the output shows that BGP is enabled to
carry IPv6 unicast routes.
Purpose Make sure that Device R2 has BGP routes in its inet6.0 routing table.
Action From operational mode, enter the show route protocol bgp inet6.0 command.
Requirements
• Configure BGP.
• Configure a routing policy that exports routes (such as direct routes or IGP routes)
from the routing table into BGP.
Overview
Propagating firewall filter information as part of BGP enables you to propagate firewall
filters against denial-of-service (DOS) attacks dynamically across autonomous systems.
Flow routes are encapsulated into the flow-specification NLRI and propagated through
a network or virtual private networks (VPNs), sharing filter-like information. Flow routes
are an aggregation of match conditions and resulting actions for packets. They provide
you with traffic filtering and rate-limiting capabilities much like firewall filters. Unicast
flow routes are supported for the default instance, VPN routing and forwarding (VRF)
instances, and virtual-router instances.
The flow route filters are first configured on a router statically, with a set of matching
criteria followed by the actions to be taken. Then, in addition to family inet unicast, family
inet flow (or family inet-vpn flow) is configured between this BGP-enabled device and
its peers.
By default, statically configured flow routes (firewall filters) are advertised to other
BGP-enabled devices that support the family inet flow or family inet-vpn flow NLRI.
The receiving BGP-enabled device performs a validation process before installing the
firewall filter into the flow routing table instance-name.inetflow.0. The validation procedure
is described in Internet draft draft-ietf-idr-flow-spec-09.txt, Dissemination of Flow
Specification Rules.
The receiving BGP-enabled device accepts a flow route if it passes the following criteria:
• The originator of a flow route matches the originator of the best match unicast route
for the destination address that is embedded in the route.
• There are no more specific unicast routes, when compared to the destination address
of the flow route, for which the active route has been received from a different next-hop
autonomous system.
The first criterion ensures that the filter is being advertised by the next-hop used by
unicast forwarding for the destination address embedded in the flow route. For example,
if a flow route is given as 10.1.1.1, proto=6, port=80, the receiving BGP-enabled device
selects the more specific unicast route in the unicast routing table that matches the
destination prefix 10.1.1.1/32. On a unicast routing table containing 10.1/16 and 10.1.1/24,
the latter is chosen as the unicast route to compare against. Only the active unicast route
entry is considered. This follows the concept that a flow route is valid if advertised by
the originator of the best unicast route.
The second criterion addresses situations in which a given address block is allocated to
different entities. Flows that resolve to a best-match unicast route that is an aggregate
route are only accepted if they do not cover more specific routes that are being routed
to different next-hop autonomous systems.
You can bypass the validation process and use your own specific import policy. To disable
the validation procedure and use an import policy instead, include the no-validate
statement at the [edit protocols bgp group group-name family inet flow] hierarchy level.
After a flow route is installed in the inetflow.0 table, it is also added to the list of firewall
filters in the kernel.
On routers only, flow-specification NLRI messages are supported in VPNs. The VPN
compares the route target extended community in the NLRI to the import policy. If there
is a match, the VPN can start using the flow routes to filter and rate-limit packet traffic.
Received flow routes are installed into the flow routing table instance-name.inetflow.0.
Flow routes can also be propagated throughout a VPN network and shared among VPNs.
To enable multiprotocol BGP (MP-BGP) to carry flow-specification NLRI for the inet-vpn
address family, include the flow statement at the [edit protocols bgp group group-name
family inet-vpn] hierarchy level. VPN flow routes are supported for the default instance
only. Flow routes configured for VPNs with family inet-vpn are not automatically validated,
so the no-validate statement is not supported at the [edit protocols bgp group group-name
family inet-vpn] hierarchy level. No validation is needed if the flow routes are configured
locally between devices in a single AS.
Import and export policies can be applied to the family inet flow or family inet-vpn flow
NLRI, affecting the flow routes accepted or advertised, similar to the way import and
export policies are applied to other BGP families. The only difference is that the flow
policy configuration must include the from rib inetflow.0 statement. This statement
causes the policy to be applied to the flow routes. An exception to this rule occurs if the
policy has only the then reject or the then accept statement and no from statement. Then,
the policy affects all routes, including IP unicast and IP flow.
• A policy that allows the advertisement of flow routes specified by a route-filter. Only
the flow routes covered by the 10.13/16 block are advertised. This policy does not affect
unicast routes.
• A policy that allows all unicast and flow routes to be advertised to the neighbor.
• A policy that disallows all routes (unicast or flow) to be advertised to the neighbor.
Configuration
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
Step-by-Step The following example requires that you navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
In the default term ordering algorithm, as specified in the flowspec RFC draft Version
6, a term with less specific matching conditions is always evaluated before a term
with more specific matching conditions. This causes the term with more specific
matching conditions to never be evaluated. Version 7 of RFC 5575 made a revision
to the algorithm so that the more specific matching conditions are evaluated before
the less specific matching conditions. For backward compatibility, the default
behavior is not altered in Junos OS, even though the newer algorithm makes more
sense. To use the newer algorithm, include the term-order standard statement in
the configuration. This statement is supported in Junos OS Release 10.0 and later.
Results From configuration mode, confirm your configuration by entering the show routing-options
command. If the output does not display the intended configuration, repeat the
instructions in this example to correct the configuration.
[edit]
user@host# show routing-options
flow {
term-order standard;
route block-10.131.1.1 {
match {
destination 10.131.1.1/32;
protocol icmp;
icmp-type echo-request;
}
then discard;
}
}
If you are done configuring the device, enter commit from configuration mode.
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
Step-by-Step The following example requires that you navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
[edit routing-options]
user@host# set autonomous-system 65001
Results From configuration mode, confirm your configuration by entering the show protocols,
show policy-options, and show routing-options commands. If the output does not display
the intended configuration, repeat the instructions in this example to correct the
configuration.
[edit]
user@host# show protocols
bgp {
group core {
family inet {
unicast;
flow;
}
export p1;
peer-as 65000;
neighbor 10.12.99.5;
}
}
[edit]
[edit]
user@host# show routing-options
autonomous-system 65001;
If you are done configuring the device, enter commit from configuration mode.
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
Step-by-Step The following example requires that you navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
[edit routing-options]
Results From configuration mode, confirm your configuration by entering the show protocols,
show policy-options, and show routing-options commands. If the output does not display
the intended configuration, repeat the instructions in this example to correct the
configuration.
[edit]
user@host# show protocols
bgp {
group core {
family inet {
unicast;
flow;
}
export p1;
peer-as 65000;
neighbor 10.12.99.5;
}
}
[edit]
user@host# show policy-options
policy-statement p1 {
term a {
then accept;
}
}
[edit]
user@host# show routing-options
autonomous-system 65001;
If you are done configuring the device, enter commit from configuration mode.
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
Step-by-Step The following example requires that you navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
[edit routing-options]
user@host# set autonomous-system 65001
Results From configuration mode, confirm your configuration by entering the show protocols,
show policy-options, and show routing-options commands. If the output does not display
the intended configuration, repeat the instructions in this example to correct the
configuration.
[edit]
user@host# show protocols
bgp {
group core {
family inet {
unicast;
flow;
}
export p1;
peer-as 65000;
neighbor 10.12.99.5;
}
}
[edit]
user@host# show policy-options
policy-statement p1 {
term a {
then reject;
}
}
[edit]
user@host# show routing-options
autonomous-system 65001;
If you are done configuring the device, enter commit from configuration mode.
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
Step-by-Step The following example requires that you navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
1. Set an upper limit for the number of prefixes installed in inetflow.0 table.
2. Set a threshold value of 50 percent, where when 500 routes are installed, a warning
is logged in the system log.
Results From configuration mode, confirm your configuration by entering the show routing-options
command. If the output does not display the intended configuration, repeat the
instructions in this example to correct the configuration.
[edit]
user@host# show routing-options
rib inetflow.0 {
maximum-prefixes 1000 threshold 50;
}
If you are done configuring the device, enter commit from configuration mode.
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
set protocols bgp group x1 neighbor 10.12.99.2 family inet flow prefix-limit maximum 1000
set protocols bgp group x1 neighbor 10.12.99.2 family inet flow prefix-limit teardown 50
Step-by-Step The following example requires that you navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
Configuring a prefix limit for a specific neighbor provides more predictable control over
which peer can advertise how many flow routes.
2. Configure the neighbor session to be brought down when the maximum number of
prefixes is reached.
If you specify a percentage, as shown here, messages are logged when the number
of prefixes reaches that percentage.
After the session is brought down, the session reestablishes in a short time unless
you include the idle-timeout statement.
Results From configuration mode, confirm your configuration by entering the show protocols
command. If the output does not display the intended configuration, repeat the
instructions in this example to correct the configuration.
[edit]
user@host# show protocols
bgp {
group x1 {
neighbor 10.12.99.2 {
flow {
prefix-limit {
maximum 1000;
teardown 50;
}
}
}
}
}
}
If you are done configuring the device, enter commit from configuration mode.
Verification
Action From operational mode, run the show bgp neighbor 10.12.99.5 command. Look for inet-flow
in the output.
Verifying Routes
Purpose Look at the flow routes. The sample output shows a flow route learned from BGP and a
statically configured flow route.
For locally configured flow routes (configured at the [edit routing-options flow] hierarchy
level), the routes are installed by the flow protocol. Therefore, you can display the flow
routes by specifying the table, as in show route table inetflow.0 or show route table
instance-name.inetflow.0, where instance-name is the routing instance name. Or, you can
display all locally configured flow routes across multiple routing instances by running
the show route protocol flow command.
If a flow route is not locally configured, but received from the router’s BGP peer, this flow
route is installed in the routing table by BGP. You can display the flow routes by specifying
the table or by running show route protocol bgp, which displays all BGP routes (flow and
non-flow).
Action From operational mode, run the show route table inetflow.0 command.
10.12.44.1,*/term:1
*[Flow/5] 00:04:22
Fictitious
*,10.12.44.1/term:2
*[Flow/5] 00:09:34
Fictitious
Meaning A flow route represents a term of a firewall filter. When you configure a flow route, you
specify the match conditions and the actions. In the match attributes, you can match a
source address, a destination address, and other qualifiers such as the port and the
protocol. For a single flow route that contains multiple match conditions, all the match
conditions are encapsulated in the prefix field of the route. When you issue the show
route command on a flow route, the prefix field of the route is displayed with all of the
match conditions. 10.12.44.1,* means that the matching condition is match destination
10.12.44.1/32. If the prefix in the output were *,10.12.44.1, this would mean that the match
condition was match source 10.12.44.1/32. If the matching conditions contain both a source
and a destination, the asterisk is replaced with the address.
The term-order numbers indicate the sequence of the terms (flow routes) being evaluated
in the firewall filter. The show route extensive command displays the actions for each
term (route).
Action From operational mode, run the show route flow validation detail command.
Purpose Display the firewall filters that are installed in the kernel.
Verifying System Logging When Exceeding the Number of Allowed Flow Routes
Purpose If you configure a limit on the number of flow routes installed, as described in “Limiting
the Number of Flow Routes Installed in a Routing Table” on page 1210, view the system
log message when the threshold is reached.
Action From operational mode, run the show log <log-filename> command.
Verifying System Logging When Exceeding the Number of Prefixes Received on a BGP
Peering Session
Purpose If you configure a limit on the number of flow routes installed, as described in “Limiting
the Number of Prefixes Received on a BGP Peering Session” on page 1210, view the system
log message when the threshold is reached.
Action From operational mode, run the show log <log-filename> command.
family {
l2vpn {
signaling {
prefix-limit {
maximum number;
teardown <percentage> <idle-timeout (forever | minutes)>;
}
}
}
}
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
prefix-limit {
maximum number;
teardown <percentage> <idle-timeout (forever | minutes)>;
}
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
When you set the maximum number of prefixes, a message is logged when that number
is reached. If you include the teardown statement, the session is torn down when the
maximum number of prefixes is reached. If you specify a percentage, messages are logged
when the number of prefixes reaches that percentage. Once the session is torn down, it
is reestablished in a short time. Include the idle-timeout statement to keep the session
down for a specified amount of time, or forever. If you specify forever, the session is
reestablished only after you use the clear bgp neighbor command.
CLNS is a Layer 3 protocol similar to IP version 4 (IPv4). CLNS uses network service
access points (NSAPs) to address end systems. This allows for a seamless autonomous
system (AS) based on International Organization for Standardization (ISO) NSAPs.
A single routing domain consisting of ISO NSAP devices are considered to be CLNS
islands. CLNS islands are connected together by VPNs.
You can configure BGP to exchange ISO CLNS routes between PE routers connecting
various CLNS islands in a VPN using multiprotocol BGP extensions. These extensions
are the ISO VPN NLRIs.
Each CLNS network island is treated as a separate VPN routing and forwarding instance
(VRF) instance on the PE router.
You can configure CLNS on the global level, group level, and neighbor level.
Requirements
Before you begin, configure the network interfaces. See the Junos OS Interfaces
Configuration Guide for Security Devices.
Overview
In this example, you create the BGP group called pedge-pedge, define the BGP peer
neighbor address for the group as 10.255.245.215, and define the BGP family.
Configuration
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
1. Configure the BGP group and define the BGP peer neighbor address.
[edit]
user@host# commit
Verification
Action From operational mode, run the show bgp neighbor 10.255.245.213 command. Look for
iso-vpn-unicast in the output.
A single routing domain consisting of ISO NSAP devices are considered to be CLNS
islands. CLNS islands are connected together by VPNs.
You can configure BGP to exchange ISO CLNS routes between provider edge (PE) routers
connecting various CLNS islands in a virtual private network (VPN) using multiprotocol
BGP extensions. These extensions are the ISO VPN NLRIs.
To enable multiprotocol BGP (MP-BGP) to carry CLNS VPN NLRIs, include the iso-vpn
statement:
iso-vpn {
unicast {
prefix-limit number;
rib-group group-name;
}
}
To limit the number of prefixes from a peer, include the prefix-limit statement. To specify
a routing table group, include the rib-group statement.
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
Each CLNS network island is treated as a separate VRF instance on the PE router.
You can configure CLNS on the global level, group level, and neighbor level.
On Router 1:
[edit protocols bgp]
protocols {
bgp {
local-address 10.255.245.195;
group pe-pe {
type internal;
neighbor 10.255.245.194 {
family iso-vpn {
unicast;
}
}
}
}
}
[edit routing-instances]
routing-instances {
aaaa {
instance-type vrf;
interface fe-0/0/0.0;
interface so-1/1/0.0;
interface lo0.1;
route-distinguisher 10.255.245.194:1;
vrf-target target:11111:1;
protocols {
isis {
export dist-bgp;
no-ipv4-routing;
no-ipv6-routing;
clns-routing;
interface all;
}
}
}
}
On Router 2:
[edit protocols bgp]
protocols {
bgp {
group pe-pe {
type internal;
local-address 10.255.245.198;
family route-target;
neighbor 10.255.245.194 {
family iso-vpn {
unicast;
}
}
}
}
}
[edit routing-instances]
routing-instances {
aaaa {
instance-type vrf;
interface lo0.1;
interface so-0/1/2.0;
interface so-0/1/3.0;
route-distinguisher 10.255.245.194:1;
vrf-target target:11111:1;
routing-options {
rib aaaa.iso.0 {
static {
iso-route 47.0005.80ff.f800.0000.bbbb.1022/104 next-hop
47.0005.80ff.f800.0000.aaaa.1000.1921.6800.4196.00;
}
}
}
protocols {
isis {
export dist-bgp;
no-ipv4-routing;
no-ipv6-routing;
clns-routing;
interface all;
}
}
}
}
On Route Reflector:
[edit protocols bgp]
protocols {
bgp {
group pe-pe {
type internal;
local-address 10.255.245.194;
family route-target;
neighbor 10.255.245.195 {
cluster 0.0.0.1;
}
neighbor 10.255.245.198 {
cluster 0.0.0.1;
}
}
}
}
On PE Router 1:
[edit protocols bgp]
protocols {
mpls {
interface all;
}
bgp {
group asbr {
type external;
local-address 10.245.245.3;
neighbor 10.245.245.1 {
multihop;
family iso-vpn {
unicast;
}
peer-as 200;
}
}
}
}
[edit routing-instances]
routing-instances {
aaaa {
instance-type vrf;
interface lo0.1;
interface t1-3/0/0.0;
interface fe-5/0/1.0;
route-distinguisher 10.245.245.1:1;
vrf-target target:11111:1;
protocols {
isis {
export dist-bgp;
no-ipv4-routing;
no-ipv6-routing;
clns-routing;
interface all;
}
}
}
}
On PE Router 2:
[edit protocols bgp]
protocols {
bgp {
group asbr {
type external;
multihop;
family iso-vpn {
unicast;
}
neighbor 10.245.245.2 {
peer-as 300;
}
neighbor 10.245.245.3 {
peer-as 100;
}
}
}
}
[edit routing-instances]
routing-instances {
aaaa {
instance-type vrf;
interface lo0.1;
route-distinguisher 10.245.245.1:1;
vrf-target target:11111:1;
}
}
On PE Router 3:
[edit protocols bgp]
protocols {
bgp {
group asbr {
type external;
multihop;
local-address 10.245.245.2;
neighbor 10.245.245.1 {
family iso-vpn {
unicast;
}
peer-as 200;
}
}
}
}
[edit routing-instances]
routing-instances {
aaaa {
instance-type vrf;
interface lo0.1;
interface fe-0/0/1.0;
interface t1-3/0/0.0;
route-distinguisher 10.245.245.1:1;
vrf-target target:11111:1;
protocols {
isis {
export dist-bgp;
no-ipv6-routing;
clns-routing;
interface all;
}
}
}
}
For detailed information about the security issues associated with BGP’s use of TCP as
a transport protocol, see RFC 4272, BGP Security Vulnerabilities Analysis.
Example: Configuring a Filter to Block TCP Access to a Port Except from Specified BGP Peers
This example shows how to configure a standard stateless firewall filter that limits certain
TCP and Internet Control Message Protocol (ICMP) traffic destined for the Routing Engine.
Requirements
No special configuration beyond device initialization is required before you configure this
example.
Overview
In this example, you create a stateless firewall filter that blocks all TCP connection
attempts to port 179 from all requesters except the specified BGP peers.
The stateless firewall filter filter_bgp179 matches all packets from the directly connected
interfaces on Device A and Device B to the destination port number 179.
Figure 69 on page 1224 shows the topology used in this example. Device C attempts to
make a TCP connection to Device E. Device E blocks the connection attempt. This example
shows the configuration on Device C and Device E.
10.2 A
AS 22
10.1
AS 17 E 10.5 10.6 B
10.9
10.10
g040870
Configuration
The following example requires that you navigate various levels in the configuration
hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode.
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
Configuring Device E
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
To configure the stateless firewall filter that blocks all TCP connection attempts to
port 179 from all requestors except specified BGP peers:
2. Configure BGP.
[edit routing-options]
user@E# set autonomous-system 17
4. Define the filter term that accepts TCP connection attempts to port 179 from the
specified BGP peers.
5. Define the other filter term to reject packets from other sources.
Results From configuration mode, confirm your configuration by entering the show firewall, show
interfaces, show protocols, and show routing-options commands. If the output does not
display the intended configuration, repeat the instructions in this example to correct the
configuration.
filter {
input filter_bgp179;
}
address 192.168.0.1/32;
}
}
}
ge-1/2/0 {
unit 0 {
description to-A;
family inet {
address 10.10.10.1/30;
}
}
}
ge-1/2/1 {
unit 5 {
description to-B;
family inet {
address 10.10.10.5/30;
}
}
}
ge-1/0/0 {
unit 9 {
description to-C;
family inet {
address 10.10.10.9/30;
}
}
}
If you are done configuring the device, enter commit from configuration mode.
Repeat the procedure, where appropriate, for every BGP-enabled device in the network,
using the appropriate interface names and addresses for each BGP-enabled device.
Verification
Purpose Make sure that the filter is listed in output of the show firewall filter command.
Action From operational mode, run the show system connections extensive command on Device C
and Device E.
The output on Device C shows the attempt to establish a TCP connection. The output
on Device E shows that connections are established with Device A and Device B only.
Purpose Compare the traffic on an interface that establishes a TCP connection with the traffic
on an interface that does not establish a TCP connection.
Action From operational mode, run the monitor traffic command on the Device E interface to
Device B and on the Device E interface to Device C. In the first example, acknowledgment
(ack) messages are received. In the second example, ack messages are not received.
Example: Configuring a Filter to Limit TCP Access to a Port Based On a Prefix List
This example shows how to configure a standard stateless firewall filter that limits certain
TCP and Internet Control Message Protocol (ICMP) traffic destined for the Routing Engine:
Requirements
Overview
In this example, you create a stateless firewall filter that blocks all TCP connection
attempts to port 179 from all requesters except the specified BGP peers.
The source prefix list plist_bgp179 specifies the list of source prefixes that contain allowed
BGP peers.
The stateless firewall filter filter_bgp179 matches all packets from the source prefix list
plist_bgp179 to the destination port number 179.
Configuration
The following example requires you to navigate various levels in the configuration
hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode.
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
set policy-options prefix-list plist_bgp179 apply-path "protocols bgp group <*> neighbor
<*>"
set firewall family inet filter filter_bgp179 term 1 from source-address 0.0.0.0/0
set firewall family inet filter filter_bgp179 term 1 from source-prefix-list plist_bgp179 except
set firewall family inet filter filter_bgp179 term 1 from destination-port bgp
set firewall family inet filter filter_bgp179 term 1 then reject
set firewall family inet filter filter_bgp179 term 2 then accept
set interfaces lo0 unit 0 family inet filter input filter_bgp179
set interfaces lo0 unit 0 family inet address 127.0.0.1/32
• Define the filter term that rejects TCP connection attempts to port 179 from all
requesters except the specified BGP peers.
Results From configuration mode, confirm your configuration by entering the show firewall, show
interfaces ,and show policy-options commands. If the output does not display the intended
configuration, repeat the instructions in this example to correct the configuration.
source-prefix-list {
plist_bgp179 except;
}
destination-port bgp;
}
then {
reject;
}
}
term 2 {
then {
accept;
}
}
}
}
If you are done configuring the device, enter commit from configuration mode.
Repeat the procedure, where appropriate, for every BGP-enabled device in the network,
using the appropriate interface names and addresses for each BGP-enabled device.
Verification
Purpose Verify that the firewall filter filter_bgp179 is applied to the IPv4 input traffic at logical
interface lo0.0.
Action Use the show interfaces statistics operational mode command for logical interface lo0.0,
and include the detail option. Under the Protocol inet section of the command output
section, the Input Filters field displays the name of the stateless firewall filter applied
to the logical interface in the input direction:
[edit]
user@host> show interfaces statistics lo0.0 detail
Logical interface lo0.0 (Index 321) (SNMP ifIndex 16) (Generation 130)
Flags: SNMP-Traps Encapsulation: Unspecified
Traffic statistics:
Input bytes : 0
Output bytes : 0
Input packets: 0
Output packets: 0
Local statistics:
Input bytes : 0
Output bytes : 0
Input packets: 0
Output packets: 0
Transit statistics:
Input bytes : 0 0 bps
Output bytes : 0 0 bps
Input packets: 0 0 pps
Output packets: 0 0 pps
Protocol inet, MTU: Unlimited, Generation: 145, Route table: 0
Flags: Sendbcast-pkt-to-re
Input Filters: filter_bgp179
Addresses, Flags: Primary
Destination: Unspecified, Local: 127.0.0.1, Broadcast: Unspecified,
Generation: 138
Requirements
No special configuration beyond device initialization is required before you configure this
example.
Overview
TCP negotiates a maximum segment size (MSS) value during session connection
establishment between two peers. The MSS value negotiated is primarily based on the
maximum transmission unit (MTU) of the interfaces to which the communicating peers
are directly connected. However in the network, due to variation in link MTU on the path
taken by the TCP packets, some packets that are well within the MSS value might be
fragmented when the packet size exceeds the link's MTU.
TCP path MTU discovery helps avoid BGP packet fragmentation. However, enabling TCP
path MTU discovery creates ICMP vulnerability. To prevent these ICMP vulnerability
issues, you can configure the TCP MSS globally, or for each BGP peer to prevent
fragmentation of packets sent to the BGP peer from the local routing device and sent by
the BGP peer to the local routing device.
To configure the TCP MSS value, include the tcp-mss statement with a segment size
from 1 through 4096.
If the router receives a TCP packet with the SYN bit and MSS option set and the MSS
option specified in the packet is larger than the MSS value specified by the tcp-mss
statement, the router replaces the MSS value in the packet with the lower value specified
by the tcp-mss statement.
The configured MSS value is used as the maximum segment size for the sender. The
assumption is that the TCP MSS value used by the sender to communicate with the BGP
neighbor is the same as the TCP MSS value that the sender can accept from the BGP
neighbor. If the MSS value from the BGP neighbor is less than the MSS value configured,
the MSS value from the BGP neighbor is used as the maximum segment size for the
sender.
This feature is supported with TCP over IPv4 and TCP over IPv6.
Topology Diagram
g041159
BGP Session
Configuration
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
Step-by-Step The following example requires that you navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
[edit interfaces]
user@R0# set fe-1/2/0 unit 1 family inet address 1.1.0.1/30
user@R0# set lo0 unit 1 family inet address 10.255.14.179/32
5. Configure the BGP neighbors, with the TCP MSS set globally for the group or
specifically for the various neighbors.
[edit routing-options]
user@R0# set autonomous-system 65000
Results From configuration mode, confirm your configuration by entering the show interfaces,
show protocols, and show routing-options commands. If the output does not display the
intended configuration, repeat the instructions in this example to correct the configuration.
family inet {
address 10.255.14.179/32;
}
}
}
If you are done configuring the device, enter commit from configuration mode.
Repeat the procedure, where appropriate, for every BGP-enabled device in the network,
using the appropriate interface names and addresses for each BGP-enabled device.
Verification
To confirm that the configuration is working properly, run the following commands:
• monitor traffic interface, to monitor BGP traffic and to make sure that the configured
TCP MSS value is used as the MSS option in TCP SYN packet
When configuring BGP routing policy, you can perform the following tasks:
You define routing policy at the [edit policy-options] hierarchy level. To apply policies
you have defined for BGP, include the import and export statements within the BGP
configuration. For information about defining policy, see the Junos OS Routing Policy
Configuration Guide.
• BGP global import and export statements—Include these statements at the [edit
protocols bgp] hierarchy level (for routing instances, include these statements at the
[edit routing-instances routing-instance-name protocols bgp] hierarchy level).
• Group import and export statements—Include these statements at the [edit protocols
bgp group group-name] hierarchy level (for routing instances, include these statements
at the [edit routing-instances routing-instance-name protocols bgp group group-name]
hierarchy level).
• Peer import and export statements—Include these statements at the [edit protocols
bgp group group-name neighbor address] hierarchy level (for routing instances, include
these statements at the [edit routing-instances routing-instance-name protocols bgp
group group-name neighbor address] hierarchy level).
• Applying Policies to Routes Being Imported into the Routing Table from BGP on page 1237
• Applying Policies to Routes Being Exported from the Routing Table into BGP on page 1237
Applying Policies to Routes Being Imported into the Routing Table from BGP
To apply policy to routes being imported into the routing table from BGP, include the
import statement, listing the names of one or more policies to be evaluated:
import [ policy-names ];
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
If you specify more than one policy, they are evaluated in the order specified, from first
to last, and the first matching filter is applied to the route. If no match is found, BGP
places into the routing table only those routes that were learned from BGP routing devices.
Applying Policies to Routes Being Exported from the Routing Table into BGP
To apply policy to routes being exported from the routing table into BGP, include the
export statement, listing the names of one or more policies to be evaluated:
export [ policy-names ];
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
If you specify more than one policy, they are evaluated in the order specified, from first
to last, and the first matching filter is applied to the route. If no routes match the filters,
the routing table exports into BGP only the routes that it learned from BGP.
By default, BGP stores the route information it receives from update messages in the
Junos OS routing table, and the routing table exports only active routes into BGP, which
BGP then advertises to its peers. To have the routing table export to BGP the best route
learned by BGP even if Junos OS did not select it to be an active route, include the
advertise-inactive statement:
advertise-inactive;
For a list of hierarchy levels at which you can include this statement, see the statement
summary section for this statement.
In general, deployed BGP implementations do not advertise the external route with the
highest local preference value to internal peers unless it is the best route. Although this
behavior was required by an earlier version of the BGP version 4 specification, RFC 1771,
it was typically not followed in order to minimize the amount of advertised information
and to prevent routing loops. However, there are scenarios in which advertising the best
external route is beneficial, in particular, situations that can result in IBGP route oscillation.
In Junos OS Release 9.3 and later, you can configure BGP to advertise the best external
route into an internal BGP (IBGP) mesh group, a route reflector cluster, or an autonomous
system (AS) confederation, even when the best route is an internal route.
When a routing device is configured as a route reflector for a cluster, a route advertised
by the route reflector is considered internal if it is received from an internal peer with the
same cluster identifier or if both peers have no cluster identifier configured. A route
received from an internal peer that belongs to another cluster, that is, with a different
cluster identifier, is considered external.
You can also configure BGP to advertise the external route only if the route selection
process reaches the point where the multiple exit discriminator (MED) metric is evaluated.
As a result, an external route with an AS path worse (that is, longer) than that of the
active path is not advertised.
Junos OS also provides support for configuring a BGP export policy that matches on the
state of an advertised route. You can match on either active or inactive routes. For more
information, see the Junos OS Routing Policy Configuration Guide.
To configure BGP to advertise the best external path to internal peers, include the
advertise-external statement:
advertise-external;
For a complete list of hierarchy levels at which you can configure this
statement, see the statement summary section for this statement.
To configure BGP to advertise the best external path only if the route selection process
reaches the point where the MED value is evaluated, include the conditional statement:
advertise-external {
conditional;
}
For a complete list of hierarchy levels at which you can configure this statement, see the
statement summary section for this statement.
Configuring How Often BGP Exchanges Routes with the Routing Table
BGP stores the route information it receives from update messages in the routing table,
and the routing table exports active routes from the routing table into BGP. BGP then
advertises the exported routes to its peers. By default, the exchange of route information
between BGP and the routing table occurs immediately after the routes are received.
This immediate exchange of route information might cause instabilities in the network
reachability information. To guard against this, you can delay the time between when
BGP and the routing table exchange route information.
To configure how often BGP and the routing table exchange route information, include
the out-delay statement:
out-delay seconds;
By default, the routing table retains some of the route information learned from BGP. To
have the routing table retain all or none of this information, include the keep statement:
For a list of hierarchy levels at which you can include these statements, see the statement
summary sections for these statements.
The routing table can retain the route information learned from BGP in one of the following
ways:
• Default (omit the keep statement)—Keep all route information that was learned from
BGP, except for routes whose AS path is looped and whose loop includes the local AS.
• keep all—Keep all route information that was learned from BGP.
• keep none—Discard routes that were received from a peer and that were rejected by
import policy or other sanity checking, such as AS path or next hop. When you configure
keep none for the BGP session and the inbound policy changes, Junos OS forces
readvertisement of the full set of routes advertised by the peer.
In an AS path healing situation, routes with looped paths theoretically could become
usable during a soft reconfiguration when the AS path loop limit is changed. However,
there is a significant memory usage difference between the default and keep all because
it is common for a peer to readvertise routes back to the peer from which it learned them.
The default behavior is not to waste memory on such routes.
Junos OS does not advertise the routes learned from one EBGP peer back to the same
external BGP (EBGP) peer. In addition, the software does not advertise those routes back
to any EBGP peers that are in the same AS as the originating peer, regardless of the
routing instance. You can modify this behavior by including the advertise-peer-as
statement in the configuration. To disable the default advertisement suppression, include
the advertise-peer-as statement:
advertise-peer-as;
If you include the advertise-peer-as statement in the configuration, BGP advertises the
route regardless of this check.
no-advertise-peer-as;
For a list of hierarchy levels at which you can include these statements, see the statement
summary section for these statements.
Requirements
Overview
You can configure a BGP peer to accept route filters from remote peers and perform
outbound route filtering using the received filters. By filtering out unwanted updates, the
sending peer saves resources needed to generate and transmit updates, and the receiving
peer saves resources needed to process updates. This feature can be useful, for example,
in a virtual private network (VPN) in which subsets of customer edge (CE) devices are
not capable of processing all the routes in the VPN. The CE devices can use prefix-based
outbound route filtering to communicate to the provider edge (PE) routing device to
transmit only a subset of routes, such as routes to the main data centers only.
The maximum number of prefix-based outbound route filters that a BGP peer can accept
is 5000. If a remote peer sends more than 5000 outbound route filters to a peer address,
the additional filters are discarded, and a system log message is generated.
You can configure interoperability for the routing device as a whole or for specific BGP
groups or peers only.
Topology
In the sample network, Device CE1 is a router from another vendor. The configuration
shown in this example is on Juniper Networks Router PE1.
Other Vendor
CE2 CE4
g041113
Configuration
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
Step-by-Step The following example requires that you navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
To configure Router PE1 to accept route filters from Device CE1 and perform outbound
route filtering using the received filters:
[edit routing-options]
user@PE1# set autonomous-system 65500
3. Configure Router PE1 to accept IPv4 route filters from Device CE1 and perform
outbound route filtering using the received filters.
4. (Optional) Enable interoperability with routing devices that use the vendor-specific
compatibility code of 130 for outbound route filters and the code type of 128.
The IANA standard code is 3, and the standard code type is 64.
Results From configuration mode, confirm your configuration by entering the show protocols and
show routing-options commands. If the output does not display the intended configuration,
repeat the instructions in this example to correct the configuration.
If you are done configuring the device, enter commit from configuration mode.
Verification
Purpose Display information about the prefix-based outbound route filter received from Device CE1.
Action From operational mode, enter the show bgp neighbor orf detail command.
inet-unicast
Filter updates recv: 4 Immediate: 0
Filter: prefix-based receive
Updates recv: 4
Received filter entries:
seq 10 2.2.0.0/16 deny minlen 0 maxlen 0
seq 20 3.3.0.0/16 deny minlen 24 maxlen 0
seq 30 4.4.0.0/16 deny minlen 0 maxlen 28
seq 40 5.5.0.0/16 deny minlen 24 maxlen 28
Purpose Verify that the bgp-orf-cisco-mode setting is enabled for the peer by making sure that
the ORFCiscoMode option is displayed in the show bgp neighbor command output.
Action From operational mode, enter the show bgp neighbor command.
In Junos OS Release 8.3 and later, BFD is supported on internal BGP (IBGP) and multihop
external BGP (EBGP) sessions as well as on single-hop EBGP sessions. In Junos OS
Release 9.1 through Junos OS Release 11.1, BFD supports IPv6 interfaces in static routes
only. In Junos OS Release 11.2 and later, BFD supports IPv6 interfaces with BGP.
Requirements
No special configuration beyond device initialization is required before you configure this
example.
Overview
Optionally, you can specify the minimum transmit and receive intervals separately using
the minimum-receive-interval and transmit-interval minimal-interval statements. For
information about these and other optional BFD configuration statements, see
bfd-liveness-detection.
BFD is supported on the default routing instance (the main router), routing instances,
and logical systems. This example shows BFD on logical systems.
Figure 72 on page 1245 shows a typical network with internal peer sessions.
192.168.6.5
AS 17 A
192.163.6.4
C B
192.168.40.4
g040732
Configuration
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
Configuring Device A
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
To configure Device A:
3. Configure BGP.
The neighbor statements are included for both Device B and Device C, even though
Device A is not directly connected to Device C.
4. Configure BFD.
You must configure the same minimum interval on the connecting peer.
You must configure the same minimum interval on the connecting peer.
6. Configure OSPF.
Other useful options for this scenario might be to accept routes learned through
OSPF or local routes.
[edit routing-options]
user@host:A# set router-id 192.168.6.5
user@host:A# set autonomous-system 17
Results From configuration mode, confirm your configuration by entering the show interfaces,
show policy-options, show protocols, and show routing-options commands. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
file bgp-bfd;
flag bfd detail;
}
local-address 192.168.6.5;
export send-direct;
bfd-liveness-detection {
minimum-interval 1000;
}
neighbor 192.163.6.4;
neighbor 192.168.40.4;
}
}
ospf {
area 0.0.0.0 {
interface lo0.1 {
passive;
}
interface lt-1/2/0.1;
}
}
If you are done configuring the device, enter commit from configuration mode.
Repeat these steps for all BFD sessions in the topology.
Verification
Action From operational mode, enter the show bgp neighbor command. You can use the | match
bfd filter to narrow the output.
Meaning The output shows that Logical System A has two neighbors with BFD enabled. When
BFD is not enabled, the output says BFD: disabled, down, and the <BfdEnabled> option
is absent. If BFD is enabled and the session is down, the output is BFD: enabled, down.
The output also shows that BFD-related events are being written to a log file because
trace operations are configured.
Purpose Verify that the BFD sessions are up, and view details about the BFD sessions.
Action From operational mode, enter the show bfd session extensive command.
Detect Transmit
Address State Interface Time Interval Multiplier
192.168.40.4 Up 3.000 1.000 3
Client BGP, TX interval 1.000, RX interval 1.000
Session up time 00:48:03
Local diagnostic None, remote diagnostic None
Remote state Up, version 1
Logical system 12, routing table index 25
Min async interval 1.000, min slow interval 1.000
Adaptive async TX interval 1.000, RX interval 1.000
Local min TX interval 1.000, minimum RX interval 1.000, multiplier 3
Remote min TX interval 1.000, min RX interval 1.000, multiplier 3
Local discriminator 14, remote discriminator 13
Echo mode disabled/inactive
Multi-hop route table 25, local-address 192.168.6.5
2 sessions, 2 clients
Cumulative transmit rate 2.0 pps, cumulative receive rate 2.0 pps
Meaning The TX interval 1.000, RX interval 1.000 output represents the setting configured with the
minimum-interval statement. All of the other output represents the default settings for
BFD. To modify the default settings, include the optional statements under the
bfd-liveness-detection statement.
Action From operational mode, enter the file show /var/log/A/bgp-bfd command.
Meaning Before the routes are established, the No route to host message appears in the output.
After the routes are established, the last two lines show that both BFD sessions come
up.
Viewing Detailed BFD Events After Deactivating and Reactivating a Loopback Interface
Purpose Check to see what happens after bringing down a router and then bringing it back up. To
simulate bringing down a router, deactivate the loopback interface on Logical System
B.
Action • From configuration mode, enter the deactivate logical-systems B interfaces lo0 unit 2
family inet command.
user@host# commit
...
Aug 15 17:20:55.995648 bgp_read_v4_message:9747: NOTIFICATION received
from 192.163.6.4 (Internal AS 17): code 6 (Cease) subcode 6 (Other
Configuration Change)
Aug 15 17:20:56.004508 Terminated BFD session to peer 192.163.6.4 (Internal
AS 17)
Aug 15 17:21:28.007755 task_connect: task BGP_17.192.163.6.4+179 addr
192.163.6.4+179: No route to host
Aug 15 17:21:28.008597 bgp_connect_start: connect 192.163.6.4 (Internal
AS 17): No route to host
• From configuration mode, enter the activate logical-systems B interfaces lo0 unit 2
family inet command.
user@host:A# commit
...
Aug 15 17:25:53.623743 advertising receiving-speaker only capabilty to
neighbor 192.163.6.4 (Internal AS 17)
Aug 15 17:25:53.631314 Initiated BFD session to peer 192.163.6.4 (Internal
AS 17): address=192.163.6.4 ifindex=0 ifname=(none) txivl=1000 rxivl=1000
mult=3 ver=255
Aug 15 17:25:57.570932 BFD session to peer 192.163.6.4 (Internal AS 17)
up
• keyed-md5—Keyed Message Digest 5 hash algorithm for sessions with transmit and
receive intervals greater than 100 ms. To authenticate the BFD session, keyed MD5
uses one or more secret keys (generated by the algorithm) and a sequence number
that is updated periodically. With this method, packets are accepted at the receiving
end of the session if one of the keys matches and the sequence number is greater than
or equal to the last sequence number received. Although more secure than a simple
password, this method is vulnerable to replay attacks. Increasing the rate at which the
sequence number is updated can reduce this risk.
• keyed-sha-1—Keyed Secure Hash Algorithm I for sessions with transmit and receive
intervals greater than 100 ms. To authenticate the BFD session, keyed SHA uses one
or more secret keys (generated by the algorithm) and a sequence number that is
updated periodically. The key is not carried within the packets. With this method,
packets are accepted at the receiving end of the session if one of the keys matches
and the sequence number is greater than the last sequence number received.
The security authentication keychain defines the authentication attributes used for
authentication key updates. When the security authentication keychain is configured and
associated with a protocol through the keychain name, authentication key updates can
occur without interrupting routing and signaling protocols.
The authentication keychain contains one or more keychains. Each keychain contains
one or more keys. Each key holds the secret data and the time at which the key becomes
valid. The algorithm and keychain must be configured on both ends of the BFD session,
and they must match. Any mismatch in configuration prevents the BFD session from
being created.
BFD allows multiple clients per session, and each client can have its own keychain and
algorithm defined. To avoid confusion, we recommend specifying only one security
authentication keychain.
The following sections provide instructions for configuring and viewing BFD authentication
on BGP:
BFD authentication can be configured for the entire BGP protocol, or a specific BGP group,
neighbor, or routing instance.
The following example requires you to navigate various levels in the configuration
hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
[edit]
user@host# set protocols bgp bfd-liveness-detection authentication algorithm
keyed-sha-1
user@host# set protocols bgp group bgp-gr1 bfd-liveness-detection authentication
algorithm keyed-sha-1
user@host# set protocols bgp group bgp-gr1 neighbor 10.10.10.7 bfd-liveness-detection
authentication algorithm keyed-sha-1
2. Specify the keychain to be used to associate BFD sessions on BGP with the unique
security authentication keychain attributes.
The keychain name you specify must match a keychain name configured at the [edit
security authentication key-chains] hierarchy level.
[edit]
user@host# set protocols bgp bfd-liveness-detection authentication keychain bfd-bgp
user@host# set protocols bgp group bgp-gr1 bfd-liveness-detection authentication
keychain bfd-bgp
user@host# set protocols bgp group bgp-gr1 neighbor 10.10.10.7 bfd-liveness-detection
authentication keychain bfd-bgp
• At least one key, a unique integer between 0 and 63. Creating multiple keys allows
multiple clients to use the BFD session.
[edit security]
[edit]
user@host# set protocols bgp bfd-liveness-detection authentication loose-check
user@host# set protocols bgp group bgp-gr1 bfd-liveness-detection authentication
loose-check
user@host# set protocols bgp group bgp-gr1 neighbor 10.10.10.7 bfd-liveness-detection
authentication loose-check
5. (Optional) View your configuration using the show bfd session detail or show bfd
session extensive command.
6. Repeat these steps to configure the other end of the BFD session.
You can view the existing BFD authentication configuration using the show bfd session
detail and show bfd session extensive commands.
The following example shows BFD authentication configured for the bgp-gr1 BGP group.
It specifies the keyed SHA-1 authentication algorithm and a keychain name of bfd-bgp.
The authentication keychain is configured with two keys. Key 1 contains the secret data
“$9$ggaJDmPQ6/tJgF/AtREVsyPsnCtUHm” and a start time of June 1, 2009, at 9:46:02
AM PST. Key 2 contains the secret data “$9$a5jiKW9l.reP38ny.TszF2/9” and a start time
of June 1, 2009, at 3:29:20 PM PST.
If you commit these updates to your configuration, you see output similar to the following.
In the output for the show bfd sessions detail command, Authenticate is displayed to
indicate that BFD authentication is configured. For more information about the
configuration, use the show bfd sessions extensive command. The output for this
command provides the keychain name, the authentication algorithm and mode for each
client in the session, and the overall BFD authentication configuration status, keychain
name, and authentication algorithm and mode.
Instead of advertising only the active path to a destination, you can configure BGP to
advertise multiple paths to the destination. Within an autonomous system (AS), the
availability of multiple exit points to reach a destination provides the following benefits:
• Fault tolerance—Path diversity leads to reduction in restoration time after failure. For
instance, a border router after receiving multiple paths to the same destination can
precompute a backup path and have it ready so that when the primary path becomes
invalid, the border router can use the backup to quickly restore connectivity. Without
a backup path, the restoration time depends on BGP reconvergence, which includes
withdraw and advertisement messages in the network before a new best path can be
learned.
• Internal BGP (IBGP) peers only. No support on external BGP (EBGP) peers.
• Prefix policies enable you to filter routes on a router that is configured to advertise
multiple paths to a destination. However, prefix policies can only match routes. Prefix
policies cannot change the attributes of routes.
Requirements
• Five of the BGP-enabled devices do not necessarily need to be routers. For example,
they can be EX Series Ethernet Switches.
• Three of the BGP-enabled devices are configured to send multiple paths or receive
multiple paths (or both send and receive multiple paths). These three BGP-enabled
devices must be M Series Multiservice Edge Routers, MX Series 3D Universal Edge
Routers, or T Series Core Routers.
Overview
In this example, Router R5, Router R6, and Router R7 redistribute static routes into BGP.
Router R1 and Router R4 are route reflectors. Router R2 and Router R3 are clients to
Route Reflector R1. Router R8 is a client to Route Reflector R4.
With the add-path receive configuration, Router R4 is configured to receive multiple paths
from Router R1.
With the add-path send path-count 6 configuration, Router R4 is also configured to send
up to six paths to Router R8.
With the add-path receive configuration, Router R8 is configured to receive multiple paths
from Router R4.
The add-path send prefix-policy allow_199 policy configuration (along with the
corresponding route filter) limits Router R4 to sending multiple paths for only the
199.1.1.1/32 route.
Topology Diagram
EBGP
R6 R2
IBGP
Route Reflector 2
EBGP IBGP
R7 R3 R1 R4 R8
Route
Reflector 1
EBGP
g040706
R5
Configuration
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
Configuring Router R1
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
1. Configure the interfaces to Router R2, Router R3, Router R5, and Router R4, and
configure the loopback (lo0) interface.
[edit interfaces]
user@R1# set fe-0/0/0 unit 12 family inet address 10.0.12.1/24
The destination of the paths can be any destination that Router R1 can reach through
multiple paths.
[edit routing-options]
user@R1# set router-id 10.0.0.10
user@R1# set autonomous-system 1
user@R1# commit
Results From configuration mode, confirm your configuration by entering the show interfaces,
show protocols, and show routing-options commands. If the output does not display the
intended configuration, repeat the instructions in this example to correct the configuration.
}
fe-1/0/0 {
unit 14 {
family inet {
address 10.0.14.1/24;
}
}
}
fe-1/2/0 {
unit 15 {
family inet {
address 10.0.15.1/24;
}
}
}
lo0 {
unit 10 {
family inet {
address 10.0.0.10/32;
}
}
}
area 0.0.0.0 {
interface lo0.10 {
passive;
}
interface fe-0/0/0.12;
interface fe-0/0/1.13;
interface fe-1/0/0.14;
interface fe-1/2/0.15;
}
}
Configuring Router R2
[edit interfaces]
user@R2# set fe-1/2/0 unit 21 family inet address 10.0.12.2/24
[edit protocols]
user@R2# set bgp group rr type internal
user@R2# set bgp group rr local-address 10.0.0.20
3. For routes sent from Router R2 to Router R1, advertise Router R2 as the next hop,
because Router R1 does not have a route to Router R6’s address on the 10.0.26.0/24
network.
[edit]
user@R2# set policy-options policy-statement set_nh_self then next-hop self
user@R2# set protocols bgp group rr neighbor 10.0.0.10 export set_nh_self
[edit]
user@R2# set routing-options autonomous-system 1
user@R2# commit
Results From configuration mode, confirm your configuration by entering the show interfaces,
show policy-options, show protocols, and show routing-options commands. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
area 0.0.0.0 {
interface lo0.20 {
passive;
}
interface fe-1/2/0.21;
interface fe-1/2/1.28;
}
}
Configuring Router R3
[edit interfaces]
user@R3# set fe-1/0/1 unit 31 family inet address 10.0.13.2/24
[edit protocols]
user@R3# set bgp group rr type internal
user@R3# set bgp group rr local-address 10.0.0.30
3. For routes sent from Router R3 to Router R1, advertise Router R3 as the next hop,
because Router R1 does not have a route to Router R7’s address on the 10.0.37.0/24
network.
[edit]
user@R3# set policy-options policy-statement set_nh_self then next-hop self
user@R3# set protocols bgp group rr neighbor 10.0.0.10 export set_nh_self
[edit]
user@R3# set routing-options autonomous-system 1
user@R3# commit
Results From configuration mode, confirm your configuration by entering the show interfaces,
show policy-options, show protocols, and show routing-options commands. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
interface fe-1/0/1.31;
interface fe-1/0/2.37;
}
}
Configuring Router R4
[edit interfaces]
user@R4# set fe-1/2/0 unit 41 family inet address 10.0.14.2/24
The destination of the paths can be any destination that Router R4 can reach through
multiple paths.
4. Configure Router R4 to receive multiple paths from its neighbor, Router R1.
The destination of the paths can be any destination that Router R1 can reach through
multiple paths.
6. Configure a policy that allows Router R4 to send Router R8 multiple paths to the
199.1.1.1/32 route.
Router R4 receives multiple paths for the 198.1.1.1/32 route and the 199.1.1.1/32 route.
However, because of this policy, Router R4 only sends multiple paths for the
199.1.1.1/32 route.
[edit]
user@R4# set protocols bgp group rr_client neighbor 10.0.0.80 family inet unicast
add-path send prefix-policy allow_199
user@R4# set policy-options policy-statement allow_199 from route-filter 199.1.1.1/32
exact
user@R4# set policy-options policy-statement allow_199 then accept
[edit routing-options]
user@R4# set autonomous-system 1
user@R4# commit
Results From configuration mode, confirm your configuration by entering the show interfaces,
policy-options, show protocols, and show routing-options commands. If the output does
not display the intended configuration, repeat the instructions in this example to correct
the configuration.
Configuring Router R5
[edit interfaces]
user@R5# set fe-1/2/0 unit 51 family inet address 10.0.15.2/24
[edit protocols]
user@R5# set bgp group e1 type external
user@R5# set bgp group e1 neighbor 10.0.15.1 peer-as 1
[edit]
user@R5# set routing-options static route 199.1.1.1/32 reject
user@R5# set routing-options static route 198.1.1.1/32 reject
[edit]
user@R5# set protocols bgp group e1 neighbor 10.0.15.1 export s2b
user@R5# set policy-options policy-statement s2b from protocol static
user@R5# set policy-options policy-statement s2b from protocol direct
user@R5# set policy-options policy-statement s2b then as-path-expand 2
user@R5# set policy-options policy-statement s2b then accept
[edit]
user@R5# set routing-options autonomous-system 2
user@R5# commit
Results From configuration mode, confirm your configuration by entering the show interfaces,
show policy-options, show protocols, and show routing-options commands. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
Configuring Router R6
[edit interfaces]
user@R6# set fe-1/2/0 unit 62 family inet address 10.0.26.2/24
[edit protocols]
user@R6# set bgp group e1 type external
user@R6# set bgp group e1 neighbor 10.0.26.1 peer-as 1
[edit]
user@R6# set routing-options static route 199.1.1.1/32 reject
user@R6# set routing-options static route 198.1.1.1/32 reject
4. Redistribute static and direct routes from Router R6’s routing table into BGP.
[edit]
user@R6# set protocols bgp group e1 neighbor 10.0.26.1 export s2b
user@R6# set policy-options policy-statement s2b from protocol static
user@R6# set policy-options policy-statement s2b from protocol direct
user@R6# set policy-options policy-statement s2b then accept
[edit]
user@R6# set routing-options autonomous-system 2
user@R6# commit
Results From configuration mode, confirm your configuration by entering the show interfaces,
show policy-options, show protocols, and show routing-options commands. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
Configuring Router R7
[edit interfaces]
user@R7# set fe-1/2/0 unit 73 family inet address 10.0.37.2/24
[edit protocols]
user@R7# set bgp group e1 type external
user@R7# set bgp group e1 neighbor 10.0.37.1 peer-as 1
[edit]
user@R7# set routing-options static route 199.1.1.1/32 reject
4. Redistribute static and direct routes from Router R7’s routing table into BGP.
[edit]
user@R7# set protocols bgp group e1 neighbor 10.0.37.1 export s2b
user@R7# set policy-options policy-statement s2b from protocol static
user@R7# set policy-options policy-statement s2b from protocol direct
user@R7# set policy-options policy-statement s2b then accept
[edit]
user@R7# set routing-options autonomous-system 2
user@R7# commit
Results From configuration mode, confirm your configuration by entering the show interfaces,
show policy-options, show protocols, and show routing-options commands. If the output
does not display the intended configuration, repeat the instructions in this example to
correct the configuration.
type external;
neighbor 10.0.37.1 {
export s2b;
peer-as 1;
}
}
}
Configuring Router R8
[edit interfaces]
user@R8# set fe-1/2/0 unit 84 family inet address 10.0.48.2/24
[edit protocols]
user@R8# set bgp group rr type internal
user@R8# set bgp group rr local-address 10.0.0.80
3. Configure Router R8 to receive multiple paths from its neighbor, Router R4.
The destination of the paths can be any destination that Router R4 can reach through
multiple paths.
[edit protocols]
user@R8# set bgp group rr neighbor 10.0.0.40 family inet unicast add-path receive
[edit]
user@R8# set routing-options autonomous-system 1
user@R8# commit
Results From configuration mode, confirm your configuration by entering the show interfaces,
show protocols, and show routing-options commands. If the output does not display the
intended configuration, repeat the instructions in this example to correct the configuration.
unit 84 {
family inet {
address 10.0.48.2/24;
}
}
}
lo0 {
unit 80 {
family inet {
address 10.0.0.80/32;
}
}
}
Verification
• Verifying That the BGP Peers Have the Ability to Send and Receive Multiple
Paths on page 1278
• Verifying That Router R1 Is Advertising Multiple Paths on page 1278
• Verifying That Router R4 Is Receiving and Advertising Multiple Paths on page 1279
• Verifying That Router R8 Is Receiving Multiple Paths on page 1279
• Checking the Path ID on page 1280
Verifying That the BGP Peers Have the Ability to Send and Receive Multiple Paths
Purpose Make sure that one or both of the following strings appear in the output of the show bgp
neighbor command:
Purpose Make sure that multiple paths to the 198.1.1.1/32 destination and multiple paths to the
199.1.1.1/32 destination are advertised to Router R4.
Meaning When you see one prefix and more than one next hop, it means that multiple paths are
advertised to Router R4.
Purpose Make sure that multiple paths to the 199.1.1.1/32 destination are received from Router R1
and advertised to Router R8. Make sure that multiple paths to the 198.1.1.1/32 destination
are received from Router R1, but only one path to this destination is advertised to Router
R8.
Meaning The show route receive-protocol command shows that Router R4 receives two paths to
the 198.1.1.1/32 destination and three paths to the 199.1.1.1/32 destination. The show route
advertising-protocol command shows that Router R4 advertises only one path to the
198.1.1.1/32 destination and advertises all three paths to the 199.1.1.1/32 destination.
Because of the prefix-policy that is applied to Router R4, Router R4 does not advertise
multiple paths to the 198.1.1.1/32 destination. Router R4 advertises only one path to the
198.1.1.1/32 destination even though it receives multiple paths to this destination.
Purpose Make sure that Router R8 receives multiple paths to the 199.1.1.1/32 destination through
Router R4. Make sure that Router R8 receives only one path to the 198.1.1.1/32 destination
through Router R4.
Purpose On the downstream devices, Router R4 and Router R8, verify that a path ID uniquely
identifies the path. Look for the Addpath Path ID: string.
The data is collected from the Adjacency-RIB-In routing tables. The Adjacency-RIB-In
tables are the pre-policy tables, meaning that the routes in these tables have not been
filtered or modified by routing policies.
Requirements
Overview
To configure the monitoring station to which BMP data is sent, you must configure both
the station-address and station-port statements. For the station address, you can specify
either the IP address or the name of the monitoring station. For name, specify a valid URL.
For the station port, specify a TCP port. BMP operates over TCP. The monitoring station
is configured to listen on a particular TCP port, and the router is configured to establish
an active connection to that port and to send messages on that TCP connection. You
configure BMP in the default routing instance only. However, BMP applies to routes in
the default routing instance and to routes in other routing instances.
You can optionally specify how often to send data to the monitoring station. The default
is 1 hour. To modify this interval, include the statistics-timeout seconds statement. For
seconds, you can specify a value from 15 through 65,535. By default, the routing device
stops collecting BMP data when it exceeds a threshold of 10 MB. You can modify the
value of this threshold by including the memory-limit bytes statement. For bytes, specify
a value from 1,048,576 to 52,428,800. If the routing device stops collecting BMP data
after exceeding the configured memory threshold, the router waits 10 minutes before
attempting to resume the BMP session.
Figure 74 on page 1283 shows a sample topology. In this example, BMP is configured on
Router PE1. The server address is 192.168.64.180. The listening TCP port on the server is
port 11019.
fxp0 fxp0
Configuration
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
To configure BMP:
[edit routing-options]
user@PE1# set bmp station-address 192.168.64.180
[edit routing-options]
user@PE1# set bmp station-port 11019
Results From configuration mode, confirm your configuration by entering the show routing-options
command. If the output does not display the intended configuration, repeat the
instructions in this example to correct the configuration.
Verification
Purpose Run the show bgp bmp command to display a set of statistics and the current BMP session
state on the router.
traceoptions {
file filename <files number> <size size> <world-readable | no-world-readable>;
flag flag <flag-modifier> <disable>;
}
You can specify the following BGP protocol-specific trace options using the flag
statement:
• 4byte-as—4-byte AS events.
• damping—Damping operations.
• open—BGP open packets. These packets are sent between peers when they are
establishing a connection.
• update—BGP update packets. These packets provide routing updates to BGP systems.
Global tracing options are inherited from the configuration set by the traceoptions
statement at the [edit routing-options] hierarchy level. You can override the following
global trace options for the BGP protocol using the traceoptions flag statement included
at the [edit protocols bgp] hierarchy level:
• general—All normal operations and routing table changes (a combination of the normal
and route trace operations)
• normal—Normal events
• policy—Policy processing
• route—Routing information
• state—State transitions
You can optionally specify one or more of the following flag modifiers:
• filter—Filter trace information. Applies only to route and damping tracing flags.
NOTE: Use the all trace flag and the detail flag modifier with caution because
these might cause the CPU to become very busy.
NOTE: If you only enable the update flag, received keepalive messages do
not generate a trace message.
You can filter trace statements and display only the statement information that passes
through the filter by specifying the filter flag modifier. The filter modifier is only supported
for the route and damping tracing flags.
The match-on statement specifies filter matches based on prefixes. It is used to match
on route filters.
Requirements
• You must have the view privilege for the logical system.
• Configure a network, such as the BGP network shown in “Example: Configuring Internal
BGP Peering Sessions on Logical Systems” on page 1012.
Overview
• /log—Contains system log and tracing files specific to the logical system.
To maintain backward compatibility for the log files with previous versions of Junos
OS, a symbolic link (symlink) from the /var/logs/logical-system-name directory to the
/var/logical-systems/logical-system-name directory is created when a logical system
is configured.
The file system for each logical system enables logical system users to view trace logs
and modify logical system files. Logical system administrators have full access to view
and modify all files specific to the logical system.
Logical system users and administrators can save and load configuration files at the
logical-system level using the save and load configuration mode commands. In addition,
they can also issue the show log, monitor, and file operational mode commands at the
logical-system level.
This example shows how to configure and view a BGP trace file on a logical system. The
steps can be adapted to apply to trace operations for any Junos OS hierarchy level that
supports trace operations.
TIP: To view a list of hierarchy levels that support tracing operations, enter
the help apropos traceoptions command in configuration mode.
Configuration
CLI Quick To quickly configure this example, copy the following commands, paste them into a text
Configuration file, remove any line breaks, change any details necessary to match your network
configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy
level.
Step-by-Step The following example requires you to navigate various levels in the configuration
Procedure hierarchy. For information about navigating the CLI, see Using the CLI Editor in
Configuration Mode in the Junos OS CLI User Guide.
[edit]
user@host# commit
/var/logical-systems/A:
config/
log/
tmp/
2. In operational mode on the main router, list the log files on the logical system.
/var/logical-systems/A/log:
bgp-log
AS 17)
Aug 10 17:14:22.831901
Aug 10 17:14:22.831901 BGP SEND 192.168.6.5+53889 -> 192.168.40.4+179
Aug 10 17:14:22.831959 BGP SEND message type 3 (Notification) length 21
Aug 10 17:14:22.831999 BGP SEND Notification code 6 (Cease) subcode 4
(Administratively Reset)
...
Cleared 2 connections
8. Halt the monitor command by pressing Enter and typing monitor stop.
[Enter]
9. When you are finished troubleshooting, consider deactivating trace logging to avoid
any unnecessary impact to system resources.
When configuration is deactivated, it appears in the configuration with the inactive tag.To
reactivate trace operations, use the activate configuration-mode statement.
user@host:A# show
type internal;
inactive: traceoptions {
file bgp-log size 10k files 2;
flag update detail;
flag all;
}
local-address 192.168.6.5;
export send-direct;
neighbor 192.163.6.4;
neighbor 192.168.40.4;
When configuration is deactivated, the statement appears in the configuration with the
inactive tag.
user@host:A# show
type internal;
inactive: traceoptions {
file bgp-log size 10k files 2;
flag update detail;
flag all;
}
local-address 192.168.6.5;
export send-direct;
neighbor 192.163.6.4;
neighbor 192.168.40.4;
Results From configuration mode, confirm your configuration by entering the show logical-systems
A protocols bgp group internal-peers command. If the output does not display the intended
configuration, repeat the instructions in this example to correct the configuration.
Verification
Purpose Make sure that events are being written to the log file.
The following sections explain each of the BGP configuration statements. The statements
are organized alphabetically.
Several statements in the [edit protocols mpls] hierarchy are valid at numerous locations
within it. To make the complete hierarchy easier to read, the repeated statements are
listed in “Common BGP Family Options” on page 1293 and that section is referenced at the
appropriate locations in “Complete [edit protocols bgp] Hierarchy” on page 1294.
• [edit protocols bgp family inet (any | flow | labeled-unicast | multicast | unicast)]
accepted-prefix-limit {
maximum number;
teardown <percentage> <idle-timeout (forever | minutes)>;
}
loops number;
prefix-limit {
maximum number;
teardown <percentage> <idle-timeout (forever | minutes)>;
}
rib-group group-name;
protocols {
bgp {
disable;
accept-remote-nexthop;
advertise-external <conditional>;
advertise-inactive;
(advertise-peer-as | no-advertise-peer-as);
authentication-algorithm (aes-128-cmac-96 | hmac-sha-1-96 | md5);
authentication-key key;
authentication-key-chain key-chain;
bfd-liveness-detection {
authentication {
algorithm (keyed-md5 | keyed-sha-1 | meticulous-keyed-md5 |
meticulous-keyed-sha-1 | simple-password);
key-chain key-chain-name;
loose-check;
}
detection-time {
threshold milliseconds;
}
holddown-interval milliseconds;
minimum-interval milliseconds;
minimum-receive-interval milliseconds;
multiplier number;
no-adaptation;
session-mode (automatic | multihop | single-hop);
transmit-interval {
minimum-interval milliseconds;
threshold milliseconds;
}
version (1 | automatic);
}
cluster cluster-identifier;
damping;
description text-description;
export [ policy-names ];
family family-name {
... the family subhierarchies appear after the main [edit protocols bgp] hierarchy ...
}
graceful-restart {
disable;
restart-time seconds;
stale-routes-time seconds;
}
group group-name {
... the group subhierarchy appears after the main [edit protocols bgp] hierarchy ...
}
hold-time seconds;
idle-after-switch-over (seconds | forever);
import [ policy-names ];
include-mp-next-hop;
ipsec-sa ipsec-sa;
keep (all | none);
local-address address;
local-as autonomous-system <loops number> < alias> <private>;
local-interface interface-name;
local-preference local-preference;
log-updown;
metric-out (metric | igp (delay-med-update | offset) | minimum-igp offset);
mtu-discovery;
multihop {
no-nexthop-change;
ttl ttl-value;
}
no-aggregator-id;
no-client-reflect;
out-delay seconds;
outbound-route-filter {
bgp-orf-cisco-mode;
prefix-based {
accept {
inet;
inet6;
}
}
}
passive;
path-selection {
always-compare-med;
as-path-ignore;
cisco-non-deterministic;
external-router-id;
med-plus-igp {
igp-multiplier number;
med-multiplier number;
}
}
peer-as autonomous-system;
preference preference;
remove-private;
tcp-mss segment-size;
traceoptions {
file filename <files number> <size maximum-file-size> <world-readable |
no-world-readable>;
flag flag <flag-modifier> <disable>;
}
vpn-apply-export;
}
bgp {
family inet {
(any | multicast) {
bgp {
family inet6 {
(any | multicast) {
... statements in Common BGP Family Options on page 1293 ...
}
labeled-unicast {
... statements in Common BGP Family Options on page 1293 PLUS ...
aggregate-label {
community community-name:
}
explicit-null;
per-group-label;
traffic-statistics {
file filename <files number> <size maximum-file-size> <world-readable |
no-world-readable>;
interval seconds;
}
}
unicast {
... statements in Common BGP Family Options on page 1293 PLUS ...
topology name {
community target identifier;
}
}
}
}
bgp {
family (inet-mdt | inet-mvpn | inet6-mvpn | l2vpn) {
signaling {
... statements in Common BGP Family Options on page 1293 ...
}
}
}
bgp {
family inet-vpn {
(any | multicast | unicast) {
... statements in Common BGP Family Options on page 1293 PLUS ...
aggregate-label <community community-name>;
}
flow {
... statements in Common BGP Family Options on page 1293 ...
}
}
}
bgp {
family inet6-vpn {
(any | multicast | unicast) {
... statements in Common BGP Family Options on page 1293 PLUS ...
aggregate-label <community community-name>;
}
}
}
bgp {
family iso-vpn {
unicast {
... statements in Common BGP Family Options on page 1293 PLUS ...
aggregate-label <community community-name>;
}
}
}
bgp {
family route-target {
accepted-prefix-limit {
maximum number;
teardown <percentage> <idle-timeout (forever | minutes)>;
}
advertise-default;
external-paths number;
prefix-limit {
maximum number;
bgp {
group group-name {
... same statements as at the [edit protocols bgp] hierarchy level PLUS ...
allow [ all ip-prefix</prefix-length> ];
as-override;
multipath <multiple-as>;
neighbor address {
... the neighbor subhierarchy appears after the main [edit protocols bgp group
group-name] hierarchy ...
}
type (external | internal);
... BUT NOT ...
disable; # NOT valid at this level
group group-name { ... } # NOT valid at this level
path-selection { ... } # NOT valid at this level
}
group group-name {
neighbor address {
... same statements as at the [edit protocols bgp] hierarchy level PLUS ...
as-override;
multipath <multiple-as>;
... BUT NOT ...
disable; # NOT valid at this level
group group-name { ... } # NOT valid at this level
neighbor address { ... } # NOT valid at this level
path-selection { ... } # NOT valid at this level
}
}
}
}
accept-remote-nexthop
Syntax accept-remote-nexthop;
Description Specify that a single-hop EBGP peer accept a remote next hop with which it does not
share a common subnet. Configure a separate import policy on the EBGP peer to specify
the remote next hop. You cannot configure the multihop statement at the same time.
accepted-prefix-limit
Syntax accepted-prefix-limit {
maximum number;
teardown <percentage-threshold> idle-timeout (forever | minutes);
}
Hierarchy Level [edit logical-systems logical-system-name protocols bgp family (inet | inet6) (any | flow |
labeled-unicast | multicast | unicast)],
[edit logical-systems logical-system-name protocols bgp family route-target],
[edit logical-systems logical-system-name protocols bgp group group-name family (inet |
inet6) (any | flow | labeled-unicast | multicast | unicast)],
[edit logical-systems logical-system-name protocols bgp group group-name family
route-target],
[edit logical-systems logical-system-name protocols bgp group group-name neighbor address
family (inet | inet6) (any | flow | labeled-unicast | multicast | unicast)],
[edit logical-systems logical-system-name protocols bgp group group-name neighbor address
family route-target],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
bgp family (inet | inet6) (any | flow | labeled-unicast | multicast | unicast)],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
bgp family route-target],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
bgp group group-name family (inet | inet6) (any | flow | labeled-unicast | multicast |
unicast)],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
bgp group group-name family route-target],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
bgp group group-name neighbor address family (inet | inet6) (any | flow | labeled-unicast
| multicast | unicast)],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
bgp group group-name neighbor address family route-target],
[edit protocols bgp family (inet | inet6) (any | flow | labeled-unicast | multicast | unicast)],
[edit protocols bgp family route-target],
[edit protocols bgp group group-name family (inet | inet6) (any | flow | labeled-unicast |
multicast | unicast)],
[edit protocols bgp group group-name family route-target],
[edit protocols bgp group group-name neighbor address family (inet | inet6) (any | flow |
labeled-unicast | multicast | unicast)],
[edit protocols bgp group group-name neighbor address family route-target],
[edit routing-instances routing-instance-name protocols bgp family (inet | inet6) (any | flow
| labeled-unicast | multicast | unicast)],
[edit routing-instances routing-instance-name protocols bgp family route-target],
[edit routing-instances routing-instance-name protocols bgp group group-name family (inet
| inet6) (any | flow | labeled-unicast | multicast | unicast)],
[edit routing-instances routing-instance-name protocols bgp group group-name family
route-target],
[edit routing-instances routing-instance-name protocols bgp group group-name neighbor
address family (inet | inet6) (any | flow | labeled-unicast | multicast | unicast)],
[edit routing-instances routing-instance-name protocols bgp group group-name neighbor
address family route-target]
Description Configure a limit to the number of prefixes that can be accepted on a BGP peer session.
When that limit is exceeded, a system log message is sent. You can optionally specify
to reset the BGP session when the number of accepted prefixes exceeds the specified
limit.
Options idle-timeout (forever | minutes)—Specify that a BGP session that has been reset is not
reestablished until after the specified timeout period. Specify forever to prevent the
BGP session from being reestablished until the clear bgp neighbor command is issued.
maximum number—Limit the number of prefixes that can be accepted on a BGP peer
session. A system log message is sent when that number is exceeded.
32
Range: 1 through 4,294,967,295 (2 – 1)
teardown <percentage 1/n threshold>—Specify to reset the BGP peer session when the
specified limit to the number of prefixes that can be accepted is exceeded. If you
specify a percentage, a system log message is sent when the accepted number of
prefixes on the BGP session exceeds the specified percentage of the configured limit.
After a BGP session is reset, it is reestablished within a short time unless you include
the idle-timeout statement.
Range: 1 through 100
Range: 1 through 2400
add-path
Syntax add-path {
send {
path-count number;
prefix-policy [ policy-names ];
}
receive;
Hierarchy Level [edit logical-systems logical-system-name protocols bgp group group-name family inet
unicast],
[edit logical-systems logical-system-name protocols bgp group group-name neighbor address
family inet unicast],
[edit protocols bgp group group-name family inet unicast],
[edit protocols bgp group group-name neighbor address family inet unicast]
Description Enable advertisement of multiple paths to a destination, instead of advertising only the
active path.
advertise-external
Syntax advertise-external {
conditional;
}
Description Have BGP advertise the best external route into an IBGP mesh group, a route reflector
cluster, or an AS confederation even if the best route is an internal route.
Options conditional—(Optional) Advertise the best external path only if the route selection process
reaches the point at which the multiple exit discriminator (MED) metric is evaluated.
As a result, an external path with an AS path worse than that of the active path is
not advertised.
advertise-inactive
Syntax advertise-inactive;
Description Have BGP advertise the best route even if the routing table did not select it to be an active
route.
Related • Example: Configuring the Preference Value for BGP Routes on page 1145
Documentation
advertise-peer-as
Syntax advertise-peer-as;
aggregate-label
Syntax aggregate-label {
community community-name;
}
Hierarchy Level [edit logical-systems logical-system-name protocols bgp family inet labeled-unicast],
[edit logical-systems logical-system-name protocols bgp family inet-vpn labeled-unicast],
[edit protocols bgp family inet labeled-unicast],
[edit protocols bgp family inet-vpn labeled-unicast],
[edit protocols bgp family inet6 labeled-unicast]
Options community community-name—Specify the name of the community to which to apply the
aggregate label.
allow
Description Implicitly configure BGP peers, allowing peer connections from any of the specified
networks or hosts. To configure multiple BGP peers, configure one or more networks and
hosts within a single allow statement or include multiple allow statements.
NOTE: You cannot define a BGP group with dynamic peers with BGP
authentication enabled.
NOTE: You cannot define a BGP group with dynamic peers with authentication
enabled.
as-override
Syntax as-override;
Description Compare the AS path of an incoming advertised route with the AS number of the BGP
peer under the group and replace all occurrences of the peer AS number in the AS path
with its own AS number before advertising the route to the peer.
Note that enabling the AS override feature may result in routing loops. Use this feature
only for specific applications that require this type of behavior, and in situations with
strict network control. One application is the IGP protocol between the provider edge
routing device and the customer edge routing device in a virtual private network.
authentication-algorithm
authentication-key
Description Configure an MD5 authentication key (password). Neighboring routing devices use the
same password to verify the authenticity of BGP packets sent from this system.
authentication-key-chain
• Example: Configuring Hitless Authentication Key Rollover for IS-IS on page 350
auto-discovery-only
Syntax auto-discovery-only;
Description Enable the router to process only the autodiscovery network layer reachability information
(NLRI) update messages for LDP-based Layer 2 VPN and VPLS update messages
(BGP_L2VPN_AD_NLRI) (FEC 129).
The auto-discovery-only statement must be configured on all provider edge (PE) routers
in a VPLS. If you configure route reflection, the auto-discovery-only statement is also
required on provider (P) routers that act as the route reflector in supporting FEC
129-related updates.
bfd-liveness-detection
Syntax bfd-liveness-detection {
authentication {
algorithm algorithm-name;
key-chain key-chain-name;
<loose-check>;
}
detection-time {
threshold milliseconds;
}
holddown-interval milliseconds;
minimum-interval milliseconds;
minimum-receive-interval milliseconds;
multiplier number;
no-adaptation;
session-mode (automatic | multihop | single-hop);
transmit-interval {
threshold milliseconds;
minimum-interval milliseconds;
}
version (1 | automatic);
}
Support for BFD on IPv6 interfaces with BGP introduced in Junos OS Release 11.2.
For IBGP and multihop EBGP support, configure the bfd-liveness-detection statement
at the global [edit bgp protocols] hierarchy level. You can also configure IBGP and multihop
support for a routing instance or a logical system.
Related • Example: Configuring BFD on Internal BGP Peer Sessions on page 1244
Documentation
• Example: Configuring BFD Authentication for BGP on page 1254
bgp
bgp-orf-cisco-mode
Syntax bgp-orf-cisco-mode;
Description Enable interoperability with routing devices that use the vendor-specific outbound route
filter compatibility code of 130 and code type of 128.
NOTE: To enable interoperability for all BGP peers configured on the routing
device, include the statement at the [edit routing-options outbound-route-filter]
hierarchy level.
Default Disabled
Related • Example: Configuring BGP Prefix-Based Outbound Route Filtering on page 1240
Documentation
bmp
Syntax bmp {
memory limit bytes;
station-address (ip-address | name);
station-port port-number;
statistics-timeout seconds;
}
Description Configure the BGP Monitoring Protocol (BMP), which enables the routing device to collect
data from the BGP Adjacency-RIB-In routing tables and periodically send that data to a
monitoring station.
Options memory-limit bytes—(Optional) Specify a threshold at which to stop collecting BMP data
if the limit is exceeded.
Default: 10 MB
Range: 1,048,576 through 52,428,800
station-port port-number—Specify the port number of the monitoring station to use when
sending BMP data.
cluster
Description Specify the cluster identifier to be used by the route reflector cluster in an internal BGP
group.
CAUTION:
If you configure both route reflection and VPNs on the same routing device,
the following modifications to the route reflection configuration cause current
BGP sessions to be reset:
• Adding a cluster ID—If a BGP session shares the same AS number with the
group where you add the cluster ID, all BGP sessions are reset regardless
of whether the BGP sessions are contained in the same group.
NOTE: If you change the address family specified in the [edit protocols bgp
family] hierarchy level, all current BGP sessions on the routing device are
dropped and then reestablished.
confederation
damping
Syntax damping;
description
disable
Syntax disable;
explicit-null
Syntax explicit-null;
Default If you do not include the explicit-null statement in the configuration, label 3 (implicit null)
is advertised.
export
Description Apply one or more policies to routes being exported from the routing table into BGP.
family
Syntax family {
(inet | inet6 | inet-vpn | inet6-vpn | iso-vpn) {
(any | flow | labeled-unicast | multicast | unicast) {
accepted-prefix-limit {
maximum number;
teardown <percentage> <idle-timeout (forever | minutes)>;
}
add-path {
send {
path-count number;
prefix-policy [ policy-names ];
}
receive;
}
loops number;
prefix-limit {
maximum number;
teardown <percentage> <idle-timeout (forever | minutes)>;
}
rib-group group-name;
}
flow {
no-validate policy-name;
}
labeled-unicast {
accepted-prefix-limit {
maximum number;
teardown <percentage> <idle-timeout (forever | minutes)>;
}
aggregate-label {
community community-name:
}
explicit-null {
connected-only;
}
prefix-limit {
maximum number;
teardown <percentage> <idle-timeout (forever | minutes)>;
}
resolve-vpn;
rib inet.3;
rib-group group-name;
}
}
route-target {
accepted-prefix-limit {
maximum number;
teardown <percentage> <idle-timeout (forever | minutes)>;
}
advertise-default;
external-paths number;
prefix-limit {
maximum number;
teardown <percentage> <idle-timeout (forever | minutes)>;
}
}
(inet-mdt | inet-mvpn | inet6-mvpn | l2vpn) {
signaling {
accepted-prefix-limit {
maximum number;
teardown <percentage> <idle-timeout (forever | minutes)>;
}
loops number;
prefix-limit {
maximum number;
teardown <percentage> <idle-timeout (forever | minutes)>;
}
rib-group group-name
}
}
}
Description Enable multiprotocol BGP (MP-BGP) by configuring BGP to carry network layer
reachability information (NLRI) for address families other than unicast IPv4, to specify
MP-BGP to carry NLRI for the IPv6 address family, or to carry NLRI for VPNs.
inet-mdt—Configure NLRI parameters for the multicast distribution tree (MDT) subaddress
family identifier (SAFI) for IPv4 traffic in Layer 3 VPNs.
l2vpn—Configure NLRI parameters for IPv4 for MPLS-based Layer 2 VPNs and VPLS.
multicast—Configure the family type to be multicast. This means that the BGP peers are
being used only to carry the unicast routes that are being used by multicast for
resolving the multicast routes.
unicast—Configure the family type to be unicast. This means that the BGP peers only
carry the unicast routes that are being used for unicast forwarding purposes. The
default family type is unicast.
flow
Syntax flow {
no-validate policy-name;
}
Hierarchy Level [edit protocols bgp group group-name family (inet | inet-vpn)],
[edit protocols bgp group group-name neighbor address family (inet | inet-vpn)],
[edit routing-instances routing-instance-name protocols bgp group group-name family (inet
| inet-vpn)],
[edit routing-instances routing-instance-name protocols bgp group group-name
neighbor address family (inet | inet-vpn)]
NOTE: This statement is supported for the default instance, VRF instance,
and virtual-router instance only. It is configured with the instance-type
statement at the [edit routing-instance instance-name] hierarchy level. For
VPNs, this statement is supported for the default instance only.
graceful-restart
Syntax graceful-restart {
disable;
restart-timeseconds;
stale-routes-time seconds;
}
NOTE: If you configure graceful restart after a BGP session has been
established, the BGP session restarts and the peers negotiate graceful restart
capabilities.
stale-routes-time seconds—Maximum time that stale routes are kept during restart.
Range: 1 through 600 seconds
Default: 300 seconds
group
}
advertise-default;
external-paths number;
prefix-limit {
maximum number;
teardown <percentage> <idle-timeout (forever | minutes)>;
}
}
}
hold-time seconds;
import [ policy-names ];
ipsec-sa ipsec-sa;
keep (all | none);
local-address address;
local-as autonomous-system <private>;
local-preference local-preference;
log-updown;
metric-out metric;
multihop <ttl-value>;
multipath {
multiple-as;
}
no-aggregator-id;
no-client-reflect;
out-delay seconds;
passive;
peer-as autonomous-system;
preference preference;
remove-private;
tcp-mss segment-size;
traceoptions {
file filename <files number> <size size> <world-readable | no-world-readable>;
flag flag <flag-modifier> <disable>;
}
type type;
neighbor address {
... peer-specific-options ...
}
}
Description Define a BGP peer group. BGP peer groups share a common type, peer autonomous
system (AS) number, and cluster ID, if present. To configure multiple BGP groups, include
multiple group statements.
By default, the group’s options are identical to the global BGP options. To override the
global options, include group-specific options within the group statement.
The group statement is one of the statements you must include in the configuration to
run BGP on the routing device.
hold-time
Description Specify the hold-time value to use when negotiating a connection with the peer. The
hold-time value is advertised in open packets and indicates to the peer the length of time
that it should consider the sender valid. If the peer does not receive a keepalive, update,
or notification message within the specified hold time, the BGP connection to the peer
is closed and routing devices through that peer become unavailable.
The hold time is three times the interval at which keepalive messages are sent.
BGP on the local routing device uses the smaller of either the local hold-time value or
the peer’s hold-time value received in the open message as the hold time for the BGP
connection between the two peers.
TIP: When you set a hold time value to less than 20 seconds, we recommend
that you also configure the BGP precision-timers statement. The
precision-timers statement ensures that if scheduler slip messages occur,
the routing device continues to send keepalive messages. When the
precision-timers statement is included, keepalive message generation is
performed in a dedicated kernel thread, which helps to prevent BGP session
flaps.
idle-after-switch-over
Description Configure the routing device not to automatically reestablish BGP peer sessions after a
nonstop active routing (NSR) switchover. This feature is particularly useful if you are
using dynamic routing policies because the dynamic database is not synchronized with
the backup Routing Engine when NSR is enabled.
Options forever—Do not reestablish a BGP peer session after an NSR switchover until the clear
bgp neighbor command is issued.
seconds—Do not reestablish a BGP peer session after an NSR switchover until after the
specified period.
32
Range: 1 through 4,294,967,295 (2 – 1)
Related • Preventing Automatic Reestablishment of BGP Peer Sessions After NSR Switchovers
Documentation
• Junos OS Routing Policy Configuration Guide
import
Description Apply one or more routing policies to routes being imported into the Junos OS routing
table from BGP.
include-mp-next-hop
Syntax include-mp-next-hop;
ipsec-sa
Description Apply a security association to BGP peers. You can apply the security association globally
for all BGP peers, to a group of peers, or to an individual peer.
iso-vpn
Syntax iso-vpn {
unicast {
prefix-limit number;
rib-group group-name;
}
}
Description Enable BGP to carry ISO VPN NLRI messages between PE routes connecting a VPN.
Default Disabled.
keep
Description Specify whether routes learned from a BGP peer are retained in the routing table even if
they contain an AS number that was exported from the local AS.
Default If you do not include this statement, most routes are retained in the routing table.
none—Retain none of the routes. When keep none is configured for the BGP session and
the inbound policy changes, the Junos OS forces readvertisement of the full set of
routes advertised by the peer.
labeled-unicast
Syntax labeled-unicast {
accepted-prefix-limit {
maximum number;
teardown <percentage> <idle-timeout (forever | minutes)>;
}
aggregate-label {
community community-name;
}
explicit-null {
connected-only;
}
prefix-limit {
maximum number;
teardown <percentage> <idle-timeout (forever | minutes)>;
}
resolve-vpn;
rib inet.3;
rib-group group-name;
}
Hierarchy Level [edit logical-systems logical-system-name protocols bgp family (inet | inet6)],
[edit logical-systems logical-system-name protocols bgp group group-name family (inet |
inet6)],
[edit logical-systems logical-system-name protocols bgp group group-name neighbor address
family (inet | inet6)],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
bgp family (inet | inet6)],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
bgp group group-name family (inet | inet6)],
[edit logical-systems logical-system-name routing-instances routing-instance-name
protocols bgp group group-name neighbor address family (inet | inet6)],
[edit protocols bgp family (inet | inet6)],
[edit protocols bgp group group-name family (inet | inet6)],
[edit protocols bgp group group-name neighbor address family (inet | inet6)],
[edit routing-instances routing-instance-name protocols bgp family (inet | inet6)],
[edit routing-instances routing-instance-name protocols bgp group group-name family (inet
| inet6)],
[edit routing-instances routing-instance-name protocols bgp group group-name neighbor
address family (inet | inet6)]
local-address
Description Specify the address of the local end of a BGP session. This address is used to accept
incoming connections to the peer and to establish connections to the remote peer. When
none of the operational interfaces are configured with the specified local address, a
session with a BGP peer is placed in the idle state.
You generally configure a local address to explicitly configure the system’s IP address
from BGP’s point of view. This IP address can be either an IPv6 or IPv4 address. Typically,
an IP address is assigned to a loopback interface, and that IP address is configured here.
For internal BGP (IBGP) peering sessions, generally the loopback interface (lo0) is used
to establish connections between the IBGP peers. The loopback interface is always up
as long as the device is operating. If there is a route to the loopback address, the IBGP
peering session stays up. If a physical interface address is used instead and that interface
goes up and down, the IBGP peering session also goes up and down. Thus the loopback
interface provides fault tolerance in case the physical interface or the link goes down, if
the device has link redundancy.
When a device peers with a remote device’s loopback interface address, the local device
expects BGP update messages to come from (be sourced by) the remote device’s
loopback interface address. The local-address statement enables you to specify the
source information in BGP update messages. If you omit the local-address statement,
the expected source of BGP update messages is based on the device’s source address
selection rules, which normally result in the egress interface address being the expected
source of update messages. When this happens, the peering session is not established
because a mismatch exists between the expected source address (the egress interface
of the peer) and the actual source (the loopback interface of the peer). To make sure
that the expected source address matches the actual source address, specify the loopback
interface address in the local-address statement.
NOTE: A BGP session can still be established when only one of the paired
routers has a local address configured.
Default If you do not configure a local address, BGP uses the routing device’s source address
selection rules to set the local address.
local-as
In Junos OS Release 9.1 and later, the autonomous system (AS) numeric range in
plain-number format is extended to provide BGP support for 4-byte AS numbers, as
defined in RFC 4893, BGP Support for Four-octet AS Number Space.
In Junos OS Release 9.3 and later, you can also configure a 4-byte AS number using the
AS-dot notation format of two integer values joined by a period: <16-bit high-order value
in decimal>.<16-bit low-order value in decimal>. For example, the 4-byte AS number
of 65546 in plain-number format is represented as 1.10 in the AS-dot notation format.
Options alias—(Optional) Configure the local AS as an alias of the global AS number configured
for the router at the [edit routing-options] hierarchy level. As a result, a BGP peer
considers any local AS to which it is assigned as equivalent to the primary AS number
configured for the routing device. When you use the alias option, only the AS (global
or local) used to establish the BGP session is prepended in the AS path sent to the
BGP neighbor.
autonomous-system—AS number.
32
Range: 1 through 4,294,967,295 (2 – 1) in plain-number format
Range: 0.0 through 65535.65535 in AS-dot notation format
one or more times. This is the default behavior. If you configure loops 2, the route is
hidden if the AS number is detected in the path two or more times.
Default: 1
Range: 1 through 10
private—(Optional) Configure to use the local AS only during the establishment of the
BGP session with a BGP neighbor but to hide it in the AS path sent to external BGP
peers. Only the global AS is included in the AS path sent to external peers.
NOTE: The private and alias options are mutually exclusive. You cannot
configure both options with the same local-as statement.
local-interface
Description Specify the interface name of the EBGP peer that uses IPv6 link-local addresses. This
peer is link-local in scope.
local-preference
Description Modify the value of the LOCAL_PREF path attribute, which is a metric used by IBGP
sessions to indicate the degree of preference for an external route. The route with the
highest local preference value is preferred.
The LOCAL_PREF path attribute always is advertised to internal BGP peers and to
neighboring confederations. It is never advertised to external BGP peers.
Default If you omit this statement, the LOCAL_PREF path attribute, if present, is not modified.
Options local-preference—Preference to assign to routes learned from BGP or from the group or
peer.
32
Range: 0 through 4,294,967,295 (2 – 1)
Default: If the LOCAL_PREF path attribute is present, do not modify its value. If a BGP
route is received without a LOCAL_PREF attribute, the route is handled locally (it is
stored in the routing table and advertised by BGP) as if it were received with a
LOCAL_PREF value of 100. By default, non-BGP routes that are advertised by BGP
are advertised with a LOCAL_PREF value of 100.
log-updown
Syntax log-updown;
Description Log a message whenever a BGP peer makes a state transition. Messages are logged
using the system logging mechanism located at the [edit system syslog] hierarchy level.
logical-systems
Syntax logical-systems {
logical-system-name {
...logical-system-configuration...
}
}
Description (M Series, MX Series, and T Series routers only) Configure a logical system.
loops
Description Globally, for the local-AS BGP attribute, or the specified address family, allow the local
device’s AS number to be in the received AS paths, and specify the number of times
detection of the local device’s AS number in the AS_PATH attribute causes the route to
be discarded or hidden. For example, if you configure loops 1, the route is hidden if the
local device’s AS number is detected in the path one or more times. This prevents routing
loops and is the default behavior. If you configure loops 2, the route is hidden if the local
device’s AS number is detected in the path two or more times.
• inet unicast
• inet-vpn multicast
• inet6 any
• l2vpn auto-discovery-only
• ...
This list is truncated for brevity. For a complete list of protocol families for which you can
specify the loops statement, enter the help apropos loops configuration command at the
[edit protcols bgp] hierarchy level on your device.
NOTE: When you configure the loops statement for a specific BGP address
family, that value is used to evaluate the AS path for routes received by a
BGP peer for the specified address family, rather than the loops value
configured for the global AS number with the loops statement at the [edit
routing-options autonomous-system as-number] hierarchy level.
Options number—Number of times detection of the AS number in the AS_PATH attribute causes
the route to be discarded or hidden.
Range: 1 through 10
Default: 1
metric-out
Description Metric for all routes sent using the multiple exit discriminator (MED, or MULTI_EXIT_DISC)
path attribute in update messages. This path attribute is used to discriminate among
multiple exit points to a neighboring AS. If all other factors are equal, the exit point with
the lowest metric is preferred.
You can specify a constant metric value by including the metric option. For configurations
in which a BGP peer sends third-party next hops that require the local system to perform
next-hop resolution—IBGP configurations, configurations within confederation peers, or
EBGP configurations that include the multihop command—you can specify a variable
metric by including the minimum-igp or igp option.
You can increase or decrease the variable metric calculated from the IGP metric (either
from the igp or minimum-igp statement) by specifying a value for offset. The metric is
increased by specifying a positive value for offset, and decreased by specifying a negative
value for offset.
In Junos OS Release 9.0 and later, you can specify that a BGP group or peer not advertise
updates for the MED path attributes used to calculate IGP costs for BGP next hops unless
the MED is lower. You can also configure an interval to delay when MED updates are sent
by including the med-igp-update-interval minutes at the [edit routing-options] hierarchy
level.
Options delay-med-update—Specify that a BGP group or peer configured with the metric-out igp
statement not advertise MED updates unless the current MED value is lower than
the previously advertised MED value, or another attribute associated with the route
has changed, or the BGP peer is responding to a refresh route request.
igp—Set the metric to the most recent metric value calculated in the IGP to get to the
BGP next hop. Routes learned from an EBGP peer usually have a next hop on a
directly-connected interface and thus the IGP value is equal to zero. This is the value
advertised.
minimum-igp—Set the metric to the minimum metric value calculated in the IGP to get
to the BGP next hop. If a newly calculated metric is greater than the minimum metric
value, the metric value remains unchanged. If a newly calculated metric is lower, the
metric value is lowered to that value. When you change a neighbor’s export policy
from any configuration to a configuration that sets the minimum IGP offset on an
exported route, the advertised MED is not updated if the value would increase as a
result, even if the previous configuration does not use a minimum IGP-based MED
value. This behavior helps to prevent unnecessary route flapping when an IGP cost
changes, by not forcing a route update if the metric value increases past the previous
lowest known value.
mtu-discovery
Syntax mtu-discovery;
TCP path MTU discovery enables BGP to automatically discover the best TCP path MTU
for each BGP session. In the Junos OS, TCP path MTU discovery is disabled by default
for all BGP neighbor sessions.
When MTU discovery is not enabled, TCP sessions that are not directly connected transmit
packets of 512-byte maximum segment size (MSS). These small packets minimize the
chances of packet fragmentation at a device along the path to the destination. However,
because most links use an MTU of at least 1500 bytes, 512-byte packets do not result in
the most efficient use of link bandwidth. For directly connected EBGP sessions, MTU
mismatches prevent the BGP session from being established. As a workaround, enable
path MTU discovery within the EBGP group.
Path MTU discovery dynamically determines the MTU size on the network path between
the source and the destination, with the goal of avoiding IP fragmentation. Path MTU
discovery works by setting the Don’t Fragment (DF) bit in the IP headers of outgoing
packets. When a device along the path has an MTU that is smaller than the packet, the
device drops the packet. The device also sends back an ICMP Fragmentation Needed
(Type 3, Code 4) message that contains the device’s MTU, thus allowing the source to
reduce its path MTU appropriately. The process repeats until the MTU is small enough
to traverse the entire path without fragmentation.
multihop
Syntax multihop {
no-nexthop-change;
ttl ttl-value;
}
If you have external BGP confederation peer-to-loopback addresses, you still need the
multihop configuration.
Default If you omit this statement, all EBGP peers are assumed to be directly connected (that
is, you are establishing a nonmultihop, or “regular,” BGP session), and the default
time-to-live (TTL) value is 1.
Options no-nexthop-change—Specify that the BGP next-hop value not be changed. For route
advertisements, specify the no-nexthop-self option.
ttl ttl-value—Configure the maximum TTL value for the TTL in the IP header of BGP
packets.
Range: 1 through 255
Default: 64 (for multihop EBGP sessions, confederations, and IBGP sessions)
multipath
Syntax multipath {
multiple-as;
}
Description Allow load sharing among multiple EBGP paths and multiple IBGP paths. A path is
considered a BGP equal-cost path (and will be used for forwarding) if a tie-break is
performed. The tie-break is performed after the BGP route path selection step that
chooses the next-hop path that is resolved through the IGP route with the lowest metric.
All paths with the same neighboring AS, learned by a multipath-enabled BGP neighbor,
are considered.
Options multiple-as—Disable the default check requiring that paths accepted by BGP multipath
must have the same neighboring AS.
neighbor
accepted-prefix-limit {
maximum number;
teardown <percentage> <idle-timeout (forever | minutes)>;
}
prefix-limit {
maximum number;
teardown <percentage> <idle-timeout (forever | minutes)>;
}
}
signaling {
prefix-limit {
maximum number;
teardown <percentage> <idle-timeout (forever | minutes)>;
}
}
}
graceful-restart {
disable;
restart-time seconds;
stale-routes-time seconds;
}
hold-time seconds;
import [ policy-names ];
ipsec-sa ipsec-sa;
keep (all | none);
local-address address;
local-as autonomous-system <private>;
local-interface interface-name;
local-preference preference;
log-updown;
metric-out (metric | minimum-igp <offset> | igp <offset>);
mtu-discovery;
multihop <ttl-value>;
multipath {
multiple-as;
}
no-aggregator-id;
no-client-reflect;
out-delay seconds;
passive;
peer-as autonomous-system;
preference preference;
tcp-mss segment-size;
traceoptions {
file filename <files number> <size size> <world-readable | no-world-readable>;
flag flag <flag-modifier> <disable>;
}
vpn-apply-export;
}
Description Explicitly configure a neighbor (peer). To configure multiple BGP peers, include multiple
neighbor statements.
By default, the peer’s options are identical to those of the group. You can override these
options by including peer-specific option statements within the neighbor statement.
The neighbor statement is one of the statements you can include in the configuration to
define a minimal BGP configuration on the routing device. (You can include an allow all
statement in place of a neighbor statement.)
no advertise-peer-as
Syntax no-advertise-peer-as;
no-aggregator-id
Syntax no-aggregator-id;
Description Prevent different routers within an AS from creating aggregate routes that contain different
AS paths.
Junos OS performs route aggregation, which is the process of combining the characteristics
of different routes so that only a single route is advertised. Aggregation reduces the
amount of information that BGP must store and exchange with other BGP systems. When
aggregation occurs, the local routing device adds the local AS number and the router ID
to the aggregator path attiribute. The no-aggregator-id statement causes Junos OS to
place a 0 in the router ID field and thus eliminate the possibility of having multiple
aggregate advertisements in the network, each with different path information.
Default If you omit this statement, the router ID is included in the BGP aggregator path attribute.
no-client-reflect
Syntax no-client-reflect;
Description Disable intracluster route redistribution by the system acting as the route reflector. Include
this statement when the client cluster is fully meshed to prevent the sending of redundant
route advertisements.
no-validate
Hierarchy Level [edit protocols bgp group group-name family (inet | inet flow)],
[edit protocols bgp group group-name neighbor address family (inet | inet flow)],
[edit routing-instances routing-instance-name protocols bgp group group-name family (inet
| inet flow)],
[edit routing-instances routing-instance-name protocols bgp group group-name neighbor
address family (inet | inet flow)]
Description Omits the flow route validation procedure after packets are accepted by a policy.
out-delay
Description Specify how long a route must be present in the Junos OS routing table before it is
exported to BGP. Use this time delay to help bundle routing updates.
Default If you omit this statement, routes are exported to BGP immediately after they have been
added to the routing table.
outbound-route-filter
Syntax outbound-route-filter {
bgp-orf-cisco-mode;
prefix-based {
accept {
(inet | inet6);
}
}
}
Description Configure a BGP peer to accept outbound route filters from a remote peer.
Options accept—Specify that outbound route filters from a BGP peer be accepted.
NOTE: You can specify that both IPv4 and IPv6 outbound route filters be
accepted.
Related • Example: Configuring BGP Prefix-Based Outbound Route Filtering on page 1240
Documentation
passive
Syntax passive;
Description Do not send active open messages to the peer. Rather, wait for the peer to issue an open
request.
Default If you omit this statement, all explicitly configured peers are active, and each peer
periodically sends open requests until its peer responds.
Related • Example: Preventing BGP Session Flaps When VPN Families Are Configured on page 1023
Documentation
path-count
Hierarchy Level [edit logical-systems logical-system-name protocols bgp group group-name family inet
unicast add-path send],
[edit logical-systems logical-system-name protocols bgp group group-name neighbor address
family inet unicast add-path send],
[edit protocols bgp group group-name family inet unicast add-path send],
[edit protocols bgp group group-name family inet unicast add-path neighbor address family
inet unicast add-path send]
path-selection
Syntax path-selection {
(always-compare-med | cisco-non-deterministic | external-router-id);
as-path-ignore;
med-plus-igp {
igp-multiplier number;
med-multiplier number;
}
}
Default If the path-selection statement is not included in the configuration, only the multiple exit
discriminators (MEDs) of routes that have the same peer ASs are compared.
Options always-compare-med—Always compare MEDs whether or not the peer ASs of the
compared routes are the same.
as-path-ignore—Skip the third step of the of the algorithm that determines the active
route. By default, the third step of the algorithm evaluates the length of an AS path.
igp-multiplier number—The multiplier value for the IGP cost to a next-hop address. This
option is useful for making the MED and IGP cost comparable.
Range: 1 through 1000
Default: 1
med-multiplier number—The multiplier value for the MED calculation. This option is useful
for making the MED and IGP cost comparable.
Range: 1 through 1000
Default: 1
med-plus-igp—Add the IGP cost to the indirect next-hop destination to the MED before
comparing MED values for path selection. This statement only affects best-path
selection. It does not affect the advertised MED.
peer-as
For EBGP, the peer is in another AS, so the AS number you specify in the peer-as statement
must be different from the local router’s AS number, which you specify in the
autonomous-system statement. For IBGP, the peer is in the same AS, so the two AS
numbers that you specify in the autonomous-system and peer-as statements must be
the same..
The autonomous system (AS) numeric range in plain-number format has been extended
in Junos OS Release 9.1 to provide BGP support for 4-byte AS numbers, as defined in
RFC 4893, BGP Support for Four-octet AS Number Space. RFC 4893 introduces two new
optional transitive BGP attributes, AS4_PATH and AS4_AGGREGATOR. These new
attributes are used to propagate 4-byte AS path information across BGP speakers that
do not support 4-byte AS numbers. RFC 4893 also introduces a reserved, well-known,
2-byte AS number, AS 23456. This reserved AS number is called AS_TRANS in RFC 4893.
All releases of the Junos OS support 2-byte AS numbers.
In Junos OS Release 9.2 and later, you can also configure a 4-byte AS number using the
AS-dot notation format of two integer values joined by a period: <16-bit high-order value
in decimal>.<16-bit low-order value in decimal>. For example, the 4-byte AS number
of 65,546 in plain-number format is represented as 1.10 in the AS-dot notation format.
With the introduction of 4-byte AS numbers, you might have a combination of routers
that support 4-byte AS numbers and 2-byte AS numbers. For more information about
what happens when establishing BGP peer relationships between 4-byte and 2-byte
capable routers, see the following topics:
precision-timers
Syntax precision-timers;
Description Enable BGP sessions to send frequent keepalive messages with a hold time as short as
10 seconds.
NOTE: The hold time is three times the interval at which keepalive messages
are sent, and the hold time is the maximum number of seconds allowed to
elapse between successive keepalive messages that BGP receives from a
peer. When establishing a BGP connection with the local routing device, a
peer sends an open message, which contains a hold-time value. BGP on the
local routing device uses the smaller of either the local hold-time value or
the peer’s hold-time value as the hold time for the BGP connection between
the two peers.
The default hold-time is 90 seconds, meaning that the default frequency for
keepalive messages is 30 seconds. More frequent keepalive messages and
shorter hold times might be desirable in large-scale deployments with many
active sessions (such as edge or large VPN deployments). To configure the
hold time and the frequency of keepalive messages, include the hold-time
statement at the [edit protocols bgp] hierarchy level. You can configure the
hold time at a logical system, routing instance, global, group, or neighbor
level. When you set a hold time value to less than 20 seconds, we recommend
that you also configure the BGP precision-timers statement. The
precision-timers statement ensures that if scheduler slip messages occur,
the routing device continues to send keepalive messages. When the
precision-timers statement is included, keepalive message generation is
performed in a dedicated kernel thread, which helps to prevent BGP session
flaps.
preference
At the BGP global level, the preference statement sets the preference for routes learned
from BGP. You can override this preference in a BGP group or peer preference statement.
At the group or peer level, the preference statement sets the preference for routes learned
from the group or peer. Use this statement to override the preference set in the BGP
global preference statement when you want to favor routes from one group or peer over
those of another.
Options preference—Preference to assign to routes learned from BGP or from the group or peer.
32
Range: 0 through 4,294,967,295 (2 – 1)
Default: 170 for the primary preference
prefix-limit
Syntax prefix-limit {
maximum number;
teardown <percentage> <idle-timeout (forever | minutes)>;
}
Hierarchy Level [edit logical-systems logical-system-name protocols bgp family (inet | inet6) (any | flow |
labeled-unicast | multicast | unicast)],
[edit logical-systems logical-system-name protocols bgp group group-name family (inet |
inet6) (any | flow | labeled-unicast | multicast | unicast)],
[edit logical-systems logical-system-name protocols bgp group group-name neighbor address
family (inet | inet6) (any | flow | labeled-unicast | multicast | unicast)],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
bgp family (inet | inet6) (any | flow | labeled-unicast | multicast | unicast)],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
bgp group group-name family (inet | inet6) (any | flow | labeled-unicast | multicast |
unicast)],
[edit logical-systems logical-system-name routing-instances routing-instance-name
protocols bgp group group-name neighbor address family (inet | inet6) (any | flow
| labeled-unicast | multicast | unicast)],
[edit protocols bgp family (inet | inet6) (any | flow | labeled-unicast | multicast | unicast)],
[edit protocols bgp group group-name family (inet | inet6) (any | labeled-unicast | multicast
| unicast)],
[edit protocols bgp group group-name neighbor address family (inet | inet6) (any | flow
| labeled-unicast | multicast | unicast)],
[edit routing-instances routing-instance-name protocols bgp family (inet | inet6) (any | flow
| labeled-unicast | multicast | unicast)],
[edit routing-instances routing-instance-name protocols bgp group group-name family (inet
| inet6) (any | flow | labeled-unicast | multicast | unicast)],
[edit routing-instances routing-instance-name protocols bgp group group-name
neighbor address family (inet | inet6) (any | flow | labeled-unicast | multicast | unicast)]
Description Limit the number of prefixes received on a BGP peer session and a rate-limit logging
when injected prefixes exceed a set limit.
Options maximum number—When you set the maximum number of prefixes, a message is logged
when that number is exceeded.
32
Range: 1 through 4,294,967,295 (2 – 1)
teardown <percentage>—If you include the teardown statement, the session is torn down
when the maximum number of prefixes is reached. If you specify a percentage,
messages are logged when the number of prefixes exceeds that percentage. After
the session is torn down, it is reestablished in a short time unless you include the
idle-timeout statement. Then the session can be kept down for a specified amount
of time, or forever. If you specify forever, the session is reestablished only after you
issue a clear bgp neighbor command.
Range: 1 through 100
prefix-policy
Hierarchy Level [edit logical-systems logical-system-name protocols bgp group group-name family inet
unicast add-path send],
[edit logical-systems logical-system-name protocols bgp group group-name neighbor address
family inet unicast add-path send],
[edit protocols bgp group group-name family inet unicast add-path send],
[edit protocols bgp group group-name family inet unicast add-path neighbor address family
inet unicast add-path send]
Options policy-names—Name of a policy (or a set of policies) configured at the [edit policy-options]
hierarchy level. The policy can match routes, but cannot change route attributes.
receive
Syntax receive;
Hierarchy Level [edit logical-systems logical-system-name protocols bgp group group-name family inet
unicast add-path],
[edit logical-systems logical-system-name protocols bgp group group-name neighbor address
family inet unicast add-path],
[edit protocols bgp group group-name family inet unicast add-path],
[edit protocols bgp group group-name family inet unicast add-path neighbor address family
inet unicast add-path]
Description Enable the router to receive multiple paths to a destination. You can enable the router
to receive multiple paths from specified neighbors or from all neighbors.
remove-private
Syntax remove-private;
Description When advertising AS paths to remote systems, have the local system strip private
AS numbers from the AS path. The numbers are stripped from the AS path starting at
the left end of the AS path (the end where AS paths have been most recently added).
The routing device stops searching for private ASs when it finds the first nonprivate AS
or a peer’s private AS. If the AS path contains the AS number of the external BGP (EBGP)
neighbor, BGP does not remove the private AS number.
The operation takes place after any confederation member ASs have already been
removed from the AS path, if applicable.
The Junos OS recognizes the set of AS numbers that is considered private, a range that
is defined in the Internet Assigned Numbers Authority (IANA) assigned numbers document.
The set of reserved AS numbers is in the range from 64,512 through 65,535.
resolve-vpn
Syntax resolve-vpn;
Hierarchy Level [edit logical-systems logical-system-name protocols bgp family inet labeled-unicast],
[edit logical-systems logical-system-name protocols bgp group group-name family inet
labeled-unicast],
[edit logical-systems logical-system-name protocols bgp group group-name neighbor address
family inet labeled-unicast],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
bgp family inet labeled-unicast],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
bgp group group-name family inet labeled-unicast],
[edit logical-systems logical-system-name routing-instances routing-instance-name
protocols bgp group group-name neighbor address family inet labeled-unicast],
[edit protocols bgp family inet labeled-unicast],
[edit protocols bgp group group-name family inet labeled-unicast],
[edit protocols bgp group group-name neighbor address family inet labeled-unicast],
[edit routing-instances routing-instance-name protocols bgp family inet labeled-unicast],
[edit routing-instances routing-instance-name protocols bgp group group-name family inet
labeled-unicast],
[edit routing-instances routing-instance-name protocols bgp group group-name neighbor
address family inet labeled-unicast]
Description Allow labeled routes to be placed in the inet.3 routing table for route resolution. These
routes are then resolved for PE router connections where the remote PE is located across
another AS. For a PE router to install a route in the VRF, the next hop must resolve to a
route stored within the inet.3 table.
rib
Hierarchy Level [edit logical-systems logical-system-name protocols bgp family inet labeled-unicast],
[edit logical-systems logical-system-name protocols bgp group group-name family inet
labeled-unicast],
[edit logical-systems logical-system-name protocols bgp group group-name neighbor address
family inet labeled-unicast],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
bgp family inet labeled-unicast],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
bgp group group-name family inet labeled-unicast],
[edit logical-systems logical-system-name routing-instances routing-instance-name
protocols bgp group group-name neighbor address family inet labeled-unicast],
[edit protocols bgp family inet labeled-unicast],
[edit protocols bgp group group-name family inet labeled-unicast],
[edit protocols bgp group group-name neighbor address family inet labeled-unicast],
[edit routing-instances routing-instance-name protocols bgp family inet labeled-unicast],
[edit routing-instances routing-instance-name protocols bgp group group-name family inet
labeled-unicast],
[edit routing-instances routing-instance-name protocols bgp group group-name neighbor
address inet labeled-unicast]
Description You can allow both labeled and unlabeled routes to be exchanged in a single session.
The labeled routes are placed in the inet.3 routing table, and both labeled and unlabeled
unicast routes can be sent or received by the router.
rib-group
Hierarchy Level [edit logical-systems logical-system-name protocols bgp family inet (any | labeled-unicast
| unicast | multicast)],
[edit logical-systems logical-system-name protocols bgp group group-name family inet (any
| labeled-unicast | unicast | multicast)],
[edit logical-systems logical-system-name protocols bgp group group-name neighbor address
family inet (any | labeled-unicast | unicast | multicast)],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
bgp family inet (any | labeled-unicast | unicast | multicast)],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
bgp group group-name family inet (any | labeled-unicast | unicast | multicast)],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols
bgp group group-name neighbor address family inet (any | labeled-unicast | unicast |
multicast)],
[edit protocols bgp family inet (any | labeled-unicast | unicast | multicast)],
[edit protocols bgp group group-name family inet (any | labeled-unicast | unicast | multicast)],
[edit protocols bgp group group-name neighbor address family inet (any | labeled-unicast |
unicast | multicast)],
[edit routing-instances routing-instance-name protocols bgp family inet (any | labeled-unicast
| unicast | multicast)],
[edit routing-instances routing-instance-name protocols bgp group group-name family inet
(any | labeled-unicast | unicast | multicast)],
[edit routing-instances routing-instance-name protocols bgp group group-name neighbor
address family inet (any | labeled-unicast | unicast | multicast)]
Options group-name—Name of the routing table group. The name must start with a letter and
can include letters, numbers, and hyphens. You generally specify only one routing
table group.
• Configuring How Interface Routes Are Imported into Routing Tables on page 125
route-target
Syntax route-target {
accepted-prefix-limit {
maximum number;
teardown <percentage> <idle-timeout (forever | time-in-minutes)>;
}
advertise-default;
external-paths number;
prefix-limit {
maximum number;
teardown <percentage> <idle-timeout (forever | time-in-minutes)>;
}
}
Description Limit the number of prefixes advertised on BGP peers specifically to the peers that need
the updates.
send
Syntax send {
path-count number;
prefix-policy [ policy-names ];
}
Hierarchy Level [edit logical-systems logical-system-name protocols bgp group group-name family inet
unicast add-path],
[edit logical-systems logical-system-name protocols bgp group group-name neighbor address
family inet unicast add-path],
[edit protocols bgp group group-name family inet unicast add-path],
[edit protocols bgp group group-name family inet unicast add-path neighbor address family
inet unicast add-path]
Description Enable advertisement of multiple paths to a destination, instead of advertising only the
active path.
session-mode
Description Configure BFD session mode to be single-hop or multihop. By default, BGP uses single-hop
BFD sessions if the peer is directly connected to the router’s interface. BGP uses multihop
BFD sessions if the peer is not directly connected to the router’s interface. If the peer
session’s local-address option is configured, the directly connected check is based partly
on the source address that would be used for BGP and BFD.
For backward compatibility, you can override the default behavior by configuring the
single-hop or multihop option. Prior to Junos OS Release 11.1, the behavior was to assume
that iBGP peer sessions are multi-hop.
Options automatic—Configures BGP to use single-hop BFD sessions if the peer is directly connected
to the router’s interface, and multihop BFD sessions if the peer is not directly
connected to the router’s interface
Related • Example: Configuring BFD on Internal BGP Peer Sessions on page 1244
Documentation
• Example: Configuring BFD Authentication for BGP on page 1254
tcp-mss
Description Configure the maximum segment size (MSS) for the TCP connection for BGP neighbors.
Related • Example: Limiting TCP Segment Size for BGP on page 1232
Documentation
traceoptions
Syntax traceoptions {
file filename <files number> <size size> <world-readable | no-world-readable>;
flag flag <flag-modifier> <disable>;
}
Description Configure BGP protocol-level tracing options. To specify more than one tracing operation,
include multiple flag statements.
Default The default BGP protocol-level tracing options are inherited from the routing protocols
traceoptions statement included at the [edit routing-options] hierarchy level. The default
group-level trace options are inherited from the BGP protocol-level traceoptions
statement. The default peer-level trace options are inherited from the group-level
traceoptions statement.
Options disable—(Optional) Disable the tracing operation. You can use this option is to disable
a single operation when you have defined a broad group of tracing operations, such
as all.
file name—Name of the file to receive the output of the tracing operation. Enclose the
name within quotation marks. All files are placed in the directory /var/log. We
recommend that you place BGP tracing output in the file bgp-log.
files number—(Optional) Maximum number of trace files. When a trace file named
trace-file reaches its maximum size, it is renamed trace-file.0, then trace-file.1, and
so on, until the maximum number of trace files is reached. Then, the oldest trace file
is overwritten.
If you specify a maximum number of files, you must also specify a maximum file size
with the size option.
Range: 2 through 1000 files
Default: 10 files
flag—Tracing operation to perform. To specify more than one tracing operation, include
multiple flag statements.
• 4byte-as—4-byte AS events.
• damping—Damping operations.
• keepalive—BGP keepalive messages. If you enable the the BGP update flag only, received
keepalive messages do not generate a trace message.
• open—Open packets. These packets are sent between peers when they are establishing
a connection.
Default: If you do not specify this option, only unusual or abnormal operations are traced.
• state—State transitions
flag-modifier—(Optional) Modifier for the tracing flag. You can specify one or more of
these modifiers:
• filter—Provide filter trace information. Applies only to route and damping tracing flags.
size size—(Optional) Maximum size of each trace file, in kilobytes (KB), megabytes (MB),
or gigabytes (GB). When a trace file named trace-file reaches this size, it is renamed
trace-file.0. When the trace-file again reaches its maximum size, trace-file.0 is renamed
trace-file.1 and trace-file is renamed trace-file.0. This renaming scheme continues
until the maximum number of trace files is reached. Then, the oldest trace file is
overwritten.
If you specify a maximum file size, you also must specify a maximum number of trace
files with the files option.
Syntax: xk to specify KB, xm to specify MB, or xg to specify GB
Range: 10 KB through the maximum file size supported on your system
Default: 128 KB
Required Privilege routing and trace—To view this statement in the configuration.
Level routing-control and trace-control—To add this statement to the configuration.
• Configuring OSPF Refresh and Flooding Reduction in Stable Topologies on page 565
type
When configuring a BGP group, you can indicate whether the group is an IBGP group or
an EBGP group. All peers in an IBGP group are in the same AS, while peers in an EBGP
group are in different ASs and normally share a subnet.
vpn-apply-export
Syntax vpn-apply-export;
Description Apply a BGP export policy in addition to a VPN routing and forwarding (VRF) export policy
to routes.
Indexes
• Index on page 1395
• Index of Statements and Commands on page 1423
minimum-interval multihop
usage guidelines.........................................................1244 BGP..................................................................................1105
minimum-interval statement multihop statement..........................................................1358
BFD....................................................................................155 usage guidelines.........................................................1105
usage guidelines.....................................................81 multipath statement.........................................................1359
BGP...................................................................................1313 usage guidelines...........................................................1115
IS-IS..................................................................................437 multiple active routes..............................................................6
OSPF................................................................................756 multiplier statement
usage guidelines..................................................618 BFD....................................................................................155
RIP.....................................................................................870 usage guidelines.....................................................81
usage guidelines.................................................844 BFD (BGP)
minimum-receive-interval statement usage guidelines................................................1244
BFD....................................................................................155 BGP...................................................................................1313
usage guidelines.....................................................81 IS-IS..................................................................................437
BFD (BGP) usage guidelines.................................................356
usage guidelines................................................1244 OSPF................................................................................756
BGP...................................................................................1313 usage guidelines..................................................618
IS-IS..................................................................................437 RIP.....................................................................................870
usage guidelines.................................................356 usage guidelines.................................................844
OSPF................................................................................756 multiprotocol BGP
RIP.....................................................................................870 IPv6 example...............................................................1196
usage guidelines.................................................844 multiprotocol BGP (MP-BGP)............................1190, 1327
minimum-receive-ttl statement Multitopology Routing
BFD....................................................................................155 BGP
BFD (static routes) configuring..............................................................321
usage guidelines.....................................................81 community statement..............................................326
MP-BGP...............................................................60, 1190, 1327 filter-based forwarding...............................................321
MPLS OSPF
ultimate-hop popping..............................................1325 configuring..............................................................314
mpls.0 routing table.................................................................4 overview.........................................................................309
MSDP static routes...................................................................320
configuring multiple instances...............................256 topologies
MSDP routing instances, minimum configuring..............................................................313
configuration.....................................................................246
mtu-discovery statement...............................................1356 N
multiarea adjacency neighbor discovery
OSPF................................................................................533 autoconfiguration.......................................................944
multiarea network................................................................516 autonomous........................................................946
multicast basics...............................................................................939
scoping.............................................................................126 configuration statements..................................34, 941
multicast statement............................................................194 enabling..........................................................................942
router discovery...........................................................934 frequency.......................................................................945
usage guidelines.................................................924 hop limit..........................................................................943
routing options MTU option....................................................................943
usage guidelines..................................................126 neighbor solicitation, frequency............................945
multicast-rpf-routes statement.....................................470 onlink...............................................................................946
IS-IS preferred lifetime.........................................................947
usage guidelines................................................400 prefix information.......................................................946
reachable time.............................................................945
tracing operations U
BGP.....................................................................1285, 1388 unicast reverse path check................................................231
IS-IS........................................................................416, 489 unicast RPF
neighbor discovery.....................................................958 example configuration................................................132
OSPF......................................................................738, 824 fail filters...........................................................................132
RIP..........................................................................863, 890 unicast-reverse-path statement.....................................231
RIPng........................................................................901, 917 usage guidelines............................................................131
router discovery.................................................925, 936 unnumbered Ethernet interfaces
routing protocols................................................138, 229 as next-hop interface for static routes
tracing ospf configuration example.........................................67
configuring......................................................................739 unnumbered SONET/SDH interfaces
traffic control as next-hop interface for static routes..................64
OSPF................................................................................566 update (tracing flag)
traffic engineering neighbor discovery.....................................................958
advertising LSP metric in summary LSAs.........648 RIP....................................................................................890
database credibility value.......................................648 RIPng.................................................................................917
enabling..........................................................................650 update messages
ignoring RSVP LSP metrics.....................................648 BGP...................................................................................979
igp shortcuts.................................................................648 update-interval statement
metric....................................................................648, 654 RIP.....................................................................................892
ospf protocol preference.........................................648 usage guidelines.................................................853
support...........................................................................648 RIPng.................................................................................919
traffic engineering database usage guidelines.................................................898
OSPF support...............................................................828
traffic-engineering statement V
IS-IS...................................................................................491 valid-lifetime statement...................................................959
usage guidelines.................................................398 usage guidelines..........................................................947
lsp-metric-info-summary validation statement
usage guidelines.................................................650 usage guidelines............................................................113
OSPF................................................................................828 verification
OSPF passive TE mode............................................830 BFD for IS-IS..................................................................362
usage guidelines.................................................656 BGP session flap prevention.................................1028
shortcuts BMP.................................................................................1284
usage guidelines.................................................650 IS-IS policy......................................................................431
usage guidelines..........................................................650 multicast topology for IS-IS.....................................378
transit areas network interfaces......................................................1277
overview.........................................................................500 OSPF.........................................................................717, 735
transit-delay statement.....................................................831 OSPF host reachability..............................................747
usage guidelines...........................................................610 OSPF neighbors............................................................745
transmit-interval statement............................................832 OSPF policy..........................................................723, 728
BFD..............................................................................21, 155 OSPF routes...................................................................746
BGP...................................................................................1313 OSPF-enabled interfaces.........................................744
IS-IS..................................................................................437 tracing.............................................................................1291
trigger (tracing flag)..................................................890, 917 version statement
neighbor discovery.....................................................958 BFD....................................................................................155
tunnel-type statement........................................................231 usage guidelines.....................................................81
usage guidelines...........................................................134 BFD (BGP)
type statement.....................................................................1391 usage guidelines................................................1244
type-7 statement.................................................................833 BGP...................................................................................1313
IS-IS..................................................................................437
usage guidelines.................................................356
OSPF................................................................................756
RIP.....................................................................................870
usage guidelines.................................................844
virtual link, through the backbone area........................513
virtual links
configuring......................................................................519
overview.........................................................................498
virtual-link statement........................................................834
usage guidelines...........................................................519
vlan-model statement......................................................304
VPLS
routing instances
minimum configuration....................................249
vpn-apply-export statement.........................................1392
VPNs
BGP
preventing session flaps................................1023
VRF export policy................................................................1392
VRF table label, configuring.............................................283
VRF target, configuring......................................................283
vrf-export statement..........................................................303
usage guidelines...........................................................273
vrf-import statement.........................................................303
usage guidelines...........................................................273
vrf-table-label statement................................................304
usage guidelines..........................................................283
vrf-target statement...........................................................305
usage guidelines..........................................................283
W
warning (system logging severity level).......................197
wide-metrics-only statement.........................................492
usage guidelines..........................................................393
M multipath statement.........................................................1359
managed-configuration statement..............................952 multiplier statement
martians statement.............................................................185 BFD....................................................................................155
max-advertisement-interval statement...........932, 953 BGP...................................................................................1313
max-areas statement........................................................468 IS-IS..................................................................................437
max-retrans-time statement.........................................880 OSPF................................................................................756
maximum-paths statement.............................................187 RIP.....................................................................................870
maximum-prefixes statement........................................189
md5 statement N
OSPF................................................................................788 neighbor statement
med-igp-update-interval statement............................190 BGP.................................................................................1360
med-plus-igp statement...................................................1371 OSPF.................................................................................792
mesh-group statement.....................................................469 RIP....................................................................................884
message-size statement...................................................881 RIPng.................................................................................912
metric statement...................................................................191 neighbor-discovery statement........................................967
aggregate routes...........................................................192 network-summary-export statement..........................793
generated routes...........................................................192 network-summary-import statement.........................794
IS-IS..................................................................................470 next-hop statement.............................................................195
OSPF................................................................................789 no-adaptation statement
qualified next hop........................................................193 BFD....................................................................................155
static routes....................................................................192 BGP...................................................................................1313
metric-in statement IS-IS..................................................................................437
RIP.....................................................................................882 OSPF................................................................................756
RIPng................................................................................910 RIP.....................................................................................870
metric-out statement no-adjacency-down-notification statement..............471
BGP.................................................................................1354 no-adjacency-holddown statement..............................471
RIP.....................................................................................883 no-advertise-peer-as statement.................................1363
RIPng..................................................................................911 no-aggregator-id statement..........................................1364
metric-type statement........................................................791 no-authentication-check statement............................472
min-advertisement-interval statement............933, 953 no-check-zero statement.................................................872
minimum-interval statement no-client-reflect statement...........................................1365
BFD....................................................................................155 no-csnp-authentication statement..............................472
BGP...................................................................................1313 no-eligible-backup statement........................................473
IS-IS..................................................................................437 OSPF................................................................................795
OSPF................................................................................756 no-hello-authentication statement..............................473
RIP.....................................................................................870 no-install statement............................................................179
minimum-receive-interval statement no-interface-state-traps statement.............................796
BFD....................................................................................155 no-ipv4-multicast statement..........................................474
BGP...................................................................................1313 no-ipv4-routing statement...............................................474
IS-IS..................................................................................437 no-ipv6-multicast statement..........................................475
OSPF................................................................................756 no-ipv6-routing statement...............................................475
RIP.....................................................................................870 no-ipv6-unicast statement..............................................476
minimum-receive-ttl statement no-link-mtu statement......................................................952
BFD....................................................................................155 no-managed-configuration statement.......................952
mtu-discovery statement...............................................1356 no-neighbor-down-notification statement...............796
multicast statement............................................................194 no-nssa-abr statement......................................................797
router discovery...........................................................934 no-psnp-authentication statement..............................476
multicast-rpf-routes statement.....................................470 no-readvertise statement.................................................205
multihop statement..........................................................1358 no-retain statement.............................................................210
RIP..........................................................................863, 890
RIPng........................................................................901, 917
router discovery...........................................................936
routing protocols.........................................................229
Secure Neighbor Discovery.......................................971
traffic-engineering statement
IS-IS...................................................................................491
OSPF................................................................................828
OSPF passive TE mode............................................830
transit-delay statement.....................................................831
transmit-interval statement............................................832
BFD..............................................................................21, 155
BGP...................................................................................1313
IS-IS..................................................................................437
tunnel-type statement........................................................231
type statement.....................................................................1391
type-7 statement.................................................................833
U
unicast-reverse-path statement.....................................231
update-interval statement
RIP.....................................................................................892
RIPng.................................................................................919
V
valid-lifetime statement...................................................959
version statement
BFD....................................................................................155
BGP...................................................................................1313
IS-IS..................................................................................437
OSPF................................................................................756
RIP.....................................................................................870
virtual-link statement........................................................834
vlan-model statement......................................................304
vpn-apply-export statement.........................................1392
vrf-export statement..........................................................303
vrf-import statement.........................................................303
vrf-table-label statement................................................304
vrf-target statement...........................................................305
W
wide-metrics-only statement.........................................492