Dir-320 no wan interface

This is not very clear. I inquired because /etc/config/network is usually configured by default.

You can normally recover this default config file by performing a reset of the device.

I have a configuration on flash usb. I pull out the flash drive, change / etc / config / network to default, then stick it back and it works.
If I copy the config with, then the router does not work (I can not connect)
/etc/config/network on flash usb or router not empty

If I understand you correctly, you copy the /etc/config/network file to a flash drive to edit it on a computer???

If that's the case, the problem is likely that there's a file permission issue after copying it back to the router.

Why don't you edit the file by connecting to the router via SSH, or editing the switch using the LuCI web GUI???

I edit from the computer when the router does not start. in luci click on add vlan - does not work

no, I have a root system on a flash drive, configuration files from a flash drive are read.

https://github.com/openwrt/openwrt/commit/7ac238fc9855d20f0cfbc5754a1f9591438abfe3
I think that dir-320 has the same configuration

what configuration should I write in /etc/config/network?

We don't have enough information since what I gave you didn't work. I wrote the config above based on the manual. You have the information needed, as you built the firmware. Also the manual claims that it uses VLAN 0, which is highly irregular.

  • Please provide a copy of your /etc/config/network; or

thanks, there is a backup from the old firmware, he did not guess from there to get the config. I'll try it in a week


config switch 'eth0'
	option enable '1'

config switch_vlan 'eth0_0'
	option device 'eth0'
	option vlan '0'
	option ports '1 2 3 4 5'

config switch_vlan 'eth0_1'
	option device 'eth0'
	option vlan '1'
	option ports '0 5'

config interface 'loopback'
	option ifname 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config interface 'lan'
	option type 'bridge'
	option ifname 'eth0.0'
	option proto 'static'
	option netmask '255.255.255.0'
	option ipaddr '192.168.0.1'

config interface 'wan'
	option ifname 'eth0.1'
	option proto 'dhcp'


I tried this config (from openwrt 12), it did not work