OpenWrt with ISP VDSL modem in bridge mode

I previously had my OpenWRT router working with my ISP's modem in bridge mode, which was a old Baudtec model using ADSL and ipv4 only. I was having problems with it when they switched on CGNAT and I no longer had a public IP address to work with. A lot of my VPN stuff broke, I constantly got site verification prompts everywhere I went: in short a nightmare. I hassled them for a few months and eventually they broke down and dropped a new VDSL2 dual-stack ipv4 and ipv6 modem on me. But they wouldn't tell me the password to log in. Every time I signed their disclaimer, they lost it, and asked me to fill in another! Anyway, long story short, I finally got admin access to the new modem, and want to put it into bridge mode, and use my OpenWRT router for wifi duties.

I thought it was going to be straightforward, but I can't quite crack it. I reset the ISP modem, and watched it connect OK via VDSL. Both stacks were working. I disabled wifi, LAN DHCP, and then changed the WAN interface from IPoE to Bridge. After a reboot, I plugged in the OpenWRT router and proceeded to do battle.

I gather from researching around that IPoE is basically just standard DHCP on OpenWRT. I enabled that on both the IPv4 and IPv6 interfaces, but it didn't connect. (I was able to log into the router still to check that the DSL was connected).

So now I'm a bit stuck. I notice that the WAN interface on the ISP modem has its VLAN set to 100, but I'm not quite sure how to set that in OpenWRT. I'm also considering the possibility that the ISP has registered my MAC address at their end, and I have changed that in the WAN interface settings, but it doesn't seem to have made a difference.

Any suggestions on how to proceed from here? I'll take a screengrab of the ISP router settings in case that gives any info.

You can change that easily. If you are familiar with vi, you can edit the /etc/config/network and change the ifname of wan interface from the default value to append .100, e.g eth0 -> eth0.100
Otherwise in Luci edit wan interface, go to Physical Settings tab, click the drop down list and at the bottom type the interface name with .100 suffix, then press Enter, save and apply.

Thanks for the pointer. I just tried that, with great expectations, but it didn't really change anything. Still no IP appearing on the WAN interfaces.
I also tried changing the interface setting through Switch settings. WAN was bound to eth0.2, so I just changed that to eth0.100 and both interfaces updated to use the new name. But still no joy.

Does the fact that its using PTM make any difference instead of ATM? Any more information I can provide? Will continue to look around the interwebs. My configuration sessions are limited to early morning, as I'm not allowed to disrupt the internet while my girlfriend is awake! :slight_smile:

If the wan interface is already with a vlan subinterface, then the procedure is different. You'll need to create the vlan100 under Network/Switch in Luci or make a copy of the switch configuration for vlan2 in /etc/config/network and paste it as vlan 100, tagging the frames on both CPU and WAN port.

OK, so I just wiped the router, and did a re-install of the latest OpenWRT image. I figured I'd start fresh. It is currently piggybacked onto the ISP's device which is running in normal mode, just so I could get it set up. (i.e. the WAN interfaces of the OpenWRT router currently have a private IP from DHCP on the ISPs device. Double NAT. Or even triple now! Anyway, its working.

In the interfaces page, I have LAN (br-lan), WAN (eth0.2), WAN6 (eth0.2) listed. They've done their duty and got me IP addresses from ISP's router.

In the Switch page, I'm seeing this:

So what you're saying is, use the Add VLAN button to create another VLAN ID=100, and then repeat the "tagged, off, off, off, off, untagged" line in the boxes next to it. And then I go back to the Interfaces, and select the new vlan for WAN and WAN6, replacing eth0.2 ?

The WAN port should be tagged on vlan100. Other than that, you are correct.

OK, I've tried this a few times now, and I can't get it to work. The WAN interfaces on openwrt just don't ever seem to go up, and get an IP address. Any other suggestions, or any other information I can provide? Any logs of interest I can furnish next time I try?

Let's see how is it configured: uci export network

OK. I'm back. :slight_smile:
So just to recap, after setting up the Wifi and Lan, I'm left with a wan and a wan6 interface.
I went into Switch. There are two VLANs set up, and I added a third, with VLAN id 100.

Then in the Interfaces page, both the wan and wan6 are assigned to eth0:2, so I edit the interface and change to the new vlan I just set up, eth0:100:


And after the edit they look like this

And at this point, the network config, commandline style, looks like this.

OpenWrt 19.07.2, r10947-65030d81f3
 -----------------------------------------------------
~# uci export network
package network

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 'fd73:481c:8970::/48'

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

config device 'lan_eth0_1_dev'
	option name 'eth0.1'
	option macaddr '54:36:9b:4b:50:46'

config interface 'wan'
	option proto 'dhcp'
	option ifname 'eth0.100'

config device 'wan_eth0_2_dev'
	option name 'eth0.2'
	option macaddr '54:36:9b:4b:50:47'

config interface 'wan6'
	option proto 'dhcpv6'
	option ifname 'eth0.100'
	option reqaddress 'try'
	option reqprefix 'auto'

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

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

config switch_vlan
	option device 'switch0'
	option vlan '2'
	option ports '6t 4'
	option vid '2'

config switch_vlan
	option device 'switch0'
	option vlan '3'
	option ports '6t 4t'
	option vid '100'

I can confirm that the WAN port of the router is connected to a LAN port on the modem/router. Looking at the modem/router, I can see that the DSL has negotiated correctly and there is a connection.

If the modem in bridge mode is still encapsulating the frames to vlan100 then you don't need to add tagging on the wan port.
Other than that you can add an entry for the mac address of the eth0.100

config device 'wan_eth0_100_dev'
	option name 'eth0.100'
	option macaddr '54:36:9b:4b:50:48'

OK, I tried all the vlan tagging settings for VLAN ID 100. Nothing worked.
I tried adding a mac address in the network config (I hate vi). No difference.
I tried going back to the original settings, and just renaming vlan ID 2 to ID 100. No difference.
I wiped out all the modem settings and tried to set it up using the Wizard. No good.
I disabled the IPV6 WAN interface to see if I could get IPV4 going on its own. Nope.
I tried setting the MAC address of the WAN interface to the same as the ISPs modem. No good.
I tried randomly activating and deactivating all the settings I could see in the wan interface page. Getting desperate.
I think I'm out of options now. I've spent maybe ten hours on it and it all seems a bit futile. I think I'll have to live with my ISPs modem, just rebooting it every 6 hours.
Thanks for trying.