Networking Forums

Networking Forums > Computer Networking > Linux Networking > Network IP address won't change on Redhat 9!

Reply
Thread Tools Display Modes

Network IP address won't change on Redhat 9!

 
 
mkirsch1@rochester.rr.com
Guest
Posts: n/a

 
      03-22-2006, 07:24 PM
I'm trying to change the IP address on eth1, and I think I'm doing
everything required:

# vi /etc/sysconfig/network-scripts/ifcfg-eth1
# /etc/rc.d/init.d/network restart

I've confirmed the changes to ifcfg-eth1. The old IP address is still
there. I've rebooted the box, and the old IP address is still there. I
can't find any reference to the old address anywhere on the system,
using a brute force find-and-grep search. It's nowhere in /etc, for
sure. Where is it coming from? Why won't the IP address change

[root@roch-bwconf-1 etc]# uname -a
Linux roch-bwconf-1 2.4.20-8smp #1 SMP Thu Mar 13 17:45:54 EST 2003
i686 i686 i386 GNU/Linux
[root@roch-bwconf-1 etc]# cat /etc/redhat-release
Red Hat Linux release 9 (Shrike)

[root@roch-bwconf-1 network-scripts]# cat ifcfg-eth1
#
#$Id: ifcfg-eth1.in,v 1.2 2003/03/13 22:08:35 mikeho Exp $
#
DEVICE="eth1"
BOOTPROTO="none"
ONBOOT="yes"
IPADDR="66.251.91.24"
NETMASK="255.255.255.128"
IPXNETNUM_802_2=""
IPXPRIMARY_802_2="no"
IPXACTIVE_802_2="no"
IPXNETNUM_802_3=""
IPXPRIMARY_802_3="no"
IPXACTIVE_802_3="no"
IPXNETNUM_ETHERII=""
IPXPRIMARY_ETHERII="no"
IPXACTIVE_ETHERII="no"
IPXNETNUM_SNAP=""
IPXPRIMARY_SNAP="no"
IPXACTIVE_SNAP="no"
[root@roch-bwconf-1 network-scripts]# ifconfig eth1
eth1 Link encap:Ethernet HWaddr 00:0E:0C:08:6F:36
inet addr:10.254.254.1 Bcast:10.254.254.255
Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1830 errors:0 dropped:0 overruns:0 frame:0
TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:121576 (118.7 Kb) TX bytes:640 (640.0 b)
Interrupt:30 Base address:0x2040 Memory:fe6c0000-fe6e0000

 
Reply With Quote
 
 
 
 
shrini
Guest
Posts: n/a

 
      03-23-2006, 02:12 AM
Hi,

Just give

ifconfig eth0 A.B.C.D

This will change the ip address.

Now

/etc/init.d/network restart.

Shrini

 
Reply With Quote
 
Moe Trin
Guest
Posts: n/a

 
      03-23-2006, 11:31 PM
On 22 Mar 2006, in the Usenet newsgroup comp.os.linux.networking, in article
<(E-Mail Removed) .com>,
(E-Mail Removed) wrote:

>I'm trying to change the IP address on eth1, and I think I'm doing
>everything required:
>
># vi /etc/sysconfig/network-scripts/ifcfg-eth1
># /etc/rc.d/init.d/network restart


Looks good, except there might be something lurking elsewhere relating
to the firewall scripts and /etc/hosts file.

>I've confirmed the changes to ifcfg-eth1. The old IP address is still
>there. I've rebooted the box, and the old IP address is still there.


Then there is a problem somewhere ;-)

>I can't find any reference to the old address anywhere on the system,
>using a brute force find-and-grep search. It's nowhere in /etc, for
>sure. Where is it coming from? Why won't the IP address change


What you are showing _should_ work correctly. There are only two places
where the system can _normally_ be getting an IP - the scripts in
/etc/sysconfig/network-scripts/, and a DHCP/BOOTP server. The latter is
unlikely, as your ifcfg-eth1 script is telling the system to use "none"
as a boot protocol.

>Linux roch-bwconf-1 2.4.20-8smp #1 SMP Thu Mar 13 17:45:54 EST 2003
>i686 i686 i386 GNU/Linux


For what it's worth, that kernel is the original "out-of-box" version, and
at least seven updates behind what is on the download.fedoralegacy.org site
(kernel-smp-2.4.20-46.9.legacy was put on the errata server about 3 weeks
ago). The updates are there for a reason. 'nuff said.

>[root@roch-bwconf-1 network-scripts]# cat ifcfg-eth1


That looks fine.

>[root@roch-bwconf-1 network-scripts]# ifconfig eth1
>eth1 Link encap:Ethernet HWaddr 00:0E:0C:08:6F:36
> inet addr:10.254.254.1 Bcast:10.254.254.255 Mask:255.255.255.0


That is completely baffling. The ONLY thing I can think of is something
screwy with the networking scripts - though your power grep should have
caught it unless something _else_ is causing the card to grab an address
off a boot server or some such trash. I'd look there. As a quick guess,
try 'rpm -qf /etc/sysconfig/network-script/if*' which probably should tell
you that everything comes out of the 'initscripts' package. Then try a
verification of that package (rpm -V initscripts) and see if anything barfs.
That stuff is explained in the 'rpm' man page. If that doesn't find the
problem, I'd grab a bucket of coffee, and start tracing the boot scripts
to see that they are doing what I'd expect. As is usual with distribution
scripts, they were written by someone who is good, and is flaunting their
skills, but they should none-the-less be understandable.

Old guy
 
Reply With Quote
 
Allen McIntosh
Guest
Posts: n/a

 
      03-24-2006, 02:15 AM
ls -l /etc/sysconfig/network-scripts/ifcfg-eth1

Does the file have three links to it?

-rw-r--r-- 3 root root 323 Mar 5 21:24
/etc/sysconfig/network-scripts/ifcfg-eth0
 
Reply With Quote
 
Unruh
Guest
Posts: n/a

 
      03-24-2006, 02:44 AM
(E-Mail Removed) (Moe Trin) writes:

>On 22 Mar 2006, in the Usenet newsgroup comp.os.linux.networking, in article
><(E-Mail Removed) s.com>,
>(E-Mail Removed) wrote:


>>I'm trying to change the IP address on eth1, and I think I'm doing
>>everything required:
>>
>># vi /etc/sysconfig/network-scripts/ifcfg-eth1
>># /etc/rc.d/init.d/network restart


Try ifdown eth1
ifup eth1
and see what happens.

Then do
ifconfig eth1
to see what the address is.

Also post the content of /etc/sysconfig/network-script/ifcfg-eth1

 
Reply With Quote
 
mkirsch1@rochester.rr.com
Guest
Posts: n/a

 
      03-28-2006, 03:02 PM
No, it doesn't.

Another brute force find and grep session yielded two other copies of
the ifcfg-eth1 script:

-rw-r--r-- 1 root root 406 Mar 22 15:00
/etc/sysconfig/network-scripts/ifcfg-eth1
-rw-r--r-- 2 root root 406 Mar 22 15:10
/etc/sysconfig/networking/devices/ifcfg-eth1
-rw-r--r-- 2 root root 406 Mar 22 15:10
/etc/sysconfig/networking/profiles/default/ifcfg-eth1

Once I manually changed all three, the changes "stuck."

 
Reply With Quote
 
Moe Trin
Guest
Posts: n/a

 
      03-29-2006, 08:10 PM
On 28 Mar 2006, in the Usenet newsgroup comp.os.linux.networking, in article
<(E-Mail Removed) .com>,
(E-Mail Removed) wrote:

>No, it doesn't.
>
>Another brute force find and grep session yielded two other copies of
>the ifcfg-eth1 script:


Why weren't they found on the first try?

>-rw-r--r-- 1 root root 406 Mar 22 15:00

/etc/sysconfig/network-scripts/ifcfg-eth1
>-rw-r--r-- 2 root root 406 Mar 22 15:10

/etc/sysconfig/networking/devices/ifcfg-eth1
>-rw-r--r-- 2 root root 406 Mar 22 15:10

/etc/sysconfig/networking/profiles/default/ifcfg-eth1

Next install, do an 'ls -li' on these files. Note the last two have two
links rather than one, and are probably hard linked

>Once I manually changed all three, the changes "stuck."


Makes you want to shoot someone at Red Hat. I suppose this is for the
convenience of multiple applications that look for the same information in
different places. Making these into _soft_ links pointing at the first file
would have been slightly more sensible.

Old guy
 
Reply With Quote
 
Allen McIntosh
Guest
Posts: n/a

 
      03-30-2006, 03:10 AM
>> -rw-r--r-- 1 root root 406 Mar 22 15:00
> /etc/sysconfig/network-scripts/ifcfg-eth1
>> -rw-r--r-- 2 root root 406 Mar 22 15:10

> /etc/sysconfig/networking/devices/ifcfg-eth1
>> -rw-r--r-- 2 root root 406 Mar 22 15:10

> /etc/sysconfig/networking/profiles/default/ifcfg-eth1
>
> Next install, do an 'ls -li' on these files. Note the last two have two
> links rather than one, and are probably hard linked
>
>> Once I manually changed all three, the changes "stuck."


As advertised. Grumble grumble RedHat grumble grumble.

> I suppose this is for the
> convenience of multiple applications that look for the same information in
> different places.


Maybe, but the applications were written by RedHat. I think it was an
attempt to mimic Windows hardware profiles (note profiles/default in the
last pathname), but it never really took.

>Making these into _soft_ links pointing at the first file
> would have been slightly more sensible.


Only slightly. I had a boot get messed up the other day because the
soft link for grub.conf was broken. I saved typing 5 characters and
lost half an hour.
 
Reply With Quote
 
Moe Trin
Guest
Posts: n/a

 
      03-31-2006, 12:50 AM
On Wed, 29 Mar 2006, in the Usenet newsgroup comp.os.linux.networking, in
article <v_HWf.41$(E-Mail Removed)>, Allen McIntosh wrote:

>>> Once I manually changed all three, the changes "stuck."

>
>As advertised. Grumble grumble RedHat grumble grumble.


Yeah, things did go down-hill in the past few

>> I suppose this is for the convenience of multiple applications that look
>> for the same information in different places.

>
>Maybe, but the applications were written by RedHat. I think it was an
>attempt to mimic Windows hardware profiles (note profiles/default in the
>last pathname), but it never really took.


There isn't a standard for this - other than common sense which seems to be
lacking. I've noted that KDE and GNOME seem to want to be offering tools
for their windoze educated users to allow them to screw up the configuration
of the systems. There is some difficulty of course, because each Linux
distributor seems to know better than any one else how to locate configurations
in obscure places, so a tool that works on Slack or SuSE won't find the same
files on Debian or Red Hat.

I suspect this may be more related to multiple static network configurations
rather than some hardware profile. All of our systems run with static IP
configurations, and only the tinyist handful is allowed to go walkies (and
for the most part even that is restricted as much as possible). To cater for
this, we have our users use different boot levels, where a S00 script in
the two or three run-level directories copies specific network configuration
scripts to /etc/sysconfig/network et.al. appropriate to the subnet that the
user will be needing. As this is only done to company systems, the awareness
of this mode needs only be communicated to the PC maintenance types at each
facility.

>>Making these into _soft_ links pointing at the first file
>> would have been slightly more sensible.

>
>Only slightly. I had a boot get messed up the other day because the
>soft link for grub.conf was broken. I saved typing 5 characters and
>lost half an hour.


Well... that'll teach you to proof read your typing ;-)

That does happen more times than people would like to admit. We had someone
set up a system and for some... "interesting" reason, he had the network
configuration scripts inside a soft link pointing to an NFS directory. And
of course, the NFS server was unreachable, because the network hadn't been
configured yet... That cost him two rounds of drinks after work.

Old guy
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Server 2003 Network problems since IP address change Oliver Maynard Windows Networking 16 07-29-2010 06:33 AM
network setup - trying to change IP address tractng@gmail.com Linux Networking 2 03-22-2006 04:44 PM
Windows 2003 Server change of network address. msuk Windows Networking 1 02-08-2006 07:20 PM
How do I connect Redhat 8 to the network with a static IP address? starwars Linux Networking 1 12-02-2004 10:27 AM
Can't change the f*@&#ing hostname in RedHat 9 Tron Thomas Linux Networking 2 08-10-2003 11:41 PM



1 2 3 4 5 6 7 8 9 10 11