Establishing a Mesh Portal: Difference between revisions
(A few updates) |
|||
(24 intermediate revisions by 13 users not shown) | |||
Line 1: | Line 1: | ||
{{OLPC}} |
|||
{{TOCright}} |
{{TOCright}} |
||
<b>Creating a mesh portal was automatic in releases after 484, but it is currently disabled. Also note that the wireless frame format differs with earlier versions; new mesh versions cannot interoperate with old versions. This is to bring us closer to the still evolving and not yet finished 802.11s standard under development.</b> |
|||
It's not entirely automatic quite yet; we'll get a more automatic solution in place soon. |
|||
The preferred method for most testing is to let the XO create a mesh automatically, and to use an ethernet interface rather than via associating with a conventional access point. |
|||
= New Mesh Portal installation = |
|||
See [[Test Config Notes#Turn on MPP Capability]]. |
|||
= Old Mesh Portal installation = |
|||
Note: This page provides info on making the XO emulate a School Server MPP. From nand image 484+, if you connect an XO to an infrastructure access point, or connect it to a network via USB-Eth dongle, the XO will automatically create a mesh and provide link local addressing. |
|||
==Requirements== |
==Requirements== |
||
* http://www.cozybit.com/projects/mpp-utils/mpp-utils.tar.gz |
|||
* A USB ethernet adapter |
* A USB ethernet adapter |
||
* One OLPC laptop (XO) |
* One OLPC laptop (XO) |
||
* The xo-mpp-server RPM here: [http://people.redhat.com/dcbw/olpc/xo-mpp-server-0.1-1.noarch.rpm xo-mpp-server-0.1-1.noarch.rpm] |
|||
* (The srpm [http://people.redhat.com/dcbw/olpc/xo-mpp-server-0.1-1.src.rpm is here], but you don't need it to setup the MPP) |
|||
* Note: The laptop that will serve as a Mesh Portal needs to run q2c18.rom (or greater), and nand image 484 (or greater). |
|||
==What to do== |
==What to do== |
||
* Boot up your XO |
|||
* Plug the USB ethernet adapter into the XO |
|||
* Switch to a virtual terminal (press Ctrl+Alt+F1), and log in as 'root' |
|||
* Un-gzip and un-tar that somewhere on your mesh portal machine |
|||
* Turn off NetworkManager and avahi |
|||
* in masquerade.sh from the mpp-utils, change EXTIF to your USB wired interface. If the USB ethernet adapter is plugged in at at boot, this will usually be "eth0". |
|||
* In masquerade.sh, make the following changes (shown here in patch-style form): |
|||
<pre> |
|||
# This line results in iptables: Unknown error 4294967295 |
|||
- #$IPTABLES -A FORWARD -i $EXTIF -o $INTIF -m state --state ESTABLISHED,RELATED -j ACCEPT |
|||
+ $IPTABLES -A FORWARD -i $EXTIF -o $INTIF -m state --state ESTABLISHED,RELATED -j ACCEPT |
|||
$IPTABLES -A FORWARD -i $EXTIF -o $INTIF -j ACCEPT |
|||
$IPTABLES -A FORWARD -i $INTIF -o $EXTIF -j ACCEPT |
|||
- $IPTABLES -A FORWARD -j LOG |
|||
+ #$IPTABLES -A FORWARD -j LOG |
|||
</pre> |
|||
* Stop NetworkManager and the 'network' scripts |
|||
<pre> |
<pre> |
||
chkconfig --level 2345 NetworkManager |
chkconfig --level 2345 NetworkManager off |
||
chkconfig --level 2345 |
chkconfig --level 2345 avahi-daemon off |
||
chkconfig --level 2345 dhcdbd stop |
|||
</pre> |
</pre> |
||
Line 51: | Line 51: | ||
</pre> |
</pre> |
||
* Plug the USB ethernet adapter into the XO |
|||
* reboot |
|||
* Reboot; type 'reboot' and press enter |
|||
* Create an ifcfg file for your USB wired interface. For example, if your wired interface is eth0, create /etc/sysconfig/network-scripts/ifcfg-eth0, which should contain: |
|||
* Wait for the XO to boot to the login prompt, then log in as 'root' |
|||
* Bring up the USB ethernet interface |
|||
<pre> |
<pre> |
||
ifup eth0 |
|||
ONBOOT=no |
|||
BOOTPROTO=dhcp |
|||
</pre> |
</pre> |
||
This file will already exist for 'eth0', but if your USB wired interface is _not_ 'eth0', you need to create this file for whatever interface name your wired USB device is. |
|||
* Start the wired interface |
|||
<pre>ifup eth0</pre> |
|||
* Install the DHCP daemon |
* Install the DHCP daemon |
||
Line 72: | Line 69: | ||
</pre> |
</pre> |
||
You may have to try this command twice; yum sometimes runs out of memory doing dependency solving, and terminates before actually installing the RPM. |
You may have to try this command twice; yum sometimes runs out of memory doing dependency solving, and terminates before actually installing the RPM. Keep trying until the last line says "completed!". |
||
* Copy the xo-mpp-server RPM onto the XO and install it: |
|||
* Configure DHCP to serve on the mesh interface. Edit /etc/sysconfig/dhcpd so it looks like this: |
|||
<pre> |
<pre> |
||
rpm -Uhv xo-mpp-server-0.1-1.noarch.rpm --force |
|||
# Command line options here |
|||
DHCPDARGS=msh0 |
|||
</pre> |
</pre> |
||
* Turn on various services at startup |
|||
* Set up DHCP to provide leases on the mesh interface. Edit /etc/dhcpd.conf to look like the following. For the "option domain-name-servers", use the domain name servers that your USB Ethernet device returned via DHCP, which should be found in /etc/resolv.conf. Don't leave "option domain-name-servers with the "x.x.x.x" values. If you only have one DNS server, omit the second value from at line. |
|||
<pre> |
|||
subnet 10.0.0.0 netmask 255.255.255.0 { |
|||
range 10.0.0.5 10.0.0.254; |
|||
default-lease-time 3600; |
|||
max-lease-time 7200; |
|||
option subnet-mask 255.255.255.0; |
|||
option broadcast-address 10.0.0.255; |
|||
option routers 10.0.0.1; |
|||
option domain-name-servers x.x.x.x, x.x.x.x; |
|||
} |
|||
</pre> |
|||
* Set DHCP to run on startup |
|||
<pre> |
<pre> |
||
chkconfig --level 345 network on |
|||
chkconfig --level 345 iptables on |
|||
chkconfig --level 345 dhcpd on |
chkconfig --level 345 dhcpd on |
||
chkconfig --level 345 mpp on |
|||
</pre> |
</pre> |
||
* Reboot; type 'reboot' and press enter |
|||
* Configure the mesh interface |
|||
<pre>iwconfig msh0 mode ad-hoc channel 11 essid "olpc-mesh"</pre> |
|||
and it should all work |
|||
* Assign the address to the mesh interface |
|||
<pre>ifconfig msh0 10.0.0.1 up</pre> |
|||
==Using the wireless eth0 interface to connect to an access point== |
|||
* run the mpp.py script |
|||
<pre>python mpp.py</pre> |
|||
You can configure an all-wireless MPP to route between eth0 and msh0 on the same wireless radio. This will introduce another wireless hop with the subsequent reduction in throughput, however it will be the most common MPP configuration. |
|||
and it should all work |
|||
To do that you need to make sure that the msh0 interface gets initialized before the eth0 interface in /etc/init.d/network and that eth0 is associated with an Access Point and has a valid IP configuration before the mpp script starts. |
|||
==Testing a larger network with multiple MPPs== |
|||
The important thing to keep in mind here is that there can only be one DHCP server and that every MPP's msh0 interface needs a unique IP address. |
|||
If the xo-mpp-server RPM is installed, the /etc/sysconfig/network-scripts/ifcfg-msh0 needs to be edited to set the IP address for that interface. Also editing /etc/dhcpd.conf on the machine that runs the DHCP server (so that the MPP addresses won't be in the DHCP pool) is required. |
|||
==Troubleshooting== |
|||
Feel free to contribute your own troubleshooting tips here. |
|||
<b>The laptops don't connect to the mesh portal!</b> |
|||
* Build385 or higher is needed on the client laptops for these instructions. |
|||
==Further Reading== |
==Further Reading== |
Latest revision as of 21:49, 5 August 2013
Creating a mesh portal was automatic in releases after 484, but it is currently disabled. Also note that the wireless frame format differs with earlier versions; new mesh versions cannot interoperate with old versions. This is to bring us closer to the still evolving and not yet finished 802.11s standard under development.
The preferred method for most testing is to let the XO create a mesh automatically, and to use an ethernet interface rather than via associating with a conventional access point.
New Mesh Portal installation
See Test Config Notes#Turn on MPP Capability.
Old Mesh Portal installation
Note: This page provides info on making the XO emulate a School Server MPP. From nand image 484+, if you connect an XO to an infrastructure access point, or connect it to a network via USB-Eth dongle, the XO will automatically create a mesh and provide link local addressing.
Requirements
- A USB ethernet adapter
- One OLPC laptop (XO)
- The xo-mpp-server RPM here: xo-mpp-server-0.1-1.noarch.rpm
- (The srpm is here, but you don't need it to setup the MPP)
- Note: The laptop that will serve as a Mesh Portal needs to run q2c18.rom (or greater), and nand image 484 (or greater).
What to do
- Boot up your XO
- Switch to a virtual terminal (press Ctrl+Alt+F1), and log in as 'root'
- Turn off NetworkManager and avahi
chkconfig --level 2345 NetworkManager off chkconfig --level 2345 avahi-daemon off
- Set your init level to '3'; stopping Sugar and X from starting again.
nano /etc/inittab
find the line with:
id:5:initdefault:
and change the '5' to a '3' so it looks like this instead:
id:3:initdefault:
- Plug the USB ethernet adapter into the XO
- Reboot; type 'reboot' and press enter
- Wait for the XO to boot to the login prompt, then log in as 'root'
- Bring up the USB ethernet interface
ifup eth0
- Install the DHCP daemon
yum -y install dhcp
You may have to try this command twice; yum sometimes runs out of memory doing dependency solving, and terminates before actually installing the RPM. Keep trying until the last line says "completed!".
- Copy the xo-mpp-server RPM onto the XO and install it:
rpm -Uhv xo-mpp-server-0.1-1.noarch.rpm --force
- Turn on various services at startup
chkconfig --level 345 network on chkconfig --level 345 iptables on chkconfig --level 345 dhcpd on chkconfig --level 345 mpp on
- Reboot; type 'reboot' and press enter
and it should all work
Using the wireless eth0 interface to connect to an access point
You can configure an all-wireless MPP to route between eth0 and msh0 on the same wireless radio. This will introduce another wireless hop with the subsequent reduction in throughput, however it will be the most common MPP configuration.
To do that you need to make sure that the msh0 interface gets initialized before the eth0 interface in /etc/init.d/network and that eth0 is associated with an Access Point and has a valid IP configuration before the mpp script starts.
Testing a larger network with multiple MPPs
The important thing to keep in mind here is that there can only be one DHCP server and that every MPP's msh0 interface needs a unique IP address.
If the xo-mpp-server RPM is installed, the /etc/sysconfig/network-scripts/ifcfg-msh0 needs to be edited to set the IP address for that interface. Also editing /etc/dhcpd.conf on the machine that runs the DHCP server (so that the MPP addresses won't be in the DHCP pool) is required.
Troubleshooting
Feel free to contribute your own troubleshooting tips here.
The laptops don't connect to the mesh portal!
- Build385 or higher is needed on the client laptops for these instructions.
Further Reading
More information is available on these topics: