OSPF Routing

Hello,

i´m new to mikrotik hardware and got some basic questions about some setup for a router. We use a CCR2004-16G-2S+ in our network and try to set it up for OSPF.

The goal is this:
SFP1 is vlan100 with a static IP addresse (uplink)
SFP2 and the rest of the ports is vlan200 also with a static IP address (local network)
The mikrotik should see all avaibele Networks via OSPF
vlan200 should reach any network which is propaged via OSPF

Both vlans should be untagged on the interfaces. The address from vlan100 and vlan200 should be anounced via OSPF. Also in front of sfp1 is a large network where all routers talk OSPF and propaged the different networks.

I get the problem, that the vlan100 get no connection to the switches/routers in the network from vlan100 and also there are no OSPF Routes shown up in the mikrotik. I guess that i have a problem with the vlan and the ospf config and will be happy for any help or example.

Regards
gerribaldi

I wouldn’t classify the topic as “Beginner Basics” but who am I to judge?
Anyway, is the router part of the backbone or a different area? Do the timers match?

An exported config would help finding the cause of the problem:

/export file=anynameyouwish (minus sensitive info)

I´m new to the mirkotik hardware that was the reason for the beginners forum. Also i guess that i mix up my config a bit and there probaly more than one error :slight_smile:
The area is everywhere the same, we got only one area

But if this is the wrong place i can forward this to the general forum…

/interface vlan
add interface=sfp-sfpplus2 name=vlan1 vlan-id=1
add interface=sfp-sfpplus1 name=vlan100 vlan-id=1201
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/port
set 0 name=serial0
set 1 name=serial1
/routing id
add disabled=no id=192.168.5.1 name=192.168.5.1 select-dynamic-id=only-vrf \
    select-from-vrf=main
/routing ospf instance
add disabled=no name=ospf-instance-1 router-id=192.168.5.1
/routing ospf area
add disabled=no instance=ospf-instance-1 name=ospf-area-1
/snmp community
set [ find default=yes ] disabled=yes
add addresses=::/0 name=lesen
/ip address
add address=192.168.88.10/24 comment=defconf interface=ether15 network=\
    192.168.88.0
add address=192.168.5.1/24 comment="intern" interface=sfp-sfpplus2 \
    network=192.168.5.0
add address=172.16.1.101/24 comment="Transfer" interface=\
    sfp-sfpplus1 network=172.16.1.0
/routing ospf interface-template
add area=ospf-area-1 disabled=no networks=192.168.5.0/24
add area=ospf-area-1 disabled=no networks=172.16.1.0/24
/snmp
set contact="jochen may" enabled=yes location=rz4-rathausgasse \
    trap-community=lesen
/system note
set show-at-login=no
/system ntp server
set enabled=yes
/system routerboard settings
set enter-setup-on=delete-key

I think the main problem is in the VLAN part of the configuration (misconfiguration and mismatched vlan-ids) and not in the OSPF part, so good thing you posted here.

Now to the VLAN - I would bridge all of the VLAN200 ports (except one so you don’t lock yourself out during the setup) and assign the VLAN200 interface onto the newly created bridge. After that, I would fix the VLAN IDs, change the addresses to be on the VLAN interfaces and not on the physical ones and I would configure Bridge VLAN filtering:

/interface bridge
add name=bridge_VLAN200

/interface bridge port
add bridge=bridge_VLAN200 interface=sfp-sfpplus2
add bridge=bridge_VLAN200 interface=ether1 pvid=200
add bridge=bridge_VLAN200 interface=ether2 pvid=200
add bridge=bridge_VLAN200 interface=ether3 pvid=200
add bridge=bridge_VLAN200 interface=ether4 pvid=200
add bridge=bridge_VLAN200 interface=ether5 pvid=200
add bridge=bridge_VLAN200 interface=ether6 pvid=200
add bridge=bridge_VLAN200 interface=ether7 pvid=200
add bridge=bridge_VLAN200 interface=ether8 pvid=200
add bridge=bridge_VLAN200 interface=ether9 pvid=200
add bridge=bridge_VLAN200 interface=ether10 pvid=200
add bridge=bridge_VLAN200 interface=ether11 pvid=200
add bridge=bridge_VLAN200 interface=ether12 pvid=200
add bridge=bridge_VLAN200 interface=ether13 pvid=200
add bridge=bridge_VLAN200 interface=ether14 pvid=200
add bridge=bridge_VLAN200 interface=ether16 pvid=200

/interface vlan
set [ find interface=sfp-sfpplus2 ] name=vlan200 interface=bridge_VLAN200 vlan-id=200
set [ find interface=sfp-sfpplus1 ] vlan-id=100

/ip address
set [ find interface=sfp-sfpplus2 ] interface=bridge_VLAN200

/interface bridge vlan
add bridge=bridge_VLAN200 tagged=bridge_VLAN200,sfp-sfpplus2 vlan-ids=200

Note: In the configuration I assume that SFP2 acts as a trunk port

In the OSPF part of your configuration you could specify the VLAN interfaces for the interface templates instead of networks:

/routing ospf interface-template
add area=ospf-area-1 disabled=no interfaces=vlan100,vlan200