1) vi /etc/hosts --> give ip and hostname
exp : 192.168.1.10 myname
2) /etc/hostname.network
exp : /etc/myname.bge0
cat >> 192.168.1.10
3) vi /etc/netmasks --> give network and netmask address
exp : 192.168.1.0 255.255.255.0
4) vi /etc/resolv.conf (give your dns address)
exp : nameserver 192.168.1.1
nameserver 202.134.x.x
nameserver 222.167.x.x
5) vi /etc/defaultrouter (give your gateway address)
exp : 192.168.1.1
6) cp /etc/nsswitch.dns /etc/nsswitch.conf --> because by default nsswitch file only uses the hosts file to resolve machine name
7) init 6 --> to reboot and load new config
Main Topics
Browse All Topics





by: omarfaridPosted on 2009-04-13 at 02:30:21ID: 24128657
You can connect to the internet by
- assigning an ip to your system:
to get dynamic ip (DHCP) you need to have a file in /etc dir like
/etc/dhcp.interface (e.g. dhcp.hme0)
For static you need a file in /etc dir like
/etc/hostname.interface (e.g. hostname.hme0)
this file contains hostname of the server or hostname for that ip address and should be in /etc/hosts file (mapped to an ip address)
- you may need to configure subnet mask in
/etc/netmasks
- you need to setup dns server in /etc/resolv.conf (if not provided by DHCP server)
domain mydomain.com
nameserver 10.0.0.1
nameserver 10.0.0.2
these are examples and you need to give actual ones
- set default router ip in /etc/defaultrouter
- reboot system