FreeBSD and RIP – solving MPLS VPN routing issue

Working on a network consultancy project with a customer to monitor remote sites in a part MPLS VPN/ part IPSec VPN was presenting problems for the Nagios server in our data centre.  below is a basic overview of the network. There are sites which are part of the MPLS on the left and the sites yet to move in are connected via IPSec. The Nagios server has a default route pointing at the MPLS gateway router. The MPLS gateway router has a default route pointing to the Cisco ASA. Each connected site has a RIP route injected into the MPLS VPN as a /32 to the connected interface, which the allows the Nagios server to ping it to test uptime.      FreeBSD-RIP

The issue comes when an MPLS line drops. The Nagios server sends it request to the 172.16.0.11 address which is down, therefore the RIP route is missing from the gateway. At this point the gateway forwards the packet to the ASA (it’s the default route) and then drops the packet. This is expected as the line is down. The Nagios server has now added a host route to its routing table pointing at 10.10.10.2 as the next hop for 172.16.0.11. When the line comes back up,  the host route was not being removed and the line would show as down until the route was manually removed from the Nagios server – very annoying!

The solution was to make the Nagios server see the RIP routes, which is very simple to do. First edit /etc/rc.conf and add:

routed_enable="YES"

Then start the routed daemon with:

service routed start

Now RIP isn’t the fastest routing protocol, so give it a moment before starting the tantrum. You can check the routes are there like this:

netstat -l
..snip..
172.16.1.11        411-nb-026         UG          2      120    em0
172.16.1.13        211-ws-021         UG          0      120    em0
..snip..

This resolved the issue on the Nagios server

This entry was posted in Cisco, FreeBSD Administration and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *