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