Help configuring ISP VLAN

Hi,

I'm trying to configure my OpenWRT Asus AC58U router with my new ISP. On their forums they say that it is only needed to turn the ONT mode on on the ISP router, connect my own router WAN port to the LAN 4 port of the ISP router and then configure VLAN 832 in DHCP mode and it should work.

My current /etc/config/netwrok is:


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 '****'

config interface 'lan'
	option type 'bridge'
	option ifname 'eth0'
	option proto 'static'
	option ipaddr '192.168.1.1'
	option netmask '255.255.255.0'
	option ip6assign '60'

config device 'lan_eth0_dev'
	option name 'eth0'
	option macaddr '*****'

config interface 'wan'
	option proto 'dhcp'
	list dns '1.1.1.1'
	list dns '1.0.0.1'
	option peerdns '0'
	option ifname 'eth1.832'

config device 'wan_eth1_dev'
	option name 'eth1'
	option macaddr '***'

config interface 'wan6'
	option proto 'dhcpv6'
	option reqaddress 'try'
	option reqprefix 'auto'
	option ifname 'eth1.832'

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

config switch_vlan
	option device 'switch0'
	option vlan '832'
	option ports '5t 0t'

According to my device page, switch ports are:

5 -> WAN
1 to 4 -> LAN
0 -> eth0 and LAN?

EDIT: sorry, I posted before ending. Some things were missing:

Right now I don't have internet acces on my router and I can see in the Interface page of LUCi that WAN interfaces are sending packages (TX) but not receiving anything (RX). I'm pretty sure I'm messing something up with the switch VLANs but don't know what.

@blinki, welcome to the community!

So does this mean it's working?

You never actually state the problem, nor what you need help configuring. Disregard, I see the edit.

The switch config part looks incomplete. Did you edit it yourself with some editor or did you use the Luci switch page?
How was it by default?
If the eth1 interface was not attached to some CPU, then you should not create the interface in switch vlan config. The ifname eth1.832 would be enough.

You have an IPQ4018 chip which is known for some strangeness with VLANS, though much of it may have been fixed by now.

In any case the config you posted is not going to work. Start with a default configuration and make the following changes:

  • Change the VLAN number associated with the WAN port from its default (usually 2) to 832.
  • Make the WAN port (5) on the switch tagged instead of untagged.
  • Change the ifname associated with the WAN network from ethX.2 to ethX.832.

So I started again and tried a few things and now seems that WAN interfaces are receiving a few packages but still don't have internet connection. The current configuration is:

config interface 'wan'
	option ifname 'eth1'
	option proto 'dhcp'

config device 'wan_eth1_dev'
	option name 'eth1'
	option macaddr '******'

config interface 'wan6'
	option ifname 'eth1'
	option proto 'dhcpv6'

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

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

config switch_wan_vlan
	option device 'switch0'
	option vlan '832'
	option ports '5t 0'

I've only added the switch_wan_vlan part to the default configuration.

Where is the lan interface?

Remove it.

How is the default network configuration? After reset, before changing anything.

1 Like

I omitted it because I didn't change anything of the lan part.

This is the full default config without touching anything:


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 'fd19:4efe:a819::/48'

config interface 'lan'
	option type 'bridge'
	option ifname 'eth0'
	option proto 'static'
	option ipaddr '192.168.1.1'
	option netmask '255.255.255.0'
	option ip6assign '60'

config device 'lan_eth0_dev'
	option name 'eth0'
	option macaddr '********'

config interface 'wan'
	option ifname 'eth1'
	option proto 'dhcp'

config device 'wan_eth1_dev'
	option name 'eth1'
	option macaddr '********'

config interface 'wan6'
	option ifname 'eth1'
	option proto 'dhcpv6'

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

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

Apply only the following changes, either by Luci, uci, or directly editing the network file.

That config didn't work. Furthermore, it appears that interface eth1 does not receive packages, only sends.

Check that you really need VLAN 832 and not another one, and also check that you really need DHCP and not PPPoE.

If you tell us ISP and country, that would help.

1 Like

My ISP is brand new in FTTH, it's a virtual operator from Spain called Simyo and it uses the same network and router than Orange. Furthermore, I've received an answer from their support and they gave me the exact same data needed for Orange, the same that I've already post at the first comment.

I tried to reset the router and change only these parameters and nothing works. WAN interfaces are not receiving any package.

If it helps, I know that they are using CG-NAT for assigning IPv4.

You have to send 832 through the switch as well. And read up on the IPQ4018 chip. It's a special case. What I have heard its switch configuration is not completely straightforward though I don't own one or know the details.

Post the messages generated byt your router when you activate that connection.

Even if your provider is Simyo (a brand from Orange), the fibre endpoint could be rented from Movistar (also called "NEBA network"). In that case, you do not need PPPoE on VLAN 832, but IPoE (a plain DHCP client) on VLAN 20.

Tried both eth1.832 and eth1.20 interfaces and always getting the same messages:

Sat May 16 19:14:50 2020 daemon.notice netifd: wan (1634): udhcpc: received SIGTERM
Sat May 16 19:14:50 2020 daemon.notice netifd: Interface 'wan6' is now down
Sat May 16 19:14:50 2020 daemon.notice netifd: Interface 'wan6' has link connectivity loss
Sat May 16 19:14:50 2020 daemon.notice netifd: VLAN 'eth1.20' link is up
Sat May 16 19:14:50 2020 daemon.notice netifd: Interface 'wan6' has link connectivity
Sat May 16 19:14:50 2020 daemon.notice netifd: Interface 'wan6' is setting up now
Sat May 16 19:14:50 2020 daemon.notice netifd: Interface 'wan' is now down
Sat May 16 19:14:50 2020 daemon.notice netifd: Interface 'wan' is disabled
Sat May 16 19:14:50 2020 daemon.notice netifd: Interface 'wan' has link connectivity loss
Sat May 16 19:14:50 2020 daemon.notice netifd: Interface 'wan' is enabled
Sat May 16 19:14:50 2020 daemon.notice netifd: Interface 'wan' has link connectivity
Sat May 16 19:14:50 2020 daemon.notice netifd: Interface 'wan' is setting up now
Sat May 16 19:14:50 2020 daemon.notice netifd: wan6 (1692): Command failed: Permission denied
Sat May 16 19:14:50 2020 daemon.notice netifd: Interface 'wan6' is now down
Sat May 16 19:14:50 2020 daemon.notice netifd: Interface 'wan6' is setting up now
Sat May 16 19:14:50 2020 daemon.notice netifd: wan (1787): udhcpc: started, v1.30.1
Sat May 16 19:14:50 2020 daemon.err odhcp6c[1817]: Failed to send RS (Address not available)
Sat May 16 19:14:50 2020 daemon.notice netifd: wan (1787): udhcpc: sending discover
Sat May 16 19:14:51 2020 daemon.err odhcp6c[1817]: Failed to send DHCPV6 message to ff02::1:2 (Address not available)
Sat May 16 19:14:54 2020 daemon.notice netifd: wan (1787): udhcpc: sending discover
Sat May 16 19:14:57 2020 daemon.notice netifd: wan (1787): udhcpc: sending discover

DHCP sends discover but no more.

Activate logging on PPPoE, and try again.

Connect a PC running Wireshark to the WAN port to confirm that the DHCP request packets are actually leaving the router, and tagged with the VLAN.

I think this requires an OS other than Windows because the Windows Ethernet drivers do not process VLANs.

Do you mean with option pppd_options 'debug' on the wan interfaces? I tried that but no new messages.

Edit: furthermore, looking at the solution from [solved] VLANs on ipq40xx alternative config (for Fritzbox 4040) I wonder if I need something more in the switch configuration.

DHCP packets are being sent, but I don't see any VLAN tag inside them. Using vlan.id==832 as filter does not display any packet.

After some trial and error and monitoring packages with wireshark, finally managed to make the router send the DHCP packages correctly tagged. The final configuration resulted in only adding option vid 832 to the config in the first post. These are the changes I made in comparison with the default configuration:

config interface 'wan'
	option ifname 'eth1.832'
	option proto 'dhcp'

config interface 'wan6'
	option ifname 'eth1.832'
	option proto 'dhcpv6'

And add:

config switch_vlan
	option device 'switch0'
	option vlan '20'
	option vid '832'
	option ports '0t 5t'

At the beggining I though that vlan option have to be the name ID you want to connect to, but then I realised that it is only the "name" that you give to it. The field that matters is option vid '832'.

1 Like

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