Skip to content

Commandline administration

4ndr3 edited this page Aug 10, 2014 · 192 revisions

Solving various problems on the commandline.

Setting location

# uci set gluon-node-info.@location[0].latitude=53.834470
# uci set gluon-node-info.@location[0].longitude=10.702518
# uci set gluon-node-info.@location[0].share_location=1
# uci commit gluon-node-info

Check settings:

# uci show gluon-node-info
gluon-node-info.@location[0]=location
gluon-node-info.@location[0].share_location=1
gluon-node-info.@location[0].latitude=53.834470
gluon-node-info.@location[0].longitude=10.702518

Setting contact

# uci get gluon-node-info.@owner[0] || uci add gluon-node-info owner
# uci set gluon-node-info.@owner[0].contact=example@example.com
# uci commit gluon-node-info

Check settings:

# uci show gluon-node-info
....
gluon-node-info.@owner[0]=owner
gluon-node-info.@owner[0].contact=Luftloch

Enabling fastd

# uci set fastd.mesh_vpn.enabled=1
# uci commit fastd
# /etc/init.d/fastd generate_key mesh_vpn
18fa75d1808692f04770bedf30c42dac24585d331560c545d70dd27f22a05648

Set existing fastd private key

# uci set fastd.mesh_vpn.enabled=1
# uci set fastd.mesh_vpn.secret=18fa75d1808692f04770bedf30c42dac24585d331560c545d70dd27f22a05648
# uci commit fastd

Show fastd public key

# /etc/init.d/fastd show_key mesh_vpn
18fa75d1808692f04770bedf30c42dac24585d331560c545d70dd27f22a05648    

Enable mesh on WAN-Port

# uci set network.mesh_wan.auto=1
# uci commit network

Change AutoUpdater Branch

# uci set autoupdater.settings.enabled=1
# uci set autoupdater.settings.branch=stable
# uci commit autoupdater
# autoupdater -f 

Reboot to configmode

# uci set gluon-config-mode.@wizard[0].enabled=1
# uci commit
# reboot

PoE passthrough on Nanostation M

echo 8 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio8/direction
echo 1 > /sys/class/gpio/gpio8/value

Set a static IPv4 for the WAN-Port

# uci set network.wan.proto=static
# uci set network.wan.ipaddr=XXX.XXX.XXX.XXX
# uci set network.wan.netmask=XXX.XXX.XXX.XXX
# uci set network.wan.gateway=XXX.XXX.XXX.XXX
# uci commit network
# reboot

Mesh on LAN

LAN-Schnittstelle identifizieren:

cat /lib/gluon/core/sysconfig/lan_ifname

In diesem Beispiel eth1. mesh_lan-Schnittstelle Anlegen:

vi /etc/config/network

Hinzufügen:

config interface 'mesh_lan'
    option ifname 'eth1'
    option mesh 'bat0'
    option proto 'batadv'
    option auto '1'

Aus der client-Schnittstelle den Schnittstellennamen eth1 entfernen:

config interface 'client'
    option reqprefix 'no'
    option ifname 'bat0'
    option proto 'dhcpv6'
    option type 'bridge'
    option macaddr 'ca:fe:ba:be:13:37'
    option peerdns '1'

(statt option ifname 'eth1 bat0'). Netzwerk neu starten:

/etc/init.d/network restart

Testen (funktioniert nur, wenn auch ein Kabel eingesteckt ist):

batctl if

sollte nun u.A. eth1: active anzeigen

ubus call network.interface.mesh_lan status

Sollte "up": true anzeigen

Clone this wiki locally