eth0 and eth4 - must be online together!!!

Issues related to configuring your network
p78.w
Posts: 15
Joined: 2019/02/01 09:21:47

eth0 and eth4 - must be online together!!!

Post by p78.w » 2019/02/19 11:00:58

Hi All
I have a strange issue regarding networking. Im not a linux engineer but more vmware and wintel engineer so pls bear with me!

I have a backup server running centos 6.5 (if you need more info let me know).

I backup to LTO7 media a NAS drive, however the speeds are rubbish. So purchased a 10GB NIC (eth4/eth5) card for the server and have installed it fine.

eth0 is on 10.100.209.x
eth1 is on 192.168.x.x
eth2 is on dhcp (unused)
eth3 is on dhcp (unused)
eth4 is on 10.10.209.x
eth5 is not config

When I disable eth0 , eth4 goes offline too. I just simply want to disable eth0 and use eth4 as a primary nic, but eth4 goes offline too until service network restart command is run and then both interfaces come online.


DEVICE=eth0
TYPE=Ethernet
UUID=6f7ec780-88ea-461d-8ad1-xxxxx
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=none
HWADDR=80:C1:6E:66:xx:xx:xx
IPADDR=10.10.209.x
PREFIX=24
GATEWAY=10.10.209.1
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth0"

DEVICE=eth4
HWADDR=28:80:23:41:xx:xx
TYPE=Ethernet
UUID=2db4a4f9-5f53-4fxd-9396-xxxxd
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=static
IPADDR=10.10.209.x
NETMASK=255.255.255.0
GATEWAY=10.10.209.1
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth4"

tunk
Posts: 546
Joined: 2017/02/22 15:08:17

Re: eth0 and eth4 - must be online together!!!

Post by tunk » 2019/02/19 13:34:45

You really, really should do a yum update to get 6.10.

As for the network, you may want to set ONBOOT=no for eth0.
I think the general advice is to only have one GATEWAY defined.
You could also try to rename or remove ifcfg-eth0.

p78.w
Posts: 15
Joined: 2019/02/01 09:21:47

Re: eth0 and eth4 - must be online together!!!

Post by p78.w » 2019/02/19 14:19:42

Thanks for replying, updating the OS might be an option but I need this aspect to work with regards to networking.

I dont get why the network adapters knock the other out!

tunk
Posts: 546
Joined: 2017/02/22 15:08:17

Re: eth0 and eth4 - must be online together!!!

Post by tunk » 2019/02/19 14:36:08

It may be that the GATEWAY is defined only for eth0, and when you stop that you don't have a gateway.
What the output of this (with/without eth0 disabled): ip addr show

p78.w
Posts: 15
Joined: 2019/02/01 09:21:47

Re: eth0 and eth4 - must be online together!!!

Post by p78.w » 2019/02/19 16:09:20

my gateway is defined on both ifcfg-eth0 and ifcfg-eth4.

when I down ifcfg-eth0 , eth4 nic does down.

User avatar
TrevorH
Forum Moderator
Posts: 25810
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: eth0 and eth4 - must be online together!!!

Post by TrevorH » 2019/02/19 16:12:01

Your two interfaces are set up in the same subnet and this leads to confusion and non-working connections.

If this is a dedicated connection to one other machine then pick a new subnet and reconfigure both ends to use it.

If you must attempt to use both at the same time (not advisable except under special circumstances) then you need to remove GATEWAY= from one of the two ifcfg files. You'll also probably want to set up sysctl.conf to set (some of) the following

Code: Select all

net.ipv4.conf.default.rp_filter = 2
net.ipv4.conf.all.rp_filter = 2
net.ipv4.conf.all.arp_ignore = 1
net.ipv4.conf.all.arp_announce = 2
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

p78.w
Posts: 15
Joined: 2019/02/01 09:21:47

Re: eth0 and eth4 - must be online together!!!

Post by p78.w » 2019/02/19 16:14:32

The plan is to remove eth0 once all traffic is coming via eth4.

I have set eth0 to a dhcp interface and lost access to eth4 (set as static ip address) too.

So need to figure out where is screwing up

p78.w
Posts: 15
Joined: 2019/02/01 09:21:47

Re: eth0 and eth4 - must be online together!!!

Post by p78.w » 2019/02/19 16:16:58

when I do a "route"

I see default as use iface as eth0

aany ideas how I change to eth4?

p78.w
Posts: 15
Joined: 2019/02/01 09:21:47

Re: eth0 and eth4 - must be online together!!!

Post by p78.w » 2019/02/19 16:41:50

So setting eth0 to dhcp interface is done,
eth4 is now the primary and default route out when listing route

but the eth4 does not come online!

User avatar
TrevorH
Forum Moderator
Posts: 25810
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: eth0 and eth4 - must be online together!!!

Post by TrevorH » 2019/02/19 16:55:12

The problems with having two interfaces on the same subnet will be even worse when using DHCP. I'd suggest just disabling eth0 entirely if eth4 is meant to be its replacement. You will get nothing but problems by having two interfaces within the same subnet on the same machine.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

Post Reply