School server network debugging

From OLPC
Revision as of 15:11, 9 July 2010 by FGrose (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

When debugging a School server connectivity issue, there are a number of tools to use. These require an ssh connection (or console access) to the school server.

Are the Interfaces Present

First, check to see what the schoolserver OS thinks it's network interfaces are:

ifconfig

You can check on the interfaces using the ifconfig command:

/sbin/ifconfig
/sbin/ifconfig eth0

A typical ifconfig output (for a machine with two Active Antenna and one wired network interface) is:

br0      Link encap:Ethernet  HWaddr 00:50:43:28:0A:B7  
         inet addr:172.18.16.1  Bcast:172.18.31.255  Mask:255.255.240.0
         inet6 addr: fe80:0:0:10::1/64 Scope:Link
         inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         RX packets:0 errors:0 dropped:0 overruns:0 frame:0
         TX packets:64 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:0 
         RX bytes:0 (0.0 b)  TX bytes:12653 (12.3 KiB)

br1      Link encap:Ethernet  HWaddr 00:50:43:28:0A:B8  
         inet addr:172.18.32.1  Bcast:172.18.47.255  Mask:255.255.240.0
         inet6 addr: fe80:0:0:11::1/64 Scope:Link
         inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         RX packets:12 errors:0 dropped:0 overruns:0 frame:0
         TX packets:75 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:0 
         RX bytes:2352 (2.2 KiB)  TX bytes:15080 (14.7 KiB)

br2      Link encap:Ethernet  HWaddr 00:00:00:00:00:00  
         inet addr:172.18.48.1  Bcast:172.18.63.255  Mask:255.255.240.0
         inet6 addr: fe80:0:0:12::1/64 Scope:Link
         inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         RX packets:0 errors:0 dropped:0 overruns:0 frame:0
         TX packets:66 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:0 
         RX bytes:0 (0.0 b)  TX bytes:12911 (12.6 KiB)

eth0     Link encap:Ethernet  HWaddr 00:19:5B:68:9D:4E  
         inet addr:172.16.0.53  Bcast:172.16.0.255  Mask:255.255.255.0
         inet6 addr: fe80::219:5bff:fe68:9d4e/64 Scope:Link
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         RX packets:283 errors:0 dropped:0 overruns:0 frame:0
         TX packets:234 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:1000 
         RX bytes:31477 (30.7 KiB)  TX bytes:31716 (30.9 KiB)
         Interrupt:17 Base address:0x2000 

eth1     Link encap:Ethernet  HWaddr 00:40:63:E9:99:9B  
         inet addr:172.18.0.1  Bcast:172.18.15.255  Mask:255.255.240.0
         inet6 addr: fe80::1/64 Scope:Link
         inet6 addr: fe80::240:63ff:fee9:999b/64 Scope:Link
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         RX packets:0 errors:0 dropped:0 overruns:0 frame:0
         TX packets:76 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:1000 
         RX bytes:0 (0.0 b)  TX bytes:13857 (13.5 KiB)
         Interrupt:18 Base address:0xf800 

eth2     Link encap:Ethernet  HWaddr 00:50:43:28:0A:B7  
         inet6 addr: fe80::250:43ff:fe28:ab7/64 Scope:Link
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         RX packets:36 errors:0 dropped:0 overruns:0 frame:0
         TX packets:1118 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:1000 
         RX bytes:8591 (8.3 KiB)  TX bytes:130628 (127.5 KiB)

eth3     Link encap:Ethernet  HWaddr 00:50:43:28:0A:B8  
         inet6 addr: fe80::250:43ff:fe28:ab8/64 Scope:Link
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         RX packets:29 errors:0 dropped:0 overruns:0 frame:0
         TX packets:330 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:1000 
         RX bytes:5429 (5.3 KiB)  TX bytes:58058 (56.6 KiB)

lo       Link encap:Local Loopback  
         inet addr:127.0.0.1  Mask:255.0.0.0
         inet6 addr: ::1/128 Scope:Host
         UP LOOPBACK RUNNING  MTU:16436  Metric:1
         RX packets:1 errors:0 dropped:0 overruns:0 frame:0
         TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:0 
         RX bytes:76 (76.0 b)  TX bytes:76 (76.0 b)

msh0     Link encap:Ethernet  HWaddr 00:50:43:28:0A:B7  
         inet6 addr: fe80::250:43ff:fe28:ab7/64 Scope:Link
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         RX packets:36 errors:0 dropped:0 overruns:0 frame:0
         TX packets:1118 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:1000 
         RX bytes:8591 (8.3 KiB)  TX bytes:130628 (127.5 KiB)

msh1     Link encap:Ethernet  HWaddr 00:50:43:28:0A:B8  
         inet6 addr: fe80::250:43ff:fe28:ab8/64 Scope:Link
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         RX packets:29 errors:0 dropped:0 overruns:0 frame:0
         TX packets:330 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:1000 
         RX bytes:5429 (5.3 KiB)  TX bytes:58058 (56.6 KiB)

iwconfig

The details of the wireless interfaces can be seen using iwconfig :

/sbin/iwconfig
/sbin/iwconfig msh0

A typical output for this command (when using two Active Antenna) is:

lo       no wireless extensions.

eth1     no wireless extensions.

eth0     no wireless extensions.

br0      no wireless extensions.

br1      no wireless extensions.

br2      no wireless extensions.

eth2     IEEE 802.11b/g  ESSID:"school-mesh-0"  Nickname:"schoolserver"
         Mode:Ad-Hoc  Frequency:2.412 GHz  Cell: 00:33:33:FF:28:0A   
         Bit Rate:2 Mb/s   Tx-Power=13 dBm   
         Retry limit:8   RTS thr=2347 B   Fragment thr=2346 B   
         Power Management:off
         Link Quality=100/100  Signal level=-256 dBm  Noise level=-96 dBm
         Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:3932
         Tx excessive retries:0  Invalid misc:0   Missed beacon:0

msh0     IEEE 802.11b/g  ESSID:"mesh"  Nickname:"Mesh"
         Mode:Repeater  Frequency:2.412 GHz  Bit Rate:2 Mb/s   Tx-Power=13 dBm   
         Retry limit:8   RTS thr=2347 B   Fragment thr=2346 B   
         Power Management:off
         Link Quality=100/100  Signal level=-256 dBm  Noise level=-96 dBm
         Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:3936
         Tx excessive retries:0  Invalid misc:0   Missed beacon:0

eth3     IEEE 802.11b/g  ESSID:"school-mesh-1"  Nickname:"schoolserver"
         Mode:Ad-Hoc  Frequency:2.462 GHz  Cell: 00:02:00:2A:09:00   
         Bit Rate:2 Mb/s   Tx-Power=13 dBm   
         Retry limit:8   RTS thr=2347 B   Fragment thr=2346 B   
         Power Management:off
         Link Quality=100/100  Signal level=-256 dBm  Noise level=-96 dBm
         Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:2698
         Tx excessive retries:0  Invalid misc:0   Missed beacon:0

msh1     IEEE 802.11b/g  ESSID:"mesh"  Nickname:"Mesh"
         Mode:Repeater  Frequency:2.462 GHz  Bit Rate:2 Mb/s   Tx-Power=13 dBm   
         Retry limit:8   RTS thr=2347 B   Fragment thr=2346 B   
         Power Management:off
         Link Quality=100/100  Signal level=-256 dBm  Noise level=-96 dBm
         Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:2703
         Tx excessive retries:0  Invalid misc:0   Missed beacon:0


route

Discuss the use of the route command in debugging...

Are Basic Services Running

You can check on the status of the basic services (DHCP, DNS) using:

sudo service dhcpd status
sudo service named status

DHCP

If there are laptop running on the mesh, there will be DHCP traffic associated with each one every five minutes. This may be watched using:

sudo tail -f /var/log/messages

DNS

host and dig

Watching the Packets Go By

You can take a look at the packets traveling over an interface (in this case school-mesh-0) using the tcpdump command:

/sbin/tcpdump -i msh0

Turning On Additional Wireless Mesh Debugging

You can find out specific about the wireless mesh software drivers being used by using ethtool:

/sbin/ethtool -i msh0

You can enable additional debugging output from the driver using:

echo 0x136184 > /sys/module/libertas/parameters/libertas_debug