# Ubiquiti ERX mit Gluon: Tuning der Switch Config

**URL:** <https://forum.freifunk.net/t/ubiquiti-erx-mit-gluon-tuning-der-switch-config/21884>\
**Category:** Gluon\
**Created:** [15. März 2020 um 21:16 UTC](https://forum.freifunk.net/t/ubiquiti-erx-mit-gluon-tuning-der-switch-config/21884 "2020-03-15T21:16:13Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![adorfer](https://forum.freifunk.net/user_avatar/forum.freifunk.net/adorfer/32/17910_2.png) [@adorfer](https://forum.freifunk.net/u/adorfer)\
**Post date:** [22. März 2020 um 02:55 UTC](https://forum.freifunk.net/t/ubiquiti-erx-mit-gluon-tuning-der-switch-config/21884/6 "2020-03-22T02:55:17Z")

</div>

Ich habe das jetzt hier mal bei einem ERX gemacht.

![grafik](https://forum.freifunk.net/uploads/default/original/3X/b/d/bd807402634a174fe813e27fd87cefd52b6a8917.png)

in die /etc/rc.local habe ich vor das „exit 0“ eingefügt:

```
if ( ! batctl if|grep eth0.5 ) ; then 
  echo reinstalling mesh-lan-separation
  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].ports='1 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].ports='0 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].ports='2 6t'
  
  uci set network.@switch_vlan[3]=switch_vlan
  uci set network.@switch_vlan[3].device='switch0'
  uci set network.@switch_vlan[3].vlan='4'
  uci set network.@switch_vlan[3].ports='3 6t'
  
  uci set network.@switch_vlan[4]=switch_vlan
  uci set network.@switch_vlan[4].device='switch0'
  uci set network.@switch_vlan[4].vlan='5'
  uci set network.@switch_vlan[4].ports='4 6t'
    
  uci set network.mesh_lan=interface
  uci set network.mesh_lan.igmp_snooping='0'
  uci set network.mesh_lan.ifname='eth0.1'
  uci set network.mesh_lan.index='4'
  uci set network.mesh_lan.proto='gluon_wired'
  uci set network.mesh_lan.transitive='1'
  uci set network.mesh_lan.macaddr=$(echo 1$(uci show network.bat0.macaddr)|md5sum|sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/02:\1:\2:\3:\4:\5/')
  uci set network.mesh_lan.disabled='0'
  
  uci set network.mesh_lan2=interface
  uci set network.mesh_lan2.igmp_snooping='0'
  uci set network.mesh_lan2.ifname='eth0.3'
  uci set network.mesh_lan2.index='4'
  uci set network.mesh_lan2.proto='gluon_wired'
  uci set network.mesh_lan2.transitive='1'
  uci set network.mesh_lan2.macaddr=$(echo 1$(uci show network.bat0.macaddr)|md5sum|sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/02:\1:\2:\3:\4:\5/')
  uci set network.mesh_lan2.disabled='0'
  
  uci set network.mesh_lan3=interface
  uci set network.mesh_lan3.igmp_snooping='0'
  uci set network.mesh_lan3.ifname='eth0.4'
  uci set network.mesh_lan3.index='4'
  uci set network.mesh_lan3.proto='gluon_wired'
  uci set network.mesh_lan3.transitive='1'
  uci set network.mesh_lan3.macaddr=$(echo 1$(uci show network.bat0.macaddr)|md5sum|sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/02:\1:\2:\3:\4:\5/')
  uci set network.mesh_lan3.disabled='0'
  
  uci set network.mesh_lan4=interface
  uci set network.mesh_lan4.igmp_snooping='0'
  uci set network.mesh_lan4.ifname='eth0.5'
  uci set network.mesh_lan4.index='4'
  uci set network.mesh_lan4.proto='gluon_wired'
  uci set network.mesh_lan4.transitive='1'
  uci set network.mesh_lan4.macaddr=$(echo 1$(uci show network.bat0.macaddr)|md5sum|sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/02:\1:\2:\3:\4:\5/')
  uci set network.mesh_lan4.disabled='0'
  
  uci set network.mesh_lan.ifname='eth0.1'
  uci set network.mesh_lan2.ifname='eth0.3'
  uci set network.mesh_lan3.ifname='eth0.4'
  uci set network.mesh_lan4.ifname='eth0.5'

  uci commit network
  echo switch separation complete
  sleep 2
  reboot 
 fi

```

warum so umständlich: Damit nach einem FW-Update das wiederhergestellt wird.

---

_[View the full topic](https://forum.freifunk.net/t/ubiquiti-erx-mit-gluon-tuning-der-switch-config/21884)._
