Failure removing interface from OSPF (RB800 v5.5 and v5.6)

Any hint on how to remove interfaces from OSPF ?

RB800 running v5.6

[engenharia@MikroTik] > /routing ospf interface print
Flags: X - disabled, I - inactive, D - dynamic, P - passive
 #    INTERFACE                                               COST PRIORITY NETWORK-TYPE   AUTHENTICATION AUTHENTICATION-KEY
 0 DP loopback0                                                 10        1 broadcast      none
 1 D  ether1                                                    10        1 broadcast      none
 2 D  ether1                                                    10        1 broadcast      none
 3 D  vlan2                                                     10        1 broadcast      none
 4 D  ether3                                                    10        1 broadcast      none
(snip)

[engenharia@MikroTik] > routing ospf interface remove 0
no such item (4)
[engenharia@MikroTik] >



[engenharia@MikroTik] > /system resource print
                   uptime: 19m51s
                  version: 5.6
              free-memory: 219892KiB
             total-memory: 256320KiB
                      cpu: e500v2
                cpu-count: 1
            cpu-frequency: 799MHz
                 cpu-load: 9%
           free-hdd-space: 465560KiB
          total-hdd-space: 520192KiB
  write-sect-since-reboot: 8189
         write-sect-total: 2506813
               bad-blocks: 0%
        architecture-name: powerpc
               board-name: RB800
                 platform: MikroTik
[engenharia@MikroTik] >

Look at the first column. That interface is dynamic, so you can’t remove it.

Either remove the entry under “/routing ospf interface” that says “all” and add specific entries for the interfaces you want OSPF to run on, or edit the entries under “/routing ospf network” to only match IP addresses on interfaces you want OSPF to run on. I think the first option is cleaner.

Thanks for the suggestion.

I’m unsure on how to find the “interface=all” entry.
“/routing ospf interface print” is not showing all entries.
It seems ROS is having trouble scanning the OSPF interface list.
I have also tried both commands below, but they never end.

/routing ospf interface remove [find interface=all]



/routing ospf interface remove [find]



Post the output of “/routing ospf export”.

The command freezes on the following point.

[engenharia@MikroTik] > /routing ospf export
# jan/01/1970 22:49:46 by RouterOS 5.6
# software id = 80HX-K4N1
#
/routing ospf instance
set default disabled=no distribute-default=never in-filter=ospf-in metric-bgp=auto metric-connected=20 metric-default=1 \
    metric-other-ospf=auto metric-rip=20 metric-static=20 name=default out-filter=ospf-out redistribute-bgp=no \
    redistribute-connected=no redistribute-other-ospf=no redistribute-rip=no redistribute-static=no router-id=1.1.1.1
/routing ospf area
set backbone area-id=0.0.0.0 disabled=no instance=default name=backbone type=default
add area-id=0.0.0.1 disabled=no instance=default name=area1 type=default



That doesn’t seem right. Just having an instance and an area defined shouldn’t activate OSPF, you need to define interfaces and networks defined as well.

Sorry, I failed to make it clear, by “the command freezes” I meant it never returns a result past that point, and the command prompt is not issued again. It seems the command is having trouble scanning the “routing ospf interface” portion of configuration. Please see below.

[engenharia@MikroTik] > /routing ospf instance export

jan/01/1970 23:31:06 by RouterOS 5.6

software id = 80HX-K4N1

/routing ospf instance
set default disabled=no distribute-default=never in-filter=ospf-in metric-bgp=auto metric-connected=20 metric-default=1
metric-other-ospf=auto metric-rip=20 metric-static=20 name=default out-filter=ospf-out redistribute-bgp=no
redistribute-connected=no redistribute-other-ospf=no redistribute-rip=no redistribute-static=no router-id=1.1.1.1
[engenharia@MikroTik] >
[engenharia@MikroTik] >
[engenharia@MikroTik] > /routing ospf area export

jan/01/1970 23:31:13 by RouterOS 5.6

software id = 80HX-K4N1

/routing ospf area
set backbone area-id=0.0.0.0 disabled=no instance=default name=backbone type=default
add area-id=0.0.0.1 disabled=no instance=default name=area1 type=default
[engenharia@MikroTik] >
[engenharia@MikroTik] >
[engenharia@MikroTik] > /routing ospf network export

jan/01/1970 23:31:18 by RouterOS 5.6

software id = 80HX-K4N1

/routing ospf network
add area=area1 disabled=no network=0.0.0.0/0
[engenharia@MikroTik] >
[engenharia@MikroTik] >
[engenharia@MikroTik] > /routing ospf interface export

jan/01/1970 23:31:23 by RouterOS 5.6

software id = 80HX-K4N1

(The command is frozen at this point – Everton)



Oh! Sorry, I misunderstood. My bad.

I think you should email support@mikrotik.com with a supout.rif (http://wiki.mikrotik.com/wiki/Manual:Support_Output_File) and a description of the problem as well as a link to this topic. That is definitely not right, and needs looking at by the official support team (which may or may not see this thread, these are user forums and official support may not respond here).

Well, i think that there are two issues here:

One is that on ospf network you have 0.0.0.0/0, and Mikrotik OSPF implementation adds the interfaces automatic.

The print command need´s to be addressed to Mikrotik support team.

Meanwhile, you should put the only the networks where you need ospf.

Kindly regards,

No, the Mikrotik OSPF implementation does not add interfaces automatically. All interfaces have been explicitely added to OSPF thru “/routing ospf interface add interface=all”. Problem is, I am unable to undo it.

The 0.0.0.0/0 network on OSPF is working fine, as expected.

maybe, RTFM?..

network > (IP prefix; Default: ) - the network prefix associated with the area. OSPF > will be enabled on all interfaces that has at least one address falling within this range> . Note that the network prefix of the address is used for this check (i.e. not the local address). For point-to-point interfaces this means the address of the remote endpoint.

Chupaka,
You are right, removing the 0.0.0.0/0 network from OSPF fixed things.

Jorge Amaral,
Sorry, my bad, it seems you had spotted the root problem, but I failed to understand your help.

Thanks a lot guys,
Everton

again, you can use 0.0.0.0/0 and then statically add necessary interfaces with appropriate settings, following by

/routing ospf interface
add disabled=no interface=all network-type=point-to-point passive=yes

this will disable OSPF on all dynamically added interfaces

But that is exactly what he’s having a problem with. When he runs the command to remove the entry he has that enables OSPF on all interfaces, the command never finishes and dies, just like when printing the interface list. At least that’s what was posted above, where he describes that “/routing ospf interface { remove [find] }” fails.

unfortunately, I cannot repeat that hang on my test v5.6…

esmarques, can you make supout.rif? I’d like to look at it: chupaka [shift+2] gmail.com :slight_smile:

Yeah, I can’t reproduce on 5.5 or 5.6, either. Might be RB800 specific, I don’t have any of those.

by the way, as he said, removing ‘0.0.0.0/0’ solved the problem, so he doesn’t have any static interface settings, AFAICS

You described what I was trying to achieve when I hit the problem. Since I have lots of VLAN interfaces to handle, I now suppose that to control OSPF interfaces thru the use of network statements seems safer…?

Sure, in which state should I make the supout.rif?

I just want to look at /rou ospf interface section - maybe supout generator won’t hang on it =)

well, not =) I’m using exactly the way I described. because you explicitly set OSPF interfaces, and any interface that can appear dynamically in list will be passive (i.e. disabled for OSPF)