Don't manage to connect to the internet: DHCP + VLAN

Hello, I just installed OpenWrt 21.02.0-rc3 on my router, a Linksys MR8300. I got it running, can connect using LuCi and SSH, wired and wireless, but I don't manage to connect to the internet. With the stock firmware I could.
I have a separate modem from my ISP that I didn't touch. My ISP doesn't provide the configuration settings, but I found on internet that it should be DHCP and VLAN ID 20 (for if that is relevant, I have a fiber connection from Pepephone in Spain, which actually uses the Movistar network).
The last (and maybe also the first) thing I tried was to create the VLAN under switch - VLAN:

and in interfaces - WAN:

interfaces-wan

I tried many variations, but I didn't get any to work.

Does anyone see what I am doing wrong? Thanks!

Post the output:

ubus call system board; uci show network; ip address show
1 Like

root@OpenWrt:~# ubus call system board

{
	"kernel": "5.4.124",
	"hostname": "OpenWrt",
	"system": "ARMv7 Processor rev 5 (v7l)",
	"model": "Linksys MR8300 (Dallas)",
	"board_name": "linksys,mr8300",
	"release": {
		"distribution": "OpenWrt",
		"version": "21.02.0-rc3",
		"revision": "r16172-2aba3e9784",
		"target": "ipq40xx/generic",
		"description": "OpenWrt 21.02.0-rc3 r16172-2aba3e9784"
	}
}

root@OpenWrt:~# 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='fd42:7ea5:11dd::/48'
network.@device[0]=device
network.@device[0].name='br-lan'
network.@device[0].type='bridge'
network.@device[0].ports='eth0'
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.20'
network.wan.proto='dhcp'
network.wan6=interface
network.wan6.device='eth1'
network.wan6.proto='dhcpv6'
network.wan6.reqprefix='auto'
network.wan6.reqaddress='try'
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].vid='1'
network.@switch_vlan[0].ports='0t 1 2 3 4'
network.@switch_vlan[1]=switch_vlan
network.@switch_vlan[1].device='switch0'
network.@switch_vlan[1].vlan='2'
network.@switch_vlan[1].ports='0t'
network.@switch_vlan[1].vid='20'

root@OpenWrt:~# ip address show | sed s/..:..:..:..:..:./xx:xx:xx:xx:xx:x/

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    link/loopback xx:xx:xx:xx:xx:x0 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master br-lan state UP qlen 1000
    link/ether xx:xx:xx:xx:xx:x7 brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether xx:xx:xx:xx:xx:x8 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::c641:1eff:fe24:bef8/64 scope link 
       valid_lft forever preferred_lft forever
7: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether xx:xx:xx:xx:xx:x7 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.1/24 brd 192.168.1.255 scope global br-lan
       valid_lft forever preferred_lft forever
    inet6 fd42:7ea5:11dd::1/60 scope global noprefixroute 
       valid_lft forever preferred_lft forever
    inet6 fe80::c641:1eff:fe24:bef7/64 scope link 
       valid_lft forever preferred_lft forever
8: eth0.20@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether xx:xx:xx:xx:xx:x7 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::c641:1eff:fe24:bef7/64 scope link 
       valid_lft forever preferred_lft forever
9: wlan1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000
    link/ether xx:xx:xx:xx:xx:x9 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::c641:1eff:fe24:bef9/64 scope link 
       valid_lft forever preferred_lft forever
10: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue state DOWN qlen 1000
    link/ether xx:xx:xx:xx:xx:xb brd ff:ff:ff:ff:ff:ff
11: wlan2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000
    link/ether xx:xx:xx:xx:xx:xa brd ff:ff:ff:ff:ff:ff
    inet6 fe80::c641:1eff:fe24:befa/64 scope link 
       valid_lft forever preferred_lft forever
1 Like

Looks like your WAN interface is separate from the switch:

  • Revert the switch settings to defaults.
  • Specify eth1.20 as the WAN interface.
3 Likes

Looks like you router switch only covers LAN ports and Ethan, while the WAN port is directly connected to eth1.

Delete VLAN 20 from the switch configuration, you do not need it, and configure WAN on eth1.20.

3 Likes

Thanks @vgaetera and @eduperez. Unfortunately, it still didn't connect. I think I made the changes you suggested, rebooted for in case, but it still doesn't connect. Maybe I did something wrong. The new outputs are

root@OpenWrt:~# uci show networkroot@OpenWrt:~# 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='fd42:7ea5:11dd::/48'
network.@device[0]=device
network.@device[0].name='br-lan'
network.@device[0].type='bridge'
network.@device[0].ports='eth0'
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.proto='dhcp'
network.wan.device='eth1.20'
network.wan6=interface
network.wan6.device='eth1'
network.wan6.proto='dhcpv6'
network.wan6.reqprefix='auto'
network.wan6.reqaddress='try'
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].vid='1'
network.@switch_vlan[0].ports='0 1 2 3 4'

The changes are in

network.wan.device='eth1.20' (was network.wan.device='eth0.20')

network.@switch_vlan[0].ports='0 1 2 3 4' (the original setting, this was network.@switch_vlan[0].ports='0t 1 2 3 4')

and the network.@switch_vlan[1] block is not there anymore.

The other one:

root@OpenWrt:~# ip address show | sed s/..:..:..:..:..:./xx:xx:xx:xx:xx:x/

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    link/loopback xx:xx:xx:xx:xx:x0 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master br-lan state UP qlen 1000
    link/ether xx:xx:xx:xx:xx:x7 brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether xx:xx:xx:xx:xx:x8 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::c641:1eff:fe24:bef8/64 scope link 
       valid_lft forever preferred_lft forever
7: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether xx:xx:xx:xx:xx:x7 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.1/24 brd 192.168.1.255 scope global br-lan
       valid_lft forever preferred_lft forever
    inet6 fd42:7ea5:11dd::1/60 scope global noprefixroute 
       valid_lft forever preferred_lft forever
    inet6 fe80::c641:1eff:fe24:bef7/64 scope link 
       valid_lft forever preferred_lft forever
8: eth1.20@eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether xx:xx:xx:xx:xx:x8 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::c641:1eff:fe24:bef8/64 scope link 
       valid_lft forever preferred_lft forever
9: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue state DOWN qlen 1000
    link/ether xx:xx:xx:xx:xx:xb brd ff:ff:ff:ff:ff:ff
10: wlan2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000
    link/ether xx:xx:xx:xx:xx:xa brd ff:ff:ff:ff:ff:ff
    inet6 fe80::c641:1eff:fe24:befa/64 scope link 
       valid_lft forever preferred_lft forever
11: wlan1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000
    link/ether xx:xx:xx:xx:xx:x9 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::c641:1eff:fe24:bef9/64 scope link 
       valid_lft forever preferred_lft forever

What changed here is eth1.20@eth1 instead of eth0.20@eth0, with the MAC address changed correspondingly (and the order).

1 Like

Try to access the modem and verify its configuration:
https://openwrt.org/docs/guide-user/network/wan/access.modem.through.nat

Have you tried rebooting the modem (I know it may sound like a silly question but I didn’t see it in your description as something you did) - but if MAC is changing on your router, you will need to reboot modem .

2 Likes

@Jcarnage That's a good one, I never really dare to touch the modem, I'll try and let you know.
@vgaetera I'd like to try that as well. Is there a risk of messing up the configuration? How could I find out the IP address of the modem? Thanks!

Unfortunately, rebooting the modem doesn't solve it either.
I should have mentioned before that on the stock firmware there is no option to set VLAN with DHCP. Instead I selected PPPoE, with a random password and username, and in this way I can actually connect to the internet.
When I try the same values in OpenWrt, it doesn't connect unfortunately.

Hey, I have the same issue, i have Pepephone too but using Vodafone network. I tried same as you and couldn´t made it work.

I made it before in other house with a Linksys 1900ACS and it still working, i made a guide in spanish in my blog https://blog.crstian.me/post/2020-05-03-cambiar-router-pepephone/

Thanks for you reply! I had actually seen your blog post before. Please let me know if you finally manage (and how), I will post here if I get it to work.

I have managed to make it work. Searching the forum I found a ROM in this post that makes VLANs work on the MR8300.

With this ROM I have been able to connect it to VLAN 20 without any problem as in my blog.

Anyway I will make a future post in my blog in English/Spanish with the solution for these models, and hopefully they will fix the VLANs in the official ROM

2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.