/etc/config/network was modified after reboot everytime

HI!
Everytime after i reboot my openwrt macine, the network config file was modified. I do not konw who modtify it. Who did it ? :face_with_monocle:

before reboot:

after reboot:

LAN: static ip --> dhcp

This may be happening because your lan address is invalid. Try 192.168.201.1 and see if it works.

2 Likes

I tried as you said, but it still was modified. what

Your bridge is also incorrectly defined. Bridges must be defined outside the network interface (as a device) and then your network Interface uses the bridge device.

I am opnwrt noob. can you tell me what i should do? thanks so much.

Let’s look at your config (in text form, please… not pictures)

Please copy the output of the following commands and post it here using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have:

ubus call system board
cat /etc/config/network

.... or just reset, and start from scratch.

2 Likes
{
        "kernel": "4.14.171",
        "hostname": "xxxxxxx",
        "system": "Intel(R) Core(TM) i3-8100 CPU @ 3.60GHz",
        "model": "System manufacturer System Product Name",
        "board_name": "system-manufacturer-system-product-name",
        "release": {
                "distribution": "OpenWrt",
                "version": "19.07.2",
                "revision": "r10947-65030d81f3",
                "target": "x86/64",
                "description": "OpenWrt 19.07.2 r10947-65030d81f3"
        }
}
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 'fddb:a6s1:76b::/48'
##s
config interface 'wan'
        option ifname 'eth0'
        option proto 'dhcp'

config interface 'lan'
        option ifname 'eth1 eth2 eth3'
        option proto 'static'
        option ipaddr '192.168.201.0'
        option netmask '255.255.255.0'
        option type 'bridge'


##e
config interface 'mng'
        option ifname 'eth2'
        option proto 'static'
        option ipaddr '192.168.56.2'
        option netmask '255.255.255.0'

config interface 'tun'
        option ifname 'tun1'
        option proto 'static'

config route 'toTun'
        option interface 'tun'
        option table '10'
        option netmask '0.0.0.0'
        option target '0.0.0.0'

config rule 'saas'
        option mark '0x0A'
        option lookup '10'

You should consider upgrading to 21.02.3 (latest stable release) or at least 19.07.10 (which is current but eol).

This is incorrectly defined. Try this:


config device
	option name 'br-lan'
	option type 'bridge'
        option ifname 'eth1 eth2 eth3'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.201.1'
        option netmask '255.255.255.0'

Also, remove the lines with # in them.
And you have eth2 used in two places - only use it once unless you are using VLANs (in which case the format is eth2.x where x is the vlan id)

1 Like

waht is your mean?

ok,thank you