Difference between revisions of "Fix Harry's wifi"

From Finninday
Jump to: navigation, search
(measure ping time and packet loss with mtr)
(how fast is DNS?)
Line 60: Line 60:
 
====how many hops to DNS?====
 
====how many hops to DNS?====
 
====how fast is DNS?====
 
====how fast is DNS?====
 +
I can expect a response in 20 to 35 ms.
 +
 +
<pre>
 +
root@ferret:~# dig finninday.net
 +
 +
; <<>> DiG 9.9.3-rpz2+rl.13214.22-P2-Ubuntu-1:9.9.3.dfsg.P2-4ubuntu1.1 <<>> finninday.net
 +
;; global options: +cmd
 +
;; Got answer:
 +
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 28458
 +
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
 +
 +
;; OPT PSEUDOSECTION:
 +
; EDNS: version: 0, flags:; udp: 512
 +
;; QUESTION SECTION:
 +
;finninday.net. IN A
 +
 +
;; ANSWER SECTION:
 +
finninday.net. 217 IN A 216.99.216.99
 +
 +
;; Query time: 20 msec
 +
;; SERVER: 8.8.8.8#53(8.8.8.8)
 +
;; WHEN: Tue Feb 04 18:07:56 PST 2014
 +
;; MSG SIZE  rcvd: 58
 +
 +
</pre>
  
 
====measure bandwidth with curl====
 
====measure bandwidth with curl====

Revision as of 02:08, 5 February 2014

Background

A friend suffers from crappy wifi. I keep telling him that I'll fix it, but I haven't yet. We spend time talking or eating instead of poking at the wifi. Before I go over again, I want to have a streamlined process for diagnosing the problem with all the necessary tools pre-loaded on my laptop so I can look like a rock star.

So I'm practicing on our wifi and trying to make sure I've got all my tools together. These procedures assume that I have access to an Android phone and a linux laptop both on the wifi network of interest.

Android Wifi Analyzer for signal strength

At home I get a maximum signal of about -50 db from Portlandia when the phone is less than 5 feet from it. I get about -75 db from ahub which is one floor down from the phone.

Identify protocol

Standard android wifi settings page tells me link speed, security type, and IP.

  • Portlandia: 54Mbps (802.11g)
  • ahub: 36Mbps (mixed 802.11b+g)

Other possibilities are:

  • 802.11n (2009) up to 150Mbps
  • 802.11ac (2012) up to 866Mbps

see what dhcp is giving us

root@ferret:~# less /var/lib/dhcp/dhclient.leases

lease {
  interface "eth0";
  fixed-address 10.0.0.6;
  option subnet-mask 255.0.0.0;
  option routers 10.0.0.3;
  option dhcp-lease-time 43200;
  option dhcp-message-type 5;
  option domain-name-servers 8.8.8.8,8.8.4.4;
  option dhcp-server-identifier 10.0.0.3;
  option domain-name "finninday.net";
  renew 0 2013/11/24 04:12:33;
  rebind 0 2013/11/24 08:53:29;
  expire 0 2013/11/24 10:23:29;
}

what does the routing table look like?

root@ferret:~# ip route list
default via 10.0.0.3 dev eth0  proto static 
10.0.0.0/8 dev eth0  proto kernel  scope link  src 10.0.0.6  metric 1 

root@ferret:~# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.0.0.3        0.0.0.0         UG    0      0        0 eth0
10.0.0.0        0.0.0.0         255.0.0.0       U     1      0        0 eth0

measure ping time and packet loss to default gateway with mtr

  • on a wired network ping time is between 0.2 and 0.4ms
  • across portlandia ping time between a desktop and a tablet is between 1.9 and 99ms. Average is 57ms.
  • there is no measurable packet loss

how many hops to DNS?

how fast is DNS?

I can expect a response in 20 to 35 ms.

root@ferret:~# dig finninday.net

; <<>> DiG 9.9.3-rpz2+rl.13214.22-P2-Ubuntu-1:9.9.3.dfsg.P2-4ubuntu1.1 <<>> finninday.net
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 28458
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;finninday.net.			IN	A

;; ANSWER SECTION:
finninday.net.		217	IN	A	216.99.216.99

;; Query time: 20 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Tue Feb 04 18:07:56 PST 2014
;; MSG SIZE  rcvd: 58

measure bandwidth with curl

The curl manual says the speed is measured in bytes per second.

Over a wired link, I get this:

root@ferret:~# curl -o /dev/null http://speedtest.wdc01.softlayer.com/downloads/test500.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
 20  500M   20  103M    0     0  5683k      0  0:01:30  0:00:18  0:01:12 6896k^C

Over Portlandia, I get about 2MBps out of a theoretical max of 6.75MBps:

[rday@servo lf]$ curl -o /dev/null http://speedtest.wdc01.softlayer.com/downloads/test500.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  7  500M    7 38.2M    0     0  1595k      0  0:05:20  0:00:24  0:04:56 1936k^C

Over ahub, I get about 2.6MBps out of a theoretical max of 4.5 to 6.75MBps:

[rday@servo lf]$ curl -o /dev/null http://speedtest.wdc01.softlayer.com/downloads/test500.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
 11  500M   11 56.3M    0     0  2397k      0  0:03:33  0:00:24  0:03:09 2632k^C