IP Address
Hi All,
Could anybody please let me know where all the IP addresses get stored in Linux? How can we change the IP address in Linux... Thanks in advance, Kapil. |
IP address is set differently depending upon the distribution of Linux you are using.
This site explains the different configurations: http://www.yolinux.com/TUTORIALS/Lin....html#ASSIGNIP |
/etc/network/interfaces
Quote:
|
What is your distribution? Usually, the IP address of an interface is stored in a configuration file, that deals with networking. For example, in Slackware, it's /etc/rc.d/rc.inet1.conf In other distributions it's different.
Usually, there are tools to change the IP and other things without editing these files directly. Like the netconfig in Slackware. |
I think you need to do some research into IP Addresses, or more specifically how you're getting your IP Address. Are you using DHCP? If so, where ever your DHCP server (or zero-config stuff) is, thats where you want to change it. If you're setting your own IP address, and not using DHCP, /etc/networks/interfaces is the place to look.
You can set it with ifconfig, too. What do you need to change it for? |
Quote:
Hi there, thank you for the response...i will check the portal, and if requred then will get back again... Thankx again, kapil. |
Quote:
hi There, I am using RHEL5, and as you have already told us thta it depends upon distribution, so what could be the location for rhel5? Thankx, Kapil. |
Quote:
I am using rhel5 and i already tried ifconfig, but it is not working at all. Ipconfig is not good for linux at all. I tried accessing /etc/network/interfaces as well, but there is no such route either with user or with root... What should I do? Regards, Kapil. |
Quote:
Code:
[machine:~]:ps aux | grep dhc This will not be persistent across reboots. If you need to make your changes permanent, look at the file named Code:
/etc/sysconfig/network-scripts/ifcfg-eth0 |
All times are GMT -5. The time now is 10:57 AM. |