OpenWrt Forum Archive

Topic: Netgear DGN3500 doesn't connect automatically to wan

The content of this topic has been archived on 16 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello to everybody. This is my first post (i didn't found any presentation topic so I say hello here tongue).

I installed OpenWrt (version Chaos Calmer 15.05) on my router an it's cool (i have to learn a lot). I have a lot of questions to ask to learn but I should first resolve a big issue: the router doesn't connect automatically to internet.

Here a lot of screenshots to explain better, if you needs some config files from ssh please ask big_smile

postimg.org/image/c1vc7gkcz/
postimg.org/image/3jlxwm2dv/
postimg.org/image/z75smye1f/
postimg.org/image/c6z5amg7n/
postimg.org/image/42r15vtsj/
postimg.org/image/ta1x64wwj/
postimg.org/image/h9gh5ephv/ 

Simply when i power on the router it doesn't get any external IP, i have to log-in in luci and go to Network → Interfaces → (Wan) Connect and then works.
I had the idea to load a script form /etc/rc.local to manually connect the wan when it starts, but i think is a dirty workaround.

Can anyone help me?

Has anyone a better solution than reloading the interface using an user script?

I tried with this config but wan doesn't auto-load. I have to make a ifup wan manually sad

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 'fd32:011b:eab0::/48'

config interface 'lan'
        option force_link '1'
        option type 'bridge'
        option proto 'static'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option ifname 'eth0.1'
        option ipaddr '192.168.0.1'
        option delegate '0'
        option ipv6 '0'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '3 2 1 0 5t'

config atm-bridge 'atm'
        option encaps 'llc'
        option payload 'bridged'
        option vpi '8'
        option vci '35'

config interface 'wan'
        option ifname 'nas0'
        option proto 'pppoe'
        config auto '1'
        option username 'benvenuto'
        option password 'ospite'
        option peerdns '0'
        option dns '8.8.8.8 8.8.4.4'
        option delegate '0'

config adsl 'dsl'
        option annex 'a'
        option firmware '/lib/firmware/adsl.bin'

config route

Now i solved setting this /etc/rc.local

# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.

sleep 5 && /sbin/ifup wan &

exit 0

Can anyone help me to find a better solution?

(Last edited by marcomg on 19 May 2017, 05:00)

The discussion might have continued from here.