RouterOS 6.25: OSPF: MikroTik & Cisco: wrong AuthType field.

Hello!

Trying to enable OSPF exchange between MikroTik 2011iL and Cisco I have found both devices ignores each other while talking OSPF.
Analysis of sniffed traffic discovered AuthType field of OSPF Hello packet sent by MikroTik is set to value 0x0100 which is not listed in RFC2328.
Traffic example attached to message.

In case my guess is wrong here follows related configurations for both Cisco and MikroTik units.

Cisco IOS Software, 3700 Software (C3745-ADVENTERPRISEK9-M), Version 12.4(25a), RELEASE SOFTWARE (fc2)

interface FastEthernet1/1.1107
 description FastEthernet1/1.1107 10.4.0.14/30   scn-tcex-comstar-k103-backup
 encapsulation dot1Q 1107
 ip vrf forwarding scn
 ip address 10.4.0.14 255.255.255.252
 ip ospf hello-interval 3
 ip ospf 204 area 204
 no cdp enable
!
router ospf 204 vrf scn
 router-id 10.4.0.2
 log-adjacency-changes
 redistribute connected subnets
!

jan/21/2015 04:24:18 by RouterOS 6.24

/interface bridge
add mtu=1500 name=BR-EOIP-NP6A protocol-mode=none

/interface ethernet
set [ find default-name=ether1 ] name=GE01

/interface vlan
add interface=BR-EOIP-NP6A l2mtu=1594 name=VLAN-SCN-COMSTAR-K103 vlan-id=1107

/routing ospf instance
set [ find default=yes ] disabled=yes use-dn=yes
add name=204 router-id=10.4.0.10 routing-table=scn-comstar-k103

/routing ospf area
add area-id=0.0.0.204 instance=204 name=204

/ip address
add address=10.4.0.13/30 interface=VLAN-SCN-COMSTAR-K103 network=10.4.0.12

/ip route vrf
add interfaces=GRE-COMSTAR-K103,VLAN-SCN-COMSTAR-K103 route-distinguisher=10.52.0.19:1107 routing-mark=scn-comstar-k103

/routing ospf interface
add dead-interval=12s hello-interval=3s instance-id=1 interface=VLAN-SCN-COMSTAR-K103 network-type=broadcast

/routing ospf network
add area=204 network=10.4.0.0/24

ospf.pcap.gz (207 Bytes)

Might be implementation bug.

First I moved all the areas on MikroTik devices to default instance with id 0. OSPF works fine.
Next I’ve created another OSPF instance on MikroTik with instance ID#2. Than suscessfully set up OSPF between two MikroTik units using this instance. After dumping and analyzing OSPF traffic I found OSPF packet AuType field changed to 0x0200.

Finally:

  1. Default OSPF instance (#0), no authentication, OSPF AuType field is 0x0000. Nice.
  2. Instance #1, no authentication. OSPF AuType field is 0x0100. Nothing works.
  3. Instance #2, no authentication. OSPF AuType field is 0x0200. Boiling brains.
    Looks like internal instance ID leakage to OSPF AuType field.
    Fix, pls.

Can’t speak to the authtype, but I have had issues between MikroTik and Cisco when using a different instance id dating back to 5.xx code. What I found was that not all Cisco IOS / Platforms allow you to change the instance id in OSPF.

Have a look at RFC 6549:

https://tools.ietf.org/html/rfc6549

OSPFv3 has the instance ID in that byte location of the header. RFC 6549 proposes amending RFC 2328 such that the AuType field is shortened to 8 bits thus leaving space so that the instance ID can also be in the same location of the modified OSPFv2 header.

Thank you CelticComms for reminder :slight_smile:

I have to remember that Cisco OSPF instance-id (router ospf 204 t.ex.) is almost process id not
InstanceID according to RFC6549 which is tid (topology id) within Cisco MTR terms.
Now It’s all clear. Shame on me not did it by myself, thanks again :slight_smile:

Hello again CelticComms.

Things are not as good as could be.

Using Cisco I can create three independent OSPF instances (router ospf 1, router ospf 2 vrf a, router ospf 3 vrf b) operating own routing table and having backbone area 0 each WITHOUT using Multi-Topology Routing at connected equipment.
Since MikroTik instance have only one routing table bound to (/routing ospf instance … routing-table=) can you advice me the MikroTik way to implement above Cisco example WITHOUT Instance-ID (according to RFC6549) extension to OSPFv2?