Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hie
when i type 'ifconfig eth0 192.168.25.1 255.255.255.0' the outcome is 'SIOCSIFADDR : invalid argument', but when i check the ip address using /sbin/ifconfig i see the ip address is updated to 192.168.25.1 and is up. When i restart the linux box,the /sbin/ifconfig is reset to 192.168.100.1 .what should i do so that the linux box /sbin/ifconfig should not change when am rebooting.
Thank you for your helping answer in advance.
I'm also not that familiar with networking so this is what I would use to find the file that contains the ip address that is used at boot. Replace the IP address that is defined in those files by the new one.
The correct syntax would be:
ifconfig eth0 192.168.25.1 netmask 255.255.255.0
You do not mention which distribution but both Fedora,Redhat and Ubuntu have networking configuration utilities that will configure network adapters and save the static IP address settings.
this is set in this text file: /etc/sysconfig/network-scripts/ifcfg-eth0 if you use good old networking.
if you use NetworkManager, then it's a different story
Are you really using "Red Hat 9"? Quoting from wikipedia: Red Hat Linux 9, the final release, hit its official end-of-life on 2004-04-30 If you really are using a re revision this old, you are both setting yourself up for serious security issues and focusing on learning deprecated techniques. If you want the "red hat" experience without paying for RHEL, go with either Fedora or CentOS.
Here is a link to the CentOS documentation, chapter 14 provides information on configuring the network. BTW, CentOS is the free version Red Hat and may be a little bit behind, but should achieve your goals.
FYI Redhat 9 is extremely obsolete and Fedora 13 is no longer being supported. ifcfg-eth0 is a network configuration file for Redhat base distributions. Here is an example:
Quote:
# File: ifcfg-eth0
DEVICE=eth0
IPADDR=192.168.25.1
NETMASK=255.255.255.0
BOOTPROTO=static
ONBOOT=yes
#
# The following settings are optional
#
BROADCAST=192.168.2.255
NETWORK=192.168.2.0
system-config-network is a RH9 GUI tool for configuring your network adapter.
I changed this values in /etc/sysconfig/network-scripts/ifcfg-eth0 file 'BOOTPROTO=static' from 'BOOTPROTO=dhcp' and i added my ip address and netmask.
IPADDR=192.168.25.1
NETMASK=255.255.255.0
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.