5734 shaares
506 private links
506 private links
Task: View / Display FreeBSD Routing Table
Use the netstat command with -r option as follows:
$ netstat -r
$ netstat -rn
How do I save routing information to a configuration file?
If you reboot FreeBSD box, the routing configuration will be lost i.e. the routing information will not persist. You need to edit /etc/rc.conf
file to set defaultroute:
# vi /etc/rc.conf
Set default route by editing defaultrouter variable:
defaultrouter="192.168.1.254"