]> git.proxmox.com Git - mirror_frr.git/blame - doc/ospfd.texi
2004-12-17 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
[mirror_frr.git] / doc / ospfd.texi
CommitLineData
76b89b4a 1@node OSPFv2
718e3744 2@chapter OSPFv2
3
4 OSPF version 2 is a routing protocol which described in
5@asis{RFC2328} - @cite{OSPF Version 2}. OSPF is IGP (Interior Gateway
6Protocols). Compared with RIP, OSPF can provide scalable network
7support and faster convergence time. OSPF is widely used in large
8networks such as ISP backbone and enterprise networks.
9
10@menu
11* Configuring ospfd::
12* OSPF router::
13* OSPF area::
14* OSPF interface::
15* Redistribute routes to OSPF::
16* Showing OSPF information::
17* Debugging OSPF::
18@end menu
19
76b89b4a 20@node Configuring ospfd
718e3744 21@section Configuring ospfd
22
23There is no @command{ospfd} specific options. Common options can be
24specified (@pxref{Common Invocation Options}) to @command{ospfd}.
25@command{ospfd} needs interface information from @command{zebra}. So
26please make it sure @command{zebra} is running before invoking
27@command{ospfd}.
28
29Like other daemons, @command{ospfd} configuration is done in OSPF
30specific configuration file @file{ospfd.conf}.
31
76b89b4a 32@node OSPF router
718e3744 33@section OSPF router
34
35To start OSPF process you have to specify the OSPF router. As of this
36writing, @command{ospfd} does not support multiple OSPF processes.
37
38@deffn Command {router ospf} {}
39@deffnx Command {no router ospf} {}
40Enable or disable the OSPF process. @command{ospfd} does not yet
41support multiple OSPF processes. So you can not specify an OSPF process
42number.
43@end deffn
44
45@deffn {OSPF Command} {ospf router-id @var{a.b.c.d}} {}
46@deffnx {OSPF Command} {no ospf router-id} {}
47@end deffn
48
49@deffn {OSPF Command} {ospf abr-type @var{type}} {}
50@deffnx {OSPF Command} {no ospf abr-type @var{type}} {}
51@var{type} can be cisco|ibm|shortcut|standard
d4f5031c 52More information regarding the behaviour controlled by this command can
53be found in draft-ietf-ospf-abr-alt-05.txt and
54draft-ietf-ospf-shortcut-abr-02.txt
55Quote: "Though the definition of the Area Border Router (ABR)
56in the OSPF specification does not require a router with multiple
57attached areas to have a backbone connection, it is actually
58necessary to provide successful routing to the inter-area and
59external destinations. If this requirement is not met, all traffic
60destined for the areas not connected to such an ABR or out of the
61OSPF domain, is dropped. This document describes alternative ABR
62behaviors implemented in Cisco and IBM routers."
718e3744 63@end deffn
64
65@deffn {OSPF Command} {ospf rfc1583compatibility} {}
66@deffnx {OSPF Command} {no ospf rfc1583compatibility} {}
37163d6d 67This rfc2328, the sucessor to rfc1583, suggests according to section
68G.2 (changes) in section 16.4 a change to the path preference
69algorithm that prevents possible routing loops that were possible in
70the old version of OSPFv2. More specifically it demands that inter-area
71paths and intra-area path are now of equal preference but still both
72preferred to external paths.
718e3744 73@end deffn
74
75@deffn {OSPF Command} {passive interface @var{interface}} {}
76@deffnx {OSPF Command} {no passive interface @var{interface}} {}
77@end deffn
78
79@deffn {OSPF Command} {timers spf <0-4294967295> <0-4294967295>} {}
80@deffnx {OSPF Command} {no timers spf} {}
81@end deffn
82
83@deffn {OSPF Command} {refresh group-limit <0-10000>} {}
84@deffnx {OSPF Command} {refresh per-slice <0-10000>} {}
85@deffnx {OSPF Command} {refresh age-diff <0-10000>} {}
86@end deffn
87
88@deffn {OSPF Command} {auto-cost refrence-bandwidth <1-4294967>} {}
89@deffnx {OSPF Command} {no auto-cost refrence-bandwidth} {}
90@end deffn
91
92@deffn {OSPF Command} {network @var{a.b.c.d/m} area @var{a.b.c.d}} {}
93@deffnx {OSPF Command} {network @var{a.b.c.d/m} area @var{<0-4294967295>}} {}
94@deffnx {OSPF Command} {no network @var{a.b.c.d/m} area @var{a.b.c.d}} {}
95@deffnx {OSPF Command} {no network @var{a.b.c.d/m} area @var{<0-4294967295>}} {}
a5b2b59a 96This command specifies the OSPF enabled interface(s). If the interface has
97an address from range 192.168.1.0/24 then the command below enables ospf
98on this interface so router can provide network information to the other
99ospf routers via this interface.
718e3744 100@example
101@group
102router ospf
a5b2b59a 103 network 192.168.1.0/24 area 0.0.0.0
718e3744 104@end group
105@end example
a5b2b59a 106Prefix length in interface must be equal or bigger (ie. smaller network) than
107prefix length in network statement. For example statement above doesn't enable
108ospf on interface with address 192.168.1.1/23, but it does on interface with
109address 192.168.1.129/25.
718e3744 110@end deffn
111
76b89b4a 112@node OSPF area
718e3744 113@section OSPF area
114
115@deffn {OSPF Command} {area @var{a.b.c.d} range @var{a.b.c.d/m}} {}
116@deffnx {OSPF Command} {area <0-4294967295> range @var{a.b.c.d/m}} {}
117@deffnx {OSPF Command} {no area @var{a.b.c.d} range @var{a.b.c.d/m}} {}
118@deffnx {OSPF Command} {no area <0-4294967295> range @var{a.b.c.d/m}} {}
63869f11 119Summarize intra area paths from specified area into one Type-3 summary-LSA
120announced to other areas. This command can be used only in ABR and ONLY
121router-LSAs (Type-1) and network-LSAs (Type-2) (ie. LSAs with scope area) can
122be summarized. Type-5 AS-external-LSAs can't be summarized - their scope is AS.
123Summarizing Type-7 AS-external-LSAs isn't supported yet by Quagga.
124@example
125@group
126router ospf
127 network 192.168.1.0/24 area 0.0.0.0
128 network 10.0.0.0/8 area 0.0.0.10
129 area 0.0.0.10 range 10.0.0.0/8
130@end group
131@end example
132With configuration above one Type-3 Summary-LSA with routing info 10.0.0.0/8 is
133announced into backbone area if area 0.0.0.10 contains at least one intra-area
134network (ie. described with router or network LSA) from this range.
135@end deffn
136
137@deffn {OSPF Command} {area @var{a.b.c.d} range IPV4_PREFIX not-advertise} {}
138@deffnx {OSPF Command} {no area @var{a.b.c.d} range IPV4_PREFIX not-advertise} {}
139Instead of summarizing intra area paths filter them - ie. intra area paths from this
140range are not advertised into other areas.
141This command makes sense in ABR only.
718e3744 142@end deffn
143
6b3fac0a 144@deffn {OSPF Command} {area @var{a.b.c.d} range IPV4_PREFIX substitute IPV4_PREFIX} {}
718e3744 145@deffnx {OSPF Command} {no area @var{a.b.c.d} range IPV4_PREFIX substitute IPV4_PREFIX} {}
63869f11 146Substitute summarized prefix with another prefix.
147@example
148@group
149router ospf
150 network 192.168.1.0/24 area 0.0.0.0
151 network 10.0.0.0/8 area 0.0.0.10
152 area 0.0.0.10 range 10.0.0.0/8 substitute 11.0.0.0/8
153@end group
154@end example
155One Type-3 summary-LSA with routing info 11.0.0.0/8 is announced into backbone area if
156area 0.0.0.10 contains at least one intra-area network (ie. described with router-LSA or
157network-LSA) from range 10.0.0.0/8.
158This command makes sense in ABR only.
718e3744 159@end deffn
160
161@deffn {OSPF Command} {area @var{a.b.c.d} virtual-link @var{a.b.c.d}} {}
162@deffnx {OSPF Command} {area <0-4294967295> virtual-link @var{a.b.c.d}} {}
163@deffnx {OSPF Command} {no area @var{a.b.c.d} virtual-link @var{a.b.c.d}} {}
164@deffnx {OSPF Command} {no area <0-4294967295> virtual-link @var{a.b.c.d}} {}
165@end deffn
166
167@deffn {OSPF Command} {area @var{a.b.c.d} shortcut} {}
168@deffnx {OSPF Command} {area <0-4294967295> shortcut} {}
169@deffnx {OSPF Command} {no area @var{a.b.c.d} shortcut} {}
170@deffnx {OSPF Command} {no area <0-4294967295> shortcut} {}
171@end deffn
172
173@deffn {OSPF Command} {area @var{a.b.c.d} stub} {}
174@deffnx {OSPF Command} {area <0-4294967295> stub} {}
175@deffnx {OSPF Command} {no area @var{a.b.c.d} stub} {}
176@deffnx {OSPF Command} {no area <0-4294967295> stub} {}
177@end deffn
178
179@deffn {OSPF Command} {area @var{a.b.c.d} stub no-summary} {}
180@deffnx {OSPF Command} {area <0-4294967295> stub no-summary} {}
181@deffnx {OSPF Command} {no area @var{a.b.c.d} stub no-summary} {}
182@deffnx {OSPF Command} {no area <0-4294967295> stub no-summary} {}
183@end deffn
184
185@deffn {OSPF Command} {area @var{a.b.c.d} default-cost <0-16777215>} {}
186@deffnx {OSPF Command} {no area @var{a.b.c.d} default-cost <0-16777215>} {}
187@end deffn
188
189@deffn {OSPF Command} {area @var{a.b.c.d} export-list NAME} {}
190@deffnx {OSPF Command} {area <0-4294967295> export-list NAME} {}
191@deffnx {OSPF Command} {no area @var{a.b.c.d} export-list NAME} {}
192@deffnx {OSPF Command} {no area <0-4294967295> export-list NAME} {}
63869f11 193Filter Type-3 summary-LSAs announced to other areas originated from intra-
194area paths from specified area.
195@example
196@group
197router ospf
198 network 192.168.1.0/24 area 0.0.0.0
199 network 10.0.0.0/8 area 0.0.0.10
200 area 0.0.0.10 export-list foo
201!
202access-list foo permit 10.10.0.0/16
203access-list foo deny any
204@end group
205@end example
206With example above any intra-area paths from area 0.0.0.10 and from range
20710.10.0.0/16 (for example 10.10.1.0/24 and 10.10.2.128/30) are announced into
208other areas as Type-3 summary-LSA's, but any others (for example 10.11.0.0/16
209or 10.128.30.16/30) aren't.
c266ac78 210This command makes sense in ABR only.
718e3744 211@end deffn
212
213@deffn {OSPF Command} {area @var{a.b.c.d} import-list NAME} {}
214@deffnx {OSPF Command} {area <0-4294967295> import-list NAME} {}
215@deffnx {OSPF Command} {no area @var{a.b.c.d} import-list NAME} {}
216@deffnx {OSPF Command} {no area <0-4294967295> import-list NAME} {}
63869f11 217Same as export-list, but it applies to paths announced into specified area as
218Type-3 summary-LSAs.
219@end deffn
220
808c0a7f 221@deffn {OSPF Command} {area @var{a.b.c.d} filter-list prefix NAME in} {}
222@deffnx {OSPF Command} {area @var{a.b.c.d} filter-list prefix NAME out} {}
223@deffnx {OSPF Command} {area <0-4294967295> filter-list prefix NAME in} {}
224@deffnx {OSPF Command} {area <0-4294967295> filter-list prefix NAME out} {}
225@deffnx {OSPF Command} {no area @var{a.b.c.d} filter-list prefix NAME in} {}
226@deffnx {OSPF Command} {no area @var{a.b.c.d} filter-list prefix NAME out} {}
227@deffnx {OSPF Command} {no area <0-4294967295> filter-list prefix NAME in} {}
228@deffnx {OSPF Command} {no area <0-4294967295> filter-list prefix NAME out} {}
c266ac78 229Filtering Type-3 summary-LSAs to/from area using prefix lists. This command
230makes sense in ABR only.
718e3744 231@end deffn
232
233@deffn {OSPF Command} {area @var{a.b.c.d} authentication} {}
234@deffnx {OSPF Command} {area <0-4294967295> authentication} {}
235@deffnx {OSPF Command} {no area @var{a.b.c.d} authentication} {}
236@deffnx {OSPF Command} {no area <0-4294967295> authentication} {}
237@end deffn
238
239@deffn {OSPF Command} {area @var{a.b.c.d} authentication message-digest} {}
240@deffnx {OSPF Command} {area <0-4294967295> authentication message-digest} {}
241@end deffn
242
76b89b4a 243@node OSPF interface
718e3744 244@section OSPF interface
245
246@deffn {Interface Command} {ip ospf authentication-key AUTH_KEY} {}
247@deffnx {Interface Command} {no ip ospf authentication-key} {}
248Set OSPF authentication key to a simple password. After setting @var{AUTH_KEY},
249all OSPF packets are authenticated. @var{AUTH_KEY} has length up to 8 chars.
250@end deffn
251
252@deffn {Interface Command} {ip ospf message-digest-key KEYID md5 KEY} {}
253@deffnx {Interface Command} {no ip ospf message-digest-key} {}
254Set OSPF authentication key to a cryptographic password. The cryptographic
255algorithm is MD5. KEYID identifies secret key used to create the message
e2ea9fef 256digest. KEY is the actual message digest key up to 16 chars.
257
258Note that OSPF MD5 authentication requires that time never go backwards
259(correct time is not important, only that it never goes backwards), even
260across resets, if ospfd is to be able to promptly reestabish adjacencies
261with its neighbours after restarts/reboots. The host should have system
262time be set at boot from an external source (eg battery backed clock, NTP,
263etc.) or else the system clock should be periodically saved to non-volative
264storage and restored at boot if MD5 authentication is to be expected to work
265reliably.
718e3744 266@end deffn
267
268@deffn {Interface Command} {ip ospf cost <1-65535>} {}
269@deffnx {Interface Command} {no ip ospf cost} {}
270Set link cost for the specified interface. The cost value is set to router-LSA's
271metric field and used for SPF calculation.
272@end deffn
273
274@deffn {Interface Command} {ip ospf dead-interval <1-65535>} {}
275@deffnx {Interface Command} {no ip ospf dead-interval} {}
276Set number of seconds for RouterDeadInterval timer value used for Wait Timer
277and Inactivity Timer. This value must be the same for all routers attached
278to a common network. The default value is 40 seconds.
279@end deffn
280
281@deffn {Interface Command} {ip ospf hello-interval <1-65535>} {}
282@deffnx {Interface Command} {no ip ospf hello-interval} {}
283Set number of seconds for HelloInterval timer value. Setting this value,
284Hello packet will be sent every timer value seconds on the specified interface.
285This value must be the same for all routers attached to a common network.
286The default value is 10 seconds.
287@end deffn
288
289@deffn {Interface Command} {ip ospf network (broadcast|non-broadcast|point-to-multipoint|point-to-point)} {}
290@deffnx {Interface Command} {no ip ospf network} {}
291Set explicitly network type for specifed interface.
292@end deffn
293
294@deffn {Interface Command} {ip ospf priority <0-255>} {}
295@deffnx {Interface Command} {no ip ospf priority} {}
296Set RouterPriority integer value. Setting higher value, router will be more
297eligible to become Designated Router. Setting the value to 0, router is no
298longer eligible to Designated Router.
299The default value is 1.
300@end deffn
301
302@deffn {Interface Command} {ip ospf retransmit-interval <1-65535>} {}
303@deffnx {Interface Command} {no ip ospf retransmit interval} {}
304Set number of seconds for RxmtInterval timer value. This value is used
305when retransmitting Database Description and Link State Request packets.
306The default value is 5 seconds.
307@end deffn
308
309@deffn {Interface Command} {ip ospf transmit-delay} {}
310@deffnx {Interface Command} {no ip ospf transmit-delay} {}
311Set number of seconds for InfTransDelay value. LSAs' age should be
312incremented by this value when transmitting.
313The default value is 1 seconds.
314@end deffn
315
76b89b4a 316@node Redistribute routes to OSPF
718e3744 317@section Redistribute routes to OSPF
318
319@deffn {OSPF Command} {redistribute (kernel|connected|static|rip|bgp)} {}
320@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) @var{route-map}} {}
321@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2)} {}
322@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) route-map @var{word}} {}
323@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric <0-16777214>} {}
324@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric <0-16777214> route-map @var{word}} {}
325@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric <0-16777214>} {}
326@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric <0-16777214> route-map @var{word}} {}
327@deffnx {OSPF Command} {no redistribute (kernel|connected|static|rip|bgp)} {}
328@end deffn
329
330@deffn {OSPF Command} {default-information originate} {}
331@deffnx {OSPF Command} {default-information originate metric <0-16777214>} {}
332@deffnx {OSPF Command} {default-information originate metric <0-16777214> metric-type (1|2)} {}
333@deffnx {OSPF Command} {default-information originate metric <0-16777214> metric-type (1|2) route-map @var{word}} {}
334@deffnx {OSPF Command} {default-information originate always} {}
335@deffnx {OSPF Command} {default-information originate always metric <0-16777214>} {}
336@deffnx {OSPF Command} {default-information originate always metric <0-16777214> metric-type (1|2)} {}
337@deffnx {OSPF Command} {default-information originate always metric <0-16777214> metric-type (1|2) route-map @var{word}} {}
338@deffnx {OSPF Command} {no default-information originate} {}
339@end deffn
340
341@deffn {OSPF Command} {distribute-list NAME out (kernel|connected|static|rip|ospf} {}
342@deffnx {OSPF Command} {no distribute-list NAME out (kernel|connected|static|rip|ospf} {}
343@end deffn
344
345@deffn {OSPF Command} {default-metric <0-16777214>} {}
346@deffnx {OSPF Command} {no default-metric} {}
347@end deffn
348
349@deffn {OSPF Command} {distance <1-255>} {}
350@deffnx {OSPF Command} {no distance <1-255>} {}
351@end deffn
352
353@deffn {OSPF Command} {distance ospf (intra-area|inter-area|external) <1-255>} {}
354@deffnx {OSPF Command} {no distance ospf} {}
355@end deffn
356
357@deffn {Command} {router zebra} {}
358@deffnx {Command} {no router zebra} {}
359@end deffn
360
76b89b4a 361@node Showing OSPF information
718e3744 362@section Showing OSPF information
363
364@deffn {Command} {show ip ospf} {}
365@end deffn
366
367@deffn {Command} {show ip ospf interface [INTERFACE]} {}
368@end deffn
369
370@deffn {Command} {show ip ospf neighbor} {}
371@deffnx {Command} {show ip ospf neighbor INTERFACE} {}
372@deffnx {Command} {show ip ospf neighbor detail} {}
373@deffnx {Command} {show ip ospf neighbor INTERFACE detail} {}
374@end deffn
375
376@deffn {Command} {show ip ospf database} {}
377@end deffn
378
379@deffn {Command} {show ip ospf database (asbr-summary|external|network|router|summary)} {}
380@deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) @var{link-state-id}} {}
381@deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) @var{link-state-id} adv-router @var{adv-router}} {}
382@deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) adv-router @var{adv-router}} {}
383@deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) @var{link-state-id} self-originate} {}
384@deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) self-originate} {}
385@end deffn
386
387@deffn {Command} {show ip ospf database max-age} {}
388@end deffn
389
390@deffn {Command} {show ip ospf database self-originate} {}
391@end deffn
392
393@deffn {Command} {show ip ospf refresher} {}
394@end deffn
395
396@deffn {Command} {show ip ospf route} {}
397@end deffn
398
76b89b4a 399@node Debugging OSPF
718e3744 400@section Debugging OSPF
401
402@deffn {Command} {debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) [detail]} {}
403@deffnx {Command} {no debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) [detail]} {}
404@end deffn
405
406@deffn {Command} {debug ospf ism} {}
407@deffnx {Command} {debug ospf ism (status|events|timers)} {}
408@deffnx {Command} {no debug ospf ism} {}
409@deffnx {Command} {no debug ospf ism (status|events|timers)} {}
410@end deffn
411
412@deffn {Command} {debug ospf nsm} {}
413@deffnx {Command} {debug ospf nsm (status|events|timers)} {}
414@deffnx {Command} {no debug ospf nsm} {}
415@deffnx {Command} {no debug ospf nsm (status|events|timers)} {}
416@end deffn
417
418@deffn {Command} {debug ospf lsa} {}
419@deffnx {Command} {debug ospf lsa (generate|flooding|refresh)} {}
420@deffnx {Command} {no debug ospf lsa} {}
421@deffnx {Command} {no debug ospf lsa (generate|flooding|refresh)} {}
422@end deffn
423
424@deffn {Command} {debug ospf zebra} {}
425@deffnx {Command} {debug ospf zebra (interface|redistribute)} {}
426@deffnx {Command} {no debug ospf zebra} {}
427@deffnx {Command} {no debug ospf zebra (interface|redistribute)} {}
428@end deffn
429
430@deffn {Command} {show debugging ospf} {}
431@end deffn
432