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
Hi,
On Mon, May 11, 2015 at 9:27 AM, david david@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
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
At 07:44 AM 5/11/2015, you wrote:
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
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