Community discussions

MikroTik App
 
stuh84
just joined
Topic Author
Posts: 15
Joined: Wed Oct 20, 2010 11:44 am
Location: Sheffield UK

OSPF Multiple Instances and External Routes/LSAs

Thu Nov 22, 2012 12:59 pm

Given my previous topic has been so popular, I decided to try and work around the issue by using multiple instances of OSPF, one based in a VRF. However I now have a new problem.

Image

Same diagram applies, and I have the following configuration running on the Core routers (which naming, cost and IP differences, but the configuration is identical otherwise): -
/ip route vrf
add export-route-targets=65009:2 import-route-targets=65009:2 interfaces=r1-vlan,r2-vlan,r3-vlan,core-link-vrf,msr2 route-distinguisher=65009:2 routing-mark=ospf-test

/routing ospf instance
set [ find default=yes ] distribute-default=always-as-type-1
add distribute-default=always-as-type-1 name=private redistribute-static=as-type-1 routing-table=ospf-test

/routing ospf area
add instance=private name=backbone-priv

/routing ospf interface
add cost=1000 interface=r1-vlan
add cost=1000 interface=r2-vlan
add cost=1000 interface=r3-vlan
add cost=4 interface=core-link-vrf
add cost=1000 interface=msr2

/routing ospf network
add area=backbone-priv network=192.168.51.0/24
add area=backbone-priv network=192.168.52.0/24
add area=backbone-priv network=192.168.53.0/24
add area=backbone-priv network=192.168.200.0/24
add area=backbone-priv network=192.168.111.0/24

/ip route
add distance=1 gateway=31.205.49.186@main routing-mark=ospf-test
add distance=1 dst-address=192.168.41.1/32 gateway=core-link-vrf routing-mark=ospf-test

/ip address print
13   192.168.51.1/24    192.168.51.0  r1-vlan                                                                                                                              
14   192.168.52.1/24    192.168.52.0  r2-vlan                                                                                                                              
15   192.168.53.1/24    192.168.53.0  r3-vlan                                                                                                                              
16   192.168.200.1/24   192.168.200.0 core-link-vrf                                                                                                                        
17   192.168.111.1/24   192.168.111.0 msr2  
R1, R2 and R3 have the following config; -
/ip address print
 7   192.168.51.2/24    192.168.51.0 core-vlan                                                                                                                            
 8   192.168.151.1/24   192.168.151.0   core2-vlan 

/ip route vrf
add export-route-targets=65009:2 import-route-targets=65009:2 interfaces=core-vlan,core2-vlan route-distinguisher=65009:2 routing-mark=ospf-test

/routing ospf instance
add name=private routing-table=ospf-test

/routing ospf area
add instance=private name=backbone-priv

/routing ospf interface
add cost=1000 interface=core-vlan
add interface=core2-vlan

/routing ospf network
add area=backbone-priv network=192.168.51.0/24
add area=backbone-priv network=192.168.151.0/24
Other than IP differences, all 3 are the same config.

Now here is the routing table I get on each of the spoke routers: -

/ip route print where routing-mark=ospf-test
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme, B - blackhole, U - unreachable, P - prohibit 
 #      DST-ADDRESS        PREF-SRC        GATEWAY            DISTANCE
 1 ADC  192.168.51.0/24    192.168.51.2    core-vlan                 0
 2 ADo  192.168.52.0/24                    192.168.51.1            110
 3 ADo  192.168.53.0/24                    192.168.51.1            110
 4 ADo  192.168.111.0/24                   192.168.51.1            110
 5 ADo  192.168.121.0/24                   192.168.51.1            110
 6 ADC  192.168.151.0/24   192.168.151.1   core2-vlan                0
 7 ADo  192.168.152.0/24                   192.168.51.1            110
 8 ADo  192.168.153.0/24                   192.168.51.1            110
 9 ADo  192.168.200.0/24                   192.168.51.1            110

Strange, no default routes, or the route to 192.168.41.1/32. What does the LSA database show?
[showlette@r1] /routing ospf instance> /routing ospf lsa print where area=external   
AREA                                                                                                    TYPE         ID             ORIGINATOR     SEQUENCE-NUMBER        AGE
external                                                                                                as-external  0.0.0.0        192.168.200.1       0x80000004       1008
external                                                                                                as-external  0.0.0.0        192.168.200.2       0x80000026        606
external                                                                                                as-external  192.168.41.1   192.168.200.1       0x80000023       1680

[showlette@r1] /routing ospf instance> /routing ospf lsa print detail where area=external
 instance=private area=external type=as-external id=0.0.0.0 originator=192.168.200.1 sequence-number=0x80000004 age=1029 checksum=0x4C4F options="E|DN" body=
     netmask=0.0.0.0
     forwarding-address=0.0.0.0
     metric=1
     route-tag=0x0
     type1

 instance=private area=external type=as-external id=0.0.0.0 originator=192.168.200.2 sequence-number=0x80000026 age=627 checksum=0x276 options="E|DN" body=
     netmask=0.0.0.0
     forwarding-address=0.0.0.0
     metric=1
     route-tag=0x0
     type1

 instance=private area=external type=as-external id=192.168.41.1 originator=192.168.200.1 sequence-number=0x80000023 age=1701 checksum=0x4C89 options="E|DN" 
   body=
     netmask=255.255.255.255
     forwarding-address=0.0.0.0
     metric=20
     route-tag=0x0
     type1

The logging shows the following when I disable and reenable the default route propagation: -
10:55:34 route,ospf,debug Deleting an LSA 
10:55:34 route,ospf,debug     lsa=Router LSA id=192.168.200.2 originator=192.168.200.2 seqnum=0x8000003a 
10:55:34 route,ospf,debug LSA Update received: Installing and flooding it 
10:55:34 route,ospf,debug     header=AS-External LSA id=0.0.0.0 originator=192.168.200.2 seqnum=0x80000026 
10:55:34 route,ospf,debug Installing an LSA 
10:55:34 route,ospf,debug     lsa=AS-External LSA id=0.0.0.0 originator=192.168.200.2 seqnum=0x80000026 
10:55:34 route,ospf,debug     old=AS-External LSA id=0.0.0.0 originator=192.168.200.2 seqnum=0x80000026 
10:55:34 route,ospf,debug Deleting an LSA 
10:55:34 route,ospf,debug     lsa=AS-External LSA id=0.0.0.0 originator=192.168.200.2 seqnum=0x80000026 
10:55:34 route,ospf,debug Deleting an LSA 
10:55:34 route,ospf,debug     lsa=AS-External LSA id=0.0.0.0 originator=192.168.200.2 seqnum=0x80000026 
Nothing more. When I do the same for the default instance, I get the following: -
10:56:50 route,ospf,debug LSA Update received: Installing and flooding it 
10:56:50 route,ospf,debug     header=Router LSA id=192.168.200.2 originator=192.168.200.2 seqnum=0x8000003c 
10:56:50 route,ospf,debug Installing an LSA 
10:56:50 route,ospf,debug     lsa=Router LSA id=192.168.200.2 originator=192.168.200.2 seqnum=0x8000003c 
10:56:50 route,ospf,debug     old=Router LSA id=192.168.200.2 originator=192.168.200.2 seqnum=0x8000003b 
10:56:50 route,ospf,debug Flooding an LSA 
10:56:50 route,ospf,debug     lsa=Router LSA id=192.168.200.2 originator=192.168.200.2 seqnum=0x8000003c 
10:56:50 route,ospf,debug     area=backbone 
10:56:50 route,ospf,debug Adding to neighbor's retransmit list 
10:56:50 route,ospf,debug     lsa=Router LSA id=192.168.200.2 originator=192.168.200.2 seqnum=0x8000003c 
10:56:50 route,ospf,debug     neighbor=192.168.200.1 
10:56:50 route,ospf,debug     number of retransmits=1 
10:56:50 route,ospf,debug Deleting an LSA 
10:56:50 route,ospf,debug     lsa=Router LSA id=192.168.200.2 originator=192.168.200.2 seqnum=0x8000003b 
10:56:50 route,ospf,debug LSA Update received: Installing and flooding it 
10:56:50 route,ospf,debug     header=AS-External LSA id=0.0.0.0 originator=192.168.200.2 seqnum=0x80000001 
10:56:50 route,ospf,debug Installing an LSA 
10:56:50 route,ospf,debug     lsa=AS-External LSA id=0.0.0.0 originator=192.168.200.2 seqnum=0x80000001 
10:56:50 route,ospf,debug Adding to neighbor's retransmit list 
10:56:50 route,ospf,debug     lsa=AS-External LSA id=0.0.0.0 originator=192.168.200.2 seqnum=0x80000001 
10:56:50 route,ospf,debug     neighbor=192.168.200.1 
10:56:50 route,ospf,debug     number of retransmits=2 
10:56:50 route,ospf,debug SEND: Link State Update 192.168.11.2 -> 224.0.0.5 on r1-eoip 
10:56:50 route,ospf,debug,raw PACKET: 
10:56:50 route,ospf,debug,raw     02 04 00 A0 C0 A8 97 01 00 00 00 00 05 4C 00 00 
10:56:50 route,ospf,debug,raw     00 00 00 00 00 00 00 00 00 00 00 02 00 02 02 01 
10:56:50 route,ospf,debug,raw     C0 A8 C8 02 C0 A8 C8 02 80 00 00 3C 82 39 00 60 
10:56:50 route,ospf,debug,raw     02 00 00 06 C0 A8 0B 05 C0 A8 0B 05 02 00 00 0A 
10:56:50 route,ospf,debug,raw     C0 A8 0C 05 C0 A8 0C 05 02 00 00 0A C0 A8 0D 05 
10:56:50 route,ospf,debug,raw     C0 A8 0D 05 02 00 00 0A C0 A8 78 02 C0 A8 78 01 
10:56:50 route,ospf,debug,raw     02 00 00 0A C0 A8 64 01 C0 A8 64 02 02 00 00 04 
10:56:50 route,ospf,debug,raw     0B 0B 0B 0B FF FF FF FF 03 00 00 0A 00 02 02 05 
10:56:50 route,ospf,debug,raw     00 00 00 00 C0 A8 C8 02 80 00 00 01 D3 4A 00 24 
10:56:50 route,ospf,debug,raw     00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 
10:56:50 route,ospf,debug RECV: Link State Update <- 192.168.11.1 on r1-eoip (192.168.11.2) 
10:56:50 route,ospf,debug,raw PACKET: 
10:56:50 route,ospf,debug,raw     45 C0 00 B4 52 22 00 00 01 59 BA 60 C0 A8 0B 01 
10:56:50 route,ospf,debug,raw     E0 00 00 05 02 04 00 A0 C0 A8 C8 01 00 00 00 00 
10:56:50 route,ospf,debug,raw     D4 4B 00 00 00 00 00 00 00 00 00 00 00 00 00 02 
10:56:50 route,ospf,debug,raw     00 02 02 01 C0 A8 C8 02 C0 A8 C8 02 80 00 00 3C 
10:56:50 route,ospf,debug,raw     82 39 00 60 02 00 00 06 C0 A8 0B 05 C0 A8 0B 05 
10:56:50 route,ospf,debug,raw     02 00 00 0A C0 A8 0C 05 C0 A8 0C 05 02 00 00 0A 
10:56:50 route,ospf,debug,raw     C0 A8 0D 05 C0 A8 0D 05 02 00 00 0A C0 A8 78 02 
10:56:50 route,ospf,debug,raw     C0 A8 78 01 02 00 00 0A C0 A8 64 01 C0 A8 64 02 
10:56:50 route,ospf,debug,raw     02 00 00 04 0B 0B 0B 0B FF FF FF FF 03 00 00 0A 
10:56:50 route,ospf,debug,raw     00 02 02 05 00 00 00 00 C0 A8 C8 02 80 00 00 01 
10:56:50 route,ospf,debug,raw     D3 4A 00 24 00 00 00 00 00 00 00 01 00 00 00 00 
10:56:50 route,ospf,debug,raw     00 00 00 00 
10:56:51 route,ospf,debug SEND: Link State Acknowledgement 192.168.11.6 -> 224.0.0.5 on r1-eoip-core2 
10:56:51 route,ospf,debug,raw PACKET: 
10:56:51 route,ospf,debug,raw     02 05 00 40 C0 A8 97 01 00 00 00 00 B1 BF 00 00 
10:56:51 route,ospf,debug,raw     00 00 00 00 00 00 00 00 00 01 02 01 C0 A8 C8 02 
10:56:51 route,ospf,debug,raw     C0 A8 C8 02 80 00 00 3C 82 39 00 60 00 01 02 05 
10:56:51 route,ospf,debug,raw     00 00 00 00 C0 A8 C8 02 80 00 00 01 D3 4A 00 24 
10:56:51 route,ospf,debug SEND: Link State Acknowledgement 192.168.11.2 -> 224.0.0.5 on r1-eoip 
10:56:51 route,ospf,debug,raw PACKET: 
10:56:51 route,ospf,debug,raw     02 05 00 40 C0 A8 97 01 00 00 00 00 B1 BD 00 00 
10:56:51 route,ospf,debug,raw     00 00 00 00 00 00 00 00 00 02 02 01 C0 A8 C8 02 
10:56:51 route,ospf,debug,raw     C0 A8 C8 02 80 00 00 3C 82 39 00 60 00 02 02 05 
10:56:51 route,ospf,debug,raw     00 00 00 00 C0 A8 C8 02 80 00 00 01 D3 4A 00 24 
10:56:51 route,ospf,debug Recalculating all OSPFv2 intra-area routes 
10:56:51 route,ospf,debug Recalculating all inter-area routes 
10:56:51 route,ospf,debug     summary-area=backbone 
10:56:51 route,ospf,debug Recalculating AS-external routes 
10:56:51 route,ospf,debug Installing an OSPF route in the main routing table 
10:56:51 route,ospf,debug     prefix=0.0.0.0/0 
10:56:51 route,debug,calc Begin calculation 
10:56:51 route,debug,event Updated route 
10:56:51 route,debug,event     previous-state=CANDIDATE 
10:56:51 route,debug,event     state=CANDIDATE 
10:56:51 route,debug,event     dst-address=0.0.0.0/0 
10:56:51 route,debug,event     attributes 
10:56:51 route,debug,event         protocol=OSPF 
10:56:51 route,debug,event         scope=20 
10:56:51 route,debug,event         next-hop= address=192.168.11.5 
10:56:51 route,debug,event         origin-type=OSPF 
10:56:51 route,debug,event         origin-instance-id=0 
10:56:51 route,debug,event         ospf-metric=11 
10:56:51 route,debug,event         ospf-type=external-type-1 
10:56:51 route,debug,calc Select route 
10:56:51 route,debug,calc     dst-address=0.0.0.0/0 
10:56:51 route,debug,calc     attributes 
10:56:51 route,debug,calc         protocol=STATIC 
10:56:51 route,debug,calc         distance=1 
10:56:51 route,debug,calc         scope=30 
10:56:51 route,debug,calc         target-scope=10 
10:56:51 route,debug,calc         next-hop= address=31.205.49.190 
10:56:51 route,debug,calc         origin-type=STATIC 
10:56:51 route,debug,calc End calculation 
Now to prove that the default routes are being advertised out and can be installed by a routing table with a VRF, I have set up a HP MSR20-10 router to be part of the VRF, and this is the routing table on there: -
<HP>display ip routing-table vpn-instance ospf-test-2  
Routing Tables: ospf-test-2
        Destinations : 15       Routes : 15

Destination/Mask    Proto  Pre  Cost         NextHop         Interface

0.0.0.0/0           O_ASE  150  11           192.168.121.1   Eth0/0.3013
127.0.0.0/8         Direct 0    0            127.0.0.1       InLoop0
127.0.0.1/32        Direct 0    0            127.0.0.1       InLoop0
192.168.41.1/32     O_ASE  150  34           192.168.121.1   Eth0/0.3013
192.168.51.0/24     OSPF   10   1014         192.168.121.1   Eth0/0.3013
192.168.52.0/24     OSPF   10   1014         192.168.121.1   Eth0/0.3013
192.168.53.0/24     OSPF   10   1014         192.168.121.1   Eth0/0.3013
192.168.111.0/24    Direct 0    0            192.168.111.2   Eth0/0.3012
192.168.111.2/32    Direct 0    0            127.0.0.1       InLoop0
192.168.121.0/24    Direct 0    0            192.168.121.2   Eth0/0.3013
192.168.121.2/32    Direct 0    0            127.0.0.1       InLoop0
192.168.151.0/24    OSPF   10   20           192.168.121.1   Eth0/0.3013
192.168.152.0/24    OSPF   10   20           192.168.121.1   Eth0/0.3013
192.168.153.0/24    OSPF   10   20           192.168.121.1   Eth0/0.3013
192.168.200.0/24    OSPF   10   14           192.168.121.1   Eth0/0.3013
So, would someone like to explain what is going on here?
 
stuh84
just joined
Topic Author
Posts: 15
Joined: Wed Oct 20, 2010 11:44 am
Location: Sheffield UK

Re: OSPF Multiple Instances and External Routes/LSAs

Tue Nov 27, 2012 10:41 am

What do I have to do to get any support on anything? Two topics in a row where the only person replying is myself. I'll be glad to get these things out of my network if this is the level of support I can expect.
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7041
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: OSPF Multiple Instances and External Routes/LSAs

Tue Nov 27, 2012 10:50 am

This is a user forum, to get official support, you should write to support [at] mikrotik.
 
stuh84
just joined
Topic Author
Posts: 15
Joined: Wed Oct 20, 2010 11:44 am
Location: Sheffield UK

Re: OSPF Multiple Instances and External Routes/LSAs

Tue Nov 27, 2012 11:48 am

I'm not sure if I'll be able to conform to the guidelines of the support instructions (as it says to raise based upon a single system, and this is currently affecting a live deployment of 50 MikroTiks, and another 5 in testing) but I'll email that.

Who is online

Users browsing this forum: No registered users and 16 guests