paul | 76b89b4 | 2004-11-06 17:13:09 +0000 | [diff] [blame] | 1 | @node OSPFv2 |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 2 | @chapter OSPFv2 |
| 3 | |
paul | e5b308d | 2005-10-29 20:19:49 +0000 | [diff] [blame] | 4 | @acronym{OSPF,Open Shortest Path First} version 2 is a routing protocol |
| 5 | which is described in @cite{RFC2328, OSPF Version 2}. OSPF is an |
| 6 | @acronym{IGP,Interior Gateway Protocol}@.. Compared with @acronym{RIP}, |
| 7 | @acronym{OSPF} can provide scalable network support and faster |
| 8 | convergence times. OSPF is widely used in large networks such as |
| 9 | @acronym{ISP,Internet Service Provider} backbone and enterprise |
| 10 | networks. |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 11 | |
| 12 | @menu |
| 13 | * Configuring ospfd:: |
| 14 | * OSPF router:: |
| 15 | * OSPF area:: |
| 16 | * OSPF interface:: |
| 17 | * Redistribute routes to OSPF:: |
| 18 | * Showing OSPF information:: |
| 19 | * Debugging OSPF:: |
paul | e5b308d | 2005-10-29 20:19:49 +0000 | [diff] [blame] | 20 | * OSPF Configuration Examples:: |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 21 | @end menu |
| 22 | |
paul | 76b89b4 | 2004-11-06 17:13:09 +0000 | [diff] [blame] | 23 | @node Configuring ospfd |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 24 | @section Configuring ospfd |
| 25 | |
paul | e5b308d | 2005-10-29 20:19:49 +0000 | [diff] [blame] | 26 | There are no @command{ospfd} specific options. Common options can be |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 27 | specified (@pxref{Common Invocation Options}) to @command{ospfd}. |
paul | e5b308d | 2005-10-29 20:19:49 +0000 | [diff] [blame] | 28 | @command{ospfd} needs to acquire interface information from |
| 29 | @command{zebra} in order to function. Therefore @command{zebra} must be |
| 30 | running before invoking @command{ospfd}. Also, if @command{zebra} is |
| 31 | restarted then @command{ospfd} must be too. |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 32 | |
paul | e5b308d | 2005-10-29 20:19:49 +0000 | [diff] [blame] | 33 | Like other daemons, @command{ospfd} configuration is done in @acronym{OSPF} |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 34 | specific configuration file @file{ospfd.conf}. |
| 35 | |
paul | 76b89b4 | 2004-11-06 17:13:09 +0000 | [diff] [blame] | 36 | @node OSPF router |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 37 | @section OSPF router |
| 38 | |
| 39 | To start OSPF process you have to specify the OSPF router. As of this |
| 40 | writing, @command{ospfd} does not support multiple OSPF processes. |
| 41 | |
| 42 | @deffn Command {router ospf} {} |
| 43 | @deffnx Command {no router ospf} {} |
| 44 | Enable or disable the OSPF process. @command{ospfd} does not yet |
| 45 | support multiple OSPF processes. So you can not specify an OSPF process |
| 46 | number. |
| 47 | @end deffn |
| 48 | |
| 49 | @deffn {OSPF Command} {ospf router-id @var{a.b.c.d}} {} |
| 50 | @deffnx {OSPF Command} {no ospf router-id} {} |
paul | e5b308d | 2005-10-29 20:19:49 +0000 | [diff] [blame] | 51 | This sets the router-ID of the OSPF process. The router-ID may be an IP |
| 52 | address of the router, but need not be - it can be any arbitrary 32bit |
| 53 | number. However it MUST be unique within the entire OSPF domain to the |
| 54 | OSPF speaker - bad things will happen if multiple OSPF speakers are |
| 55 | configured with the same router-ID! If one is not specified then |
| 56 | @command{ospfd} will obtain a router-ID automatically from @command{zebra}. |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 57 | @end deffn |
| 58 | |
| 59 | @deffn {OSPF Command} {ospf abr-type @var{type}} {} |
| 60 | @deffnx {OSPF Command} {no ospf abr-type @var{type}} {} |
paul | e5b308d | 2005-10-29 20:19:49 +0000 | [diff] [blame] | 61 | @var{type} can be cisco|ibm|shortcut|standard. |
| 62 | |
paul | d4f5031 | 2003-01-22 19:26:00 +0000 | [diff] [blame] | 63 | More information regarding the behaviour controlled by this command can |
paul | e5b308d | 2005-10-29 20:19:49 +0000 | [diff] [blame] | 64 | be found in @cite{RFC 3509, Alternative Implementations of OSPF Area |
| 65 | Border Routers}, and @cite{draft-ietf-ospf-shortcut-abr-02.txt}. |
| 66 | |
| 67 | Quote: "Though the definition of the @acronym{ABR,Area Border Router} |
paul | d4f5031 | 2003-01-22 19:26:00 +0000 | [diff] [blame] | 68 | in the OSPF specification does not require a router with multiple |
| 69 | attached areas to have a backbone connection, it is actually |
| 70 | necessary to provide successful routing to the inter-area and |
| 71 | external destinations. If this requirement is not met, all traffic |
| 72 | destined for the areas not connected to such an ABR or out of the |
| 73 | OSPF domain, is dropped. This document describes alternative ABR |
| 74 | behaviors implemented in Cisco and IBM routers." |
paul | e5b308d | 2005-10-29 20:19:49 +0000 | [diff] [blame] | 75 | |
| 76 | The default ABR type is 'Cisco', allowing an ABR to consider summaries |
| 77 | from non-backbone areas if, and only if, it has lost its link(s) to the |
| 78 | backbone area. |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 79 | @end deffn |
| 80 | |
| 81 | @deffn {OSPF Command} {ospf rfc1583compatibility} {} |
| 82 | @deffnx {OSPF Command} {no ospf rfc1583compatibility} {} |
paul | e5b308d | 2005-10-29 20:19:49 +0000 | [diff] [blame] | 83 | This @cite{RFC2328}, the sucessor to @cite{RFC1583}, suggests according |
| 84 | to section G.2 (changes) in section 16.4 a change to the path |
| 85 | preference algorithm that prevents possible routing loops that were |
| 86 | possible in the old version of OSPFv2. More specifically it demands |
| 87 | that inter-area paths and intra-area path are now of equal preference |
| 88 | but still both preferred to external paths. |
| 89 | |
| 90 | This command should NOT be set normally. |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 91 | @end deffn |
| 92 | |
| 93 | @deffn {OSPF Command} {passive interface @var{interface}} {} |
| 94 | @deffnx {OSPF Command} {no passive interface @var{interface}} {} |
paul | e5b308d | 2005-10-29 20:19:49 +0000 | [diff] [blame] | 95 | |
| 96 | Do not speak OSPF interface on the given interface, but do advertise |
| 97 | the interface as a stub link in the router-@acronym{LSA,Link State |
| 98 | Advertisement} for this router. This allows one to advertise addresses |
| 99 | on such connected interfaces without having to originate |
| 100 | AS-External/Type-5 LSAs (which have global flooding scope) - as would |
| 101 | occur if connected addresses were redistributed into OSPF, |
| 102 | @xref{Redistribute routes to OSPF}. |
| 103 | |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 104 | @end deffn |
| 105 | |
paul | e5b308d | 2005-10-29 20:19:49 +0000 | [diff] [blame] | 106 | @deffn {OSPF Command} {timers throttle spf @var{delay} @var{initial-holdtime} @var{max-holdtime}} {} |
| 107 | @deffnx {OSPF Command} {no timers throttle spf} {} |
| 108 | This command sets the initial @var{delay}, the @var{initial-holdtime} |
| 109 | and the @var{maximum-holdtime} between when SPF is calculated and the |
| 110 | event which triggered the calculation. The times are specified in |
| 111 | milliseconds and must be in the range of 0 to 600000 milliseconds. |
| 112 | |
| 113 | The @var{delay} specifies the minimum amount of time to delay SPF |
| 114 | calculation (hence it affects how long SPF calculation is delayed after |
| 115 | an event which occurs outside of the holdtime of any previous SPF |
| 116 | calculation, and also serves as a minimum holdtime). |
| 117 | |
| 118 | Consecutive SPF calculations will always be seperated by at least |
| 119 | 'hold-time' milliseconds. The hold-time is adaptive and initially is |
| 120 | set to the @var{initial-holdtime} configured with the above command. |
| 121 | Events which occur within the holdtime of the previous SPF calculation |
| 122 | will cause the holdtime to be increased by @var{initial-holdtime}, bounded |
| 123 | by the @var{maximum-holdtime} configured with this command. If the adaptive |
| 124 | hold-time elapses without any SPF-triggering event occuring then |
| 125 | the current holdtime is reset to the @var{initial-holdtime}. The current |
| 126 | holdtime can be viewed with @ref{show ip ospf}, where it is expressed as |
| 127 | a multiplier of the @var{initial-holdtime}. |
| 128 | |
| 129 | @example |
| 130 | @group |
| 131 | router ospf |
| 132 | timers throttle spf 200 400 10000 |
| 133 | @end group |
| 134 | @end example |
| 135 | |
| 136 | In this example, the @var{delay} is set to 200ms, the @var{initial |
| 137 | holdtime} is set to 400ms and the @var{maximum holdtime} to 10s. Hence |
| 138 | there will always be at least 200ms between an event which requires SPF |
| 139 | calculation and the actual SPF calculation. Further consecutive SPF |
| 140 | calculations will always be seperated by between 400ms to 10s, the |
| 141 | hold-time increasing by 400ms each time an SPF-triggering event occurs |
| 142 | within the hold-time of the previous SPF calculation. |
| 143 | |
| 144 | This command supercedes the @command{timers spf} command in previous Quagga |
| 145 | releases. |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 146 | @end deffn |
| 147 | |
paul | e5b308d | 2005-10-29 20:19:49 +0000 | [diff] [blame] | 148 | @deffn {OSPF Command} {max-metric router-lsa [on-startup|on-shutdown] <5-86400>} {} |
| 149 | @deffnx {OSPF Command} {max-metric router-lsa administrative} {} |
| 150 | @deffnx {OSPF Command} {no max-metric router-lsa [on-startup|on-shutdown|administrative]} {} |
| 151 | This enables @cite{RFC3137, OSPF Stub Router Advertisement} support, |
| 152 | where the OSPF process describes its transit links in its router-LSA as |
| 153 | having infinite distance so that other routers will avoid calculating |
| 154 | transit paths through the router while still being able to reach |
| 155 | networks through the router. |
| 156 | |
| 157 | This support may be enabled administratively (and indefinitely) or |
| 158 | conditionally. Conditional enabling of max-metric router-lsas can be |
| 159 | for a period of seconds after startup and/or for a period of seconds |
| 160 | prior to shutdown. |
| 161 | |
| 162 | Enabling this for a period after startup allows OSPF to converge fully |
| 163 | first without affecting any existing routes used by other routers, |
| 164 | while still allowing any connected stub links and/or redistributed |
| 165 | routes to be reachable. Enabling this for a period of time in advance |
| 166 | of shutdown allows the router to gracefully excuse itself from the OSPF |
| 167 | domain. |
| 168 | |
| 169 | Enabling this feature administratively allows for administrative |
| 170 | intervention for whatever reason, for an indefinite period of time. |
| 171 | Note that if the configuration is written to file, this administrative |
| 172 | form of the stub-router command will also be written to file. If |
| 173 | @command{ospfd} is restarted later, the command will then take effect |
| 174 | until manually deconfigured. |
| 175 | |
| 176 | Configured state of this feature as well as current status, such as the |
| 177 | number of second remaining till on-startup or on-shutdown ends, can be |
| 178 | viewed with the @ref{show ip ospf} command. |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 179 | @end deffn |
| 180 | |
paul | e5b308d | 2005-10-29 20:19:49 +0000 | [diff] [blame] | 181 | @deffn {OSPF Command} {auto-cost reference-bandwidth <1-4294967>} {} |
| 182 | @deffnx {OSPF Command} {no auto-cost reference-bandwidth} {} |
| 183 | This sets the reference bandwidth for cost calculations, where this |
| 184 | bandwidth is considered equivalent to an OSPF cost of 1, specified in |
| 185 | Mbits/s. The default is 100Mbit/s (i.e. a link of bandwidth 100Mbit/s |
| 186 | or higher will have a cost of 1. Cost of lower bandwidth links will be |
| 187 | scaled with reference to this cost). |
| 188 | |
| 189 | This configuration setting MUST be consistent across all routers within the |
| 190 | OSPF domain. |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 191 | @end deffn |
| 192 | |
| 193 | @deffn {OSPF Command} {network @var{a.b.c.d/m} area @var{a.b.c.d}} {} |
| 194 | @deffnx {OSPF Command} {network @var{a.b.c.d/m} area @var{<0-4294967295>}} {} |
| 195 | @deffnx {OSPF Command} {no network @var{a.b.c.d/m} area @var{a.b.c.d}} {} |
| 196 | @deffnx {OSPF Command} {no network @var{a.b.c.d/m} area @var{<0-4294967295>}} {} |
hasso | a5b2b59 | 2004-04-17 10:09:29 +0000 | [diff] [blame] | 197 | This command specifies the OSPF enabled interface(s). If the interface has |
| 198 | an address from range 192.168.1.0/24 then the command below enables ospf |
| 199 | on this interface so router can provide network information to the other |
| 200 | ospf routers via this interface. |
paul | e5b308d | 2005-10-29 20:19:49 +0000 | [diff] [blame] | 201 | |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 202 | @example |
| 203 | @group |
| 204 | router ospf |
hasso | a5b2b59 | 2004-04-17 10:09:29 +0000 | [diff] [blame] | 205 | network 192.168.1.0/24 area 0.0.0.0 |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 206 | @end group |
| 207 | @end example |
paul | e5b308d | 2005-10-29 20:19:49 +0000 | [diff] [blame] | 208 | |
hasso | a5b2b59 | 2004-04-17 10:09:29 +0000 | [diff] [blame] | 209 | Prefix length in interface must be equal or bigger (ie. smaller network) than |
| 210 | prefix length in network statement. For example statement above doesn't enable |
| 211 | ospf on interface with address 192.168.1.1/23, but it does on interface with |
| 212 | address 192.168.1.129/25. |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 213 | @end deffn |
| 214 | |
paul | 76b89b4 | 2004-11-06 17:13:09 +0000 | [diff] [blame] | 215 | @node OSPF area |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 216 | @section OSPF area |
| 217 | |
| 218 | @deffn {OSPF Command} {area @var{a.b.c.d} range @var{a.b.c.d/m}} {} |
| 219 | @deffnx {OSPF Command} {area <0-4294967295> range @var{a.b.c.d/m}} {} |
| 220 | @deffnx {OSPF Command} {no area @var{a.b.c.d} range @var{a.b.c.d/m}} {} |
| 221 | @deffnx {OSPF Command} {no area <0-4294967295> range @var{a.b.c.d/m}} {} |
hasso | 63869f1 | 2004-04-19 14:43:46 +0000 | [diff] [blame] | 222 | Summarize intra area paths from specified area into one Type-3 summary-LSA |
| 223 | announced to other areas. This command can be used only in ABR and ONLY |
| 224 | router-LSAs (Type-1) and network-LSAs (Type-2) (ie. LSAs with scope area) can |
| 225 | be summarized. Type-5 AS-external-LSAs can't be summarized - their scope is AS. |
| 226 | Summarizing Type-7 AS-external-LSAs isn't supported yet by Quagga. |
paul | e5b308d | 2005-10-29 20:19:49 +0000 | [diff] [blame] | 227 | |
hasso | 63869f1 | 2004-04-19 14:43:46 +0000 | [diff] [blame] | 228 | @example |
| 229 | @group |
| 230 | router ospf |
| 231 | network 192.168.1.0/24 area 0.0.0.0 |
| 232 | network 10.0.0.0/8 area 0.0.0.10 |
| 233 | area 0.0.0.10 range 10.0.0.0/8 |
| 234 | @end group |
| 235 | @end example |
paul | e5b308d | 2005-10-29 20:19:49 +0000 | [diff] [blame] | 236 | |
hasso | 63869f1 | 2004-04-19 14:43:46 +0000 | [diff] [blame] | 237 | With configuration above one Type-3 Summary-LSA with routing info 10.0.0.0/8 is |
| 238 | announced into backbone area if area 0.0.0.10 contains at least one intra-area |
| 239 | network (ie. described with router or network LSA) from this range. |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 240 | @end deffn |
| 241 | |
hasso | 63869f1 | 2004-04-19 14:43:46 +0000 | [diff] [blame] | 242 | @deffn {OSPF Command} {area @var{a.b.c.d} range IPV4_PREFIX not-advertise} {} |
| 243 | @deffnx {OSPF Command} {no area @var{a.b.c.d} range IPV4_PREFIX not-advertise} {} |
| 244 | Instead of summarizing intra area paths filter them - ie. intra area paths from this |
| 245 | range are not advertised into other areas. |
| 246 | This command makes sense in ABR only. |
| 247 | @end deffn |
| 248 | |
hasso | 6b3fac0 | 2004-04-20 04:11:36 +0000 | [diff] [blame] | 249 | @deffn {OSPF Command} {area @var{a.b.c.d} range IPV4_PREFIX substitute IPV4_PREFIX} {} |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 250 | @deffnx {OSPF Command} {no area @var{a.b.c.d} range IPV4_PREFIX substitute IPV4_PREFIX} {} |
hasso | 63869f1 | 2004-04-19 14:43:46 +0000 | [diff] [blame] | 251 | Substitute summarized prefix with another prefix. |
paul | e5b308d | 2005-10-29 20:19:49 +0000 | [diff] [blame] | 252 | |
hasso | 63869f1 | 2004-04-19 14:43:46 +0000 | [diff] [blame] | 253 | @example |
| 254 | @group |
| 255 | router ospf |
| 256 | network 192.168.1.0/24 area 0.0.0.0 |
| 257 | network 10.0.0.0/8 area 0.0.0.10 |
| 258 | area 0.0.0.10 range 10.0.0.0/8 substitute 11.0.0.0/8 |
| 259 | @end group |
| 260 | @end example |
paul | e5b308d | 2005-10-29 20:19:49 +0000 | [diff] [blame] | 261 | |
hasso | 63869f1 | 2004-04-19 14:43:46 +0000 | [diff] [blame] | 262 | One Type-3 summary-LSA with routing info 11.0.0.0/8 is announced into backbone area if |
| 263 | area 0.0.0.10 contains at least one intra-area network (ie. described with router-LSA or |
| 264 | network-LSA) from range 10.0.0.0/8. |
| 265 | This command makes sense in ABR only. |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 266 | @end deffn |
| 267 | |
| 268 | @deffn {OSPF Command} {area @var{a.b.c.d} virtual-link @var{a.b.c.d}} {} |
| 269 | @deffnx {OSPF Command} {area <0-4294967295> virtual-link @var{a.b.c.d}} {} |
| 270 | @deffnx {OSPF Command} {no area @var{a.b.c.d} virtual-link @var{a.b.c.d}} {} |
| 271 | @deffnx {OSPF Command} {no area <0-4294967295> virtual-link @var{a.b.c.d}} {} |
| 272 | @end deffn |
| 273 | |
| 274 | @deffn {OSPF Command} {area @var{a.b.c.d} shortcut} {} |
| 275 | @deffnx {OSPF Command} {area <0-4294967295> shortcut} {} |
| 276 | @deffnx {OSPF Command} {no area @var{a.b.c.d} shortcut} {} |
| 277 | @deffnx {OSPF Command} {no area <0-4294967295> shortcut} {} |
paul | e5b308d | 2005-10-29 20:19:49 +0000 | [diff] [blame] | 278 | Configure th area as Shortcut capable. See @cite{RFC3509}. This requires |
| 279 | that the 'abr-type' be set to 'shortcut'. |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 280 | @end deffn |
| 281 | |
| 282 | @deffn {OSPF Command} {area @var{a.b.c.d} stub} {} |
| 283 | @deffnx {OSPF Command} {area <0-4294967295> stub} {} |
| 284 | @deffnx {OSPF Command} {no area @var{a.b.c.d} stub} {} |
| 285 | @deffnx {OSPF Command} {no area <0-4294967295> stub} {} |
paul | e5b308d | 2005-10-29 20:19:49 +0000 | [diff] [blame] | 286 | Configure the area to be a stub area. That is, an area where no router |
| 287 | originates routes external to OSPF and hence an area where all external |
| 288 | routes are via the ABR(s). Hence, ABRs for such an area do not need |
| 289 | to pass AS-External LSAs (type-5s) or ASBR-Summary LSAs (type-4) into the |
| 290 | area. They need only pass Network-Summary (type-3) LSAs into such an area, |
| 291 | just a default summary. |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 292 | @end deffn |
| 293 | |
| 294 | @deffn {OSPF Command} {area @var{a.b.c.d} stub no-summary} {} |
| 295 | @deffnx {OSPF Command} {area <0-4294967295> stub no-summary} {} |
| 296 | @deffnx {OSPF Command} {no area @var{a.b.c.d} stub no-summary} {} |
| 297 | @deffnx {OSPF Command} {no area <0-4294967295> stub no-summary} {} |
paul | e5b308d | 2005-10-29 20:19:49 +0000 | [diff] [blame] | 298 | Prevents an @command{ospfd} ABR from injecting inter-area |
| 299 | summaries into the specified stub area. |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 300 | @end deffn |
| 301 | |
| 302 | @deffn {OSPF Command} {area @var{a.b.c.d} default-cost <0-16777215>} {} |
| 303 | @deffnx {OSPF Command} {no area @var{a.b.c.d} default-cost <0-16777215>} {} |
paul | e5b308d | 2005-10-29 20:19:49 +0000 | [diff] [blame] | 304 | Set the cost of default-summary LSAs announced to stubby areas. |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 305 | @end deffn |
| 306 | |
| 307 | @deffn {OSPF Command} {area @var{a.b.c.d} export-list NAME} {} |
| 308 | @deffnx {OSPF Command} {area <0-4294967295> export-list NAME} {} |
| 309 | @deffnx {OSPF Command} {no area @var{a.b.c.d} export-list NAME} {} |
| 310 | @deffnx {OSPF Command} {no area <0-4294967295> export-list NAME} {} |
hasso | 63869f1 | 2004-04-19 14:43:46 +0000 | [diff] [blame] | 311 | Filter Type-3 summary-LSAs announced to other areas originated from intra- |
| 312 | area paths from specified area. |
paul | e5b308d | 2005-10-29 20:19:49 +0000 | [diff] [blame] | 313 | |
hasso | 63869f1 | 2004-04-19 14:43:46 +0000 | [diff] [blame] | 314 | @example |
| 315 | @group |
| 316 | router ospf |
| 317 | network 192.168.1.0/24 area 0.0.0.0 |
| 318 | network 10.0.0.0/8 area 0.0.0.10 |
| 319 | area 0.0.0.10 export-list foo |
| 320 | ! |
| 321 | access-list foo permit 10.10.0.0/16 |
| 322 | access-list foo deny any |
| 323 | @end group |
| 324 | @end example |
paul | e5b308d | 2005-10-29 20:19:49 +0000 | [diff] [blame] | 325 | |
hasso | 63869f1 | 2004-04-19 14:43:46 +0000 | [diff] [blame] | 326 | With example above any intra-area paths from area 0.0.0.10 and from range |
| 327 | 10.10.0.0/16 (for example 10.10.1.0/24 and 10.10.2.128/30) are announced into |
| 328 | other areas as Type-3 summary-LSA's, but any others (for example 10.11.0.0/16 |
| 329 | or 10.128.30.16/30) aren't. |
paul | e5b308d | 2005-10-29 20:19:49 +0000 | [diff] [blame] | 330 | |
| 331 | This command is only relevant if the router is an ABR for the specified |
| 332 | area. |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 333 | @end deffn |
| 334 | |
| 335 | @deffn {OSPF Command} {area @var{a.b.c.d} import-list NAME} {} |
| 336 | @deffnx {OSPF Command} {area <0-4294967295> import-list NAME} {} |
| 337 | @deffnx {OSPF Command} {no area @var{a.b.c.d} import-list NAME} {} |
| 338 | @deffnx {OSPF Command} {no area <0-4294967295> import-list NAME} {} |
hasso | 63869f1 | 2004-04-19 14:43:46 +0000 | [diff] [blame] | 339 | Same as export-list, but it applies to paths announced into specified area as |
| 340 | Type-3 summary-LSAs. |
| 341 | @end deffn |
| 342 | |
hasso | 808c0a7 | 2004-04-19 15:10:20 +0000 | [diff] [blame] | 343 | @deffn {OSPF Command} {area @var{a.b.c.d} filter-list prefix NAME in} {} |
| 344 | @deffnx {OSPF Command} {area @var{a.b.c.d} filter-list prefix NAME out} {} |
| 345 | @deffnx {OSPF Command} {area <0-4294967295> filter-list prefix NAME in} {} |
| 346 | @deffnx {OSPF Command} {area <0-4294967295> filter-list prefix NAME out} {} |
| 347 | @deffnx {OSPF Command} {no area @var{a.b.c.d} filter-list prefix NAME in} {} |
| 348 | @deffnx {OSPF Command} {no area @var{a.b.c.d} filter-list prefix NAME out} {} |
| 349 | @deffnx {OSPF Command} {no area <0-4294967295> filter-list prefix NAME in} {} |
| 350 | @deffnx {OSPF Command} {no area <0-4294967295> filter-list prefix NAME out} {} |
hasso | c266ac7 | 2004-04-19 17:31:00 +0000 | [diff] [blame] | 351 | Filtering Type-3 summary-LSAs to/from area using prefix lists. This command |
| 352 | makes sense in ABR only. |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 353 | @end deffn |
| 354 | |
| 355 | @deffn {OSPF Command} {area @var{a.b.c.d} authentication} {} |
| 356 | @deffnx {OSPF Command} {area <0-4294967295> authentication} {} |
| 357 | @deffnx {OSPF Command} {no area @var{a.b.c.d} authentication} {} |
| 358 | @deffnx {OSPF Command} {no area <0-4294967295> authentication} {} |
paul | e5b308d | 2005-10-29 20:19:49 +0000 | [diff] [blame] | 359 | Specify that simple password authentication should be used for the given |
| 360 | area. |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 361 | @end deffn |
| 362 | |
| 363 | @deffn {OSPF Command} {area @var{a.b.c.d} authentication message-digest} {} |
| 364 | @deffnx {OSPF Command} {area <0-4294967295> authentication message-digest} {} |
paul | e5b308d | 2005-10-29 20:19:49 +0000 | [diff] [blame] | 365 | Specify that OSPF packets should be authenticated with MD5 HMACs for the given |
| 366 | area. |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 367 | @end deffn |
| 368 | |
paul | 76b89b4 | 2004-11-06 17:13:09 +0000 | [diff] [blame] | 369 | @node OSPF interface |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 370 | @section OSPF interface |
| 371 | |
paul | e5b308d | 2005-10-29 20:19:49 +0000 | [diff] [blame] | 372 | @deffn {Interface Command} {ip ospf authentication-key @var{AUTH_KEY}} {} |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 373 | @deffnx {Interface Command} {no ip ospf authentication-key} {} |
| 374 | Set OSPF authentication key to a simple password. After setting @var{AUTH_KEY}, |
| 375 | all OSPF packets are authenticated. @var{AUTH_KEY} has length up to 8 chars. |
| 376 | @end deffn |
| 377 | |
| 378 | @deffn {Interface Command} {ip ospf message-digest-key KEYID md5 KEY} {} |
| 379 | @deffnx {Interface Command} {no ip ospf message-digest-key} {} |
| 380 | Set OSPF authentication key to a cryptographic password. The cryptographic |
Paul Jakma | 466c965 | 2006-06-26 12:55:58 +0000 | [diff] [blame^] | 381 | algorithm is MD5. |
| 382 | |
| 383 | KEYID identifies secret key used to create the message digest. This ID |
| 384 | is part of the protocol and must be consistent across routers on a |
| 385 | link. |
| 386 | |
| 387 | KEY is the actual message digest key, of up to 16 chars (larger strings |
| 388 | will be truncated), and is associated with the given KEYID. |
paul | e2ea9fe | 2004-10-11 14:33:23 +0000 | [diff] [blame] | 389 | |
| 390 | Note that OSPF MD5 authentication requires that time never go backwards |
paul | e5b308d | 2005-10-29 20:19:49 +0000 | [diff] [blame] | 391 | (correct time is NOT important, only that it never goes backwards), even |
paul | e2ea9fe | 2004-10-11 14:33:23 +0000 | [diff] [blame] | 392 | across resets, if ospfd is to be able to promptly reestabish adjacencies |
| 393 | with its neighbours after restarts/reboots. The host should have system |
Paul Jakma | 466c965 | 2006-06-26 12:55:58 +0000 | [diff] [blame^] | 394 | time be set at boot from an external or non-volatile source (eg battery backed clock, NTP, |
paul | e2ea9fe | 2004-10-11 14:33:23 +0000 | [diff] [blame] | 395 | etc.) or else the system clock should be periodically saved to non-volative |
| 396 | storage and restored at boot if MD5 authentication is to be expected to work |
| 397 | reliably. |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 398 | @end deffn |
| 399 | |
| 400 | @deffn {Interface Command} {ip ospf cost <1-65535>} {} |
| 401 | @deffnx {Interface Command} {no ip ospf cost} {} |
| 402 | Set link cost for the specified interface. The cost value is set to router-LSA's |
| 403 | metric field and used for SPF calculation. |
| 404 | @end deffn |
| 405 | |
paul | e5b308d | 2005-10-29 20:19:49 +0000 | [diff] [blame] | 406 | @anchor{ip ospf dead-interval minimal} |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 407 | @deffn {Interface Command} {ip ospf dead-interval <1-65535>} {} |
paul | e5b308d | 2005-10-29 20:19:49 +0000 | [diff] [blame] | 408 | @deffnx {Interface Command} {ip ospf dead-interval minimal hello-multiplier <2-20>} {} |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 409 | @deffnx {Interface Command} {no ip ospf dead-interval} {} |
| 410 | Set number of seconds for RouterDeadInterval timer value used for Wait Timer |
| 411 | and Inactivity Timer. This value must be the same for all routers attached |
| 412 | to a common network. The default value is 40 seconds. |
paul | e5b308d | 2005-10-29 20:19:49 +0000 | [diff] [blame] | 413 | |
| 414 | If 'minimal' is specified instead, then the dead-interval is set to 1 |
| 415 | second and one must specify a hello-multiplier. The hello-multiplier |
| 416 | specifies how many Hellos to send per second, from 2 (every 500ms) to |
| 417 | 20 (every 50ms). Thus one can have 1s convergence time for OSPF. If this form |
| 418 | is specified, then the hello-interval advertised in Hello packets is set to |
| 419 | 0 and the hello-interval on received Hello packets is not checked, thus |
| 420 | the hello-multiplier need NOT be the same across multiple routers on a common |
| 421 | link. |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 422 | @end deffn |
| 423 | |
| 424 | @deffn {Interface Command} {ip ospf hello-interval <1-65535>} {} |
| 425 | @deffnx {Interface Command} {no ip ospf hello-interval} {} |
| 426 | Set number of seconds for HelloInterval timer value. Setting this value, |
| 427 | Hello packet will be sent every timer value seconds on the specified interface. |
| 428 | This value must be the same for all routers attached to a common network. |
| 429 | The default value is 10 seconds. |
paul | e5b308d | 2005-10-29 20:19:49 +0000 | [diff] [blame] | 430 | |
| 431 | This command has no effect if @ref{ip ospf dead-interval minimal} is also |
| 432 | specified for the interface. |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 433 | @end deffn |
| 434 | |
| 435 | @deffn {Interface Command} {ip ospf network (broadcast|non-broadcast|point-to-multipoint|point-to-point)} {} |
| 436 | @deffnx {Interface Command} {no ip ospf network} {} |
| 437 | Set explicitly network type for specifed interface. |
| 438 | @end deffn |
| 439 | |
| 440 | @deffn {Interface Command} {ip ospf priority <0-255>} {} |
| 441 | @deffnx {Interface Command} {no ip ospf priority} {} |
| 442 | Set RouterPriority integer value. Setting higher value, router will be more |
| 443 | eligible to become Designated Router. Setting the value to 0, router is no |
| 444 | longer eligible to Designated Router. |
| 445 | The default value is 1. |
| 446 | @end deffn |
| 447 | |
| 448 | @deffn {Interface Command} {ip ospf retransmit-interval <1-65535>} {} |
| 449 | @deffnx {Interface Command} {no ip ospf retransmit interval} {} |
| 450 | Set number of seconds for RxmtInterval timer value. This value is used |
| 451 | when retransmitting Database Description and Link State Request packets. |
| 452 | The default value is 5 seconds. |
| 453 | @end deffn |
| 454 | |
| 455 | @deffn {Interface Command} {ip ospf transmit-delay} {} |
| 456 | @deffnx {Interface Command} {no ip ospf transmit-delay} {} |
| 457 | Set number of seconds for InfTransDelay value. LSAs' age should be |
| 458 | incremented by this value when transmitting. |
| 459 | The default value is 1 seconds. |
| 460 | @end deffn |
| 461 | |
paul | 76b89b4 | 2004-11-06 17:13:09 +0000 | [diff] [blame] | 462 | @node Redistribute routes to OSPF |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 463 | @section Redistribute routes to OSPF |
| 464 | |
| 465 | @deffn {OSPF Command} {redistribute (kernel|connected|static|rip|bgp)} {} |
| 466 | @deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) @var{route-map}} {} |
| 467 | @deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2)} {} |
| 468 | @deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) route-map @var{word}} {} |
| 469 | @deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric <0-16777214>} {} |
| 470 | @deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric <0-16777214> route-map @var{word}} {} |
| 471 | @deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric <0-16777214>} {} |
| 472 | @deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric <0-16777214> route-map @var{word}} {} |
| 473 | @deffnx {OSPF Command} {no redistribute (kernel|connected|static|rip|bgp)} {} |
paul | e5b308d | 2005-10-29 20:19:49 +0000 | [diff] [blame] | 474 | Redistribute routes of the specified protocol or kind into OSPF, with the |
| 475 | metric type and metric set if specified, filtering the routes using the given |
| 476 | route-map if specified. |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 477 | @end deffn |
| 478 | |
| 479 | @deffn {OSPF Command} {default-information originate} {} |
| 480 | @deffnx {OSPF Command} {default-information originate metric <0-16777214>} {} |
| 481 | @deffnx {OSPF Command} {default-information originate metric <0-16777214> metric-type (1|2)} {} |
| 482 | @deffnx {OSPF Command} {default-information originate metric <0-16777214> metric-type (1|2) route-map @var{word}} {} |
| 483 | @deffnx {OSPF Command} {default-information originate always} {} |
| 484 | @deffnx {OSPF Command} {default-information originate always metric <0-16777214>} {} |
| 485 | @deffnx {OSPF Command} {default-information originate always metric <0-16777214> metric-type (1|2)} {} |
| 486 | @deffnx {OSPF Command} {default-information originate always metric <0-16777214> metric-type (1|2) route-map @var{word}} {} |
| 487 | @deffnx {OSPF Command} {no default-information originate} {} |
paul | e5b308d | 2005-10-29 20:19:49 +0000 | [diff] [blame] | 488 | Originate an AS-External (type-5) LSA describing a default route into |
| 489 | all external-routing capable areas, of the specified metric and metric |
| 490 | type. If the 'always' keyword is given then the default is always |
| 491 | advertised, even when there is no default present in the routing table. |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 492 | @end deffn |
| 493 | |
| 494 | @deffn {OSPF Command} {distribute-list NAME out (kernel|connected|static|rip|ospf} {} |
| 495 | @deffnx {OSPF Command} {no distribute-list NAME out (kernel|connected|static|rip|ospf} {} |
| 496 | @end deffn |
| 497 | |
| 498 | @deffn {OSPF Command} {default-metric <0-16777214>} {} |
| 499 | @deffnx {OSPF Command} {no default-metric} {} |
| 500 | @end deffn |
| 501 | |
| 502 | @deffn {OSPF Command} {distance <1-255>} {} |
| 503 | @deffnx {OSPF Command} {no distance <1-255>} {} |
| 504 | @end deffn |
| 505 | |
| 506 | @deffn {OSPF Command} {distance ospf (intra-area|inter-area|external) <1-255>} {} |
| 507 | @deffnx {OSPF Command} {no distance ospf} {} |
| 508 | @end deffn |
| 509 | |
| 510 | @deffn {Command} {router zebra} {} |
| 511 | @deffnx {Command} {no router zebra} {} |
| 512 | @end deffn |
| 513 | |
paul | 76b89b4 | 2004-11-06 17:13:09 +0000 | [diff] [blame] | 514 | @node Showing OSPF information |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 515 | @section Showing OSPF information |
| 516 | |
paul | e5b308d | 2005-10-29 20:19:49 +0000 | [diff] [blame] | 517 | @anchor{show ip ospf} |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 518 | @deffn {Command} {show ip ospf} {} |
paul | e5b308d | 2005-10-29 20:19:49 +0000 | [diff] [blame] | 519 | Show information on a variety of general OSPF and area state and configuration |
| 520 | information. |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 521 | @end deffn |
| 522 | |
| 523 | @deffn {Command} {show ip ospf interface [INTERFACE]} {} |
paul | e5b308d | 2005-10-29 20:19:49 +0000 | [diff] [blame] | 524 | Show state and configuration of OSPF the specified interface, or all |
| 525 | interfaces if no interface is given. |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 526 | @end deffn |
| 527 | |
| 528 | @deffn {Command} {show ip ospf neighbor} {} |
| 529 | @deffnx {Command} {show ip ospf neighbor INTERFACE} {} |
| 530 | @deffnx {Command} {show ip ospf neighbor detail} {} |
| 531 | @deffnx {Command} {show ip ospf neighbor INTERFACE detail} {} |
| 532 | @end deffn |
| 533 | |
| 534 | @deffn {Command} {show ip ospf database} {} |
| 535 | @end deffn |
| 536 | |
| 537 | @deffn {Command} {show ip ospf database (asbr-summary|external|network|router|summary)} {} |
| 538 | @deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) @var{link-state-id}} {} |
| 539 | @deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) @var{link-state-id} adv-router @var{adv-router}} {} |
| 540 | @deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) adv-router @var{adv-router}} {} |
| 541 | @deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) @var{link-state-id} self-originate} {} |
| 542 | @deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) self-originate} {} |
| 543 | @end deffn |
| 544 | |
| 545 | @deffn {Command} {show ip ospf database max-age} {} |
| 546 | @end deffn |
| 547 | |
| 548 | @deffn {Command} {show ip ospf database self-originate} {} |
| 549 | @end deffn |
| 550 | |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 551 | @deffn {Command} {show ip ospf route} {} |
paul | e5b308d | 2005-10-29 20:19:49 +0000 | [diff] [blame] | 552 | Show the OSPF routing table, as determined by the most recent SPF calculation. |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 553 | @end deffn |
| 554 | |
paul | 76b89b4 | 2004-11-06 17:13:09 +0000 | [diff] [blame] | 555 | @node Debugging OSPF |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 556 | @section Debugging OSPF |
| 557 | |
| 558 | @deffn {Command} {debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) [detail]} {} |
| 559 | @deffnx {Command} {no debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) [detail]} {} |
| 560 | @end deffn |
| 561 | |
| 562 | @deffn {Command} {debug ospf ism} {} |
| 563 | @deffnx {Command} {debug ospf ism (status|events|timers)} {} |
| 564 | @deffnx {Command} {no debug ospf ism} {} |
| 565 | @deffnx {Command} {no debug ospf ism (status|events|timers)} {} |
| 566 | @end deffn |
| 567 | |
| 568 | @deffn {Command} {debug ospf nsm} {} |
| 569 | @deffnx {Command} {debug ospf nsm (status|events|timers)} {} |
| 570 | @deffnx {Command} {no debug ospf nsm} {} |
| 571 | @deffnx {Command} {no debug ospf nsm (status|events|timers)} {} |
| 572 | @end deffn |
| 573 | |
| 574 | @deffn {Command} {debug ospf lsa} {} |
| 575 | @deffnx {Command} {debug ospf lsa (generate|flooding|refresh)} {} |
| 576 | @deffnx {Command} {no debug ospf lsa} {} |
| 577 | @deffnx {Command} {no debug ospf lsa (generate|flooding|refresh)} {} |
| 578 | @end deffn |
| 579 | |
| 580 | @deffn {Command} {debug ospf zebra} {} |
| 581 | @deffnx {Command} {debug ospf zebra (interface|redistribute)} {} |
| 582 | @deffnx {Command} {no debug ospf zebra} {} |
| 583 | @deffnx {Command} {no debug ospf zebra (interface|redistribute)} {} |
| 584 | @end deffn |
| 585 | |
| 586 | @deffn {Command} {show debugging ospf} {} |
| 587 | @end deffn |
| 588 | |
paul | e5b308d | 2005-10-29 20:19:49 +0000 | [diff] [blame] | 589 | @node OSPF Configuration Examples |
| 590 | @section OSPF Configuration Examples |
| 591 | A simple example, with MD5 authentication enabled: |
| 592 | |
| 593 | @example |
| 594 | @group |
| 595 | ! |
| 596 | interface bge0 |
| 597 | ip ospf authentication message-digest |
| 598 | ip ospf message-digest-key 1 md5 ABCDEFGHIJK |
| 599 | ! |
| 600 | router ospf |
| 601 | network 192.168.0.0/16 area 0.0.0.1 |
| 602 | area 0.0.0.1 authentication message-digest |
| 603 | @end group |
| 604 | @end example |
| 605 | |
| 606 | An @acronym{ABR} router, with MD5 authentication and performing summarisation |
| 607 | of networks between the areas: |
| 608 | |
| 609 | @example |
| 610 | @group |
| 611 | ! |
| 612 | password ABCDEF |
| 613 | log file /var/log/quagga/ospfd.log |
| 614 | service advanced-vty |
| 615 | ! |
| 616 | interface eth0 |
| 617 | ip ospf authentication message-digest |
| 618 | ip ospf message-digest-key 1 md5 ABCDEFGHIJK |
| 619 | ! |
| 620 | interface ppp0 |
| 621 | ! |
| 622 | interface br0 |
| 623 | ip ospf authentication message-digest |
| 624 | ip ospf message-digest-key 2 md5 XYZ12345 |
| 625 | ! |
| 626 | router ospf |
| 627 | ospf router-id 192.168.0.1 |
| 628 | redistribute connected |
| 629 | passive interface ppp0 |
| 630 | network 192.168.0.0/24 area 0.0.0.0 |
| 631 | network 10.0.0.0/16 area 0.0.0.0 |
| 632 | network 192.168.1.0/24 area 0.0.0.1 |
| 633 | area 0.0.0.0 authentication message-digest |
| 634 | area 0.0.0.0 range 10.0.0.0/16 |
| 635 | area 0.0.0.0 range 192.168.0.0/24 |
| 636 | area 0.0.0.1 authentication message-digest |
| 637 | area 0.0.0.1 range 10.2.0.0/16 |
| 638 | ! |
| 639 | @end group |
| 640 | @end example |