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