blob: 2c24a210f2408dc58a18dc4458bdf07ef8c29613 [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>}} {}
99This command specifies the OSPF enabled interface. If the interface has
100an address of 10.0.0.1/8 then the command below provides network
101information to the ospf routers
102@example
103@group
104router ospf
105 network 10.0.0.0/8 area 0
106@end group
107@end example
108the network command's mask length should be the same as the interface
109address's mask.
110@end deffn
111
112@node OSPF area, OSPF interface, OSPF router, OSPFv2
113@comment node-name, next, previous, up
114@section OSPF area
115
116@deffn {OSPF Command} {area @var{a.b.c.d} range @var{a.b.c.d/m}} {}
117@deffnx {OSPF Command} {area <0-4294967295> range @var{a.b.c.d/m}} {}
118@deffnx {OSPF Command} {no area @var{a.b.c.d} range @var{a.b.c.d/m}} {}
119@deffnx {OSPF Command} {no area <0-4294967295> range @var{a.b.c.d/m}} {}
120@end deffn
121
122@deffn {OSPF Command} {area @var{a.b.c.d} range IPV4_PREFIX suppress} {}
123@deffnx {OSPF Command} {no area @var{a.b.c.d} range IPV4_PREFIX suppress} {}
124@deffnx {OSPF Command} {area @var{a.b.c.d} range IPV4_PREFIX substitute IPV4_PREFIX} {}
125@deffnx {OSPF Command} {no area @var{a.b.c.d} range IPV4_PREFIX substitute IPV4_PREFIX} {}
126@end deffn
127
128@deffn {OSPF Command} {area @var{a.b.c.d} virtual-link @var{a.b.c.d}} {}
129@deffnx {OSPF Command} {area <0-4294967295> virtual-link @var{a.b.c.d}} {}
130@deffnx {OSPF Command} {no area @var{a.b.c.d} virtual-link @var{a.b.c.d}} {}
131@deffnx {OSPF Command} {no area <0-4294967295> virtual-link @var{a.b.c.d}} {}
132@end deffn
133
134@deffn {OSPF Command} {area @var{a.b.c.d} shortcut} {}
135@deffnx {OSPF Command} {area <0-4294967295> shortcut} {}
136@deffnx {OSPF Command} {no area @var{a.b.c.d} shortcut} {}
137@deffnx {OSPF Command} {no area <0-4294967295> shortcut} {}
138@end deffn
139
140@deffn {OSPF Command} {area @var{a.b.c.d} stub} {}
141@deffnx {OSPF Command} {area <0-4294967295> stub} {}
142@deffnx {OSPF Command} {no area @var{a.b.c.d} stub} {}
143@deffnx {OSPF Command} {no area <0-4294967295> stub} {}
144@end deffn
145
146@deffn {OSPF Command} {area @var{a.b.c.d} stub no-summary} {}
147@deffnx {OSPF Command} {area <0-4294967295> stub no-summary} {}
148@deffnx {OSPF Command} {no area @var{a.b.c.d} stub no-summary} {}
149@deffnx {OSPF Command} {no area <0-4294967295> stub no-summary} {}
150@end deffn
151
152@deffn {OSPF Command} {area @var{a.b.c.d} default-cost <0-16777215>} {}
153@deffnx {OSPF Command} {no area @var{a.b.c.d} default-cost <0-16777215>} {}
154@end deffn
155
156@deffn {OSPF Command} {area @var{a.b.c.d} export-list NAME} {}
157@deffnx {OSPF Command} {area <0-4294967295> export-list NAME} {}
158@deffnx {OSPF Command} {no area @var{a.b.c.d} export-list NAME} {}
159@deffnx {OSPF Command} {no area <0-4294967295> export-list NAME} {}
160@end deffn
161
162@deffn {OSPF Command} {area @var{a.b.c.d} import-list NAME} {}
163@deffnx {OSPF Command} {area <0-4294967295> import-list NAME} {}
164@deffnx {OSPF Command} {no area @var{a.b.c.d} import-list NAME} {}
165@deffnx {OSPF Command} {no area <0-4294967295> import-list NAME} {}
166@end deffn
167
168@deffn {OSPF Command} {area @var{a.b.c.d} authentication} {}
169@deffnx {OSPF Command} {area <0-4294967295> authentication} {}
170@deffnx {OSPF Command} {no area @var{a.b.c.d} authentication} {}
171@deffnx {OSPF Command} {no area <0-4294967295> authentication} {}
172@end deffn
173
174@deffn {OSPF Command} {area @var{a.b.c.d} authentication message-digest} {}
175@deffnx {OSPF Command} {area <0-4294967295> authentication message-digest} {}
176@end deffn
177
178@node OSPF interface, Redistribute routes to OSPF, OSPF area, OSPFv2
179@comment node-name, next, previous, up
180@section OSPF interface
181
182@deffn {Interface Command} {ip ospf authentication-key AUTH_KEY} {}
183@deffnx {Interface Command} {no ip ospf authentication-key} {}
184Set OSPF authentication key to a simple password. After setting @var{AUTH_KEY},
185all OSPF packets are authenticated. @var{AUTH_KEY} has length up to 8 chars.
186@end deffn
187
188@deffn {Interface Command} {ip ospf message-digest-key KEYID md5 KEY} {}
189@deffnx {Interface Command} {no ip ospf message-digest-key} {}
190Set OSPF authentication key to a cryptographic password. The cryptographic
191algorithm is MD5. KEYID identifies secret key used to create the message
192digest. KEY is the actual message digest key up to 16 chars.
193@end deffn
194
195@deffn {Interface Command} {ip ospf cost <1-65535>} {}
196@deffnx {Interface Command} {no ip ospf cost} {}
197Set link cost for the specified interface. The cost value is set to router-LSA's
198metric field and used for SPF calculation.
199@end deffn
200
201@deffn {Interface Command} {ip ospf dead-interval <1-65535>} {}
202@deffnx {Interface Command} {no ip ospf dead-interval} {}
203Set number of seconds for RouterDeadInterval timer value used for Wait Timer
204and Inactivity Timer. This value must be the same for all routers attached
205to a common network. The default value is 40 seconds.
206@end deffn
207
208@deffn {Interface Command} {ip ospf hello-interval <1-65535>} {}
209@deffnx {Interface Command} {no ip ospf hello-interval} {}
210Set number of seconds for HelloInterval timer value. Setting this value,
211Hello packet will be sent every timer value seconds on the specified interface.
212This value must be the same for all routers attached to a common network.
213The default value is 10 seconds.
214@end deffn
215
216@deffn {Interface Command} {ip ospf network (broadcast|non-broadcast|point-to-multipoint|point-to-point)} {}
217@deffnx {Interface Command} {no ip ospf network} {}
218Set explicitly network type for specifed interface.
219@end deffn
220
221@deffn {Interface Command} {ip ospf priority <0-255>} {}
222@deffnx {Interface Command} {no ip ospf priority} {}
223Set RouterPriority integer value. Setting higher value, router will be more
224eligible to become Designated Router. Setting the value to 0, router is no
225longer eligible to Designated Router.
226The default value is 1.
227@end deffn
228
229@deffn {Interface Command} {ip ospf retransmit-interval <1-65535>} {}
230@deffnx {Interface Command} {no ip ospf retransmit interval} {}
231Set number of seconds for RxmtInterval timer value. This value is used
232when retransmitting Database Description and Link State Request packets.
233The default value is 5 seconds.
234@end deffn
235
236@deffn {Interface Command} {ip ospf transmit-delay} {}
237@deffnx {Interface Command} {no ip ospf transmit-delay} {}
238Set number of seconds for InfTransDelay value. LSAs' age should be
239incremented by this value when transmitting.
240The default value is 1 seconds.
241@end deffn
242
243@node Redistribute routes to OSPF, Showing OSPF information, OSPF interface, OSPFv2
244@comment node-name, next, previous, up
245@section Redistribute routes to OSPF
246
247@deffn {OSPF Command} {redistribute (kernel|connected|static|rip|bgp)} {}
248@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) @var{route-map}} {}
249@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2)} {}
250@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) route-map @var{word}} {}
251@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric <0-16777214>} {}
252@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric <0-16777214> route-map @var{word}} {}
253@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric <0-16777214>} {}
254@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric <0-16777214> route-map @var{word}} {}
255@deffnx {OSPF Command} {no redistribute (kernel|connected|static|rip|bgp)} {}
256@end deffn
257
258@deffn {OSPF Command} {default-information originate} {}
259@deffnx {OSPF Command} {default-information originate metric <0-16777214>} {}
260@deffnx {OSPF Command} {default-information originate metric <0-16777214> metric-type (1|2)} {}
261@deffnx {OSPF Command} {default-information originate metric <0-16777214> metric-type (1|2) route-map @var{word}} {}
262@deffnx {OSPF Command} {default-information originate always} {}
263@deffnx {OSPF Command} {default-information originate always metric <0-16777214>} {}
264@deffnx {OSPF Command} {default-information originate always metric <0-16777214> metric-type (1|2)} {}
265@deffnx {OSPF Command} {default-information originate always metric <0-16777214> metric-type (1|2) route-map @var{word}} {}
266@deffnx {OSPF Command} {no default-information originate} {}
267@end deffn
268
269@deffn {OSPF Command} {distribute-list NAME out (kernel|connected|static|rip|ospf} {}
270@deffnx {OSPF Command} {no distribute-list NAME out (kernel|connected|static|rip|ospf} {}
271@end deffn
272
273@deffn {OSPF Command} {default-metric <0-16777214>} {}
274@deffnx {OSPF Command} {no default-metric} {}
275@end deffn
276
277@deffn {OSPF Command} {distance <1-255>} {}
278@deffnx {OSPF Command} {no distance <1-255>} {}
279@end deffn
280
281@deffn {OSPF Command} {distance ospf (intra-area|inter-area|external) <1-255>} {}
282@deffnx {OSPF Command} {no distance ospf} {}
283@end deffn
284
285@deffn {Command} {router zebra} {}
286@deffnx {Command} {no router zebra} {}
287@end deffn
288
289@node Showing OSPF information, Debugging OSPF, Redistribute routes to OSPF, OSPFv2
290@comment node-name, next, previous, up
291@section Showing OSPF information
292
293@deffn {Command} {show ip ospf} {}
294@end deffn
295
296@deffn {Command} {show ip ospf interface [INTERFACE]} {}
297@end deffn
298
299@deffn {Command} {show ip ospf neighbor} {}
300@deffnx {Command} {show ip ospf neighbor INTERFACE} {}
301@deffnx {Command} {show ip ospf neighbor detail} {}
302@deffnx {Command} {show ip ospf neighbor INTERFACE detail} {}
303@end deffn
304
305@deffn {Command} {show ip ospf database} {}
306@end deffn
307
308@deffn {Command} {show ip ospf database (asbr-summary|external|network|router|summary)} {}
309@deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) @var{link-state-id}} {}
310@deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) @var{link-state-id} adv-router @var{adv-router}} {}
311@deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) adv-router @var{adv-router}} {}
312@deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) @var{link-state-id} self-originate} {}
313@deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) self-originate} {}
314@end deffn
315
316@deffn {Command} {show ip ospf database max-age} {}
317@end deffn
318
319@deffn {Command} {show ip ospf database self-originate} {}
320@end deffn
321
322@deffn {Command} {show ip ospf refresher} {}
323@end deffn
324
325@deffn {Command} {show ip ospf route} {}
326@end deffn
327
328@node Debugging OSPF, , Showing OSPF information, OSPFv2
329@comment node-name, next, previous, up
330@section Debugging OSPF
331
332@deffn {Command} {debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) [detail]} {}
333@deffnx {Command} {no debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) [detail]} {}
334@end deffn
335
336@deffn {Command} {debug ospf ism} {}
337@deffnx {Command} {debug ospf ism (status|events|timers)} {}
338@deffnx {Command} {no debug ospf ism} {}
339@deffnx {Command} {no debug ospf ism (status|events|timers)} {}
340@end deffn
341
342@deffn {Command} {debug ospf nsm} {}
343@deffnx {Command} {debug ospf nsm (status|events|timers)} {}
344@deffnx {Command} {no debug ospf nsm} {}
345@deffnx {Command} {no debug ospf nsm (status|events|timers)} {}
346@end deffn
347
348@deffn {Command} {debug ospf lsa} {}
349@deffnx {Command} {debug ospf lsa (generate|flooding|refresh)} {}
350@deffnx {Command} {no debug ospf lsa} {}
351@deffnx {Command} {no debug ospf lsa (generate|flooding|refresh)} {}
352@end deffn
353
354@deffn {Command} {debug ospf zebra} {}
355@deffnx {Command} {debug ospf zebra (interface|redistribute)} {}
356@deffnx {Command} {no debug ospf zebra} {}
357@deffnx {Command} {no debug ospf zebra (interface|redistribute)} {}
358@end deffn
359
360@deffn {Command} {show debugging ospf} {}
361@end deffn
362