-
Notifications
You must be signed in to change notification settings - Fork 0
/
mesh_configs.cfg
168 lines (140 loc) · 7.17 KB
/
mesh_configs.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
#!/bin/bash
# SYSTEM CONFIG
numberofnodes='5' # how many nodes not counting the gateway
# Specify which devices to add to the mesh:
# wr1043ndv3 for TP-Link WR-1043NDv3
# wdr3600 for TP-LINK WDR-3600
# wr740v4 for TP-LINK WR-740Nv4
# wr740v5 for TP-LINK WR-740Nv5
# rb433 for Mikrotik RouterBoard RB433/RB433AH
# archerc50 for TP-LINK Archer C50
# x86 for Gateway PCs without wireless
declare -r -A devicetype=( \
[gateway]="x86" \
[node-1]="wr740v5" \
[node-2]="wdr3600" \
[node-3]="archerc50" \
[node-4]="wr740v4" \
[node-5]="wr1043ndv3" \
)
# LEDE OPTIONS
# Select LEDE git_checkout_branch build mode
# "lede-17.01" for stable release or
# "master" for latest development version
# Select build_mode
# "build" to download image builder
# "compile" to compile from source
# Select lede_version
# "17.01.4" for latest stable release
# "17.X.X" for any other
declare -r -A lede_options=( [git_checkout_branch]=master [build_mode]=build [lede_version]=17.01.4 )
# RADIOS AND FREQUENCIES
radio2G_disable='1'
radio5G_disable='0'
adhoc2G_disable='1'
adhoc5G_disable='0'
radio2G_ap_disable='1'
radio5G_ap_disable='0'
radio2G_channel='6' # 2.4Ghz channel
radio5G_channel='40' # 5.8Ghz channel
# MESH CONFIG
declare -r -A mesh_config=( \
[meshssid]=02_CA_FE_CA_00_12 \
[bssid]=02:CA:FE:CA:00:12 \
[ssid]=users_wlan \
[wpa2key]=faa52962961538a4ebd706e45288c31ad1ae772fa31cde8d2d1ce1f6e67b7971 \
[mobility_domain]=4f57 \
[batman_routing_algo]=BATMAN_V \
[interface_name]=mesh \
[interface_mesh_name]=bat0 \
[hide_ap_ssid]=0 \
[interface_ifname0]=adhoc0 \
[interface_ifname1]=adhoc1 \
)
# NETWORK CONFIG
declare -r -A net_config=( \
[domain]=mesh.tvg \
[external_dns_ip]=8.8.8.8 \
[upstream_domain]=local.lan \
[upstream_dns]=192.168.100.11 \
[ip_start]=2 \
[number_of_ips]=252 \
[leasetime]=1h \
[lan_ip]=10.61.34.254 \
[lan_netmask]=255.255.255.0 \
[wan_protocol]=dhcp \
[wan_ip]=192.168.2.1 \
[wan_netmask]=255.255.255.0 \
[wan_gateway]=192.168.2.254 \
[batman_monitor_ip]=10.61.34.1 \
[macfilter]=disable \
[maclist]=84:8E:0C:3E:3D:E8 \
[dynamicdhcp]=1 \
[syscontact]="Alvaro Lopez Antelo" \
[max_download_speed_internet_link_kbps]=90000 \
[max_upload_speed_internet_link_kbps]=8500 \
)
# SNMP GEOLOCATION
syslocation='gateway,[-23.565339,-46.651481]'
# PLATFORM HARDWARE SPECIFICS
declare -r -A target=( [wr1043ndv3]=ar71xx [wdr3600]=ar71xx [wr740v4]=ar71xx [wr740v5]=ar71xx \
[rb433]=ar71xx [archerc50]=ramips [x86]=x86 )
declare -r -A subtarget=( [wr1043ndv3]=generic [wdr3600]=generic [wr740v4]=generic [wr740v5]=generic \
[rb433]=mikrotik [archerc50]=mt7620 [x86]=64 )
declare -r -A firmware_name_imagebuilder=( [wdr3600]=lede-${lede_options[lede_version]}-ar71xx-generic-tl-wdr3600-v1-squashfs-sysupgrade.bin \
[wr1043ndv3]=lede-${lede_options[lede_version]}-ar71xx-generic-tl-wr1043nd-v3-squashfs-sysupgrade.bin \
[wr740v4]=lede-${lede_options[lede_version]}-ar71xx-generic-tl-wr740n-v4-squashfs-sysupgrade.bin \
[wr740v5]=lede-${lede_options[lede_version]}-ar71xx-generic-tl-wr740n-v5-squashfs-sysupgrade.bin \
[rb433]=lede-${lede_options[lede_version]}-ar71xx-mikrotik-nand-64m-squashfs-sysupgrade.bin \
[archerc50]=lede-${lede_options[lede_version]}-ramips-mt7620-ArcherC50-squashfs-sysupgrade.bin \
[x86]=lede-${lede_options[lede_version]}-x86-64-combined-ext4.img.gz )
declare -r -A firmware_name_compile=( [wdr3600]=lede-ar71xx-generic-tl-wdr3600-v1-squashfs-sysupgrade.bin \
[wr1043ndv3]=lede-ar71xx-generic-tl-wr1043nd-v3-squashfs-sysupgrade.bin \
[wr740v4]=lede-ar71xx-generic-tl-wr740n-v4-squashfs-sysupgrade.bin \
[wr740v5]=lede-ar71xx-generic-tl-wr740n-v5-squashfs-sysupgrade.bin \
[rb433]=lede-ar71xx-mikrotik-nand64m-squashfs-sysupgrade.bin \
[archerc50]=lede-ramips-mt7620-ArcherC50-squashfs-sysupgrade.bin \
[x86]=lede-${lede_options[lede_version]}-x86-64-combined-ext4.img.gz )
declare -r -A batman_interfaces=( [wdr3600]="adhoc0 adhoc1 eth0.5" [wr1043ndv3]="adhoc0" [wr740v4]="adhoc0" \
[wr740v5]="adhoc0" [rb433]="adhoc0 adhoc1" [archerc50]="adhoc0 adhoc1 eth0.3" [x86]="eth2" )
declare -r -A packages=( [wdr3600]="alfred batctl bmon ethtool hostapd htop ip-tiny iperf iwinfo \
kmod-batman-adv kmod-usb-core kmod-usb-ohci kmod-usb2 luci snmpd tcpdump usbutils wget -wpad-mini" \
[wr1043ndv3]="alfred adblock batctl bmon ethtool hostapd htop ip-tiny iperf iwinfo kmod-usb-storage kmod-fs-ext4 kmod-scsi-generic \
block-mount kmod-batman-adv kmod-usb-core kmod-usb-ohci kmod-usb2 luci luci-app-adblock snmpd tcpdump usbutils wget -wpad-mini" \
[wr740v4]="alfred batctl hostapd ip-tiny iwinfo kmod-batman-adv -wpad-mini" \
[wr740v5]="alfred batctl hostapd ip-tiny iwinfo kmod-batman-adv -wpad-mini" \
[rb433]="alfred adblock batctl bmon ethtool hostapd htop ip-tiny iperf iwinfo luci-ssl-openssl \
kmod-batman-adv luci luci-app-adblock luci-app-sqm snmpd sqm-scripts tcpdump wget -wpad-mini" \
[archerc50]="alfred batctl bmon ethtool hostapd htop ip-tiny iperf iwinfo \
kmod-batman-adv kmod-usb-core kmod-usb-ohci kmod-usb2 luci snmpd tcpdump usbutils wget -wpad-mini"
[x86]="ca-certificates htop kmod-scsi-cdrom kmod-fs-ext4 kmod-batman-adv kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-hid luci-ssl-openssl \
luci-app-adblock luci-app-sqm sqm-scripts wget ip-full alfred batctl bmon ethtool iperf snmpd tcpdump"
)
declare -r -A profile=( [wr1043ndv3]=tl-wr1043nd-v3 [wdr3600]=tl-wdr3600-v1 [wr740v4]=tl-wr740n-v4 [wr740v5]=tl-wr740n-v5 [rb433]=nand64-m [archerc50]=ArcherC50 [x86]="" )
declare -r -A radio0_profile=( [wr1043ndv3]=$radio2G_disable [wdr3600]=$radio2G_disable [wr740v4]=$radio2G_disable [wr740v5]=$radio2G_disable \
[archerc50]=$radio5G_disable [x86]=disable )
declare -r -A radio1_profile=( [wr1043ndv3]=disable [wdr3600]=$radio5G_disable [wr740v4]=disable [wr740v5]=disable [archerc50]=$radio2G_disable [x86]=disable )
declare -r -A radio0_channel_profile=( [wr1043ndv3]=$radio2G_channel [wdr3600]=$radio2G_channel [wr740v4]=$radio2G_channel [wr740v5]=$radio2G_channel \
[archerc50]=$radio5G_channel [x86]=disable )
declare -r -A radio1_channel_profile=( [wr1043ndv3]=disable [wdr3600]=$radio5G_channel [wr740v4]=disable [wr740v5]=disable [archerc50]=$radio2G_channel [x86]=disable )
declare -r -A radio0_adhoc_profile=( [wr1043ndv3]=$adhoc2G_disable [wdr3600]=$adhoc2G_disable [wr740v4]=$adhoc2G_disable [wr740v45]=$adhoc2G_disable \
[archerc50]=$adhoc5G_disable [x86]=disable )
declare -r -A radio1_adhoc_profile=( [wr1043ndv3]=disable [wdr3600]=$adhoc5G_disable [wr740v4]=disable [wr740v5]=disable [archerc50]=$adhoc2G_disable [x86]=disable )
declare -r -A radio0_ap_profile=( [wr1043ndv3]=$radio2G_ap_disable [wdr3600]=$radio2G_ap_disable [wr740v4]=$radio2G_ap_disable [wr740v5]=$radio2G_ap_disable \
[archerc50]=$radio5G_ap_disable [x86]=disable )
declare -r -A radio1_ap_profile=( [wr1043ndv3]=disable [wdr3600]=$radio5G_ap_disable [wr740v4]=disable [wr740v5]=disable [archerc50]=$radio2G_ap_disable [x86]=disable )
declare -r -A gps_coordinates=( \
[node-1]="node1,[-23.564694,-46.652322]" \
[node-2]="node2,[-23.563990,-46.653190]" \
[node-3]="node3,[-23.562971,-46.654908]" \
[node-4]="node4,[-23.562971,-46.654908]" \
[node-5]="node5,[-23.562971,-46.654908]" \
)
declare -r -A mac_address=( \
[gateway]="EC086BEC3FA2" \
[node-1]="F6F26D5A87C0" \
[node-2]="F6F26D5A74AC" \
[node-3]="92F652CEA39C" \
[node-4]="92F652CEA38C" \
[node-5]="92F652CEB38C" \
)