<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Default route changing randomly]]></title><description><![CDATA[<p dir="auto">I have a config with two WAN ports, one goes to the Internet with IPV6 and IPV4, the other to a bunch of internal private 10.0.0.0 networks with IPV4.  Both are NAT, and both get their IP and gateways via DHCP.  The Internet WAN port gateway is set as default, and I have gateway monitoring disabled.  There is a static route sending 10.0.0.0/8 traffic to the private WAN.</p>
<p dir="auto">On a random basis, sometimes once a week, sometimes a couple times a day, the default route switches from the Internet to the internal private WAN network and I lose connectivity to the Internet.  Rebooting pfsense will set things back to normal.  I can't figure out what triggers the route to change, nor how to prevent it.</p>
<p dir="auto">I've tried replacement hardware, and get the same result, so it isn't a hardware problem.</p>
<p dir="auto">I have resorted to a script that monitors the route table every 5 minutes and reboots the device when it sees the default route change.  This works, but, ugh.</p>
<p dir="auto">What am I doing wrong?</p>
]]></description><link>https://forum.netgate.com/topic/115932/default-route-changing-randomly</link><generator>RSS for Node</generator><lastBuildDate>Sat, 13 Jun 2026 15:36:15 GMT</lastBuildDate><atom:link href="https://forum.netgate.com/topic/115932.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 20 May 2017 17:33:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Default route changing randomly on Sat, 27 May 2017 00:42:31 GMT]]></title><description><![CDATA[<p dir="auto">"Why would you be natting to internal rfc1918 networks?"</p>
<p dir="auto">Because I connect to a wireless network that I don't manage that uses rfc1918 IPs.  Each wireless node (router) in the network gets configured with a random 10.0.0.0/29 network address during initial setup on each node.  The routing for these nodes is managed with OLSR on the wireless network.  Pfsense apparently used to have a plugin for OLSR, but doesn't any longer and I cannot add routes for my internal LAN to OLSR.  Nodes can come and go without notification or coordination on this network, so I can't reasonably maintain an accurate static route list, so I have a generic static 10.0.0.0/8 route out to that network interface to cover all wireless networks.    I'm only allocated a /29 on the wireless network, and I provide services from multiple internal LAN IPs, so I have NAT configured so it only consumes one wireless IP.  This is on my OPT1 interface, and the IP and gateway are provided via DHCP from the wireless node.</p>
<p dir="auto">I'm open to suggestions for better ways to do this, but this is the only way I could see getting it to work with the restrictions I have.</p>
<p dir="auto">My internal LAN is 10.10.6.0/24.  This works fine because the LAN interface's /24 route is more specific than the wireless /8, so things route properly.</p>
<p dir="auto">The WAN port connects to my ISP, and is a 73.x.x.x/24 which is provided via DHCP from my cable modem.</p>
<p dir="auto">So to recap:</p>
<p dir="auto">To internet<br />
73.x.x.1 (gateway)<br />
  |<br />
73.x.x.x/24<br />
  WAN<br />
+–---------+<br />
| pfsense    | LAN--10.10.6.1/24----To internal LAN<br />
+-----------+<br />
OPT1<br />
10.117.100.157/29<br />
  |<br />
10.117.100.153 (gateway)<br />
  To a couple dozen or so random 10.x.x.x/29 networks routed by OLSR</p>
<p dir="auto">"Do you have both gateways you get via dhcp as "default"?"  "Post up your gateway section"<br />
The only gateway that is set default is the WAN (internet) side.</p>
<p dir="auto">This is from my /conf/config.xml file:<br />
&lt;gateways&gt;&lt;gateway_item&gt;&lt;interface&gt;opt1&lt;/interface&gt;<br />
                        &lt;gateway&gt;dynamic&lt;/gateway&gt;<br />
                        &lt;name&gt;MESH_NMT_DHCP&lt;/name&gt;<br />
                        &lt;weight&gt;1&lt;/weight&gt;<br />
                        &lt;ipprotocol&gt;inet&lt;/ipprotocol&gt;</p>
<p dir="auto">&lt;monitor_disable&gt;&lt;/monitor_disable&gt;&lt;/gateway_item&gt;<br />
                &lt;gateway_item&gt;&lt;interface&gt;wan&lt;/interface&gt;<br />
                        &lt;gateway&gt;dynamic&lt;/gateway&gt;<br />
                        &lt;name&gt;WAN_DHCP&lt;/name&gt;<br />
                        &lt;weight&gt;1&lt;/weight&gt;<br />
                        &lt;ipprotocol&gt;inet&lt;/ipprotocol&gt;</p>
<p dir="auto">&lt;monitor_disable&gt;&lt;defaultgw&gt;&lt;latencyhigh&gt;1500&lt;/latencyhigh&gt;<br />
                        &lt;losshigh&gt;100&lt;/losshigh&gt;&lt;/defaultgw&gt;&lt;/monitor_disable&gt;&lt;/gateway_item&gt;<br />
                &lt;gateway_item&gt;&lt;interface&gt;wan&lt;/interface&gt;<br />
                        &lt;gateway&gt;dynamic&lt;/gateway&gt;<br />
                        &lt;name&gt;WAN_DHCP6&lt;/name&gt;<br />
                        &lt;weight&gt;1&lt;/weight&gt;<br />
                        &lt;ipprotocol&gt;inet6&lt;/ipprotocol&gt;</p>
<p dir="auto">&lt;monitor_disable&gt;&lt;defaultgw&gt;&lt;/defaultgw&gt;&lt;/monitor_disable&gt;&lt;/gateway_item&gt;&lt;/gateways&gt;</p>
<p dir="auto">and just for info:<br />
&lt;staticroutes&gt;&lt;route&gt;&lt;network&gt;10.0.0.0/8&lt;/network&gt;<br />
                        &lt;gateway&gt;MESH_NMT_DHCP&lt;/gateway&gt;&lt;/route&gt;&lt;/staticroutes&gt;</p>
<p dir="auto">Normally netstat -nr shows this:<br />
Internet:<br />
Destination        Gateway            Flags      Netif Expire<br />
default            73.x.x.1        UGS        em0<br />
10.0.0.0/8        10.117.100.153    UGS        em2<br />
10.10.6.0/24      link#2            U          em1<br />
10.10.6.1          link#2            UHS        lo0<br />
10.117.100.152/29  link#3            U          em2<br />
10.117.100.153    10.117.100.153    UGHS        em2<br />
10.117.100.157    link#3            UHS        lo0<br />
73.x.x.0/24    link#1            U          em0<br />
73.x.x.x      link#1            UHS        lo0<br />
75.75.75.75        73.x.x.1        UGHS        em0<br />
75.75.76.76        73.x.x.1        UGHS        em0<br />
127.0.0.1          link#8            UH          lo0<br />
172.16.0.0/12      10.117.100.153    UGS        em2</p>
<p dir="auto">When it goes bad I see this:<br />
Internet:<br />
Destination        Gateway            Flags      Netif Expire<br />
default            10.117.100.153    UGS        em2<br />
10.0.0.0/8        10.117.100.153    UGS        em2<br />
10.10.6.0/24      link#2            U          em1<br />
10.10.6.1          link#2            UHS        lo0<br />
10.117.100.152/29  link#3            U          em2<br />
10.117.100.153    10.117.100.153    UGHS        em2<br />
10.117.100.157    link#3            UHS        lo0<br />
73.x.x.0/24    link#1            U          em0<br />
73.x.x.x      link#1            UHS        lo0<br />
75.75.75.75        73.x.x.1        UGHS        em0<br />
75.75.76.76        73.x.x.1        UGHS        em0<br />
127.0.0.1          link#8            UH          lo0<br />
172.16.0.0/12      10.117.100.153    UGS        em2</p>
<p dir="auto">I've looked through the various logs when the problem happens, and I don't see anything obviously wrong. <br />
I've played with various values and ultimately disabled gateway monitoring to make sure that isn't causing the problem.</p>
]]></description><link>https://forum.netgate.com/post/702229</link><guid isPermaLink="true">https://forum.netgate.com/post/702229</guid><dc:creator><![CDATA[User412287]]></dc:creator><pubDate>Sat, 27 May 2017 00:42:31 GMT</pubDate></item><item><title><![CDATA[Reply to Default route changing randomly on Mon, 22 May 2017 12:34:53 GMT]]></title><description><![CDATA[<p dir="auto">"the other to a bunch of internal private 10.0.0.0 networks with IPV4.  Both are NAT,"</p>
<p dir="auto">Why would you be natting to internal rfc1918 networks?  Post up your gateway section.. To route to other networks, this would not be "wan" connection with nat - this would normally be just a gateway you setup in pfsense and setup routes.</p>
<p dir="auto">Do you have both gateways you get via dhcp as "default"?</p>
]]></description><link>https://forum.netgate.com/post/701051</link><guid isPermaLink="true">https://forum.netgate.com/post/701051</guid><dc:creator><![CDATA[johnpoz]]></dc:creator><pubDate>Mon, 22 May 2017 12:34:53 GMT</pubDate></item><item><title><![CDATA[Reply to Default route changing randomly on Sun, 21 May 2017 10:33:55 GMT]]></title><description><![CDATA[<p dir="auto">Not enough details to work with.</p>
<p dir="auto">Provide a network schematic (include IP subnets)</p>
<p dir="auto">Check system logs around the time it hops.</p>
]]></description><link>https://forum.netgate.com/post/700898</link><guid isPermaLink="true">https://forum.netgate.com/post/700898</guid><dc:creator><![CDATA[heper]]></dc:creator><pubDate>Sun, 21 May 2017 10:33:55 GMT</pubDate></item></channel></rss>