Manual:OSPF and Point-to-Point interfaces

From MikroTik Wiki
Jump to: navigation, search

OSPF configuration on PPP interfaces often is a subject to misunderstanding. You need to keep in mind two things:

  1. There is no need to explicitly configure an interface in "/routing ospf interface" to start running OSPF on it. Only "routing ospf network" configuration determines whether the interface will be active or not. If it has matching network network, i.e. the address of the interface falls within range of some network, then the interface will be running OSPF. Else it won't participate in the protocol. "/routing ospf interface" is used only if specific configuration for some interface is needed - typically to configure different link cost.
  2. In case of PPP interfaces, the interface will be active if either local address or the address of remote are matched against some network. See sample configuration for an illustration. This counterintuitive behaviour will be changed in 3.x routing-test package. Only remote address will be considered there.
  • Also remember that running OSPF on a big number of (flapping) PPP interfaces is not recommended.

Configuration example: use local address as OSPF network

Assume we have a PPPoE tunnel between two routers 10.0.0.134 and 10.0.0.133. Configure OSPF on the PPPoE interface on the first router:

 [admin@I] > /ip address p
 Flags: X - disabled, I - invalid, D - dynamic
  #   ADDRESS            NETWORK         BROADCAST       INTERFACE
  0   10.0.0.133/24      10.0.0.0        10.0.0.255      ether1
  1 D 10.1.1.254/32      10.1.1.1        0.0.0.0         pppoe-out1
 [admin@I] > routing ospf network add network=10.1.1.254/32 area=backbone

Do the same on the second router:

 [admin@II] > /ip address p
 Flags: X - disabled, I - invalid, D - dynamic
  #   ADDRESS            NETWORK         BROADCAST       INTERFACE
  0   10.0.0.134/24      10.0.0.0        10.0.0.255      ether1
  1 D 10.1.1.1/32        10.1.1.254      0.0.0.0         <pppoe-atis>
 [admin@II] > routing ospf network add network=10.1.1.1/32 area=backbone

An OSPF adjacency has been established; neighbor at 10.1.1.1 is in 'Full' state:

 [admin@I] > routing ospf neighbor pr
  router-id=10.0.0.133 address=10.1.1.254 priority=1 dr-address=0.0.0.0
    backup-dr-address-id=0.0.0.0 state="2-Way" state-changes=0 ls-retransmits=0
    ls-requests=0 db-summaries=0
  router-id=10.0.0.134 address=10.1.1.1 priority=1 dr-address=0.0.0.0
    backup-dr-address-id=0.0.0.0 state="Full" state-changes=5 ls-retransmits=0
    ls-requests=0 db-summaries=0
 [admin@I] >     

External links