Is there any way to change the link state (without rebooting the routers)
You can remove and then re-add all "Interfaces" in /routing ospf interface, which apparently kicks OSPF (or possibly kills it outright) enough to get it to reset the interfaces, but this is a bit of a pain. Otherwise you can reboot the router. It would be nice if there was a way to restart (and find, in the case of 100% CPU usage, for example) errant processes.
shouldn't the link continually try to reset if it isn't connected?
Yes, but the current implementation seems to have some problems. In particular, we've noticed:
If an interface was in a bridge but is no longer in a bridge, OSPF will probably not work correctly until the router is rebooted. A symptom of this condition is that a router on one side of the link will be stuck in "Init" in the OSPF Neighbor display, while the router on the other side may show either "Full" or nothing at all (the other router doesn't appear as a neighbor).
Changing an address on an interface may also behave similarly to the above. And just today, i've discovered that adding a comment to an interface or possibly to an address, can screw up OSPF on that interface. (2.9.44ish versions) (rebooting fixes this also).
有时,一个路由器会决定其nei之一ghbors is no longer valid and change the neighbor state to down. (2.9.46 and earlier). I'm still trying to track this one down, but so far doing packet captures I see no reason for this behaviour, but its causing a problem in our network because its resulting in unnecessary route flapping. It appears that it may be related to routers that have static entries in their route tables, but I haven't confirmed this yet. (there are other problems with OSPF and static route entries though).
As for A->B->C->back to A, assuming the following:
A <- 192.168.0.0/30 -> B
< - 192.168.0.2/30 > C
B <- 192.168.0.4/30 -> C
On router A: networks should be: 192.168.0.0/30 and 192.168.0.2/30
On router B: networks should be: 192.168.0.0/30 and 192.168.0.4/30
On router C: networks should be: 192.168.0.2/30 and 192.168.0.4/30
The Networks portion of OSPF only controls whether an interface (or actually, in RouterOS's case, a subnet on an interface) is speaking the OSPF protocol or not, and what area that interface is in. it does NOT control whether a network will be advertised by OSPF or not. Another router, D, connected to B would still hear about the 192.168.0.2/30 network via OSPF, even though that network is not listed in B's or D's networks. In Cisco land, if one just wants to run OSPF on all interfaces, one can get away with doing either 0.0.0.0/0 or, in the case above 192.168.0.0/28, but on RouterOS, while this may appear to work initially, it will eventually fail, as RouterOS does not properly recognize supernets (something in the underlying ospf implementation does not recognize that 192.168.0.0/30 is "included" in 192.168.0.0/28); which is irritating because one must then list each individual network, which on a router with lots of interfaces that is only in the backbone (or other OSPF area, but not participating in a second area or the backbone), the networks list almost becomes redundant with the addresses list. Furthermore, in cisco land, if one wants all but "some" interfaces to be in the backbone, you can do things like:
0.0.0.0/0 = backbone
192.168.0.0/30 = area2
...
Also, note that an interface does NOT have to be listed in interfaces for OSPF to run over that interface (thats what "networks" controls), but interfaces lets you change the defaults/parameters for an interface, which will otherwise use defaults (or the "all") interface for its settings. (it may be however that if there are NO interfaces listed at all, then OSPF does not run, otherwise the remove/re-add reset trick metioned at the beginning might not work). This may seem redundant, but an interface can have more than one address, and each address "looks" like a different interface (and possibly different area) to OSPF.
Sorry to go off on some tangents, I hope your questions got answered in the process, but i've been having some OSPF problems with RouterOS, and this seemed like a good place to vent about them.
The above is based on a combination of extensive cisco experience, fairly extensive RouterOS experience, a reading of the OSPF RFC, and several other OSPF related documents. If anything in the above is incorrect or works differently than I think it does, please elaborate, and please explain why that is the case.
If you have a relatively simple "hub-and-spoke" network you probably won't notice most of these issues, if you have a complex network with rings in it, these problems are more likely to crop up. (or to put it another way, a network where which router is the parent, and which is the child, can change, such as in the a->b->c->a example.)
P.S. integrating cisco (IOS) and Mikrotik (RouterOS) Networks:
RouterOS interface priority X is equivalent to IOS message-digest-key X.
RouterOS can "run" ospf on every network on an interface, IOS will only run it over the primary IP address. (mikrotiks will send a hello with a source address of every defined address on an interface, if that address's subnet is listed in "networks". IOS will only send hellos from the primary IP address; VLANs can be used to get around this limitation).
IOS允许用于定义supernet面积标准ticipation, RouterOS requires exact matches (or bad things happen later. sometimes RouterOS seems to recognize supernets, and sometimes it doesn't. The mismatch eventually leads to problems.)
Static routes can get "stuck" in the mikrotik OSPF process even though they don't appear in the routing table. This is especially true for 0.0.0.0/0 static routes, so try to avoid having static routes (or at least ones which may change) when using OSPF. (For instance, you have a static route 0.0.0.0/0 somegateway in the routing table. you delete it, disable it, or it becomes invalid; however, RouterOS ospf will still advertise this route (given appropriate Redistribute OSPF settings) to its neighbors. This may result in a routing loop as the information being advertised via OSPF does not match the routing tables).
Hopefully this has been helpful to one or more people.