LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   CentOS - Only one network adapter starts (https://www.linuxquestions.org/questions/linux-server-73/centos-only-one-network-adapter-starts-4175459936/)

Mousepad123 04-28-2013 10:28 PM

CentOS - Only one network adapter starts
 
Hello

I use CentOS on every server I have. One of my servers, an HP ProLiant DL320 Generation 2, has a network card that is pretty much perfect for CentOS, except for one small flaw. For some reason, I can't get CentOS to use both network adapters at the same time. I can have both network cards up (using
Code:

ifconfig eth* up
), but only one can have an IP address. eth0 Has a static IP address of 172.16.1.2/16 and eth1 should have a DHCP address on the 172.17.*.*/16 network. Dhclient on eth1 makes eth0 stop responding, and then only eth1 will work. Using
Code:

/etc/init.d/network restart
will shut down both eth0 and eth1, but only eth0 gets started back up. When Windows Server 2003 and Fedora 14 were installed on the system, the network adapters worked perfectly. I switched over to CentOS because Fedora 14 was having problems with the LSI MegaRAID that is integrated and can't be turned off. But I digress. Would anyone be able to give me some info on how I could get both network cards working?

chrism01 04-28-2013 11:39 PM

Can you show the content of /etc/sysconfig/network-scripts/ifcfg-eth0 & ifcfg-eth1.
Can you check the MAC address reservations in the DHCP server.

Mousepad123 04-29-2013 01:24 AM

/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
BROADCAST=172.16.1.255
DNS1=208.67.222.222
GATEWAY=172.16.1.1
IPADDR=172.16.1.2
IPV6INIT=yes
IPV6_AUTOCONF="yes"
NETMASK=255.255.0.0
NM_CONTROLLED=yes
ONBOOT=yes
TYPE=Ethernet
UUID="726d6478-b047-4495-9d0b-d1d385661f94"
HWADDR=00:0b:cd:cc:0c:2f
PREFIX=16
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME="System eth0"
LAST_CONNECT=1361132019
DNS2=208.67.220.220
USERCTL=no

/etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
BOOTPROTO=dhcp
NM_CONTROLLED=yes
ONBOOT=no
TYPE=Ethernet
UUID="562138f1-ffd4-4c0f-9264-94e5cf386fb3"
HWADDR=00:0b:cd:cc:0c:44
PREFIX=24
DNS1=208.67.222.222
DNS2=208.67.220.220
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth1"
USERCTL=no
PEERDNS=yes

MAC Address reservations:

Couldn't give these out, Smoothwall doesn't log MAC addresses.

chrism01 04-29-2013 06:41 AM

1. do you want IPV6 on or not? Unless you're actively using it, I'd recommend not.
http://www.unixtutorial.org/2009/12/...red-hat-linux/

2. I always turn NM_CONTROLLED off ('no'). It seems to cause more problems than it supposedly helps with. You can probably find a lot of agreement on google.

3. check mac addresses against /etc/udev/rules.d/70-persistent-net.rules

4. wherever you're getting your DHCP leases from, you need to know if its trying to hand out the address used by eth0

jpollard 04-29-2013 07:11 AM

Looks like you are missing the netmask on ifcfg-eth1...

The PREFIX is also 24, and not 16.

The combination causes ifcfg-eth1 to be configured with a netmask of 255.255.255.0, and that would cause eth0 to be disabled.

Mousepad123 04-29-2013 09:28 PM

Problem resolved. I disabled NMCONTROLLED on both adapters, disabled IPv6, and put both network cards on the same /16 (172.16.*.*). Now they both work perfectly.


All times are GMT -5. The time now is 02:53 AM.