How to display route table or default gateway

bsd-daemon-tux-logo


Route table are part of the area to troubleshoot when a connection have problem. Route table can the the most frequent problem to look at after assigning an IP address. Other times, it is mainly for adding additional routes when wireless & wired connection are both in use. This post will attempt to list out a few ways to display route table and also how to assign default route aka default gateway in Linux & FreeBSD.



Assigning default route (or default gateway) in Linux :

route add default gw 192.168.0.1 netmask 255.255.255.0


Assigning default route (or default gateway) in FreeBSD :

route add default 192.168.0.1


List the route table, in Linux :

route -n
netstat -rn
ip route list


List the route table, in FreeBSD :

netstat -rn


Remove or delete route in table, in Linux :

route del -net 192.168.0.0 netmask 255.255.255.0 gw 192.168.0.1 eth0


Remove or delete route in table, in FreeBSD :

route delete default


These are the posts on how to change the IP and make it permanent :

- In Linux.

- In Freebsd.


Ciao !!!

More post - related

Please sponsor my coffee if you find my posts worth reading, thanks!

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*
-->
Improve the web with Nofollow Reciprocity.