Community discussions

MikroTik App
 
User avatar
trm3
newbie
Topic Author
Posts: 35
Joined: Mon Jun 04, 2007 7:36 pm
Location: US, NC, Charlotte
Contact:

Syntax Query

Mon Apr 27, 2009 10:31 pm

Can someone provide me the proper syntax to establish multiple OSPF instances (one per VRF)? I can set up the instances, but don't see any way to identify NETWORK entries as belonging to specific instances... I'm probably too Cisco indoctrinated.

I am running a backone OSPF instance tying my core MT routers together along with BGP and LDP as a mesh of PE nodes.

Assuming I want to link with my CE routers using OSPF over VLANs, how do I set up the separate OSPF instances to handle this? All of the examples assume static routing for the MPLS/BGP/LDP network and just use the single backbone OSPF instance for a single VRF... No examples show multiple VRFs.

Thanks,

Tim McKee
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7211
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: Syntax Query

Tue Apr 28, 2009 9:13 am

For example network 1.1.1.0/24 is in VRF table
Configuration below will make new ospf instance, new backbone area for that instance and add network to area
/routing ospf instance add name=myinstance
/routing ospf area add name=myarea area-id=0.0.0.0
/routing ospf network add area=myarea network=1.1.1.0/24
 
User avatar
Eising
Member Candidate
Member Candidate
Posts: 272
Joined: Mon Oct 27, 2008 10:21 am
Location: Copenhagen, Denmark

Re: Syntax Query

Wed Apr 29, 2009 9:29 am

/routing ospf instance add name="customer1"
/routing ospf area add area-id=0.0.0.0 instance="customer1"
# creates customer1-backbone
/routing ospf network add network=0.0.0.0/0 area="customer1-backbone"
 
User avatar
trm3
newbie
Topic Author
Posts: 35
Joined: Mon Jun 04, 2007 7:36 pm
Location: US, NC, Charlotte
Contact:

Re: Syntax Query

Wed Apr 29, 2009 10:50 pm

Working now... Thanks for the help....

It actually works much better when you force a Cisco switch port into trunking mode if the link is on a Vlan... It's no wonder the OSPF neighbors wouldn't set up...

:oops:
 
User avatar
Eising
Member Candidate
Member Candidate
Posts: 272
Joined: Mon Oct 27, 2008 10:21 am
Location: Copenhagen, Denmark

Re: Syntax Query

Thu Apr 30, 2009 1:41 pm

If you consider using MPLS in production, I'd like to share with you two handy macros that will help you in your provisioning:
First is to add an interface to an existing vrf:
/ip route vrf set [ /ip route vrf find routing-mark=customer1 ] interfaces=( [/ip route vrf get [ /ip route vrf find routing-mark=customer1 ] interfaces ] . “,ether2.80”)  
This adds ether2.80 to vrf "customer1"

Second is to add a vrf to the BGP instance:
/routing bgp instance set default vrf=([/routing bgp instance get default vrf ] . “,vrf2”)
This adds vrf2 to the lists of vrfs to announce.

I found these handy as I don't have to recompile lists of interfaces or vrfs from within my provisioning system.

Enjoy! :)
 
User avatar
trm3
newbie
Topic Author
Posts: 35
Joined: Mon Jun 04, 2007 7:36 pm
Location: US, NC, Charlotte
Contact:

Re: Syntax Query

Thu Apr 30, 2009 8:24 pm

superb, thanks!