]>
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 | ||
0efdf0fe | 302 | .. _ospf-area: |
42fc5d26 | 303 | |
e6f1b831 QY |
304 | Areas |
305 | ----- | |
42fc5d26 | 306 | |
c1a54c05 | 307 | .. clicmd:: area A.B.C.D range A.B.C.D/M |
42fc5d26 | 308 | |
c1a54c05 | 309 | .. clicmd:: area (0-4294967295) range A.B.C.D/M |
42fc5d26 | 310 | |
42fc5d26 | 311 | |
42fc5d26 | 312 | |
9eb95b3b QY |
313 | Summarize intra area paths from specified area into one Type-3 summary-LSA |
314 | announced to other areas. This command can be used only in ABR and ONLY | |
d1e7591e | 315 | router-LSAs (Type-1) and network-LSAs (Type-2) (i.e. LSAs with scope area) can |
9eb95b3b QY |
316 | be summarized. Type-5 AS-external-LSAs can't be summarized - their scope is AS. |
317 | Summarizing Type-7 AS-external-LSAs isn't supported yet by FRR. | |
42fc5d26 | 318 | |
9eb95b3b | 319 | .. code-block:: frr |
42fc5d26 | 320 | |
9eb95b3b QY |
321 | router ospf |
322 | network 192.168.1.0/24 area 0.0.0.0 | |
323 | network 10.0.0.0/8 area 0.0.0.10 | |
324 | area 0.0.0.10 range 10.0.0.0/8 | |
a8c90e15 | 325 | |
42fc5d26 | 326 | |
9eb95b3b QY |
327 | With configuration above one Type-3 Summary-LSA with routing info 10.0.0.0/8 is |
328 | announced into backbone area if area 0.0.0.10 contains at least one intra-area | |
d1e7591e | 329 | network (i.e. described with router or network LSA) from this range. |
42fc5d26 | 330 | |
c1a54c05 | 331 | .. clicmd:: area A.B.C.D range IPV4_PREFIX not-advertise |
42fc5d26 | 332 | |
42fc5d26 | 333 | |
d1e7591e | 334 | Instead of summarizing intra area paths filter them - i.e. intra area paths from this |
c1a54c05 QY |
335 | range are not advertised into other areas. |
336 | This command makes sense in ABR only. | |
42fc5d26 | 337 | |
c1a54c05 | 338 | .. clicmd:: area A.B.C.D range IPV4_PREFIX substitute IPV4_PREFIX |
42fc5d26 | 339 | |
42fc5d26 | 340 | |
c1a54c05 | 341 | Substitute summarized prefix with another prefix. |
42fc5d26 | 342 | |
9eb95b3b | 343 | .. code-block:: frr |
42fc5d26 | 344 | |
9eb95b3b QY |
345 | router ospf |
346 | network 192.168.1.0/24 area 0.0.0.0 | |
347 | network 10.0.0.0/8 area 0.0.0.10 | |
348 | area 0.0.0.10 range 10.0.0.0/8 substitute 11.0.0.0/8 | |
a8c90e15 | 349 | |
42fc5d26 | 350 | |
c1a54c05 | 351 | One Type-3 summary-LSA with routing info 11.0.0.0/8 is announced into backbone area if |
d1e7591e | 352 | area 0.0.0.10 contains at least one intra-area network (i.e. described with router-LSA or |
c1a54c05 QY |
353 | network-LSA) from range 10.0.0.0/8. |
354 | This command makes sense in ABR only. | |
42fc5d26 | 355 | |
c1a54c05 | 356 | .. clicmd:: area A.B.C.D virtual-link A.B.C.D |
42fc5d26 | 357 | |
c1a54c05 | 358 | .. clicmd:: area (0-4294967295) virtual-link A.B.C.D |
42fc5d26 | 359 | |
42fc5d26 | 360 | |
42fc5d26 | 361 | |
c1a54c05 | 362 | .. clicmd:: area A.B.C.D shortcut |
42fc5d26 | 363 | |
c1a54c05 | 364 | .. clicmd:: area (0-4294967295) shortcut |
42fc5d26 | 365 | |
42fc5d26 | 366 | |
42fc5d26 | 367 | |
c1a54c05 QY |
368 | Configure the area as Shortcut capable. See :rfc:`3509`. This requires |
369 | that the 'abr-type' be set to 'shortcut'. | |
42fc5d26 | 370 | |
c1a54c05 | 371 | .. clicmd:: area A.B.C.D stub |
42fc5d26 | 372 | |
c1a54c05 | 373 | .. clicmd:: area (0-4294967295) stub |
42fc5d26 | 374 | |
42fc5d26 | 375 | |
42fc5d26 | 376 | |
c1a54c05 QY |
377 | Configure the area to be a stub area. That is, an area where no router |
378 | originates routes external to OSPF and hence an area where all external | |
379 | routes are via the ABR(s). Hence, ABRs for such an area do not need | |
380 | to pass AS-External LSAs (type-5s) or ASBR-Summary LSAs (type-4) into the | |
381 | area. They need only pass Network-Summary (type-3) LSAs into such an area, | |
382 | along with a default-route summary. | |
42fc5d26 | 383 | |
c1a54c05 | 384 | .. clicmd:: area A.B.C.D stub no-summary |
42fc5d26 | 385 | |
c1a54c05 | 386 | .. clicmd:: area (0-4294967295) stub no-summary |
42fc5d26 | 387 | |
42fc5d26 | 388 | |
42fc5d26 | 389 | |
c1a54c05 QY |
390 | Prevents an *ospfd* ABR from injecting inter-area |
391 | summaries into the specified stub area. | |
42fc5d26 | 392 | |
c1a54c05 | 393 | .. clicmd:: area A.B.C.D default-cost (0-16777215) |
42fc5d26 | 394 | |
42fc5d26 | 395 | |
c1a54c05 | 396 | Set the cost of default-summary LSAs announced to stubby areas. |
42fc5d26 | 397 | |
c1a54c05 | 398 | .. clicmd:: area A.B.C.D export-list NAME |
42fc5d26 | 399 | |
c1a54c05 | 400 | .. clicmd:: area (0-4294967295) export-list NAME |
42fc5d26 | 401 | |
42fc5d26 | 402 | |
42fc5d26 | 403 | |
c1a54c05 QY |
404 | Filter Type-3 summary-LSAs announced to other areas originated from intra- |
405 | area paths from specified area. | |
42fc5d26 | 406 | |
9eb95b3b | 407 | .. code-block:: frr |
a8c90e15 | 408 | |
9eb95b3b QY |
409 | router ospf |
410 | network 192.168.1.0/24 area 0.0.0.0 | |
411 | network 10.0.0.0/8 area 0.0.0.10 | |
412 | area 0.0.0.10 export-list foo | |
413 | ! | |
414 | access-list foo permit 10.10.0.0/16 | |
415 | access-list foo deny any | |
42fc5d26 | 416 | |
c1a54c05 QY |
417 | With example above any intra-area paths from area 0.0.0.10 and from range |
418 | 10.10.0.0/16 (for example 10.10.1.0/24 and 10.10.2.128/30) are announced into | |
419 | other areas as Type-3 summary-LSA's, but any others (for example 10.11.0.0/16 | |
420 | or 10.128.30.16/30) aren't. | |
42fc5d26 | 421 | |
c1a54c05 QY |
422 | This command is only relevant if the router is an ABR for the specified |
423 | area. | |
42fc5d26 | 424 | |
c1a54c05 | 425 | .. clicmd:: area A.B.C.D import-list NAME |
42fc5d26 | 426 | |
c1a54c05 | 427 | .. clicmd:: area (0-4294967295) import-list NAME |
42fc5d26 | 428 | |
42fc5d26 | 429 | |
42fc5d26 | 430 | |
9eb95b3b QY |
431 | Same as export-list, but it applies to paths announced into specified area |
432 | as Type-3 summary-LSAs. | |
42fc5d26 | 433 | |
c1a54c05 | 434 | .. clicmd:: area A.B.C.D filter-list prefix NAME in |
42fc5d26 | 435 | |
c1a54c05 | 436 | .. clicmd:: area A.B.C.D filter-list prefix NAME out |
42fc5d26 | 437 | |
c1a54c05 | 438 | .. clicmd:: area (0-4294967295) filter-list prefix NAME in |
42fc5d26 | 439 | |
c1a54c05 | 440 | .. clicmd:: area (0-4294967295) filter-list prefix NAME out |
42fc5d26 | 441 | |
42fc5d26 | 442 | |
42fc5d26 | 443 | |
42fc5d26 | 444 | |
42fc5d26 | 445 | |
9eb95b3b QY |
446 | Filtering Type-3 summary-LSAs to/from area using prefix lists. This command |
447 | makes sense in ABR only. | |
42fc5d26 | 448 | |
c1a54c05 | 449 | .. clicmd:: area A.B.C.D authentication |
42fc5d26 | 450 | |
c1a54c05 | 451 | .. clicmd:: area (0-4294967295) authentication |
42fc5d26 | 452 | |
42fc5d26 | 453 | |
42fc5d26 | 454 | |
9eb95b3b QY |
455 | Specify that simple password authentication should be used for the given |
456 | area. | |
42fc5d26 | 457 | |
c1a54c05 | 458 | .. clicmd:: area A.B.C.D authentication message-digest |
42fc5d26 | 459 | |
c1a54c05 | 460 | .. clicmd:: area (0-4294967295) authentication message-digest |
42fc5d26 | 461 | |
6ee602cd QY |
462 | Specify that OSPF packets must be authenticated with MD5 HMACs within the |
463 | given area. Keying material must also be configured on a per-interface basis | |
464 | (:clicmd:`ip ospf message-digest-key`). | |
42fc5d26 | 465 | |
6ee602cd QY |
466 | MD5 authentication may also be configured on a per-interface basis |
467 | (:clicmd:`ip ospf authentication message-digest`). Such per-interface | |
468 | settings will override any per-area authentication setting. | |
42fc5d26 | 469 | |
0efdf0fe | 470 | .. _ospf-interface: |
42fc5d26 | 471 | |
e6f1b831 QY |
472 | Interfaces |
473 | ---------- | |
42fc5d26 | 474 | |
c1a54c05 | 475 | .. clicmd:: ip ospf area AREA [ADDR] |
42fc5d26 | 476 | |
42fc5d26 | 477 | |
c1a54c05 | 478 | Enable OSPF on the interface, optionally restricted to just the IP address |
6ee602cd QY |
479 | given by `ADDR`, putting it in the `AREA` area. Per interface area settings |
480 | take precedence to network commands | |
481 | (:clicmd:`network A.B.C.D/M area A.B.C.D`). | |
42fc5d26 | 482 | |
c1a54c05 QY |
483 | If you have a lot of interfaces, and/or a lot of subnets, then enabling OSPF |
484 | via this command may result in a slight performance improvement. | |
42fc5d26 | 485 | |
c1a54c05 | 486 | .. clicmd:: ip ospf authentication-key AUTH_KEY |
42fc5d26 | 487 | |
42fc5d26 | 488 | |
c1a54c05 QY |
489 | Set OSPF authentication key to a simple password. After setting `AUTH_KEY`, |
490 | all OSPF packets are authenticated. `AUTH_KEY` has length up to 8 chars. | |
42fc5d26 | 491 | |
c1a54c05 | 492 | Simple text password authentication is insecure and deprecated in favour of |
6ee602cd | 493 | MD5 HMAC authentication. |
42fc5d26 | 494 | |
c1a54c05 | 495 | .. clicmd:: ip ospf authentication message-digest |
42fc5d26 | 496 | |
6ee602cd QY |
497 | Specify that MD5 HMAC authentication must be used on this interface. MD5 |
498 | keying material must also be configured. Overrides any authentication | |
499 | enabled on a per-area basis | |
500 | (:clicmd:`area A.B.C.D authentication message-digest`) | |
42fc5d26 | 501 | |
c1a54c05 QY |
502 | Note that OSPF MD5 authentication requires that time never go backwards |
503 | (correct time is NOT important, only that it never goes backwards), even | |
d1e7591e | 504 | across resets, if ospfd is to be able to promptly reestablish adjacencies |
6ee602cd | 505 | with its neighbours after restarts/reboots. The host should have system time |
d1e7591e | 506 | be set at boot from an external or non-volatile source (e.g. battery backed |
6ee602cd | 507 | clock, NTP, etc.) or else the system clock should be periodically saved to |
d1e7591e | 508 | non-volatile storage and restored at boot if MD5 authentication is to be |
6ee602cd | 509 | expected to work reliably. |
42fc5d26 | 510 | |
c1a54c05 | 511 | .. clicmd:: ip ospf message-digest-key KEYID md5 KEY |
42fc5d26 | 512 | |
42fc5d26 | 513 | |
6ee602cd QY |
514 | Set OSPF authentication key to a cryptographic password. The cryptographic |
515 | algorithm is MD5. | |
42fc5d26 | 516 | |
9eb95b3b QY |
517 | KEYID identifies secret key used to create the message digest. This ID is |
518 | part of the protocol and must be consistent across routers on a link. | |
42fc5d26 | 519 | |
9eb95b3b QY |
520 | KEY is the actual message digest key, of up to 16 chars (larger strings will |
521 | be truncated), and is associated with the given KEYID. | |
42fc5d26 | 522 | |
c1a54c05 | 523 | .. clicmd:: ip ospf cost (1-65535) |
42fc5d26 | 524 | |
42fc5d26 | 525 | |
9eb95b3b QY |
526 | Set link cost for the specified interface. The cost value is set to |
527 | router-LSA's metric field and used for SPF calculation. | |
42fc5d26 | 528 | |
c1a54c05 | 529 | .. clicmd:: ip ospf dead-interval (1-65535) |
42fc5d26 | 530 | |
c1a54c05 | 531 | .. clicmd:: ip ospf dead-interval minimal hello-multiplier (2-20) |
42fc5d26 | 532 | |
42fc5d26 | 533 | |
6ee602cd QY |
534 | Set number of seconds for RouterDeadInterval timer value used for Wait Timer |
535 | and Inactivity Timer. This value must be the same for all routers attached | |
536 | to a common network. The default value is 40 seconds. | |
42fc5d26 | 537 | |
6ee602cd QY |
538 | If 'minimal' is specified instead, then the dead-interval is set to 1 second |
539 | and one must specify a hello-multiplier. The hello-multiplier specifies how | |
540 | many Hellos to send per second, from 2 (every 500ms) to 20 (every 50ms). | |
541 | Thus one can have 1s convergence time for OSPF. If this form is specified, | |
542 | then the hello-interval advertised in Hello packets is set to 0 and the | |
543 | hello-interval on received Hello packets is not checked, thus the | |
544 | hello-multiplier need NOT be the same across multiple routers on a common | |
545 | link. | |
42fc5d26 | 546 | |
c1a54c05 | 547 | .. clicmd:: ip ospf hello-interval (1-65535) |
42fc5d26 | 548 | |
42fc5d26 | 549 | |
c1a54c05 QY |
550 | Set number of seconds for HelloInterval timer value. Setting this value, |
551 | Hello packet will be sent every timer value seconds on the specified interface. | |
552 | This value must be the same for all routers attached to a common network. | |
553 | The default value is 10 seconds. | |
42fc5d26 | 554 | |
6ee602cd QY |
555 | This command has no effect if |
556 | :clicmd:`ip ospf dead-interval minimal hello-multiplier (2-20)` is also | |
c1a54c05 | 557 | specified for the interface. |
42fc5d26 | 558 | |
c1a54c05 | 559 | .. clicmd:: ip ospf network (broadcast|non-broadcast|point-to-multipoint|point-to-point) |
42fc5d26 | 560 | |
56f9b9bf DS |
561 | When configuring a point-to-point network on an interface and the interface |
562 | has a /32 address associated with then OSPF will treat the interface | |
563 | as being `unnumbered`. If you are doing this you *must* set the | |
564 | net.ipv4.conf.<interface name>.rp_filter value to 0. In order for | |
565 | the ospf multicast packets to be delivered by the kernel. | |
566 | ||
42fc5d26 | 567 | |
d1e7591e | 568 | Set explicitly network type for specified interface. |
42fc5d26 | 569 | |
c1a54c05 | 570 | .. clicmd:: ip ospf priority (0-255) |
42fc5d26 | 571 | |
42fc5d26 | 572 | |
9eb95b3b QY |
573 | Set RouterPriority integer value. The router with the highest priority will |
574 | be more eligible to become Designated Router. Setting the value to 0, makes | |
575 | the router ineligible to become Designated Router. The default value is 1. | |
42fc5d26 | 576 | |
c1a54c05 | 577 | .. clicmd:: ip ospf retransmit-interval (1-65535) |
42fc5d26 | 578 | |
42fc5d26 | 579 | |
9eb95b3b QY |
580 | Set number of seconds for RxmtInterval timer value. This value is used when |
581 | retransmitting Database Description and Link State Request packets. The | |
582 | default value is 5 seconds. | |
42fc5d26 | 583 | |
7db1c0f0 | 584 | .. clicmd:: ip ospf transmit-delay (1-65535) [A.B.C.D] |
42fc5d26 | 585 | |
42fc5d26 | 586 | |
c1a54c05 | 587 | Set number of seconds for InfTransDelay value. LSAs' age should be |
9eb95b3b | 588 | incremented by this value when transmitting. The default value is 1 second. |
42fc5d26 | 589 | |
c1a54c05 | 590 | .. clicmd:: ip ospf area (A.B.C.D|(0-4294967295)) |
42fc5d26 | 591 | |
42fc5d26 | 592 | |
9eb95b3b | 593 | Enable ospf on an interface and set associated area. |
42fc5d26 | 594 | |
243892e0 DA |
595 | OSPF route-map |
596 | ============== | |
597 | ||
598 | Usage of *ospfd*'s route-map support. | |
599 | ||
243892e0 DA |
600 | .. clicmd:: set metric [+|-](0-4294967295) |
601 | ||
602 | Set a metric for matched route when sending announcement. Use plus (+) sign | |
603 | to add a metric value to an existing metric. Use minus (-) sign to | |
604 | substract a metric value from an existing metric. | |
605 | ||
0efdf0fe | 606 | .. _redistribute-routes-to-ospf: |
42fc5d26 | 607 | |
e6f1b831 QY |
608 | Redistribution |
609 | -------------- | |
42fc5d26 | 610 | |
0efdf0fe | 611 | .. _ospf-redistribute: |
42fc5d26 | 612 | |
1e31580f QY |
613 | .. clicmd:: redistribute <babel|bgp|connected|eigrp|isis|kernel|openfabric|ospf|rip|sharp|static|table> [metric-type (1-2)] [metric (0-16777214)] [route-map WORD] |
614 | ||
9eb95b3b QY |
615 | Redistribute routes of the specified protocol or kind into OSPF, with the |
616 | metric type and metric set if specified, filtering the routes using the | |
617 | given route-map if specified. Redistributed routes may also be filtered | |
618 | with distribute-lists, see | |
11ab5329 | 619 | :ref:`ospf distribute-list configuration <ospf-distribute-list>`. |
42fc5d26 | 620 | |
9eb95b3b QY |
621 | Redistributed routes are distributed as into OSPF as Type-5 External LSAs |
622 | into links to areas that accept external routes, Type-7 External LSAs for | |
623 | NSSA areas and are not redistributed at all into Stub areas, where external | |
624 | routes are not permitted. | |
42fc5d26 | 625 | |
62333307 QY |
626 | Note that for connected routes, one may instead use the `passive-interface` |
627 | configuration. | |
6ee602cd QY |
628 | |
629 | .. seealso:: | |
630 | ||
631 | clicmd:`passive-interface INTERFACE`. | |
42fc5d26 | 632 | |
c1a54c05 | 633 | .. clicmd:: default-information originate |
42fc5d26 | 634 | |
c1a54c05 | 635 | .. clicmd:: default-information originate metric (0-16777214) |
42fc5d26 | 636 | |
c1a54c05 | 637 | .. clicmd:: default-information originate metric (0-16777214) metric-type (1|2) |
42fc5d26 | 638 | |
c1a54c05 | 639 | .. clicmd:: default-information originate metric (0-16777214) metric-type (1|2) route-map WORD |
42fc5d26 | 640 | |
c1a54c05 | 641 | .. clicmd:: default-information originate always |
42fc5d26 | 642 | |
c1a54c05 | 643 | .. clicmd:: default-information originate always metric (0-16777214) |
42fc5d26 | 644 | |
c1a54c05 | 645 | .. clicmd:: default-information originate always metric (0-16777214) metric-type (1|2) |
42fc5d26 | 646 | |
c1a54c05 | 647 | .. clicmd:: default-information originate always metric (0-16777214) metric-type (1|2) route-map WORD |
42fc5d26 | 648 | |
42fc5d26 | 649 | |
9eb95b3b QY |
650 | Originate an AS-External (type-5) LSA describing a default route into all |
651 | external-routing capable areas, of the specified metric and metric type. If | |
652 | the 'always' keyword is given then the default is always advertised, even | |
653 | when there is no default present in the routing table. | |
42fc5d26 | 654 | |
c1a54c05 | 655 | .. clicmd:: distribute-list NAME out (kernel|connected|static|rip|ospf |
42fc5d26 | 656 | |
42fc5d26 | 657 | |
0efdf0fe | 658 | .. _ospf-distribute-list: |
42fc5d26 | 659 | |
9eb95b3b QY |
660 | Apply the access-list filter, NAME, to redistributed routes of the given |
661 | type before allowing the routes to redistributed into OSPF | |
662 | (:ref:`ospf redistribution <ospf-redistribute>`). | |
42fc5d26 | 663 | |
c1a54c05 | 664 | .. clicmd:: default-metric (0-16777214) |
42fc5d26 | 665 | |
42fc5d26 | 666 | |
c1a54c05 | 667 | .. clicmd:: distance (1-255) |
42fc5d26 | 668 | |
42fc5d26 | 669 | |
c1a54c05 | 670 | .. clicmd:: distance ospf (intra-area|inter-area|external) (1-255) |
42fc5d26 | 671 | |
42fc5d26 | 672 | |
42fc5d26 | 673 | |
cc1a92d8 | 674 | Graceful Restart Helper |
675 | ======================= | |
676 | ||
cc1a92d8 | 677 | .. clicmd:: graceful-restart helper-only [A.B.C.D] |
678 | ||
cc1a92d8 | 679 | |
680 | Configure Graceful Restart (RFC 3623) helper support. | |
681 | By default, helper support is disabled for all neighbours. | |
682 | This config enables/disables helper support on this router | |
683 | for all neighbours. | |
684 | To enable/disable helper support for a specific | |
685 | neighbour, the router-id (A.B.C.D) has to be specified. | |
686 | ||
cc1a92d8 | 687 | .. clicmd:: graceful-restart helper strict-lsa-checking |
688 | ||
cc1a92d8 | 689 | |
690 | If 'strict-lsa-checking' is configured then the helper will | |
691 | abort the Graceful Restart when a LSA change occurs which | |
692 | affects the restarting router. | |
693 | By default 'strict-lsa-checking' is enabled" | |
694 | ||
cc1a92d8 | 695 | .. clicmd:: graceful-restart helper supported-grace-time |
696 | ||
cc1a92d8 | 697 | |
698 | Supports as HELPER for configured grace period. | |
699 | ||
cc1a92d8 | 700 | .. clicmd:: graceful-restart helper planned-only |
701 | ||
cc1a92d8 | 702 | |
703 | It helps to support as HELPER only for planned | |
704 | restarts. By default, it supports both planned and | |
705 | unplanned outages. | |
42fc5d26 | 706 | |
0efdf0fe | 707 | .. _showing-ospf-information: |
42fc5d26 | 708 | |
e6f1b831 QY |
709 | Showing Information |
710 | =================== | |
42fc5d26 | 711 | |
0efdf0fe | 712 | .. _show-ip-ospf: |
42fc5d26 | 713 | |
f328dc60 | 714 | .. clicmd:: show ip ospf [json] |
42fc5d26 | 715 | |
c1a54c05 QY |
716 | Show information on a variety of general OSPF and area state and |
717 | configuration information. | |
42fc5d26 | 718 | |
f328dc60 | 719 | .. clicmd:: show ip ospf interface [INTERFACE] [json] |
42fc5d26 | 720 | |
c1a54c05 QY |
721 | Show state and configuration of OSPF the specified interface, or all |
722 | interfaces if no interface is given. | |
42fc5d26 | 723 | |
f328dc60 | 724 | .. clicmd:: show ip ospf neighbor [json] |
42fc5d26 | 725 | |
f328dc60 | 726 | .. clicmd:: show ip ospf neighbor INTERFACE [json] |
42fc5d26 | 727 | |
f328dc60 | 728 | .. clicmd:: show ip ospf neighbor detail [json] |
42fc5d26 | 729 | |
f328dc60 | 730 | .. clicmd:: show ip ospf neighbor INTERFACE detail [json] |
42fc5d26 | 731 | |
f328dc60 | 732 | Display lsa information of LSDB. |
733 | Json o/p of this command covers base route information | |
734 | i.e all LSAs except opaque lsa info. | |
42fc5d26 | 735 | |
f328dc60 | 736 | .. clicmd:: show ip ospf database [json] |
42fc5d26 | 737 | |
f328dc60 | 738 | .. clicmd:: show ip ospf database (asbr-summary|external|network|router|summary) [json] |
42fc5d26 | 739 | |
f328dc60 | 740 | .. clicmd:: show ip ospf database (asbr-summary|external|network|router|summary) LINK-STATE-ID [json] |
42fc5d26 | 741 | |
f328dc60 | 742 | .. clicmd:: show ip ospf database (asbr-summary|external|network|router|summary) LINK-STATE-ID adv-router ADV-ROUTER [json] |
42fc5d26 | 743 | |
f328dc60 | 744 | .. clicmd:: show ip ospf database (asbr-summary|external|network|router|summary) adv-router ADV-ROUTER [json] |
42fc5d26 | 745 | |
f328dc60 | 746 | .. clicmd:: show ip ospf database (asbr-summary|external|network|router|summary) LINK-STATE-ID self-originate [json] |
42fc5d26 | 747 | |
f328dc60 | 748 | .. clicmd:: show ip ospf database (asbr-summary|external|network|router|summary) self-originate [json] |
42fc5d26 | 749 | |
f328dc60 | 750 | .. clicmd:: show ip ospf database max-age [json] |
42fc5d26 | 751 | |
f328dc60 | 752 | .. clicmd:: show ip ospf database self-originate [json] |
753 | ||
f328dc60 | 754 | .. clicmd:: show ip ospf route [json] |
42fc5d26 | 755 | |
9eb95b3b QY |
756 | Show the OSPF routing table, as determined by the most recent SPF |
757 | calculation. | |
42fc5d26 | 758 | |
cc1a92d8 | 759 | .. clicmd:: show ip ospf graceful-restart helper [detail] [json] |
760 | ||
761 | Displays the Grcaeful Restart Helper details including helper | |
762 | config changes. | |
763 | ||
0efdf0fe | 764 | .. _opaque-lsa: |
42fc5d26 QY |
765 | |
766 | Opaque LSA | |
767 | ========== | |
768 | ||
c1a54c05 | 769 | .. clicmd:: ospf opaque-lsa |
42fc5d26 | 770 | |
c1a54c05 | 771 | .. clicmd:: capability opaque |
42fc5d26 | 772 | |
42fc5d26 | 773 | |
42fc5d26 | 774 | |
85400b29 MS |
775 | *ospfd* supports Opaque LSA (:rfc:`2370`) as partial support for |
776 | MPLS Traffic Engineering LSAs. The opaque-lsa capability must be | |
777 | enabled in the configuration. An alternate command could be | |
778 | "mpls-te on" (:ref:`ospf-traffic-engineering`). Note that FRR | |
779 | offers only partial support for some of the routing protocol | |
780 | extensions that are used with MPLS-TE; it does not support a | |
781 | complete RSVP-TE solution. | |
42fc5d26 | 782 | |
c1a54c05 | 783 | .. clicmd:: show ip ospf database (opaque-link|opaque-area|opaque-external) |
42fc5d26 | 784 | |
c1a54c05 | 785 | .. clicmd:: show ip ospf database (opaque-link|opaque-area|opaque-external) LINK-STATE-ID |
42fc5d26 | 786 | |
c1a54c05 | 787 | .. clicmd:: show ip ospf database (opaque-link|opaque-area|opaque-external) LINK-STATE-ID adv-router ADV-ROUTER |
42fc5d26 | 788 | |
c1a54c05 | 789 | .. clicmd:: show ip ospf database (opaque-link|opaque-area|opaque-external) adv-router ADV-ROUTER |
42fc5d26 | 790 | |
c1a54c05 | 791 | .. clicmd:: show ip ospf database (opaque-link|opaque-area|opaque-external) LINK-STATE-ID self-originate |
42fc5d26 | 792 | |
c1a54c05 | 793 | .. clicmd:: show ip ospf database (opaque-link|opaque-area|opaque-external) self-originate |
42fc5d26 | 794 | |
c1a54c05 | 795 | Show Opaque LSA from the database. |
42fc5d26 | 796 | |
c1a54c05 | 797 | .. _ospf-traffic-engineering: |
42fc5d26 QY |
798 | |
799 | Traffic Engineering | |
800 | =================== | |
801 | ||
85400b29 MS |
802 | .. note:: |
803 | ||
804 | At this time, FRR offers partial support for some of the routing | |
805 | protocol extensions that can be used with MPLS-TE. FRR does not | |
806 | support a complete RSVP-TE solution currently. | |
807 | ||
c1a54c05 | 808 | .. clicmd:: mpls-te on |
42fc5d26 | 809 | |
42fc5d26 | 810 | |
c1a54c05 | 811 | Enable Traffic Engineering LSA flooding. |
42fc5d26 | 812 | |
c1a54c05 | 813 | .. clicmd:: mpls-te router-address <A.B.C.D> |
42fc5d26 | 814 | |
c1a54c05 QY |
815 | Configure stable IP address for MPLS-TE. This IP address is then advertise |
816 | in Opaque LSA Type-10 TLV=1 (TE) option 1 (Router-Address). | |
42fc5d26 | 817 | |
c1a54c05 | 818 | .. clicmd:: mpls-te inter-as area <area-id>|as |
42fc5d26 | 819 | |
42fc5d26 | 820 | |
c1a54c05 QY |
821 | Enable :rfc:`5392` support - Inter-AS TE v2 - to flood Traffic Engineering |
822 | parameters of Inter-AS link. 2 modes are supported: AREA and AS; LSA are | |
823 | flood in AREA <area-id> with Opaque Type-10, respectively in AS with Opaque | |
824 | Type-11. In all case, Opaque-LSA TLV=6. | |
42fc5d26 | 825 | |
c1a54c05 | 826 | .. clicmd:: show ip ospf mpls-te interface |
42fc5d26 | 827 | |
c1a54c05 | 828 | .. clicmd:: show ip ospf mpls-te interface INTERFACE |
42fc5d26 | 829 | |
c1a54c05 | 830 | Show MPLS Traffic Engineering parameters for all or specified interface. |
42fc5d26 | 831 | |
c1a54c05 | 832 | .. clicmd:: show ip ospf mpls-te router |
42fc5d26 | 833 | |
c1a54c05 | 834 | Show Traffic Engineering router parameters. |
42fc5d26 | 835 | |
0efdf0fe | 836 | .. _router-information: |
42fc5d26 QY |
837 | |
838 | Router Information | |
839 | ================== | |
840 | ||
ddd73a96 | 841 | .. clicmd:: router-info [as | area] |
42fc5d26 | 842 | |
42fc5d26 | 843 | |
c1a54c05 | 844 | Enable Router Information (:rfc:`4970`) LSA advertisement with AS scope |
ddd73a96 OD |
845 | (default) or Area scope flooding when area is specified. Old syntax |
846 | `router-info area <A.B.C.D>` is always supported but mark as deprecated | |
847 | as the area ID is no more necessary. Indeed, router information support | |
848 | multi-area and detect automatically the areas. | |
42fc5d26 | 849 | |
c1a54c05 | 850 | .. clicmd:: pce address <A.B.C.D> |
42fc5d26 | 851 | |
42fc5d26 | 852 | |
c1a54c05 | 853 | .. clicmd:: pce domain as (0-65535) |
42fc5d26 | 854 | |
42fc5d26 | 855 | |
c1a54c05 | 856 | .. clicmd:: pce neighbor as (0-65535) |
42fc5d26 | 857 | |
42fc5d26 | 858 | |
c1a54c05 | 859 | .. clicmd:: pce flag BITPATTERN |
42fc5d26 | 860 | |
42fc5d26 | 861 | |
c1a54c05 | 862 | .. clicmd:: pce scope BITPATTERN |
42fc5d26 | 863 | |
42fc5d26 | 864 | |
9eb95b3b | 865 | The commands are conform to :rfc:`5088` and allow OSPF router announce Path |
d1e7591e QY |
866 | Computation Element (PCE) capabilities through the Router Information (RI) |
867 | LSA. Router Information must be enable prior to this. The command set/unset | |
868 | respectively the PCE IP address, Autonomous System (AS) numbers of | |
9eb95b3b QY |
869 | controlled domains, neighbor ASs, flag and scope. For flag and scope, please |
870 | refer to :rfc`5088` for the BITPATTERN recognition. Multiple 'pce neighbor' | |
871 | command could be specified in order to specify all PCE neighbours. | |
42fc5d26 | 872 | |
c1a54c05 | 873 | .. clicmd:: show ip ospf router-info |
42fc5d26 | 874 | |
c1a54c05 | 875 | Show Router Capabilities flag. |
9eb95b3b | 876 | |
c1a54c05 | 877 | .. clicmd:: show ip ospf router-info pce |
42fc5d26 | 878 | |
c1a54c05 | 879 | Show Router Capabilities PCE parameters. |
42fc5d26 | 880 | |
0efdf0fe | 881 | .. _debugging-ospf: |
42fc5d26 | 882 | |
50cc7127 QY |
883 | Segment Routing |
884 | =============== | |
885 | ||
6f751f14 OD |
886 | This is an EXPERIMENTAL support of Segment Routing as per `RFC 8665` for MPLS |
887 | dataplane. | |
50cc7127 | 888 | |
03750f1e | 889 | .. clicmd:: segment-routing on |
50cc7127 QY |
890 | |
891 | Enable Segment Routing. Even if this also activate routing information | |
892 | support, it is preferable to also activate routing information, and set | |
893 | accordingly the Area or AS flooding. | |
894 | ||
03750f1e | 895 | .. clicmd:: segment-routing global-block (0-1048575) (0-1048575) |
50cc7127 QY |
896 | |
897 | Fix the Segment Routing Global Block i.e. the label range used by MPLS to | |
6f751f14 OD |
898 | store label in the MPLS FIB for Prefix SID. |
899 | ||
03750f1e | 900 | .. clicmd:: segment-routing local-block (0-1048575) (0-1048575) |
6f751f14 OD |
901 | |
902 | Fix the Segment Routing Local Block i.e. the label range used by MPLS to | |
903 | store label in the MPLS FIB for Adjacency SID. | |
50cc7127 | 904 | |
03750f1e | 905 | .. clicmd:: segment-routing node-msd (1-16) |
50cc7127 QY |
906 | |
907 | Fix the Maximum Stack Depth supported by the router. The value depend of the | |
908 | MPLS dataplane. E.g. for Linux kernel, since version 4.13 it is 32. | |
909 | ||
03750f1e | 910 | .. clicmd:: segment-routing prefix A.B.C.D/M [index (0-65535)|no-php-flag|explicit-null] |
50cc7127 | 911 | |
9eb95b3b QY |
912 | prefix with /32 corresponding to a loopback interface are currently |
913 | supported. The 'no-php-flag' means NO Penultimate Hop Popping that allows SR | |
f786c4d7 OD |
914 | node to request to its neighbor to not pop the label. The 'explicit-null' means that |
915 | neighbor nodes must swap the incoming label by the MPLS Explicit Null label | |
916 | before delivering the packet. | |
50cc7127 | 917 | |
e3e3afff | 918 | .. clicmd:: show ip ospf database segment-routing <adv-router ADVROUTER|self-originate> [json] |
50cc7127 | 919 | |
d1e7591e | 920 | Show Segment Routing Data Base, all SR nodes, specific advertised router or |
e3e3afff QY |
921 | self router. Optional JSON output can be obtained by appending 'json' to the |
922 | end of the command. | |
50cc7127 | 923 | |
077abf3b | 924 | External Route Summarisation |
925 | ============================ | |
926 | This feature summarises originated external LSAs(Type-5 and Type-7). | |
927 | Summary Route will be originated on-behalf of all matched external LSAs. | |
928 | ||
03750f1e | 929 | .. clicmd:: summary-address A.B.C.D/M [tag (1-4294967295)] |
077abf3b | 930 | |
931 | This command enable/disables summarisation for the configured address | |
932 | range. Tag is the optional parameter. If tag configured Summary route | |
933 | will be originated with the configured tag. | |
934 | ||
03750f1e | 935 | .. clicmd:: summary-address A.B.C.D/M no-advertise |
077abf3b | 936 | |
937 | This command to ensure not advertise the summary lsa for the matched | |
938 | external LSAs. | |
939 | ||
077abf3b | 940 | .. clicmd:: aggregation timer (5-1800) |
941 | ||
942 | Configure aggregation delay timer interval. Summarisation starts only after | |
943 | this delay timer expiry. By default, delay interval is 5 secs. | |
944 | ||
077abf3b | 945 | |
946 | Resetting the aggregation delay interval to default value. | |
947 | ||
077abf3b | 948 | .. clicmd:: show ip ospf [vrf <NAME|all>] summary-address [detail] [json] |
949 | ||
950 | Show configuration for display all configured summary routes with | |
951 | matching external LSA information. | |
952 | ||
7fd0729f G |
953 | TI-LFA |
954 | ====== | |
955 | ||
956 | Experimental support for Topology Independent LFA (Loop-Free Alternate), see | |
957 | for example 'draft-bashandy-rtgwg-segment-routing-ti-lfa-05'. Note that | |
958 | TI-LFA requires a proper Segment Routing configuration. | |
959 | ||
385a1e07 | 960 | .. clicmd:: fast-reroute ti-lfa [node-protection] |
7fd0729f G |
961 | |
962 | Configured on the router level. Activates TI-LFA for all interfaces. | |
7fd0729f | 963 | |
3e94c9a4 G |
964 | Note that so far only P2P interfaces are supported. |
965 | ||
42fc5d26 QY |
966 | Debugging OSPF |
967 | ============== | |
968 | ||
c1a54c05 | 969 | .. clicmd:: debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) [detail] |
42fc5d26 | 970 | |
42fc5d26 | 971 | |
c1a54c05 | 972 | Dump Packet for debugging |
42fc5d26 | 973 | |
c1a54c05 | 974 | .. clicmd:: debug ospf ism |
42fc5d26 | 975 | |
c1a54c05 | 976 | .. clicmd:: debug ospf ism (status|events|timers) |
42fc5d26 | 977 | |
42fc5d26 | 978 | |
42fc5d26 | 979 | |
c1a54c05 | 980 | Show debug information of Interface State Machine |
42fc5d26 | 981 | |
c1a54c05 | 982 | .. clicmd:: debug ospf nsm |
42fc5d26 | 983 | |
c1a54c05 | 984 | .. clicmd:: debug ospf nsm (status|events|timers) |
42fc5d26 | 985 | |
42fc5d26 | 986 | |
42fc5d26 | 987 | |
c1a54c05 | 988 | Show debug information of Network State Machine |
42fc5d26 | 989 | |
c1a54c05 | 990 | .. clicmd:: debug ospf event |
42fc5d26 | 991 | |
42fc5d26 | 992 | |
c1a54c05 | 993 | Show debug information of OSPF event |
42fc5d26 | 994 | |
c1a54c05 | 995 | .. clicmd:: debug ospf nssa |
42fc5d26 | 996 | |
42fc5d26 | 997 | |
c1a54c05 | 998 | Show debug information about Not So Stub Area |
42fc5d26 | 999 | |
c1a54c05 | 1000 | .. clicmd:: debug ospf lsa |
42fc5d26 | 1001 | |
c1a54c05 | 1002 | .. clicmd:: debug ospf lsa (generate|flooding|refresh) |
42fc5d26 | 1003 | |
42fc5d26 | 1004 | |
42fc5d26 | 1005 | |
c1a54c05 | 1006 | Show debug detail of Link State messages |
42fc5d26 | 1007 | |
c1a54c05 | 1008 | .. clicmd:: debug ospf te |
42fc5d26 | 1009 | |
42fc5d26 | 1010 | |
c1a54c05 | 1011 | Show debug information about Traffic Engineering LSA |
42fc5d26 | 1012 | |
c1a54c05 | 1013 | .. clicmd:: debug ospf zebra |
42fc5d26 | 1014 | |
c1a54c05 | 1015 | .. clicmd:: debug ospf zebra (interface|redistribute) |
42fc5d26 | 1016 | |
42fc5d26 | 1017 | |
42fc5d26 | 1018 | |
c1a54c05 | 1019 | Show debug information of ZEBRA API |
42fc5d26 | 1020 | |
cc1a92d8 | 1021 | .. clicmd:: debug ospf graceful-restart helper |
1022 | ||
cc1a92d8 | 1023 | |
1024 | Enable/disable debug information for OSPF Graceful Restart Helper | |
1025 | ||
c1a54c05 | 1026 | .. clicmd:: show debugging ospf |
42fc5d26 | 1027 | |
03750f1e | 1028 | .. clicmd:: debug ospf lsa aggregate |
077abf3b | 1029 | |
1030 | Debug commnd to enable/disable external route summarisation specific debugs. | |
1031 | ||
42fc5d26 QY |
1032 | OSPF Configuration Examples |
1033 | =========================== | |
1034 | ||
1035 | A simple example, with MD5 authentication enabled: | |
1036 | ||
9eb95b3b | 1037 | .. code-block:: frr |
42fc5d26 | 1038 | |
c1a54c05 QY |
1039 | ! |
1040 | interface bge0 | |
1041 | ip ospf authentication message-digest | |
1042 | ip ospf message-digest-key 1 md5 ABCDEFGHIJK | |
1043 | ! | |
1044 | router ospf | |
1045 | network 192.168.0.0/16 area 0.0.0.1 | |
1046 | area 0.0.0.1 authentication message-digest | |
a8c90e15 | 1047 | |
42fc5d26 | 1048 | |
d50b2aa0 | 1049 | An :abbr:`ABR` router, with MD5 authentication and performing summarisation |
42fc5d26 QY |
1050 | of networks between the areas: |
1051 | ||
9eb95b3b | 1052 | .. code-block:: frr |
42fc5d26 | 1053 | |
c1a54c05 QY |
1054 | ! |
1055 | password ABCDEF | |
1056 | log file /var/log/frr/ospfd.log | |
1057 | service advanced-vty | |
1058 | ! | |
1059 | interface eth0 | |
1060 | ip ospf authentication message-digest | |
1061 | ip ospf message-digest-key 1 md5 ABCDEFGHIJK | |
1062 | ! | |
1063 | interface ppp0 | |
1064 | ! | |
1065 | interface br0 | |
1066 | ip ospf authentication message-digest | |
1067 | ip ospf message-digest-key 2 md5 XYZ12345 | |
1068 | ! | |
1069 | router ospf | |
1070 | ospf router-id 192.168.0.1 | |
1071 | redistribute connected | |
1072 | passive interface ppp0 | |
1073 | network 192.168.0.0/24 area 0.0.0.0 | |
1074 | network 10.0.0.0/16 area 0.0.0.0 | |
1075 | network 192.168.1.0/24 area 0.0.0.1 | |
1076 | area 0.0.0.0 authentication message-digest | |
1077 | area 0.0.0.0 range 10.0.0.0/16 | |
1078 | area 0.0.0.0 range 192.168.0.0/24 | |
1079 | area 0.0.0.1 authentication message-digest | |
1080 | area 0.0.0.1 range 10.2.0.0/16 | |
1081 | ! | |
a8c90e15 | 1082 | |
42fc5d26 QY |
1083 | |
1084 | A Traffic Engineering configuration, with Inter-ASv2 support. | |
1085 | ||
9eb95b3b QY |
1086 | First, the :file:`zebra.conf` part: |
1087 | ||
1088 | .. code-block:: frr | |
c1a54c05 | 1089 | |
c1a54c05 QY |
1090 | interface eth0 |
1091 | ip address 198.168.1.1/24 | |
612b3314 QY |
1092 | link-params |
1093 | enable | |
1094 | admin-grp 0xa1 | |
1095 | metric 100 | |
1096 | max-bw 1.25e+07 | |
1097 | max-rsv-bw 1.25e+06 | |
1098 | unrsv-bw 0 1.25e+06 | |
1099 | unrsv-bw 1 1.25e+06 | |
1100 | unrsv-bw 2 1.25e+06 | |
1101 | unrsv-bw 3 1.25e+06 | |
1102 | unrsv-bw 4 1.25e+06 | |
1103 | unrsv-bw 5 1.25e+06 | |
1104 | unrsv-bw 6 1.25e+06 | |
1105 | unrsv-bw 7 1.25e+06 | |
c1a54c05 QY |
1106 | ! |
1107 | interface eth1 | |
1108 | ip address 192.168.2.1/24 | |
612b3314 QY |
1109 | link-params |
1110 | enable | |
1111 | metric 10 | |
1112 | max-bw 1.25e+07 | |
1113 | max-rsv-bw 1.25e+06 | |
1114 | unrsv-bw 0 1.25e+06 | |
1115 | unrsv-bw 1 1.25e+06 | |
1116 | unrsv-bw 2 1.25e+06 | |
1117 | unrsv-bw 3 1.25e+06 | |
1118 | unrsv-bw 4 1.25e+06 | |
1119 | unrsv-bw 5 1.25e+06 | |
1120 | unrsv-bw 6 1.25e+06 | |
1121 | unrsv-bw 7 1.25e+06 | |
1122 | neighbor 192.168.2.2 as 65000 | |
1123 | hostname HOSTNAME | |
1124 | password PASSWORD | |
1125 | log file /var/log/zebra.log | |
1126 | ! | |
1127 | interface eth0 | |
1128 | ip address 198.168.1.1/24 | |
50cc7127 QY |
1129 | link-params |
1130 | enable | |
1131 | admin-grp 0xa1 | |
1132 | metric 100 | |
1133 | max-bw 1.25e+07 | |
1134 | max-rsv-bw 1.25e+06 | |
1135 | unrsv-bw 0 1.25e+06 | |
1136 | unrsv-bw 1 1.25e+06 | |
1137 | unrsv-bw 2 1.25e+06 | |
1138 | unrsv-bw 3 1.25e+06 | |
1139 | unrsv-bw 4 1.25e+06 | |
1140 | unrsv-bw 5 1.25e+06 | |
1141 | unrsv-bw 6 1.25e+06 | |
1142 | unrsv-bw 7 1.25e+06 | |
612b3314 QY |
1143 | ! |
1144 | interface eth1 | |
1145 | ip address 192.168.2.1/24 | |
50cc7127 QY |
1146 | link-params |
1147 | enable | |
1148 | metric 10 | |
1149 | max-bw 1.25e+07 | |
1150 | max-rsv-bw 1.25e+06 | |
1151 | unrsv-bw 0 1.25e+06 | |
1152 | unrsv-bw 1 1.25e+06 | |
1153 | unrsv-bw 2 1.25e+06 | |
1154 | unrsv-bw 3 1.25e+06 | |
1155 | unrsv-bw 4 1.25e+06 | |
1156 | unrsv-bw 5 1.25e+06 | |
1157 | unrsv-bw 6 1.25e+06 | |
1158 | unrsv-bw 7 1.25e+06 | |
1159 | neighbor 192.168.2.2 as 65000 | |
c1a54c05 | 1160 | |
9eb95b3b QY |
1161 | Then the :file:`ospfd.conf` itself: |
1162 | ||
1163 | .. code-block:: frr | |
c1a54c05 QY |
1164 | |
1165 | hostname HOSTNAME | |
1166 | password PASSWORD | |
1167 | log file /var/log/ospfd.log | |
1168 | ! | |
1169 | ! | |
1170 | interface eth0 | |
1171 | ip ospf hello-interval 60 | |
1172 | ip ospf dead-interval 240 | |
1173 | ! | |
1174 | interface eth1 | |
1175 | ip ospf hello-interval 60 | |
1176 | ip ospf dead-interval 240 | |
1177 | ! | |
1178 | ! | |
1179 | router ospf | |
1180 | ospf router-id 192.168.1.1 | |
1181 | network 192.168.0.0/16 area 1 | |
1182 | ospf opaque-lsa | |
42fc5d26 QY |
1183 | mpls-te |
1184 | mpls-te router-address 192.168.1.1 | |
1185 | mpls-te inter-as area 1 | |
c1a54c05 QY |
1186 | ! |
1187 | line vty | |
a8c90e15 | 1188 | |
d1e7591e | 1189 | A router information example with PCE advertisement: |
42fc5d26 | 1190 | |
9eb95b3b | 1191 | .. code-block:: frr |
42fc5d26 | 1192 | |
c1a54c05 QY |
1193 | ! |
1194 | router ospf | |
1195 | ospf router-id 192.168.1.1 | |
1196 | network 192.168.0.0/16 area 1 | |
1197 | capability opaque | |
42fc5d26 QY |
1198 | mpls-te |
1199 | mpls-te router-address 192.168.1.1 | |
c1a54c05 | 1200 | router-info area 0.0.0.1 |
42fc5d26 QY |
1201 | pce address 192.168.1.1 |
1202 | pce flag 0x80 | |
1203 | pce domain as 65400 | |
1204 | pce neighbor as 65500 | |
1205 | pce neighbor as 65200 | |
1206 | pce scope 0x80 | |
c1a54c05 | 1207 | ! |