Strange behaviour from eth0

Issues related to configuring your network
Post Reply
ONI
Posts: 2
Joined: 2015/05/24 00:34:26
Location: London, United Kingdom

Strange behaviour from eth0

Post by ONI » 2015/05/24 02:00:54

Hey,

I wonder if someone can help me out here. I have a CentOS 7.1.1503 virtual machine running and every hour at about 1 minute past the hour the device goes into a disconnected state.

I run a command 'nmtui connect eth0' to get the interface up. This brings it up till 1 minute past the next hour.

I have a feeling it may be a cron job which is doing this, but can't find anything in the cron.hourly:

0anacron:

Code: Select all

#!/bin/sh
# Check whether 0anacron was run today already
if test -r /var/spool/anacron/cron.daily; then
    day='cat /var/spool/anacron/cron.daily'
fi
if [ 'date +%Y%m%d' = "$day" ]; then
      exit 0;
fi

# Do not run jobs when on battery power
if test -x /usr/bin/on_ac_power; then
     /usr/bin/on_ac_power >/dev/null 2>&1
     if test $? -eq 1; then
     exit 0
     fi
fi
/usr/sbin/anacron -s
0yum-hourly.cron:

Code: Select all

#!/bin/bash

# Only run if this flag is set. The flag is created by the yum-cron init
# script when the service is started -- this allowsx one to use chkconfig and
# the standard "service stop¦start" commands to enable or disable yum-cron.
if [[ ! -f /var/lock/subsys/yum-cron ]]; then
   exit 0
fi

# Action!
exec /usr/sbin/yum-cron-hourly.conf
oh and heres a copy of the ifcfg-eth0 file:

Code: Select all

TYPE=ETHERNET
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=no
IPV6_AUTCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=eth0
UUID=67b698bb-7bc8-42ef-9f6d-9b79b93bd123
DEVICE=eth0
ONBOOT=yes
DNS1=8.8.8.8
HWADDR=00:15:5D:1F:4F:91
IPADDR=10.200.8.30
PREFIX=24
GATEWAY=10.200.8.254
USERS=root
NM_Controlled=yes
Heres what we see in messages:
NetworkManager[832]: <info> (eth0): device state change: deactivating -> disconnected (reason 'connection-removed') [110 30 38]
NetworkManager[832]: <info> (eth0): deactivating device (reason 'connection-removed') [38]
NetworkManager[832]: <info> NetworkManager state is now DISCONNECTED
Any thoughts on what i could check which may be causing this?

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: Strange behaviour from eth0

Post by aks » 2015/05/24 09:33:39

It sounds like something called "link flap" - Google will reveal the details.
You don't say - is this a virtual machine - if so which one (Vmware, VirtualBox, KVM etc.)?
If this is a physical machine - do both ends of the connect come up the same (i.e.: 100/Full, 100/Half etc.)?

ONI
Posts: 2
Joined: 2015/05/24 00:34:26
Location: London, United Kingdom

Re: Strange behaviour from eth0

Post by ONI » 2015/05/24 19:39:16

Checked out link flap, but as the vm is connected to a virtual switch, how would it flap? Can it see all the way to the cisco switch?

In terms of virtual, does it matter what the hypervisor is, but in this case its Hyper-V.

I don't understand your third question, if its connected to a virtual switch surely it its always up at the virtual switch end?

Also why at one minute past the hour would the issue occur, if it was link flap, wouldn't it be more intermittent?
Thanks
AJ

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Strange behaviour from eth0

Post by TrevorH » 2015/05/24 21:58:10

Check in /var/log/cron.log and see if anything in particular runs on the hour or x:01
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply