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.
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 0RTB's ospfd.conf
interface ppp0 ip ospf network point-to-point router ospf network 10.0.0.1/32 area 0
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 0RTB's ospfd.conf
interface ppp0 ip ospf network point-to-point router ospf network 10.0.0.1/32 area 0In Cisco 26xx's IOS there is "point-to-point" network type. Use it.
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 64All should be Ok.
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
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.
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
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).
type bit/sec | bytes/sec | OSPF cost |
---|---|---|
eth 1G | 100M | 1 |
eth 100M | 10M | 10 |
eth 10M | 1M | 100 |
sbni 2M | 200K | 500 |
sbni 1M | 100K | 1000 |
sbni 500K | 50K | 2000 |
sbni 250K | 25K | 4000 |
sbni 125K | 12500 | 8000 |
sbni 62500 | 6250 | 16000 |
async 115200 | 9216 | 10850 |
async 57600 | 4608 | 21700 |
async 38400 | 3072 | 32550 |
async 19200 | 1636 | 61120 |
async 9600 | 768 | 65535 (130210 impossible) |
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.
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:
ip route 224.0.0.5/32 127.0.0.1 ip route 224.0.0.6/32 127.0.0.1
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
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.
Q: What is Opaque LSA for ?
A: Masahiko Endo: The Opaque-LSA module is an implementation of rfc2370 specification.
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.
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!)
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.