Discussion Locked

Help with setting IP address on linux 7

0 helpful
15 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

When I type: /sbin/ifconfig eth0
The inet addr: & Bcast: & Mask: are missing.
Everthing else is showing up ok. No errors.

Also when I type: /sbin/ifup eth0
it says: Determining IP information for eth0...Operation failed.

When I try to ping the IP address it says:
connect: Network unreachable.

Please help. Thanks.
Darryl

15 replies

by dustbunnyden_webmaster

I am guessing that you are not using DHCP, if this is the case you can go into netcfg and manually set the ip address.

let me know if this helps.

by gmathur

Pls check ur /etc/sysconfig/network-scripts/
dir u can see ifcg-eth0 file, check the entries of this file.

Gunjan

by mickeyd

The file /etc/sysconfig/network contains the
hostname, and gateway IP and device.

The file
/etc/sysconfig/network-scripts/ifcfg-eth0
contains the static IP address, netmask,
broadcast address, device, and onboot flag.

You are apparentlyusing RedHat and these
items can be changed by editing the file, or
using netcfg, netconf, or linuxconf.

by webmaster

Yes, I'm using RedHat. And I have changed these items by editing these files. Still same problem. Thanks.

by mtuppen

By Linux 7 are you meaning RedHat 7?
If you are, then I would:
> login as root
> Start up linuxconf
> Go to Host name and IP network devices and put your subnet mask in Netmask (usually 255.255.255.0)
> Accept
> Under Routing and gateways, go to Set Defaults and put in your gateway (usually number 1 in the IP address range ie. if IP was 192.168.54.67 it would be 192.168.54.1)
> Make sure you Act changes as you go along. You may need a reboot, but possibly not.
> I say "usually" to the subnet mask and gateway because it may be different, depending on your network

Regards,
Mike.

by brianbarber

Open /etc/sysconfig/network-scripts/ifcfg-eth0 in your text editor of choice (e.g. pico /etc/sysconfig/network-scripts/ifcfg-eth0), and add your information. If you can't find it, this will create it. It should look something like this:

DEVICE=eth0
IPADDR=x.x.x.x
NETMASK=y.y.y.y
ONBOOT=yes

Save the file and then down and up the device by issuing these commands at the prompt:
ifconfig eth0 down
ifconfig eth0 up

Cheers,
BB

by schannachie

Hi,

This looks like a hardware faliure. Or that the driver that you are using doesn't work properly, happens linux some times is unable to use the dirver that you set when you install a net card (in some pci realtek cads I'm using ne2000 pci card dirver, instead of the realtek dirver for linux). Check out the /var/log/messages or /var/log/bootlog files to find out if the dirver starts properly.

Hope you work it out !

This discussion is closed to new replies.