December 05, 2007

Configure Your Network

To configure your network you need to be root by using the su command
also you need some information about your network like

your IP, subnet mask , DNS IP , Gateway IP

NOTE : our common networks use its routers as DNS & GateWay in the same time
but some ISP provide it's own DNS.

in this article we will use the fellowing data as example :

IP : 192.168.1.200
SUBMASK : 255.255.255.0
GATEWAY : 192.168.1.1

DNS : 192.168.1.1 <---- your ISP may provide you with other IP


===============================
We will need to edit 2 files :

1. network card configration file : /etc/sysconfig/network-scripts/ifcfg-eth0
2. DNS configration file : /etc/resolv.conf

===============================
Frist : Edit Network configartion file
===============================
using the command :

vi /etc/sysconfig/network-scripts/ifcfg-eth0

enter the fellowing lines :
IPADDR=192.168.1.200
NETMASK=255.255.255.0
GATEWAY=192.168.1.1

the change the fellowing line to :
BOOTPROTO=none <---- "if not exist create it" so your file maybe like the image


then save & exit
===============================
Second : Edit DNS configration file
===============================
vi /etc/resolv.conf

enter the fellowing line

nameserver 192.168.1.1

NOTE : every line have one DNS IP and you may add mor than one like the fellowing image i add 3 DNS servers



then save & exit.

to changes take effect you must restart your network deamon

/etc/init.d/network restart


Configration is done use your browser& Visit out group & have fun :)

No comments: