[CentOS] Centos 7 Network Question

Mon May 11 05:22:34 UTC 2015
Ashish Yadav <gwalashish at gmail.com>

Hi,


On Mon, May 11, 2015 at 9:27 AM, david <david at daku.org> 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.
>
> 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).
>

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