Change OSPF authentication settings over the terminal

Hi,

I have been trying to figure out how the terminal CLI works but I just can’t understand the syntax. I want to change the bridge1 interface OSPF authentication to md5, set a authentication-key and authentication-key-id. I have worked with Linux and UNIX CLIs for 25 years and intuitively the command should look something like this:

/routing ospf interface set 0 authentication=md5 authentication-key-id=2 authentication-key="redacted"

but Mikrotik has decided to invent a square wheel and make simple things complicated i.e., the command gives me “no such item (4)”

what is the proper procedure of changing values over the terminal? The manual was not very helpful as the interface mtu change example is practically similar as mine. Also tried the edit interface i.e.,

/routing ospf interface > edit 0

and got prompt for value-name. After entering authentication I just got a blank newline which did not accept input. Interface 0 is the bridge1 interface from

/routing ospf interface> print

Thanks in advance!

Hi duckasylum,

I’m on ROS7, and I’d have to use interface-template (instead of interface), but I guess in your case you’ll have to

/routing ospf interface print

to generate the index of interface configurations so it knows which one you are referring to when using ‘0’.
The 0 doesn’t mean “interface 0”, but entry #0 in the current submenu’s entry list.
You can read more about the CLI in the extensive documentation: https://help.mikrotik.com/docs/display/ROS/Command+Line+Interface

then your command should work:

/routing ospf interface set 0 authentication=md5 authentication-key-id=2 authentication-key="redacted"

to change the settings of the frist interface(-template) with #0.
If /routing ospf interface doesn’t work in ROS6 either, try /routing ospf interface-template instead. Interfaces are just derived from the templates.


I’ve been reading this topic because I was trying to enable MD5 auth, too. In my case (ROS 7.3.1) setting authentication mode, key-id and key on one side doesn’t keep the other side from creating a FULL-adjacency… I’ll have to look into this more closely though.

BR,
Johannes