[LEDE-DEV] Default UCI network config using 2 interfaces
Rafał Miłecki
zajec5 at gmail.com
Tue Aug 16 03:19:07 PDT 2016
Can I get some help with UCI helpers, please?
I have device that needs following network config:
config interface 'lan'
option type 'bridge'
option ifname 'eth0'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
config interface 'wan'
option ifname 'eth1'
option proto 'dhcp'
config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'
config switch_vlan
option device 'switch0'
option vlan '1'
option ports '0 5'
config switch_vlan
option device 'switch0'
option vlan '2'
option ports '1 2 3 4 8'
I tried generating it with following commands:
ucidef_set_interfaces_lan_wan "eth0" "eth1"
ucidef_add_switch "switch0" \
"0:wan" "1:lan" "2:lan" "3:lan" "4:lan" "5 at eth0" "8 at eth1"
board_config_flush
but instead of expected config I got:
config interface 'lan'
option type 'bridge'
option ifname 'eth0 eth1'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
config interface 'wan'
option type 'bridge'
option ifname 'eth1 eth0'
option proto 'dhcp'
config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'
config switch_vlan
option device 'switch0'
option vlan '1'
option ports '0 5'
config switch_vlan
option device 'switch0'
option vlan '2'
option ports '1 2 3 4 8'
--
Rafał
More information about the Lede-dev
mailing list