blob: 509a75c76f4a439eeb75e84c6689f4268442a3ba [file] [log] [blame]
paul718e3742002-12-13 20:15:29 +00001@node OSPFv2, OSPFv3, RIPng, Top
2@comment node-name, next, previous, up
3@chapter OSPFv2
4
5 OSPF version 2 is a routing protocol which described in
6@asis{RFC2328} - @cite{OSPF Version 2}. OSPF is IGP (Interior Gateway
7Protocols). Compared with RIP, OSPF can provide scalable network
8support and faster convergence time. OSPF is widely used in large
9networks such as ISP backbone and enterprise networks.
10
11@menu
12* Configuring ospfd::
13* OSPF router::
14* OSPF area::
15* OSPF interface::
16* Redistribute routes to OSPF::
17* Showing OSPF information::
18* Debugging OSPF::
19@end menu
20
21@node Configuring ospfd, OSPF router, OSPFv2, OSPFv2
22@comment node-name, next, previous, up
23@section Configuring ospfd
24
25There is no @command{ospfd} specific options. Common options can be
26specified (@pxref{Common Invocation Options}) to @command{ospfd}.
27@command{ospfd} needs interface information from @command{zebra}. So
28please make it sure @command{zebra} is running before invoking
29@command{ospfd}.
30
31Like other daemons, @command{ospfd} configuration is done in OSPF
32specific configuration file @file{ospfd.conf}.
33
34@node OSPF router, OSPF area, Configuring ospfd, OSPFv2
35@comment node-name, next, previous, up
36@section OSPF router
37
38To start OSPF process you have to specify the OSPF router. As of this
39writing, @command{ospfd} does not support multiple OSPF processes.
40
41@deffn Command {router ospf} {}
42@deffnx Command {no router ospf} {}
43Enable or disable the OSPF process. @command{ospfd} does not yet
44support multiple OSPF processes. So you can not specify an OSPF process
45number.
46@end deffn
47
48@deffn {OSPF Command} {ospf router-id @var{a.b.c.d}} {}
49@deffnx {OSPF Command} {no ospf router-id} {}
50@end deffn
51
52@deffn {OSPF Command} {ospf abr-type @var{type}} {}
53@deffnx {OSPF Command} {no ospf abr-type @var{type}} {}
54@var{type} can be cisco|ibm|shortcut|standard
pauld4f50312003-01-22 19:26:00 +000055More information regarding the behaviour controlled by this command can
56be found in draft-ietf-ospf-abr-alt-05.txt and
57draft-ietf-ospf-shortcut-abr-02.txt
58Quote: "Though the definition of the Area Border Router (ABR)
59in the OSPF specification does not require a router with multiple
60attached areas to have a backbone connection, it is actually
61necessary to provide successful routing to the inter-area and
62external destinations. If this requirement is not met, all traffic
63destined for the areas not connected to such an ABR or out of the
64OSPF domain, is dropped. This document describes alternative ABR
65behaviors implemented in Cisco and IBM routers."
paul718e3742002-12-13 20:15:29 +000066@end deffn
67
68@deffn {OSPF Command} {ospf rfc1583compatibility} {}
69@deffnx {OSPF Command} {no ospf rfc1583compatibility} {}
paul37163d62003-02-03 18:40:56 +000070This rfc2328, the sucessor to rfc1583, suggests according to section
71G.2 (changes) in section 16.4 a change to the path preference
72algorithm that prevents possible routing loops that were possible in
73the old version of OSPFv2. More specifically it demands that inter-area
74paths and intra-area path are now of equal preference but still both
75preferred to external paths.
paul718e3742002-12-13 20:15:29 +000076@end deffn
77
78@deffn {OSPF Command} {passive interface @var{interface}} {}
79@deffnx {OSPF Command} {no passive interface @var{interface}} {}
80@end deffn
81
82@deffn {OSPF Command} {timers spf <0-4294967295> <0-4294967295>} {}
83@deffnx {OSPF Command} {no timers spf} {}
84@end deffn
85
86@deffn {OSPF Command} {refresh group-limit <0-10000>} {}
87@deffnx {OSPF Command} {refresh per-slice <0-10000>} {}
88@deffnx {OSPF Command} {refresh age-diff <0-10000>} {}
89@end deffn
90
91@deffn {OSPF Command} {auto-cost refrence-bandwidth <1-4294967>} {}
92@deffnx {OSPF Command} {no auto-cost refrence-bandwidth} {}
93@end deffn
94
95@deffn {OSPF Command} {network @var{a.b.c.d/m} area @var{a.b.c.d}} {}
96@deffnx {OSPF Command} {network @var{a.b.c.d/m} area @var{<0-4294967295>}} {}
97@deffnx {OSPF Command} {no network @var{a.b.c.d/m} area @var{a.b.c.d}} {}
98@deffnx {OSPF Command} {no network @var{a.b.c.d/m} area @var{<0-4294967295>}} {}
hassoa5b2b592004-04-17 10:09:29 +000099This command specifies the OSPF enabled interface(s). If the interface has
100an address from range 192.168.1.0/24 then the command below enables ospf
101on this interface so router can provide network information to the other
102ospf routers via this interface.
paul718e3742002-12-13 20:15:29 +0000103@example
104@group
105router ospf
hassoa5b2b592004-04-17 10:09:29 +0000106 network 192.168.1.0/24 area 0.0.0.0
paul718e3742002-12-13 20:15:29 +0000107@end group
108@end example
hassoa5b2b592004-04-17 10:09:29 +0000109Prefix length in interface must be equal or bigger (ie. smaller network) than
110prefix length in network statement. For example statement above doesn't enable
111ospf on interface with address 192.168.1.1/23, but it does on interface with
112address 192.168.1.129/25.
paul718e3742002-12-13 20:15:29 +0000113@end deffn
114
115@node OSPF area, OSPF interface, OSPF router, OSPFv2
116@comment node-name, next, previous, up
117@section OSPF area
118
119@deffn {OSPF Command} {area @var{a.b.c.d} range @var{a.b.c.d/m}} {}
120@deffnx {OSPF Command} {area <0-4294967295> range @var{a.b.c.d/m}} {}
121@deffnx {OSPF Command} {no area @var{a.b.c.d} range @var{a.b.c.d/m}} {}
122@deffnx {OSPF Command} {no area <0-4294967295> range @var{a.b.c.d/m}} {}
123@end deffn
124
125@deffn {OSPF Command} {area @var{a.b.c.d} range IPV4_PREFIX suppress} {}
126@deffnx {OSPF Command} {no area @var{a.b.c.d} range IPV4_PREFIX suppress} {}
127@deffnx {OSPF Command} {area @var{a.b.c.d} range IPV4_PREFIX substitute IPV4_PREFIX} {}
128@deffnx {OSPF Command} {no area @var{a.b.c.d} range IPV4_PREFIX substitute IPV4_PREFIX} {}
129@end deffn
130
131@deffn {OSPF Command} {area @var{a.b.c.d} virtual-link @var{a.b.c.d}} {}
132@deffnx {OSPF Command} {area <0-4294967295> virtual-link @var{a.b.c.d}} {}
133@deffnx {OSPF Command} {no area @var{a.b.c.d} virtual-link @var{a.b.c.d}} {}
134@deffnx {OSPF Command} {no area <0-4294967295> virtual-link @var{a.b.c.d}} {}
135@end deffn
136
137@deffn {OSPF Command} {area @var{a.b.c.d} shortcut} {}
138@deffnx {OSPF Command} {area <0-4294967295> shortcut} {}
139@deffnx {OSPF Command} {no area @var{a.b.c.d} shortcut} {}
140@deffnx {OSPF Command} {no area <0-4294967295> shortcut} {}
141@end deffn
142
143@deffn {OSPF Command} {area @var{a.b.c.d} stub} {}
144@deffnx {OSPF Command} {area <0-4294967295> stub} {}
145@deffnx {OSPF Command} {no area @var{a.b.c.d} stub} {}
146@deffnx {OSPF Command} {no area <0-4294967295> stub} {}
147@end deffn
148
149@deffn {OSPF Command} {area @var{a.b.c.d} stub no-summary} {}
150@deffnx {OSPF Command} {area <0-4294967295> stub no-summary} {}
151@deffnx {OSPF Command} {no area @var{a.b.c.d} stub no-summary} {}
152@deffnx {OSPF Command} {no area <0-4294967295> stub no-summary} {}
153@end deffn
154
155@deffn {OSPF Command} {area @var{a.b.c.d} default-cost <0-16777215>} {}
156@deffnx {OSPF Command} {no area @var{a.b.c.d} default-cost <0-16777215>} {}
157@end deffn
158
159@deffn {OSPF Command} {area @var{a.b.c.d} export-list NAME} {}
160@deffnx {OSPF Command} {area <0-4294967295> export-list NAME} {}
161@deffnx {OSPF Command} {no area @var{a.b.c.d} export-list NAME} {}
162@deffnx {OSPF Command} {no area <0-4294967295> export-list NAME} {}
163@end deffn
164
165@deffn {OSPF Command} {area @var{a.b.c.d} import-list NAME} {}
166@deffnx {OSPF Command} {area <0-4294967295> import-list NAME} {}
167@deffnx {OSPF Command} {no area @var{a.b.c.d} import-list NAME} {}
168@deffnx {OSPF Command} {no area <0-4294967295> import-list NAME} {}
169@end deffn
170
171@deffn {OSPF Command} {area @var{a.b.c.d} authentication} {}
172@deffnx {OSPF Command} {area <0-4294967295> authentication} {}
173@deffnx {OSPF Command} {no area @var{a.b.c.d} authentication} {}
174@deffnx {OSPF Command} {no area <0-4294967295> authentication} {}
175@end deffn
176
177@deffn {OSPF Command} {area @var{a.b.c.d} authentication message-digest} {}
178@deffnx {OSPF Command} {area <0-4294967295> authentication message-digest} {}
179@end deffn
180
181@node OSPF interface, Redistribute routes to OSPF, OSPF area, OSPFv2
182@comment node-name, next, previous, up
183@section OSPF interface
184
185@deffn {Interface Command} {ip ospf authentication-key AUTH_KEY} {}
186@deffnx {Interface Command} {no ip ospf authentication-key} {}
187Set OSPF authentication key to a simple password. After setting @var{AUTH_KEY},
188all OSPF packets are authenticated. @var{AUTH_KEY} has length up to 8 chars.
189@end deffn
190
191@deffn {Interface Command} {ip ospf message-digest-key KEYID md5 KEY} {}
192@deffnx {Interface Command} {no ip ospf message-digest-key} {}
193Set OSPF authentication key to a cryptographic password. The cryptographic
194algorithm is MD5. KEYID identifies secret key used to create the message
195digest. KEY is the actual message digest key up to 16 chars.
196@end deffn
197
198@deffn {Interface Command} {ip ospf cost <1-65535>} {}
199@deffnx {Interface Command} {no ip ospf cost} {}
200Set link cost for the specified interface. The cost value is set to router-LSA's
201metric field and used for SPF calculation.
202@end deffn
203
204@deffn {Interface Command} {ip ospf dead-interval <1-65535>} {}
205@deffnx {Interface Command} {no ip ospf dead-interval} {}
206Set number of seconds for RouterDeadInterval timer value used for Wait Timer
207and Inactivity Timer. This value must be the same for all routers attached
208to a common network. The default value is 40 seconds.
209@end deffn
210
211@deffn {Interface Command} {ip ospf hello-interval <1-65535>} {}
212@deffnx {Interface Command} {no ip ospf hello-interval} {}
213Set number of seconds for HelloInterval timer value. Setting this value,
214Hello packet will be sent every timer value seconds on the specified interface.
215This value must be the same for all routers attached to a common network.
216The default value is 10 seconds.
217@end deffn
218
219@deffn {Interface Command} {ip ospf network (broadcast|non-broadcast|point-to-multipoint|point-to-point)} {}
220@deffnx {Interface Command} {no ip ospf network} {}
221Set explicitly network type for specifed interface.
222@end deffn
223
224@deffn {Interface Command} {ip ospf priority <0-255>} {}
225@deffnx {Interface Command} {no ip ospf priority} {}
226Set RouterPriority integer value. Setting higher value, router will be more
227eligible to become Designated Router. Setting the value to 0, router is no
228longer eligible to Designated Router.
229The default value is 1.
230@end deffn
231
232@deffn {Interface Command} {ip ospf retransmit-interval <1-65535>} {}
233@deffnx {Interface Command} {no ip ospf retransmit interval} {}
234Set number of seconds for RxmtInterval timer value. This value is used
235when retransmitting Database Description and Link State Request packets.
236The default value is 5 seconds.
237@end deffn
238
239@deffn {Interface Command} {ip ospf transmit-delay} {}
240@deffnx {Interface Command} {no ip ospf transmit-delay} {}
241Set number of seconds for InfTransDelay value. LSAs' age should be
242incremented by this value when transmitting.
243The default value is 1 seconds.
244@end deffn
245
246@node Redistribute routes to OSPF, Showing OSPF information, OSPF interface, OSPFv2
247@comment node-name, next, previous, up
248@section Redistribute routes to OSPF
249
250@deffn {OSPF Command} {redistribute (kernel|connected|static|rip|bgp)} {}
251@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) @var{route-map}} {}
252@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2)} {}
253@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) route-map @var{word}} {}
254@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric <0-16777214>} {}
255@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric <0-16777214> route-map @var{word}} {}
256@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric <0-16777214>} {}
257@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric <0-16777214> route-map @var{word}} {}
258@deffnx {OSPF Command} {no redistribute (kernel|connected|static|rip|bgp)} {}
259@end deffn
260
261@deffn {OSPF Command} {default-information originate} {}
262@deffnx {OSPF Command} {default-information originate metric <0-16777214>} {}
263@deffnx {OSPF Command} {default-information originate metric <0-16777214> metric-type (1|2)} {}
264@deffnx {OSPF Command} {default-information originate metric <0-16777214> metric-type (1|2) route-map @var{word}} {}
265@deffnx {OSPF Command} {default-information originate always} {}
266@deffnx {OSPF Command} {default-information originate always metric <0-16777214>} {}
267@deffnx {OSPF Command} {default-information originate always metric <0-16777214> metric-type (1|2)} {}
268@deffnx {OSPF Command} {default-information originate always metric <0-16777214> metric-type (1|2) route-map @var{word}} {}
269@deffnx {OSPF Command} {no default-information originate} {}
270@end deffn
271
272@deffn {OSPF Command} {distribute-list NAME out (kernel|connected|static|rip|ospf} {}
273@deffnx {OSPF Command} {no distribute-list NAME out (kernel|connected|static|rip|ospf} {}
274@end deffn
275
276@deffn {OSPF Command} {default-metric <0-16777214>} {}
277@deffnx {OSPF Command} {no default-metric} {}
278@end deffn
279
280@deffn {OSPF Command} {distance <1-255>} {}
281@deffnx {OSPF Command} {no distance <1-255>} {}
282@end deffn
283
284@deffn {OSPF Command} {distance ospf (intra-area|inter-area|external) <1-255>} {}
285@deffnx {OSPF Command} {no distance ospf} {}
286@end deffn
287
288@deffn {Command} {router zebra} {}
289@deffnx {Command} {no router zebra} {}
290@end deffn
291
292@node Showing OSPF information, Debugging OSPF, Redistribute routes to OSPF, OSPFv2
293@comment node-name, next, previous, up
294@section Showing OSPF information
295
296@deffn {Command} {show ip ospf} {}
297@end deffn
298
299@deffn {Command} {show ip ospf interface [INTERFACE]} {}
300@end deffn
301
302@deffn {Command} {show ip ospf neighbor} {}
303@deffnx {Command} {show ip ospf neighbor INTERFACE} {}
304@deffnx {Command} {show ip ospf neighbor detail} {}
305@deffnx {Command} {show ip ospf neighbor INTERFACE detail} {}
306@end deffn
307
308@deffn {Command} {show ip ospf database} {}
309@end deffn
310
311@deffn {Command} {show ip ospf database (asbr-summary|external|network|router|summary)} {}
312@deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) @var{link-state-id}} {}
313@deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) @var{link-state-id} adv-router @var{adv-router}} {}
314@deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) adv-router @var{adv-router}} {}
315@deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) @var{link-state-id} self-originate} {}
316@deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) self-originate} {}
317@end deffn
318
319@deffn {Command} {show ip ospf database max-age} {}
320@end deffn
321
322@deffn {Command} {show ip ospf database self-originate} {}
323@end deffn
324
325@deffn {Command} {show ip ospf refresher} {}
326@end deffn
327
328@deffn {Command} {show ip ospf route} {}
329@end deffn
330
331@node Debugging OSPF, , Showing OSPF information, OSPFv2
332@comment node-name, next, previous, up
333@section Debugging OSPF
334
335@deffn {Command} {debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) [detail]} {}
336@deffnx {Command} {no debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) [detail]} {}
337@end deffn
338
339@deffn {Command} {debug ospf ism} {}
340@deffnx {Command} {debug ospf ism (status|events|timers)} {}
341@deffnx {Command} {no debug ospf ism} {}
342@deffnx {Command} {no debug ospf ism (status|events|timers)} {}
343@end deffn
344
345@deffn {Command} {debug ospf nsm} {}
346@deffnx {Command} {debug ospf nsm (status|events|timers)} {}
347@deffnx {Command} {no debug ospf nsm} {}
348@deffnx {Command} {no debug ospf nsm (status|events|timers)} {}
349@end deffn
350
351@deffn {Command} {debug ospf lsa} {}
352@deffnx {Command} {debug ospf lsa (generate|flooding|refresh)} {}
353@deffnx {Command} {no debug ospf lsa} {}
354@deffnx {Command} {no debug ospf lsa (generate|flooding|refresh)} {}
355@end deffn
356
357@deffn {Command} {debug ospf zebra} {}
358@deffnx {Command} {debug ospf zebra (interface|redistribute)} {}
359@deffnx {Command} {no debug ospf zebra} {}
360@deffnx {Command} {no debug ospf zebra (interface|redistribute)} {}
361@end deffn
362
363@deffn {Command} {show debugging ospf} {}
364@end deffn
365