Config » Historial » Versió 13
Pau Escrich, 11-01-2013 17:45
| 1 | 1 | Pau Escrich | h1. Config |
|---|---|---|---|
| 2 | |||
| 3 | 10 | Pau Escrich | The file /etc/config/qmp is the central configuration file (based on UCI). |
| 4 | |||
| 5 | 7 | Pau Escrich | h3. Network interfaces |
| 6 | |||
| 7 | 2 | Pau Escrich | <pre> |
| 8 | 1 | Pau Escrich | config 'qmp' 'interfaces' |
| 9 | # option 'configure_switch' 'eth0' # (uncomment line if available, e.g. WGT634U) |
||
| 10 | 4 | Pau Escrich | option 'lan_devices' 'eth0 wlan1 dummy0' # LAN (dhcp server) |
| 11 | option 'wan_devices' 'eth1' # WAN (dhcp client) |
||
| 12 | option 'mesh_devices' 'wlan0 wlan2 eth0 eth1' # Mesh devices, will be extended by VLAN tag! |
||
| 13 | option 'no_vlan_devices' '' # Network devices where we do not want to use VLAN tag (not recommended!) |
||
| 14 | 6 | Pau Escrich | </pre> |
| 15 | 1 | Pau Escrich | |
| 16 | 7 | Pau Escrich | h3. Node information |
| 17 | |||
| 18 | 6 | Pau Escrich | <pre> |
| 19 | 1 | Pau Escrich | config 'qmp' 'node' |
| 20 | 9 | Pau Escrich | option 'primary_device' 'eth0' |
| 21 | option 'community_id' 'qMp' |
||
| 22 | option 'community_node_id' '' |
||
| 23 | option 'key' '/tmp/qmp_key' |
||
| 24 | 1 | Pau Escrich | </pre> |
| 25 | 6 | Pau Escrich | |
| 26 | 7 | Pau Escrich | |
| 27 | h3. Upgrade firmware |
||
| 28 | |||
| 29 | 5 | Pau Escrich | <pre> |
| 30 | 1 | Pau Escrich | config 'qmp' 'update' |
| 31 | option 'url' 'http://fw.qmp.cat/testing' |
||
| 32 | option 'images' 'IMAGES' |
||
| 33 | option 'devices' 'DEVICES' |
||
| 34 | option 'filter' 'sysupgrade' |
||
| 35 | 6 | Pau Escrich | option 'preserve' '/etc/config/qmp /etc/shadow /etc/passwd /etc/rc.local /etc/firewall.user /etc/dropbear/* /etc/config/b6m-spread' |
| 36 | 4 | Pau Escrich | </pre> |
| 37 | 1 | Pau Escrich | |
| 38 | 7 | Pau Escrich | h3. DHCP overlapping (Roaming) |
| 39 | |||
| 40 | This is for Roaming mode, each node assings a non-overlapping DHCP IPv4 ranges over a /16 network on LAN device |
||
| 41 | 5 | Pau Escrich | <pre> |
| 42 | 1 | Pau Escrich | config 'qmp' 'non_overlapping' |
| 43 | 4 | Pau Escrich | option 'ignore' '0' |
| 44 | 1 | Pau Escrich | option 'dhcp_offset' '2' |
| 45 | option 'qmp_leasetime' '1h' |
||
| 46 | </pre> |
||
| 47 | |||
| 48 | 7 | Pau Escrich | h3. Network (layer3) |
| 49 | |||
| 50 | 6 | Pau Escrich | <pre> |
| 51 | 1 | Pau Escrich | config 'qmp' 'networks' |
| 52 | option 'dns' '141.1.1.1 85.126.4.170 202.83.95.227' |
||
| 53 | option 'lan_address' '172.30.22.1' |
||
| 54 | option 'lan_netmask' '255.255.255.0' |
||
| 55 | 4 | Pau Escrich | |
| 56 | # means olsr6 use vlantag 10+1, bmx6 use vlantag 10+2 |
||
| 57 | option 'mesh_protocol_vids' 'olsr6:1 bmx6:2' |
||
| 58 | 3 | Pau Escrich | option 'mesh_vid_offset' '10' |
| 59 | |||
| 60 | 4 | Pau Escrich | # rescue network prefix, the 16 missing bits are taken from device MAC |
| 61 | 8 | Pau Escrich | option 'rescue_prefix24' '169.254' |
| 62 | 3 | Pau Escrich | |
| 63 | 4 | Pau Escrich | # OLSR (backup protocol) only supports IPv6 |
| 64 | 3 | Pau Escrich | option 'olsr6_mesh_prefix48' 'fd01:0:0' |
| 65 | option 'olsr6_ripe_prefix48' '2011:0:0' |
||
| 66 | |||
| 67 | # BMX6 (main protocol) runs IPv6 backbone and IPv4 tunneled |
||
| 68 | option 'bmx6_mesh_prefix48' 'fd02:0:0' |
||
| 69 | option 'bmx6_ripe_prefix48' '2012:0:0' # suffix is autoconfigured based on community_node_id |
||
| 70 | option 'bmx6_ipv4_prefix24' '10.202' |
||
| 71 | # option 'bmx6_ipv4_address' '10.202.9.01/24' # if commented out then option is autoconfigured based on |
||
| 72 | # community_node_id and bmx6_ipv4_prefix |
||
| 73 | 8 | Pau Escrich | option 'bmx6_tablePrefTuns' '7000' |
| 74 | option 'bmx6_tableTuns' '70' |
||
| 75 | option 'bmx6_throwRules' '1' |
||
| 76 | 3 | Pau Escrich | |
| 77 | option 'babel_mesh_prefix48' 'fd03:0:0' |
||
| 78 | 11 | Pau Escrich | option 'disable_lan_dhcp' '0' |
| 79 | 9 | Pau Escrich | option 'netserver' '1' |
| 80 | 1 | Pau Escrich | </pre> |
| 81 | |||
| 82 | 7 | Pau Escrich | h3. Tunnels (gateways) |
| 83 | |||
| 84 | Offer/Fetch networks in the Mesh |
||
| 85 | |||
| 86 | 3 | Pau Escrich | <pre> |
| 87 | config 'qmp' 'tunnels' |
||
| 88 | option 'search_ipv4_tunnel' '0.0.0.0/0' |
||
| 89 | option 'search_ipv6_tunnel' '::/0' |
||
| 90 | # option 'offer_ipv4_tunnel' '0.0.0.0/0' |
||
| 91 | 1 | Pau Escrich | # option 'offer_ipv6_tunnel' '::/0' |
| 92 | </pre> |
||
| 93 | |||
| 94 | 7 | Pau Escrich | h3. WiFi |
| 95 | |||
| 96 | 1 | Pau Escrich | <pre> |
| 97 | 12 | Pau Escrich | # Main wireless configuration (common for all wifi devices) |
| 98 | 3 | Pau Escrich | config 'qmp' 'wireless' |
| 99 | option 'driver' 'mac80211' |
||
| 100 | option 'country' 'SP' |
||
| 101 | option 'bssid' '02:CA:FF:EE:BA:BE' |
||
| 102 | |||
| 103 | # First wifi device |
||
| 104 | config 'wireless' |
||
| 105 | 9 | Pau Escrich | option 'mode' 'adhoc' |
| 106 | option 'name' 'qMp.lab104' |
||
| 107 | option 'txpower' '14' |
||
| 108 | option 'channel' '140-' |
||
| 109 | option 'mac' '90:a4:de:c0:bb:c3' |
||
| 110 | option 'device' 'wlan0' |
||
| 111 | 3 | Pau Escrich | |
| 112 | # Second wifi device |
||
| 113 | config 'wireless' |
||
| 114 | 9 | Pau Escrich | option 'mode' 'ap' |
| 115 | option 'name' 'qMp' |
||
| 116 | option 'txpower' '17' |
||
| 117 | option 'channel' '9+' |
||
| 118 | option 'mac' '00:80:48:78:75:23' |
||
| 119 | option 'device' 'wlan1' |
||
| 120 | 1 | Pau Escrich | </pre> |