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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing IP Address

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
This is a very simple request so hopefully someone can help.

What steps do you have to go through to change the IP Address on a Linux Server??
 
this depends on your flavour of linux.

if you can't find an X settings program with your install try searching for it

grep -r -l -s '192.168.0.1' /etc/*

replace with the IP address your machine has and this should locate the files that may need changing. although only change them if you understand or can work out what's going on. :)
 
Does linuxconf not allow you to change the IP address in your version as well. It would be under Networking. Thats whatI use to change IP addresses. James Collins
Systems Support Engineer
A+, MCP

email: butchrecon@skyenet.net

Please let us (Tek-tips members) know if the solutions we provide are helpful to you. Not only do they help you but they may help others.
 
You use ifconfig to change ip addresses.
ex;
ifconfig lo 127.0.0.2 up
ifconfig eth0 192.168.1.45 netmask 255.255.255.240 broadcast, etc..
man ifconfig for in depth explanations.
ifconfig --help for options.
Just a note:
There is no flavor of linux that "it depends"
on: ifconfig is it.
Linuxconf is RH's baby. It is just a front end. Like YAST for SuSE, etc..


 
Hi,

'marsd' is correct to a point. However, all distros maintain configuration files, invariably in the /etc directory and its sub-directories, which are read at boot time and feed the scripts that start the network. So if you just simply do a /sbin/ifconfig command the interface will almost certainly be brought-up with the 'old' values at the next re-boot. So, you do need to do as Mrtom says as well.

If you can't be bothered with all that, on a redhat system, you can put some '/sbin/ifconfig' commands in the script file /etc/rc.d/rc.local which is the last script file executed after all the other init stuff. So, you'll always dynamically change any existing config on a consistent basis. Other distros have functionally equivalent files but you'll have to find out what the names are for those ...

Regards...



 
Umm. No disrespect meant to anyone.
The "command" that defines interfaces(except ipx and wanpipe support) is ifconfig.
Where the boot scripts read your interface info from IS
very distribution specific of course.
There seems to be some confusion as to what this post was asking for...
 
Ok, you want to change your IP address, it *should* be quite easy, esspecially in the world of Linux GUIs...

fire up (as root) linuxconf, click networking, then Host Info.
Chose the tab with the addapter in question, type the new info, click Ok, then close Linuxconf and it restarts the network with the new info... viola

Easy way.. ;)
---
John Hoke
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top