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