ifup fails for static IP address. Is ifcfg wrong?
Art Edwards
edwardsa at afrl.kirtland.af.mil
Tue Jul 4 01:39:42 UTC 2006
I dug a little deeper and found that the ifcfg-eth0 in default had the wrong
IP address--one that was actually in use. When I changed that value, all
started to work. I really don't know why the ifcfg-eth0 script in
/etc/sysconfig/networking/profiles/default
is different from that in
/etc/sysconfig/network-scripts.
In fact, I really don'tunderstand why there are two. Why not symbolic links?
Anyway, thanks for the response.
Art Edwards
On Mon, Jul 03, 2006 at 05:32:42PM -0500, Robert Nichols wrote:
> Art Edwards wrote:
> >I just installed Fedora core 5. I have a static IP address. When the
> >system boots it tells me that this IP address is already in use. It then
> >defaults to dhcp. I have looked at the /sbin/ifcfg code, where the error
> >arises, and I find
> >the following:
> >
> >if ! arping -q -c 2 -w 3 -D -I $dev $ipaddr ; then
> >echo "Error: some host already uses address $ipaddr on $dev." 1>&2
> >exit 1
> >fi
> >
> >When I issue the same command (without the -q switch) with eth0
> >substituted for $dev and my ipaddress substituted for $ipaddr, I receive
> >no response. However, when I issue the same command with another ip
> >address that I know is active, I receive an affirmative.
> >
> >I think that the code above is incorrect. Specifically, I think the !
> >(not) is wrong.
>
> No, that code is correct. In a shell script, "if ! arping ..."
> does not mean "if arping returns 0". It means "if the arping
> command fails", and "arping -D" gives a failure (i.e., non-zero)
> return code if it detects a reply.
>
> I don't know why you're having a problem. My FC5 test box is
> set up with a static IP address on its one and only ethernet
> interface, and that is working fine for me.
>
> [root at omega-3b ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
> # Intel Corporation 82801DB PRO/100 VM (LOM) Ethernet Controller
> DEVICE=eth0
> BOOTPROTO=static
> BROADCAST=192.168.43.255
> HWADDR=00:0B:CD:98:7A:48
> IPADDR=192.168.43.50
> NETMASK=255.255.255.0
> NETWORK=192.168.43.0
> ONBOOT=yes
> [root at omega-3b ~]#
>
> --
> Bob Nichols Yes, "NOSPAM" is really part of my email address.
>
> --
> fedora-devel-list mailing list
> fedora-devel-list at redhat.com
> https://www.redhat.com/mailman/listinfo/fedora-devel-list
More information about the fedora-devel-list
mailing list