How te set vlan to 100 on wan?

Hi everyone,
I got OpenWrt on my router and my ISP is going to change this evening (going to Delta). I've got a fiber connection and the modem/router i got from my isp has some limitations. So i bought a new modem that only functions as a bridge (Nokia XS-010X-Q).
Now i've read on a forumpost about using own modems for my specific ISP (Delta) that says the following:

If you are going to use your own modem, your router must have the option to tag the VLAN on the internet (WAN) side. Cheaper routers in particular do not support this, so check this first before you go down the route of purchasing your own modem. Or of course you can replace your router.

Now i googled a lot but i can't seem to find the exact info i need. I did find an ISP list on the openwrt wiki but my isp isnt listed.

Is there anyone in here who can inform me on how to achieve this?

e.g. if your WAN interface is wan, change to wan.100

config interface 'wan'
        option proto 'dhcp'
#...

        option device 'wan.100' #<----HERE
3 Likes

Step1:
Luci/Network/Interfaces/Devices
Create 1Q vlan 100 using current WAN port as base device, remember auto-generated name like wan.100
Step2:
Luci/Network/Interfaces/Interfaces
Change WAN and WAN6 physical devices to that remembered device.
Step3:
use network diagnostics in OpenWRT, or plainly browse anything drom a client.

3 Likes

I didn't ever bother to create te device in the device section and just typed wan.2 into the device in the connection part.

I guess the important bit is if you're using something in bridge mode that it will actually pass the vlans correctly.

Anyway to give a pictorial luci example to add to brada4's point.
In my example i'm on PPP but the important bit is device selection and the creation of the 802.1q device under devices. The names are arbitrary but the important bit is the vlan id being 100 in your case, whilst in mine it's 2.



2024-10-29-091219_599x299_scrot

1 Like

Thanks everyone for the information and screenshots! My modem / bridge still needs to be assigned by my ISP. But i assume i can connect it this evening.
Only then i can try to get these settings working on my router :slight_smile:

1 Like

Can you elaborate on the "assigned by my ISP"?
As in they are expecting the mac address of the modem/bridge?
Or something else?

Yes, that's what i mean. Had to send MAC, s/n, pon id etc to them so they can register it. Only after its registered i can properly use it.

Cool!

Are they also expecting that MAC on the other end of the bridge? (i.e. from your router?)

You mentioned that you were going to put your "modem" in bridge mode?

Previously when I've given a device (not with PON though....) mac address to ISP that was also the required mac address they wanted to assign the IP address by DHCP....

Its a Nokia ZS-010X-R. Its a bridge by itself but also acts like a sort of modem? Im not sure what the technical term is. But i had to give them the mentioned info to register it.
They have no info about my router, they would not need that either. But everything on static ip adresses and port forwarding is already on my router so im glad i don't have to set everything back up again.

1 Like

Now, im trying this out for like 3 hours now. It wont work.
I added a new device in network / interface / decices
Based it on the current wan port being "switch port wan". Let everything else blank (or grey) as it is (i think it's empty or default?).
Then changed on both wan and wan6 the device to the vlan i made. But after save & apply nothing works. No rx packets, only tx packets.

Also tried evs's style by not creating devices first. It also auto created a device with vlan and the same, grey, settings. But it gives me the same results.
Using diagnostics only give me bad address messages.
Also tried it with setting my firmeare back to default settings but it gave the same result. So it's back to the backed up settings again.

Can anyone tell me what the hell im doing wrong here?

2 Likes

Let's look at your config in text format.

Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have:

ubus call system board
cat /etc/config/network
1 Like

Here it is.I also see theres still a wireguard thing left behind even after uninstalling that part of software tho.

root@OpenWrt:~# ubus call system board
{
        "kernel": "5.10.146",
        "hostname": "OpenWrt",
        "system": "ARMv7 Processor rev 1 (v7l)",
        "model": "Linksys WRT3200ACM",
        "board_name": "linksys,wrt3200acm",
        "rootfs_type": "squashfs",
        "release": {
                "distribution": "OpenWrt",
                "version": "22.03.2",
                "revision": "r19803-9a599fee93",
                "target": "mvebu/cortexa9",
                "description": "OpenWrt 22.03.2 r19803-9a599fee93"
        }
}
root@OpenWrt:~# cat /etc/config/network

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

config globals 'globals'
        option ula_prefix 'fd0d:3945:4b10::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'lan1'
        list ports 'lan2'
        list ports 'lan3'
        list ports 'lan4'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'
        list dns '192.168.1.105'

config device
        option name 'wan'
        option macaddr 'ea:9f:80:1a:3f:d0'

config interface 'wan'
        option proto 'dhcp'
        option peerdns '0'
        list dns '192.168.1.105'
        option device 'wan.100'

config interface 'wan6'
        option proto 'dhcpv6'
        option reqaddress 'try'
        option reqprefix 'auto'
        option device 'wan.100'

config wireguard_wg0
        option description 'Daan'
        option public_key '*****************************='
        option private_key '*****************************='
        option persistent_keepalive '25'
        list allowed_ips '0.0.0.0/0'
        list allowed_ips '::/0'
        option endpoint_host '192.168.1.106'

config device
        option type '8021q'
        option ifname 'wan'
        option vid '100'
        option name 'wan.100'

This version is EOL and unsupported now. You should upgrade to 23.05. You can use this opportunity to reset to defaults to ensure you're working with a clean slate.

The 802.1q stanza is not necessary.

This should be correct.

Thank you for the quick reply. I dont really get what you mean by this 802.1q stanza that is not necessary? How do i get rid of that?
Going back to default settings would be a last try for me because i would really like to keep my settings the way they are since it costed me a lot of time and trouble to set it up.
I see a update for my model: 23.05.5. Ill update it.

The underlying .1q device will be created automatically when you use wan.100, so you do not need to create this separate stanza.

If you created it in the devices page in LuCI, you should be able to delete it from there. I personally would just edit the config file directly as a means of removing those lines.

Based on your current network config file, it doesn't look like it should take much time to recreate.

Maybe things are different in the other config files?? (mainly the dhcp, firewall, and wireless files -- we can review those if you'd like).

Thank you. I followed your steps again and only set wan to wan.100 (without doing anything to wan6).
Here's the results from the ssh commands (left the wireguard thing out of this):

root@OpenWrt:~# ubus call system board
{
        "kernel": "5.15.167",
        "hostname": "OpenWrt",
        "system": "ARMv7 Processor rev 1 (v7l)",
        "model": "Linksys WRT3200ACM",
        "board_name": "linksys,wrt3200acm",
        "rootfs_type": "squashfs",
        "release": {
                "distribution": "OpenWrt",
                "version": "23.05.5",
                "revision": "r24106-10cc5fcd00",
                "target": "mvebu/cortexa9",
                "description": "OpenWrt 23.05.5 r24106-10cc5fcd00"
        }
}
root@OpenWrt:~# cat /etc/config/network

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

config globals 'globals'
        option ula_prefix 'fd0d:3945:4b10::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'lan1'
        list ports 'lan2'
        list ports 'lan3'
        list ports 'lan4'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'
        list dns '192.168.1.105'

config device
        option name 'wan'
        option macaddr 'ea:9f:80:1a:3f:d0'

config interface 'wan'
        option proto 'dhcp'
        option peerdns '0'
        list dns '192.168.1.105'
        option device 'wan.100'

config interface 'wan6'
        option proto 'dhcpv6'
        option reqaddress 'try'
        option reqprefix 'auto'
        option device 'wan'

Does the wan get an address?

ifstatus wan | grep address

It does nothing?

What is upstream of your router (connected to the wan port)?

How do i see / check that?