Determine default Gateway obtained via DHCP under FreeBSD
So, lets have a FreBSD installation that got an IP address via DHCP using dhclient, and you want to know in a shell script the assigned default gateway for the specific interface. You can use the following little script which prints the IP address of the default gateway to stdout. Assuming you have the script… Read More »