Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ip configuration in redhat

Status
Not open for further replies.

toraj58

Technical User
Dec 10, 2006
15
0
0
IR
how to configure IP, gateway, dns using command line in redhat?

and to which files those information are appended?
 
ifconfig utility will do that for you.
example foe eth0

Code:
ifconfig eth0 192.168.1.3 netmask 255.255.255.0 up

this will set ip address and netmask

Code:
route add default gw 192.168.1.1

this will configure your default gateway.

I suggest anyway that you edit your config files directly and set all values there

/etc/sysconfig/network-script/

holds all you interfaces' config files.
So edit the ifcfg-eth0 file to permanently set address and gateway for eth0

Your DNS server settings are instead in the file

/etc/resolv.conf

Cheers

QatQat



Life is what happens when you are making other plans.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top