CentOS 7 Network Question

Home » CentOS » CentOS 7 Network Question
CentOS 3 Comments

I have a question about the network and CentOS 7

I am experimenting with two C7 installations:
– On relatively new hardware, configured with fixed IP address in IPV4 only
– on top of Windows, using VMWare, sharing my windows connection via Vmware’s bridge with IPV4 only.

On both configurations, I run a script every five minutes to test the network. The sequence is as follows:
– Find the default interface using “ip route”
– Find that interface’s IP address by scanning the output of “ip route” for a match in interface.

If the above tests fail to resolve, I issue “systemctl restart network”, and post a mail message to myself. When this happens, the network does indeed come back correctly.

I do the same sequence on CentOS 6 installations, (using “system network restart”).

I find that on CentOS 6, I almost never get notified that the restart occurred (except when there’s a real reason).

On CentOS 7, however, I find that about once a day or so, I get notified, even though there’s nothing that has changed.

On CentOS 6, I left the avahi daemon running. On CentOS 7, I
disabled avahi (because with it enabled, I was getting this failure once every few hours).

Are there any clues in the above? On C7, the “messages” log has nothing that I can associate with the failure.

David

3 thoughts on - CentOS 7 Network Question

  • Hi,

    The BIG difference is systemd and that affects how the system is configured for service.

    For that reason “system network restart” will not work in CentOS 6. You should try “service network restart” .

    –Regards Ashishkumar S. Yadav

  • If you are using fixed IP addresses, how is this check supposed to detect network failures? Actually I’m surprised that it’s failing sometimes, as it should be pretty static.

    If that test is really that way, I would recommend saving those outputs for post analysis because the shouldn’t be changing like that. Like, instead of ip route | grep, save it to a file using a known timestamp, grep on it and leave it there/mail it to you if it fails.

    Marcelo

  • At 07:44 AM 5/11/2015, you wrote:

    Marcelo et al

    Of course, now that I stare at my environment, have ‘avahi’ and
    ‘network manager’ turned off, the failure does not show up. So, I withdraw the problem.

    David