@node OSPFv2, OSPFv3, RIPng, Top @comment node-name, next, previous, up @chapter OSPFv2 OSPF version 2 is a routing protocol which described in @asis{RFC2328} - @cite{OSPF Version 2}. OSPF is IGP (Interior Gateway Protocols). Compared with RIP, OSPF can provide scalable network support and faster convergence time. OSPF is widely used in large networks such as ISP backbone and enterprise networks. @menu * Configuring ospfd:: * OSPF router:: * OSPF area:: * OSPF interface:: * Redistribute routes to OSPF:: * Showing OSPF information:: * Debugging OSPF:: @end menu @node Configuring ospfd, OSPF router, OSPFv2, OSPFv2 @comment node-name, next, previous, up @section Configuring ospfd There is no @command{ospfd} specific options. Common options can be specified (@pxref{Common Invocation Options}) to @command{ospfd}. @command{ospfd} needs interface information from @command{zebra}. So please make it sure @command{zebra} is running before invoking @command{ospfd}. Like other daemons, @command{ospfd} configuration is done in OSPF specific configuration file @file{ospfd.conf}. @node OSPF router, OSPF area, Configuring ospfd, OSPFv2 @comment node-name, next, previous, up @section OSPF router To start OSPF process you have to specify the OSPF router. As of this writing, @command{ospfd} does not support multiple OSPF processes. @deffn Command {router ospf} {} @deffnx Command {no router ospf} {} Enable or disable the OSPF process. @command{ospfd} does not yet support multiple OSPF processes. So you can not specify an OSPF process number. @end deffn @deffn {OSPF Command} {ospf router-id @var{a.b.c.d}} {} @deffnx {OSPF Command} {no ospf router-id} {} @end deffn @deffn {OSPF Command} {ospf abr-type @var{type}} {} @deffnx {OSPF Command} {no ospf abr-type @var{type}} {} @var{type} can be cisco|ibm|shortcut|standard More information regarding the behaviour controlled by this command can be found in draft-ietf-ospf-abr-alt-05.txt and draft-ietf-ospf-shortcut-abr-02.txt Quote: "Though the definition of the Area Border Router (ABR) in the OSPF specification does not require a router with multiple attached areas to have a backbone connection, it is actually necessary to provide successful routing to the inter-area and external destinations. If this requirement is not met, all traffic destined for the areas not connected to such an ABR or out of the OSPF domain, is dropped. This document describes alternative ABR behaviors implemented in Cisco and IBM routers." @end deffn @deffn {OSPF Command} {ospf rfc1583compatibility} {} @deffnx {OSPF Command} {no ospf rfc1583compatibility} {} This rfc2328, the sucessor to rfc1583, suggests according to section G.2 (changes) in section 16.4 a change to the path preference algorithm that prevents possible routing loops that were possible in the old version of OSPFv2. More specifically it demands that inter-area paths and intra-area path are now of equal preference but still both preferred to external paths. @end deffn @deffn {OSPF Command} {passive interface @var{interface}} {} @deffnx {OSPF Command} {no passive interface @var{interface}} {} @end deffn @deffn {OSPF Command} {timers spf <0-4294967295> <0-4294967295>} {} @deffnx {OSPF Command} {no timers spf} {} @end deffn @deffn {OSPF Command} {refresh group-limit <0-10000>} {} @deffnx {OSPF Command} {refresh per-slice <0-10000>} {} @deffnx {OSPF Command} {refresh age-diff <0-10000>} {} @end deffn @deffn {OSPF Command} {auto-cost refrence-bandwidth <1-4294967>} {} @deffnx {OSPF Command} {no auto-cost refrence-bandwidth} {} @end deffn @deffn {OSPF Command} {network @var{a.b.c.d/m} area @var{a.b.c.d}} {} @deffnx {OSPF Command} {network @var{a.b.c.d/m} area @var{<0-4294967295>}} {} @deffnx {OSPF Command} {no network @var{a.b.c.d/m} area @var{a.b.c.d}} {} @deffnx {OSPF Command} {no network @var{a.b.c.d/m} area @var{<0-4294967295>}} {} This command specifies the OSPF enabled interface(s). If the interface has an address from range 192.168.1.0/24 then the command below enables ospf on this interface so router can provide network information to the other ospf routers via this interface. @example @group router ospf network 192.168.1.0/24 area 0.0.0.0 @end group @end example Prefix length in interface must be equal or bigger (ie. smaller network) than prefix length in network statement. For example statement above doesn't enable ospf on interface with address 192.168.1.1/23, but it does on interface with address 192.168.1.129/25. @end deffn @node OSPF area, OSPF interface, OSPF router, OSPFv2 @comment node-name, next, previous, up @section OSPF area @deffn {OSPF Command} {area @var{a.b.c.d} range @var{a.b.c.d/m}} {} @deffnx {OSPF Command} {area <0-4294967295> range @var{a.b.c.d/m}} {} @deffnx {OSPF Command} {no area @var{a.b.c.d} range @var{a.b.c.d/m}} {} @deffnx {OSPF Command} {no area <0-4294967295> range @var{a.b.c.d/m}} {} Summarize intra area paths from specified area into one Type-3 summary-LSA announced to other areas. This command can be used only in ABR and ONLY router-LSAs (Type-1) and network-LSAs (Type-2) (ie. LSAs with scope area) can be summarized. Type-5 AS-external-LSAs can't be summarized - their scope is AS. Summarizing Type-7 AS-external-LSAs isn't supported yet by Quagga. @example @group router ospf network 192.168.1.0/24 area 0.0.0.0 network 10.0.0.0/8 area 0.0.0.10 area 0.0.0.10 range 10.0.0.0/8 @end group @end example With configuration above one Type-3 Summary-LSA with routing info 10.0.0.0/8 is announced into backbone area if area 0.0.0.10 contains at least one intra-area network (ie. described with router or network LSA) from this range. @end deffn @deffn {OSPF Command} {area @var{a.b.c.d} range IPV4_PREFIX not-advertise} {} @deffnx {OSPF Command} {no area @var{a.b.c.d} range IPV4_PREFIX not-advertise} {} Instead of summarizing intra area paths filter them - ie. intra area paths from this range are not advertised into other areas. This command makes sense in ABR only. @end deffn @deffnx {OSPF Command} {area @var{a.b.c.d} range IPV4_PREFIX substitute IPV4_PREFIX} {} @deffnx {OSPF Command} {no area @var{a.b.c.d} range IPV4_PREFIX substitute IPV4_PREFIX} {} Substitute summarized prefix with another prefix. @example @group router ospf network 192.168.1.0/24 area 0.0.0.0 network 10.0.0.0/8 area 0.0.0.10 area 0.0.0.10 range 10.0.0.0/8 substitute 11.0.0.0/8 @end group @end example One Type-3 summary-LSA with routing info 11.0.0.0/8 is announced into backbone area if area 0.0.0.10 contains at least one intra-area network (ie. described with router-LSA or network-LSA) from range 10.0.0.0/8. This command makes sense in ABR only. @end deffn @deffn {OSPF Command} {area @var{a.b.c.d} virtual-link @var{a.b.c.d}} {} @deffnx {OSPF Command} {area <0-4294967295> virtual-link @var{a.b.c.d}} {} @deffnx {OSPF Command} {no area @var{a.b.c.d} virtual-link @var{a.b.c.d}} {} @deffnx {OSPF Command} {no area <0-4294967295> virtual-link @var{a.b.c.d}} {} @end deffn @deffn {OSPF Command} {area @var{a.b.c.d} shortcut} {} @deffnx {OSPF Command} {area <0-4294967295> shortcut} {} @deffnx {OSPF Command} {no area @var{a.b.c.d} shortcut} {} @deffnx {OSPF Command} {no area <0-4294967295> shortcut} {} @end deffn @deffn {OSPF Command} {area @var{a.b.c.d} stub} {} @deffnx {OSPF Command} {area <0-4294967295> stub} {} @deffnx {OSPF Command} {no area @var{a.b.c.d} stub} {} @deffnx {OSPF Command} {no area <0-4294967295> stub} {} @end deffn @deffn {OSPF Command} {area @var{a.b.c.d} stub no-summary} {} @deffnx {OSPF Command} {area <0-4294967295> stub no-summary} {} @deffnx {OSPF Command} {no area @var{a.b.c.d} stub no-summary} {} @deffnx {OSPF Command} {no area <0-4294967295> stub no-summary} {} @end deffn @deffn {OSPF Command} {area @var{a.b.c.d} default-cost <0-16777215>} {} @deffnx {OSPF Command} {no area @var{a.b.c.d} default-cost <0-16777215>} {} @end deffn @deffn {OSPF Command} {area @var{a.b.c.d} export-list NAME} {} @deffnx {OSPF Command} {area <0-4294967295> export-list NAME} {} @deffnx {OSPF Command} {no area @var{a.b.c.d} export-list NAME} {} @deffnx {OSPF Command} {no area <0-4294967295> export-list NAME} {} Filter Type-3 summary-LSAs announced to other areas originated from intra- area paths from specified area. @example @group router ospf network 192.168.1.0/24 area 0.0.0.0 network 10.0.0.0/8 area 0.0.0.10 area 0.0.0.10 export-list foo ! access-list foo permit 10.10.0.0/16 access-list foo deny any @end group @end example With example above any intra-area paths from area 0.0.0.10 and from range 10.10.0.0/16 (for example 10.10.1.0/24 and 10.10.2.128/30) are announced into other areas as Type-3 summary-LSA's, but any others (for example 10.11.0.0/16 or 10.128.30.16/30) aren't. This command makes sense in ABR only. @end deffn @deffn {OSPF Command} {area @var{a.b.c.d} import-list NAME} {} @deffnx {OSPF Command} {area <0-4294967295> import-list NAME} {} @deffnx {OSPF Command} {no area @var{a.b.c.d} import-list NAME} {} @deffnx {OSPF Command} {no area <0-4294967295> import-list NAME} {} Same as export-list, but it applies to paths announced into specified area as Type-3 summary-LSAs. @end deffn @deffn {OSPF Command} {area @var{a.b.c.d} filter-list prefix NAME in} {} @deffnx {OSPF Command} {area @var{a.b.c.d} filter-list prefix NAME out} {} @deffnx {OSPF Command} {area <0-4294967295> filter-list prefix NAME in} {} @deffnx {OSPF Command} {area <0-4294967295> filter-list prefix NAME out} {} @deffnx {OSPF Command} {no area @var{a.b.c.d} filter-list prefix NAME in} {} @deffnx {OSPF Command} {no area @var{a.b.c.d} filter-list prefix NAME out} {} @deffnx {OSPF Command} {no area <0-4294967295> filter-list prefix NAME in} {} @deffnx {OSPF Command} {no area <0-4294967295> filter-list prefix NAME out} {} Filtering Type-3 summary-LSAs to/from area using prefix lists. This command makes sense in ABR only. @end deffn @deffn {OSPF Command} {area @var{a.b.c.d} authentication} {} @deffnx {OSPF Command} {area <0-4294967295> authentication} {} @deffnx {OSPF Command} {no area @var{a.b.c.d} authentication} {} @deffnx {OSPF Command} {no area <0-4294967295> authentication} {} @end deffn @deffn {OSPF Command} {area @var{a.b.c.d} authentication message-digest} {} @deffnx {OSPF Command} {area <0-4294967295> authentication message-digest} {} @end deffn @node OSPF interface, Redistribute routes to OSPF, OSPF area, OSPFv2 @comment node-name, next, previous, up @section OSPF interface @deffn {Interface Command} {ip ospf authentication-key AUTH_KEY} {} @deffnx {Interface Command} {no ip ospf authentication-key} {} Set OSPF authentication key to a simple password. After setting @var{AUTH_KEY}, all OSPF packets are authenticated. @var{AUTH_KEY} has length up to 8 chars. @end deffn @deffn {Interface Command} {ip ospf message-digest-key KEYID md5 KEY} {} @deffnx {Interface Command} {no ip ospf message-digest-key} {} Set OSPF authentication key to a cryptographic password. The cryptographic algorithm is MD5. KEYID identifies secret key used to create the message digest. KEY is the actual message digest key up to 16 chars. @end deffn @deffn {Interface Command} {ip ospf cost <1-65535>} {} @deffnx {Interface Command} {no ip ospf cost} {} Set link cost for the specified interface. The cost value is set to router-LSA's metric field and used for SPF calculation. @end deffn @deffn {Interface Command} {ip ospf dead-interval <1-65535>} {} @deffnx {Interface Command} {no ip ospf dead-interval} {} Set number of seconds for RouterDeadInterval timer value used for Wait Timer and Inactivity Timer. This value must be the same for all routers attached to a common network. The default value is 40 seconds. @end deffn @deffn {Interface Command} {ip ospf hello-interval <1-65535>} {} @deffnx {Interface Command} {no ip ospf hello-interval} {} Set number of seconds for HelloInterval timer value. Setting this value, Hello packet will be sent every timer value seconds on the specified interface. This value must be the same for all routers attached to a common network. The default value is 10 seconds. @end deffn @deffn {Interface Command} {ip ospf network (broadcast|non-broadcast|point-to-multipoint|point-to-point)} {} @deffnx {Interface Command} {no ip ospf network} {} Set explicitly network type for specifed interface. @end deffn @deffn {Interface Command} {ip ospf priority <0-255>} {} @deffnx {Interface Command} {no ip ospf priority} {} Set RouterPriority integer value. Setting higher value, router will be more eligible to become Designated Router. Setting the value to 0, router is no longer eligible to Designated Router. The default value is 1. @end deffn @deffn {Interface Command} {ip ospf retransmit-interval <1-65535>} {} @deffnx {Interface Command} {no ip ospf retransmit interval} {} Set number of seconds for RxmtInterval timer value. This value is used when retransmitting Database Description and Link State Request packets. The default value is 5 seconds. @end deffn @deffn {Interface Command} {ip ospf transmit-delay} {} @deffnx {Interface Command} {no ip ospf transmit-delay} {} Set number of seconds for InfTransDelay value. LSAs' age should be incremented by this value when transmitting. The default value is 1 seconds. @end deffn @node Redistribute routes to OSPF, Showing OSPF information, OSPF interface, OSPFv2 @comment node-name, next, previous, up @section Redistribute routes to OSPF @deffn {OSPF Command} {redistribute (kernel|connected|static|rip|bgp)} {} @deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) @var{route-map}} {} @deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2)} {} @deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) route-map @var{word}} {} @deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric <0-16777214>} {} @deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric <0-16777214> route-map @var{word}} {} @deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric <0-16777214>} {} @deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric <0-16777214> route-map @var{word}} {} @deffnx {OSPF Command} {no redistribute (kernel|connected|static|rip|bgp)} {} @end deffn @deffn {OSPF Command} {default-information originate} {} @deffnx {OSPF Command} {default-information originate metric <0-16777214>} {} @deffnx {OSPF Command} {default-information originate metric <0-16777214> metric-type (1|2)} {} @deffnx {OSPF Command} {default-information originate metric <0-16777214> metric-type (1|2) route-map @var{word}} {} @deffnx {OSPF Command} {default-information originate always} {} @deffnx {OSPF Command} {default-information originate always metric <0-16777214>} {} @deffnx {OSPF Command} {default-information originate always metric <0-16777214> metric-type (1|2)} {} @deffnx {OSPF Command} {default-information originate always metric <0-16777214> metric-type (1|2) route-map @var{word}} {} @deffnx {OSPF Command} {no default-information originate} {} @end deffn @deffn {OSPF Command} {distribute-list NAME out (kernel|connected|static|rip|ospf} {} @deffnx {OSPF Command} {no distribute-list NAME out (kernel|connected|static|rip|ospf} {} @end deffn @deffn {OSPF Command} {default-metric <0-16777214>} {} @deffnx {OSPF Command} {no default-metric} {} @end deffn @deffn {OSPF Command} {distance <1-255>} {} @deffnx {OSPF Command} {no distance <1-255>} {} @end deffn @deffn {OSPF Command} {distance ospf (intra-area|inter-area|external) <1-255>} {} @deffnx {OSPF Command} {no distance ospf} {} @end deffn @deffn {Command} {router zebra} {} @deffnx {Command} {no router zebra} {} @end deffn @node Showing OSPF information, Debugging OSPF, Redistribute routes to OSPF, OSPFv2 @comment node-name, next, previous, up @section Showing OSPF information @deffn {Command} {show ip ospf} {} @end deffn @deffn {Command} {show ip ospf interface [INTERFACE]} {} @end deffn @deffn {Command} {show ip ospf neighbor} {} @deffnx {Command} {show ip ospf neighbor INTERFACE} {} @deffnx {Command} {show ip ospf neighbor detail} {} @deffnx {Command} {show ip ospf neighbor INTERFACE detail} {} @end deffn @deffn {Command} {show ip ospf database} {} @end deffn @deffn {Command} {show ip ospf database (asbr-summary|external|network|router|summary)} {} @deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) @var{link-state-id}} {} @deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) @var{link-state-id} adv-router @var{adv-router}} {} @deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) adv-router @var{adv-router}} {} @deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) @var{link-state-id} self-originate} {} @deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) self-originate} {} @end deffn @deffn {Command} {show ip ospf database max-age} {} @end deffn @deffn {Command} {show ip ospf database self-originate} {} @end deffn @deffn {Command} {show ip ospf refresher} {} @end deffn @deffn {Command} {show ip ospf route} {} @end deffn @node Debugging OSPF, , Showing OSPF information, OSPFv2 @comment node-name, next, previous, up @section Debugging OSPF @deffn {Command} {debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) [detail]} {} @deffnx {Command} {no debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) [detail]} {} @end deffn @deffn {Command} {debug ospf ism} {} @deffnx {Command} {debug ospf ism (status|events|timers)} {} @deffnx {Command} {no debug ospf ism} {} @deffnx {Command} {no debug ospf ism (status|events|timers)} {} @end deffn @deffn {Command} {debug ospf nsm} {} @deffnx {Command} {debug ospf nsm (status|events|timers)} {} @deffnx {Command} {no debug ospf nsm} {} @deffnx {Command} {no debug ospf nsm (status|events|timers)} {} @end deffn @deffn {Command} {debug ospf lsa} {} @deffnx {Command} {debug ospf lsa (generate|flooding|refresh)} {} @deffnx {Command} {no debug ospf lsa} {} @deffnx {Command} {no debug ospf lsa (generate|flooding|refresh)} {} @end deffn @deffn {Command} {debug ospf zebra} {} @deffnx {Command} {debug ospf zebra (interface|redistribute)} {} @deffnx {Command} {no debug ospf zebra} {} @deffnx {Command} {no debug ospf zebra (interface|redistribute)} {} @end deffn @deffn {Command} {show debugging ospf} {} @end deffn