Unofficial GNU Zebra FAQ

Section: index -> OSPF

Current capacity: 14 Q(s)


  1. Q: I can't get OSPF to work. Where should I look?

    A: Paul: Firstly, try "show ip ospf interface". Make sure that OSPF is running on all the interfaces that are connected to other routers running OSPF. Also make sure that they are in the same area as the adjacent routers, and that they are both "stub" or that neither are "stub". Make sure that the timers are the same on adjacent routers.

    Obviously, you should be able to ping the neighbours IP address too.

    A: Pilot: Read documentation. Try to build an OSPF area on ethernet segment and play with it. You will gain experience. Run tcpdump -n -v -i XXX net 224.0.0.0/24 on you problem interface and look at the output. Pay attention to TTL, timers and authentication.

  2. Q: ospfd and ospfd not working on a PPP link

    A: Example setup: [RTA ospfd ppp0] 10.0.0.1 <-> 10.0.0.2 [RTB ospfd ppp0]
    RTA's ospfd.conf

    interface ppp0
    	ip ospf network point-to-point
    router ospf
    	network 10.0.0.2/32 area 0
    
    RTB's ospfd.conf
    interface ppp0
    	ip ospf network point-to-point
    router ospf
    	network 10.0.0.1/32 area 0
    

  3. Q: CISCO 25xx (IOS 11.x) and ospfd not working on a PPP link

    A: That happens due to timers mismatch. Point-to-multipoint network interface sends hellos each 30 seconds and considers deads each 120 seconds.
    Example setup: [RTA cisco async1] 10.0.0.1 <-> 10.0.0.2 [RTB zebra ppp0]
    RTA's config

    interface async 1
    	ip ospf network point-to-multipoint
    	ip ospf hello-interval 10
    	ip ospf dead-interval 40
    router ospf
    	network 10.0.0.2/32 area 0
    
    RTB's ospfd.conf
    interface ppp0
    	ip ospf network point-to-point
    router ospf
    	network 10.0.0.1/32 area 0
    
    In Cisco 26xx's IOS there is "point-to-point" network type. Use it.

  4. Q: ospfd and ospfd not working on a IP (GRE, NOS) tunnel

    A: OSPF multicast packets die on the fly, hellos do not reach other side. Look at your tunnel configuration. Your tunnel inherits TTL from incoming packets, which is 1 in case of multicast. In Linux you should configure your tunnel with e. g.

    # ip tunnel set tunX ttl 64
    
    All should be Ok.

  5. Q: ospfd and GateD 3.x not working

    A: Njal Sigurdsson: Change OSPF timers in Zebra's ospfd config.

    interface xxx
    	ip ospf hello-interval 60
    	ip ospf dead-interval 180
    	ip ospf retransmit-interval 30
    

  6. Q: OSPF routes learned across the tunnel show as "inactive"

    A: When you configure a tunnel on Linux, you must specify a /32 mask, and specify the remote IP address. Treat tunnel as PPP link.

  7. Q: Redundant routing does not work, although all routers reflect correct link-state.

    A: It is not Zebra, but general dynamic routing specific issue. This situation is typical for networks, which did migration from static routing to dynamic without removing default route record. You have left static default routes in routers configuration files (/etc/sysconfig/network in Linux or in zebra.conf). That's not correct, because REALLY router does not know default route, you set it as static, which has maximum authority and can't be updated by newly learned OSPF announce. Router should only know about networks, which it does routing for, OSPF daemon will do the rest (determine nearby routers, get default route etc.). Remove all occurences of default route from your routers. Move any remaining static routes definitions into zebra.conf, making them have "zebra" protocol in kernel routing table. If one or some of your routers REALLY have default route (e. g. to Internet), use the following:

    router ospf
    	default-information originate
    

  8. Q: How to deal with ip ospf cost command ?

    A: It uses no units, values are only comparisive. It may reflect real link cost, interface speed or preference. You can use following values, which consider 1 gigabit interface having cost 1 (lowest).

    OSPF interface cost table
    type bit/secbytes/secOSPF cost
    eth 1G100M1
    eth 100M10M10
    eth 10M1M100
    sbni 2M200K500
    sbni 1M100K1000
    sbni 500K50K2000
    sbni 250K25K4000
    sbni 125K125008000
    sbni 62500625016000
    async 115200921610850
    async 57600460821700
    async 38400307232550
    async 19200163661120
    async 960076865535 (130210 impossible)
    Another way to reach almost the same is to use the following command:
    router ospf
    	auto-cost reference-bandwidth 1000
    
    ... and to remove any occurences of ip ospf cost xxxx commands from interface sections. Above command also considers 1 gigabit interface to have cost 1, but computed costs for async lines differ.

  9. Q: Problem with Zebra/NetBSD ospfd.

    A: Markus Boeing: Relevant for NetBSD and probably other BDS variants as well. Discussed in [zebra 10698].
    Problem:
    OSPF adjacency between Zebra router (v0.92a, v0.93) on NetBSD (v1.5, v1.6) and a Cisco router on the same Ethernet segment is not established.
    Symptom:
    Zebra router receives Hellos from the Cisco router but is not sending out Hellos. Therefore bidirectional communication cannot be established and an adjacency can not be formed.
    Debug on the Cisco router does not show Hello packets emitted from the Zebra router. Debug on the Zebra router shows incoming Hello packets (HelloReceived, 1-WayReceived) and "sendto in ospf_write failed with No route to host".
    Here is some output from debug on Zebra:

    2001/10/04 19:33:10 OSPF: NSM[ne2:192.168.16.2]: Init (HelloReceived)
    2001/10/04 19:33:10 OSPF: NSM[ne2:192.168.16.2]: nsm_ignore called
    2001/10/04 19:33:10 OSPF: NSM[ne2:192.168.16.2]: Init (1-WayReceived)
    2001/10/04 19:33:17 OSPF: make_hello: options: 2, int: ne2
    2001/10/04 19:33:17 OSPF: *** sendto in ospf_write failed with No route to host
    2001/10/04 19:33:20 OSPF: Packet 192.168.16.2 [Hello:RECV]: Options *|*|-|-|-|-|E|*
    2001/10/04 19:33:20 OSPF: NSM[ne2:192.168.16.2]: Init (HelloReceived)
    2001/10/04 19:33:20 OSPF: NSM[ne2:192.168.16.2]: nsm_ignore called
    2001/10/04 19:33:20 OSPF: NSM[ne2:192.168.16.2]: Init (1-WayReceived)
    2001/10/04 19:33:27 OSPF: make_hello: options: 2, int: ne2
    2001/10/04 19:33:27 OSPF: *** sendto in ospf_write failed with No route to host
    2001/10/04 19:33:30 OSPF: Packet 192.168.16.2 [Hello:RECV]: Options *|*|-|-|-|-|E|*
    
    Analysis:
    The kernel in BSD tries to do a route lookup on the multicast destination 224.0.0.5 (AllSPFROuters), which fails if there is no default-route or other route to a prefix covering that address.
    Solution:
    Add static routes for the multicast addresses 224.0.0.5 (AllSPFRouters) and 224.0.0.6 (AllDRouters) to to zebra.conf:
    ip route 224.0.0.5/32 127.0.0.1
    ip route 224.0.0.6/32 127.0.0.1
    

  10. Q: How to set up a "last resort" route, becoming active only when all dynamic routing fails ?

    A: Rumen Svobodnikov:

    table 253
    ip route 0.0.0.0/0 x.x.x.x
    

  11. Q: ospfd gets stuck in EXSTART mode on a regular basis

    A: There are 2 possible reasons for this: MTU mismatch and MD5 authentication bug in ospfd. Check if your MTU on both sides match and reflects real maximum of packet size. For more MTU details try searching for EXSTART on www.cisco.com. If disabling MD5 authentication helps, look at the index to find the link to the patch.

  12. Q: What is Opaque LSA for ?

    A: Masahiko Endo: The Opaque-LSA module is an implementation of rfc2370 specification.

    1. At the Database exchange phase, an OSPF router will negotiate its capability (in this case, opaque handling) with the new neighbor.
    2. Opaque-LSAs (type-9, 10 and 11) will be exchanged among opaque-capable neighbors only. If an OSPF router is not opaque-capable, and if it received an LSUpdate message which contains Opaque-LSAs, those LSA instances will be ignored. In this way, opaque-capable and -incapable OSPF routers can coexist in the same routing domain.
    3. As the name "opaque" implies, an opaque-capable OSPF router does not care about Opaque-LSA contents. They just handle Opaque-LSAs blindly (maintenance in the LSDB, flooding control etc.).

    Pilot: as you see, we have an abstract message transport capability built into OSPF.

    Masahiko Endo: By defining Opaque-LSA contents and appropriate processing rules, we could have more control over the network behavior and so on.
    For example, we can make use of various traffic-engineering metric encapsulated in type-10 Opaque-LSAs to calculate QoS-aware routes, besides from normal SPF algorithm.

    Pilot: If you participate in a network and somebody uses Opaque LSAs to implement something, you will have to support Opaque LSAs too to perform transit of the messages, although not using them.
    There exists a file docs.tar.gz in maillist archive, containing supporting documentation on Endo's code.

  13. Q: How do I filter incoming OSPF announcements ?

    A: Paul Jakma: You can't, only outgoing announcements may be filtered. (AFAIK - this is true. If it isn't true and you can filter incoming OSPF announcements, I'd love to be told!)

  14. Q: I have a strange problem with ospfd multicast packets in OpenBSD 3.4

    A: Petter Lindquist (http://www.hig.se/~petter/zebra.html):

    Some known problems
    Zebra didn't seem to pick up any multicast (especially OSPF HELLO) packets. They were seen by tcpdump.
    There are some problems with multicast handling in both OpenBSD and Zebra iirc. OpenBSD has b0rken NIC drivers, at least "em" for Intel Gigabit and probably "bge" for Broadcom. Zebra had some problems with byte order.

    How I got it all working
    Get zebra version at least 0.94a and apply this patch to the "em" or this patch to "bge" driver of OpenBSD (I had to do it by hand, hopefully this is fixed for later versions of OpenBSD). Then I guess it's pretty strightforward ospf configuration.