4

I'm having an issue configuring networking for my RHEL6 box.

Whenever I run "system-config-network" -> "Device configuration" I get nothing there, like I dont have any ethernet devices, when I look for my eth* through dmesg I dont see anything there either... BUT! if I do

ifconfig eth0 up
ifconfig eth1 up

all of the sudden I have these two interfaces up and running, I did noticed that my /etc/sysconfig/networking/ is empty though, so I think it has something to do with that, but how do I tell RHEL6 to recreate those files?

any ideas?

ewwhite
  • 197,159
  • 92
  • 443
  • 809
alexus
  • 13,112
  • 32
  • 117
  • 174
  • might want to go back and accept some answers to get quick help.. your rate is getting low – Mike Aug 10 '11 at 17:24
  • I can't accept: no answer or answer that's not really answering my original question, that would defeat the whole purpose of asking/accepting questions. – alexus Aug 10 '11 at 17:43

2 Answers2

2

Check the interface files in /etc/sysconfig/network-scripts/. The files, ifcfg-eth0 and ifcfg-eth1 would correspond to those interfaces. It sounds like Network Manager is setup to manage those interfaces instead of the normal subsystem. Check the contents of those files and modify the line "NM_CONTROLLED" to say no instead of yes. Restart the networking system or reboot following the change.

DEVICE=eth1
HWADDR=00:50:56:B5:00:42
NM_CONTROLLED=yes
ONBOOT=no
BOOTPROTO=dhcp
TYPE=Ethernet
IPV6INIT=no
USERCTL=no

Update - The devices aren't in place, so you can re-add them using the system-config-network utility. Just create devices for the interfaces you need (presumably eth0 and eth1). You can also just create the files needed and populate them with the content from above, correcting the DEVICE name and removing the HWADDR field, then restarting the network service.

enter image description here enter image description here enter image description here

ewwhite
  • 197,159
  • 92
  • 443
  • 809
  • I dont have /etc/sysconfig/networking-scripts/ifcfg-eth* those files were removed/deleted, is there a way for redhat to somehow force it to create those files as it did before (installation process)? – alexus Aug 10 '11 at 17:43
  • Yes. See the edited comment above. – ewwhite Aug 10 '11 at 19:21
  • you saying edit files, i say files do not exists. I need for system to re-generate those files like it did while installation of OS. – alexus Aug 10 '11 at 19:25
  • I appreciate you adding screen shots but i'm saying when I run system-config-network and I click "Device configuration" I get nothing in there, so nothing to be added. – alexus Aug 10 '11 at 19:34
2

That happened to me a while ago. Just do this as root: (This is CentOS 6)

1) Get the MAC Address of the desired device: ip link show <device_name> (Thanks to @Mike Pennington for pointing out this command).

2) nano /etc/sysconfig/network-scripts/ifcfg-eth0 (if it doesn't exist, it doesn't matter, continue because nano will let you create the file)

3) Insert the next lines:

DEVICE="eth0"
HWADDR="**YOUR_MAC_ADDRESS**"
NM_CONTROLLED="no"
ONBOOT="yes"
BOOTPROTO="dhcp"

4) Save and exit nano

5) ifdown <device_name> (e.g. ifdown eth3)

6) ifup <device_name> (e.g. ifup eth3)

7) Check that an IP Address has been assigned to your device by issuing the command ip addr

Now you should have everything working. In any case run the command lspci in order to look all the devices and the ethernet should appear correctly.

If you want, run the command system-config-network to setup the new device, but if you do this go a check the file /etc/sysconfig/network-scripts/ifcfg-eth0 again and see that the format is correct, something like this:

DEVICE=eth0
NM_CONTROLLED=no
TYPE=Ethernet
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME=eth0
UUID=2gb02bd0-0bb0-8fgb-40f2-d6edd65f3e03
ONBOOT=yes
HWADDR=03:90:17:c0:41:34
PEERROUTES=yes

If you have any errors post them here and we'll check.

Edenshaw
  • 138
  • 6
  • 2
    +1, but you don't need to look at `/etc/udev/rules.d/70-persistent-net.rules`, you can just do `ip link show ` to get the mac-address – Mike Pennington Aug 09 '12 at 20:30