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