[CentOS] Centos 7 Network Question

Marcelo Ricardo Leitner marcelo.leitner at gmail.com
Mon May 11 14:44:03 UTC 2015


On 11-05-2015 00:57, david wrote:
> 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.

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




More information about the CentOS mailing list