[OpenWrt-Devel] For RG100A-AA, How to modify the default value of /etc/config/network?

N.Leiten nickleiten at gmail.com
Wed Jul 1 09:17:05 EDT 2015


There's two ways of default configuration - first is statically for all platforms in package/base-files/files/etc/config/network and using 'uci-default' hooks.
The second type is used for target depended configurations (either different ports on switch as lan/wan or even different interfaces for lan/wan, migration between different version of firmware, etc). The scripts itself are executed every time at bootup, but deleted when they return zero code. So they're never executed twice if all gone ok. They are located in etc/uci-defaults. Generally they are gotten from target/linux/<platform>/base-files/etc/uci-defaults 

In email dated Среда - 01 июля 2015 21:02:06 user zhengfish wrote:
> Hi, All
> 
> I'm using openwrt-14.07.
> 
> I want to modify the default value of /etc/config/network while I build the
> images for RG100A-AA.
> I tried to modify this file -- package/base-files/files/etc/config/network,
> but it seems have no effect.
> Which file should I modify?
> 
> 
> Here is my network by default on RG100A-AA.
> 
> # cat /etc/config/network
> 
> config interface 'loopback'
>         option ifname 'lo'
>         option proto 'static'
>         option ipaddr '127.0.0.1'
>         option netmask '255.0.0.0'
> 
> config globals 'globals'
>         option ula_prefix 'fd4a:ad7a:34c0::/48'
> 
> config interface 'lan'
>         option ifname 'eth1'
>         option force_link '1'
>         option type 'bridge'
>         option proto 'static'
>         option ipaddr '192.168.1.1'
>         option netmask '255.255.255.0'
>         option ip6assign '60'
> 
> config interface 'wan'
>         option ifname 'eth0'
>         option proto 'dhcp'
> 
> config interface 'wan6'
>         option ifname '@wan'
>         option proto 'dhcpv6'
> 
> config switch
>         option name 'eth1'
>         option reset '1'
>         option enable_vlan '1'
> 
> config switch_vlan
>         option device 'eth1'
>         option vlan '1'
>         option ports '0 1 2 3 4 5'
> 
> 
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list