Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(really) Disable the VLAN Tagging on DGA #853

Closed
Nisbo opened this issue Oct 20, 2019 · 37 comments
Closed

(really) Disable the VLAN Tagging on DGA #853

Nisbo opened this issue Oct 20, 2019 · 37 comments

Comments

@Nisbo
Copy link

Nisbo commented Oct 20, 2019

Hello,

looks like VLAN tagging is not complete disabled if I uncheck the checkbox in the GUI

I am not sure if this is a problem with the GUI or with the openwrt related system so I already ask in the openwrt forum:
https://forum.openwrt.org/t/full-bridge-mode-on-technicolor-dga-4132-pppoe-not-working-vlan-issue/46817

below you can find a copy of my question

Hello,

maybe its not 100% related to OpenWrt because as far as I know there is a slightly different version running on Technicolor DGA 4132 but I am new so maybe I am wrong.

This is a copy and paste from my question in an other forum

###########

Hello from Germany,

yesterday I got my DGA4132, was already rooted.
Today I updated the GUI to the latest stable version 9.4.70-184d06d3

Configuration:
DGA 4132 - Port DSL --> Internet
DGA 4132 - Port LAN 1 (eth0) --> WAN 1 to my Router (UniFi USG PRO 4)
DGA 4132 - Port LAN 2 (eth1) --> UniFi Switch (to access the GUI) <-- from my Router (UniFi USG PRO 4)
DGA 4132 - Port LAN 3 (eth2) --> not connected
DGA 4132 - Port ETH/LAN (eth3) --> There is nothing plugged in to to ETH/WAN Port on the right side and this port is configured as LAN port

I have a VDSL 250 (Profile 35b) contract by the German Telekom
The Telekom is using VLAN 7 and is also providing IPTV (Multicast IGMPv3)

Because the DGA is in Bridge Mode there should be no other conflicting options (like IGMP proxy) except the VLAN Tagging.

Regarding the recommendations in the German Onlinkosten forum I shall enable VLAN 7 tagging on the DGA and disable it on the USG (Router)
I tried it with both options for Notation: Device and Dot and did also a restart of the network

/etc/init.d/network restart

without success

After this I disabled VLAN 7 Tagging on the DGA and enabled it on the USG (router)
in this case I was not able to establish a PPPoE connection.

I disabled VLAN 7 tagging again on the USG (router) so that VLAN tagging was disabled on both devices.
IPTV was still not running but this was expected but I still had an Internet connection and this is normally not expected with a German Telekom VDSL connection.

This is how my etc/config/network looks like with "Using VLAN 7 Device"

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 'none'
	option default_ps '0'

config device 'waneth4'
	option type '8021q'
	option name 'waneth4'
	option macaddr 'A4:91:B1:D1:13:D4'
	option ifname 'eth4'
	option vid '835'
	option ipv6 '0'

config device 'wanptm0'
	option type '8021q'
	option name 'wanptm0'
	option macaddr 'A4:91:B1:D1:13:D4'
	option vid '7'
	option ipv6 '0'
	option ifname 'ptm0'

config interface 'wan'
	option proto 'bridge'
	option demand '0'
	option macaddr 'A4:91:B1:D1:13:D4'
	option keepalive_adaptive '0'
	option auto '1'
	option enabled '1'
	option password 'password'
	option ifname 'wanptm0'

config config 'config'
	option wan_mode 'bridge'

config interface 'wwan'
	option auto '1'
	option proto 'mobiled'
	option session_id '0'
	option profile '1'
	option enabled '0'

config interface 'wan6'
	option proto 'dhcpv6'
	option reqopts '12 21 22 23 24 25 31 56 64 67 82 83'
	option noslaaconly '1'
	option iface_464xlat '0'
	option auto '0'
	option dns_metric '20'
	option ifname '@wan_ipv6'
	option enabled '0'

config interface 'lan'
	option type 'bridge'
	option proto 'static'
	option netmask '255.255.255.0'
	option ip6assign '64'
	option force_link '0'
	option ipv6 '0'
	option ipaddr '192.168.178.3'
	list ifname 'eth0'
	list ifname 'eth1'
	list ifname 'eth2'
	list ifname 'eth3'
	list ifname 'eth5'
	list ifname 'ptm0.7'
	list pppoerelay ''
	list pppoerelay ''

config switch 'bcmsw'
	option reset '1'
	option enable_vlan '0'
	option qosimppauseenable '0'
	option jumbo '0'

config interface 'wlnet_b_24'
	option proto 'static'
	option ip6assign '64'
	option ipv6 '0'
	option ip6hint '1'
	option netmask '255.255.255.128'
	option ipaddr '192.168.168.1'
	option ifname 'wl0_1'
	option force_link '0'
	option name 'Ospiti-TIM-30479317'
	option enabled '0'

config interface 'wlnet_b_5'
	option proto 'static'
	option ip6assign '64'
	option ipv6 '0'
	option ip6hint '2'
	option netmask '255.255.255.128'
	option ipaddr '192.168.168.129'
	option ifname 'wl1_1'
	option force_link '0'
	option name 'Ospiti-TIM-30479317'
	option enabled '0'

config device 'wlnet_b_5eth5'
	option type '8021q'
	option name 'wl1_1'
	option ifname 'eth5'
	option vid '3'
	option ipv6 '0'
	option enabled '0'

config interface 'ipoe'
	option proto 'dhcp'
	option metric '1'
	option reqopts '1 3 6 43 51 58 59'
	option release '1'
	option neighreachabletime '1200000'
	option neighgcstaletime '2400'
	option ipv6 '1'

Using VLAN 7 Dot


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 'none'
	option default_ps '0'

config device 'waneth4'
	option type '8021q'
	option name 'waneth4'
	option macaddr 'A4:91:B1:D1:13:D4'
	option ifname 'eth4'
	option vid '835'
	option ipv6 '0'

config device 'wanptm0'
	option type '8021q'
	option name 'wanptm0'
	option macaddr 'A4:91:B1:D1:13:D4'
	option vid '7'
	option ipv6 '0'

config interface 'wan'
	option proto 'bridge'
	option demand '0'
	option macaddr 'A4:91:B1:D1:13:D4'
	option keepalive_adaptive '0'
	option auto '1'
	option enabled '1'
	option password 'password'
	option ifname 'ptm0.7'

config config 'config'
	option wan_mode 'bridge'

config interface 'wwan'
	option auto '1'
	option proto 'mobiled'
	option session_id '0'
	option profile '1'
	option enabled '0'

config interface 'wan6'
	option proto 'dhcpv6'
	option reqopts '12 21 22 23 24 25 31 56 64 67 82 83'
	option noslaaconly '1'
	option iface_464xlat '0'
	option auto '0'
	option dns_metric '20'
	option ifname '@wan_ipv6'
	option enabled '0'

config interface 'lan'
	option type 'bridge'
	option proto 'static'
	option netmask '255.255.255.0'
	option ip6assign '64'
	option force_link '0'
	option ipv6 '0'
	option ipaddr '192.168.178.3'
	list ifname 'eth0'
	list ifname 'eth1'
	list ifname 'eth2'
	list ifname 'eth3'
	list ifname 'eth5'
	list ifname 'ptm0.7'
	list pppoerelay ''
	list pppoerelay ''

config switch 'bcmsw'
	option reset '1'
	option enable_vlan '0'
	option qosimppauseenable '0'
	option jumbo '0'

config interface 'wlnet_b_24'
	option proto 'static'
	option ip6assign '64'
	option ipv6 '0'
	option ip6hint '1'
	option netmask '255.255.255.128'
	option ipaddr '192.168.168.1'
	option ifname 'wl0_1'
	option force_link '0'
	option name 'Ospiti-TIM-30479317'
	option enabled '0'

config interface 'wlnet_b_5'
	option proto 'static'
	option ip6assign '64'
	option ipv6 '0'
	option ip6hint '2'
	option netmask '255.255.255.128'
	option ipaddr '192.168.168.129'
	option ifname 'wl1_1'
	option force_link '0'
	option name 'Ospiti-TIM-30479317'
	option enabled '0'

config device 'wlnet_b_5eth5'
	option type '8021q'
	option name 'wl1_1'
	option ifname 'eth5'
	option vid '3'
	option ipv6 '0'
	option enabled '0'

config interface 'ipoe'
	option proto 'dhcp'
	option metric '1'
	option reqopts '1 3 6 43 51 58 59'
	option release '1'
	option neighreachabletime '1200000'
	option neighgcstaletime '2400'
	option ipv6 '1'

VLAN disabled on the DGA

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 'none'
	option default_ps '0'

config device 'waneth4'
	option type '8021q'
	option name 'waneth4'
	option macaddr 'A4:91:B1:D1:13:D4'
	option ifname 'eth4'
	option vid '835'
	option ipv6 '0'

config device 'wanptm0'
	option type '8021q'
	option name 'wanptm0'
	option macaddr 'A4:91:B1:D1:13:D4'
	option vid '7'
	option ipv6 '0'

config interface 'wan'
	option proto 'bridge'
	option demand '0'
	option macaddr 'A4:91:B1:D1:13:D4'
	option keepalive_adaptive '0'
	option auto '1'
	option enabled '1'
	option password 'password'
	option ifname 'ptm0'

config config 'config'
	option wan_mode 'bridge'

config interface 'wwan'
	option auto '1'
	option proto 'mobiled'
	option session_id '0'
	option profile '1'
	option enabled '0'

config interface 'wan6'
	option proto 'dhcpv6'
	option reqopts '12 21 22 23 24 25 31 56 64 67 82 83'
	option noslaaconly '1'
	option iface_464xlat '0'
	option auto '0'
	option dns_metric '20'
	option ifname '@wan_ipv6'
	option enabled '0'

config interface 'lan'
	option type 'bridge'
	option proto 'static'
	option netmask '255.255.255.0'
	option ip6assign '64'
	option force_link '0'
	option ipv6 '0'
	option ipaddr '192.168.178.3'
	list ifname 'eth0'
	list ifname 'eth1'
	list ifname 'eth2'
	list ifname 'eth3'
	list ifname 'eth5'
	list ifname 'ptm0.7'
	list pppoerelay ''
	list pppoerelay ''

config switch 'bcmsw'
	option reset '1'
	option enable_vlan '0'
	option qosimppauseenable '0'
	option jumbo '0'

config interface 'wlnet_b_24'
	option proto 'static'
	option ip6assign '64'
	option ipv6 '0'
	option ip6hint '1'
	option netmask '255.255.255.128'
	option ipaddr '192.168.168.1'
	option ifname 'wl0_1'
	option force_link '0'
	option name 'Ospiti-TIM-30479317'
	option enabled '0'

config interface 'wlnet_b_5'
	option proto 'static'
	option ip6assign '64'
	option ipv6 '0'
	option ip6hint '2'
	option netmask '255.255.255.128'
	option ipaddr '192.168.168.129'
	option ifname 'wl1_1'
	option force_link '0'
	option name 'Ospiti-TIM-30479317'
	option enabled '0'

config device 'wlnet_b_5eth5'
	option type '8021q'
	option name 'wl1_1'
	option ifname 'eth5'
	option vid '3'
	option ipv6 '0'
	option enabled '0'

config interface 'ipoe'
	option proto 'dhcp'
	option metric '1'
	option reqopts '1 3 6 43 51 58 59'
	option release '1'
	option neighreachabletime '1200000'
	option neighgcstaletime '2400'
	option ipv6 '1'

Before I was using a "Speedport Smart 3" in Modem/Bridge Mode (there were no options for configuration) and the USG (router) was doing the VLAN 7 tagging.
This was working without problems so my favourite solution would be that the DGA is working like the old Modem ^^
So the configuration on the USG side should be fine because it was running before.

Any ideas ? Please keep in mind that I am new to DGA 😉

EDIT:

ifconfig with disabled VLAN 7 tagging on DGA

root@modemtim:~# ifconfig
bcmsw     Link encap:Ethernet  HWaddr A4:91:B1:D1:13:D4
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:425422 errors:0 dropped:0 overruns:0 frame:0
          TX packets:490999 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:87473641 (83.4 MiB)  TX bytes:200745677 (191.4 MiB)
          Base address:0xffff

br-lan    Link encap:Ethernet  HWaddr A4:91:B1:D1:13:D4
          inet addr:192.168.178.3  Bcast:192.168.178.255  Mask:255.255.255.0
          UP BROADCAST RUNNING ALLMULTI MULTICAST  MTU:1500  Metric:1
          RX packets:2015 errors:0 dropped:80 overruns:0 frame:0
          TX packets:760 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:501951 (490.1 KiB)  TX bytes:510009 (498.0 KiB)

eth0      Link encap:Ethernet  HWaddr A4:91:B1:D1:13:D4
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:317837 errors:0 dropped:0 overruns:0 frame:0
          TX packets:584946 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:50278620 (47.9 MiB)  TX bytes:324279254 (309.2 MiB)


eth1      Link encap:Ethernet  HWaddr A4:91:B1:D1:13:D4
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:207221 errors:0 dropped:326 overruns:0 frame:0
          TX packets:82057 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:56215275 (53.6 MiB)  TX bytes:61656904 (58.7 MiB)


eth2      Link encap:Ethernet  HWaddr A4:91:B1:D1:13:D4
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)


eth3      Link encap:Ethernet  HWaddr A4:91:B1:D1:13:D4
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)


eth5      Link encap:Ethernet  HWaddr A4:91:B1:D1:13:D4
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:20006 errors:0 dropped:22 overruns:0 frame:0
          TX packets:159152 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1571387 (1.4 MiB)  TX bytes:54474526 (51.9 MiB)


lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:9866 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9866 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:680100 (664.1 KiB)  TX bytes:680100 (664.1 KiB)

ptm0      Link encap:Ethernet  HWaddr A4:91:B1:D1:13:D4
          inet6 addr: fe80::a691:b1ff:fed1:13d4/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:438950 errors:0 dropped:0 overruns:0 frame:0
          TX packets:937419 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:278003195 (265.1 MiB)  TX bytes:496986619 (473.9 MiB)

ptm0.7    Link encap:Ethernet  HWaddr A4:91:B1:D1:13:D4
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:118 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1620 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:16930 (16.5 KiB)  TX bytes:478501 (467.2 KiB)

but ptm0.7 is still there ?

@Nisbo
Copy link
Author

Nisbo commented Oct 20, 2019

I fixed it :) :) :)

Looks like the GUI did not disable the VLAN tagging correctly

/etc/config/network

in the lan part I replaced
list ifname 'ptm0.7'

with

list ifname 'ptm0'

and removed this line

list pppoerelay ''

lan part of the network config

config interface 'lan'
	option type 'bridge'
	option proto 'static'
	option netmask '255.255.255.0'
	option ip6assign '64'
	option force_link '0'
	option ipv6 '0'
	option ipaddr '192.168.178.3'
	list ifname 'eth0'
	list ifname 'eth1'
	list ifname 'eth2'
	list ifname 'eth3'
	list ifname 'eth5'
	list ifname 'ptm0'

on my router I enabled the VLAN 7 tagging

Now MagentaTV IPTV is working :)

@LuKePicci
Copy link
Contributor

  1. Do not use dot notation for VLANs on these devices
  2. Please note that whenever the DGA brings wanptm0 up it starts catching VLAN 7 on its own and you fail to receive tagged packets into your USG since you have a device (wanptm0) configured and enabled on that same vid (7). Your setup is not bringing wanptm0 up because you have no interfaces configured to use it (you have just ptm0 as ifname for wan).
  3. The other alternative, in case you would like the DGA to do VLAN tagging would be this one:
config interface 'lan'
	option type 'bridge'
	option proto 'static'
	option netmask '255.255.255.0'
	option ip6assign '64'
	option force_link '0'
	option ipv6 '0'
	option ipaddr '192.168.178.3'
	list ifname 'eth0'
	list ifname 'eth1'
	list ifname 'eth2'
	list ifname 'eth3'
	list ifname 'eth5'
	list ifname 'wanptm0'
  1. Bridging the modem (ptm0/wanptm0) into lan interface is somehow insecure. If you assume a malicious client connected to the other side of your DSL cable, it can access the same resources you can while you connect to lan port.

@Nisbo
Copy link
Author

Nisbo commented Oct 21, 2019

Hi Luke, thx for your answer :)

  1. it was only for testing / trouble shouting, I already read this in a German forum that we should use Device instead of Dot

  2. I got this network configuration from a recommended forum post and changed only my IP/MAC addresses and all other changes in the 3 posted code parts are changes via the GUI. So looks like something is not correct in the recommended "default configuration"

  3. I think I will maintain my current setup and the USG will do the tagging but thx for the explanation :)

  4. What do you mean with "the other side of the DSL cable" ? Or what do you recommend ? I only followed the instructions (in a German forum) how to setup the modem, dont know if there is a special setup how to wire the modem to the router, the told me put the cable to a LAN port (the yellow ones)
    In general, everything in my flat is no security problem / issue, if bad guys are in my flat I have other problems :D

If you find some time, maybe you can be so kind and have a look to my config for the case that there are any big problems related to a stable connection or to establish a new connection.
If not, it is working and from my side I am happy because it is working :D

the USG shall do the tagging


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 'none'
	option default_ps '0'

config device 'waneth4'
	option type '8021q'
	option name 'waneth4'
	option macaddr 'A4:91:B1:D1:13:D4'
	option ifname 'eth4'
	option vid '835'
	option ipv6 '0'

config device 'wanptm0'
	option type '8021q'
	option name 'wanptm0'
	option macaddr 'A4:91:B1:D1:13:D4'
	option vid '7'
	option ipv6 '0'

config interface 'wan'
	option proto 'bridge'
	option demand '0'
	option macaddr 'A4:91:B1:D1:13:D4'
	option keepalive_adaptive '0'
	option auto '1'
	option enabled '1'
	option password 'password'
	option ifname 'ptm0'

config config 'config'
	option wan_mode 'bridge'

config interface 'wwan'
	option auto '1'
	option proto 'mobiled'
	option session_id '0'
	option profile '1'
	option enabled '0'

config interface 'wan6'
	option proto 'dhcpv6'
	option reqopts '12 21 22 23 24 25 31 56 64 67 82 83'
	option noslaaconly '1'
	option iface_464xlat '0'
	option auto '0'
	option dns_metric '20'
	option ifname '@wan_ipv6'
	option enabled '0'

config interface 'lan'
	option type 'bridge'
	option proto 'static'
	option netmask '255.255.255.0'
	option ip6assign '64'
	option force_link '0'
	option ipv6 '0'
	option ipaddr '192.168.178.3'
	list ifname 'eth0'
	list ifname 'eth1'
	list ifname 'eth2'
	list ifname 'eth3'
	list ifname 'eth5'
	list ifname 'ptm0'

config switch 'bcmsw'
	option reset '1'
	option enable_vlan '0'
	option qosimppauseenable '0'
	option jumbo '0'

config interface 'wlnet_b_24'
	option proto 'static'
	option ip6assign '64'
	option ipv6 '0'
	option ip6hint '1'
	option netmask '255.255.255.128'
	option ipaddr '192.168.168.1'
	option ifname 'wl0_1'
	option force_link '0'
	option name 'Ospiti-TIM-30479317'
	option enabled '0'

config interface 'wlnet_b_5'
	option proto 'static'
	option ip6assign '64'
	option ipv6 '0'
	option ip6hint '2'
	option netmask '255.255.255.128'
	option ipaddr '192.168.168.129'
	option ifname 'wl1_1'
	option force_link '0'
	option name 'Ospiti-TIM-30479317'
	option enabled '0'

config device 'wlnet_b_5eth5'
	option type '8021q'
	option name 'wl1_1'
	option ifname 'eth5'
	option vid '3'
	option ipv6 '0'
	option enabled '0'

config interface 'ipoe'
	option proto 'dhcp'
	option metric '1'
	option reqopts '1 3 6 43 51 58 59'
	option release '1'
	option neighreachabletime '1200000'
	option neighgcstaletime '2400'
	option ipv6 '1'

many thanks in advance :)

@LuKePicci
Copy link
Contributor

LuKePicci commented Oct 21, 2019

  1. The ISP at least, but others may do as well depending on the ISP network configuration. This is something you could not care about but I liked to highlight thatanyway

Use this one, eth0 is added to wan bridge instead of adding modem to lan bridge

config device 'wanptm0'
	option type '8021q'
	option name 'wanptm0'
	#option ifname 'ptm0' #uncomment to handle VLAN on this device
	option macaddr 'A4:91:B1:D1:13:D4'
	option vid '7' # another possible trick to release vlan 7 is to set a different vid here
	option ipv6 '0'

config interface 'wan'
	option type 'bridge'
	option proto 'bridge'
	option demand '0'
	option macaddr 'A4:91:B1:D1:13:D4'
	option keepalive_adaptive '0'
	option auto '1'
	option enabled '1'
	list ifname 'ptm0' # or (xor, indeed) wanptm0
	list ifname 'eth0'

config device 'mgmteth0'
	option type '8021q'
	option name 'mgmteth0'
	option ifname 'eth0'
	option vid '42'
	option ipv6 '0'

config interface 'lan'
	option type 'bridge'
	option proto 'static'
	option netmask '255.255.255.0'
	option ip6assign '64'
	option force_link '0'
	option ipv6 '0'
	option ipaddr '192.168.178.3'
	list ifname 'mgmteth0'
	list ifname 'eth1'
	list ifname 'eth2'
	list ifname 'eth3'
	list ifname 'eth5'

@Nisbo
Copy link
Author

Nisbo commented Oct 21, 2019

Hi Luke,

thx for your answer :)

  1. just to make sure, your posted code is all I need in the network config if I want to run the modem in Bridge Mode ? So I can ignore the missing parts like
    config switch 'bcmsw',
    config interface 'loopback'
    config globals 'globals'
    or the (disabled) WLAN wlnet_b_5eth5 ?
  2. I see the option vid '7' in your code,
    option vid '7' # another possible trick to release vlan 7 is to set a different vid here
    does it still means that VLAN tagging is with this still disabled on the DGA ? And if I want to use VLAN tagging on the DGA I have to change this line
    list ifname 'ptm0' # or (xor, indeed) wanptm0
    to
    list ifname 'wanptm0' # or (xor, indeed) wanptm0
    and uncomment this line
    #option ifname 'ptm0' #uncomment to handle VLAN on this device

Sorry for the bothering questions but I want to make sure and of course I want to understand how it works :)

@LuKePicci
Copy link
Contributor

LuKePicci commented Oct 21, 2019

  1. Nope, I only mentioned sections you need to touch (either add if missing, or replace if present), all the remaining parts remain unchanged.
  2. /a Basically, to let vlan 7 flow towards the USG you need to deactivate vid 7 handling on the DGA: either you remove (or comment out) option ifname from wanptm0 (as you did) or you change its vid to something different. The restult is the same.
  3. /b Yes, If you want to handle vlan 7 on the DGA, you need those two changes.

@Kaye101

This comment has been minimized.

@FrancYescO

This comment has been minimized.

@Sam-arch99
Copy link

@LuKePicci
The provided network config seems to be fine but with this type of config I can't access my modem anymore.
PPPoE connection via my OpenWrt router works fine if I set the required vlan tag on my WAN interface but with your config I will loosing all access to my modem (GUI, ssh, ping, aso). If I set ptm0.7 in my lan interface with the DGA and disable the vlan tagging on WAN of my OpenWrt router the modem access works fine again but as soon as I disable vlan tagging on my DGA and tag on my OpenWrt router it doesn't work anymore. I also don't fully understand the purpose of "mgmteth0"... Have you added that device config to gain access to the modem over VID 42 via the main router behind the modem?

Here is the main part of my current working config.

OpenWrt Router:

config interface 'modem'
	option proto 'static'
	option ipaddr '192.168.100.1'
	option netmask '255.255.255.0'
	option ifname 'eth1.2'

config interface 'wan'
	option proto 'pppoe'
	option ipv6 'auto'
	option peerdns '0'
	option pppd_options 'debug'
	list dns '127.0.0.53'
	option username 'xxx'
	option password 'xxx'
	option ifname 'eth1.2'
DGA: 

config device 'wanptm0'
	option type '8021q'
	option name 'wanptm0'
	option ifname 'ptm0'
	option macaddr 'AA:BB:CC:DD:EE:FF'
	option ipv6 '0'
	option vid '7'

config interface 'wan'
	option proto 'bridge'
	option demand '0'
	option macaddr 'AA:BB:CC:DD:EE:FF'
	option keepalive_adaptive '0'
	option auto '1'
	option enabled '1'
	option ifname 'ptm0.7'

config config 'config'
	option wan_mode 'bridge'

config interface 'lan'
	option type 'bridge'
	option proto 'static'
	option netmask '255.255.255.0'
	option force_link '0'
	list pppoerelay '<set by script>'
	option ip6assign '0'
	option ipv6 '0'
	option ipaddr '192.168.100.100'
	list ifname 'eth0'
	list ifname 'eth1'
	list ifname 'eth2'
	list ifname 'eth3'
	list ifname 'ptm0.7'

It would be great if you could provide a secure network config where I'm still able to access my modem via the private LAN of my OpenWrt router. Thanks in advance.

@LuKePicci
Copy link
Contributor

LuKePicci commented Jun 30, 2020

Your current configs are a bit confusing.

DGA: (first part)
Remove ptm0.7 from lan
Remove eth0 from lan
Add eth0.2 to wan bridge
Add mgmteth0 in lan.
Add mgmteth0 device as per my previous example

Openwrt:
Your 'modem' interface is broken, you need to tag it with vid 42 (not 2), so ifname must be eth1.42m the IP address is fine.

Your openwrt wan interface is using vid 2, make sure you set it as tagged in the switch vlan config, then make sure there is a vlan 42 marked as tagged as well on the same port.

DGA (second part)
You need to adjust the same switch config accordingly on the dga by creating a vlan 2 partecipated by only switch ports of CPU (port 8) and LAN1 (port 0) as tagged, i.e. "0t 8t". Add another vlan 42 with the same settings. Remove port 0 from the vlan 1 (that one with all other ports kept untagged) i.e "1* 2* 3* 5*".

In all the above, you could also consider changing vid 2 with vid 7, such that on your openwrt router you would configure the ISP connection with the same settings they provide, i.e. with vid 7. This is just for aesthetics.

@Sam-arch99
Copy link

@LuKePicci
Thanks for your input. I've allready tried to tag wan interface on OpenWrt with VID 42 before but still couldn't access my modem. After any changes to the Network config I've typed "etc/init.d/network restart" on both devices to make sure that these changes were commited.

Anyway I will try it again with your mentioned settings and report if it worked!

@Sam-arch99
Copy link

Where do I have access to the swtich config on the DGA? It doesn't use swconfig so I can't confgure it this way. I'm also using a DGA4132 not a 4130 if that makes any difference.
The only thing about the switch that I find in the network config is the following:

config switch 'bcmsw'
	option reset '1'
	option enable_vlan '0'
	option qosimppauseenable '0'
	option jumbo '0'
root@DGA_Bridge~# swconfig
-ash: swconfig: not found

@LuKePicci
Copy link
Contributor

LuKePicci commented Jun 30, 2020

You have no swconfig, since the switch driver is a DSA one. OpenWrt is slowly moving to DSA too. Tch ported switch configuration in UCI ao you can configure thee external switch the same way as you nomally do from UCI for swconfig switches.

Take this example from my dga4131 (still inside /etc/config/network):

config switch 'bcmsw'
        option reset '1'
        option enable_vlan '0'
        option qosimppauseenable '0'
        option jumbo '0'

config switch 'bcmsw_ext'
        option reset '1'
        option type 'bcmsw'
        option qosimppauseenable '0'
        option unit '1'
        option enable_vlan '1'
        option jumbo '1'

config switch_vlan 'lan_switch'
        option device 'bcmsw_ext'
        option vlan '1'
        option ports '0* 1* 2* 3* 8*'

config switch_vlan 'wan_switch'
        option device 'bcmsw_ext'
        option vlan '42'
        option ports '2t 8t'

Yours should be something like this:

config switch 'bcmsw'
        option reset '1'
        option enable_vlan '0'
        option qosimppauseenable '0'
        option jumbo '0'

config switch 'bcmsw_ext'
        option reset '1'
        option type 'bcmsw'
        option qosimppauseenable '0'
        option unit '1'
        option enable_vlan '1'
        option jumbo '1'

config switch_vlan 'lan_switch'
        option device 'bcmsw_ext'
        option vlan '1'
        option ports '1* 2* 3* 8*'

config switch_vlan 'mgmt_switch'
        option device 'bcmsw_ext'
        option vlan '42'
        option ports '0t 8t'

config switch_vlan 'wan_switch'
        option device 'bcmsw_ext'
        option vlan '2'
        option ports '0t 8t'

What is eth1 on your other openwrt box? a single standalone WAN port or a port of a switch? In the latter case you need to configure its switch the same way (you can do it from LuCI)

@Sam-arch99
Copy link

Sam-arch99 commented Jun 30, 2020

@LuKePicci
Thanks for your response!
Before I commit any changes to the DGA vlan part I would like to make sure that I got it right before I have to reset my DGA and configure it from the scratch again. The vlan part of my OpenWrt router is easy as I can use swconfig via Luci. And you are right, current snapshot builds with Kernel 5.4.x of OpenWrt have allready switched to DSA but I have zero experience with it...

The WAN port of my OpenWrt Router (WRT3200ACM) is a single standalone port.
Here is my current vlan config of my OpenWrt Router (I'm using a guest vlan @ vid3) and I haven't tagged my WAN port with vlan 42 and vid 42 yet:

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 '5t 3t 2 1 0'

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 vid '3'
        option ports '5t 3t'
root@DGA_Bridge:~# ls -l /sys/class/net
lrwxrwxrwx    1 root     root             0 Jun 23 18:11 atmwan -> ../../devices                                                                                                             /virtual/net/atmwan
lrwxrwxrwx    1 root     root             0 Jun 23 18:11 bcmsw -> ../../devices/                                                                                                             virtual/net/bcmsw
lrwxrwxrwx    1 root     root             0 Jun 30 08:21 br-lan -> ../../devices                                                                                                             /virtual/net/br-lan
lrwxrwxrwx    1 root     root             0 Jun 30 08:18 br-wan -> ../../devices                                                                                                             /virtual/net/br-wan
lrwxrwxrwx    1 root     root             0 Jun 23 18:11 dsl0 -> ../../devices/v                                                                                                             irtual/net/dsl0
lrwxrwxrwx    1 root     root             0 Jun 23 18:11 eth0 -> ../../devices/v                                                                                                             irtual/net/eth0
lrwxrwxrwx    1 root     root             0 Jun 23 18:11 eth1 -> ../../devices/v                                                                                                             irtual/net/eth1
lrwxrwxrwx    1 root     root             0 Jun 23 18:11 eth2 -> ../../devices/v                                                                                                             irtual/net/eth2
lrwxrwxrwx    1 root     root             0 Jun 23 18:11 eth3 -> ../../devices/v                                                                                                             irtual/net/eth3
lrwxrwxrwx    1 root     root             0 Jun 23 18:11 eth4 -> ../../devices/v                                                                                                             irtual/net/eth4
lrwxrwxrwx    1 root     root             0 Jun 23 18:11 eth5 -> ../../devices/v                                                                                                             irtual/net/eth5
lrwxrwxrwx    1 root     root             0 Jun 23 18:11 gre0 -> ../../devices/v                                                                                                             irtual/net/gre0
lrwxrwxrwx    1 root     root             0 Jan  1  1970 ifb0 -> ../../devices/v                                                                                                             irtual/net/ifb0
lrwxrwxrwx    1 root     root             0 Jan  1  1970 ifb1 -> ../../devices/v                                                                                                             irtual/net/ifb1
lrwxrwxrwx    1 root     root             0 Jun 23 18:11 ip6gre0 -> ../../device                                                                                                             s/virtual/net/ip6gre0
lrwxrwxrwx    1 root     root             0 Jan  1  1970 ip6tnl0 -> ../../device                                                                                                             s/virtual/net/ip6tnl0
lrwxrwxrwx    1 root     root             0 Jan  1  1970 lo -> ../../devices/vir                                                                                                             tual/net/lo
lrwxrwxrwx    1 root     root             0 Jun 23 18:11 ptm0 -> ../../devices/v                                                                                                             irtual/net/ptm0
lrwxrwxrwx    1 root     root             0 Jun 30 08:21 ptm0.7 -> ../../devices                                                                                                             /virtual/net/ptm0.7
lrwxrwxrwx    1 root     root             0 Jan  1  1970 sit0 -> ../../devices/v                                                                                                             irtual/net/sit0
lrwxrwxrwx    1 root     root             0 Jun 23 18:11 tunl0 -> ../../devices/                                                                                                             virtual/net/tunl0
lrwxrwxrwx    1 root     root             0 Jun 23 18:11 wl0 -> ../../devices/pc                                                                                                             i0000:00/0000:00:00.0/0000:01:00.0/net/wl0

Here is my first try with the vlan config on the DGA4132 but I haven't commited any changes yet as I know that I could loose all access if the config is wrong and my feeling is telling me that it's not right yet.
Network config with vlan 7 tag:

config device 'wanptm0'
	option type '8021q'
	option name 'wanptm0'
	option ifname 'ptm0'
	option macaddr 'AA:BB:CC:DD:EE:FF'
	option ipv6 '0'
	option vid '7'

config interface 'wan'
	option type 'bridge'
	option proto 'bridge'
	option demand '0'
	option macaddr 'AA:BB:CC:DD:EE:FF'
	option keepalive_adaptive '0'
	option auto '1'
	option enabled '1'
	list ifname 'wanptm0'
	list ifname 'eth0'
	
config device 'mgmteth0'
	option type '8021q'
	option name 'mgmtptm0'
	option ifname 'eth0'
	option vid '42'
	option ipv6 '0'

config config 'config'
	option wan_mode 'bridge'

config interface 'lan'
	option type 'bridge'
	option proto 'static'
	option netmask '255.255.255.0'
	option force_link '0'
	list pppoerelay '<set by script>'
	option ip6assign '0'
	option ipv6 '0'
	option ipaddr '192.168.100.100'
	list ifname 'mgmteth0'
	list ifname 'eth1'
	list ifname 'eth2'
	list ifname 'eth3'

config switch 'bcmsw'
	option reset '1'
	option enable_vlan '1'
	option qosimppauseenable '0'
	option jumbo '0'

config switch 'bcmsw_ext'
        option reset '1'
        option type 'bcmsw'
        option qosimppauseenable '0'
        option unit '1'
        option enable_vlan '1'
        option jumbo '0'

config switch_vlan 'lan_switch'
        option device 'bcmsw_ext'
        option vlan '1'
        #option vid '1' ??
        option ports '1* 2* 3* 8*'

config switch_vlan 'mgmt_switch'
        option device 'bcmsw_ext'
        option vlan '42'
        #option vid '42' ??
        option ports '0t 8t'

config switch_vlan 'wan_switch'
        option device 'bcmsw_ext'
        option vlan '2'
        #option vid '2' ??
        option ports '0t 8t'

Please let me know if this looks right to you.

@LuKePicci
Copy link
Contributor

LuKePicci commented Jun 30, 2020

wan_switch 0t 8t implies you need to use eth0.2 in wan, not the untagged eth0, and set the linksys to use eth1.2 as wan ifname
otherwise, you can use 0* 8t instead, and leave eth0 as is in wan, then use eth1 (untagged) for wan ifname in the linksys

You should also have eth5 in lan bridge, it's the 5G wireless radio. If you remove it from there, you will loose wireless radio configurability, i.e. you will also become unable to shut it down.

You don't need to change anything in the linksys switch config, as its eth1 is not part of the integrated managed switch.

I would like to make sure that I got it right before I have to reset my DGA and configure it from the scratch again

maybe a backup will come handy :-)
tar -cz -f /tmp/overlay_backup.tar.gz /overlay (and /modoverlay, if any)

@Sam-arch99
Copy link

I've disabled wifi completly via interface config but I'll add it back in the vlan part.
Currently I do have a lot of traffic in my network but tomorrow I'm going start with the test and hopefully I will get it done.
As long as I don't loose access to my other LAN ports on the DGA I should be able to connect to it with my Notebook and edit or revert the network.
Thank you very much for your input so far!! :)

@LuKePicci
Copy link
Contributor

It is best to keep the 2.4GHz wireless rafio enabled during tests as that is not affected by the switch/vlan configs,

@Sam-arch99
Copy link

@LuKePicci
I've re enabled wifi for the testing and also added eth5 back to the lan interface (it saved me alot of time when testing, ty).

Anyway I haven't had much luck with the config. I couldn't access the modem over my private lan anymore and there was also no pppoe connection possible anymore with the following config.

Linksys switch config:

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 '5t 3t 2 1 0'

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

config switch_vlan
        option device 'switch0'
        option vlan '3'
        option vid '3'
        option ports '5t 3t'

DGA network config:

config device 'wanptm0'
	option type '8021q'
	option name 'wanptm0'
	option ifname 'ptm0'
	option macaddr ''
	option ipv6 '0'
	option vid '7'

config interface 'wan'
	option type 'bridge'
	option proto 'bridge'
	option demand '0'
	option macaddr ''
	option keepalive_adaptive '0'
	option auto '1'
	option enabled '1'
	list ifname 'wanptm0'
	list ifname 'eth0'

config config 'config'
	option wan_mode 'bridge'
	
config device 'mgmteth0'
	option type '8021q'
	option name 'mgmtptm0'
	option ifname 'eth0'
	option vid '42'
	option ipv6 '0'

config interface 'lan'
	option type 'bridge'
	option proto 'static'
	option netmask '255.255.255.0'
	option force_link '0'
	option ip6assign '0'
	option ipv6 '0'
	option ipaddr '192.168.100.100'
	list ifname 'mgmteth0'
	list ifname 'eth1'
	list ifname 'eth2'
	list ifname 'eth3'
	list ifname 'eth5'

config switch 'bcmsw'
        option reset '1'
        option enable_vlan '0'
        option qosimppauseenable '0'
        option jumbo '0'

config switch 'bcmsw_ext'
        option reset '1'
        option type 'bcmsw'
        option qosimppauseenable '0'
        option unit '1'
        option enable_vlan '1'
        option jumbo '0'

config switch_vlan 'lan_switch'
        option device 'bcmsw_ext'
        option vlan '1'
        option ports '1* 2* 3* 8*'

config switch_vlan 'mgmt_switch'
        option device 'bcmsw_ext'
        option vlan '42'
        option ports '0t 8t'

config switch_vlan 'wan_switch'
        option device 'bcmsw_ext'
        option vlan '2'
        option ports '0* 8t'
/etc/init.d/network restart
Success
JUMBO_PORT_MASK:0x00000000
  GPHY_0 port rejects jumbo frames.
  GPHY_1 port rejects jumbo frames.
  GMII_1 port rejects jumbo frames.
  GMII_2 port rejects jumbo frames.
  GPON_SERDES port rejects jumbo frames.
  MOCA port rejects jumbo frames.
  USB port rejects jumbo frames.
  GPON port rejects jumbo frames.
  MIPS port rejects jumbo frames.
Success
Success
CDK_E_UNAVAIL
CDK_E_UNAVAIL
CDK_E_UNAVAIL
CDK_E_UNAVAIL
CDK_E_UNAVAIL
CDK_E_UNAVAIL
CDK_E_UNAVAIL
CDK_E_UNAVAIL
CDK_E_UNAVAIL

I've also tried to change

config switch_vlan 'wan_switch'
        option device 'bcmsw_ext'
        option vlan '2'
        option ports '0* 8t'

into

config switch_vlan 'wan_switch'
        option device 'bcmsw_ext'
        option vlan '2'
        option ports '0t 8t'

together with

config interface 'wan'
	option type 'bridge'
	option proto 'bridge'
	option demand '0'
	option macaddr ''
	option keepalive_adaptive '0'
	option auto '1'
	option enabled '1'
	list ifname 'wanptm0'
	list ifname 'eth0.2'

and setup my Linksys switch config as usual, eth1.2 untagged @WAN-port and with this config I could establish a pppoe connection but still couldn't access my modem (GUI, ssh, ping).

Do you have any idea what's wrong with my config? I must have made a mistake somewhere...

@LuKePicci
Copy link
Contributor

LuKePicci commented Jul 11, 2020

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

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

config switch_vlan
option device 'switch0'
option vlan '3'
option vid '3'
option ports '5t 3t'

This is wrong, there is no vid option defined for switch configs, and you are not using a linksys switch port to connect the SGA, so you don't need to touch any switch config on it. Just use eth1.7 for internet connection and eth1.42 for dga lan access.

config interface 'wan'
...
list ifname 'eth0'

This is wrong too. You can't use eth0 because switch port 8 (cpu) is untagged already for another vlan. On vlan 2 you correctly set 8t, so here use eth0.2

I've also tried to change

config switch_vlan 'wan_switch'
        option device 'bcmsw_ext'
        option vlan '2'
        option ports '0* 8t'

into

config switch_vlan 'wan_switch'
        option device 'bcmsw_ext'
        option vlan '2'
        option ports '0t 8t'

together with

config interface 'wan'
	option type 'bridge'
	option proto 'bridge'
	option demand '0'
	option macaddr ''
	option keepalive_adaptive '0'
	option auto '1'
	option enabled '1'
	list ifname 'wanptm0'
	list ifname 'eth0.2'

You can't do both things, 0* 8t means it's untagget as seen from the linksys (0*) but tagged (8t) inside the DGA SoC, so you need no vlan id 2 in the linksys, but you need to use eth0.2 in the DGA. If you set 0t 8t then you need to apply two untagging stages in the linksys for vid 2 (linksys<->dga) and vid 7 (linksys<->ISP).

@Sam-arch99
Copy link

@LuKePicci
Thank you again for your input!
Sorry I'm way too confused and I'm kinda bad with vlans as you probably already figured out...

This is wrong, there is no vid option defined for switch configs, and you are not using a linksys switch port to connect the SGA, so you don't need to touch any switch config on it. Just use eth1.7 for internet connection and eth1.42 for dga lan access.

So if I understand this correctly I do need to two vlans for my WAN Port eth1.7 (pppoe-wan) and eth1.42 (modem-interface) on my Linksys with the option ports '0t 8t' config @config switch_vlan 'wan_switch' on the DGA? It would be fine to set the vlan 7 tag for pppoe with my Linksys as long as I don't loose access to my DGA. Whatever is more simple (+secure) and works is fine for me.

If you set 0t 8t then you need to apply two untagging stages in the linksys for vid 2 (linksys<->dga) and vid 7 (linksys<->ISP).

Afaik I can't set two untagging stages with my Linksys (Cannot save due to invalid values):
vlan_1
But I guess that I've misunderstood what you meant here... :/

This config would mean that I don't do the vlan tagging part for wan (vlan7) on my DGA right? So this means my current wan config on the DGA is wrong?
And my Linksys switch/vlan part as well as my DGA switch/vlan part is also wrong?
Anyway I don't know what to do, I've tried to change some things but I never got it to work. PPPoE connection on my Linksys does work with several changes that I've tried but I could never access my modem with any config so far.

I know that you try to point me to the config related things that I do wrong but as you can see I don't know how to help myself with this. I wonder how the official bridge mode of technicolor would look like or would it be as insecure as the one with the tch-gui?

For the reference here is my full Linksys 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 ''

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

config interface 'wan'
	option proto 'pppoe'
	option ipv6 'auto'
	option peerdns '0'
	option pppd_options 'debug'
	list dns '127.0.0.53'
	option username ''
	option password ''
	option ifname 'eth1.2'

config interface 'wan6'
	option proto 'dhcpv6'
	option reqaddress 'try'
	option reqprefix 'auto'
	option peerdns '0'
	list dns '127.0.0.53'
	option ifname 'eth1.2'

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 '5t 3t 2 1 0'

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 vid '3'
	option ports '5t 3t'

config interface 'guest'
	option proto 'static'
	option ifname 'eth0.3'
	option ipaddr '192.168.10.1'
	option netmask '255.255.255.0'
	option type 'bridge'

config interface 'modem'
	option proto 'static'
	option ipaddr '192.168.100.1'
	option netmask '255.255.255.0'
	option ifname 'eth1.2'

config interface 'vpn0'
	option ifname 'tun0'
	option proto 'none'

And my current DGA network config where the pppoe connect is working but modem access doesn't:

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 'none'
	option default_ps '0'

config device 'waneth4'
	option type '8021q'
	option name 'waneth4'
	option macaddr ''
	option ifname 'eth4'
	option vid '835'
	option ipv6 '0'

config device 'wanptm0'
	option type '8021q'
	option name 'wanptm0'
	option ifname 'ptm0'
	option macaddr ''
	option ipv6 '0'
	option vid '7'

config interface 'wan'
	option type 'bridge'
	option proto 'bridge'
	option demand '0'
	option macaddr ''
	option keepalive_adaptive '0'
	option auto '1'
	option enabled '1'
	list ifname 'wanptm0'
	list ifname 'eth0.2'

config config 'config'
	option wan_mode 'bridge'
	
config device 'mgmteth0'
	option type '8021q'
	option name 'mgmtptm0'
	option ifname 'eth0'
	option vid '42'
	option ipv6 '0'

config interface 'wwan'
	option auto '1'
	option proto 'mobiled'
	option session_id '0'
	option profile '1'
	option enabled '0'

config interface 'wan6'
	option proto 'dhcpv6'
	option reqopts '12 21 22 23 24 25 31 56 64 67 82 83'
	option noslaaconly '1'
	option iface_464xlat '0'
	option auto '0'
	option dns_metric '20'
	option ifname '@wan_ipv6'
	option enabled '0'

config interface 'sfptag'
	option proto 'static'
	option ifname 'eth4'
	option netmask '255.255.255.0'
	option ipaddr '192.168.10.1'
	option enabled '0'

config interface 'lan'
	option type 'bridge'
	option proto 'static'
	option netmask '255.255.255.0'
	option force_link '0'
	option ip6assign '0'
	option ipv6 '0'
	option ipaddr '192.168.100.100'
	list ifname 'mgmteth0'
	list ifname 'eth1'
	list ifname 'eth2'
	list ifname 'eth3'
	list ifname 'eth5'

config switch 'bcmsw'
        option reset '1'
        option enable_vlan '1'
        option qosimppauseenable '0'
        option jumbo '0'

config switch 'bcmsw_ext'
        option reset '1'
        option type 'bcmsw'
        option qosimppauseenable '0'
        option unit '1'
        option enable_vlan '1'
        option jumbo '0'

config switch_vlan 'lan_switch'
        option device 'bcmsw_ext'
        option vlan '1'
        option ports '1* 2* 3* 8*'

config switch_vlan 'mgmt_switch'
        option device 'bcmsw_ext'
        option vlan '42'
        option ports '0t 8t'

config switch_vlan 'wan_switch'
        option device 'bcmsw_ext'
        option vlan '2'
        option ports '0t 8t'

config interface 'wlnet_b_24'
	option proto 'static'
	option ip6assign '64'
	option ip6hint '1'
	option netmask '255.255.255.128'
	option ipaddr '192.168.168.1'
	option ifname 'wl0_1'
	option force_link '0'
	option name 'Ospiti-TIM-18664829'
	option ipv6 '0'
	option enabled '0'

config interface 'wlnet_b_5'
	option proto 'static'
	option ip6assign '64'
	option ip6hint '2'
	option netmask '255.255.255.128'
	option ipaddr '192.168.168.129'
	option ifname 'wl1_1'
	option force_link '0'
	option name 'Ospiti-TIM-18664829'
	option ipv6 '0'
	option enabled '0'

config device 'wlnet_b_5eth5'
	option type '8021q'
	option name 'wl1_1'
	option ifname 'eth5'
	option vid '3'
	option ipv6 '0'
	option enabled '0'

config interface 'public_lan'
	option ifname '@lan'
	option proto 'static'
	option ipaddr '0.0.0.0'
	option netmask '0.0.0.0'
	option auto '1'
	option disabled_info 'proto=static,ip=0.0.0.0,mask=255.255.255.248'
	option ipv6 '0'

config interface 'ipoe'
	option proto 'dhcp'
	option metric '1'
	option reqopts '1 3 6 43 51 58 59'
	option release '1'
	option neighreachabletime '1200000'
	option neighgcstaletime '2400'
	option ipv6 '1'

config interface 'wan_ipv6'
	option auto '0'
	option proto 'pppoe'
	option demand '0'
	option password ''
	option macaddr ''
	option ipv6 '1'
	option peerdns '1'
	option keepalive_adaptive '0'
	option dns_metric '0'
	option ifname 'wanptm0'
	option username ''
	option metric '10'
	option enabled '0'

I would much appreciate it if you could point to the parts that needed to be changed in order to make this config work. Please let me know if you need more information.

@LuKePicci
Copy link
Contributor

LuKePicci commented Jul 12, 2020

with the option ports '0t 8t' config @config switch_vlan 'wan_switch' on the DGA?

Given eth1.7 is always set on the linksys, then you need either to use 0t 8t for wan_switch on vlan 7 (hence putting eth0.7 in the bridge to wanptm0), or 0* 8t on vlan 2 (putting eht0.2 in the bridge to ptm0)

Afaik I can't set two untagging stages with my Linksys (Cannot save due to invalid values):

Sure you can, you can virtually have eth1.2.7, it's just tagging over tagging. Of course you need not to confuse tagging of an interface and switch vlan management. You cannot configure a switch to map an untagged port to another with two or more tags.

As I can see from your linksys configs, the eth1 port is part of the switch as well, it is not an independent port, so you will need to configure the linksys switch vlans accordingly.

Linksys

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.1'
	option proto 'static'
	option ipaddr '192.168.1.1'
	option netmask '255.255.255.0'

config interface 'wan'
	option proto 'pppoe'
	option ipv6 'auto'
	option peerdns '0'
	option pppd_options 'debug'
	list dns '127.0.0.53'
	option username ''
	option password ''
	option ifname 'eth1.7'

config interface 'wan6'
	option proto 'dhcpv6'
	option reqaddress 'try'
	option reqprefix 'auto'
	option peerdns '0'
	list dns '127.0.0.53'
	option ifname 'eth1.7'

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

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

config switch_vlan 'guest_switch'
	option device 'switch0'
	option vlan '3'
	option ports '5t 0t'

config switch_vlan 'wan_switch'
	option device 'switch0'
	option vlan '7'
	option ports '6t 4t'

config switch_vlan 'mgmt_switch'
	option device 'switch0'
	option vlan '42'
	option ports '6t 4t'

config interface 'guest'
	option proto 'static'
	option ifname 'eth0.3'
	option ipaddr '192.168.10.1'
	option netmask '255.255.255.0'
	option type 'bridge'

config interface 'dga' # I renemed this since you won't be allowed to reach the DGA modem interface from here, modem is on the other vlan
	option proto 'static'
	option ipaddr '192.168.100.1'
	option netmask '255.255.255.0'
	option ifname 'eth1.42'

config interface 'vpn0'
	option ifname 'tun0'
	option proto 'none'

DGA (note I explicitly defined waneth0 on vid 7, that's the same as using eth0.7

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 'none'
	option default_ps '0'

config device 'waneth4'
	option type '8021q'
	option name 'waneth4'
	option macaddr ''
	option ifname 'eth4'
	option vid '835'
	option ipv6 '0'

config device 'wanptm0'
	option type '8021q'
	option name 'wanptm0'
	option ifname 'ptm0'
	option macaddr ''
	option ipv6 '0'
	option vid '7'

config device 'waneth0'
	option type '8021q'
	option name 'waneth0'
	option ifname 'eth0'
	option macaddr ''
	option ipv6 '0'
	option vid '7'

config interface 'wan'
	option type 'bridge'
	option proto 'bridge'
	option demand '0'
	option macaddr ''
	option keepalive_adaptive '0'
	option auto '1'
	option enabled '1'
	list ifname 'wanptm0'
	list ifname 'waneth0'

config config 'config'
	option wan_mode 'bridge'
	
config device 'mgmteth0'
	option type '8021q'
	option name 'mgmteth0'
	option ifname 'eth0'
	option vid '42'
	option ipv6 '0'

config interface 'wwan'
	option auto '1'
	option proto 'mobiled'
	option session_id '0'
	option profile '1'
	option enabled '0'

config interface 'wan6'
	option proto 'dhcpv6'
	option reqopts '12 21 22 23 24 25 31 56 64 67 82 83'
	option noslaaconly '1'
	option iface_464xlat '0'
	option auto '0'
	option dns_metric '20'
	option ifname '@wan_ipv6'
	option enabled '0'

config interface 'sfptag'
	option proto 'static'
	option ifname 'eth4'
	option netmask '255.255.255.0'
	option ipaddr '192.168.10.1'
	option enabled '0'

config interface 'lan'
	option type 'bridge'
	option proto 'static'
	option netmask '255.255.255.0'
	option force_link '0'
	option ip6assign '0'
	option ipv6 '0'
	option ipaddr '192.168.100.100'
	list ifname 'mgmteth0'
	list ifname 'eth1'
	list ifname 'eth2'
	list ifname 'eth3'
	list ifname 'eth5'

config switch 'bcmsw'
        option reset '1'
        option enable_vlan '1'
        option qosimppauseenable '0'
        option jumbo '0'

config switch 'bcmsw_ext'
        option reset '1'
        option type 'bcmsw'
        option qosimppauseenable '0'
        option unit '1'
        option enable_vlan '1'
        option jumbo '0'

config switch_vlan 'lan_switch'
        option device 'bcmsw_ext'
        option vlan '1'
        option ports '1* 2* 3* 8*'

config switch_vlan 'mgmt_switch'
        option device 'bcmsw_ext'
        option vlan '42'
        option ports '0t 8t'

config switch_vlan 'wan_switch'
        option device 'bcmsw_ext'
        option vlan '7'
        option ports '0t 8t'

config interface 'wlnet_b_24'
	option proto 'static'
	option ip6assign '64'
	option ip6hint '1'
	option netmask '255.255.255.128'
	option ipaddr '192.168.168.1'
	option ifname 'wl0_1'
	option force_link '0'
	option name 'Ospiti-TIM-18664829'
	option ipv6 '0'
	option enabled '0'

config interface 'wlnet_b_5'
	option proto 'static'
	option ip6assign '64'
	option ip6hint '2'
	option netmask '255.255.255.128'
	option ipaddr '192.168.168.129'
	option ifname 'wl1_1'
	option force_link '0'
	option name 'Ospiti-TIM-18664829'
	option ipv6 '0'
	option enabled '0'

config device 'wlnet_b_5eth5'
	option type '8021q'
	option name 'wl1_1'
	option ifname 'eth5'
	option vid '3'
	option ipv6 '0'
	option enabled '0'

config interface 'public_lan'
	option ifname '@lan'
	option proto 'static'
	option ipaddr '0.0.0.0'
	option netmask '0.0.0.0'
	option auto '1'
	option disabled_info 'proto=static,ip=0.0.0.0,mask=255.255.255.248'
	option ipv6 '0'

config interface 'ipoe'
	option proto 'dhcp'
	option metric '1'
	option reqopts '1 3 6 43 51 58 59'
	option release '1'
	option neighreachabletime '1200000'
	option neighgcstaletime '2400'
	option ipv6 '1'

config interface 'wan_ipv6'
	option auto '0'
	option proto 'pppoe'
	option demand '0'
	option password ''
	option macaddr ''
	option ipv6 '1'
	option peerdns '1'
	option keepalive_adaptive '0'
	option dns_metric '0'
	option ifname 'wanptm0'
	option username ''
	option metric '10'
	option enabled '0'

@Sam-arch99
Copy link

Sam-arch99 commented Jul 12, 2020

Thank you so much for not giving up on me! :)
My prefered setup would be to do the vlan 7 tagging for my pppoe connection on my Linksys router but I'll try the provided config in a minute and let you know if it works.

Regarding to vid's on the Linksys. I've noticed that with the provided config there are no vid's anymore and as I'm using a second OpenWrt (D-Link DIR860L) device as a smart switch + wifi AP I might need vid for LAN(vlan1) and Guest(vlan3) to keep things in order.
I'm using some ebtable rules on my Linksys and my OpenWrt Smart Switch Router + AP to fully isoloate clients in the guest/IOT enviroment. As I'm not very skilled with vlan's and vid's I don't know if removing those vid's from Linksys switch setup will break my guest/IOT setup.

I realy don't want to bother you with my guest and ebtables setup but here are my custom firewall ebtales rules. Maybe you can have a look at it and tell me if the removal of vid's from the Linksys router could be problematic/brake my setup.

Linksys, custom firewall rules:

ebtables -A FORWARD --logical-in br-guest -j DROP

D-Link DIR, custom firewall rules:

ebtables -A FORWARD -i ! eth0.3 -o eth0.3 -j ACCEPT # allow AP clients to talk to router
ebtables -A FORWARD -i eth0.3 -o ! eth0.3 -j ACCEPT # allow router to talk to AP clients
ebtables -A FORWARD --logical-in br-guest -j DROP

D-Link DIR, lan + switch config:

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

config interface 'guest'
	option type 'bridge'
	option proto 'static'
	option ipaddr '192.168.10.2'
	option netmask '255.255.255.0'
	option ifname 'eth0.3 eth0.4'
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 '6t 4 3 1 0t'

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

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

@Sam-arch99
Copy link

Sam-arch99 commented Jul 12, 2020

@LuKePicci
I have to confirm that the provided switch config for my Linksys router does completly break my Lan + Guest setup with DIR-860L. Clients are not able to revieve an IP address over the LAN + GUEST interface and I loose complete access to my D-Link. LAN + Wifi on the Linksys Router works fine so I was able to test if the modem access works now but sadly it still doesn't work. I've added the DGA interface into my WAN Firewall-zone and I've also tried to add it into my LAN Firewall-Zone, removed the ebtables rule and rebooted the device but still no luck. But the pppoe connection works fine...

Linksys Firewall part:

config defaults
	option syn_flood '1'
	option input 'ACCEPT'
	option output 'ACCEPT'
	option forward 'REJECT'
	option drop_invalid '1'

config zone
	option name 'lan'
	option input 'ACCEPT'
	option output 'ACCEPT'
	option forward 'ACCEPT'
	option network 'lan'

config zone
	option name 'guest'
	option input 'ACCEPT'
	option forward 'REJECT'
	option output 'ACCEPT'
	option network 'guest'

config zone
	option name 'wan'
	option output 'ACCEPT'
	option masq '1'
	option mtu_fix '1'
	option input 'DROP'
	option forward 'DROP'
	option network 'wan wan6 dga'

config zone 'vpn'
	option name 'vpn'
	option network 'vpn0'
	option output 'ACCEPT'
	option masq '1'
	option mtu_fix '1'
	option input 'DROP'
	option forward 'DROP'

config forwarding
	option src 'lan'
	option dest 'wan'

config forwarding
	option dest 'wan'
	option src 'guest'

config forwarding
	option dest 'vpn'
	option src 'guest'

config forwarding
	option dest 'vpn'
	option src 'lan'
DGA
Type: Software VLAN
Device: eth1.42
Connected: yes
MAC: 
RX: 0 B (0 Pkts.)
TX: 9.98 KB (105 Pkts.)

eth1.42
Protocol: Static address
Uptime: 0h 11m 49s
MAC: 
RX: 0 B (0 Pkts.)
TX: 9.98 KB (105 Pkts.)
IPv4: 192.168.100.1/24

Regarding config interface 'dga'. This interface is a direct replacement for my old modem interface and it should be added to my WAN-Firewall zone like my old modem interface before right?

What could be the problem? Any idea? Should I reset my DGA and start with a fresh config?

@Sam-arch99
Copy link

I've fixed the problem with my D-Link AP (LAN + Guest setup) by changing the following at the Linksys switch config:

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

config switch_vlan 'guest_switch'
	option device 'switch0'
	option vlan '3'
	option ports '5t 0t'

into

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

config switch_vlan 'guest_switch'
	option device 'switch0'
	option vlan '3'
	option ports '5t 3t'

I've also added back my ebtables rules and everything seems to work fine without the vid's at the Linksys!

But the main problem with the Modem access is still there and I have no clue how to fix or debug it.

@LuKePicci
Copy link
Contributor

My prefered setup would be to do the vlan 7 tagging for my pppoe connection on my Linksys router but I'll try the provided config in a minute and let you know if it works.

You actually do so with that config. You tag with vid 7 on the linksys, you untag the vid 7 before bridging (waneth0), and tag it again after bridging (wanptm0). You may wonder why we don't simply bridge eth0 and ptm0 in their untagged stages, and that's because eth0 comes from switch port 8 as like as other eth1 to eth3, but we used 8* already for them. The other sulution is to present an untagged LAN1 port towards the DGA and internally tag once more on vid 2 towards the DGA SoC, then untag the vid 2 before bridging (eth0.2), then finally bridge it to the untagged ptm0. This way the tag with vid 7 applied on the linksys goes up to the ISP. I think the first solution is cleaner and easier to understand if you are not a vlan master.

Regarding to vid's on the Linksys. I've noticed that with the provided config there are no vid's anymore

Sure there are, the vid is that one you have as option vlan.

I'm using a second OpenWrt (D-Link DIR860L) device as a smart switch + wifi AP I might need vid for LAN(vlan1) and Guest(vlan3) to keep things in order.

I confirm my proposed linksys config was not intended to support such a situation, I simply reverted every switch config to what I thought to be the default config and applied vlan bridging for the DGA thing. I need a full linksys config from your original setup supporting this scenario to integrate them together.

Regarding config interface 'dga'. This interface is a direct replacement for my old modem interface and it should be added to my WAN-Firewall zone like my old modem interface before right?

Yeah, actually it should be on a separate zone but it's fine to put it in WAN zone for testing.

I probably gave you wrong switch port numbers for the linksys, so it would be helpful if you show me a linksys default switch vlan config

@LuKePicci
Copy link
Contributor

I've fixed the problem with my D-Link AP (LAN + Guest setup) by changing the following at the Linksys switch config

That is correct

But the main problem with the Modem access is still there and I have no clue how to fix or debug it.

Just ping 192.168.100.1 from inside the linksys and keep tcpdump -i mgmteth0 going from inside the DGA

@Sam-arch99
Copy link

Default switch vlan config:
https://web.archive.org/web/20200412225958/https://openwrt.org/toh/linksys/linksys_wrt3200acm
Source: https://openwrt.org/toh/linksys/linksys_wrt3200acm (temporarily unavailable)
switch_default

My current state:

root@WRT3200ACM:~# swconfig list
Found: switch0 - 10.mvsw61xx
root@WRT3200ACM:~# swconfig dev switch0 show
Global attributes:
        enable_vlan: 1
        enable_mirror_rx: 0
        enable_mirror_tx: 0
        mirror_monitor_port: 0
        mirror_source_port: 0
Port 0:
        mask: 0x0000: (0)
        qmode: 3
        pvid: 1
        link: port:0 link:down
Port 1:
        mask: 0x0000: (1)
        qmode: 3
        pvid: 1
        link: port:1 link:down
Port 2:
        mask: 0x0000: (2)
        qmode: 3
        pvid: 1
        link: port:2 link:up speed:100baseT full-duplex
Port 3:
        mask: 0x0000: (3)
        qmode: 3
        pvid: 0
        link: port:3 link:up speed:1000baseT full-duplex
Port 4:
        mask: 0x0000: (4)
        qmode: 3
        pvid: 0
        link: port:4 link:up speed:1000baseT full-duplex
Port 5:
        mask: 0x0000: (5)
        qmode: 3
        pvid: 0
        link: port:5 link:up speed:1000baseT full-duplex
Port 6:
        mask: 0x0000: (6)
        qmode: 3
        pvid: 0
        link: port:6 link:up speed:1000baseT full-duplex
VLAN 1:
        port_based: 0
        vid: 1
        ports: 0 1 2 3t 5t
VLAN 3:
        port_based: 0
        vid: 3
        ports: 3t 5t
VLAN 7:
        port_based: 0
        vid: 7
        ports: 4t 6t
VLAN 42:
        port_based: 0
        vid: 42
        ports: 4t 6t

vlan_2

@LuKePicci
Copy link
Contributor

So my port number guessing was correct. I can't spot any issue in your current config. Try to inspect with tcpdump

@Sam-arch99
Copy link

Just ping 192.168.100.1 from inside the linksys and keep tcpdump -i mgmteth0 going from inside the DGA

There is no mgmteth0 availible at the DGA tcpdump GUI but I'll try it over the console, I haven't used tcpdump for ages...
tcp_dump

root@DGA_Bridge:~# tcpdump -i mgmteth0 -G 45
tcpdump: mgmteth0: No such device exists
(SIOCGIFHWADDR: No such device)

So mgmteht0 doesn't seem to exist but I do have it set in my network config.

config device 'mgmteth0'
	option type '8021q'
	option name 'mgmtptm0'
	option ifname 'eth0'
	option vid '42'
	option ipv6 '0'

I can remember that I've disabled some services on my DGA in the past (which imho where not needed for me in bridge mode, odhcpd, dnsmasq, dhcpsnooper, mcsnooper, wansensing, mobiled, watchdog-tch and a couple more). Could this potentaly be the problem?
As I said I could reset my DGA and start from the scratch with a fresh config but I doubt that it will change anything. My DGA was always stable and with my old config I never had problems to access it over my Linksys router.

To be fair, I haven't fully rebooted my DGA for the last 16 days. I've always ran /etc/init.d/network reload + restart when changing anything in my network config and in the past I was always successfull with it.
I'm going to reboot my DGA later (can't right now because of active clients) but I don't think that it will fix the problem (maybe/hopefully im wrong here).

Please let me know if you have any other ideas.

@LuKePicci
Copy link
Contributor

option name 'mgmtptm0'

AHAH! it must me mgmteth0 here

@Sam-arch99
Copy link

Sam-arch99 commented Jul 12, 2020

option name 'mgmtptm0'

AHAH! it must me mgmteth0 here

config device 'mgmteth0'
option type '8021q'
option name 'mgmteth0' ?
option ifname 'eth0'
option vid '42'
option ipv6 '0'

Edit: OMG! It works!!!!! I'm so sorry for some reason if had this wrong at config device 'mgmteth0'.....
WOW, I'm speechless!

@LuKePicci
Copy link
Contributor

Sure!

@Sam-arch99
Copy link

Sure!

Again, thank you so much for not giving up on me! Hopefully this will help someone in the future.
The other thing is that I've learned a little bit about DSA and this might help me in the future when I need to convert my swconfig setup into DSA. I can't thank you enough.... You just made my Day!

@Sam-arch99
Copy link

@LuKePicci
I should also add that there is basically no more cpu stress on the DGA with current bridge mode config while maxing out my VDSL connection, which imho is very positive side effect of the provided config! On top I would claim that in general my internet connection does also feel a bit more responsive since the changes...

CPU:   0% usr   0% sys   0% nic  99% idle   0% io   0% irq   0% sirq
Load average: 0.04 0.03 0.05 2/90 26865

With the default bridge mode config I could always see ~30% cpu usage while maxing out my vdsl connection (concurrent Down+Upload). This fact leads me to the conclusion that the default bridge mode with tch-gui wasn't very effective or wasn't performing as it should. Now I'm asking myself if this coult be related to the fact that my Linksys Router is doing the vlan 7 tagging for my pppoe connection now or if this generally is related to the new DGA config?

Anyway I feel like that the default bridge mode config, which is set via tch-gui, should be adjusted to be more secure with better performance. Since the recommended changes at the network config I came to the conclusion that my old config wasn't very good/effective but as far as I know ptm0.x would also end up in the lan interface section with the default bridge mode config. Or were there already changes made in terms of this in the latest GUI version(s)?

Yeah, actually it should be on a separate zone but it's fine to put it in WAN zone for testing.

Since everything is working fine now I would also like to put the dga interface into a seperate firewall zone. First I was thinking about the LAN-zone but I guess that you were talking about a new seperate firewall-zone for the dga interface (eth1.42)?
What would be your recommendation in this regard?

@LuKePicci
Copy link
Contributor

Now I'm asking myself if this coult be related to the fact that my Linksys Router is doing the vlan 7 tagging for my pppoe connection now or if this generally is related to the new DGA config?

Nope, as I was saying in aprevious message the Linksys apply the tag, but the DGA is removing it before entering the bridge and applying it back after exiting the bridge. I can't really say why you see such a performance improvement, but I would probably consider some extra unwanted load was occurring on the main router connected to lan ip interface for a traffic flow it wasn't really involved into.

as far as I know ptm0.x would also end up in the lan interface section with the default bridge mode config.

Yes, and that is pretty insecure. The ISP has direct L2 access to DGA lan.

First I was thinking about the LAN-zone

Absolutely wrong, you need to put that eth1.42 into a new zone (let's say 'mgmt') wuth enabled masq and basic forwarding rules for lan->mgmt, similarly to what you have for lan->wan. No forwarding is needed between mgmt->wan or viceversa.

@Sam-arch99
Copy link

Yes, and that is pretty insecure. The ISP has direct L2 access to DGA lan.

Yeah, that's what I mean, the default bridge mode config which is set by tch-gui seems to be insecure and on top doesn't perform very well in terms of cpu usage, at least with the DGA4132/4130. Maybe we should let @Ansuel know about it so it can be adjusted in future versions of the GUI.

Anyway I still wonder how the official bridge mode of some technicolor devices is set up...
As far as I know some devices support bridge mode out of the box with the official GUI and I doubt that it can be compared to your rather exotic approach (via seperate mgmt interface + vlans) but I dont have a clue how this setup would look like as I never saw any official bridge mode network config of a technicolor device.

Absolutely wrong, you need to put that eth1.42 into a new zone (let's say 'mgmt') wuth enabled masq and basic forwarding rules for lan->mgmt, similarly to what you have for lan->wan. No forwarding is needed between mgmt->wan or viceversa.

Thanks, I'll try configure it like this when I'm back home later on.

@Sam-arch99
Copy link

So here is my current firewall zone config for the DGA access:

config zone
	option name 'mgmt'
	option network 'dga'
	option family 'ipv4'
	option input 'ACCEPT'
	option forward 'ACCEPT'
	option output 'ACCEPT'
	option masq '1'

config forwarding
	option dest 'mgmt'
	option src 'lan'

config forwarding
	option dest 'lan'
	option src 'mgmt'

fw_zone
Works fine so far...

Btw another thing I've noticed is that the broadband card at tch-gui does show "@bridge not connected" with the current bridge mode config the but I guess is just a cosmetic thing as everything is working well.
broadband_bridge
I'm very happy with the current config and I'm quite thankful that you helped me out on this. Hopefully I can return the favor at some point! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants