LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Ping stops after cable connect (https://www.linuxquestions.org/questions/linux-networking-3/ping-stops-after-cable-connect-4175623591/)

newhorizons009 02-12-2018 10:51 AM

Ping stops after cable connect
 
Hello All,

When my system boots up the ethernet port which is connected to my PC pings fine.

When I remove and insert the cable on either end, the ping stops and doesnt restore.

Messages I see is below.
libphy: stmmac-1:03 - Link is Down
libphy: stmmac-1:03 - Link is Up - 100/Full

Now if I do, ifconfig eth0 down and ifconfig eth0 up, the ping starts back again. Whats different is I see the link ready message which I didnt see when I plugged the cable back in.

eth1: device MAC address 00:11:ca:99:00:b1
IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
/etc/netplug.d # libphy: stmmac-1:03 - Link is Up - 100/Full
IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready

What may I missing in my netplugd ?

jefro 02-12-2018 02:42 PM

"When I remove and insert the cable on either end, the ping stops and doesnt restore."

Not sure that is a fault. What exactly do you wish to prove by this test? Kind of a lot going on in this. What is this Long Range Systems Inc. 00:11:CA?

JJJCR 02-12-2018 10:09 PM

I'm not sure whether you are referring to let your system interfaces to automatically detect the connection when it gets disconnected.

If you're using static IP Addressing.

Try going to: /etc/network/interfaces

And set the settings of your NIC, to auto. see sample config below.

Quote:

auto eth0
iface eth0 inet static
address 192.168.8.5
netmask 255.255.255.0
gateway 192.168.8.254

newhorizons009 02-13-2018 08:11 AM

My problem is my system is pinging a host just fine, but after the cable is removed and replugged, the pinging stops. Until I do ifconfig eth1 down and ifconfig eth1 up. After doing that the pinging resumes.

newhorizons009 02-13-2018 08:12 AM

Quote:

Originally Posted by jefro (Post 5818972)
"When I remove and insert the cable on either end, the ping stops and doesnt restore."

Not sure that is a fault. What exactly do you wish to prove by this test? Kind of a lot going on in this. What is this Long Range Systems Inc. 00:11:CA?

My problem is my system is pinging a host just fine, but after the cable is removed and replugged, the pinging stops. Until I do ifconfig eth1 down and ifconfig eth1 up. After doing that the pinging resumes.

ondoho 02-13-2018 11:21 AM

^ isn't that the expected behaviour?

newhorizons009 02-13-2018 12:45 PM

Quote:

Originally Posted by ondoho (Post 5819386)
^ isn't that the expected behaviour?

Expected behaviour would be to not do the ifconfig eth1 down and ifconfig eth1 up wouldn't it ? Plug the cable and the interface gets configured and its good to go without doing any manual commands.

JJJCR 02-13-2018 07:26 PM

Quote:

Originally Posted by newhorizons009 (Post 5819416)
Expected behaviour would be to not do the ifconfig eth1 down and ifconfig eth1 up wouldn't it ? Plug the cable and the interface gets configured and its good to go without doing any manual commands.

Have you tried changing the config to: auto eth0

Edit, try this also:
set eth0 config to:
ONBOOT=yes
check network level, type this at the command line:
/sbin/chkconfig --level 2345 network on

ondoho 02-14-2018 01:11 AM

Quote:

Originally Posted by newhorizons009 (Post 5819416)
Expected behaviour would be to not do the ifconfig eth1 down and ifconfig eth1 up wouldn't it ? Plug the cable and the interface gets configured and its good to go without doing any manual commands.

actually you're right.

for me it raises the questions what actually manages your network connections.
on my system it's systemd, and nothing else:(*)
Code:

systemctl|grep eth
i could imagine networkmanager interfering, if you use it.

what distro, setup?

(*) on my distro, netplug isn't even in the repos anymore, i think systemd long since provides that functionality.
which systemd version?


All times are GMT -5. The time now is 05:17 AM.