Lab 9-5: Leaf-Area Design Featuring Zebra and Cisco IOS Software

This lab features the same topology as Lab 9-4 (Figure 9-3) with the difference that all UNIX gateways are running the Zebra zebra/ospfd now instead of GateD. However, they are implementing the same functionality.

NOTE

The configurations of the Cisco IOS routers are exactly as in Lab 9-4; therefore, they are omitted here.


Examples 9-19 to 9-21 present the Zebra ospfd configurations and relevant show commands for the three UNIX gateways callisto, castor, and ganymed. These examples also show the routing situation from the gateway's routing table point of view. Therefore, we can compare the OSPF RIB link-state database (LSDB) and the UNIX forwarding table.

Example 9-19. Zebra OSPF Configuration and Output on Callisto

[root@callisto:~#] telnet localhost 2604

Trying 127.0.0.1...

Connected to localhost (127.0.0.1).

Escape character is '^]'.

Hello, this is zebra (version 0.94).

Copyright 1996-2002 Kunihiro Ishiguro.

User Access Verification

Password:



callisto-ospfd# show running-config



Current configuration:

!

hostname callisto-ospfd

password 8 m6eyKycFMHniQ

enable password 8 bjYlnA9YLBWyM

log file /var/log/ospfd.log

service advanced-vty

service password-encryption

!

interface lo

!

interface eth0

!

interface eth1

!

interface ipsec0

!

interface ipsec1

!

interface ipsec2

!

interface ipsec3

!

interface eth1:1

!

interface lo1

!

router ospf

 ospf router-id 192.168.1.1

 compatible rfc1583

 redistribute connected

 redistribute static

 network 192.168.1.0/24 area 0

 network 192.168.14.0/24 area 5

 network 192.168.45.0/24 area 0

 area 5 virtual-link 192.168.201.4

 capability opaque

!

access-list 1 remark vty-protection

access-list 1 permit 127.0.0.1

access-list 1 permit 192.168.1.0 0.0.0.255

!

line vty

 access-class 1

 exec-timeout 15 0

!

end



callisto-ospfd# show ip ospf

 OSPF Routing Process, Router ID: 192.168.1.1

 Supports only single TOS (TOS0) routes

 This implementation conforms to RFC2328

 RFC1583Compatibility flag is enabled

 OpaqueCapability flag is enabled

 SPF schedule delay 5 secs, Hold time between two SPFs 10 secs

 Refresh timer 10 secs

 This router is an ABR, ABR type is: Standard (RFC2328)

 This router is an ASBR (injecting external routing information)

 Number of external LSA 3

 Number of areas attached to this router: 2



 Area ID: 0.0.0.0 (Backbone)

   Number of interfaces in this area: Total: 2, Active: 3

   Number of fully adjacent neighbors in this area: 2

   Area has no authentication

   SPF algorithm executed 12 times

   Number of LSA 29



 Area ID: 0.0.0.5

   Shortcutting mode: Default, S-bit consensus: no

   Number of interfaces in this area: Total: 1, Active: 2

   Number of fully adjacent neighbors in this area: 2

   Area has no authentication

   Number of full virtual adjacencies going through this area: 1

   SPF algorithm executed 12 times

   Number of LSA 35



callisto-ospfd# show ip ospf interface

lo is up, line protocol is up

  OSPF not enabled on this interface

eth0 is up, line protocol is up

  Internet Address 192.168.14.1/24, Area 0.0.0.5

  Router ID 192.168.1.1, Network Type BROADCAST, Cost: 10

  Transmit Delay is 1 sec, State DR, Priority 1

  Designated Router (ID) 192.168.1.1, Interface Address 192.168.14.1

  Backup Designated Router (ID) 192.168.201.2, Interface Address 192.168.14.254

  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5

    Hello due in 00:00:04

  Neighbor Count is 2, Adjacent neighbor count is 2

eth1 is up, line protocol is up

  Internet Address 192.168.1.1/24, Area 0.0.0.0

  Router ID 192.168.1.1, Network Type BROADCAST, Cost: 10

  Transmit Delay is 1 sec, State Backup, Priority 1

  Designated Router (ID) 192.168.1.254, Interface Address 192.168.1.254

  Backup Designated Router (ID) 192.168.1.1, Interface Address 192.168.1.1

  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5

    Hello due in 00:00:09

  Neighbor Count is 1, Adjacent neighbor count is 1

ipsec0 is up, line protocol is up

  OSPF not enabled on this interface

ipsec1 is down, line protocol is down

  OSPF not enabled on this interface

ipsec2 is down, line protocol is down

  OSPF not enabled on this interface

ipsec3 is down, line protocol is down

  OSPF not enabled on this interface

eth1:1 is down, line protocol is down

  OSPF not enabled on this interface

lo1 is down, line protocol is down

  OSPF not enabled on this interface

VLINK0 is up, line protocol is up

  Internet Address 192.168.14.1/24, Area 0.0.0.0

  Router ID 192.168.1.1, Network Type VIRTUALLINK, Cost: 20

  Transmit Delay is 1 sec, State Point-To-Point, Priority 1

  No designated router on this network

  No backup designated router on this network

  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5

    Hello due in 00:00:09

  Neighbor Count is 1, Adjacent neighbor count is 1



callisto-ospfd# show ip ospf neighbor



Neighbor ID    Pri  State           Dead Time   Address         Interface     RXmtL RqstL

graphics/ccc.gif DBsmL

192.168.201.4   1  Full/DROther   00:00:34   192.168.19.2    VLINK0               0

0     0

192.168.201.1   1   Full/DROther  00:00:36   192.168.14.2    eth0:192.168.14.1    0

0     0

192.168.201.2   1   Full/Backup   00:00:36   192.168.14.254  eth0:192.168.14.1    0

0     0

192.168.1.254   1   Full/DR       00:00:38   192.168.1.254   eth1:192.168.1.1     0

0     0



callisto-ospfd# show ip ospf neighbor detail

 Neighbor 192.168.201.4, interface address 192.168.19.2

    In the area 0.0.0.0 via interface VLINK0

    Neighbor priority is 1, State is Full, 4 state changes

    DR is 0.0.0.0, BDR is 0.0.0.0

    Options 98 * | O | DC | -|-|-| E |*

    Dead timer due in 00:00:31

    Database Summary List 0

    Link State Request List 0

    Link State Retransmission List 0

    Thread Inactivity Timer on

    Thread Database Description Retransmision off

    Thread Link State Request Retransmission off

    Thread Link State Update Retransmission on



 Neighbor 192.168.201.1, interface address 192.168.14.2

    In the area 0.0.0.5 via interface eth0

    Neighbor priority is 1, State is Full, 5 state changes

    DR is 192.168.14.1, BDR is 192.168.14.254

    Options 66 * | O | -|-|-|-| E |*

    Dead timer due in 00:00:33

    Database Summary List 0

    Link State Request List 0

    Link State Retransmission List 0

    Thread Inactivity Timer on

    Thread Database Description Retransmision off

    Thread Link State Request Retransmission on

    Thread Link State Update Retransmission on



 Neighbor 192.168.201.2, interface address 192.168.14.254

    In the area 0.0.0.5 via interface eth0

    Neighbor priority is 1, State is Full, 5 state changes

    DR is 192.168.14.1, BDR is 192.168.14.254

    Options 66 * | O | - | - | - | - | E | *

    Dead timer due in 00:00:33

    Database Summary List 0

    Link State Request List 0

    Link State Retransmission List 0

    Thread Inactivity Timer on

    Thread Database Description Retransmision off

    Thread Link State Request Retransmission on

    Thread Link State Update Retransmission on



 Neighbor 192.168.1.254, interface address 192.168.1.254

    In the area 0.0.0.0 via interface eth1

    Neighbor priority is 1, State is Full, 6 state changes

    DR is 192.168.1.254, BDR is 192.168.1.1

    Options 66 * | O |- |- |- |- |E |*

    Dead timer due in 00:00:35

    Database Summary List 0

    Link State Request List 0

    Link State Retransmission List 0

    Thread Inactivity Timer on

    Thread Database Description Retransmision off

    Thread Link State Request Retransmission on

    Thread Link State Update Retransmission on



callisto-ospfd# show ip ospf border-routers

============ OSPF router routing table =============

R    192.168.1.1        IA [40] area: 0.0.0.0, ASBR

                           via 192.168.1.254, eth1

                           via 192.168.14.254, eth0

                           via 192.168.14.2, eth0

R    192.168.1.254         [10] area: 0.0.0.0, ASBR

                           via 192.168.1.254, eth1

R    192.168.2.7           [20] area: 0.0.0.0, ASBR

                           via 192.168.1.254, eth1

                           via 192.168.14.254, eth0

R    192.168.201.1         [10] area: 0.0.0.5, ASBR

                           via 192.168.14.2, eth0

R    192.168.201.2         [30] area: 0.0.0.0, ABR, ASBR

                           via 192.168.1.254, eth1

                           [10] area: 0.0.0.5, ABR, ASBR

                           via 192.168.14.254, eth0

R    192.168.201.4         [20] area: 0.0.0.5, ABR

                           via 192.168.14.2, eth0



callisto-ospfd# show ip ospf database



       OSPF Router with ID (192.168.1.1)



                Router Link States (Area 0.0.0.0)



Link ID         ADV Router      Age  Seq#       CkSum  Link count

192.168.1.1     192.168.1.1      170 0x80000006 0x724f 2

192.168.1.254   192.168.1.254    301 0x80000007 0xeb38 3

192.168.2.7     192.168.2.7      262 0x8000000a 0x8e5a 3

192.168.201.2   192.168.201.2   1887 0x80000004 0x7a3f 3

192.168.201.4   192.168.201.4   1912 0x80000003 0xeafe 2



                Net Link States (Area 0.0.0.0)



Link ID         ADV Router      Age  Seq#       CkSum

192.168.1.254   192.168.1.254    592 0x80000003 0x8a26

192.168.2.254   192.168.1.254    305 0x80000003 0xc4e3

192.168.7.7     192.168.2.7      267 0x80000003 0x6264

192.168.80.254  192.168.1.254    305 0x80000003 0x67f2



                Summary Link States (Area 0.0.0.0)



Link ID         ADV Router      Age  Seq#       CkSum  Route

192.168.13.0    192.168.201.2   1887 0x80000002 0xbbd5 192.168.13.0/29

192.168.14.0    192.168.1.1      683 0x80000003 0x6608 192.168.14.0/24

192.168.14.0    192.168.201.2   1887 0x80000004 0xfe84 192.168.14.0/24

192.168.14.0    192.168.201.4   1912 0x80000002 0x5b1e 192.168.14.0/24

192.168.16.0    192.168.201.2   1887 0x80000002 0xbfc8 192.168.16.0/23

192.168.19.0    192.168.1.1      813 0x80000003 0x93cb 192.168.19.0/24

192.168.19.0    192.168.201.2   1887 0x80000002 0x3046 192.168.19.0/24

192.168.19.0    192.168.201.4   1912 0x80000002 0xbfbe 192.168.19.0/24

192.168.201.1   192.168.1.1     1513 0x80000002 0x575a 192.168.201.1/32

192.168.201.1   192.168.201.2   1887 0x80000002 0xf1d5 192.168.201.1/32

192.168.201.1   192.168.201.4   1912 0x80000002 0xe5df 192.168.201.1/32

192.168.201.3   192.168.201.2   1887 0x80000002 0xb514 192.168.201.3/32

192.168.201.4   192.168.201.4   1912 0x80000002 0x6369 192.168.201.4/32



                ASBR-Summary Link States (Area 0.0.0.0)



Link ID         ADV Router      Age  Seq#       CkSum

192.168.1.1     192.168.201.2   1887 0x80000002 0x7a16

192.168.1.1     192.168.201.4   1912 0x80000002 0xd2b1

192.168.201.1   192.168.1.1      253 0x80000003 0x3d73

192.168.201.1   192.168.201.2   1887 0x80000002 0xd9ed

192.168.201.1   192.168.201.4   1912 0x80000002 0xcdf7

192.168.201.2   192.168.1.1      843 0x80000003 0x337c

192.168.201.2   192.168.201.4   1912 0x80000002 0x2892



                Router Link States (Area 0.0.0.5)



Link ID         ADV Router      Age  Seq#       CkSum  Link count

192.168.1.1     192.168.1.1      171 0x80000007 0xa1d3 1

192.168.201.1   192.168.201.1   1789 0x80000004 0x521e 3

192.168.201.2   192.168.201.2   1885 0x80000003 0x715a 1

192.168.201.4   192.168.201.4   1913 0x80000004 0xebce 1



                Net Link States (Area 0.0.0.5)



Link ID         ADV Router      Age  Seq#       CkSum

192.168.14.1    192.168.1.1      191 0x80000004 0x8f0b

192.168.19.2    192.168.201.4   1913 0x80000002 0xa572

                Summary Link States (Area 0.0.0.5)



Link ID         ADV Router      Age  Seq#       CkSum  Route

192.168.1.0     192.168.1.1      833 0x80000003 0xf585 192.168.1.0/24

192.168.1.0     192.168.201.2   1885 0x80000002 0x5b23 192.168.1.0/24

192.168.1.0     192.168.201.4   1913 0x80000002 0x4f2d 192.168.1.0/24

192.168.2.0     192.168.1.1     1393 0x80000003 0x4f21 192.168.2.0/24

192.168.2.0     192.168.201.2   1885 0x80000002 0xeb9b 192.168.2.0/24

192.168.2.0     192.168.201.4   1913 0x80000002 0xa8c8 192.168.2.0/24

192.168.7.0     192.168.201.2   1885 0x80000004 0x4c3e 192.168.7.0/24

192.168.7.0     192.168.201.4   1913 0x80000002 0x0d69 192.168.7.0/24

192.168.13.0    192.168.201.2   1885 0x80000002 0xbbd5 192.168.13.0/29

192.168.13.0    192.168.201.4   1913 0x80000002 0x7803 192.168.13.0/29

192.168.16.0    192.168.201.2   1885 0x80000002 0xbfc8 192.168.16.0/23

192.168.16.0    192.168.201.4   1913 0x80000002 0x7cf5 192.168.16.0/23

192.168.80.0    192.168.1.1     1653 0x80000002 0xf32f 192.168.80.0/24

192.168.80.0    192.168.201.2   1885 0x80000002 0x8eaa 192.168.80.0/24

192.168.80.0    192.168.201.4   1913 0x80000002 0x4bd7 192.168.80.0/24

192.168.201.2   192.168.201.2   1885 0x80000002 0x834d 192.168.201.2/32

192.168.201.2   192.168.201.4   1913 0x80000002 0x407a 192.168.201.2/32

192.168.201.3   192.168.201.2   1885 0x80000002 0xb514 192.168.201.3/32

192.168.201.3   192.168.201.4   1913 0x80000002 0x7241 192.168.201.3/32

192.168.201.4   192.168.201.2   1885 0x80000002 0x3882 192.168.201.4/32

192.168.201.4   192.168.201.4   1913 0x80000002 0x6369 192.168.201.4/32



                ASBR-Summary Link States (Area 0.0.0.5)



Link ID         ADV Router      Age  Seq#       CkSum

192.168.1.1     192.168.201.2   1885 0x80000002 0x4339

192.168.1.1     192.168.201.4   1913 0x80000002 0xd2b1

192.168.1.254   192.168.1.1      763 0x80000003 0xf189

192.168.1.254   192.168.201.2   1885 0x80000002 0xf295

192.168.1.254   192.168.201.4   1913 0x80000002 0x4b31

192.168.2.7     192.168.201.2   1885 0x80000002 0x3356

192.168.2.7     192.168.201.4   1913 0x80000002 0xef83

192.168.201.2   192.168.201.4   1913 0x80000002 0x2892



                AS External Link States



Link ID         ADV Router      Age  Seq#       CkSum  Route

172.16.7.0      192.168.2.7     1218 0x80000002 0x92f4 E2 172.16.7.0/24 [0x0]

192.168.44.0    192.168.1.254   1726 0x80000003 0x03ba E2 192.168.44.0/24 [0x0]

111.11.117.0    192.168.1.254    694 0x80000003 0x7c5c E2 111.11.117.0/24 [0x0]



callisto-ospfd# show ip ospf route

============ OSPF network routing table ============

N    192.168.1.0/24        [10] area: 0.0.0.0

                           directly attached to eth1

N    192.168.2.0/24        [20] area: 0.0.0.0

                           via 192.168.1.254, eth1

N    192.168.7.0/24        [20] area: 0.0.0.0

                           via 192.168.14.254, eth0

N IA 192.168.13.0/29       [16] area: 0.0.0.0

                           via 192.168.14.254, eth0

N    192.168.14.0/24       [10] area: 0.0.0.5

                           directly attached to eth0

N IA 192.168.16.0/23       [16] area: 0.0.0.0

                           via 192.168.14.254, eth0

N    192.168.19.0/24       [20] area: 0.0.0.5

                           via 192.168.14.2, eth0

N    192.168.80.0/24       [20] area: 0.0.0.0

                           via 192.168.1.254, eth1

N    192.168.201.1/32      [11] area: 0.0.0.5

                           via 192.168.14.2, eth0

N    192.168.201.2/32      [11] area: 0.0.0.0

                           via 192.168.14.254, eth0

N IA 192.168.201.3/32      [17] area: 0.0.0.0

                           via 192.168.14.254, eth0

N IA 192.168.201.4/32      [21] area: 0.0.0.0

                           via 192.168.14.2, eth0



============ OSPF router routing table =============

R    192.168.1.1        IA [40] area: 0.0.0.0, ASBR

                           via 192.168.1.254, eth1

                           via 192.168.14.254, eth0

                           via 192.168.14.2, eth0

R    192.168.1.254         [10] area: 0.0.0.0, ASBR

                           via 192.168.1.254, eth1

R    192.168.2.7           [20] area: 0.0.0.0, ASBR

                           via 192.168.1.254, eth1

                           via 192.168.14.254, eth0

R    192.168.201.1         [10] area: 0.0.0.5, ASBR

                           via 192.168.14.2, eth0

R    192.168.201.2         [30] area: 0.0.0.0, ABR, ASBR

                           via 192.168.1.254, eth1

                           [10] area: 0.0.0.5, ABR, ASBR

                           via 192.168.14.254, eth0

R    192.168.201.4         [20] area: 0.0.0.5, ABR

                           via 192.168.14.2, eth0



============ OSPF external routing table ===========

N E2 172.16.7.0/24         [20/20] tag: 0

                           via 192.168.1.254, eth1

                           via 192.168.14.254, eth0

N E2 192.168.44.0/24       [10/20] tag: 0

                           via 192.168.1.254, eth1

N E2 111.11.117.0/24       [10/20] tag: 0

                           via 192.168.1.254, eth1



[root@callisto:~#] telnet localhost 2601

Trying 127.0.0.1...

Connected to localhost (127.0.0.1).

Escape character is '^]'.

Hello, this is zebra (version 0.94).

Copyright 1996-2002 Kunihiro Ishiguro.

User Access Verification

Password:



callisto-zebra# show running-config



Current configuration:

!

hostname callisto-zebra

password 8 UUXADe4FP7VQU

enable password 8 6SyP71b.8BZnk

log file /var/log/zebra.log

service advanced-vty

service password-encryption

!

interface lo

!

interface eth0

 multicast

!

interface eth1

 multicast

!

interface ipsec0

!

interface ipsec1

!

interface ipsec2

!

interface ipsec3

!

interface eth1:1

 multicast

!

access-list 1 remark vty-protection

access-list 1 permit 127.0.0.1

access-list 1 permit 192.168.1.0 0.0.0.255

!

!

line vty

 access-class 1

 exec-timeout 15 0

!

end



callisto-zebra# show ip route

Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,

       B - BGP, > - selected route, * - FIB route



K>* 0.0.0.0/0 via 192.168.1.254, eth1

K * 127.0.0.0/8 is directly connected, lo

C>* 127.0.0.0/8 is directly connected, lo

O>* 172.16.7.0/24 [110/20] via 192.168.1.254, eth1, 01:07:00

  *                        via 192.168.14.254, eth0, 01:07:00

O   192.168.1.0/24 [110/10] is directly connected, eth1, 01:14:03

K * 192.168.1.0/24 is directly connected, eth1

C * 192.168.1.0/24 is directly connected, ipsec0

C>* 192.168.1.0/24 is directly connected, eth1

O>* 192.168.2.0/24 [110/20] via 192.168.1.254, eth1, 01:13:53

O>* 192.168.7.0/24 [110/20] via 192.168.14.254, eth0, 01:07:01

O>* 192.168.13.0/29 [110/16] via 192.168.14.254, eth0, 01:07:01

O   192.168.14.0/24 [110/10] is directly connected, eth0, 01:14:03

K * 192.168.14.0/24 is directly connected, eth0

C>* 192.168.14.0/24 is directly connected, eth0

O>* 192.168.16.0/23 [110/16] via 192.168.14.254, eth0, 01:07:01

O>* 192.168.19.0/24 [110/20] via 192.168.14.2, eth0, 01:07:11

O>* 192.168.44.0/24 [110/20] via 192.168.1.254, eth1, 01:13:52

O>* 192.168.80.0/24 [110/20] via 192.168.1.254, eth1, 01:09:05

O>* 192.168.201.1/32 [110/11] via 192.168.14.2, eth0, 01:07:11

O>* 192.168.201.2/32 [110/11] via 192.168.14.254, eth0, 01:07:01

O>* 192.168.201.3/32 [110/17] via 192.168.14.254, eth0, 01:07:01

O>* 192.168.201.4/32 [110/21] via 192.168.14.2, eth0, 01:06:51

O>* 111.11.117.0/24 [110/20] via 192.168.1.254, eth1, 01:13:52



[root@callisto:~#] ip route

192.168.201.2 via 192.168.14.254 dev eth0  proto zebra  metric 11 equalize

192.168.201.3 via 192.168.14.254 dev eth0  proto zebra  metric 17 equalize

192.168.201.1 via 192.168.14.2 dev eth0  proto zebra  metric 11 equalize

192.168.201.4 via 192.168.14.2 dev eth0  proto zebra  metric 21 equalize

192.168.13.0/29 via 192.168.14.254 dev eth0  proto zebra  metric 16 equalize

192.168.7.0/24 via 192.168.14.254 dev eth0  proto zebra  metric 20 equalize

172.16.7.0/24  proto zebra  metric 20 equalize

        nexthop via 192.168.1.254  dev eth1 weight 1

        nexthop via 192.168.14.254  dev eth0 weight 1

111.11.117.0/24 via 192.168.1.254 dev eth1  proto zebra  metric 20 equalize

192.168.19.0/24 via 192.168.14.2 dev eth0  proto zebra  metric 20 equalize

192.168.2.0/24 via 192.168.1.254 dev eth1  proto zebra  metric 20 equalize

192.168.80.0/24 via 192.168.1.254 dev eth1  proto zebra  metric 20 equalize

192.168.1.0/24 dev eth1  scope link

192.168.1.0/24 dev ipsec0  proto kernel  scope link  src 192.168.1.1

192.168.14.0/24 dev eth0  scope link

192.168.44.0/24 via 192.168.1.254 dev eth1  proto zebra  metric 20 equalize

192.168.16.0/23 via 192.168.14.254 dev eth0  proto zebra  metric 16 equalize

127.0.0.0/8 dev lo  scope link

default via 192.168.1.254 dev eth1



[root@callisto:~#] netstat -rne

Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

192.168.201.2   192.168.14.254  255.255.255.255 UGH   11     0        0 eth0

192.168.201.3   192.168.14.254  255.255.255.255 UGH   17     0        0 eth0

192.168.201.1   192.168.14.2    255.255.255.255 UGH   11     0        0 eth0

192.168.201.4   192.168.14.2    255.255.255.255 UGH   21     0        0 eth0

192.168.13.0    192.168.14.254  255.255.255.248 UG    16     0        0 eth0

192.168.7.0     192.168.14.254  255.255.255.0   UG    20     0        0 eth0

172.16.7.0      192.168.1.254   255.255.255.0   UG    20     0        0 eth1

111.11.117.0    192.168.1.254   255.255.255.0   UG    20     0        0 eth1

192.168.19.0    192.168.14.2    255.255.255.0   UG    20     0        0 eth0

192.168.2.0     192.168.1.254   255.255.255.0   UG    20     0        0 eth1

192.168.80.0    192.168.1.254   255.255.255.0   UG    20     0        0 eth1

192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1

192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 ipsec0

192.168.14.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0

192.168.44.0    192.168.1.254   255.255.255.0   UG    20     0        0 eth1

192.168.16.0    192.168.14.254  255.255.254.0   UG    16     0        0 eth0

127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo

0.0.0.0         192.168.1.254   0.0.0.0         UG    0      0        0 eth1


Note that one static route, 172.16.7.0/24, has been added to demonstrate administrative distance assignment to a route in Example 9-20.

Example 9-20. Zebra OSPF Configuration and Output on Castor

[root@castor:~#] netstat -rn -f inet

Routing tables



Internet:

Destination        Gateway            Flags    Refs      Use  Netif Expire

default            192.168.2.254      UGSc        2        0    xl0

127.0.0.1          127.0.0.1          UH          0     4154    lo0

172.16.7/24        link#1             UC1         0        0    xl0

192.168.1          192.168.2.254      UG1c        1       99    xl0

192.168.2          link#1             UC          1        0    xl0

192.168.2.254      52:54:05:e3:e4:2f  UHLW        7       96    xl0   1162

192.168.7          link#2             UC          1        0    ed0

192.168.7.254      00:00:0c:1a:a9:a8  UHLW       10      219    ed0    522

192.168.13/29      192.168.7.254      UG1c        0        3    ed0

192.168.14         192.168.7.254      UG1c        0        0    ed0

192.168.16/23      192.168.7.254      UG1c        0        0    ed0

192.168.19         192.168.7.254      UG1c        0        0    ed0

192.168.44         192.168.2.254      UG1c        0        0    xl0

192.168.80         link#14            UC          1        0  vlan8

192.168.80.254     52.54.5.e3.e4.2f   UHLW        0        0  vlan8    264

192.168.201.1      192.168.7.254      UGH1        0        0    ed0

192.168.201.2      192.168.7.254      UGH1        0        0    ed0

192.168.201.3      192.168.7.254      UGH1        0       80    ed0

192.168.201.4      192.168.7.254      UGH1        0        0    ed0

111.11.117         192.168.2.254      UG1c        0        0    xl0



[root@castor:~#] telnet localhost 2601

Trying 127.0.0.1...

Connected to localhost.nerdzone.org.

Escape character is '^]'.

Hello, this is zebra (version 0.93a).

Copyright 1996-2002 Kunihiro Ishiguro.

User Access Verification

Password:



castor-zebra# show running-config



Current configuration:

!

hostname castor-zebra

password 8 bJFoEOB0obLL6

enable password 8 4DwwIFdKLWvU.

log file /var/log/zebra.log

service advanced-vty

service password-encryption

!

interface xl0

 ip address 192.168.2.7/24

 multicast

 ipv6 nd suppress-ra

!

interface ed0

 ip address 192.168.7.7/24

 multicast

 ipv6 nd suppress-ra

!

interface lp0

 ipv6 nd suppress-ra

!

interface ppp0

 ipv6 nd suppress-ra

!

interface ppp1

 ipv6 nd suppress-ra

!

interface sl0

 ipv6 nd suppress-ra

!

interface sl1

 ipv6 nd suppress-ra

!

interface ds0

!

interface stf0

 ipv6 nd suppress-ra

!

interface faith0

 ipv6 nd suppress-ra

!

interface vlan0

 ipv6 nd suppress-ra

!

interface vlan1

 ipv6 nd suppress-ra

!

interface lo0

!

interface vlan8

 multicast

 ipv6 nd suppress-ra

!

interface gif0

 ipv6 nd suppress-ra

!

ip route 172.16.7.0/24 xl0 22

!

access-list 1 remark vty-protection

access-list 1 permit 127.0.0.1

access-list 1 permit 192.168.1.0 0.0.0.255

!

!

line vty

 access-class 1

 exec-timeout 15 0

!

end



castor-zebra# show ip route

Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,

 I - IS-IS,

       B - BGP, > - selected route, * - FIB route



K>* 0.0.0.0/0 via 192.168.2.254, xl0

C>* 127.0.0.0/8 is directly connected, lo0

S>* 172.16.7.0/24 [22/0] is directly connected, xl0

O>* 192.168.1.0/24 [110/20] via 192.168.2.254, xl0, 01:28:22

  *                         via 192.168.80.254, vlan8, 01:28:22

O   192.168.2.0/24 [110/10] is directly connected, xl0, 01:28:22

C>* 192.168.2.0/24 is directly connected, xl0

O   192.168.7.0/24 [110/10] is directly connected, ed0, 01:28:32

C>* 192.168.7.0/24 is directly connected, ed0

O>* 192.168.13.0/29 [110/16] via 192.168.7.254, ed0, 01:27:31

O>* 192.168.14.0/24 [110/20] via 192.168.7.254, ed0, 01:27:41

O>* 192.168.16.0/23 [110/16] via 192.168.7.254, ed0, 01:27:21

O>* 192.168.19.0/24 [110/30] via 192.168.7.254, ed0, 01:26:27

O>* 192.168.44.0/24 [110/20] via 192.168.2.254, xl0, 01:28:21

  *                          via 192.168.80.254, vlan8, 01:28:21

O   192.168.80.0/24 [110/10] is directly connected, vlan8, 01:28:22

C>* 192.168.80.0/24 is directly connected, vlan8

O>* 192.168.201.1/32 [110/21] via 192.168.7.254, ed0, 01:26:27

O>* 192.168.201.2/32 [110/11] via 192.168.7.254, ed0, 01:27:41

O>* 192.168.201.3/32 [110/17] via 192.168.7.254, ed0, 01:27:31

O>* 192.168.201.4/32 [110/31] via 192.168.7.254, ed0, 01:26:07

O>* 111.11.117.0/24 [110/20] via 192.168.2.254, xl0, 01:28:21

  *                          via 192.168.80.254, vlan8, 01:28:21



[root@castor:~#] telnet localhost 2604

Trying 127.0.0.1...

Connected to localhost.nerdzone.org.

Escape character is '^]'.

Hello, this is zebra (version 0.93a).

Copyright 1996-2002 Kunihiro Ishiguro.

User Access Verification

Password:



castor-ospfd# show running-config



Current configuration:

!

hostname castor-ospfd

password 8 4DwwIFdKLWvU.

enable password 8 dV8x4MhxDAuaw

log file /var/log/ospfd.log

service advanced-vty

service password-encryption

!

interface xl0

!

interface ed0

!

interface lp0

 ip ospf network point-to-point

!

interface sl0

 ip ospf network point-to-point

!

interface sl1

 ip ospf network point-to-point

!

interface ds0

!

interface stf0

!

interface faith0

!

interface vlan0

!

interface vlan1

!

interface lo0

!

interface ppp0

 ip ospf network point-to-point

!

interface ppp1

 ip ospf network point-to-point

!

interface vlan8

!

interface lo1

!

router ospf

 ospf router-id 192.168.2.7

 compatible rfc1583

 redistribute connected

 redistribute static

 network 192.168.2.0/24 area 0

 network 192.168.7.0/24 area 0

 network 192.168.80.0/24 area 0

 capability opaque

!

access-list 1 remark vty-protection

access-list 1 permit 127.0.0.1

access-list 1 permit 192.168.1.0 0.0.0.255

!

line vty

 access-class 1

 exec-timeout 15 0

!

end



castor-ospfd# show ip ospf neighbor



Neighbor ID     Pri   State           Dead Time   Address         Interface          

graphics/ccc.gif RXmtL RqstL DBsmL

192.168.1.254     1   Full/DR         00:00:40    192.168.2.254   xl0:192.168.2.7     0   

graphics/ccc.gif  0     0

192.168.201.2     1   Full/Backup     00:00:36    192.168.7.254   ed0:192.168.7.7     0   

graphics/ccc.gif  0     0

192.168.1.254     1   Full/DR         00:00:40    192.168.80.254  vlan8:192.168.80.1

0    0     0



castor-ospfd# show ip ospf border-routers

============ OSPF router routing table =============

R    192.168.1.1           [20] area: 0.0.0.0, ABR, ASBR

                           via 192.168.2.254, xl0

                           via 192.168.80.254, vlan8

R    192.168.1.254         [10] area: 0.0.0.0, ASBR

                           via 192.168.2.254, xl0

                           via 192.168.80.254, vlan8

R    192.168.201.1      IA [20] area: 0.0.0.0, ASBR

                           via 192.168.7.254, ed0

R    192.168.201.2         [10] area: 0.0.0.0, ABR, ASBR

                           via 192.168.7.254, ed0

R    192.168.201.4         [30] area: 0.0.0.0, ABR

                           via 192.168.7.254, ed0



castor-ospfd# show ip ospf route

============ OSPF network routing table ============

N    192.168.1.0/24        [20] area: 0.0.0.0

                           via 192.168.2.254, xl0

                           via 192.168.80.254, vlan8

N    192.168.2.0/24        [10] area: 0.0.0.0

                           directly attached to xl0

N    192.168.7.0/24        [10] area: 0.0.0.0

                           directly attached to ed0

N IA 192.168.13.0/29       [16] area: 0.0.0.0

                           via 192.168.7.254, ed0

N IA 192.168.14.0/24       [20] area: 0.0.0.0

                           via 192.168.7.254, ed0

N IA 192.168.16.0/23       [16] area: 0.0.0.0

                           via 192.168.7.254, ed0

N IA 192.168.19.0/24       [30] area: 0.0.0.0

                           via 192.168.7.254, ed0

N    192.168.80.0/24       [10] area: 0.0.0.0

                           directly attached to vlan8

N IA 192.168.201.1/32      [21] area: 0.0.0.0

                           via 192.168.7.254, ed0

N    192.168.201.2/32      [11] area: 0.0.0.0

                           via 192.168.7.254, ed0

N IA 192.168.201.3/32      [17] area: 0.0.0.0

                           via 192.168.7.254, ed0

N IA 192.168.201.4/32      [31] area: 0.0.0.0

                           via 192.168.7.254, ed0



============ OSPF router routing table =============

R    192.168.1.1           [20] area: 0.0.0.0, ABR, ASBR

                           via 192.168.2.254, xl0

                           via 192.168.80.254, vlan8

R    192.168.1.254         [10] area: 0.0.0.0, ASBR

                           via 192.168.2.254, xl0

                           via 192.168.80.254, vlan8

R    192.168.201.1      IA [20] area: 0.0.0.0, ASBR

                           via 192.168.7.254, ed0

R    192.168.201.2         [10] area: 0.0.0.0, ABR, ASBR

                           via 192.168.7.254, ed0

R    192.168.201.4         [30] area: 0.0.0.0, ABR

                           via 192.168.7.254, ed0



============ OSPF external routing table ===========

N E2 192.168.44.0/24       [10/20] tag: 0

                           via 192.168.2.254, xl0

                           via 192.168.80.254, vlan8

N E2 111.11.117.0/24       [10/20] tag: 0

                           via 192.168.2.254, xl0

                           via 192.168.80.254, vlan8


Example 9-21. Zebra OSPF Configuration and Output on Ganymed

ganymed-ospfd# show running-config

...

router ospf

 ospf router-id 192.168.1.254

 compatible rfc1583

 redistribute connected

 redistribute static

 network 192.168.1.0/24 area 0

 network 192.168.2.0/24 area 0

 network 192.168.45.0/24 area 0

 network 192.168.80.0/24 area 0

 capability opaque

...



[root@ganymed:~#] netstat -rn -f inet

Routing tables



Internet:

Destination        Gateway            Flags     Refs     Use    Mtu  Interface

default            111.11.117.1       UGS         1     8314   1500   ne5

127/8              127.0.0.1          UGRS        0        0  33224   lo0

127.0.0.1          127.0.0.1          UH          4      714  33224   lo0

172.16.7/24        192.168.2.7        UG1         0        0   1500   ne4

192.168.1/24       link#1             UC          0        0   1500   ne3

192.168.1.1        52:54:5:e3:51:87   UHL         5     2806   1500   ne3

192.168.1.2        8:0:46:64:74:1b    UHL         1    11211   1500   ne3

192.168.1.254      127.0.0.1          UGHS        0        0  33224   lo0

192.168.2/24       link#2             UC          0        0   1500   ne4

192.168.2.7        0:10:5a:c4:2c:4    UHL         6     6466   1500   ne4

192.168.7/24       192.168.2.7        UG1         1      130   1500   ne4

192.168.13.0/29    192.168.2.7        UG1         0        3   1500   ne4

192.168.14/24      192.168.1.1        UG1         0        0   1500   ne3

192.168.16/23      192.168.2.7        UG1         0        0   1500   ne4

192.168.19/24      192.168.1.1        UG1         0        0   1500   ne3

192.168.44.1       192.168.44.1       UH          0        0  33224   lo1

192.168.80/24      link#16            UC          0        0   1496   vlan0

192.168.80.1       0:10:5a:c4:2c:4    UHL         0        0   1496   vlan0

192.168.201.1      192.168.1.1        UGH1        0        0   1500   ne3

192.168.201.2      192.168.2.7        UGH1        0        0   1500   ne4

192.168.201.3      192.168.2.7        UGH1        1       87   1500   ne4

192.168.201.4      192.168.1.1        UGH1        0        1   1500   ne3

111.11.117/24      link#3             UC          0        0   1500   ne5

111.11.117.1       0:5:9a:5b:23:fc    UHL         1        0   1500   ne5



ganymed-zebra# sh ip route

Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,

       B - BGP, > - selected route, * - FIB route



K>* 0.0.0.0/0 via 111.11.117.1, ne5

K * 127.0.0.0/8 via 127.0.0.1 inactive

C>* 127.0.0.0/8 is directly connected, lo0

O>* 172.16.7.0/24 [110/20] via 192.168.2.7, ne4, 01:35:14

  *                        via 192.168.80.1, vlan0, 01:35:14

O   192.168.1.0/24 [110/10] is directly connected, ne3, 01:50:01

C>* 192.168.1.0/24 is directly connected, ne3

O   192.168.2.0/24 [110/10] is directly connected, ne4, 01:50:00

C>* 192.168.2.0/24 is directly connected, ne4

O>* 192.168.7.0/24 [110/20] via 192.168.2.7, ne4, 01:35:15

  *                         via 192.168.80.1, vlan0, 01:35:15

O>* 192.168.13.0/29 [110/26] via 192.168.2.7, ne4, 01:34:25

  *                          via 192.168.80.1, vlan0, 01:34:25

O>* 192.168.14.0/24 [110/20] via 192.168.1.1, ne3, 01:40:11

O>* 192.168.16.0/23 [110/26] via 192.168.2.7, ne4, 01:34:15

  *                          via 192.168.80.1, vlan0, 01:34:15

O>* 192.168.19.0/24 [110/30] via 192.168.1.1, ne3, 01:33:11

C>* 192.168.44.0/24 is directly connected, lo1

O   192.168.80.0/24 [110/10] is directly connected, vlan0, 01:35:15

C>* 192.168.80.0/24 is directly connected, vlan0

O>* 192.168.201.1/32 [110/21] via 192.168.1.1, ne3, 01:33:11

O>* 192.168.201.2/32 [110/21] via 192.168.2.7, ne4, 01:34:35

  *                           via 192.168.80.1, vlan0, 01:34:35

O>* 192.168.201.3/32 [110/27] via 192.168.2.7, ne4, 01:34:25

  *                           via 192.168.80.1, vlan0, 01:34:25

O>* 192.168.201.4/32 [110/31] via 192.168.1.1, ne3, 01:33:01

C>* 111.11.117.0/24 is directly connected, ne5



ganymed-ospfd# show ip ospf

 OSPF Routing Process, Router ID: 192.168.1.254

 Supports only single TOS (TOS0) routes

 This implementation conforms to RFC2328

 RFC1583Compatibility flag is enabled

 OpaqueCapability flag is enabled

 SPF schedule delay 5 secs, Hold time between two SPFs 10 secs

 Refresh timer 10 secs

 This router is an ASBR (injecting external routing information)

 Number of external LSA 3

 Number of areas attached to this router: 1



 Area ID: 0.0.0.0 (Backbone)

   Number of interfaces in this area: Total: 3, Active: 6

   Number of fully adjacent neighbors in this area: 3

   Area has no authentication

   SPF algorithm executed 15 times

   Number of LSA 29



ganymed-ospfd# show ip ospf neighbor



Neighbor ID     Pri   State           Dead Time   Address         Interface          

graphics/ccc.gif RXmtL RqstL DBsmL

192.168.1.1      1   Full/Backup     00:00:33    192.168.1.1     ne3:192.168.1.254    0   

graphics/ccc.gif  0     0

192.168.2.7      1   Full/Backup     00:00:3 1   192.168.2.7     ne4:192.168.2.254    0   

graphics/ccc.gif  0     0

192.168.2.7      1  Full/Backup      00:00:31    192.168.80.1    vlan0:192.168.80.254 0   

graphics/ccc.gif  0     0



ganymed-ospfd# show ip ospf border-routers

============ OSPF router routing table =============

R    192.168.1.1           [10] area: 0.0.0.0, ABR, ASBR

                           via 192.168.1.1, ne3

R    192.168.2.7           [10] area: 0.0.0.0, ASBR

                           via 192.168.2.7, ne4

                           via 192.168.80.1, vlan0

R    192.168.201.1      IA [20] area: 0.0.0.0, ASBR

                           via 192.168.1.1, ne3

R    192.168.201.2         [20] area: 0.0.0.0, ABR, ASBR

                           via 192.168.2.7, ne4

                           via 192.168.80.1, vlan0

R    192.168.201.4         [30] area: 0.0.0.0, ABR

                           via 192.168.1.1, ne3



ganymed-ospfd# show ip ospf route

============ OSPF network routing table ============

N    192.168.1.0/24        [10] area: 0.0.0.0

                           directly attached to ne3

N    192.168.2.0/24        [10] area: 0.0.0.0

                           directly attached to ne4

N    192.168.7.0/24        [20] area: 0.0.0.0

                           via 192.168.2.7, ne4

                           via 192.168.80.1, vlan0

N IA 192.168.13.0/29       [26] area: 0.0.0.0

                           via 192.168.2.7, ne4

                           via 192.168.80.1, vlan0

N IA 192.168.14.0/24       [20] area: 0.0.0.0

                           via 192.168.1.1, ne3

N IA 192.168.16.0/23       [26] area: 0.0.0.0

                           via 192.168.2.7, ne4

                           via 192.168.80.1, vlan0

N IA 192.168.19.0/24       [30] area: 0.0.0.0

                           via 192.168.1.1, ne3

N    192.168.80.0/24       [10] area: 0.0.0.0

                           directly attached to vlan0

N IA 192.168.201.1/32      [21] area: 0.0.0.0

                           via 192.168.1.1, ne3

N    192.168.201.2/32      [21] area: 0.0.0.0

                           via 192.168.2.7, ne4

                           via 192.168.80.1, vlan0

N IA 192.168.201.3/32      [27] area: 0.0.0.0

                           via 192.168.2.7, ne4

                           via 192.168.80.1, vlan0

N IA 192.168.201.4/32      [31] area: 0.0.0.0

                           via 192.168.1.1, ne3



============ OSPF router routing table =============

R    192.168.1.1           [10] area: 0.0.0.0, ABR, ASBR

                           via 192.168.1.1, ne3

R    192.168.2.7           [10] area: 0.0.0.0, ASBR

                           via 192.168.2.7, ne4

                           via 192.168.80.1, vlan0

R    192.168.201.1      IA [20] area: 0.0.0.0, ASBR

                           via 192.168.1.1, ne3

R    192.168.201.2         [20] area: 0.0.0.0, ABR, ASBR

                           via 192.168.2.7, ne4

                           via 192.168.80.1, vlan0

R    192.168.201.4         [30] area: 0.0.0.0, ABR

                           via 192.168.1.1, ne3



============ OSPF external routing table ===========

N E2 172.16.7.0/24         [10/20] tag: 0

                           via 192.168.2.7, ne4

                           via 192.168.80.1, vlan0