Community discussions

MikroTik App
 
User avatar
Aveyer
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 66
Joined: Thu Jun 24, 2010 11:17 pm

OSPF loopback problem

Sun Jul 07, 2013 11:10 pm

I'm deploying OSPF on my small network here, the problem is that whenever an interface goes down (AP reboot) OSPF and its routes also goes down, I made a loopback interface for OSPF but the problem is still happening.

Here is config exports from Tiks at two sites I'm testing it with, I'm temporarily using Broadcast but the same problem exists with NBMA.
I also tried without MD5 encryption.

Anyone know what's up?

Site 1:
/ip address
add address=172.16.1.14/28 disabled=no interface=vlan10_Network network=172.16.1.0
add address=172.16.1.17/28 disabled=no interface=vlan10_Network network=172.16.1.16
add address=10.1.1.1/25 disabled=no interface=vlan20_Customers network=10.1.1.0
add address=192.168.255.2/32 disabled=no interface=bridge_ospf network=192.168.255.2
/routing ospf instance
set [ find default=yes ] 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=OSPF out-filter=ospf-out redistribute-bgp=no \
    redistribute-connected=as-type-1 redistribute-other-ospf=no redistribute-rip=no \
    redistribute-static=no router-id=192.168.255.2
/routing ospf area
set [ find default=yes ] area-id=0.0.0.0 disabled=no instance=OSPF name=backbone \
    type=default
/routing ospf interface
add authentication=md5 authentication-key=*** authentication-key-id=1 cost=10 \
    dead-interval=40s disabled=no hello-interval=10s instance-id=0 interface=\
    bridge_ospf network-type=broadcast passive=no priority=1 retransmit-interval=5s \
    transmit-delay=1s use-bfd=no
add authentication=md5 authentication-key=*** authentication-key-id=1 cost=10 \
    dead-interval=40s disabled=no hello-interval=10s instance-id=0 interface=\
    vlan10_Network network-type=broadcast passive=no priority=1 retransmit-interval=\
    5s transmit-delay=1s use-bfd=no
/routing ospf network
add area=backbone disabled=no network=192.168.255.2/32
add area=backbone disabled=no network=172.16.1.0/28
add area=backbone disabled=no network=172.16.1.16/28
/interface bridge
add admin-mac=00:00:00:00:00:00 ageing-time=5m arp=enabled auto-mac=yes disabled=no \
    forward-delay=15s l2mtu=1520 max-message-age=20s mtu=1500 name=Bridge_ports1-5 \
    priority=0x8000 protocol-mode=none transmit-hold-count=6
add admin-mac=00:00:00:00:00:00 ageing-time=5m arp=enabled auto-mac=yes disabled=no \
    forward-delay=15s l2mtu=65535 max-message-age=20s mtu=1500 name=bridge_ospf \
    priority=0x8000 protocol-mode=none transmit-hold-count=6
/interface ethernet
set 0 arp=enabled auto-negotiation=yes bandwidth=unlimited/unlimited disabled=no \
    full-duplex=yes l2mtu=1520 mac-address=D4:CA:6D:32:73:F5 master-port=none mtu=\
    1500 name="eth1_toughswitch pro" speed=100Mbps
set 1 arp=enabled auto-negotiation=yes bandwidth=unlimited/unlimited disabled=no \
    full-duplex=yes l2mtu=1520 mac-address=D4:CA:6D:32:73:F6 master-port=none mtu=\
    1500 name=eth2_homeplug speed=100Mbps
/interface vlan
add arp=enabled disabled=no interface=Bridge_ports1-5 l2mtu=1516 mtu=1500 name=\
    vlan20_Customers use-service-tag=no vlan-id=20
add arp=enabled disabled=no interface=Bridge_ports1-5 l2mtu=1516 mtu=1500 name=\
    vlan10_Network use-service-tag=no vlan-id=10
Site 2:
/ip address
add address=172.16.1.30/28 disabled=no interface=vlan10_Network network=\
    172.16.1.16
add address=172.16.1.33/28 disabled=no interface=vlan10_Network network=\
    172.16.1.32
add address=10.1.1.129/25 disabled=no interface=vlan20_Customers network=\
    10.1.1.128
add address=192.168.255.3/32 disabled=no interface=bridge_ospf network=\
    192.168.255.3
/routing ospf instance
set [ find default=yes ] 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=OSPF \
    out-filter=ospf-out redistribute-bgp=no redistribute-connected=as-type-1 \
    redistribute-other-ospf=no redistribute-rip=no redistribute-static=no \
    router-id=192.168.255.3
/routing ospf area
set [ find default=yes ] area-id=0.0.0.0 disabled=no instance=OSPF name=\
    backbone type=default
/routing ospf interface
add authentication=md5 authentication-key=*** authentication-key-id=1 \
    cost=10 dead-interval=40s disabled=no hello-interval=10s instance-id=0 \
    interface=bridge_ospf network-type=broadcast passive=no priority=1 \
    retransmit-interval=5s transmit-delay=1s use-bfd=no
add authentication=md5 authentication-key=*** authentication-key-id=1 \
    cost=10 dead-interval=40s disabled=no hello-interval=10s instance-id=0 \
    interface=vlan10_Network network-type=broadcast passive=no priority=1 \
    retransmit-interval=5s transmit-delay=1s use-bfd=no
/routing ospf network
add area=backbone disabled=no network=192.168.255.3/32
add area=backbone disabled=no network=172.16.1.16/28
/interface bridge
add admin-mac=00:00:00:00:00:00 ageing-time=5m arp=enabled auto-mac=yes \
    disabled=no forward-delay=15s l2mtu=1520 max-message-age=20s mtu=1500 name=\
    bridge_ports2-4 priority=0x8000 protocol-mode=none transmit-hold-count=6
add admin-mac=00:00:00:00:00:00 ageing-time=5m arp=enabled auto-mac=yes \
    disabled=no forward-delay=15s l2mtu=65535 max-message-age=20s mtu=1500 \
    name=bridge_ospf priority=0x8000 protocol-mode=none transmit-hold-count=6
/interface ethernet
set 0 arp=enabled auto-negotiation=yes bandwidth=unlimited/unlimited disabled=\
    no full-duplex=yes l2mtu=1520 mac-address=D4:CA:6D:78:5C:A7 master-port=\
    none mtu=1500 name=eth1_RocketDish speed=100Mbps
set 1 arp=enabled auto-negotiation=yes bandwidth=unlimited/unlimited disabled=\
    no full-duplex=yes l2mtu=1520 mac-address=D4:CA:6D:78:5C:A8 master-port=\
    none mtu=1500 name="eth2_5Ghz sector 120W" speed=100Mbps
/interface vlan
add arp=enabled disabled=no interface=bridge_ports2-4 l2mtu=1516 mtu=1500 name=\
    vlan10_Network use-service-tag=no vlan-id=10
add arp=enabled disabled=no interface=bridge_ports2-4 l2mtu=1516 mtu=1500 name=\
    vlan20_Customers use-service-tag=no vlan-id=20
 
onnoossendrijver
Member
Member
Posts: 488
Joined: Mon Jul 14, 2008 11:10 am
Location: The Netherlands

Re: OSPF loopback problem

Mon Jul 08, 2013 12:16 am

You want the IP subnet on an interface stay in the routing table when the interface it belongs to goes down?
 
User avatar
Aveyer
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 66
Joined: Thu Jun 24, 2010 11:17 pm

Re: OSPF loopback problem

Mon Jul 08, 2013 12:45 am

None of the IPs or networks leave the routing table, just OSPF routes.
As you seen in the config of Site 2, I'm using vlans on a bridge which bridges ports 1-4 because I may be using a ToughSwitch there soon.
Currently the backhaul is plugged into eth1 and the AP on eth2 and when I reboot the AP, OSPF drops even though the vlan and bridge are still running.

There is no difference when I use loopback vs no loopback.
 
CelticComms
Forum Guru
Forum Guru
Posts: 1765
Joined: Wed May 02, 2012 5:48 am

Re: OSPF loopback problem

Mon Jul 08, 2013 3:07 pm

I'm not sure what the exact topology is that you are referring to but in general, if an OSPF router cannot talk to its OSPF neighbour then yes it will end up removing routes that are dependent on that neighbour.

The lack of communication with that neighbour will also typically cause an election for DR and BDR on that segment in both broadcast and NBMA network types.
 
eflanery
Member
Member
Posts: 376
Joined: Fri May 28, 2004 10:11 pm
Location: Moscow, ID
Contact:

Re: OSPF loopback problem

Mon Jul 08, 2013 6:42 pm

Try setting a static 'admin' MAC address on the bridge.

If the port that the bridge is adopting it's MAC address from leaves the bridge (or goes down), the bridge (and all VLANs on the bridge) will adopt a MAC from a different port, causing OSPF to reset.

This can be prevented by setting admin-mac='some MAC' and auto-mac=no

--Eric
 
User avatar
Aveyer
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 66
Joined: Thu Jun 24, 2010 11:17 pm

Re: OSPF loopback problem

Tue Jul 09, 2013 4:23 am

Try setting a static 'admin' MAC address on the bridge.

If the port that the bridge is adopting it's MAC address from leaves the bridge (or goes down), the bridge (and all VLANs on the bridge) will adopt a MAC from a different port, causing OSPF to reset.

This can be prevented by setting admin-mac='some MAC' and auto-mac=no

--Eric
That was it! OSPF now stays up all the time.

Thanks so much.
 
eflanery
Member
Member
Posts: 376
Joined: Fri May 28, 2004 10:11 pm
Location: Moscow, ID
Contact:

Re: OSPF loopback problem

Wed Jul 10, 2013 8:24 pm

No problem, glad it worked.

--Eric

Who is online

Users browsing this forum: kristovskis, NanoTik and 18 guests