Syntax Query

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

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
/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"

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…

:blush:

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! :slight_smile:

superb, thanks!