UniFi Gateway - OSPF

 

UniFi Switch

Setting up OSPF between a UniFi Gateway and a Cisco Router

Cisco Configuration

interface GigabitEthernet0/0
    ip address 10.6.0.254 255.255.255.0
    duplex auto
    speed auto
!
router ospf 1
    router-id 2.2.2.2
    network 10.2.0.1 0.0.0.0 area 2
    network 10.3.0.1 0.0.0.0 area 2
    network 10.6.0.254 0.0.0.0 area 0

UniFi Configuration

In the Network console, Settings > Policy Engine > OSPF

Enter a unique router ID.
Enable Announce Default Route to advertise 0.0.0.0/0 as the UniFi Gateway.
Enable Redistribute Connected Routes to advertise the UniFi networks.


UniFi OSPF Settings

Area ID - Enter 0.0.0.0 for the backbone area.
Area Type - Select a Normal, NSSA, or Stub area. The default is Normal.
Interface - Select one or more interfaces (networks) on which OSPF should be enabled.
UniFi OSPF Areas
The interface options can be configured if required.
Cost - This is the OSPF path cost. Default is 1.
Authentication - Authenticate the neighbor connection with plain text or MD5. Default is off.
Hello Interval -  Time between OSPF hello messages. Default is 10.
Dead Interval - Time before an OSPF neighbor is considered down. Default is 40.
Passive Interface - The networks associated with passive interfaces are advertised into OSPF, but do not form adjacencies with other OSPF gateways.

UniFI OSPF Interface Settings

Verify OSPF

Neighbors are shown on the OSPF tab. 

UniFI OSPF neighbors

To view routes learned by OSPF you need to enable SSH access.

ip route

UniFI OSPF Routes

Access devices on OSPF networks

By default, the firewall will only allow devices on the OSPF network to access the internet and ping.

To enable access, you will need to create a Policy-Based route

UniFI Policy-Based route

Comments