Intermittent internet connection on iMac - doesn't look like a hardware issue
My wife's iMac is having intermittent internet connection, sometimes losing it for days. The Mac is connected to an Ethernet socket which appears to have a stable connection to the router - I checked this on my MacBook Pro at a time where her iMac was showing no connection. My laptop was showing a stable connection using the same cabling. We have also tried alternative cables to be sure. Initially, after changing her Ethernet cable she did then get a connection but a couple of days later it was gone and now it's hit and miss.
Any advice on troubleshooting this one. I am not convinced this is a hardware issue - socket seems fine, as do cables. I guess there is a possibility of an intermittent Ethernet socket on her Mac but it doesn't really look like that. If it is a software issue, how might I rectify this?
Thank you
iMac (2017 – 2020)