Random issue; disconnects from internet, unable to run update command, cant ping others on LAN

I have 5 machines based on Ubuntu bionic. 2 are Ethernet and 3 are WiFi. I also have an android tablet and android phone. All these devices are dropping connection to network and internet seemingly at random.

The Ubuntu Machine I'm mostly concerned with is my workstation running MATE, the others are running LinuxMint Tara. The network information in gui shows they are connected. I never get a network disconnect notification on panel. What happens is this; as I'm browsing with any browser it may take long to load when I click a link or open a new tab, or when I open a browser window. This is usually followed by the browser displays a generic 'can't reach server page', but sometimes it just hanging and loads forever.

When this happens I also can't run update command in terminal, or ping any machines on the network. If I reboot the problem is usually fixed but not all the time. It seems to fix itself if I use the network icon in notification area of panel to 'disable networking' then 'enable' it. The thing is that the issue returns whenever it wants. At random it will work again and I'll be able to update, ping other computers or browse online, but it will break inevitably.

My android devices do the same thing, the network shows as being connected, but browsers and apps do not work correctly. Because this is the case I thought my router was going out but then I remembered I have 2 dual boot Windows 7 machines and tested windows side on those machines. I've been able to browse, download, stream and do anything on those machines with no problems since 2 days ago. Windows is not having this issue at all so the router must not be the problem. It has got to be Ubuntu doing something I'm probably too much a Linux noob to understand.

I keep all these machines updated and don't really do a risky things online. Well I guess I might because I do play this cracked version of Aliens Vs Predator 2 in wine and I'm sure its a very hacker populated game. The other day I played with a dude whose claimed to be a network security specialist and I told them I was trans and got bullied for like an hour by another guy he was talking to. I'm wondering how I would know if someone is messing with me or not, and I don't have slightest clue how to find out.

I really need help. I noticed my router settings had a lot of devices in the list so I reset it to factory settings (probably because I've reinstalled OSes so much) and reconfigured everything to clean it up so to speak. I've reset the router many times and done power off, leaving unplugged for a minute or 2, and re powering device. The problem still persists only in my Ubuntu based systems. My main workstation is my biggest concern and it seems to be the worst of them all. One of the WiFi connected computers seems to have fixed itself but my main desktop is totally unreliable for internet connection now.

Can someone please help me out and where should I start?
I do notice that on my main workstation I have 4 different IPv6 addresses, is that normal?

Thank you for your help because I haven't really had any major problems like this with Linux before. Everything has always just worked besides things that were easy to work around but this is beyond my understanding of a lot of things and the internet is necessary for me. I'm literally in tears because I'm trying to find a job and going through lot of personal problems and I need the internet to get through all of this.

The dual boot computers are my kids gaming computers and I guess I'll be using one of those for now because; 1) I don't want to install windows on my machine 2) I would feel like such a failure if I did. 3) My CPU doesn't even support Windows 7, its Kabylake gen and I don't have Windows 10, nor the money to pay for it.

Thank you very much for reading all of this. Here are some commands that I used to get some useful info for anyone who has the skills to evaluate what's happening.

ifconfig -a
enp0s31f6: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.80 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 2600:1700:8be0:1950::3f8 prefixlen 128 scopeid 0x0
inet6 2600:1700:8be0:1950:2c61:904c:48ca:d3aa prefixlen 64 scopeid 0x0
inet6 2600:1700:8be0:1950:61f4:9b39:159:fda7 prefixlen 64 scopeid 0x0
inet6 fe80::5ebd:1dda:5cd0:f5c5 prefixlen 64 scopeid 0x20
ether 30:9c:23:9c:a0:88 txqueuelen 1000 (Ethernet)
RX packets 46729 bytes 41560601 (41.5 MB)
RX errors 0 dropped 2185 overruns 0 frame 0
TX packets 27998 bytes 6195132 (6.1 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 16 memory 0xdf200000-df220000
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 1000 (Local Loopback)
RX packets 1115 bytes 116212 (116.2 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1115 bytes 116212 (116.2 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lspci:
00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers (rev 06)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x16) (rev 06)
00:08.0 System peripheral: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th Gen Core Processor Gaussian Mixture Model
00:14.0 USB controller: Intel Corporation 200 Series/Z370 Chipset Family USB 3.0 xHCI Controller
00:14.2 Signal processing controller: Intel Corporation 200 Series PCH Thermal Subsystem
00:16.0 Communication controller: Intel Corporation 200 Series PCH CSME HECI #1
00:17.0 SATA controller: Intel Corporation 200 Series PCH SATA controller [AHCI mode]
00:1c.0 PCI bridge: Intel Corporation 200 Series PCH PCI Express Root Port #5 (rev f0)
00:1c.6 PCI bridge: Intel Corporation 200 Series PCH PCI Express Root Port #7 (rev f0)
00:1f.0 ISA bridge: Intel Corporation 200 Series PCH LPC Controller (B250)
00:1f.2 Memory controller: Intel Corporation 200 Series/Z370 Chipset Family Power Management Controller
00:1f.3 Audio device: Intel Corporation 200 Series PCH HD Audio
00:1f.4 SMBus: Intel Corporation 200 Series/Z370 Chipset Family SMBus Controller
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (2) I219-V
01:00.0 VGA compatible controller: NVIDIA Corporation GP107 [GeForce GTX 1050 Ti] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GP107GL High Definition Audio Controller (rev a1)
02:00.0 USB controller: ASMedia Technology Inc. Device 2142
03:00.0 PCI bridge: ASMedia Technology Inc. ASM1083/1085 PCIe to PCI Bridge (rev 03)

sudo lshw -C network
*-network
description: Ethernet interface
product: Ethernet Connection (2) I219-V
vendor: Intel Corporation
physical id: 1f.6
bus info: pci@0000:00:1f.6
logical name: enp0s31f6
version: 00
serial: 30:9c:23:9c:a0:88
size: 1Gbit/s
capacity: 1Gbit/s
width: 32 bits
clock: 33MHz
capabilities: pm msi bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=3.2.6-k duplex=full firmware=0.8-4 ip=192.168.1.80 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s
resources: irq:126 memory:df200000-df21ffff

ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp0s31f6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 30:9c:23:9c:a0:88 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.80/24 brd 192.168.1.255 scope global dynamic noprefixroute enp0s31f6
valid_lft 83376sec preferred_lft 83376sec
inet6 2600:1700:8be0:1950::3f8/128 scope global dynamic noprefixroute
valid_lft 2588975sec preferred_lft 601775sec
inet6 2600:1700:8be0:1950:61f4:9b39:159:fda7/64 scope global temporary dynamic
valid_lft 3434sec preferred_lft 3434sec
inet6 2600:1700:8be0:1950:2c61:904c:48ca:d3aa/64 scope global dynamic mngtmpaddr noprefixroute
valid_lft 3434sec preferred_lft 3434sec
inet6 fe80::5ebd:1dda:5cd0:f5c5/64 scope link noprefixroute
valid_lft forever preferred_lft forever

ethtool -g enp0s31f6
Ring parameters for enp0s31f6:
Pre-set maximums:
RX: 4096
RX Mini: 0
RX Jumbo: 0
TX: 4096
Current hardware settings:
RX: 256
RX Mini: 0
RX Jumbo: 0
TX: 256

ethtool -k enp0s31f6
rx-checksumming: on
tx-checksumming: on
tx-checksum-ipv4: off [fixed]
tx-checksum-ip-generic: on
tx-checksum-ipv6: off [fixed]
tx-checksum-fcoe-crc: off [fixed]
tx-checksum-sctp: off [fixed]
scatter-gather: on
tx-scatter-gather: on
tx-scatter-gather-fraglist: off [fixed]
tcp-segmentation-offload: on
tx-tcp-segmentation: on
tx-tcp-ecn-segmentation: off [fixed]
tx-tcp-mangleid-segmentation: off
tx-tcp6-segmentation: on
udp-fragmentation-offload: off
generic-segmentation-offload: on
generic-receive-offload: on
large-receive-offload: off [fixed]
rx-vlan-offload: on
tx-vlan-offload: on
ntuple-filters: off [fixed]
receive-hashing: on
highdma: on [fixed]
rx-vlan-filter: off [fixed]
vlan-challenged: off [fixed]
tx-lockless: off [fixed]
netns-local: off [fixed]
tx-gso-robust: off [fixed]
tx-fcoe-segmentation: off [fixed]
tx-gre-segmentation: off [fixed]
tx-gre-csum-segmentation: off [fixed]
tx-ipxip4-segmentation: off [fixed]
tx-ipxip6-segmentation: off [fixed]
tx-udp_tnl-segmentation: off [fixed]
tx-udp_tnl-csum-segmentation: off [fixed]
tx-gso-partial: off [fixed]
tx-sctp-segmentation: off [fixed]
tx-esp-segmentation: off [fixed]
tx-udp-segmentation: off [fixed]
fcoe-mtu: off [fixed]
tx-nocache-copy: off
loopback: off [fixed]
rx-fcs: off
rx-all: off
tx-vlan-stag-hw-insert: off [fixed]
rx-vlan-stag-hw-parse: off [fixed]
rx-vlan-stag-filter: off [fixed]
l2-fwd-offload: off [fixed]
hw-tc-offload: off [fixed]
esp-hw-offload: off [fixed]
esp-tx-csum-hw-offload: off [fixed]
rx-udp_tunnel-port-offload: off [fixed]
tls-hw-tx-offload: off [fixed]
tls-hw-rx-offload: off [fixed]
rx-gro-hw: off [fixed]
tls-hw-record: off [fixed]

If you help me I will love you forever. OK, since I love everyone in the world already I guess I already love you for reading this but still, thanks for even getting down to this line.

As root, edit /etc/sysctl.conf and comment out all references to ipv6 (insert # as first char).
Reboot.
Do you still get four ipv6 when you type, ifconfig -a

In the past I added these lines to end of the default /etc/sysctl.conf

net.ipv6.conf.all.disable_ipv6 = 1

net.ipv6.conf.default.disable_ipv6 = 1

net.ipv6.conf.lo.disable_ipv6 = 1

The reason I added these is because Steam would take forever to download games unless I added those lines and ran sudo sysctl -p afterwards. This fixed DL times tremendously.

I thought about that being an issue so I initially commented out those at the end during troubleshooting.

here is current /etc/sysctl.conf

#
# /etc/sysctl.conf - Configuration file for setting system variables
# See /etc/sysctl.d/ for additional system variables.
# See sysctl.conf (5) for information.
#

#kernel.domainname = example.com

# Uncomment the following to stop low-level messages on console
#kernel.printk = 3 4 1 3

##############################################################3
# Functions previously found in netbase
#

# Uncomment the next two lines to enable Spoof protection (reverse-path filter)
# Turn on Source Address Verification in all interfaces to
# prevent some spoofing attacks
#net.ipv4.conf.default.rp_filter=1
#net.ipv4.conf.all.rp_filter=1

# Uncomment the next line to enable TCP/IP SYN cookies
# See http://lwn.net/Articles/277146/
# Note: This may impact IPv6 TCP sessions too
#net.ipv4.tcp_syncookies=1

# Uncomment the next line to enable packet forwarding for IPv4
#net.ipv4.ip_forward=1

# Uncomment the next line to enable packet forwarding for IPv6
#  Enabling this option disables Stateless Address Autoconfiguration
#  based on Router Advertisements for this host
#net.ipv6.conf.all.forwarding=1


###################################################################
# Additional settings - these settings can improve the network
# security of the host and prevent against some network attacks
# including spoofing attacks and man in the middle attacks through
# redirection. Some network environments, however, require that these
# settings are disabled so review and enable them as needed.
#
# Do not accept ICMP redirects (prevent MITM attacks)
#net.ipv4.conf.all.accept_redirects = 0
#net.ipv6.conf.all.accept_redirects = 0
# _or_
# Accept ICMP redirects only for gateways listed in our default
# gateway list (enabled by default)
# net.ipv4.conf.all.secure_redirects = 1
#
# Do not send ICMP redirects (we are not a router)
#net.ipv4.conf.all.send_redirects = 0
#
# Do not accept IP source route packets (we are not a router)
#net.ipv4.conf.all.accept_source_route = 0
#net.ipv6.conf.all.accept_source_route = 0
#
# Log Martian Packets
#net.ipv4.conf.all.log_martians = 1
#

###################################################################
# Magic system request Key
# 0=disable, 1=enable all
# Debian kernels have this set to 0 (disable the key)
# See https://www.kernel.org/doc/Documentation/sysrq.txt
# for what other values do
#kernel.sysrq=1

###################################################################
# Protected links
#
# Protects against creating or following links under certain conditions
# Debian kernels have both set to 1 (restricted) 
# See https://www.kernel.org/doc/Documentation/sysctl/fs.txt
#fs.protected_hardlinks=0
#fs.protected_symlinks=0
#net.ipv6.conf.all.disable_ipv6 = 1

#net.ipv6.conf.default.disable_ipv6 = 1

#net.ipv6.conf.lo.disable_ipv6 = 1

currently ifconfig -a looks like it does above

Rebooting now just for heck of it because I haven't lost network access in about an hour.

Issue was seeming like it was gone, but it persists. Rebooted but didn't disable/enable networking through panel yet. I'm going to do that and continue to test throughout the day. Funny thing is that when I'm browsing and looking at meaningless stuff like youtube or discord chat it works. As soon as I need something important, its broke. Its worse than a cell phone I swear.

All online gaming works fine. There is no connection issues with that at all. It's just updates, browser, and networking. I use samba server a lot so this is really lame.

Edit: Samba servers are unreachable through windows or other Linux computers as well. When connecting to my main station or to any computers on the network, using any Linux machines, I get an error dialogue that states "Failure to retrieve share list from server". Windows computers no longer show those Linux computers on the network.

Another strange thing is sometimes when running update it half works while browser and networking does not. I get errors when connecting to PPAs I've added but no errors downloading from ubuntu main repos. Sometimes it fixes itself when I open a terminal and sudo apt update.

Why would this happen to every Linux computer at the same time? I have 5 of them and they all have this issue which just popped up. 3 are new parts except the 2 that kids use to dual boot with Windows. Maybe it is the router and Windows is just handling whatever errors better than Linux can

What router do you have? when I client requests an address or renewal from dhcpd, it talks to the router. Look at the /var/log/syslog (and grep for Manager), you should be able to see the conversation of the client getting a new lease from the router.

Samba: do all of your clients belong to the same domain? I have to tweak win10 systems to enable SMB1 protocol so that I can see them in the Windows Network. On the Linux side, I just update the workgroup var and restart {smb,nmb} My samba server is 4.7.6

HTH

1 Like

Am I looking for something like this? Sorry I don't know how to copy text out of nano.

All my Ubuntu systems are on default domain. I think its (none) and Windows are on workgroup. They are all the same workgroup with samba. I think windows domain is attlocal.net but I'm not sure.

Crazy thing. All the other machines besides main workstation are working now for the last few hours. Yeah I've been home all day doing this because I'm not working. Just pulling hair out(literally going bald) trying to learn this stuff.

I couldnt get any sort of connection for any service after trying what I tried before. Except after sudo service smbd restart , Samba was working again while all other network connections were not. Im currently serving living room machine with a movie.

I think it may be the router after all but not sure still. I wondered if the LAN port on router is going bad because this machine has been on port1 slot for a year or 2 and I am a heavy traffic person. I moved to the 4th port on router and boom, Im online and no problems yet. Still testing though after I come back from a workout. Also now that all the desktops may be working, my mobile devices still have weird connection problems that I dont care to go into right now because I hate android so much.

The router make is AT&T rented Pace model# 5268AC FXN I noticed on an att forum people were having issues with this router.

I guess the way to test this would be to move my kid's ethernet cord to that 1st port and see if her windows install has issues.

Thank you so much for your help.

Something weird with the router, I see a lot of ipv6 in the log but you configured it not to use ipv6. The router should have 4 LAN ports, test to see which ones are working, there should be lights in front of the router when a port is active.

You wrote you reset the router, maybe you need to go back into the configuration and fix the DHCP range for the LAN. For some reason, your router does not offer/renew ip.

Issue still persists

I disabled IPv6 with these lines

net.ipv6.conf.all.disable_ipv6 = 1

net.ipv6.conf.default.disable_ipv6 = 1

net.ipv6.conf.lo.disable_ipv6 = 1

But that was a long time ago. Its has always worked fine with those lines added to /etc/sysctl.conf

I only commented these lines out since I started having the issue. So IPv6 should be enabled right?
The router settings claim range is 192.168.1.0 / 255.255.255.0 (default)

All ports light up like normal all the time

I see "carrier changed" which probably means that there is a bad ethernet plug or cable. I have seen some miswired ethernet patch cords drop carrier because of noise -- the cable did not use the twisted pairs it just had 8 straight wires.

djb

1 Like

your router should have a WAN address from ATT, a LAN address of 192.168.1.1 and the internal range should be from 192.168.1.100 - 192.168.1.200 (example) All your clients should get an ip between 100-200. See what Dave said, can you try another rj45 cable ...

1 Like

Thank you for your knowledge. I've suspected the cables were bad and played musical cables with the 3 PC's on ethernet. No matter what configuration I try there is still connection drops. But this main workstation is the most frequent in dropping and takes longest to reconnect. Probably because I'm on it more than the other machines.

There is so much to learn I'll be bones before I know what I'm doing. :rofl:

I called AT&T they flashed firmware on modem and based on their records they told me this one is too old and are sending a new one. So I guess we'll see what happens after Saturday.

Thank you both for your time. Much appreciated.

hi,

i sometimes have problems with my network connection to from time to time.

just an idea tho.

i saw this video https://www.youtube.com/watch?v=2dpUPqMMDLE a few years a go.
that works. it basically restarts network manager.

Thank you everyone and I apologize for my late reply. Life got a hold of me for a bit. So after I called AT&T they flashed the firmware on the router. That seemed to help a bit but I still had network issues. The disconnects just weren't as frequent or as long. I also set my IP to static instead of using DHCP in both network manager and router settings. Still had some disconnect issues. So they sent me a new router and after configuring everything I haven't had any issues. It must have been the router. Yay Ubuntu MATE and yay you all for helping me out! Your time is much appreciated.

Edit: Please excuse my ignorance but did I totally give out my IP with all those commands I posted or am I safe? I assumed that new router has a whole new set of IP addresses it has distributed throughout network but my IPv4 on my main workstation is the same as it was before. Thanks again

The 192.168.1.x addresses are only reachable from inside your house. You don't need to worry about telling people about those. :slight_smile: