Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Jun 162013
 

How to trace DNS from the root servers

Answer:

Use the command `dig`, e.g.

dig +trace mit.edu

;; global options: +cmd
.			19927	IN	NS	d.root-servers.net.
.			19927	IN	NS	e.root-servers.net.
.			19927	IN	NS	m.root-servers.net.
.			19927	IN	NS	l.root-servers.net.
.			19927	IN	NS	a.root-servers.net.
.			19927	IN	NS	k.root-servers.net.
.			19927	IN	NS	f.root-servers.net.
.			19927	IN	NS	j.root-servers.net.
.			19927	IN	NS	b.root-servers.net.
.			19927	IN	NS	h.root-servers.net.
.			19927	IN	NS	g.root-servers.net.
.			19927	IN	NS	i.root-servers.net.
.			19927	IN	NS	c.root-servers.net.
;; Received 228 bytes from 8.8.8.8#53(8.8.8.8) in 12 ms

edu.			172800	IN	NS	a.edu-servers.net.
edu.			172800	IN	NS	c.edu-servers.net.
edu.			172800	IN	NS	d.edu-servers.net.
edu.			172800	IN	NS	f.edu-servers.net.
edu.			172800	IN	NS	g.edu-servers.net.
edu.			172800	IN	NS	l.edu-servers.net.
;; Received 260 bytes from 199.7.83.42#53(199.7.83.42) in 223 ms

mit.edu.		172800	IN	NS	usw2.akam.net.
mit.edu.		172800	IN	NS	asia1.akam.net.
mit.edu.		172800	IN	NS	asia2.akam.net.
mit.edu.		172800	IN	NS	use2.akam.net.
mit.edu.		172800	IN	NS	ns1-37.akam.net.
mit.edu.		172800	IN	NS	ns1-173.akam.net.
mit.edu.		172800	IN	NS	eur5.akam.net.
mit.edu.		172800	IN	NS	use5.akam.net.
;; Received 404 bytes from 192.31.80.30#53(192.31.80.30) in 548 ms

mit.edu.		20	IN	A	23.46.134.151
;; Received 41 bytes from 63.150.131.81#53(63.150.131.81) in 4 ms
Feb 212013
 

Diagnosing network connectivity with mtr

Answer:

To check the network connectivity to a specific server, you can use the mtr command.

e.g.

# mtr --report google.com
HOST: localhost                   Loss%   Snt   Last   Avg  Best  Wrst StDev
  1. 106.187.33.2                  0.0%    10    1.3   5.3   0.6  21.4   6.7
  2. 124.215.199.121               0.0%    10    0.6   6.5   0.4  12.4   4.8
  3. otejbb206.int-gw.kddi.ne.jp   0.0%    10    2.1   3.7   2.1  12.5   3.3
  4. ix-ote210.int-gw.kddi.ne.jp   0.0%    10    2.1   6.4   2.1  15.2   4.5
  5. 203.181.102.94                0.0%    10    2.6   2.7   2.2   3.9   0.6
  6. 209.85.249.195                0.0%    10    3.2   5.3   2.3  22.8   6.6
  7. 64.233.175.0                  0.0%    10    7.0  13.5   6.8  49.8  13.7
  8. 64.233.174.0                  0.0%    10   20.0  12.7  11.1  20.0   3.0
  9. 216.239.43.145                0.0%    10   12.0  11.8  11.5  12.2   0.2
 10. kix01s01-in-f8.1e100.net      0.0%    10   11.2  11.4  11.1  11.9   0.3
Oct 082012
 

Modern way to show current IP address(es) in Linux

Answer:

In the past we already showed that you can get the IP information using the command "ifconfig", actually the modern way to do the job is

# ip a

1: lo:  mtu 16436 qdisc noqueue state UNKNOWN 
  ..

2: eth0:  mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:26:5e:3e:42:d2 brd ff:ff:ff:ff:ff:ff
 ..