[Gllug] wicd manager

Nix nix at esperi.org.uk
Tue Oct 20 23:58:50 UTC 2009


On 21 Oct 2009, lucypeters at mail.com outgrape:
>  netstat -nr
> Kernel IP routing table
> Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
> 192.168.0.0     0.0.0.0         255.255.255.0   U         0 0          0 eth1
> 169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 pan0
> 0.0.0.0         192.168.0.1     0.0.0.0         UG        0 0          0 eth1
> 0.0.0.0         0.0.0.0         0.0.0.0         U         0 0          0 pan0

The one place where ip(8) is really useful is routing. The problem with
netstat as a routing table viewer is that the Linux kernel can have many
routing tables, all in simultaneous use, and netstat only shows you one
of them. (The one that's most likely to be used when routing packets to
the wider Internet unless special measures have been taken to change
things, but still.)

Compare this:

spindle:~% netstat -nr
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
192.168.14.160  192.168.14.1    255.255.255.255 UGH       0 0          0 gordianet
192.168.16.0    0.0.0.0         255.255.255.0   U         0 0          0 fastnet
192.168.14.0    0.0.0.0         255.255.255.0   U         0 0          0 gordianet
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 gordianet
0.0.0.0         192.168.14.1    0.0.0.0         UG        0 0          0 gordianet
0.0.0.0         0.0.0.0         0.0.0.0         U         0 0          0 gordianet

With *this* more complete list:

spindle:~% ip route list table all
broadcast 127.255.255.255 dev lo  table local  proto kernel  scope link  src 127.0.0.1
local 192.168.16.15 dev fastnet  table local  proto kernel  scope host  src 192.168.16.15
broadcast 192.168.14.255 dev gordianet  table local  proto kernel  scope link  src 192.168.14.15
broadcast 192.168.16.255 dev fastnet  table local  proto kernel  scope link  src 192.168.16.15
local 192.168.14.15 dev gordianet  table local  proto kernel  scope host  src 192.168.14.15
broadcast 192.168.14.0 dev gordianet  table local  proto kernel  scope link  src 192.168.14.15
broadcast 192.168.16.0 dev fastnet  table local  proto kernel  scope link  src 192.168.16.15
broadcast 127.0.0.0 dev lo  table local  proto kernel  scope link  src 127.0.0.1
local 127.0.0.1 dev lo  table local  proto kernel  scope host  src 127.0.0.1
local 127.0.0.0/8 dev lo  table local  proto kernel  scope host  src 127.0.0.1
192.168.14.160 via 192.168.14.1 dev gordianet
192.168.16.0/24 dev fastnet  proto kernel  scope link  src 192.168.16.15
192.168.14.0/24 dev gordianet  proto kernel  scope link  src 192.168.14.15
169.254.0.0/16 dev gordianet  scope link  metric 1000
default via 192.168.14.1 dev gordianet
default dev gordianet  scope link  metric 1000

Sure, if you only use route(8) to set up routes then seeing all the
extra ones that are automatically set up for you is pointless: but if
ip(8) has been used, then any of those could have been tweaked in all
sorts of ways, and there could be extra ones, and so on.

> telnet www.google.com 80
> telnet: could not resolve www.google.com/80: Name or service not known

But, yes, this *screams* 'DNS'.

Is 192.168.0.1 responding?

What does

dig @192.168.0.1 -t any www.google.com

return?

> tcpdump eth1
> tcpdump: no suitable device found

That's

tcpdump -i eth1

(tcpdump's syntax verges on the ridiculous, but this is one of the
easier-to-remember parts of it.)
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list