Test Network Configuration: Difference between revisions
(15 intermediate revisions by 7 users not shown) | |||
Line 1: | Line 1: | ||
<noinclude>{{Google Translations}}{{TOCright}}</noinclude> |
|||
===Questions=== |
===Questions=== |
||
*Is the XO connected to [[Under_a_Tree|Link-local]] or a mesh? |
* Is the XO connected to [[Under_a_Tree|Link-local]] or a mesh? |
||
*Is it connected to an [[One_Laptop_acting_as_MPP|MPP]]? |
* Is it connected to an [[One_Laptop_acting_as_MPP|MPP]]? ''(Depreciated; no longer available)'' |
||
*Is it connected to the |
* Is it connected to the Internet? |
||
*Is it connected to a |
* Is it connected to a Jabber ([[wikipedia:Extensible Messaging and Presence Protocol|XMPP]]) server? |
||
*What is the |
* What is the IP address? |
||
===Layer 2=== |
===Layer 2=== |
||
The wireless configuration of the network can be examined using the <code>iwconfig eth0</code> command. We get MAC layer information such as |
The wireless configuration of the network can be examined using the <code>iwconfig eth0</code> command. We get MAC layer information such as |
||
#ESSID |
# ESSID |
||
#*olpc-mesh : Indicates a mesh with or without |
#* olpc-mesh : Indicates a mesh with or without Internet connectivity |
||
#Mode |
# Mode |
||
#*Managed : It is an Access Point(AP) configuration |
#* Managed : It is an Access Point(AP) configuration |
||
#*Ad-hoc : It is a mesh configuration(no |
#* Ad-hoc : It is a mesh configuration (no infrastructure) |
||
#Frequency |
# Frequency (MHz) |
||
#*2.412 : Channel 1 |
#* 2.412 : Channel 1 |
||
#*2.437 : Channel 6 |
#* 2.437 : Channel 6 |
||
#*2.462 : Channel 11 |
#* 2.462 : Channel 11 |
||
#*Channels 1,6, 11 can be used to join a Link-local mesh |
#* Channels 1,6, 11 can be used to join a Link-local mesh |
||
#*Channels 1, 6, 11 can also be a |
#* Channels 1, 6, 11 can also be a School server mesh (ch 1 is almost always on at OLPC offices) |
||
#*At OLPC offices, '802.11 Media lab' AP operates on Channels 6 and 11 |
#* At OLPC offices, '802.11 Media lab' AP operates on Channels 6 and 11 |
||
#Cell/AP Mac |
# Cell/AP Mac |
||
#*Access Point : The AP's MAC |
#* Access Point : The AP's MAC |
||
#*Cell : A virtual 02:xx:xx:... MAC address assigned by the some mesh points. It indicates mesh configuration |
#* Cell : A virtual 02:xx:xx:... MAC address assigned by the some mesh points. It indicates mesh configuration |
||
===Layer 3=== |
===Layer 3=== |
||
====IP addresses==== |
====IP addresses==== |
||
The network layer information can be observed with <code>ifconfig</code>. The default |
The network layer information can be observed with <code>ifconfig</code>. The default built-in wireless adapter provides an Ethernet interface <code>eth0</code>, and a mesh interface <code>msh0</code>. Connecting additional 802.11s adapters will introduce additional pairs of <code>eth1,eth2,..</code> and <code>msh1,msh2,..</code> interfaces. Connecting Ethernet adapters will introduce additional <code>eth1,eth2,..</code> interfaces, and will provide Ethernet connectivity. In the default case(although the same applies for all) the interfaces provide the following IPv4 addresses |
||
*<code>eth0</code> |
* <code>eth0</code> |
||
*#Connected to an AP without NAT |
*# Connected to an AP without NAT |
||
*#*any public address(18.85.x.x when connected to Media Lab 802.11 at OLPC offices) |
*#* any public address(18.85.x.x when connected to Media Lab 802.11 at OLPC offices) |
||
*#Connected to an AP, but behind a NAT |
*# Connected to an AP, but behind a NAT |
||
*#*192.168.x.x |
*#* 192.168.x.x |
||
*#*172.x.x.x |
*#* 172.x.x.x |
||
*#*10.x.x.x |
*#* 10.x.x.x |
||
*#Connected to a switch with no gateway |
*# Connected to a switch with no gateway |
||
*#*169.254.x.x |
*#* 169.254.x.x |
||
*#Not connected to an AP |
*# Not connected to an AP |
||
*#*blank |
*#* blank |
||
*<code>msh0</code> |
* <code>msh0</code> |
||
*#Link-local |
*# Link-local |
||
*#*169.254.x.x |
*#* 169.254.x.x |
||
*#Connected to an MPP |
*# Connected to an MPP |
||
*#*169.254.x.x |
*#* 169.254.x.x |
||
*#Connected to a School server |
*# Connected to a School server |
||
*#*172.x.x.x(172.18.x.x when connected to the School server in OLPC offices) |
*#* 172.x.x.x (172.18.x.x when connected to the School server in OLPC offices) |
||
*#*192.168.x.x |
*#* 192.168.x.x |
||
*#*10.x.x.x |
*#* 10.x.x.x |
||
*#Connected to an AP via wireless or Ethernet adapter |
*# Connected to an AP via wireless or Ethernet adapter |
||
*#*169.254.x.x |
*#* 169.254.x.x |
||
*#*none |
*#* none |
||
It is interesting to note that the 169.254.x.x address when applicable are always the same by default. If no address shows in the <code>msh0</code> you can |
It is interesting to note that the 169.254.x.x address when applicable are always the same by default. If no address shows in the <code>msh0</code> you can |
||
killall dhclient |
killall dhclient |
||
dhclient # Send DHCP request to force(if possible) to acquire a connection to a gateway |
dhclient # Send DHCP request to force (if possible) to acquire a connection to a gateway |
||
avahi-autoipd # If no mesh gateway is available(MPP or School server) it will assign a zeroconf address(169.254.x.x) |
avahi-autoipd # If no mesh gateway is available (MPP or School server) it will assign a zeroconf address(169.254.x.x) |
||
====DNS check==== |
====[[wikipedia:Domain Name System|DNS]] check==== |
||
The most direct way to check |
The most direct way to check Internet connectivity is by checking the <code>resolv.conf</code> file. It shows if the XO is registered to a DNS server. It can be viewed with, |
||
cat /etc/resolv.conf |
cat /etc/resolv.conf |
||
#If it is empty |
# If it is empty, |
||
#*No connection to the |
#* No connection to the Internet (technically, no connection to the DNS server). |
||
#If it includes a nameserver with private address(172.x.x.x, 169.168.x.x,10.x.x.x) |
# If it includes a nameserver with private address (172.x.x.x, 169.168.x.x, 10.x.x.x), |
||
#*Connected to an AP behind a NAT |
#* Connected to an AP behind a NAT, |
||
#*Connected to an MPP, which connects to an AP behind a NAT |
#* Connected to an MPP, which connects to an AP behind a NAT, |
||
#*Connected to a School server(172.18.0.1 for the School server in OLPC offices, although others are also available) |
#* Connected to a School server (172.18.0.1 for the School server in OLPC offices, although others are also available). |
||
#If it includes a nameserver with public address |
# If it includes a nameserver with public address, |
||
#*Connected to an AP without a NAT |
#* Connected to an AP without a NAT, |
||
#*Connected to an MPP, which connects to an AP without a NAT |
#* Connected to an MPP, which connects to an AP without a NAT. |
||
#The is a rare possibility resulting from a |
# The is a rare possibility resulting from a NetworkManager failure, of an XO to have access to the Internet, but the resolv.conf to be blank. In that case, the XO will not be able to resolve hostnames. This possibility can be examined with, |
||
ping www.mit.edu # No replies |
ping www.mit.edu # No replies |
||
ping 18.7.22.83 # Normal replies |
ping 18.7.22.83 # Normal replies |
||
The general rule of thumb regarding the resolv.conf file in the lab XOs is |
The general rule of thumb regarding the resolv.conf file in the lab XOs is the following: |
||
*empty: Link-local |
* empty: Link-local |
||
*172.18.x.x: Schoolserver |
* 172.18.x.x: Schoolserver |
||
*18.85.x.x: Media lab AP |
* 18.85.x.x: Media lab AP |
||
If the XO connects to a channel that includes a School server or an MPP, but for |
If the XO connects to a channel that includes a School server or an MPP, but for some reason there is no Internet connectivity, and the <code>resolv.conf</code> file is empty, check if it is [[Test_Config_Notes#Modify_the_Mesh_Discovery_Sequence|forced in Link-local]] or another configuration, |
||
nano /etc/NetworkManager/mesh-start # confirm that the file is empty(if it exists) |
nano /etc/NetworkManager/mesh-start # confirm that the file is empty(if it exists) |
||
If the problem persists you can try |
If the problem persists you can try, |
||
killall dhclient |
killall dhclient |
||
dhclient # Send DHCP request to force(if possible) to acquire a routable IP |
dhclient # Send DHCP request to force(if possible) to acquire a routable IP |
||
===Telepathy services=== |
===Telepathy services=== |
||
The Presence Service acquires information on other XOs in the network, and provides the capability to view them in the |
The Presence Service acquires information on other XOs in the network, and provides the capability to view them in the Neighborhood view, or share with them an activity. This is achieved through two child telepathy services, Salut and Gabble. |
||
====Salut==== |
====Salut==== |
||
Salut runs when the XO is connected to a mesh. It uses the avahi _presence._tcp service. All XOs in the same mesh |
Salut runs when the XO is connected to a mesh. It uses the avahi _presence._tcp service. All XOs in the same mesh identify themselves in the Neighborhood view through Salut. They can be examined through, |
||
avahi-browse -t _presence._tcp |
avahi-browse -t _presence._tcp |
||
==== |
====Jabber==== |
||
Gabble will allow XOs that belong to different geographical locations to communicate with each other. It will detect |
Gabble will allow XOs that belong to different geographical locations to communicate with each other. It will detect Internet connectivity and connect to a Jabber server. All XOs connected to the same Jabber server will appear to the Neighborhood view. The currently possible servers are |
||
jabber.sugarlabs.org |
|||
jabber.laptop.org |
jabber.laptop.org |
||
olpc.collabora.co.uk |
olpc.collabora.co.uk |
||
*By build 616 the Presence Service does not allow Gabble and Salut to run simultaneously |
* By build 616, the Presence Service does not allow Gabble and Salut to run simultaneously. |
||
*It constantly checks whether there is |
* It constantly checks whether there is Internet connectivity, and switches from Salut to Gabble accordingly. |
||
*The XOs displayed in the |
* The XOs displayed in the Neighborhood view either belong to the mesh, or the Jabber server, not both. |
||
*The |
* The Internet connectivity does not work very accurately. It is very common when connected to the School server, which provides connectivity, that the XO is running Salut. However, it is convenient in the sense that it can now share activities with others in the mesh. |
||
====Detecting which service is running==== |
====Detecting which service is running==== |
||
*The simpler way to detect whether Salut or Gabble is running is by observing the |
* The simpler way to detect whether Salut or Gabble is running is by observing the Neighborhood view. If you see XOs that you haven't seen in the lab, then you are probably running Gabble. |
||
*It can also be checked from the |
* It can also be checked from the [[Analyze]] Activity - Interfaces tab - Presence Service - Buddies list - Handles column. The entries either start with <code>../gabble/jabber/..</code> or <code>../salut/local-xmpp/..</code>. |
||
*To confirm you are running Gabble you can check the <code>config</code> file for the <code>[Server]</code>(not Jabber) entry to be true. This, however, can be misleading, because the file |
* To confirm you are running Gabble you can check the <code>config</code> file for the <code>[Server]</code> (not Jabber) entry to be true. This, however, can be misleading, because the file doesn't update properly when you disconnect from the Jabber server. Thus, it usually includes obsolete information. |
||
$ cat /home/olpc/.sugar/default/config |
$ cat /home/olpc/.sugar/default/config |
||
... |
... |
||
Line 109: | Line 112: | ||
registered = True # running Gabble |
registered = True # running Gabble |
||
server = jabber.laptop.org |
server = jabber.laptop.org |
||
*The console provides a more efficient way of determining with confidence which service is running. The process list will include either a <code>telepathy-salut</code> or a <code>telepathy-gabble</code> process |
* The console provides a more efficient way of determining with confidence which service is running. The process list will include either a <code>telepathy-salut</code> or a <code>telepathy-gabble</code> process, |
||
ps ax # general process list |
ps ax # general process list |
||
ps U olpc -f|grep telepathy # only the required entry will be displayed |
ps U olpc -f|grep telepathy # only the required entry will be displayed |
||
* |
* The Jabber server to which the XO is connected (if it's running Gabble) can be examined using the <code>netstat</code> command, |
||
netstat -tpT|grep telepathy # the connection established by the telepathy-gabble process |
netstat -tpT|grep telepathy # the connection established by the telepathy-gabble process |
||
===Combine the tests in an automated script=== |
===Combine the tests in an automated script=== |
||
All the above tests require checking many different locations and running several commands. Alternatively, you |
All the above tests require checking many different locations and running several commands. Alternatively, you may run <code>olpc-netstatus</code> from the [[Terminal Activity]] or a [[console]]. It will accumulate and display the following network overview directly. This is a case of an XO connected to the School server on Channel 1. |
||
$bash connectivity_status.sh |
|||
$olpc-netstatus |
|||
⚫ | |||
MAC : 00:17:c4:05:26:1f |
|||
Model : C2 |
|||
Serial : CSN74400049 |
|||
MAC : 00:17:C4:0C:CD:11 |
|||
Build : update.1 703 |
|||
Firmware : CL1 Q2D14 Q2D |
|||
Libertas : 5.110.22.p1 |
|||
Nick : W03 |
|||
Uptime : 01:12:06 |
|||
IP eth0 : 172.18.0.250 |
|||
Ethernet : |
|||
IP msh0 : 169.254.5.77 |
|||
DNS : 172.18.0.1 |
|||
Telepathy : gabble |
|||
This is a case of an XO connected to the School server on Channel 1. Note it is running Salut, although it is connected to the internet. |
|||
Jabber : schoolserver.laptop.org |
|||
⚫ | |||
This is a |
|||
⚫ | |||
/etc/resolv.conf # DNS server |
|||
Essid : olpc-mesh |
|||
⚫ | |||
Channel : 1 |
|||
School : schoolserver.laptop.org |
|||
⚫ | |||
Config : School Mesh |
|||
⚫ | |||
/var/log/messages # main log file |
|||
More up-to-date version of olpc-netstatus, and other useful Network tools are available at [[Network Resources]]. |
|||
===Useful Network and Mesh links=== |
|||
[[Test_Config_Notes#Turn_on_MPP_Capability|Turn on MPP Capability]] |
|||
⚫ | |||
[[Test_Config_Notes#Testing_of_Different_Connection_Configurations|Testing of Different Connection Configurations]] |
|||
You may need to be [[root]] to access some of these files |
|||
; <tt>/etc/resolv.conf</tt> |
|||
[[Test_Config_Notes#Modify_the_Mesh_Discovery_Sequence|Modify the Mesh Discovery Sequence]] |
|||
: DNS server |
|||
; <tt> /etc/dhcpd.conf</tt> |
|||
[[Mesh_Forwarding_Table|Mesh Forwarding Table]] |
|||
: check whether the XO acts as an MPP |
|||
; <tt> /etc/NetworkManager/mesh-start</tt> |
|||
[[Wireless_Driver_README|Wireless Driver Readme]] |
|||
⚫ | |||
⚫ | |||
[[Mesh_Network_Details|Mesh Network Details]] |
|||
: user information |
|||
⚫ | |||
[[Mesh_Network_FAQ|Mesh Network FAQ]] |
|||
: stores access points information, such as WEP password |
|||
; <tt> /var/log/messages</tt> |
|||
[[Establishing_a_Mesh_Portal|Establishing a Mesh Portal]] |
|||
: main log file, may hold messages from NetworkManager |
|||
[http://www.cozybit.com/projects/mpp-utils Cozybit's MPP Utils] |
|||
⚫ | |||
[[Category:Network]] |
[[Category:Network]] |
||
⚫ |
Latest revision as of 19:33, 27 April 2011
Questions
- Is the XO connected to Link-local or a mesh?
- Is it connected to an MPP? (Depreciated; no longer available)
- Is it connected to the Internet?
- Is it connected to a Jabber (XMPP) server?
- What is the IP address?
Layer 2
The wireless configuration of the network can be examined using the iwconfig eth0
command. We get MAC layer information such as
- ESSID
- olpc-mesh : Indicates a mesh with or without Internet connectivity
- Mode
- Managed : It is an Access Point(AP) configuration
- Ad-hoc : It is a mesh configuration (no infrastructure)
- Frequency (MHz)
- 2.412 : Channel 1
- 2.437 : Channel 6
- 2.462 : Channel 11
- Channels 1,6, 11 can be used to join a Link-local mesh
- Channels 1, 6, 11 can also be a School server mesh (ch 1 is almost always on at OLPC offices)
- At OLPC offices, '802.11 Media lab' AP operates on Channels 6 and 11
- Cell/AP Mac
- Access Point : The AP's MAC
- Cell : A virtual 02:xx:xx:... MAC address assigned by the some mesh points. It indicates mesh configuration
Layer 3
IP addresses
The network layer information can be observed with ifconfig
. The default built-in wireless adapter provides an Ethernet interface eth0
, and a mesh interface msh0
. Connecting additional 802.11s adapters will introduce additional pairs of eth1,eth2,..
and msh1,msh2,..
interfaces. Connecting Ethernet adapters will introduce additional eth1,eth2,..
interfaces, and will provide Ethernet connectivity. In the default case(although the same applies for all) the interfaces provide the following IPv4 addresses
eth0
- Connected to an AP without NAT
- any public address(18.85.x.x when connected to Media Lab 802.11 at OLPC offices)
- Connected to an AP, but behind a NAT
- 192.168.x.x
- 172.x.x.x
- 10.x.x.x
- Connected to a switch with no gateway
- 169.254.x.x
- Not connected to an AP
- blank
- Connected to an AP without NAT
msh0
- Link-local
- 169.254.x.x
- Connected to an MPP
- 169.254.x.x
- Connected to a School server
- 172.x.x.x (172.18.x.x when connected to the School server in OLPC offices)
- 192.168.x.x
- 10.x.x.x
- Connected to an AP via wireless or Ethernet adapter
- 169.254.x.x
- none
- Link-local
It is interesting to note that the 169.254.x.x address when applicable are always the same by default. If no address shows in the msh0
you can
killall dhclient dhclient # Send DHCP request to force (if possible) to acquire a connection to a gateway avahi-autoipd # If no mesh gateway is available (MPP or School server) it will assign a zeroconf address(169.254.x.x)
DNS check
The most direct way to check Internet connectivity is by checking the resolv.conf
file. It shows if the XO is registered to a DNS server. It can be viewed with,
cat /etc/resolv.conf
- If it is empty,
- No connection to the Internet (technically, no connection to the DNS server).
- If it includes a nameserver with private address (172.x.x.x, 169.168.x.x, 10.x.x.x),
- Connected to an AP behind a NAT,
- Connected to an MPP, which connects to an AP behind a NAT,
- Connected to a School server (172.18.0.1 for the School server in OLPC offices, although others are also available).
- If it includes a nameserver with public address,
- Connected to an AP without a NAT,
- Connected to an MPP, which connects to an AP without a NAT.
- The is a rare possibility resulting from a NetworkManager failure, of an XO to have access to the Internet, but the resolv.conf to be blank. In that case, the XO will not be able to resolve hostnames. This possibility can be examined with,
ping www.mit.edu # No replies ping 18.7.22.83 # Normal replies
The general rule of thumb regarding the resolv.conf file in the lab XOs is the following:
- empty: Link-local
- 172.18.x.x: Schoolserver
- 18.85.x.x: Media lab AP
If the XO connects to a channel that includes a School server or an MPP, but for some reason there is no Internet connectivity, and the resolv.conf
file is empty, check if it is forced in Link-local or another configuration,
nano /etc/NetworkManager/mesh-start # confirm that the file is empty(if it exists)
If the problem persists you can try,
killall dhclient dhclient # Send DHCP request to force(if possible) to acquire a routable IP
Telepathy services
The Presence Service acquires information on other XOs in the network, and provides the capability to view them in the Neighborhood view, or share with them an activity. This is achieved through two child telepathy services, Salut and Gabble.
Salut
Salut runs when the XO is connected to a mesh. It uses the avahi _presence._tcp service. All XOs in the same mesh identify themselves in the Neighborhood view through Salut. They can be examined through,
avahi-browse -t _presence._tcp
Jabber
Gabble will allow XOs that belong to different geographical locations to communicate with each other. It will detect Internet connectivity and connect to a Jabber server. All XOs connected to the same Jabber server will appear to the Neighborhood view. The currently possible servers are
jabber.sugarlabs.org jabber.laptop.org olpc.collabora.co.uk
- By build 616, the Presence Service does not allow Gabble and Salut to run simultaneously.
- It constantly checks whether there is Internet connectivity, and switches from Salut to Gabble accordingly.
- The XOs displayed in the Neighborhood view either belong to the mesh, or the Jabber server, not both.
- The Internet connectivity does not work very accurately. It is very common when connected to the School server, which provides connectivity, that the XO is running Salut. However, it is convenient in the sense that it can now share activities with others in the mesh.
Detecting which service is running
- The simpler way to detect whether Salut or Gabble is running is by observing the Neighborhood view. If you see XOs that you haven't seen in the lab, then you are probably running Gabble.
- It can also be checked from the Analyze Activity - Interfaces tab - Presence Service - Buddies list - Handles column. The entries either start with
../gabble/jabber/..
or../salut/local-xmpp/..
. - To confirm you are running Gabble you can check the
config
file for the[Server]
(not Jabber) entry to be true. This, however, can be misleading, because the file doesn't update properly when you disconnect from the Jabber server. Thus, it usually includes obsolete information.
$ cat /home/olpc/.sugar/default/config ... [Server] registered = True # running Gabble server = jabber.laptop.org
- The console provides a more efficient way of determining with confidence which service is running. The process list will include either a
telepathy-salut
or atelepathy-gabble
process,
ps ax # general process list ps U olpc -f|grep telepathy # only the required entry will be displayed
- The Jabber server to which the XO is connected (if it's running Gabble) can be examined using the
netstat
command,
netstat -tpT|grep telepathy # the connection established by the telepathy-gabble process
Combine the tests in an automated script
All the above tests require checking many different locations and running several commands. Alternatively, you may run olpc-netstatus
from the Terminal Activity or a console. It will accumulate and display the following network overview directly. This is a case of an XO connected to the School server on Channel 1.
$olpc-netstatus Model : C2 Serial : CSN74400049 MAC : 00:17:C4:0C:CD:11 Build : update.1 703 Firmware : CL1 Q2D14 Q2D Libertas : 5.110.22.p1 Nick : W03 Uptime : 01:12:06 IP eth0 : 172.18.0.250 IP msh0 : 169.254.5.77 DNS : 172.18.0.1 Telepathy : gabble Jabber : schoolserver.laptop.org XOs : 4 Essid : olpc-mesh Channel : 1 School : schoolserver.laptop.org Config : School Mesh
More up-to-date version of olpc-netstatus, and other useful Network tools are available at Network Resources.
Useful locations
You may need to be root to access some of these files
- /etc/resolv.conf
- DNS server
- /etc/dhcpd.conf
- check whether the XO acts as an MPP
- /etc/NetworkManager/mesh-start
- used to force a lower priority network configuration
- /home/olpc/.sugar/default/config
- user information
- /home/olpc/.sugar/default/nm/networks.cfg
- stores access points information, such as WEP password
- /var/log/messages
- main log file, may hold messages from NetworkManager