For eth0 interface.
ifconfig eth0 IP_ADDR netmask NETMASK up
# for example:
ifconfig eth0 192.168.0.13 netmask 255.255.255.0 up
route add default gw GATEWAY_ADDR eth0
# for example:
route add default gw 192.168.0.1 eth0
Edit /etc/resolv.conf
.
If this does not exists, in my case, touch it or just open it in the editor.
vi /etc/resolv.conf
Add a name server, like so:
nameserver DNS-IP
Example:
nameserver 8.8.8.8
nameserver 8.8.4.4
ping google.com
nslookup google.com
traceroute google.com
If all was done correctly, you should now have a working Internet connection.
To setup this connection at boot edit the file:
/etc/init.d/rcS
Edit or add this to the file:
/sbin/ifconfig eth0 192.168.0.13 netmask 255.255.255.0 up
/sbin/route add default gw 192.168.0.1 eth0
This was perfect for the needed information: http://linuxguide.sourceforge.net/linux-ethernet.html
A random man page for the resolv.conf
file:
http://man7.org/linux/man-pages/man5/resolv.conf.5.html