Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config for LEDE #9

Open
darkdrgn2k opened this issue Jul 8, 2018 · 0 comments
Open

Config for LEDE #9

darkdrgn2k opened this issue Jul 8, 2018 · 0 comments

Comments

@darkdrgn2k
Copy link
Contributor

darkdrgn2k commented Jul 8, 2018

OpenWRT/LEDE raw config for mesh stream

Run in serial console as network connection may drop

ip="192.168.40.31"
gw="192.168.40.1"

rand4bytes=$(head -c 256 /dev/urandom | md5sum | sed 's/\(..\)/\1:/g' | head -c 11)

uci set network.lan.macaddr="02:$rand4bytes":10
uci commit network

for index in 0 1 2; do
uci set wireless.radio$index.macaddr="02:$rand4bytes":5$index
done

ifconfig br-lan $ip
route add -net 0.0.0.0 gw $gw
echo nameserver 8.8.8.8 > /etc/resolv.conf
opkg update
opkg install luci


uci set network.lan.dns=8.8.8.8
uci set network.lan.gateway=$gw
uci set network.lan.ipaddr=$ip

# Delete Network
uci del network.wan
uci del network.wan6
uci commit network

echo "config switch_vlan" >> /etc/config/network # Wierd Bug


uci set network.@switch_vlan[0]=switch_vlan
uci set network.@switch_vlan[0].device='switch0'
uci set network.@switch_vlan[0].vlan='1'
uci set network.@switch_vlan[0].vid='1'
uci set network.@switch_vlan[0].ports='3 4 6t'
uci set network.@switch_vlan[1]=switch_vlan
uci set network.@switch_vlan[1].device='switch0'
uci set network.@switch_vlan[1].vlan='2'
uci set network.@switch_vlan[1].vid='2'
uci set network.@switch_vlan[1].ports='3t 4t 6t'
uci set network.@switch_vlan[2]=switch_vlan
uci set network.@switch_vlan[2].device='switch0'
uci set network.@switch_vlan[2].vlan='3'
uci set network.@switch_vlan[2].vid='3'
uci set network.@switch_vlan[2].ports='3t 4t 6t'

uci set network.lan.ifname='eth1.1'

uci commit network

uci set network.mesh1=interface
uci set network.mesh1.proto=none
uci set network.mesh1.type=bridge
uci set network.mesh1.ifname='eth1.2'

uci set network.mesh2=interface
uci set network.mesh2.proto=none
uci set network.mesh2.type=bridge
uci set network.mesh2.ifname='eth1.3'

uci commit network


uci set wireless.radio0.disabled=0
uci set wireless.radio1.disabled=0
uci set wireless.radio2.disabled=0


uci set wireless.radio0.channel=1
uci set wireless.radio0.country=US
uci set wireless.radio0.htmode=HT40
uci set wireless.radio0.legacy_rates=1

uci set wireless.radio1.channel=165
uci set wireless.radio1.country=US
uci set wireless.radio1.htmode=HT40
uci set wireless.radio1.legacy_rates=1

uci set wireless.radio2.channel=165
uci set wireless.radio2.country=US
uci set wireless.radio2.htmode=HT40
uci set wireless.radio2.legacy_rates=1


uci delete  wireless.default_radio1
uci delete  wireless.default_radio0
uci delete  wireless.default_radio2

uci set wireless.ap=wifi-iface
uci set wireless.ap.device=radio0
uci set wireless.ap.mode=ap
uci set wireless.ap.network=lan
uci set wireless.ap.ssid=pi1
uci set wireless.ap.encryption=psk2
uci set wireless.ap.key=password

uci set wireless.mesh1=wifi-iface
uci set wireless.mesh1.mesh_fwding=1
uci set wireless.mesh1.device=radio1
uci set wireless.mesh1.mesh_id=tomesh
uci set wireless.mesh1.mode=mesh
uci set wireless.mesh1.network=mesh1
uci set wireless.mesh1.beacon_int=100

uci set wireless.mesh2=wifi-iface
uci set wireless.mesh2.device=radio2
uci set wireless.mesh2.mesh_fwding=0
uci set wireless.mesh2.mesh_id=tomesh
uci set wireless.mesh2.mode=mesh
uci set wireless.mesh2.network=mesh2
uci set wireless.mesh2.beacon_int=100


uci commit wireless

reboot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant