]>
Commit | Line | Data |
---|---|---|
11ab5329 | 1 | .. _ospfv2: |
42fc5d26 QY |
2 | |
3 | ****** | |
4 | OSPFv2 | |
5 | ****** | |
6 | ||
c1a54c05 QY |
7 | :abbr:`OSPF (Open Shortest Path First)` version 2 is a routing protocol which |
8 | is described in :rfc:`2328`. OSPF is an :abbr:`IGP (Interior Gateway | |
9 | Protocol)`. Compared with :abbr:`RIP`, :abbr:`OSPF` can provide scalable | |
10 | network support and faster convergence times. OSPF is widely used in large | |
11 | networks such as :abbr:`ISP (Internet Service Provider)` backbone and | |
12 | enterprise networks. | |
42fc5d26 | 13 | |
c1a54c05 | 14 | .. include:: ospf_fundamentals.rst |
42fc5d26 | 15 | |
c1a54c05 | 16 | .. _configuring-ospfd: |
42fc5d26 | 17 | |
e6f1b831 QY |
18 | Configuring OSPF |
19 | ================ | |
42fc5d26 | 20 | |
e6f1b831 QY |
21 | *ospfd* accepts all :ref:`common-invocation-options`. |
22 | ||
23 | .. option:: -n, --instance | |
24 | ||
25 | Specify the instance number for this invocation of *ospfd*. | |
26 | ||
27 | .. option:: -a, --apiserver | |
28 | ||
37f92f22 | 29 | Enable the OSPF API server. This is required to use ``ospfclient``. |
e6f1b831 QY |
30 | |
31 | *ospfd* must acquire interface information from *zebra* in order to function. | |
32 | Therefore *zebra* must be running before invoking *ospfd*. Also, if *zebra* is | |
33 | restarted then *ospfd* must be too. | |
42fc5d26 | 34 | |
c1a54c05 | 35 | Like other daemons, *ospfd* configuration is done in :abbr:`OSPF` specific |
e6f1b831 QY |
36 | configuration file :file:`ospfd.conf` when the integrated config is not used. |
37 | ||
38 | .. _ospf-multi-instance: | |
39 | ||
40 | Multi-instance Support | |
41 | ---------------------- | |
42 | ||
43 | OSPF supports multiple instances. Each instance is identified by a positive | |
44 | nonzero integer that must be provided when adding configuration items specific | |
45 | to that instance. Enabling instances is done with :file:`/etc/frr/daemons` in | |
46 | the following manner: | |
47 | ||
48 | :: | |
49 | ||
50 | ... | |
51 | ospfd=yes | |
52 | ospfd_instances=1,5,6 | |
53 | ... | |
54 | ||
55 | The ``ospfd_instances`` variable controls which instances are started and what | |
56 | their IDs are. In this example, after starting FRR you should see the following | |
57 | processes: | |
58 | ||
59 | .. code-block:: shell | |
60 | ||
61 | # ps -ef | grep "ospfd" | |
62 | frr 11816 1 0 17:30 ? 00:00:00 /usr/lib/frr/ospfd --daemon -A 127.0.0.1 -n 1 | |
63 | frr 11822 1 0 17:30 ? 00:00:00 /usr/lib/frr/ospfd --daemon -A 127.0.0.1 -n 2 | |
64 | frr 11828 1 0 17:30 ? 00:00:00 /usr/lib/frr/ospfd --daemon -A 127.0.0.1 -n 3 | |
65 | ||
66 | ||
67 | The instance number should be specified in the config when addressing a particular instance: | |
68 | ||
69 | .. code-block:: frr | |
70 | ||
71 | router ospf 5 | |
349ee664 | 72 | ospf router-id 1.2.3.4 |
e6f1b831 QY |
73 | area 0.0.0.0 authentication message-digest |
74 | ... | |
42fc5d26 | 75 | |
0efdf0fe | 76 | .. _ospf-router: |
42fc5d26 | 77 | |
e6f1b831 QY |
78 | Routers |
79 | ------- | |
42fc5d26 | 80 | |
e6f1b831 | 81 | To start OSPF process you have to specify the OSPF router. |
42fc5d26 | 82 | |
5ebb2239 | 83 | .. clicmd:: router ospf [{(1-65535)|vrf NAME}] |
42fc5d26 | 84 | |
42fc5d26 | 85 | |
e6f1b831 | 86 | Enable or disable the OSPF process. |
42fc5d26 | 87 | |
5ebb2239 | 88 | Multiple instances don't support `vrf NAME`. |
89 | ||
c1a54c05 | 90 | .. clicmd:: ospf router-id A.B.C.D |
42fc5d26 | 91 | |
42fc5d26 | 92 | |
e6f1b831 QY |
93 | This sets the router-ID of the OSPF process. The router-ID may be an IP |
94 | address of the router, but need not be - it can be any arbitrary 32bit | |
95 | number. However it MUST be unique within the entire OSPF domain to the OSPF | |
96 | speaker - bad things will happen if multiple OSPF speakers are configured | |
97 | with the same router-ID! If one is not specified then *ospfd* will obtain a | |
98 | router-ID automatically from *zebra*. | |
42fc5d26 | 99 | |
c1a54c05 QY |
100 | .. clicmd:: ospf abr-type TYPE |
101 | ||
c1a54c05 | 102 | |
6ee602cd QY |
103 | `type` can be cisco|ibm|shortcut|standard. The "Cisco" and "IBM" types |
104 | are equivalent. | |
105 | ||
106 | The OSPF standard for ABR behaviour does not allow an ABR to consider | |
107 | routes through non-backbone areas when its links to the backbone are | |
108 | down, even when there are other ABRs in attached non-backbone areas | |
109 | which still can reach the backbone - this restriction exists primarily | |
110 | to ensure routing-loops are avoided. | |
111 | ||
d1e7591e QY |
112 | With the "Cisco" or "IBM" ABR type, the default in this release of FRR, this |
113 | restriction is lifted, allowing an ABR to consider summaries learned from | |
114 | other ABRs through non-backbone areas, and hence route via non-backbone | |
115 | areas as a last resort when, and only when, backbone links are down. | |
6ee602cd QY |
116 | |
117 | Note that areas with fully-adjacent virtual-links are considered to be | |
118 | "transit capable" and can always be used to route backbone traffic, and | |
119 | hence are unaffected by this setting (:clicmd:`area A.B.C.D virtual-link A.B.C.D`). | |
120 | ||
121 | More information regarding the behaviour controlled by this command can | |
122 | be found in :rfc:`3509`, and :t:`draft-ietf-ospf-shortcut-abr-02.txt`. | |
123 | ||
124 | Quote: "Though the definition of the :abbr:`ABR (Area Border Router)` | |
125 | in the OSPF specification does not require a router with multiple | |
126 | attached areas to have a backbone connection, it is actually | |
127 | necessary to provide successful routing to the inter-area and | |
128 | external destinations. If this requirement is not met, all traffic | |
129 | destined for the areas not connected to such an ABR or out of the | |
130 | OSPF domain, is dropped. This document describes alternative ABR | |
131 | behaviors implemented in Cisco and IBM routers." | |
42fc5d26 | 132 | |
c1a54c05 | 133 | .. clicmd:: ospf rfc1583compatibility |
a8c90e15 | 134 | |
42fc5d26 | 135 | |
d1e7591e | 136 | :rfc:`2328`, the successor to :rfc:`1583`, suggests according |
c1a54c05 QY |
137 | to section G.2 (changes) in section 16.4 a change to the path |
138 | preference algorithm that prevents possible routing loops that were | |
139 | possible in the old version of OSPFv2. More specifically it demands | |
140 | that inter-area paths and intra-area backbone path are now of equal preference | |
141 | but still both preferred to external paths. | |
142 | ||
143 | This command should NOT be set normally. | |
144 | ||
c1a54c05 QY |
145 | .. clicmd:: log-adjacency-changes [detail] |
146 | ||
c1a54c05 QY |
147 | |
148 | Configures ospfd to log changes in adjacency. With the optional | |
149 | detail argument, all changes in adjacency status are shown. Without detail, | |
150 | only changes to full or regressions are shown. | |
151 | ||
29ec6244 | 152 | .. clicmd:: passive-interface default |
c1a54c05 | 153 | |
29ec6244 IR |
154 | Make all interfaces that belong to this router passive by default. For the |
155 | description of passive interface look at :clicmd:`ip ospf passive [A.B.C.D]`. | |
156 | Per-interface configuration takes precedence over the default value. | |
c1a54c05 | 157 | |
fc0a7cad | 158 | .. clicmd:: timers throttle spf (0-600000) (0-600000) (0-600000) |
c1a54c05 | 159 | |
c1a54c05 QY |
160 | This command sets the initial `delay`, the `initial-holdtime` |
161 | and the `maximum-holdtime` between when SPF is calculated and the | |
162 | event which triggered the calculation. The times are specified in | |
163 | milliseconds and must be in the range of 0 to 600000 milliseconds. | |
164 | ||
165 | The `delay` specifies the minimum amount of time to delay SPF | |
166 | calculation (hence it affects how long SPF calculation is delayed after | |
167 | an event which occurs outside of the holdtime of any previous SPF | |
168 | calculation, and also serves as a minimum holdtime). | |
169 | ||
d1e7591e | 170 | Consecutive SPF calculations will always be separated by at least |
c1a54c05 QY |
171 | 'hold-time' milliseconds. The hold-time is adaptive and initially is |
172 | set to the `initial-holdtime` configured with the above command. | |
173 | Events which occur within the holdtime of the previous SPF calculation | |
174 | will cause the holdtime to be increased by `initial-holdtime`, bounded | |
175 | by the `maximum-holdtime` configured with this command. If the adaptive | |
d1e7591e | 176 | hold-time elapses without any SPF-triggering event occurring then |
c1a54c05 | 177 | the current holdtime is reset to the `initial-holdtime`. The current |
6ee602cd | 178 | holdtime can be viewed with :clicmd:`show ip ospf`, where it is expressed as |
c1a54c05 | 179 | a multiplier of the `initial-holdtime`. |
42fc5d26 | 180 | |
9eb95b3b | 181 | .. code-block:: frr |
c1a54c05 QY |
182 | |
183 | router ospf | |
184 | timers throttle spf 200 400 10000 | |
185 | ||
186 | ||
187 | In this example, the `delay` is set to 200ms, the initial holdtime is set to | |
188 | 400ms and the `maximum holdtime` to 10s. Hence there will always be at least | |
189 | 200ms between an event which requires SPF calculation and the actual SPF | |
d1e7591e | 190 | calculation. Further consecutive SPF calculations will always be separated |
c1a54c05 QY |
191 | by between 400ms to 10s, the hold-time increasing by 400ms each time an |
192 | SPF-triggering event occurs within the hold-time of the previous SPF | |
193 | calculation. | |
42fc5d26 | 194 | |
56f0bea7 | 195 | This command supersedes the *timers spf* command in previous FRR |
c1a54c05 | 196 | releases. |
42fc5d26 | 197 | |
c1a54c05 | 198 | .. clicmd:: max-metric router-lsa [on-startup|on-shutdown] (5-86400) |
42fc5d26 | 199 | |
c1a54c05 QY |
200 | .. clicmd:: max-metric router-lsa administrative |
201 | ||
42fc5d26 | 202 | |
c1a54c05 QY |
203 | This enables :rfc:`3137` support, where the OSPF process describes its |
204 | transit links in its router-LSA as having infinite distance so that other | |
205 | routers will avoid calculating transit paths through the router while still | |
206 | being able to reach networks through the router. | |
42fc5d26 | 207 | |
c1a54c05 QY |
208 | This support may be enabled administratively (and indefinitely) or |
209 | conditionally. Conditional enabling of max-metric router-lsas can be for a | |
210 | period of seconds after startup and/or for a period of seconds prior to | |
211 | shutdown. | |
42fc5d26 | 212 | |
c1a54c05 QY |
213 | Enabling this for a period after startup allows OSPF to converge fully first |
214 | without affecting any existing routes used by other routers, while still | |
215 | allowing any connected stub links and/or redistributed routes to be | |
216 | reachable. Enabling this for a period of time in advance of shutdown allows | |
217 | the router to gracefully excuse itself from the OSPF domain. | |
42fc5d26 | 218 | |
c1a54c05 QY |
219 | Enabling this feature administratively allows for administrative |
220 | intervention for whatever reason, for an indefinite period of time. Note | |
221 | that if the configuration is written to file, this administrative form of | |
222 | the stub-router command will also be written to file. If *ospfd* is | |
223 | restarted later, the command will then take effect until manually | |
224 | deconfigured. | |
42fc5d26 | 225 | |
c1a54c05 QY |
226 | Configured state of this feature as well as current status, such as the |
227 | number of second remaining till on-startup or on-shutdown ends, can be | |
6ee602cd | 228 | viewed with the :clicmd:`show ip ospf` command. |
42fc5d26 | 229 | |
c1a54c05 | 230 | .. clicmd:: auto-cost reference-bandwidth (1-4294967) |
42fc5d26 | 231 | |
42fc5d26 | 232 | |
c1a54c05 QY |
233 | This sets the reference |
234 | bandwidth for cost calculations, where this bandwidth is considered | |
235 | equivalent to an OSPF cost of 1, specified in Mbits/s. The default is | |
236 | 100Mbit/s (i.e. a link of bandwidth 100Mbit/s or higher will have a | |
237 | cost of 1. Cost of lower bandwidth links will be scaled with reference | |
238 | to this cost). | |
42fc5d26 | 239 | |
c1a54c05 QY |
240 | This configuration setting MUST be consistent across all routers within the |
241 | OSPF domain. | |
42fc5d26 | 242 | |
c1a54c05 | 243 | .. clicmd:: network A.B.C.D/M area A.B.C.D |
42fc5d26 | 244 | |
c1a54c05 | 245 | .. clicmd:: network A.B.C.D/M area (0-4294967295) |
42fc5d26 | 246 | |
42fc5d26 | 247 | |
42fc5d26 | 248 | |
c1a54c05 QY |
249 | This command specifies the OSPF enabled interface(s). If the interface has |
250 | an address from range 192.168.1.0/24 then the command below enables ospf | |
251 | on this interface so router can provide network information to the other | |
252 | ospf routers via this interface. | |
42fc5d26 | 253 | |
9eb95b3b | 254 | .. code-block:: frr |
a8c90e15 | 255 | |
9eb95b3b QY |
256 | router ospf |
257 | network 192.168.1.0/24 area 0.0.0.0 | |
42fc5d26 | 258 | |
d1e7591e | 259 | Prefix length in interface must be equal or bigger (i.e. smaller network) than |
c1a54c05 QY |
260 | prefix length in network statement. For example statement above doesn't enable |
261 | ospf on interface with address 192.168.1.1/23, but it does on interface with | |
262 | address 192.168.1.129/25. | |
42fc5d26 | 263 | |
c1a54c05 QY |
264 | Note that the behavior when there is a peer address |
265 | defined on an interface changed after release 0.99.7. | |
266 | Currently, if a peer prefix has been configured, | |
267 | then we test whether the prefix in the network command contains | |
268 | the destination prefix. Otherwise, we test whether the network command prefix | |
269 | contains the local address prefix of the interface. | |
42fc5d26 | 270 | |
c1a54c05 | 271 | In some cases it may be more convenient to enable OSPF on a per |
6ee602cd | 272 | interface/subnet basis (:clicmd:`ip ospf area AREA [ADDR]`). |
42fc5d26 | 273 | |
dfb2ee85 JU |
274 | .. clicmd:: proactive-arp |
275 | ||
dfb2ee85 JU |
276 | |
277 | This command enables or disables sending ARP requests to update neighbor | |
278 | table entries. It speeds up convergence for /32 networks on a P2P | |
b832909b | 279 | connection. |
dfb2ee85 JU |
280 | |
281 | This feature is enabled by default. | |
42fc5d26 | 282 | |
f91ce319 MR |
283 | .. clicmd:: clear ip ospf [(1-65535)] process |
284 | ||
285 | This command can be used to clear the ospf process data structures. This | |
286 | will clear the ospf neighborship as well and it will get re-established. | |
287 | This will clear the LSDB too. This will be helpful when there is a change | |
288 | in router-id and if user wants the router-id change to take effect, user can | |
289 | use this cli instead of restarting the ospfd daemon. | |
290 | ||
f91ce319 MR |
291 | .. clicmd:: clear ip ospf [(1-65535)] neighbor |
292 | ||
293 | This command can be used to clear the ospf neighbor data structures. This | |
294 | will clear the ospf neighborship and it will get re-established. This | |
295 | command can be used when the neighbor state get stuck at some state and | |
296 | this can be used to recover it from that state. | |
297 | ||
25d6c967 | 298 | .. clicmd:: maximum-paths (1-64) |
3d5b9855 | 299 | |
25d6c967 IR |
300 | Use this command to control the maximum number of equal cost paths to reach |
301 | a specific destination. The upper limit may differ if you change the value | |
302 | of MULTIPATH_NUM during compilation. The default is MULTIPATH_NUM (64). | |
3d5b9855 | 303 | |
44db98df PR |
304 | .. clicmd:: write-multiplier (1-100) |
305 | ||
306 | Use this command to tune the amount of work done in the packet read and | |
307 | write threads before relinquishing control. The parameter is the number | |
308 | of packets to process before returning. The defult value of this parameter | |
309 | is 20. | |
310 | ||
0efdf0fe | 311 | .. _ospf-area: |
42fc5d26 | 312 | |
e6f1b831 QY |
313 | Areas |
314 | ----- | |
42fc5d26 | 315 | |
c1a54c05 | 316 | .. clicmd:: area A.B.C.D range A.B.C.D/M |
42fc5d26 | 317 | |
c1a54c05 | 318 | .. clicmd:: area (0-4294967295) range A.B.C.D/M |
42fc5d26 | 319 | |
42fc5d26 | 320 | |
42fc5d26 | 321 | |
9eb95b3b QY |
322 | Summarize intra area paths from specified area into one Type-3 summary-LSA |
323 | announced to other areas. This command can be used only in ABR and ONLY | |
d1e7591e | 324 | router-LSAs (Type-1) and network-LSAs (Type-2) (i.e. LSAs with scope area) can |
9eb95b3b QY |
325 | be summarized. Type-5 AS-external-LSAs can't be summarized - their scope is AS. |
326 | Summarizing Type-7 AS-external-LSAs isn't supported yet by FRR. | |
42fc5d26 | 327 | |
9eb95b3b | 328 | .. code-block:: frr |
42fc5d26 | 329 | |
9eb95b3b QY |
330 | router ospf |
331 | network 192.168.1.0/24 area 0.0.0.0 | |
332 | network 10.0.0.0/8 area 0.0.0.10 | |
333 | area 0.0.0.10 range 10.0.0.0/8 | |
a8c90e15 | 334 | |
42fc5d26 | 335 | |
9eb95b3b QY |
336 | With configuration above one Type-3 Summary-LSA with routing info 10.0.0.0/8 is |
337 | announced into backbone area if area 0.0.0.10 contains at least one intra-area | |
d1e7591e | 338 | network (i.e. described with router or network LSA) from this range. |
42fc5d26 | 339 | |
c1a54c05 | 340 | .. clicmd:: area A.B.C.D range IPV4_PREFIX not-advertise |
42fc5d26 | 341 | |
42fc5d26 | 342 | |
d1e7591e | 343 | Instead of summarizing intra area paths filter them - i.e. intra area paths from this |
c1a54c05 QY |
344 | range are not advertised into other areas. |
345 | This command makes sense in ABR only. | |
42fc5d26 | 346 | |
c1a54c05 | 347 | .. clicmd:: area A.B.C.D range IPV4_PREFIX substitute IPV4_PREFIX |
42fc5d26 | 348 | |
42fc5d26 | 349 | |
c1a54c05 | 350 | Substitute summarized prefix with another prefix. |
42fc5d26 | 351 | |
9eb95b3b | 352 | .. code-block:: frr |
42fc5d26 | 353 | |
9eb95b3b QY |
354 | router ospf |
355 | network 192.168.1.0/24 area 0.0.0.0 | |
356 | network 10.0.0.0/8 area 0.0.0.10 | |
357 | area 0.0.0.10 range 10.0.0.0/8 substitute 11.0.0.0/8 | |
a8c90e15 | 358 | |
42fc5d26 | 359 | |
c1a54c05 | 360 | One Type-3 summary-LSA with routing info 11.0.0.0/8 is announced into backbone area if |
d1e7591e | 361 | area 0.0.0.10 contains at least one intra-area network (i.e. described with router-LSA or |
c1a54c05 QY |
362 | network-LSA) from range 10.0.0.0/8. |
363 | This command makes sense in ABR only. | |
42fc5d26 | 364 | |
c1a54c05 | 365 | .. clicmd:: area A.B.C.D virtual-link A.B.C.D |
42fc5d26 | 366 | |
c1a54c05 | 367 | .. clicmd:: area (0-4294967295) virtual-link A.B.C.D |
42fc5d26 | 368 | |
42fc5d26 | 369 | |
42fc5d26 | 370 | |
c1a54c05 | 371 | .. clicmd:: area A.B.C.D shortcut |
42fc5d26 | 372 | |
c1a54c05 | 373 | .. clicmd:: area (0-4294967295) shortcut |
42fc5d26 | 374 | |
42fc5d26 | 375 | |
42fc5d26 | 376 | |
c1a54c05 QY |
377 | Configure the area as Shortcut capable. See :rfc:`3509`. This requires |
378 | that the 'abr-type' be set to 'shortcut'. | |
42fc5d26 | 379 | |
c1a54c05 | 380 | .. clicmd:: area A.B.C.D stub |
42fc5d26 | 381 | |
c1a54c05 | 382 | .. clicmd:: area (0-4294967295) stub |
42fc5d26 | 383 | |
42fc5d26 | 384 | |
42fc5d26 | 385 | |
c1a54c05 QY |
386 | Configure the area to be a stub area. That is, an area where no router |
387 | originates routes external to OSPF and hence an area where all external | |
388 | routes are via the ABR(s). Hence, ABRs for such an area do not need | |
389 | to pass AS-External LSAs (type-5s) or ASBR-Summary LSAs (type-4) into the | |
390 | area. They need only pass Network-Summary (type-3) LSAs into such an area, | |
391 | along with a default-route summary. | |
42fc5d26 | 392 | |
c1a54c05 | 393 | .. clicmd:: area A.B.C.D stub no-summary |
42fc5d26 | 394 | |
c1a54c05 | 395 | .. clicmd:: area (0-4294967295) stub no-summary |
42fc5d26 | 396 | |
42fc5d26 | 397 | |
42fc5d26 | 398 | |
c1a54c05 QY |
399 | Prevents an *ospfd* ABR from injecting inter-area |
400 | summaries into the specified stub area. | |
42fc5d26 | 401 | |
8807d9f7 | 402 | .. clicmd:: area A.B.C.D nssa |
403 | ||
404 | .. clicmd:: area (0-4294967295) nssa | |
405 | ||
406 | Configure the area to be a NSSA (Not-So-Stubby Area). This is an area that | |
407 | allows OSPF to import external routes into a stub area via a new LSA type | |
408 | (type 7). An NSSA autonomous system boundary router (ASBR) will generate this | |
409 | type of LSA. The area border router (ABR) translates the LSA type 7 into LSA | |
410 | type 5, which is propagated into the OSPF domain. NSSA areas are defined in | |
411 | RFC 3101. | |
412 | ||
d71494e6 | 413 | .. clicmd:: area A.B.C.D nssa suppress-fa |
414 | ||
415 | .. clicmd:: area (0-4294967295) nssa suppress-fa | |
416 | ||
417 | Configure the router to set the forwarding address to 0.0.0.0 in all LSA type 5 | |
418 | translated from LSA type 7. The router needs to be elected the translator of the | |
419 | area for this command to take effect. This feature causes routers that are | |
420 | configured not to advertise forwarding addresses into the backbone to direct | |
421 | forwarded traffic to the NSSA ABR translator. | |
422 | ||
c1a54c05 | 423 | .. clicmd:: area A.B.C.D default-cost (0-16777215) |
42fc5d26 | 424 | |
42fc5d26 | 425 | |
c1a54c05 | 426 | Set the cost of default-summary LSAs announced to stubby areas. |
42fc5d26 | 427 | |
c1a54c05 | 428 | .. clicmd:: area A.B.C.D export-list NAME |
42fc5d26 | 429 | |
c1a54c05 | 430 | .. clicmd:: area (0-4294967295) export-list NAME |
42fc5d26 | 431 | |
42fc5d26 | 432 | |
42fc5d26 | 433 | |
c1a54c05 QY |
434 | Filter Type-3 summary-LSAs announced to other areas originated from intra- |
435 | area paths from specified area. | |
42fc5d26 | 436 | |
9eb95b3b | 437 | .. code-block:: frr |
a8c90e15 | 438 | |
9eb95b3b QY |
439 | router ospf |
440 | network 192.168.1.0/24 area 0.0.0.0 | |
441 | network 10.0.0.0/8 area 0.0.0.10 | |
442 | area 0.0.0.10 export-list foo | |
443 | ! | |
444 | access-list foo permit 10.10.0.0/16 | |
445 | access-list foo deny any | |
42fc5d26 | 446 | |
c1a54c05 QY |
447 | With example above any intra-area paths from area 0.0.0.10 and from range |
448 | 10.10.0.0/16 (for example 10.10.1.0/24 and 10.10.2.128/30) are announced into | |
449 | other areas as Type-3 summary-LSA's, but any others (for example 10.11.0.0/16 | |
450 | or 10.128.30.16/30) aren't. | |
42fc5d26 | 451 | |
c1a54c05 QY |
452 | This command is only relevant if the router is an ABR for the specified |
453 | area. | |
42fc5d26 | 454 | |
c1a54c05 | 455 | .. clicmd:: area A.B.C.D import-list NAME |
42fc5d26 | 456 | |
c1a54c05 | 457 | .. clicmd:: area (0-4294967295) import-list NAME |
42fc5d26 | 458 | |
42fc5d26 | 459 | |
42fc5d26 | 460 | |
9eb95b3b QY |
461 | Same as export-list, but it applies to paths announced into specified area |
462 | as Type-3 summary-LSAs. | |
42fc5d26 | 463 | |
c1a54c05 | 464 | .. clicmd:: area A.B.C.D filter-list prefix NAME in |
42fc5d26 | 465 | |
c1a54c05 | 466 | .. clicmd:: area A.B.C.D filter-list prefix NAME out |
42fc5d26 | 467 | |
c1a54c05 | 468 | .. clicmd:: area (0-4294967295) filter-list prefix NAME in |
42fc5d26 | 469 | |
c1a54c05 | 470 | .. clicmd:: area (0-4294967295) filter-list prefix NAME out |
42fc5d26 | 471 | |
42fc5d26 | 472 | |
42fc5d26 | 473 | |
42fc5d26 | 474 | |
42fc5d26 | 475 | |
9eb95b3b QY |
476 | Filtering Type-3 summary-LSAs to/from area using prefix lists. This command |
477 | makes sense in ABR only. | |
42fc5d26 | 478 | |
c1a54c05 | 479 | .. clicmd:: area A.B.C.D authentication |
42fc5d26 | 480 | |
c1a54c05 | 481 | .. clicmd:: area (0-4294967295) authentication |
42fc5d26 | 482 | |
42fc5d26 | 483 | |
42fc5d26 | 484 | |
9eb95b3b QY |
485 | Specify that simple password authentication should be used for the given |
486 | area. | |
42fc5d26 | 487 | |
c1a54c05 | 488 | .. clicmd:: area A.B.C.D authentication message-digest |
42fc5d26 | 489 | |
c1a54c05 | 490 | .. clicmd:: area (0-4294967295) authentication message-digest |
42fc5d26 | 491 | |
6ee602cd QY |
492 | Specify that OSPF packets must be authenticated with MD5 HMACs within the |
493 | given area. Keying material must also be configured on a per-interface basis | |
494 | (:clicmd:`ip ospf message-digest-key`). | |
42fc5d26 | 495 | |
6ee602cd QY |
496 | MD5 authentication may also be configured on a per-interface basis |
497 | (:clicmd:`ip ospf authentication message-digest`). Such per-interface | |
498 | settings will override any per-area authentication setting. | |
42fc5d26 | 499 | |
0efdf0fe | 500 | .. _ospf-interface: |
42fc5d26 | 501 | |
e6f1b831 QY |
502 | Interfaces |
503 | ---------- | |
42fc5d26 | 504 | |
c1a54c05 | 505 | .. clicmd:: ip ospf area AREA [ADDR] |
42fc5d26 | 506 | |
42fc5d26 | 507 | |
c1a54c05 | 508 | Enable OSPF on the interface, optionally restricted to just the IP address |
6ee602cd QY |
509 | given by `ADDR`, putting it in the `AREA` area. Per interface area settings |
510 | take precedence to network commands | |
511 | (:clicmd:`network A.B.C.D/M area A.B.C.D`). | |
42fc5d26 | 512 | |
c1a54c05 QY |
513 | If you have a lot of interfaces, and/or a lot of subnets, then enabling OSPF |
514 | via this command may result in a slight performance improvement. | |
42fc5d26 | 515 | |
c1a54c05 | 516 | .. clicmd:: ip ospf authentication-key AUTH_KEY |
42fc5d26 | 517 | |
42fc5d26 | 518 | |
c1a54c05 QY |
519 | Set OSPF authentication key to a simple password. After setting `AUTH_KEY`, |
520 | all OSPF packets are authenticated. `AUTH_KEY` has length up to 8 chars. | |
42fc5d26 | 521 | |
c1a54c05 | 522 | Simple text password authentication is insecure and deprecated in favour of |
6ee602cd | 523 | MD5 HMAC authentication. |
42fc5d26 | 524 | |
c1a54c05 | 525 | .. clicmd:: ip ospf authentication message-digest |
42fc5d26 | 526 | |
6ee602cd QY |
527 | Specify that MD5 HMAC authentication must be used on this interface. MD5 |
528 | keying material must also be configured. Overrides any authentication | |
529 | enabled on a per-area basis | |
530 | (:clicmd:`area A.B.C.D authentication message-digest`) | |
42fc5d26 | 531 | |
c1a54c05 QY |
532 | Note that OSPF MD5 authentication requires that time never go backwards |
533 | (correct time is NOT important, only that it never goes backwards), even | |
d1e7591e | 534 | across resets, if ospfd is to be able to promptly reestablish adjacencies |
6ee602cd | 535 | with its neighbours after restarts/reboots. The host should have system time |
d1e7591e | 536 | be set at boot from an external or non-volatile source (e.g. battery backed |
6ee602cd | 537 | clock, NTP, etc.) or else the system clock should be periodically saved to |
d1e7591e | 538 | non-volatile storage and restored at boot if MD5 authentication is to be |
6ee602cd | 539 | expected to work reliably. |
42fc5d26 | 540 | |
c1a54c05 | 541 | .. clicmd:: ip ospf message-digest-key KEYID md5 KEY |
42fc5d26 | 542 | |
42fc5d26 | 543 | |
6ee602cd QY |
544 | Set OSPF authentication key to a cryptographic password. The cryptographic |
545 | algorithm is MD5. | |
42fc5d26 | 546 | |
9eb95b3b QY |
547 | KEYID identifies secret key used to create the message digest. This ID is |
548 | part of the protocol and must be consistent across routers on a link. | |
42fc5d26 | 549 | |
9eb95b3b QY |
550 | KEY is the actual message digest key, of up to 16 chars (larger strings will |
551 | be truncated), and is associated with the given KEYID. | |
42fc5d26 | 552 | |
c1a54c05 | 553 | .. clicmd:: ip ospf cost (1-65535) |
42fc5d26 | 554 | |
42fc5d26 | 555 | |
9eb95b3b QY |
556 | Set link cost for the specified interface. The cost value is set to |
557 | router-LSA's metric field and used for SPF calculation. | |
42fc5d26 | 558 | |
c1a54c05 | 559 | .. clicmd:: ip ospf dead-interval (1-65535) |
42fc5d26 | 560 | |
c1a54c05 | 561 | .. clicmd:: ip ospf dead-interval minimal hello-multiplier (2-20) |
42fc5d26 | 562 | |
42fc5d26 | 563 | |
6ee602cd QY |
564 | Set number of seconds for RouterDeadInterval timer value used for Wait Timer |
565 | and Inactivity Timer. This value must be the same for all routers attached | |
566 | to a common network. The default value is 40 seconds. | |
42fc5d26 | 567 | |
6ee602cd QY |
568 | If 'minimal' is specified instead, then the dead-interval is set to 1 second |
569 | and one must specify a hello-multiplier. The hello-multiplier specifies how | |
570 | many Hellos to send per second, from 2 (every 500ms) to 20 (every 50ms). | |
571 | Thus one can have 1s convergence time for OSPF. If this form is specified, | |
572 | then the hello-interval advertised in Hello packets is set to 0 and the | |
573 | hello-interval on received Hello packets is not checked, thus the | |
574 | hello-multiplier need NOT be the same across multiple routers on a common | |
575 | link. | |
42fc5d26 | 576 | |
c1a54c05 | 577 | .. clicmd:: ip ospf hello-interval (1-65535) |
42fc5d26 | 578 | |
42fc5d26 | 579 | |
c1a54c05 QY |
580 | Set number of seconds for HelloInterval timer value. Setting this value, |
581 | Hello packet will be sent every timer value seconds on the specified interface. | |
582 | This value must be the same for all routers attached to a common network. | |
583 | The default value is 10 seconds. | |
42fc5d26 | 584 | |
6ee602cd QY |
585 | This command has no effect if |
586 | :clicmd:`ip ospf dead-interval minimal hello-multiplier (2-20)` is also | |
c1a54c05 | 587 | specified for the interface. |
42fc5d26 | 588 | |
78980c28 | 589 | .. clicmd:: ip ospf network (broadcast|non-broadcast|point-to-multipoint|point-to-point [dmvpn]) |
42fc5d26 | 590 | |
56f9b9bf DS |
591 | When configuring a point-to-point network on an interface and the interface |
592 | has a /32 address associated with then OSPF will treat the interface | |
593 | as being `unnumbered`. If you are doing this you *must* set the | |
594 | net.ipv4.conf.<interface name>.rp_filter value to 0. In order for | |
595 | the ospf multicast packets to be delivered by the kernel. | |
596 | ||
78980c28 RD |
597 | When used in a DMVPN network at a spoke, this OSPF will be configured in |
598 | point-to-point, but the HUB will be a point-to-multipoint. To make this | |
599 | topology work, specify the optional 'dmvpn' parameter at the spoke. | |
42fc5d26 | 600 | |
d1e7591e | 601 | Set explicitly network type for specified interface. |
42fc5d26 | 602 | |
c1a54c05 | 603 | .. clicmd:: ip ospf priority (0-255) |
42fc5d26 | 604 | |
42fc5d26 | 605 | |
9eb95b3b QY |
606 | Set RouterPriority integer value. The router with the highest priority will |
607 | be more eligible to become Designated Router. Setting the value to 0, makes | |
608 | the router ineligible to become Designated Router. The default value is 1. | |
42fc5d26 | 609 | |
c1a54c05 | 610 | .. clicmd:: ip ospf retransmit-interval (1-65535) |
42fc5d26 | 611 | |
42fc5d26 | 612 | |
9eb95b3b QY |
613 | Set number of seconds for RxmtInterval timer value. This value is used when |
614 | retransmitting Database Description and Link State Request packets. The | |
615 | default value is 5 seconds. | |
42fc5d26 | 616 | |
7db1c0f0 | 617 | .. clicmd:: ip ospf transmit-delay (1-65535) [A.B.C.D] |
42fc5d26 | 618 | |
42fc5d26 | 619 | |
c1a54c05 | 620 | Set number of seconds for InfTransDelay value. LSAs' age should be |
9eb95b3b | 621 | incremented by this value when transmitting. The default value is 1 second. |
42fc5d26 | 622 | |
29ec6244 IR |
623 | .. clicmd:: ip ospf passive [A.B.C.D] |
624 | ||
625 | Do not speak OSPF on the interface, but do advertise the interface as a stub | |
626 | link in the router-:abbr:`LSA (Link State Advertisement)` for this router. | |
627 | This allows one to advertise addresses on such connected interfaces without | |
628 | having to originate AS-External/Type-5 LSAs (which have global flooding | |
629 | scope) - as would occur if connected addresses were redistributed into | |
630 | OSPF (:ref:`redistribute-routes-to-ospf`). This is the only way to | |
631 | advertise non-OSPF links into stub areas. | |
632 | ||
c1a54c05 | 633 | .. clicmd:: ip ospf area (A.B.C.D|(0-4294967295)) |
42fc5d26 | 634 | |
42fc5d26 | 635 | |
9eb95b3b | 636 | Enable ospf on an interface and set associated area. |
42fc5d26 | 637 | |
243892e0 DA |
638 | OSPF route-map |
639 | ============== | |
640 | ||
641 | Usage of *ospfd*'s route-map support. | |
642 | ||
243892e0 DA |
643 | .. clicmd:: set metric [+|-](0-4294967295) |
644 | ||
645 | Set a metric for matched route when sending announcement. Use plus (+) sign | |
646 | to add a metric value to an existing metric. Use minus (-) sign to | |
647 | substract a metric value from an existing metric. | |
648 | ||
0efdf0fe | 649 | .. _redistribute-routes-to-ospf: |
42fc5d26 | 650 | |
e6f1b831 QY |
651 | Redistribution |
652 | -------------- | |
42fc5d26 | 653 | |
0efdf0fe | 654 | .. _ospf-redistribute: |
42fc5d26 | 655 | |
1e31580f QY |
656 | .. clicmd:: redistribute <babel|bgp|connected|eigrp|isis|kernel|openfabric|ospf|rip|sharp|static|table> [metric-type (1-2)] [metric (0-16777214)] [route-map WORD] |
657 | ||
9eb95b3b QY |
658 | Redistribute routes of the specified protocol or kind into OSPF, with the |
659 | metric type and metric set if specified, filtering the routes using the | |
660 | given route-map if specified. Redistributed routes may also be filtered | |
661 | with distribute-lists, see | |
11ab5329 | 662 | :ref:`ospf distribute-list configuration <ospf-distribute-list>`. |
42fc5d26 | 663 | |
9eb95b3b QY |
664 | Redistributed routes are distributed as into OSPF as Type-5 External LSAs |
665 | into links to areas that accept external routes, Type-7 External LSAs for | |
666 | NSSA areas and are not redistributed at all into Stub areas, where external | |
667 | routes are not permitted. | |
42fc5d26 | 668 | |
29ec6244 IR |
669 | Note that for connected routes, one may instead use the |
670 | :clicmd:`ip ospf passive [A.B.C.D]` configuration. | |
42fc5d26 | 671 | |
c1a54c05 | 672 | .. clicmd:: default-information originate |
42fc5d26 | 673 | |
c1a54c05 | 674 | .. clicmd:: default-information originate metric (0-16777214) |
42fc5d26 | 675 | |
c1a54c05 | 676 | .. clicmd:: default-information originate metric (0-16777214) metric-type (1|2) |
42fc5d26 | 677 | |
c1a54c05 | 678 | .. clicmd:: default-information originate metric (0-16777214) metric-type (1|2) route-map WORD |
42fc5d26 | 679 | |
c1a54c05 | 680 | .. clicmd:: default-information originate always |
42fc5d26 | 681 | |
c1a54c05 | 682 | .. clicmd:: default-information originate always metric (0-16777214) |
42fc5d26 | 683 | |
c1a54c05 | 684 | .. clicmd:: default-information originate always metric (0-16777214) metric-type (1|2) |
42fc5d26 | 685 | |
c1a54c05 | 686 | .. clicmd:: default-information originate always metric (0-16777214) metric-type (1|2) route-map WORD |
42fc5d26 | 687 | |
42fc5d26 | 688 | |
9eb95b3b QY |
689 | Originate an AS-External (type-5) LSA describing a default route into all |
690 | external-routing capable areas, of the specified metric and metric type. If | |
691 | the 'always' keyword is given then the default is always advertised, even | |
692 | when there is no default present in the routing table. | |
42fc5d26 | 693 | |
0efdf0fe | 694 | .. _ospf-distribute-list: |
42fc5d26 | 695 | |
e3cb363a IR |
696 | .. clicmd:: distribute-list NAME out <kernel|connected|static|rip|isis|bgp|eigrp|nhrp|table|vnc|babel|openfabric> |
697 | ||
9eb95b3b | 698 | Apply the access-list filter, NAME, to redistributed routes of the given |
e3cb363a | 699 | type before allowing the routes to be redistributed into OSPF |
9eb95b3b | 700 | (:ref:`ospf redistribution <ospf-redistribute>`). |
42fc5d26 | 701 | |
c1a54c05 | 702 | .. clicmd:: default-metric (0-16777214) |
42fc5d26 | 703 | |
42fc5d26 | 704 | |
c1a54c05 | 705 | .. clicmd:: distance (1-255) |
42fc5d26 | 706 | |
42fc5d26 | 707 | |
c1a54c05 | 708 | .. clicmd:: distance ospf (intra-area|inter-area|external) (1-255) |
42fc5d26 | 709 | |
42fc5d26 | 710 | |
42fc5d26 | 711 | |
10514170 RW |
712 | Graceful Restart |
713 | ================ | |
714 | ||
715 | .. clicmd:: graceful-restart [grace-period (1-1800)] | |
716 | ||
717 | ||
718 | Configure Graceful Restart (RFC 3623) restarting support. | |
719 | When enabled, the default grace period is 120 seconds. | |
720 | ||
721 | To perform a graceful shutdown, the "graceful-restart prepare ip ospf" | |
722 | EXEC-level command needs to be issued before restarting the ospfd daemon. | |
cc1a92d8 | 723 | |
859bce81 | 724 | .. clicmd:: graceful-restart helper enable [A.B.C.D] |
cc1a92d8 | 725 | |
cc1a92d8 | 726 | |
727 | Configure Graceful Restart (RFC 3623) helper support. | |
728 | By default, helper support is disabled for all neighbours. | |
729 | This config enables/disables helper support on this router | |
730 | for all neighbours. | |
731 | To enable/disable helper support for a specific | |
732 | neighbour, the router-id (A.B.C.D) has to be specified. | |
733 | ||
cc1a92d8 | 734 | .. clicmd:: graceful-restart helper strict-lsa-checking |
735 | ||
cc1a92d8 | 736 | |
737 | If 'strict-lsa-checking' is configured then the helper will | |
738 | abort the Graceful Restart when a LSA change occurs which | |
739 | affects the restarting router. | |
740 | By default 'strict-lsa-checking' is enabled" | |
741 | ||
cc1a92d8 | 742 | .. clicmd:: graceful-restart helper supported-grace-time |
743 | ||
cc1a92d8 | 744 | |
745 | Supports as HELPER for configured grace period. | |
746 | ||
cc1a92d8 | 747 | .. clicmd:: graceful-restart helper planned-only |
748 | ||
cc1a92d8 | 749 | |
750 | It helps to support as HELPER only for planned | |
751 | restarts. By default, it supports both planned and | |
752 | unplanned outages. | |
42fc5d26 | 753 | |
10514170 RW |
754 | |
755 | .. clicmd:: graceful-restart prepare ip ospf | |
756 | ||
757 | ||
758 | Initiate a graceful restart for all OSPF instances configured with the | |
759 | "graceful-restart" command. The ospfd daemon should be restarted during | |
760 | the instance-specific grace period, otherwise the graceful restart will fail. | |
761 | ||
762 | This is an EXEC-level command. | |
763 | ||
764 | ||
0efdf0fe | 765 | .. _showing-ospf-information: |
42fc5d26 | 766 | |
e6f1b831 QY |
767 | Showing Information |
768 | =================== | |
42fc5d26 | 769 | |
0efdf0fe | 770 | .. _show-ip-ospf: |
42fc5d26 | 771 | |
f328dc60 | 772 | .. clicmd:: show ip ospf [json] |
42fc5d26 | 773 | |
c1a54c05 QY |
774 | Show information on a variety of general OSPF and area state and |
775 | configuration information. | |
42fc5d26 | 776 | |
f328dc60 | 777 | .. clicmd:: show ip ospf interface [INTERFACE] [json] |
42fc5d26 | 778 | |
c1a54c05 QY |
779 | Show state and configuration of OSPF the specified interface, or all |
780 | interfaces if no interface is given. | |
42fc5d26 | 781 | |
f328dc60 | 782 | .. clicmd:: show ip ospf neighbor [json] |
42fc5d26 | 783 | |
f328dc60 | 784 | .. clicmd:: show ip ospf neighbor INTERFACE [json] |
42fc5d26 | 785 | |
f328dc60 | 786 | .. clicmd:: show ip ospf neighbor detail [json] |
42fc5d26 | 787 | |
f328dc60 | 788 | .. clicmd:: show ip ospf neighbor INTERFACE detail [json] |
42fc5d26 | 789 | |
f328dc60 | 790 | Display lsa information of LSDB. |
791 | Json o/p of this command covers base route information | |
792 | i.e all LSAs except opaque lsa info. | |
42fc5d26 | 793 | |
a605d719 | 794 | .. clicmd:: show ip ospf [vrf <NAME|all>] database [json] |
42fc5d26 | 795 | |
a605d719 | 796 | .. clicmd:: show ip ospf [vrf <NAME|all>] database (asbr-summary|external|network|router|summary) [json] |
42fc5d26 | 797 | |
a605d719 | 798 | .. clicmd:: show ip ospf [vrf <NAME|all>] database (asbr-summary|external|network|router|summary) LINK-STATE-ID [json] |
42fc5d26 | 799 | |
a605d719 | 800 | .. clicmd:: show ip ospf [vrf <NAME|all>] database (asbr-summary|external|network|router|summary) LINK-STATE-ID adv-router ADV-ROUTER [json] |
42fc5d26 | 801 | |
a605d719 | 802 | .. clicmd:: show ip ospf [vrf <NAME|all>] database (asbr-summary|external|network|router|summary) adv-router ADV-ROUTER [json] |
42fc5d26 | 803 | |
a605d719 | 804 | .. clicmd:: show ip ospf [vrf <NAME|all>] database (asbr-summary|external|network|router|summary) LINK-STATE-ID self-originate [json] |
42fc5d26 | 805 | |
a605d719 | 806 | .. clicmd:: show ip ospf [vrf <NAME|all>] database (asbr-summary|external|network|router|summary) self-originate [json] |
42fc5d26 | 807 | |
a605d719 | 808 | .. clicmd:: show ip ospf [vrf <NAME|all>] database max-age [json] |
42fc5d26 | 809 | |
a605d719 IR |
810 | .. clicmd:: show ip ospf [vrf <NAME|all>] database self-originate [json] |
811 | ||
812 | Show the OSPF database summary. | |
f328dc60 | 813 | |
f328dc60 | 814 | .. clicmd:: show ip ospf route [json] |
42fc5d26 | 815 | |
9eb95b3b QY |
816 | Show the OSPF routing table, as determined by the most recent SPF |
817 | calculation. | |
42fc5d26 | 818 | |
cc1a92d8 | 819 | .. clicmd:: show ip ospf graceful-restart helper [detail] [json] |
820 | ||
821 | Displays the Grcaeful Restart Helper details including helper | |
822 | config changes. | |
823 | ||
0efdf0fe | 824 | .. _opaque-lsa: |
42fc5d26 QY |
825 | |
826 | Opaque LSA | |
827 | ========== | |
828 | ||
c1a54c05 | 829 | .. clicmd:: ospf opaque-lsa |
42fc5d26 | 830 | |
c1a54c05 | 831 | .. clicmd:: capability opaque |
42fc5d26 | 832 | |
42fc5d26 | 833 | |
42fc5d26 | 834 | |
85400b29 MS |
835 | *ospfd* supports Opaque LSA (:rfc:`2370`) as partial support for |
836 | MPLS Traffic Engineering LSAs. The opaque-lsa capability must be | |
837 | enabled in the configuration. An alternate command could be | |
838 | "mpls-te on" (:ref:`ospf-traffic-engineering`). Note that FRR | |
839 | offers only partial support for some of the routing protocol | |
840 | extensions that are used with MPLS-TE; it does not support a | |
841 | complete RSVP-TE solution. | |
42fc5d26 | 842 | |
a605d719 | 843 | .. clicmd:: show ip ospf [vrf <NAME|all>] database (opaque-link|opaque-area|opaque-external) |
42fc5d26 | 844 | |
a605d719 | 845 | .. clicmd:: show ip ospf [vrf <NAME|all>] database (opaque-link|opaque-area|opaque-external) LINK-STATE-ID |
42fc5d26 | 846 | |
a605d719 | 847 | .. clicmd:: show ip ospf [vrf <NAME|all>] database (opaque-link|opaque-area|opaque-external) LINK-STATE-ID adv-router ADV-ROUTER |
42fc5d26 | 848 | |
a605d719 | 849 | .. clicmd:: show ip ospf [vrf <NAME|all>] database (opaque-link|opaque-area|opaque-external) adv-router ADV-ROUTER |
42fc5d26 | 850 | |
a605d719 | 851 | .. clicmd:: show ip ospf [vrf <NAME|all>] database (opaque-link|opaque-area|opaque-external) LINK-STATE-ID self-originate |
42fc5d26 | 852 | |
a605d719 | 853 | .. clicmd:: show ip ospf [vrf <NAME|all>] database (opaque-link|opaque-area|opaque-external) self-originate |
42fc5d26 | 854 | |
c1a54c05 | 855 | Show Opaque LSA from the database. |
42fc5d26 | 856 | |
c1a54c05 | 857 | .. _ospf-traffic-engineering: |
42fc5d26 QY |
858 | |
859 | Traffic Engineering | |
860 | =================== | |
861 | ||
85400b29 MS |
862 | .. note:: |
863 | ||
864 | At this time, FRR offers partial support for some of the routing | |
865 | protocol extensions that can be used with MPLS-TE. FRR does not | |
866 | support a complete RSVP-TE solution currently. | |
867 | ||
c1a54c05 | 868 | .. clicmd:: mpls-te on |
42fc5d26 | 869 | |
42fc5d26 | 870 | |
c1a54c05 | 871 | Enable Traffic Engineering LSA flooding. |
42fc5d26 | 872 | |
c1a54c05 | 873 | .. clicmd:: mpls-te router-address <A.B.C.D> |
42fc5d26 | 874 | |
c1a54c05 QY |
875 | Configure stable IP address for MPLS-TE. This IP address is then advertise |
876 | in Opaque LSA Type-10 TLV=1 (TE) option 1 (Router-Address). | |
42fc5d26 | 877 | |
c1a54c05 | 878 | .. clicmd:: mpls-te inter-as area <area-id>|as |
42fc5d26 | 879 | |
42fc5d26 | 880 | |
c1a54c05 QY |
881 | Enable :rfc:`5392` support - Inter-AS TE v2 - to flood Traffic Engineering |
882 | parameters of Inter-AS link. 2 modes are supported: AREA and AS; LSA are | |
883 | flood in AREA <area-id> with Opaque Type-10, respectively in AS with Opaque | |
884 | Type-11. In all case, Opaque-LSA TLV=6. | |
42fc5d26 | 885 | |
9977e56c | 886 | .. clicmd:: mpls-te export |
f173deb3 OD |
887 | |
888 | Export Traffic Engineering Data Base to other daemons through the ZAPI | |
889 | Opaque Link State messages. | |
890 | ||
c1a54c05 | 891 | .. clicmd:: show ip ospf mpls-te interface |
42fc5d26 | 892 | |
c1a54c05 | 893 | .. clicmd:: show ip ospf mpls-te interface INTERFACE |
42fc5d26 | 894 | |
c1a54c05 | 895 | Show MPLS Traffic Engineering parameters for all or specified interface. |
42fc5d26 | 896 | |
c1a54c05 | 897 | .. clicmd:: show ip ospf mpls-te router |
42fc5d26 | 898 | |
c1a54c05 | 899 | Show Traffic Engineering router parameters. |
42fc5d26 | 900 | |
f173deb3 OD |
901 | .. clicmd:: show ip ospf mpls-te database [verbose|json] |
902 | ||
f173deb3 OD |
903 | .. clicmd:: show ip ospf mpls-te database vertex [self-originate|adv-router ADV-ROUTER] [verbose|json] |
904 | ||
f173deb3 OD |
905 | .. clicmd:: show ip ospf mpls-te database edge [A.B.C.D] [verbose|json] |
906 | ||
f173deb3 OD |
907 | .. clicmd:: show ip ospf mpls-te database subnet [A.B.C.D/M] [verbose|json] |
908 | ||
909 | Show Traffic Engineering Database | |
910 | ||
0efdf0fe | 911 | .. _router-information: |
42fc5d26 QY |
912 | |
913 | Router Information | |
914 | ================== | |
915 | ||
ddd73a96 | 916 | .. clicmd:: router-info [as | area] |
42fc5d26 | 917 | |
42fc5d26 | 918 | |
c1a54c05 | 919 | Enable Router Information (:rfc:`4970`) LSA advertisement with AS scope |
ddd73a96 OD |
920 | (default) or Area scope flooding when area is specified. Old syntax |
921 | `router-info area <A.B.C.D>` is always supported but mark as deprecated | |
922 | as the area ID is no more necessary. Indeed, router information support | |
923 | multi-area and detect automatically the areas. | |
42fc5d26 | 924 | |
c1a54c05 | 925 | .. clicmd:: pce address <A.B.C.D> |
42fc5d26 | 926 | |
42fc5d26 | 927 | |
c1a54c05 | 928 | .. clicmd:: pce domain as (0-65535) |
42fc5d26 | 929 | |
42fc5d26 | 930 | |
c1a54c05 | 931 | .. clicmd:: pce neighbor as (0-65535) |
42fc5d26 | 932 | |
42fc5d26 | 933 | |
c1a54c05 | 934 | .. clicmd:: pce flag BITPATTERN |
42fc5d26 | 935 | |
42fc5d26 | 936 | |
c1a54c05 | 937 | .. clicmd:: pce scope BITPATTERN |
42fc5d26 | 938 | |
42fc5d26 | 939 | |
9eb95b3b | 940 | The commands are conform to :rfc:`5088` and allow OSPF router announce Path |
d1e7591e QY |
941 | Computation Element (PCE) capabilities through the Router Information (RI) |
942 | LSA. Router Information must be enable prior to this. The command set/unset | |
943 | respectively the PCE IP address, Autonomous System (AS) numbers of | |
9eb95b3b QY |
944 | controlled domains, neighbor ASs, flag and scope. For flag and scope, please |
945 | refer to :rfc`5088` for the BITPATTERN recognition. Multiple 'pce neighbor' | |
946 | command could be specified in order to specify all PCE neighbours. | |
42fc5d26 | 947 | |
c1a54c05 | 948 | .. clicmd:: show ip ospf router-info |
42fc5d26 | 949 | |
c1a54c05 | 950 | Show Router Capabilities flag. |
9eb95b3b | 951 | |
c1a54c05 | 952 | .. clicmd:: show ip ospf router-info pce |
42fc5d26 | 953 | |
c1a54c05 | 954 | Show Router Capabilities PCE parameters. |
42fc5d26 | 955 | |
50cc7127 QY |
956 | Segment Routing |
957 | =============== | |
958 | ||
6f751f14 OD |
959 | This is an EXPERIMENTAL support of Segment Routing as per `RFC 8665` for MPLS |
960 | dataplane. | |
50cc7127 | 961 | |
03750f1e | 962 | .. clicmd:: segment-routing on |
50cc7127 QY |
963 | |
964 | Enable Segment Routing. Even if this also activate routing information | |
965 | support, it is preferable to also activate routing information, and set | |
966 | accordingly the Area or AS flooding. | |
967 | ||
6443a4be | 968 | .. clicmd:: segment-routing global-block (16-1048575) (16-1048575) [local-block (16-1048575) (16-1048575)] |
50cc7127 | 969 | |
6443a4be EDP |
970 | Set the Segment Routing Global Block i.e. the label range used by MPLS to |
971 | store label in the MPLS FIB for Prefix SID. Optionally also set the Local | |
972 | Block, i.e. the label range used for Adjacency SID. The negative version | |
973 | of the command always unsets both ranges. | |
6f751f14 | 974 | |
6443a4be | 975 | .. clicmd:: segment-routing local-block (16-1048575) (16-1048575) |
6f751f14 | 976 | |
6443a4be EDP |
977 | Set the Segment Routing Local Block i.e. the label range used by MPLS to |
978 | store label in the MPLS FIB for Adjacency SID. This command is deprecated | |
979 | in favor of the combined command above. | |
50cc7127 | 980 | |
03750f1e | 981 | .. clicmd:: segment-routing node-msd (1-16) |
50cc7127 QY |
982 | |
983 | Fix the Maximum Stack Depth supported by the router. The value depend of the | |
984 | MPLS dataplane. E.g. for Linux kernel, since version 4.13 it is 32. | |
985 | ||
03750f1e | 986 | .. clicmd:: segment-routing prefix A.B.C.D/M [index (0-65535)|no-php-flag|explicit-null] |
50cc7127 | 987 | |
9eb95b3b QY |
988 | prefix with /32 corresponding to a loopback interface are currently |
989 | supported. The 'no-php-flag' means NO Penultimate Hop Popping that allows SR | |
f786c4d7 OD |
990 | node to request to its neighbor to not pop the label. The 'explicit-null' means that |
991 | neighbor nodes must swap the incoming label by the MPLS Explicit Null label | |
992 | before delivering the packet. | |
50cc7127 | 993 | |
e3e3afff | 994 | .. clicmd:: show ip ospf database segment-routing <adv-router ADVROUTER|self-originate> [json] |
50cc7127 | 995 | |
d1e7591e | 996 | Show Segment Routing Data Base, all SR nodes, specific advertised router or |
e3e3afff QY |
997 | self router. Optional JSON output can be obtained by appending 'json' to the |
998 | end of the command. | |
50cc7127 | 999 | |
077abf3b | 1000 | External Route Summarisation |
1001 | ============================ | |
1002 | This feature summarises originated external LSAs(Type-5 and Type-7). | |
1003 | Summary Route will be originated on-behalf of all matched external LSAs. | |
1004 | ||
03750f1e | 1005 | .. clicmd:: summary-address A.B.C.D/M [tag (1-4294967295)] |
077abf3b | 1006 | |
1007 | This command enable/disables summarisation for the configured address | |
1008 | range. Tag is the optional parameter. If tag configured Summary route | |
1009 | will be originated with the configured tag. | |
1010 | ||
03750f1e | 1011 | .. clicmd:: summary-address A.B.C.D/M no-advertise |
077abf3b | 1012 | |
1013 | This command to ensure not advertise the summary lsa for the matched | |
1014 | external LSAs. | |
1015 | ||
077abf3b | 1016 | .. clicmd:: aggregation timer (5-1800) |
1017 | ||
1018 | Configure aggregation delay timer interval. Summarisation starts only after | |
94184417 | 1019 | this delay timer expiry. By default, delay interval is 5 seconds. |
077abf3b | 1020 | |
077abf3b | 1021 | |
94184417 | 1022 | The no form of the command resets the aggregation delay interval to default |
1023 | value. | |
077abf3b | 1024 | |
077abf3b | 1025 | .. clicmd:: show ip ospf [vrf <NAME|all>] summary-address [detail] [json] |
1026 | ||
1027 | Show configuration for display all configured summary routes with | |
1028 | matching external LSA information. | |
1029 | ||
7fd0729f G |
1030 | TI-LFA |
1031 | ====== | |
1032 | ||
1033 | Experimental support for Topology Independent LFA (Loop-Free Alternate), see | |
1034 | for example 'draft-bashandy-rtgwg-segment-routing-ti-lfa-05'. Note that | |
1035 | TI-LFA requires a proper Segment Routing configuration. | |
1036 | ||
385a1e07 | 1037 | .. clicmd:: fast-reroute ti-lfa [node-protection] |
7fd0729f G |
1038 | |
1039 | Configured on the router level. Activates TI-LFA for all interfaces. | |
7fd0729f | 1040 | |
3e94c9a4 G |
1041 | Note that so far only P2P interfaces are supported. |
1042 | ||
cb00030f IR |
1043 | .. _debugging-ospf: |
1044 | ||
42fc5d26 QY |
1045 | Debugging OSPF |
1046 | ============== | |
1047 | ||
e5c2d3a8 RZ |
1048 | .. clicmd:: debug ospf bfd |
1049 | ||
1050 | Enable or disable debugging for BFD events. This will show BFD integration | |
1051 | library messages and OSPF BFD integration messages that are mostly state | |
1052 | transitions and validation problems. | |
1053 | ||
c1a54c05 | 1054 | .. clicmd:: debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) [detail] |
42fc5d26 | 1055 | |
42fc5d26 | 1056 | |
c1a54c05 | 1057 | Dump Packet for debugging |
42fc5d26 | 1058 | |
c1a54c05 | 1059 | .. clicmd:: debug ospf ism |
42fc5d26 | 1060 | |
c1a54c05 | 1061 | .. clicmd:: debug ospf ism (status|events|timers) |
42fc5d26 | 1062 | |
42fc5d26 | 1063 | |
42fc5d26 | 1064 | |
c1a54c05 | 1065 | Show debug information of Interface State Machine |
42fc5d26 | 1066 | |
c1a54c05 | 1067 | .. clicmd:: debug ospf nsm |
42fc5d26 | 1068 | |
c1a54c05 | 1069 | .. clicmd:: debug ospf nsm (status|events|timers) |
42fc5d26 | 1070 | |
42fc5d26 | 1071 | |
42fc5d26 | 1072 | |
c1a54c05 | 1073 | Show debug information of Network State Machine |
42fc5d26 | 1074 | |
c1a54c05 | 1075 | .. clicmd:: debug ospf event |
42fc5d26 | 1076 | |
42fc5d26 | 1077 | |
c1a54c05 | 1078 | Show debug information of OSPF event |
42fc5d26 | 1079 | |
c1a54c05 | 1080 | .. clicmd:: debug ospf nssa |
42fc5d26 | 1081 | |
42fc5d26 | 1082 | |
c1a54c05 | 1083 | Show debug information about Not So Stub Area |
42fc5d26 | 1084 | |
c1a54c05 | 1085 | .. clicmd:: debug ospf lsa |
42fc5d26 | 1086 | |
c1a54c05 | 1087 | .. clicmd:: debug ospf lsa (generate|flooding|refresh) |
42fc5d26 | 1088 | |
42fc5d26 | 1089 | |
42fc5d26 | 1090 | |
c1a54c05 | 1091 | Show debug detail of Link State messages |
42fc5d26 | 1092 | |
c1a54c05 | 1093 | .. clicmd:: debug ospf te |
42fc5d26 | 1094 | |
42fc5d26 | 1095 | |
c1a54c05 | 1096 | Show debug information about Traffic Engineering LSA |
42fc5d26 | 1097 | |
c1a54c05 | 1098 | .. clicmd:: debug ospf zebra |
42fc5d26 | 1099 | |
c1a54c05 | 1100 | .. clicmd:: debug ospf zebra (interface|redistribute) |
42fc5d26 | 1101 | |
42fc5d26 | 1102 | |
42fc5d26 | 1103 | |
c1a54c05 | 1104 | Show debug information of ZEBRA API |
42fc5d26 | 1105 | |
cc1a92d8 | 1106 | .. clicmd:: debug ospf graceful-restart helper |
1107 | ||
cc1a92d8 | 1108 | |
1109 | Enable/disable debug information for OSPF Graceful Restart Helper | |
1110 | ||
c1a54c05 | 1111 | .. clicmd:: show debugging ospf |
42fc5d26 | 1112 | |
03750f1e | 1113 | .. clicmd:: debug ospf lsa aggregate |
077abf3b | 1114 | |
1115 | Debug commnd to enable/disable external route summarisation specific debugs. | |
1116 | ||
b832909b QY |
1117 | |
1118 | Sample Configuration | |
1119 | ==================== | |
42fc5d26 QY |
1120 | |
1121 | A simple example, with MD5 authentication enabled: | |
1122 | ||
9eb95b3b | 1123 | .. code-block:: frr |
42fc5d26 | 1124 | |
c1a54c05 QY |
1125 | ! |
1126 | interface bge0 | |
1127 | ip ospf authentication message-digest | |
1128 | ip ospf message-digest-key 1 md5 ABCDEFGHIJK | |
1129 | ! | |
1130 | router ospf | |
1131 | network 192.168.0.0/16 area 0.0.0.1 | |
1132 | area 0.0.0.1 authentication message-digest | |
a8c90e15 | 1133 | |
42fc5d26 | 1134 | |
d50b2aa0 | 1135 | An :abbr:`ABR` router, with MD5 authentication and performing summarisation |
42fc5d26 QY |
1136 | of networks between the areas: |
1137 | ||
9eb95b3b | 1138 | .. code-block:: frr |
42fc5d26 | 1139 | |
c1a54c05 QY |
1140 | ! |
1141 | password ABCDEF | |
1142 | log file /var/log/frr/ospfd.log | |
1143 | service advanced-vty | |
1144 | ! | |
1145 | interface eth0 | |
1146 | ip ospf authentication message-digest | |
1147 | ip ospf message-digest-key 1 md5 ABCDEFGHIJK | |
1148 | ! | |
1149 | interface ppp0 | |
29ec6244 | 1150 | ip ospf passive |
c1a54c05 QY |
1151 | ! |
1152 | interface br0 | |
1153 | ip ospf authentication message-digest | |
1154 | ip ospf message-digest-key 2 md5 XYZ12345 | |
1155 | ! | |
1156 | router ospf | |
1157 | ospf router-id 192.168.0.1 | |
1158 | redistribute connected | |
c1a54c05 QY |
1159 | network 192.168.0.0/24 area 0.0.0.0 |
1160 | network 10.0.0.0/16 area 0.0.0.0 | |
1161 | network 192.168.1.0/24 area 0.0.0.1 | |
1162 | area 0.0.0.0 authentication message-digest | |
1163 | area 0.0.0.0 range 10.0.0.0/16 | |
1164 | area 0.0.0.0 range 192.168.0.0/24 | |
1165 | area 0.0.0.1 authentication message-digest | |
1166 | area 0.0.0.1 range 10.2.0.0/16 | |
1167 | ! | |
a8c90e15 | 1168 | |
42fc5d26 QY |
1169 | |
1170 | A Traffic Engineering configuration, with Inter-ASv2 support. | |
1171 | ||
9eb95b3b QY |
1172 | First, the :file:`zebra.conf` part: |
1173 | ||
1174 | .. code-block:: frr | |
c1a54c05 | 1175 | |
c1a54c05 QY |
1176 | interface eth0 |
1177 | ip address 198.168.1.1/24 | |
612b3314 QY |
1178 | link-params |
1179 | enable | |
1180 | admin-grp 0xa1 | |
1181 | metric 100 | |
1182 | max-bw 1.25e+07 | |
1183 | max-rsv-bw 1.25e+06 | |
1184 | unrsv-bw 0 1.25e+06 | |
1185 | unrsv-bw 1 1.25e+06 | |
1186 | unrsv-bw 2 1.25e+06 | |
1187 | unrsv-bw 3 1.25e+06 | |
1188 | unrsv-bw 4 1.25e+06 | |
1189 | unrsv-bw 5 1.25e+06 | |
1190 | unrsv-bw 6 1.25e+06 | |
1191 | unrsv-bw 7 1.25e+06 | |
c1a54c05 QY |
1192 | ! |
1193 | interface eth1 | |
1194 | ip address 192.168.2.1/24 | |
612b3314 QY |
1195 | link-params |
1196 | enable | |
1197 | metric 10 | |
1198 | max-bw 1.25e+07 | |
1199 | max-rsv-bw 1.25e+06 | |
1200 | unrsv-bw 0 1.25e+06 | |
1201 | unrsv-bw 1 1.25e+06 | |
1202 | unrsv-bw 2 1.25e+06 | |
1203 | unrsv-bw 3 1.25e+06 | |
1204 | unrsv-bw 4 1.25e+06 | |
1205 | unrsv-bw 5 1.25e+06 | |
1206 | unrsv-bw 6 1.25e+06 | |
1207 | unrsv-bw 7 1.25e+06 | |
1208 | neighbor 192.168.2.2 as 65000 | |
1209 | hostname HOSTNAME | |
1210 | password PASSWORD | |
1211 | log file /var/log/zebra.log | |
1212 | ! | |
1213 | interface eth0 | |
1214 | ip address 198.168.1.1/24 | |
50cc7127 QY |
1215 | link-params |
1216 | enable | |
1217 | admin-grp 0xa1 | |
1218 | metric 100 | |
1219 | max-bw 1.25e+07 | |
1220 | max-rsv-bw 1.25e+06 | |
1221 | unrsv-bw 0 1.25e+06 | |
1222 | unrsv-bw 1 1.25e+06 | |
1223 | unrsv-bw 2 1.25e+06 | |
1224 | unrsv-bw 3 1.25e+06 | |
1225 | unrsv-bw 4 1.25e+06 | |
1226 | unrsv-bw 5 1.25e+06 | |
1227 | unrsv-bw 6 1.25e+06 | |
1228 | unrsv-bw 7 1.25e+06 | |
612b3314 QY |
1229 | ! |
1230 | interface eth1 | |
1231 | ip address 192.168.2.1/24 | |
50cc7127 QY |
1232 | link-params |
1233 | enable | |
1234 | metric 10 | |
1235 | max-bw 1.25e+07 | |
1236 | max-rsv-bw 1.25e+06 | |
1237 | unrsv-bw 0 1.25e+06 | |
1238 | unrsv-bw 1 1.25e+06 | |
1239 | unrsv-bw 2 1.25e+06 | |
1240 | unrsv-bw 3 1.25e+06 | |
1241 | unrsv-bw 4 1.25e+06 | |
1242 | unrsv-bw 5 1.25e+06 | |
1243 | unrsv-bw 6 1.25e+06 | |
1244 | unrsv-bw 7 1.25e+06 | |
1245 | neighbor 192.168.2.2 as 65000 | |
c1a54c05 | 1246 | |
9eb95b3b QY |
1247 | Then the :file:`ospfd.conf` itself: |
1248 | ||
1249 | .. code-block:: frr | |
c1a54c05 QY |
1250 | |
1251 | hostname HOSTNAME | |
1252 | password PASSWORD | |
1253 | log file /var/log/ospfd.log | |
1254 | ! | |
1255 | ! | |
1256 | interface eth0 | |
1257 | ip ospf hello-interval 60 | |
1258 | ip ospf dead-interval 240 | |
1259 | ! | |
1260 | interface eth1 | |
1261 | ip ospf hello-interval 60 | |
1262 | ip ospf dead-interval 240 | |
1263 | ! | |
1264 | ! | |
1265 | router ospf | |
1266 | ospf router-id 192.168.1.1 | |
1267 | network 192.168.0.0/16 area 1 | |
1268 | ospf opaque-lsa | |
42fc5d26 QY |
1269 | mpls-te |
1270 | mpls-te router-address 192.168.1.1 | |
1271 | mpls-te inter-as area 1 | |
c1a54c05 QY |
1272 | ! |
1273 | line vty | |
a8c90e15 | 1274 | |
d1e7591e | 1275 | A router information example with PCE advertisement: |
42fc5d26 | 1276 | |
9eb95b3b | 1277 | .. code-block:: frr |
42fc5d26 | 1278 | |
c1a54c05 QY |
1279 | ! |
1280 | router ospf | |
1281 | ospf router-id 192.168.1.1 | |
1282 | network 192.168.0.0/16 area 1 | |
1283 | capability opaque | |
42fc5d26 QY |
1284 | mpls-te |
1285 | mpls-te router-address 192.168.1.1 | |
c1a54c05 | 1286 | router-info area 0.0.0.1 |
42fc5d26 QY |
1287 | pce address 192.168.1.1 |
1288 | pce flag 0x80 | |
1289 | pce domain as 65400 | |
1290 | pce neighbor as 65500 | |
1291 | pce neighbor as 65200 | |
1292 | pce scope 0x80 | |
c1a54c05 | 1293 | ! |