# Route issue on bootup



## smccloud (Aug 18, 2011)

Ok,

I'm setting up a FreeBSD web server to test some SNMP stuff out at work.  Problem is, on every reboot I need to run [CMD=]route add -net 0.0.0.0/0 192.168.10.1[/CMD] in order to get network access at all.  Is there a way I can have this automatically run on bootup so I don't have to remember it all the time?


----------



## phoenix (Aug 18, 2011)

That means you are missing the *defaultrouter* entry in /etc/rc.conf.  See /etc/defaults/rc.conf for more information on that entry.

Also, a simpler route(8) command for setting the default gateway is:
`# route add default 192.168.10.1`


----------



## smccloud (Aug 18, 2011)

phoenix said:
			
		

> That means you are missing the *defaultrouter* entry in /etc/rc.conf.  See /etc/defaults/rc.conf for more information on that entry.
> 
> Also, a simpler route(8) command for setting the default gateway is:
> `# route add default 192.168.10.1`



Thanks that fixed it.  I'm to used to Linux, so I tried `# route add default gw 192.168.10.1`


----------

