edoput / netjsonconfig

Network configuration management library based on NetJSON DeviceConfiguration
http://netjsonconfig.openwisp.org/
Other
1 stars 0 forks source link

netconf section #5

Open edoput opened 7 years ago

edoput commented 7 years ago

Available keys and defaults v8.3

netconf.1.autoip.status # from netjson proto: dhcp
netfconf.1.autoneg=enabled # automatic ethernet speed negotiation
netconf.1.devname # from netjson
netconf.1.mtu # from netjson
netconf.1.status=enabled # cannot disable
netconf.1.up # from netjson
netconf.1.flowcontrol.{rx,tx}.status # ethernet only
netconf.1.ip # from netjson, proto: static
netconf.1.netmask # from netjson
netconf.1.role # vlan only
netconf.status
edoput commented 7 years ago

Available values for role can also be mlan management vlan, as this is not supported by netjson we should extend the schema to support it

netconf.1.role=mlan
edoput commented 7 years ago

~As we can see from this snippet pulled from an antenna we have to get the physical antenna interface and put into netconf and radio~

done in d5bad1f0dfcd68f07fff66d7ee85d6e9090f64a3

netconf.1.mtu=1500
netconf.1.autoip.status=disabled
netconf.1.up=enabled
netconf.1.devname=ath0
netconf.1.status=enabled
...
radio.1.cwm.mode=1
radio.1.devname=ath0
radio.1.dfs.status=enabled
radio.1.ieee_mode=auto
edoput commented 7 years ago

As described by @cappe87 I found a strange behaviour where the antenna is in router/bridge mode and there is a bridge interface which has a role wan specified.

netconf.3.role=wan
netconf.3.devname=br0

This is confusing as it seems that we are restricted in the way we can have network interfaces.

It seems to happen only when the web configuration is in "simple" mode

edoput commented 7 years ago

Another missing piece is the role lan which I only see now

netconf.2.role=lan
netconf.2.devname=eth0

Again this seems to happen only in "simple" mode

~another piece of black magic is the netconf.2.autoneg=enabled key where I can't really see what it does.~

edoput commented 7 years ago

~Interfaces without an address field should be rendered with netconf.1.autoip=disabled and all their other configuration keys~

Done in 427392e988b94a120e0cb56c0067821a8b325764

edoput commented 7 years ago

~a bridge interface does not have the up key~