Default Gateway lost after little reconfig in iluci-web (netgear r7800)

Hello together,

i just sysupgrade the newes openwrt 22.3 to my netgear-r7800 and all works fine. A few days later i looked in the log an there were spam messages from odhcp6c / ipv6. because i dont use ipv6 i deinstalled odhcp6c and clicked a little bit in the network config in the web luci interface.

I think i deactivated everything with ipv6 in LAN and WAN6 - I had to restart WAN6 ...

From that point i had no default gw to my internet provider so the clients and openwrt itselfs had no internet connection. after i added the default gw through ssh with "route add dfeault gw -ipfrommyprovidery-" it worked.

is there a possibility to have the default gw automatically set? because when i restart the deice default gw is lost aigain.
and is there a possibility to save the config in luci and return to an old config when i misconfigured something?

uci show network:

network.loopback=interface
network.loopback.device='lo'
network.loopback.proto='static'
network.loopback.ipaddr='127.0.0.1'
network.loopback.netmask='255.0.0.0'
network.globals=globals
network.globals.ula_prefix='fdd8:f828:163c::/48'
network.@device[0]=device
network.@device[0].name='br-lan'
network.@device[0].type='bridge'
network.@device[0].ports='eth1.1'
network.@device[0].ipv6='0'
network.lan=interface
network.lan.device='br-lan'
network.lan.proto='static'
network.lan.ipaddr='192.168.1.1'
network.lan.netmask='255.255.255.0'
network.lan.ip6assign='60'
network.wan=interface
network.wan.device='eth0.2'
network.wan.proto='pppoe'
network.wan.username='DSL0001XXXXXXXXXXXXXXXXXXXXX2.de'
network.wan.password='XXXXXXXX'
network.wan.ipv6='0'
network.wan6=interface
network.wan6.device='eth0.2'
network.wan6.proto='dhcp'
network.@switch[0]=switch
network.@switch[0].name='switch0'
network.@switch[0].reset='1'
network.@switch[0].enable_vlan='1'
network.@switch_vlan[0]=switch_vlan
network.@switch_vlan[0].device='switch0'
network.@switch_vlan[0].vlan='1'
network.@switch_vlan[0].ports='1 2 3 4 6t'
network.@switch_vlan[1]=switch_vlan
network.@switch_vlan[1].device='switch0'
network.@switch_vlan[1].vlan='2'
network.@switch_vlan[1].ports='5 0t'
network.@device[1]=device
network.@device[1].name='eth0'
network.@device[1].ipv6='0'
network.@device[2]=device
network.@device[2].name='wlan1'
network.@device[2].ipv6='0'
network.@device[3]=device
network.@device[3].name='eth0.2'
network.@device[3].type='8021q'
network.@device[3].ifname='eth0'
network.@device[3].vid='2'
network.@device[3].ipv6='0'
network.@device[4]=device
network.@device[4].name='eth1'
network.@device[4].ipv6='0'
network.@device[5]=device
network.@device[5].name='eth1.1'
network.@device[5].type='8021q'
network.@device[5].ifname='eth1'
network.@device[5].vid='1'
network.@device[5].ipv6='0'
network.@device[6]=device
network.@device[6].name='pppoe-wan'
network.@device[6].ipv6='0'
network.@device[7]=device
network.@device[7].name='wlan0'
network.@device[7].ipv6='0'

thanks

I found the misconiguration. In Luci i have three interfaces: lan/wan/wan6 with wan beeing my internet-connection (dsl). in every interface the checkbox "use default gw" in tab "advance settings" was set. i deactivated the checkbox in lan and wan6 .. now it works and it brings up the correct default gw.

Another mistake is that you have protocol dhcp for wan6 interface, when it should be dhcpv6. And wan6 device should be @wan not eth0.2.

thanks for your answer. but i dont want ipv6 - and dhcpv6 is something with ipv6? so wan6 is only for ipv6 - should i delete it?

If you don't need IPv6 it's better to delete it rather than having it misconfigured.

1 Like