Part of the network setup in a Unix operating system is the configuration of the default gateway and the dns resolutions, this is what i want to show how it is done:

1) Setup default gateway:

Edit /etc/defaultrouter and set there the ip address from the gateway of your LAN/WAN.  The graphic is only illustrative.

Network Setup

2) Setup dns:

Edit /etc/resolv.conf and write there the ipaddress or hostnames of the dns resolvers.  The graphic is only illustrative.

Network Setup

Here is a video that displays some examples:

https://blog.serversolaris.com/forum/viewtopic.php?f=9&t=4