[Solved] Access Bridge Modem

Hi everyone, im newbie here. I bought Zyxel NBG6617 and installed openwrt 19.07 then modem switch bridge mode and disable WiFi/DHCP server but now i cant reach modem ui. First try this guide but there no eth0.2 interface then i learned i need active vlan2 settings unfortunately when i do that only acces via wifi to internet/router. How i can fix that? Sorry my bad english (Please use luci interface for guide)

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 'fdb6:44bb:8575::/48'

config interface 'lan'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option delegate '0'
        option force_link '0'
        option ifname 'eth0'

config interface 'wan'

Openwrt Page

you should add a second vlan, in the second screenshot you posted switch configuration, click add, vlan id 2 and set cpu(eth0) to tagged for both vlan id1 and vlan id 2. lan 1 untagged for vlan2 and lan 2,3,4 untagged for vlan1. lan1 = bridge modem port all other ports are lan.

then your lan will be eth0.1 and your wan eth0.2 bridged with dsl interface

config interface 'lan'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option delegate '0'
        option force_link '0'
        option ifname 'eth0.1'

this is from my modem in bridged mode just an example

config dsl 'dsl'
        option annex 'b'
        option xfer_mode 'ptm'
        option line_mode 'vdsl'
        option ds_snr_offset '-35'
        option tone 'bv'

config interface 'modem'
        option type 'bridge'
        option proto 'none'
        option ifname 'eth0.2 dsl0.100'
        option auto '1'

config device 'modem_dev'
        option name 'eth0.2'
        option macaddr 'edit'

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

config device 'lan_dev'
        option name 'eth0.3'
        option macaddr 'edit'

also check @bill888 https://openwrt.ebilan.co.uk/viewtopic.php?f=7&t=266 section 9.8: VDSL/ADSL Bridge modem.

When i do that my internet connect down and i cant access my router via lan cable. My modem and router(NBG6617) connect lan(modem) to wan(NBG6617) but there is no wan icon for switch

second ss

from https://openwrt.org/toh/zyxel/zyxel_nbg6617#switch_ports_for_vlans

eth1 is “hard wired” to port 5 with vid 2. To get multiple vlans working we need to declare vlan 2 in /etc/config/network containing '0t 5' ports. Then we can e.g. bridge a LAN port to WAN. Note that using eth0.2, eth0.1, won't work. Bridging in vlan setup is sufficient.

Example: LAN 4 bridged to WAN

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

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

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

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

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

edit: you should edit file manually not from luci according to wiki sorry

This is my network config

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 'fdb6:44bb:8575::/48'

config interface 'lan'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option delegate '0'
        option force_link '0'
        option ifname 'eth0'

config interface 'wan'
option proto 'pppoe'
        option password 'xxx'
        option ipv6 'auto'
        option username 'xxx'
        option ifname 'eth1'

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

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

How should change?

just the last part

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

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

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

okey just change like that, there is diffrence like first situation, now i have internet and access router but i cant see modem ip in ui

what is connect to this on lan1 and lan2 (your screenshot)? you wanted 2 vlans but you are not actually using lan4 port which is the vlan we created.. i'm kinda lost atm :wink:

lan1 my laptop, lan2 raspberry pi

i dont use lan4 because my modem and router connect wan port

try to connect modem to lan4 just a test.. if it does not work i'm lost!

edit: modem lan ip?

edit2: you are just missing and interface with same ip of modem on your device vlan 2, put new interface in wan firewall zone. was all in your link in first post and openwrt wiki

edit3: i need sleep let us know..

Well i tried that but i have bridge wan interfaces like this

Because i cant reach internet then add another interfaces for lan4 maybe i think give ip adress like first

first ss

second ss

I tried first guide but didnt fix that

You don't need a vlan2.
You can follow the official guide and use for physical interface eth1.

Sorry for late reply

When i do via ssh my internet connection broke and i cant reach my router then i did reset my router. I cant via luci beacuse my ui diffrent

Post here the configuration that you used.

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 'fdbc:b715:08bd::/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'

config interface 'wan'
        option ifname 'eth1'
        option proto 'pppoe'
option password 'xxx'
        option ipv6 'auto'
        option username 'xxx'

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'

And where is the interface to access the modem?

Identify the IP address needed to log into the modem, that is the one that the modem holds for http / TCP connections outside the public IP and pppoE protocol. For cable modems it is usually 192.168.100.1, for DSL it can be others typically 192.168.0.1

If this IP overlaps and conflicts with your LAN you will need to change one of them.

Once that is sorted, create a dummy interface to reach the modem as described in the "WAN via PPPoE" section of the guide that @trendy linked. It needs a static IP and netmask that covers the modem's adminstration network but is not the same (e.g. 192.168.0.2, netmask 255.255.255.0). As the guide describes, place this network in the wan firewall zone because you don't want to trust the modem, you will only make outgoing connections to it.

My modem main ip is 192.168.1.1
I turned my modem into the bridge mode and turned off the dhcp server option
After that i connected my modem from lan port to my router wan port
When i installed openwrt to my router my router converted my main access ip for my router to 192.168.1.1(same main ip as my modem)
When i'm trying to add interfaces and connect it to eth1 it breaks my internet connection