LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Network configuration on RHEL 6.3 (https://www.linuxquestions.org/questions/linux-newbie-8/network-configuration-on-rhel-6-3-a-4175449823/)

cortexa 02-12-2013 09:18 AM

Network configuration on RHEL 6.3
 
Hi, I'm having trouble configuring network access and I hope you can help.

I recently reinstalled Red Hat Enterprise 6.3 and set up the NetworkManager to configure my dhcp connection to a wired network.
I also altered the ifcfg-eth0 file to include the lines ONBOOT="yes" and BOOTPROTO="dhcp".

I'm not sure if this was the right thing to do, but in any case it worked, and I had full connectivity. Today, I had to reboot the computer and when I did I could no longer connect to the network; NetworkManager doesn't seem to be able to acquire an IP address.

I've tried multiple options to fix this problem, using the NetworkManager and network services. I've tried every possible combination of the ifcfg-eth0 and /etc/sysconfig/network files, including or removing HWADDR, GATEWAY and NM_CONTROLLED parameters.

/etc/sysconfig/network-scripts/ifcfg-eth0:
Quote:

DEVICE="eth0"
NM_CONTROLLED="no"
ONBOOT="yes"
BOOTPROTO="dhcp"
#HWADDR=18:03:73:3F:FD:AB
/etc/sysconfig/network:
Quote:

NETWORKING=yes
HOSTNAME=ECAPPSY191.ucc.ie
#GATEWAY=143.239.1.199
Basically, when I try to connect via NetworkManager I just get a message saying either 'The network was disconnected' or 'Device not managed', depending on the options I included. When I try to connect via the network service (i.e. 'service network restart') the startup hangs on the line 'Determining IP information for eth0...', regardless of what options I have used.

I don't think there are any hardware problems as I managed to connect before (apparently by pure fluke) and I know the network port is active.

I'd really appreciate any advice you can offer here; I'm sure I've just done something stupid or missed an obvious clue, but I'm not sure what to do next.

Thanks!

Output of ifconfig:

Quote:

eth0 Link encap:Ethernet HWaddr 18:03:73:3F:FD:AB
inet6 addr: 2002:8fef:aabb:4:1a03:73ff:fe3f:fdab/64 Scope:Global
inet6 addr: fec0::4:1a03:73ff:fe3f:fdab/64 Scope:Site
inet6 addr: fe80::1a03:73ff:fe3f:fdab/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1792490 errors:1 dropped:0 overruns:0 frame:1
TX packets:834 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:189774068 (180.9 MiB) TX bytes:241652 (235.9 KiB)
Interrupt:20 Memory:eb400000-eb420000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:30 errors:0 dropped:0 overruns:0 frame:0
TX packets:30 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0

jpollard 02-12-2013 10:33 AM

If you are using network manager then it must be "NM_CONTROLLED=yes" or NetworkManager will not bring up the interface.

cortexa 02-12-2013 10:47 AM

Quote:

Originally Posted by jpollard (Post 4889961)
If you are using network manager then it must be "NM_CONTROLLED=yes" or NetworkManager will not bring up the interface.

Yes, thanks, I did try that - I switched NM_CONTROLLED to "no" when I was trying to connect via the network service. I had it switched to "yes" when I was trying to get NetworkManager to work.

jpollard 02-12-2013 11:12 AM

Ok. It may be something else then. I gave up NetworkManager since F16 because it doesn't seem to handle static IP numbers properly.

My configuration (ifcfg-eth1) was derived from a F14 one that worked, plus tweaks from F16.:
Code:

# Networking Interface
DEVICE=p6p1
HWADDR=xx:xx:xx:xx...
ONBOOT=yes
BOOTPROTO=dhcp
TYPE=Ethernet
NM_CONTROLLED=no
USERCTL=no
IPV6INIT=no
NAME="System eth1"
UUID=xxxxxxxxxxxxxxxxxxxxxxxxx
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=yes

Note the device name - p6p1 - Ethernet names changed to a port/unit type of numbering. You might check that. Also the UUID is to reinforce the correct identity of the interface (one of the tweaks from F16 I believe).

lleb 02-12-2013 11:49 AM

on my centOS 6.3 box i have the following configurations that might help. FYI i DO NOT use the GUI at all as my cent box is my server. it has no keyboard, mouse, nor monitor connected to it, just a power cable and a network cable, nothing more.

Code:

[root@centos ~]# ifconfig
eth0      Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx 
          inet addr:192.168.2.125  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: xxxxx Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:753640106 errors:928 dropped:0 overruns:0 frame:928
          TX packets:152723550 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:273664141857 (254.8 GiB)  TX bytes:185828292469 (173.0 GiB)
          Interrupt:22 Base address:0x8000

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:85 errors:0 dropped:0 overruns:0 frame:0
          TX packets:85 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:11840 (11.5 KiB)  TX bytes:11840 (11.5 KiB)

[root@centos ~]# cat /etc/sysconfig/network

NETWORKING=yes
HOSTNAME=mine.not.yours
GATEWAY=192.168.2.1
[root@centos ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
TYPE="Ethernet"
HWADDR=xx:xx:xx:xx:xx:xx
NAME="System eth0"
ONBOOT="yes"
#BOOTPROTO="dhcp"  NOTE this line is for when I take the box out of the house
BOOTPROTO="static"  it will be swapped with this line
NM_CONTROLLED="no"
IPADDR=192.168.2.125
NETMASK=255.255.255.0
USERCTL="no"
#DEFROUTE=yes
#PEERROUTES=yes
#PEERDNS=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
[root@centos ~]# cat /etc/resolv.conf
nameserver 192.168.2.1

also when i switch over to DHCP i comment out the IPADDR and NETMASK lines.

not the resolv.conf. I run internal DNS so i point everything there. when I leave the house I will switch the nameserver from internal to 8.8.8.8 and use google's DNS.

hope that helps.

chrism01 02-12-2013 05:23 PM

I agree that I've always had trouble with NM (as have others), so I always disable it.
My resolv.conf
Code:

cat /etc/resolv.conf
; generated by /sbin/dhclient-script
nameserver 192.168.1.254

using dhcp.

You can check the correct MAC by looking at /etc/udev/rules.d/70-persistent-net.rules


All times are GMT -5. The time now is 03:07 PM.