Manual:OSPF-examples: Difference between revisions

From MikroTik Wiki
Jump to navigation Jump to search
Route (talk | contribs)
added nbma example
Route (talk | contribs)
mNo edit summary
Line 1: Line 1:
= OSPF Examples =
== NBMA networks ==
== NBMA networks ==


OSPF network type NBMA (Non-Broadcast Multiple Access) uses only unicast communications, so it is the preferred way of OSPF configuration in situations where multicast addressing is not possible or desirable for some reasons. Examples of such situations:
OSPF network type NBMA (Non-Broadcast Multiple Access) uses only unicast communications, so it is the preferred way of OSPF configuration in situations where multicast addressing is not possible or desirable for some reasons. Examples of such situations:
* in 802.11 wireless networks multicast packets are not retransmitted; using multicast here this can create OSPF stability problems;
* in 802.11 wireless networks multicast packets are not always reliably delivered (read [http://wiki.mikrotik.com/wiki/Multicast_Routing_in_RouterOS_3.x#Multicast_and_Wireless Multicast in wireless networks] for details); using multicast here can create OSPF stability problems;
* using multicast may not be efficient in bridged or meshed network (i.e. large layer-2 broadcast domains).
* using multicast may be not efficient in bridged or meshed networks (i.e. large layer-2 broadcast domains).


Especially efficient way to configure OSPF is to allow only a few routers on a link to become the designated router. (But be careful - if all routers that are capable of becoming the designated router will be down on some link, OSPF will be down on that link too!) Since a router can become the DR only when priority on it's interface is not zero, this priority can be configured as zero in interface and nbma-neighbor configuration to prevent that from happening.
Especially efficient way to configure OSPF is to allow only a few routers on a link to become the designated router. (But be careful - if all routers that are capable of becoming the designated router will be down on some link, OSPF will be down on that link too!) Since a router can become the DR only when priority on it's interface is not zero, this priority can be configured as zero in interface and nbma-neighbor configuration to prevent that from happening.
Line 19: Line 17:
  routing ospf nbma-neighbor add address=10.1.1.3 priority=1
  routing ospf nbma-neighbor add address=10.1.1.3 priority=1
  routing ospf nbma-neighbor add address=10.1.1.4 priority=1
  routing ospf nbma-neighbor add address=10.1.1.4 priority=1
(Adding nbma-neighbor to self makes no sense, but does not create any problems either.)
(For simplicity, to keep configuration the same on all routers, nbma-neighbor to self is also added. Normally you wouln'd do that, but it does not cause any harm either.)


Configure interface priorities.
Configure interface priorities.
Line 49: Line 47:
On Router D:
On Router D:
<pre>
<pre>
[admin@D] /routing ospf> neighbor p
[admin@D] > routing ospf neighbor print
  0 address=10.1.1.4 interface=ether1 priority=1 state="Down" state-changes=2
  0 address=10.1.1.4 interface=ether1 priority=1 state="Down" state-changes=2



Revision as of 09:55, 3 August 2009

NBMA networks

OSPF network type NBMA (Non-Broadcast Multiple Access) uses only unicast communications, so it is the preferred way of OSPF configuration in situations where multicast addressing is not possible or desirable for some reasons. Examples of such situations:

  • in 802.11 wireless networks multicast packets are not always reliably delivered (read Multicast in wireless networks for details); using multicast here can create OSPF stability problems;
  • using multicast may be not efficient in bridged or meshed networks (i.e. large layer-2 broadcast domains).

Especially efficient way to configure OSPF is to allow only a few routers on a link to become the designated router. (But be careful - if all routers that are capable of becoming the designated router will be down on some link, OSPF will be down on that link too!) Since a router can become the DR only when priority on it's interface is not zero, this priority can be configured as zero in interface and nbma-neighbor configuration to prevent that from happening.

In this setup only C and D are allowed to become designated routers.

On all routers:

routing ospf network add network=10.1.1.0/24 area=backbone
routing ospf nbma-neighbor add address=10.1.1.1 priority=0
routing ospf nbma-neighbor add address=10.1.1.2 priority=0
routing ospf nbma-neighbor add address=10.1.1.3 priority=1
routing ospf nbma-neighbor add address=10.1.1.4 priority=1

(For simplicity, to keep configuration the same on all routers, nbma-neighbor to self is also added. Normally you wouln'd do that, but it does not cause any harm either.)

Configure interface priorities. On routers A, B:

routing ospf interface add interface=ether1 network-type=nbma priority=0

On routers C, D (they can become the designated router):

routing ospf interface add interface=ether1 network-type=nbma priority=1

Results

On Router A:

[admin@A] > routing ospf neighbor print
 0 router-id=10.1.1.5 address=10.1.1.5 interface=ether1 priority=1 dr-address=10.1.1.4
   backup-dr-address=10.1.1.3 state="Full" state-changes=6 ls-retransmits=0
   ls-requests=0 db-summaries=0 adjacency=4m53s

 1 router-id=10.1.1.3 address=10.1.1.3 interface=ether1 priority=1 dr-address=1.1.1.4
   backup-dr-address=10.1.1.3 state="Full" state-changes=6 ls-retransmits=0
   ls-requests=0 db-summaries=0 adjacency=4m43s

 2 address=10.1.1.2 interface=ether1 priority=0 state="Down" state-changes=2

 3 address=10.1.1.1 interface=ether1 priority=0 state="Down" state-changes=2

On Router D:

[admin@D] > routing ospf neighbor print
 0 address=10.1.1.4 interface=ether1 priority=1 state="Down" state-changes=2

 1 router-id=10.1.1.3 address=10.1.1.3 interface=ether1 priority=1 dr-address=10.1.1.4
   backup-dr-address=10.1.1.3 state="Full" state-changes=6 ls-retransmits=0
   ls-requests=0 db-summaries=0 adjacency=6m8s

 2 router-id=10.1.1.2 address=10.1.1.2 interface=ether1 priority=0 dr-address=10.1.1.4
   backup-dr-address=10.1.1.3 state="Full" state-changes=5 ls-retransmits=0
   ls-requests=0 db-summaries=0 adjacency=6m4s

 3 router-id=10.1.1.1 address=10.1.1.1 interface=ether1 priority=0 dr-address=10.1.1.4
   backup-dr-address=10.1.1.3 state="Full" state-changes=5 ls-retransmits=0
   ls-requests=0 db-summaries=0 adjacency=6m4s