LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-08-2023, 01:30 PM   #1
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,773
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
how to test speed of DNS requests


Q1. Can someone tell me how to test and diagnose issues with my home LAN?
I think that it is a DNS problem, but I have no clue how to proceed.

Q2. What information might I post so that my LQ colleagues are better able to offer helpful suggestions?

My Symptoms
Quote:
We see these troubles from every "interactive" device: workstations, phones, etc. I will describe the troubles as I see them from my Linux Mint workstation. I believe that Linux will offer the broadest set of LAN test and diagnostic tools and utilities.
The Following events happen during almost every end-user session. In most cases, they resolve after some variable elapsed time.

One "interesting" situation happens. When requesting a web link, we get some web based error report "server can't do that" which almost immediately resolves into display of whatever we were trying to reach.

I notice that 'update-manager' has notified of available package updates.
When I launch the utility, I request a rescan and see the spinner saying that things are working. This continues for quite some time.

I'm in a browser — typicall Firefox or Chrome — and select a link.
I see the spinner saying that things are working. This continues for quite some time.

I receive email with an embedded web address link.
I select the link and see the spinner saying that things are working. This continues for quite some time.

My Configuration:
Code:
     Fiber to ISP --Z-- ISP Gateway
     ISP Gateway --Z-- ASUS Router & Wifi AP
     ASUS Router & AP ==Z== Managed Switch( 16 port)
     Switch ==Z== CAT-6 House wires
     Wires ==Z== net printers
     Wires ==Z== Home Servers

     Wifi (3-node Asus Mesh)
       desktops
       laptops
       phones
       tablets
       Smart Home devices
Thank you in Advance,
~~~ 0;-Dan
 
Old 09-08-2023, 02:25 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,160

Rep: Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266
time dig google.com
 
2 members found this post helpful.
Old 09-12-2023, 11:40 AM   #3
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,773

Original Poster
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
Quote:
Originally Posted by smallpond View Post
time dig google.com
google.com or any public host site is likely to be in cache along the way:
  • my local workstation or device (resolver of similar)
  • the "gateway" address for my LAN (my router)
  • whatever my ISP box might do (their router)
  • other DNS at the ISP (their cloud)
Something is taking a lot of time to satisfy my request, via selected web link, to deliver my pages.
QUESTION: How do I diagnose this?

Are my browsers taking forever to render content?
Are services taking forever to create and send requested content?
Is content getting stalled by my own network parts? Other network parts?

Thank you in advance,
~~~ 0;-Dan
 
Old 09-12-2023, 12:11 PM   #4
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,767

Rep: Reputation: 2765Reputation: 2765Reputation: 2765Reputation: 2765Reputation: 2765Reputation: 2765Reputation: 2765Reputation: 2765Reputation: 2765Reputation: 2765Reputation: 2765
Check your primary and secondary DNS resolvers. In /etc/resolv.conf that would be the first and second nameservers. IF the first is not resolving properly then you are seeing the delay while your networking waits to failover when the first does not answer before trying the second.

If you use a caching nameserver locally, check what nameservers it uses upstream for the same problem.
One or more of your nameservers is either answering with a delay, or not answering forcing failover. Changing you nameservers, or changing their order, might change or eliminate these symptoms.
 
Old 09-12-2023, 01:12 PM   #5
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,152
Blog Entries: 6

Rep: Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835
Simple example. Check the servers that you want, from the dns that you want.

Code:
#!/usr/bin/bash

array1=(
1.1.1.1         # Cloudflare
8.8.8.8         # Google
4.2.2.1			# Level3
208.67.222.222	# OpenDNS
68.94.156.1		# ATT
195.46.39.39	# SafeDNS
77.88.8.88		# Yandex
)

array2=(
duckduckgo.com
linuxquestions.org
archlinux.org
freebsd.org
)

str=$(printf "%50s")

for a in "${array1[@]}"; do
	for b in "${array2[@]}"; do
		echo ""$a" for "$b""
		dig @"$a" "$b" | grep "Query"
		echo ""
		sleep 2
	done
    echo "${str// /─}"
done > dns_compare.txt
 
Old 09-12-2023, 03:16 PM   #6
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,773

Original Poster
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
Quote:
Originally Posted by wpeckham View Post
Check your primary and secondary DNS resolvers. In /etc/resolv.conf that would be the first and second nameservers. IF the first is not resolving properly then you are seeing the delay while your networking waits to failover when the first does not answer before trying the second.

If you use a caching nameserver locally, check what nameservers it uses upstream for the same problem.
One or more of your nameservers is either answering with a delay, or not answering forcing failover. Changing you nameservers, or changing their order, might change or eliminate these symptoms.
I'm running Linux Mint and use whatever Mint offers for "network management" and "resolver." Until recently, I've been able to ignore the nuts and bolts of home LAN components. It appears that networkd-dispatcher or similar is running things. I don't know enough to say that with certainty.

Thanks for your help,
~~~ 0;-Dan
 
Old 09-12-2023, 04:24 PM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,784

Rep: Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937
Did you ever setup a local DNS or pi-hole server? Is so where in the network is located?

Are the two routers setup as a double nat or maybe the ISP is in passthrough mode?

Are you getting the expected speed from the ISP and wireless APs?
 
Old 10-02-2023, 01:36 AM   #8
slac-in-the-box
Member
 
Registered: Mar 2010
Location: oregon
Distribution: slackware64-15.0 / slarm64-current
Posts: 782
Blog Entries: 1

Rep: Reputation: 432Reputation: 432Reputation: 432Reputation: 432Reputation: 432
name service bottlenecks can be caused by large uploads in the network... the request for ip address is a packet in a queue; if a device on the same network, say an anroid phone, is syncing to a cloud, with gphoto's syncing to its cloud, for example, the packets of photo data in the queue are larger and plentiful, slowing down your request for an ip address: so you see the spinning wheel while your request for an ip address waits its turn in the queue.
 
1 members found this post helpful.
Old 10-03-2023, 01:16 PM   #9
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,773

Original Poster
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
Quote:
Originally Posted by slac-in-the-box View Post
name service bottlenecks can be caused by large uploads in the network... the request for ip address is a packet in a queue; if a device on the same network, say an anroid phone, is syncing to a cloud, with gphoto's syncing to its cloud, for example, the packets of photo data in the queue are larger and plentiful, slowing down your request for an ip address: so you see the spinning wheel while your request for an ip address waits its turn in the queue.
While I've used Linux "forever" I'm only a power user and not a wizard*...
Is there an easy to deploy and straight forward to use utility that I might use to monitor raw traffic so that might see"
Code:
    device is seeing "troubles" at {timestamp}
    the traffic volume is X at {timestamp}
    ... repeat ad nauseum
    Ah HA!  {something} is filling the LAN "causing" the troubles.
Thank you for the Reply,
~~~ 0;-Dan
 
Old 10-03-2023, 02:45 PM   #10
slac-in-the-box
Member
 
Registered: Mar 2010
Location: oregon
Distribution: slackware64-15.0 / slarm64-current
Posts: 782
Blog Entries: 1

Rep: Reputation: 432Reputation: 432Reputation: 432Reputation: 432Reputation: 432
Quote:
Originally Posted by SaintDanBert View Post
Is there an easy to deploy and straight forward to use utility that I might use to monitor raw traffic so that might see"
If it's your network, and you have access to the router, then depending on the kind of router, and its firmware, some/most provide a way to create priority queues for the devices that connect through them.

There is a linux app, called "tc" for throttle control, that is useful for traffic shaping, and can be run on a bridge interface; but like many linux apps there is a learning curve to using it.

I use rsync for backing up to cloud devices, and it used to hog the bandwidth, until I discovered that I could run it with the flag "--bwlimit=" and provide it with a rate limit in kilobytes per second (unless providing another unit, like m, for megabytes per second). That solved my problem without having to mess with tc and a bridge.

If there are other users on a network that you are not the administer to, then it becomes a social issue; sometimes kindly asking them to turn off their phone to see if the internet speeds up, proves that their phone is the culprit, and you might convince them to disable syncing to cloud on the apps they are using.
 
Old 10-04-2023, 01:46 PM   #11
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,767

Rep: Reputation: 2765Reputation: 2765Reputation: 2765Reputation: 2765Reputation: 2765Reputation: 2765Reputation: 2765Reputation: 2765Reputation: 2765Reputation: 2765Reputation: 2765
There are network monitoring tools, but the best of those are built by and for network professionals and would drive the average user crazy. (or crazier, depending.)

Dimply doing and timing a manual name lookup against both the default and a selected public nameserver will tell you if your default is the problem, and will give you a response time metric.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache 2.4 requests to non-SSL site with "Upgrade-Insecure-Requests: 1" and no trailing / get redirected to default site owendelong Linux - Server 2 06-22-2021 02:08 PM
Secondary DNS does not resolve the nslookup client requests when the primary DNS is off. To learn Linux - Newbie 3 09-22-2016 06:15 AM
Help in stopping DNS requests (DNS Amplification) accessthecloud Linux - Server 2 02-18-2013 03:43 PM
can a local DNS Server be used to handle dns requests going out to the internet baronobeefdip Linux - Server 1 07-03-2012 03:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration