ospfd
*****

ospfd provides an OSPF version 2 routing protocol as described in RFC2328.  OSPF is one of IGPs (Interior Gateway Protocols).  Compared with RIP, OSPF can serve much more networks and period of convergence is very short.  OSPF is widely used in large networks such as ISP backbone and enterprise networks.

Configuring ospfd
=================

There is no ospfd specific options.  Common options can be specified (see Common Invocation Options) to ospfd. ospfd needs interface information from zebra.  So please make it sure zebra is running before invoking ospfd.

Like other daemons, ospfd configuration is done in OSPF specific configuration file ospfd.conf.

OSPF router
===========

To start OSPF process you have to specify the OSPF router.  As of this writing, ospfd does not support multiple OSPF processes.

 -- Command: router ospf
 -- Command: no router ospf
     Enable or disable the OSPF process.  ospfd does not yet support multiple OSPF processes.  So you can not specify an OSPF process number.

 -- OSPF Command: ospf router-id A.B.C.D
 -- OSPF Command: no ospf router-id

 -- OSPF Command: ospf abr-type TYPE
 -- OSPF Command: no ospf abr-type TYPE
     TYPE can be cisco|ibm|shortcut|standard

 -- OSPF Command: ospf rfc1583compatibility
 -- OSPF Command: no ospf rfc1583compatibility

 -- OSPF Command: passive interface INTERFACE
 -- OSPF Command: no passive interface INTERFACE

 -- OSPF Command: timers spf <0-4294967295> <0-4294967295>
 -- OSPF Command: no timers spf

 -- OSPF Command: refresh group-limit <0-10000>
 -- OSPF Command: refresh per-slice <0-10000>
 -- OSPF Command: refresh age-diff <0-10000>

 -- OSPF Command: auto-cost refrence-bandwidth <1-4294967>
 -- OSPF Command: no auto-cost refrence-bandwidth

 -- OSPF Command: network A.B.C.D/M area A.B.C.D
 -- OSPF Command: network A.B.C.D/M area <0-4294967295>
 -- OSPF Command: no network A.B.C.D/M area A.B.C.D
 -- OSPF Command: no network A.B.C.D/M area <0-4294967295>
     This command specifies the OSPF enabled interface.  If the interface has an address of 10.0.0.1/8 then the command below provides network information to the ospf routers

          router ospf
           network 10.0.0.0/8 area 0

     the network command's mask length should be the same as the interface address's mask.

OSPF area
=========

 -- OSPF Command: area A.B.C.D range A.B.C.D/M
 -- OSPF Command: area <0-4294967295> range A.B.C.D/M
 -- OSPF Command: no area A.B.C.D range A.B.C.D/M
 -- OSPF Command: no area <0-4294967295> range A.B.C.D/M

 -- OSPF Command: area A.B.C.D range IPV4_PREFIX suppress
 -- OSPF Command: no area A.B.C.D range IPV4_PREFIX suppress
 -- OSPF Command: area A.B.C.D range IPV4_PREFIX substitute IPV4_PREFIX
 -- OSPF Command: no area A.B.C.D range IPV4_PREFIX substitute IPV4_PREFIX

 -- OSPF Command: area A.B.C.D virtual-link A.B.C.D
 -- OSPF Command: area <0-4294967295> virtual-link A.B.C.D
 -- OSPF Command: no area A.B.C.D virtual-link A.B.C.D
 -- OSPF Command: no area <0-4294967295> virtual-link A.B.C.D

 -- OSPF Command: area A.B.C.D shortcut
 -- OSPF Command: area <0-4294967295> shortcut
 -- OSPF Command: no area A.B.C.D shortcut
 -- OSPF Command: no area <0-4294967295> shortcut

 -- OSPF Command: area A.B.C.D stub
 -- OSPF Command: area <0-4294967295> stub
 -- OSPF Command: no area A.B.C.D stub
 -- OSPF Command: no area <0-4294967295> stub

 -- OSPF Command: area A.B.C.D stub no-summary
 -- OSPF Command: area <0-4294967295> stub no-summary
 -- OSPF Command: no area A.B.C.D stub no-summary
 -- OSPF Command: no area <0-4294967295> stub no-summary

 -- OSPF Command: area A.B.C.D default-cost <0-16777215>
 -- OSPF Command: no area A.B.C.D default-cost <0-16777215>

 -- OSPF Command: area A.B.C.D export-list NAME
 -- OSPF Command: area <0-4294967295> export-list NAME
 -- OSPF Command: no area A.B.C.D export-list NAME
 -- OSPF Command: no area <0-4294967295> export-list NAME

 -- OSPF Command: area A.B.C.D import-list NAME
 -- OSPF Command: area <0-4294967295> import-list NAME
 -- OSPF Command: no area A.B.C.D import-list NAME
 -- OSPF Command: no area <0-4294967295> import-list NAME

 -- OSPF Command: area A.B.C.D authentication
 -- OSPF Command: area <0-4294967295> authentication
 -- OSPF Command: no area A.B.C.D authentication
 -- OSPF Command: no area <0-4294967295> authentication

 -- OSPF Command: area A.B.C.D authentication message-digest
 -- OSPF Command: area <0-4294967295> authentication message-digest

OSPF interface
==============

 -- Interface Command: ip ospf authentication-key AUTH_KEY
 -- Interface Command: no ip ospf authentication-key
     Set OSPF authentication key to a simple password.  After setting AUTH_KEY, all OSPF packets are authenticated. AUTH_KEY has length up to 8 chars.

 -- Interface Command: ip ospf message-digest-key KEYID md5 KEY
 -- 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.

 -- Interface Command: ip ospf cost <1-65535>
 -- 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.

 -- Interface Command: ip ospf dead-interval <1-65535>
 -- 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.

 -- Interface Command: ip ospf hello-interval <1-65535>
 -- 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.

 -- Interface Command: ip ospf network (broadcast|non-broadcast|point-to-multipoint|point-to-point)
 -- Interface Command: no ip ospf network
     Set explicitly network type for specifed interface.

 -- Interface Command: ip ospf priority <0-255>
 -- 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.

 -- Interface Command: ip ospf retransmit-interval <1-65535>
 -- 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.

 -- Interface Command: ip ospf transmit-delay
 -- 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.

Redistribute routes to OSPF
===========================

 -- OSPF Command: redistribute (kernel|connected|static|rip|bgp)
 -- OSPF Command: redistribute (kernel|connected|static|rip|bgp) ROUTE-MAP
 -- OSPF Command: redistribute (kernel|connected|static|rip|bgp) metric-type (1|2)
 -- OSPF Command: redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) route-map WORD
 -- OSPF Command: redistribute (kernel|connected|static|rip|bgp) metric <0-16777214>
 -- OSPF Command: redistribute (kernel|connected|static|rip|bgp) metric <0-16777214> route-map WORD
 -- OSPF Command: redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric <0-16777214>
 -- OSPF Command: redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric <0-16777214> route-map WORD
 -- OSPF Command: no redistribute (kernel|connected|static|rip|bgp)

 -- OSPF Command: default-information originate
 -- OSPF Command: default-information originate metric <0-16777214>
 -- OSPF Command: default-information originate metric <0-16777214> metric-type (1|2)
 -- OSPF Command: default-information originate metric <0-16777214> metric-type (1|2) route-map WORD
 -- OSPF Command: default-information originate always
 -- OSPF Command: default-information originate always metric <0-16777214>
 -- OSPF Command: default-information originate always metric <0-16777214> metric-type (1|2)
 -- OSPF Command: default-information originate always metric <0-16777214> metric-type (1|2) route-map WORD
 -- OSPF Command: no default-information originate

 -- OSPF Command: distribute-list NAME out (kernel|connected|static|rip|ospf
 -- OSPF Command: no distribute-list NAME out (kernel|connected|static|rip|ospf

 -- OSPF Command: default-metric <0-16777214>
 -- OSPF Command: no default-metric

 -- OSPF Command: distance <1-255>
 -- OSPF Command: no distance <1-255>

 -- OSPF Command: distance ospf (intra-area|inter-area|external) <1-255>
 -- OSPF Command: no distance ospf

 -- Command: router zebra
 -- Command: no router zebra

Showing OSPF information
========================

 -- Command: show ip ospf

 -- Command: show ip ospf interface [INTERFACE]

 -- Command: show ip ospf neighbor
 -- Command: show ip ospf neighbor INTERFACE
 -- Command: show ip ospf neighbor detail
 -- Command: show ip ospf neighbor INTERFACE detail

 -- Command: show ip ospf database

 -- Command: show ip ospf database (asbr-summary|external|network|router|summary)
 -- Command: show ip ospf database (asbr-summary|external|network|router|summary) LINK-STATE-ID
 -- Command: show ip ospf database (asbr-summary|external|network|router|summary) LINK-STATE-ID adv-router ADV-ROUTER
 -- Command: show ip ospf database (asbr-summary|external|network|router|summary) adv-router ADV-ROUTER
 -- Command: show ip ospf database (asbr-summary|external|network|router|summary) LINK-STATE-ID self-originate
 -- Command: show ip ospf database (asbr-summary|external|network|router|summary) self-originate

 -- Command: show ip ospf database max-age

 -- Command: show ip ospf database self-originate

 -- Command: show ip ospf refresher

 -- Command: show ip ospf route

Debugging OSPF
==============

 -- Command: debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) [detail]
 -- Command: no debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) [detail]

 -- Command: debug ospf ism
 -- Command: debug ospf ism (status|events|timers)
 -- Command: no debug ospf ism
 -- Command: no debug ospf ism (status|events|timers)

 -- Command: debug ospf nsm
 -- Command: debug ospf nsm (status|events|timers)
 -- Command: no debug ospf nsm
 -- Command: no debug ospf nsm (status|events|timers)

 -- Command: debug ospf lsa
 -- Command: debug ospf lsa (generate|flooding|refresh)
 -- Command: no debug ospf lsa
 -- Command: no debug ospf lsa (generate|flooding|refresh)

 -- Command: debug ospf zebra
 -- Command: debug ospf zebra (interface|redistribute)
 -- Command: no debug ospf zebra
 -- Command: no debug ospf zebra (interface|redistribute)

 -- Command: show debugging ospf