Hello Quagga-Dev,

Please find a write-up for this feature, location of the code, and attached
are some real outputs from the running code. Hope this will be useful to the
members of the community interested in this feature.

I will certainly appreciate any feedback that you might have.

Regards,
Vipin

Multi-Instance OSPF
--------------------------

1. Requirement/Goal

    Functional :
        - Completely isolated OSPF instances, Each instance and its
information be tracked by an instance-id.
        - Checks at the configuration time to make sure each instance runs
on a mutually exclusive set of interfaces
        - Routes from all the instances still installed into the same table
in RIB/Zebra.
        - Protocols should be able to redistribute routes from one or more
of OSPF instances.
        - To add to this, even an OSPF instance should be able redistribute
routes from other instance(s).

     Implementation specific:

        - In order to reduce any regressions, least changes to the
protocol/functional parts of OSPF code.
        - Fault-isolation per instance, per instance watchquagga monitoring
and re-startability.
        - access to OSPF instance(s) via vtysh CLI pretty much the same way
as for the non-instanced (previous way) bring up.

2. Approach

To achieve these, the approach taken keeps most of the Quagga semantics 'as
is' for an instanced OSPF bring-up.
The easiest way to understand is to think of an OSPF instance as just
another quagga daemon that knows its instance-id.

Starting instruction point for an instanced daemon config is
/etc/quagga/deamons file, just like its for any daemon that user wants in
quagga.
Instead of vtysh statically looking for just one ospfd, it now has
intelligence to connect to any instanced ospfd(s). For that, it reads the
/var/run/quagga/ directory to work with any created ospfd-<instance-id>.vty
files to figure out the instance-id(s) and then come up with the
domain-socket-path(s) to connect to the instanced ospf daemons.

Wherever possible, a corresponding file for an instance is suffixed by
Œ-<instance-id>¹ . For examples, if an OSPF instance with instance id 1 was
created, then this is how files names will be ‹ ospfd-1.pid, ospfd-1.vty,
ospfd-1.conf, ..
For debug outputs and show commands, where instance specification is needed,
its done using [..], for example ‹ ospf[1]

Note:
  For obvious benefits in implementation, instance-id is taken as a ushort
integer. 

3. Implementation Summary
‹‹‹‹‹‹‹‹‹‹‹‹‹‹-----

- etc/init.d/quagga is modified to support creating separate ospf daemon
  process for each instance. Each individual instance is monitored by
  watchquagga just like any protocol daemons.
  (for Debian, we have created initd-mi.patch)

- Vtysh is modified to able to connect to multiple daemons of the same
  protocol (supported for OSPF only for now).

- ospfd is modified to remember the Instance-ID that its invoked with. For
  the entire life of the process it caters to any command request that
  matches that instance-ID (unless its a non instance specific command).
  Routes/messages to zebra are tagged with instance-ID.

- zebra route/redistribute mechanisms are modified to work with
  [protocol type + instance-id]

- bgpd now has ability to have multiple instance specific redistribution
  for a protocol (OSPF only supported/tested for now).

- ospfd now has ability to have multiple instance specific redistribution
  from other OSPF instances.
  
- zlog ability to display instance-id besides the protocol/daemon name.

- Changes in other daemons are because of the needed integration with
  some of the modified APIs/routines. (Didn¹t prefer replicating too many
  separate instance specific APIs.)

- config/show/debug commands are modified to take instance-id argument
  as appropriate.

4. Guidelines to start using multi-instance ospf
---------------------------------------------

The patch is backward compatible, i.e for any previous way of single ospf
deamon(router ospf <cr>) will continue to work as is, including all the
show commands etc.
To enable multiple instances, do the following:

     1. service quagga stop
     2. Modify /etc/quagga/daemons to add instance-ids of each desired
        instance in the following format:
        ospfd=³yes"
        ospfd_instances="1,2,3"
        assuming you want to enable 3 instances with those instance ids.
     3. Create corresponding ospfd config files as ospfd-1.conf,
ospfd-2.conf
        and ospfd-3.conf.
     4. service quagga start/restart
     5. Verify that the deamons are started as expected. You should see
        ospfd started with -n <instance-id> option.
        ps ­ef | grep quagga
        With that /var/run/quagga/ should have ospfd-<instance-id>.pid and
        ospfd-<instance-id>.vty to each instance.
     6. Use vtysh to work with instances as you would with any other
daemons.
          For any command, if instance-id argument is given it will be
responded
          only by the daemon corresponding to that instance.
    
NOTE:
     To safeguard against errors leading to too many processes getting
invoked,
     a hard limit on number of instance-ids is in place.
     Allowed instance-id range is <1-65535>
     Instance-id can not be changed via vtysh, other router ospf
configuration
     is allowed as before.

We have a patch for debian init.d/quagga, for the instanced OSPF invocation.
(Initd-mi.patch by Dinesh Dutt)

The main ospfd-mi.patch can be referred to at this tree. There are a couple
of more fixes to be merged.

https://github.com/CumulusNetworks/quagga/commit/90960d7656903648c66e301608b
e92c3dbce3beb

diffstat patches/quagga/ospfd-mi.patch

 babeld/babel_main.c       |    2
 babeld/babel_zebra.c      |   10
 babeld/babeld.c           |    3
 bgpd/bgp_main.c           |    2
 bgpd/bgp_route.c          |   47 -
 bgpd/bgp_route.h          |    9
 bgpd/bgp_routemap.c       |   41
 bgpd/bgp_vty.c            |  270 +++++-
 bgpd/bgp_zebra.c          |  182 ++--
 bgpd/bgp_zebra.h          |   12
 bgpd/bgpd.c               |    2
 bgpd/bgpd.h               |   21
 isisd/isis_main.c         |    2
 isisd/isis_zebra.c        |   17
 lib/log.c                 |   15
 lib/log.h                 |    3
 lib/routemap.c            |    6
 lib/zclient.c             |   96 +-
 lib/zclient.h             |   24
 ospf6d/ospf6_main.c       |    2
 ospf6d/ospf6_zebra.c      |   38
 ospf6d/ospf6_zebra.h      |    2
 ospfd/ospf_asbr.c         |   50 -
 ospfd/ospf_asbr.h         |   12
 ospfd/ospf_dump.c         |  979 +++++++++++++++++----
 ospfd/ospf_flood.c        |   40
 ospfd/ospf_lsa.c          |   95 +-
 ospfd/ospf_lsa.h          |    6
 ospfd/ospf_main.c         |   44
 ospfd/ospf_nsm.c          |   16
 ospfd/ospf_opaque.c       |    6
 ospfd/ospf_packet.c       |    2
 ospfd/ospf_routemap.c     |   62 -
 ospfd/ospf_te.c           |   12
 ospfd/ospf_vty.c          | 2066
++++++++++++++++++++++++++++++++++++++--------
 ospfd/ospf_zebra.c        |  360 +++++---
 ospfd/ospf_zebra.h        |   21
 ospfd/ospfd.c             |   97 +-
 ospfd/ospfd.h             |   57 -
 ripd/rip_main.c           |    2
 ripd/rip_zebra.c          |   40
 ripngd/ripng_main.c       |    2
 ripngd/ripng_zebra.c      |   40
 tests/test-sig.c          |    2
 vtysh/extract.pl.in       |    2
 vtysh/vtysh.c             |  198 ++++
 watchquagga/watchquagga.c |    2
 zebra/connected.c         |   12
 zebra/kernel_socket.c     |   12
 zebra/main.c              |    2
 zebra/redistribute.c      |   36
 zebra/rib.h               |   13
 zebra/rt_netlink.c        |   12
 zebra/rtread_getmsg.c     |    2
 zebra/rtread_proc.c       |    2
 zebra/test_main.c         |    2
 zebra/zebra_rib.c         |   39
 zebra/zebra_vty.c         |   51 +
 zebra/zserv.c             |   67 -
 zebra/zserv.h             |    4
 60 files changed, 4151 insertions(+), 1122 deletions(-)




root@rtr:~# cat /etc/quagga/daemons

zebra=yes
bgpd=yes
ospfd=yes
ospfd_instances="1 2 3 4 5"
root@rtr:~# ls /etc/quagga/
Quagga.conf      bgpd.conf  debian.conf   ospfd-2.conf  ospfd-4.conf  vtysh.conf
Quagga.conf.sav  daemons    ospfd-1.conf  ospfd-3.conf  ospfd-5.conf  zebra.conf
root@rtr:~# ls /var/run/quagga/
bgpd.pid     ospfd-1.vty  ospfd-3.pid  ospfd-4.vty  watchquagga.pid  zserv.api
bgpd.vty     ospfd-2.pid  ospfd-3.vty  ospfd-5.pid  zebra.pid
ospfd-1.pid  ospfd-2.vty  ospfd-4.pid  ospfd-5.vty  zebra.vty
root@rtr:~# ps -ef | grep ospf
quagga    3475     1  0 03:47 ?        00:00:06 /usr/lib/quagga/ospfd --daemon 
-A 127.0.0.1 -n 1
quagga    3498     1  0 03:47 ?        00:00:06 /usr/lib/quagga/ospfd --daemon 
-A 127.0.0.1 -n 2
quagga    3521     1  0 03:47 ?        00:00:06 /usr/lib/quagga/ospfd --daemon 
-A 127.0.0.1 -n 3
quagga    3544     1  0 03:47 ?        00:00:06 /usr/lib/quagga/ospfd --daemon 
-A 127.0.0.1 -n 4
quagga    3567     1  0 03:47 ?        00:00:09 /usr/lib/quagga/ospfd --daemon 
-A 127.0.0.1 -n 5
root      3592     1  0 03:47 ?        00:00:01 /usr/lib/quagga/watchquagga 
-adz -r /usr/sbin/servicebBquaggabBrestartbB%s -s 
/usr/sbin/servicebBquaggabBstartbB%s -k /usr/sbin/servicebBquaggabBstopbB%s -b 
bB -t 30 zebra bgpd ospfd-1 ospfd-2 ospfd-3 ospfd-4 ospfd-5
root     18719 18060  0 07:27 pts/1    00:00:00 grep ospf
root@rtr:~#


interface swp1
 description swp1 -> n2's swp1
 ip ospf 1 area 0.0.0.0
 ip ospf dead-interval 3
 ip ospf hello-interval 1
 ipv6 nd suppress-ra
 link-detect
!
interface swp2
 description swp2 -> n2's swp2
 ip ospf 2 area 0.0.0.0
 ip ospf dead-interval 3
 ip ospf hello-interval 1
 ipv6 nd suppress-ra
 link-detect
!
interface swp3
 description swp3 -> n2's swp3
 ip ospf 3 area 0.0.0.0
 ip ospf dead-interval 3
 ip ospf hello-interval 1
 ipv6 nd suppress-ra
 link-detect
!
interface swp4
 description swp4 -> n2's swp4
 ip ospf 4 area 0.0.0.0
 ip ospf dead-interval 3
 ip ospf hello-interval 1
 ipv6 nd suppress-ra
 link-detect
!
interface swp5
 description swp5 -> n2's swp5
 ip ospf 5 area 0.0.0.0
 ip ospf dead-interval 3
 ip ospf hello-interval 1
 ipv6 nd suppress-ra
 link-detect
!
interface swp6
 description swp6 -> n2's swp6
 ip ospf 5 area 0.0.0.0
 ip ospf dead-interval 3
 ip ospf hello-interval 1
 ipv6 nd suppress-ra
 link-detect
!
interface swp7
 description swp7 -> n2's swp7
 ip ospf 5 area 0.0.0.0
 ip ospf dead-interval 3
 ip ospf hello-interval 1
 ipv6 nd suppress-ra
 link-detect
!
!
router bgp 100
 bgp router-id 10.0.9.1
 bgp log-neighbor-changes
 redistribute ospf 1
 redistribute ospf 2
 neighbor 210.2.0.2 remote-as 100
 neighbor 210.4.1.4 remote-as 400
 neighbor 2001:20::2 remote-as 100
 neighbor 2210:210:4:1::4 remote-as 400
!
 address-family ipv6
 neighbor 210.2.0.2 activate
 neighbor 210.4.1.4 activate
 neighbor 2001:20::2 activate
 neighbor 2210:210:4:1::4 activate
 exit-address-family
!
router ospf 1
 ospf router-id 0.0.1.1
 log-adjacency-changes detail
 timers throttle spf 0 50 5000
 redistribute static
 redistribute ospf 2
!
router ospf 2
 ospf router-id 0.0.1.2
 log-adjacency-changes detail
 timers throttle spf 0 50 5000
 redistribute connected
!
router ospf 3
 ospf router-id 0.0.1.3
 log-adjacency-changes detail
 timers throttle spf 0 50 5000
 redistribute kernel
!
router ospf 4
 ospf router-id 0.0.1.4
 log-adjacency-changes detail
 timers throttle spf 0 50 5000
 redistribute rip
!
router ospf 5
 ospf router-id 0.0.1.5
 log-adjacency-changes detail
 timers throttle spf 0 50 5000
 redistribute bgp
!
end
rtr(config)# router ospf 1
rtr(config-router)# redistribute ospf
  <1-65535>  Instance ID
rtr(config-router)# redistribute ospf 2
rtr(config-router)# exit
rtr(config)# router bgp 100
rtr(config-router)# redistribute ospf
  <1-65535>  Metric for redistributed routes
  <cr>
  metric     Metric for redistributed routes
  route-map  Route map reference
rtr(config-router)# redistribute ospf 1
  <cr>
  metric     Default metric
  route-map  Pointer to route-map entries
rtr(config-router)# redistribute ospf 1
rtr(config-router)#
rtr# show ip ospf
  <1-65535>       Instance ID
  <cr>
  border-routers  Show all the ABR's and ASBR's
  database        Database summary
  interface       Interface information
  neighbor        Neighbor list
  route           OSPF routing table
rtr# show ip ospf

OSPF Instance: 1

 OSPF Routing Process, Router ID: 0.0.1.1
 Supports only single TOS (TOS0) routes
 This implementation conforms to RFC2328
 RFC1583Compatibility flag is disabled
 OpaqueCapability flag is disabled
 Initial SPF scheduling delay 0 millisec(s)
 Minimum hold time between consecutive SPFs 50 millisec(s)
 Maximum hold time between consecutive SPFs 5000 millisec(s)
 Hold time multiplier is currently 1
 SPF algorithm last executed 3h28m50s ago
 Last SPF duration 53 usecs
 SPF timer is inactive
 LSA minimum arrival 1000 msecs
 Write Multiplier set to 20
 Refresh timer 10 secs
 This router is an ASBR (injecting external routing information)
 Number of external LSA 90. Checksum Sum 0x003523b6
 Number of opaque AS LSA 0. Checksum Sum 0x00000000
 Number of areas attached to this router: 1
 All adjacency changes are logged

 Area ID: 0.0.0.0 (Backbone)
   Number of interfaces in this area: Total: 1, Active: 1
   Number of fully adjacent neighbors in this area: 1
   Area has no authentication
   SPF algorithm executed 3 times
   Number of LSA 3
   Number of router LSA 2. Checksum Sum 0x0000b069
   Number of network LSA 1. Checksum Sum 0x0000b9ba
   Number of summary LSA 0. Checksum Sum 0x00000000
   Number of ASBR summary LSA 0. Checksum Sum 0x00000000
   Number of NSSA LSA 0. Checksum Sum 0x00000000
   Number of opaque link LSA 0. Checksum Sum 0x00000000
   Number of opaque area LSA 0. Checksum Sum 0x00000000


OSPF Instance: 2

 OSPF Routing Process, Router ID: 0.0.1.2
 Supports only single TOS (TOS0) routes
 This implementation conforms to RFC2328
 RFC1583Compatibility flag is disabled
 OpaqueCapability flag is disabled
 Initial SPF scheduling delay 0 millisec(s)
 Minimum hold time between consecutive SPFs 50 millisec(s)
 Maximum hold time between consecutive SPFs 5000 millisec(s)
 Hold time multiplier is currently 1
 SPF algorithm last executed 3h28m50s ago
 Last SPF duration 64 usecs
 SPF timer is inactive
 LSA minimum arrival 1000 msecs
 Write Multiplier set to 20
 Refresh timer 10 secs
 This router is an ASBR (injecting external routing information)
 Number of external LSA 18. Checksum Sum 0x000d36f0
 Number of opaque AS LSA 0. Checksum Sum 0x00000000
 Number of areas attached to this router: 1
 All adjacency changes are logged

 Area ID: 0.0.0.0 (Backbone)
   Number of interfaces in this area: Total: 1, Active: 1
   Number of fully adjacent neighbors in this area: 1
   Area has no authentication
   SPF algorithm executed 5 times
   Number of LSA 3
   Number of router LSA 2. Checksum Sum 0x0000be54
   Number of network LSA 1. Checksum Sum 0x0000c0af
   Number of summary LSA 0. Checksum Sum 0x00000000
   Number of ASBR summary LSA 0. Checksum Sum 0x00000000
   Number of NSSA LSA 0. Checksum Sum 0x00000000
   Number of opaque link LSA 0. Checksum Sum 0x00000000
   Number of opaque area LSA 0. Checksum Sum 0x00000000


OSPF Instance: 3

 OSPF Routing Process, Router ID: 0.0.1.3
 Supports only single TOS (TOS0) routes
 This implementation conforms to RFC2328
 RFC1583Compatibility flag is disabled
 OpaqueCapability flag is disabled
 Initial SPF scheduling delay 0 millisec(s)
 Minimum hold time between consecutive SPFs 50 millisec(s)
 Maximum hold time between consecutive SPFs 5000 millisec(s)
 Hold time multiplier is currently 1
 SPF algorithm last executed 3h28m50s ago
 Last SPF duration 49 usecs
 SPF timer is inactive
 LSA minimum arrival 1000 msecs
 Write Multiplier set to 20
 Refresh timer 10 secs
 This router is an ASBR (injecting external routing information)
 Number of external LSA 90. Checksum Sum 0x002f27f4
 Number of opaque AS LSA 0. Checksum Sum 0x00000000
 Number of areas attached to this router: 1
 All adjacency changes are logged

 Area ID: 0.0.0.0 (Backbone)
   Number of interfaces in this area: Total: 1, Active: 1
   Number of fully adjacent neighbors in this area: 1
   Area has no authentication
   SPF algorithm executed 5 times
   Number of LSA 3
   Number of router LSA 2. Checksum Sum 0x0000c841
   Number of network LSA 1. Checksum Sum 0x0000c7a4
   Number of summary LSA 0. Checksum Sum 0x00000000
   Number of ASBR summary LSA 0. Checksum Sum 0x00000000
   Number of NSSA LSA 0. Checksum Sum 0x00000000
   Number of opaque link LSA 0. Checksum Sum 0x00000000
   Number of opaque area LSA 0. Checksum Sum 0x00000000


OSPF Instance: 4

 OSPF Routing Process, Router ID: 0.0.1.4
 Supports only single TOS (TOS0) routes
 This implementation conforms to RFC2328
 RFC1583Compatibility flag is disabled
 OpaqueCapability flag is disabled
 Initial SPF scheduling delay 0 millisec(s)
 Minimum hold time between consecutive SPFs 50 millisec(s)
 Maximum hold time between consecutive SPFs 5000 millisec(s)
 Hold time multiplier is currently 1
 SPF algorithm last executed 3h28m50s ago
 Last SPF duration 50 usecs
 SPF timer is inactive
 LSA minimum arrival 1000 msecs
 Write Multiplier set to 20
 Refresh timer 10 secs
 This router is an ASBR (injecting external routing information)
 Number of external LSA 0. Checksum Sum 0x00000000
 Number of opaque AS LSA 0. Checksum Sum 0x00000000
 Number of areas attached to this router: 1
 All adjacency changes are logged

 Area ID: 0.0.0.0 (Backbone)
   Number of interfaces in this area: Total: 1, Active: 1
   Number of fully adjacent neighbors in this area: 1
   Area has no authentication
   SPF algorithm executed 5 times
   Number of LSA 3
   Number of router LSA 2. Checksum Sum 0x0000d62c
   Number of network LSA 1. Checksum Sum 0x0000ce99
   Number of summary LSA 0. Checksum Sum 0x00000000
   Number of ASBR summary LSA 0. Checksum Sum 0x00000000
   Number of NSSA LSA 0. Checksum Sum 0x00000000
   Number of opaque link LSA 0. Checksum Sum 0x00000000
   Number of opaque area LSA 0. Checksum Sum 0x00000000


OSPF Instance: 5

 OSPF Routing Process, Router ID: 0.0.1.5
 Supports only single TOS (TOS0) routes
 This implementation conforms to RFC2328
 RFC1583Compatibility flag is disabled
 OpaqueCapability flag is disabled
 Initial SPF scheduling delay 0 millisec(s)
 Minimum hold time between consecutive SPFs 50 millisec(s)
 Maximum hold time between consecutive SPFs 5000 millisec(s)
 Hold time multiplier is currently 1
 SPF algorithm last executed 3h28m49s ago
 Last SPF duration 92 usecs
 SPF timer is inactive
 LSA minimum arrival 1000 msecs
 Write Multiplier set to 20
 Refresh timer 10 secs
 This router is an ASBR (injecting external routing information)
 Number of external LSA 90. Checksum Sum 0x002e6123
 Number of opaque AS LSA 0. Checksum Sum 0x00000000
 Number of areas attached to this router: 1
 All adjacency changes are logged

 Area ID: 0.0.0.0 (Backbone)
   Number of interfaces in this area: Total: 3, Active: 3
   Number of fully adjacent neighbors in this area: 3
   Area has no authentication
   SPF algorithm executed 8 times
   Number of LSA 5
   Number of router LSA 2. Checksum Sum 0x00004f59
   Number of network LSA 3. Checksum Sum 0x000265c5
   Number of summary LSA 0. Checksum Sum 0x00000000
   Number of ASBR summary LSA 0. Checksum Sum 0x00000000
   Number of NSSA LSA 0. Checksum Sum 0x00000000
   Number of opaque link LSA 0. Checksum Sum 0x00000000
   Number of opaque area LSA 0. Checksum Sum 0x00000000

rtr# show ip ospf 1
  <cr>
  border-routers  Show all the ABR's and ASBR's
  database        Database summary
  interface       Interface information
  neighbor        Neighbor list
  route           OSPF routing table
rtr# show ip ospf 1

OSPF Instance: 1

 OSPF Routing Process, Router ID: 0.0.1.1
 Supports only single TOS (TOS0) routes
 This implementation conforms to RFC2328
 RFC1583Compatibility flag is disabled
 OpaqueCapability flag is disabled
 Initial SPF scheduling delay 0 millisec(s)
 Minimum hold time between consecutive SPFs 50 millisec(s)
 Maximum hold time between consecutive SPFs 5000 millisec(s)
 Hold time multiplier is currently 1
 SPF algorithm last executed 3h29m02s ago
 Last SPF duration 53 usecs
 SPF timer is inactive
 LSA minimum arrival 1000 msecs
 Write Multiplier set to 20
 Refresh timer 10 secs
 This router is an ASBR (injecting external routing information)
 Number of external LSA 90. Checksum Sum 0x003523b6
 Number of opaque AS LSA 0. Checksum Sum 0x00000000
 Number of areas attached to this router: 1
 All adjacency changes are logged

 Area ID: 0.0.0.0 (Backbone)
   Number of interfaces in this area: Total: 1, Active: 1
   Number of fully adjacent neighbors in this area: 1
   Area has no authentication
   SPF algorithm executed 3 times
   Number of LSA 3
   Number of router LSA 2. Checksum Sum 0x0000b069
   Number of network LSA 1. Checksum Sum 0x0000b9ba
   Number of summary LSA 0. Checksum Sum 0x00000000
   Number of ASBR summary LSA 0. Checksum Sum 0x00000000
   Number of NSSA LSA 0. Checksum Sum 0x00000000
   Number of opaque link LSA 0. Checksum Sum 0x00000000
   Number of opaque area LSA 0. Checksum Sum 0x00000000

rtr# show ip ospf neighbor

OSPF Instance: 1

Neighbor ID     Pri State           Dead Time Address         Interface         
   RXmtL RqstL DBsmL
0.0.2.1           1 Full/DR            2.624s 210.2.0.2       swp1:210.2.0.1    
       0     0     0


OSPF Instance: 2

Neighbor ID     Pri State           Dead Time Address         Interface         
   RXmtL RqstL DBsmL
0.0.2.2           1 Full/DR            2.623s 210.2.1.2       swp2:210.2.1.1    
       0     0     0


OSPF Instance: 3

Neighbor ID     Pri State           Dead Time Address         Interface         
   RXmtL RqstL DBsmL
0.0.2.3           1 Full/DR            2.622s 210.2.2.2       swp3:210.2.2.1    
       0     0     0


OSPF Instance: 4

Neighbor ID     Pri State           Dead Time Address         Interface         
   RXmtL RqstL DBsmL
0.0.2.4           1 Full/DR            2.621s 210.2.3.2       swp4:210.2.3.1    
       0     0     0


OSPF Instance: 5

Neighbor ID     Pri State           Dead Time Address         Interface         
   RXmtL RqstL DBsmL
0.0.2.5           1 Full/DR            2.621s 210.2.4.2       swp5:210.2.4.1    
       0     0     0
0.0.2.5           1 Full/DR            2.621s 210.2.5.2       swp6:210.2.5.1    
       0     0     0
0.0.2.5           1 Full/DR            2.621s 210.2.6.2       swp7:210.2.6.1    
       0     0     0

rtr# show ip ospf 2 database

OSPF Instance: 2

       OSPF Router with ID (0.0.1.2)

                Router Link States (Area 0.0.0.0)

Link ID         ADV Router      Age  Seq#       CkSum  Link count
0.0.1.2         0.0.1.2         1816 0x8000000b 0x6326 1
0.0.2.2         0.0.2.2           82 0x8000000a 0x5b2e 1

                Net Link States (Area 0.0.0.0)

Link ID         ADV Router      Age  Seq#       CkSum
210.2.1.2       0.0.2.2           92 0x80000008 0xc0af

                AS External Link States

Link ID         ADV Router      Age  Seq#       CkSum  Route
10.0.0.0        0.0.1.2         1576 0x80000007 0xfab3 E2 10.0.0.0/22 [0x0]
10.0.0.1        0.0.1.2         1056 0x80000007 0xffaa E2 10.0.0.1/32 [0x0]
10.0.1.1        0.0.1.2          506 0x80000008 0xf2b5 E2 10.0.1.1/32 [0x0]
10.0.2.1        0.0.1.2          746 0x80000008 0xe7bf E2 10.0.2.1/32 [0x0]
10.0.3.1        0.0.1.2          716 0x80000008 0xdcc9 E2 10.0.3.1/32 [0x0]
10.0.4.1        0.0.1.2         1606 0x80000007 0xd3d2 E2 10.0.4.1/32 [0x0]
10.0.5.1        0.0.1.2          586 0x80000008 0xc6dd E2 10.0.5.1/32 [0x0]
10.0.6.1        0.0.1.2         1706 0x80000007 0xbde6 E2 10.0.6.1/32 [0x0]
10.0.7.1        0.0.1.2          916 0x80000007 0xb2f0 E2 10.0.7.1/32 [0x0]
10.0.8.1        0.0.1.2         1706 0x80000007 0xa7fa E2 10.0.8.1/32 [0x0]
10.0.9.1        0.0.1.2         1806 0x80000007 0x9c05 E2 10.0.9.1/32 [0x0]
210.2.0.0       0.0.1.2         1016 0x80000007 0xbf21 E2 210.2.0.0/24 [0x0]
210.2.2.0       0.0.1.2          506 0x80000008 0xa736 E2 210.2.2.0/24 [0x0]
210.2.3.0       0.0.1.2         1726 0x80000007 0x9e3f E2 210.2.3.0/24 [0x0]
210.2.4.0       0.0.1.2          766 0x80000008 0x914a E2 210.2.4.0/24 [0x0]
210.2.5.0       0.0.1.2           26 0x80000008 0x8654 E2 210.2.5.0/24 [0x0]
210.2.6.0       0.0.1.2           56 0x80000008 0x7b5e E2 210.2.6.0/24 [0x0]
210.4.1.0       0.0.1.2         1586 0x80000007 0x9c41 E2 210.4.1.0/24 [0x0]


rtr#

rtr# debug ospf
  <1-65535>  Instance ID
  event      OSPF event information
  ism        OSPF Interface State Machine
  lsa        OSPF Link State Advertisement
  nsm        OSPF Neighbor State Machine
  nssa       OSPF nssa information
  packet     OSPF packets
  zebra      OSPF Zebra information
rtr# debug ospf 1
  event   OSPF event information
  ism     OSPF Interface State Machine
  lsa     OSPF Link State Advertisement
  nsm     OSPF Neighbor State Machine
  nssa    OSPF nssa information
  packet  OSPF packets
  zebra   OSPF Zebra information
rtr# debug ospf ism
rtr# show debugging ospf

OSPF Instance: 1

OSPF debugging status:
  OSPF ISM debugging is on


OSPF Instance: 2

OSPF debugging status:
  OSPF ISM debugging is on


OSPF Instance: 3

OSPF debugging status:
  OSPF ISM debugging is on


OSPF Instance: 4

OSPF debugging status:
  OSPF ISM debugging is on


OSPF Instance: 5

OSPF debugging status:
  OSPF ISM debugging is on

rtr# debug ospf 1 nsm
rtr# show debugging ospf

OSPF Instance: 1

OSPF debugging status:
  OSPF ISM debugging is on
  OSPF NSM debugging is on


OSPF Instance: 2

OSPF debugging status:
  OSPF ISM debugging is on


OSPF Instance: 3

OSPF debugging status:
  OSPF ISM debugging is on


OSPF Instance: 4

OSPF debugging status:
  OSPF ISM debugging is on


OSPF Instance: 5

OSPF debugging status:
  OSPF ISM debugging is on

rtr#

_______________________________________________
Quagga-dev mailing list
Quagga-dev@lists.quagga.net
https://lists.quagga.net/mailman/listinfo/quagga-dev

Reply via email to