For "normal" network connectivity, you basically need three things:
A valid IP-address
A gateway, that provides you with a connection to the "Internet"
A nameserver that resolves host-names (for example,
unix.stackexchange.com) to IP-addresses.
You cannot choose an arbitrary IP address; instead you must choose one according to your local network topology. For example, if you are in a subnet
22.214.171.124/24, you can choose
126.96.36.199, but not
Make sure that the IP address you chose is actually valid ("contact your network administrator" :-))
This is the step you have done so far.
Network traffic must is sent to a gateway, that will know how to distribute it further to the "rest of the Internet". When manually setting the IP address, you will also have to manually set the
gateway of your network connection to your router.
# route add default gw 192.168.198.1
The actual IP address of the router is network dependent (but for private networks like yours, it is often
If you have configured the gateway correctly, you should already have full Internet connectivity, that is: you should be able to reach any (reachable) server.
You can confirm whether it's working by trying to
ping a remote IP address:
$ ping 188.8.131.52
PING 184.108.40.206 (220.127.116.11) 56(84) bytes of data.
64 bytes from 18.104.22.168: icmp_seq=1 ttl=50 time=51.6 ms
Even if you are connected to the net, you still might not be able to use
firefox/iceweasel, simply because your system doesn't yet know how a name like
unix.stackexchange.com can be translated to an IP address.
You have to specify a nameserver as well. This can be configured in the file
For example, the following will configure your system to use Google's public nameserver for DNS resolving:
# echo "nameserver 22.214.171.124" > /etc/resolv.conf
will make your system use the nameserver at IP address
126.96.36.199. Now you should be able to use domain names, and everything should be working OK:
$ ping unix.stackexchange.com
PING unix.stackexchange.com (188.8.131.52) 56(84) bytes of data.
64 bytes from stackoverflow.com (184.108.40.206): icmp_seq=1 ttl=53 time=146 ms
Simply using DHCP
Many networks offer client network configuration via DHCP, which will automatically provide your computer with information about which IP address, network mask, gateway and name server to use.
You can re-trigger this process (provided there is a DHCP-server in your network) by running:
# dhclient -v