Test Network Configuration: Difference between revisions
Line 28: | Line 28: | ||
===Layer 3=== |
===Layer 3=== |
||
====IP addresses==== |
====IP addresses==== |
||
The network layer information can be observed with <code>ifconfig</code>. The default builtin 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. |
The network layer information can be observed with <code>ifconfig</code>. The default builtin 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> |
|||
⚫ | |||
If the XO uses only <code>eth0</code> part gives an IPv4 address only if the XO is connected directly to an AP. The address can also indicate a private network. Media lab gives an 18.85.x.x address. The <code>msh0</code> gives |
|||
#when connected to |
*#*any public address(18.85.x.x when connected to Media Lab 802.11 at OLPC offices) |
||
*#when connected to an AP, but behind a NAT |
|||
#*192.168.x.x (typical IP, if the AP is providing dhcp) |
|||
*#*192.168.x.x |
|||
#*10.x.x.x (connected to '802.11 media lab' AP at olpc) |
|||
*#*172.x.x.x |
|||
⚫ | |||
*#*10.x.x.x |
|||
#*172.x.x.x(the current school server in the lab) |
|||
#when connected |
*#when connected to a switch with no gateway |
||
#*169.254.x.x |
*#*169.254.x.x |
||
*#when not connected to an AP |
|||
*#*blank |
|||
*<code>msh0</code> |
|||
*#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) |
|||
*#*192.168.x.x |
|||
*#*10.x.x.x |
|||
====DNS check==== |
====DNS check==== |
Revision as of 05:50, 18 October 2007
Questions
- Is the XO connected to local-link or a mesh?
- Is it connected to an MPP?
- Is it connected to the internet?
- Is it connected to a jabber server?
- What is the ip?
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 infrastracture)
- Frequency
- 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 Schoolserver 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 builtin 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
- when connected to an AP without NAT
- any public address(18.85.x.x when connected to Media Lab 802.11 at OLPC offices)
- when connected to an AP, but behind a NAT
- 192.168.x.x
- 172.x.x.x
- 10.x.x.x
- when connected to a switch with no gateway
- 169.254.x.x
- when not connected to an AP
- blank
- when 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)
- 192.168.x.x
- 10.x.x.x
- Link-local
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 there is generally no connection to the internet(technically, no connection to the DNS server)
- If it includes a nameserver with 169.254.x.x address there is internet connectivity through an MPP. The address is in fact the IP of the XO which acts as an MPP
- This is useful to determine on which MPP the XO is connected to, when there are multiple MPPs
- The is a rare possibility resulting from a Network Manager 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
- empty: local-link
- 169.254.x.x: MPP
- 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 a reason there is no internet connectivity, and the resolv.conf
file is empty check if it is forced in link-local or other 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 indentify themselves in the neighborhood view through Salut. They can be examined through
avahi-browse -t _presence._tcp
Gabble
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.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 havent seen in the lab then you are probably running Gabble.
- It can also be checked from the Developer's Console - Presence tab - 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 doesnt update properly when you disconnect from the Jabber server. Thus, it usualy 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
- Which Jabber server the XO is connected(if its running Gabble) get 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 can execute this status script, which will accumulate and display the following network overview directly
$bash status nick : d01 mac : 00:17:c4:03:31:fb ip eth0 : 18.85.18.23 ip msh0 : 169.254.7.84 dns : 18.85.2.171 essid : media lab 802.11 channel : 6 telepathy : gabble jabber : jabber.laptop.org config : Access point
Useful locations
/etc/resolv.conf # DNS server /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 /var/log/messages # main log file
Useful Network and Mesh links
Testing of Different Connection Configurations