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

FS#390 - Bt Home Hub 5 Type A Bridging Yellow Switch and RED Port does not work #5628

Closed
openwrt-bot opened this issue Jan 15, 2017 · 6 comments
Labels

Comments

@openwrt-bot
Copy link

ezplanet:

Supply the following if possible:

  • Device problem occurs on Bt Home Hub 5 Type A
  • Software versions of LEDE: up to r2966
  • Steps to reproduce

Configure Yellow Switch and RED Ethernet port as follows:

config interface 'lan' option type 'bridge' option proto 'static' option ip6assign '60' option _orig_ifname 'eth0.1 radio0.network1 radio1.network1' option _orig_bridge 'true' option ipaddr '192.168.100.1' option netmask '255.255.255.0' option gateway '0.0.0.0' option dns '8.8.8.8' option mtu '1492' option ifname 'eth0.1 eth1.2'

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

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

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

with the above configuration I can ping the router from a host connected to the red port or a yellow port and vice-versa from the router. However hosts conneted to any port, either yellow or red cannot reach each other at all. Not even from yellow port to yellow port.

I am not sure whether this is a bug or a configuration issue.

Also I had to force the red port to device eth1.2 which does not appear in the list of available physical ports.

@openwrt-bot
Copy link
Author

mkresin:

I've already prepared something which should fix. Please have a look at these commits

  • lantiq: use xwan network name for xdsl wan
  • lantiq: xrx200: use vlan for ethernet wan port

in my [[https://git.lede-project.org/?p=lede/mkresin/staging.git;a=summary|staging repository]]. If you want the commits as patches, click on the commit title and the patch link on the top.

With the patches applied your should have the following default switch config:

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

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

config switch_vlan
option device 'switch0'
option vlan '2'
option ports '5 6t'

Where the yellow lan ports are at eth0.1 and the red wan port is at eth0.2.

To use them all as lan ports (all ports are at eth0.1), change the vlan config instead of bridging vlans of the same switch. Bridging vlans of the same switch confuses a lot of switches, never worked reliable for me and shouldn't be necessary at all:

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

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

@openwrt-bot
Copy link
Author

ezplanet:

Your patches fail to apply correctly to trunk:

mauro@sirius:/net2/router/lede/trunk$ patch -p1 < ../use_vlan_for_ethernet_wan_port.patch patching file package/base-files/files/lib/functions/uci-defaults.sh patching file package/network/config/firewall/files/firewall.config patching file target/linux/lantiq/base-files/etc/board.d/01_leds patching file target/linux/lantiq/base-files/etc/board.d/02_network Hunk #3 FAILED at 44. 1 out of 8 hunks FAILED -- saving rejects to file target/linux/lantiq/base-files/etc/board.d/02_network.rej

mauro@sirius:/net2/router/lede/trunk$ patch -p1 < ../xwan_vlan_red_ethernet.patch
patching file target/linux/lantiq/base-files/etc/board.d/02_network
Hunk #2 FAILED at 78.
1 out of 5 hunks FAILED -- saving rejects to file target/linux/lantiq/base-files/etc/board.d/02_network.rej
patching file target/linux/lantiq/dts/BTHOMEHUBV5A.dts
patching file target/linux/lantiq/dts/VGV7510KW22.dtsi
patching file target/linux/lantiq/dts/VGV7519.dtsi

@openwrt-bot
Copy link
Author

mkresin:

Than use my staging tree as it is. Should be related to other commits in my tree which you don't have in your tree.

@openwrt-bot
Copy link
Author

ezplanet:

I tried to interpret what you were trying to do and I edited 02_network as follows to overcome the rejects.

BTHOMEHUBV5A) lan_mac=$(mtd_get_mac_binary_ubi caldata 4364) xwan_mac=$(macaddr_add "$lan_mac" 1) wan_mac=$(macaddr_add "$xwan_mac" 3) ucidef_add_switch "switch0" \ "0:lan:3" "1:lan:4" "2:lan:2" "4:lan:1" "5:wan:5" "6t@eth0" ;;

The firmware built this way creates an /etc/board.json with duplicate switch definition and incomplete interface names (" .1" instead of "eth0.1", etc.) and thus nothing works. Amending board.json and /etc/config/network manually gives me a Red Wan Ethernet. In the switch configuration, when I put port WAN untagged with switch0.1 it works as required.

However:

You renamed "wan" to "xwan" and assigned "wan" to the Red Ethernet. Not only this is unnecessary, it is wrong because, as I explained in the lede-dev list, there is a very low priority case to use it as a WAN port and it could be done anyway whatever the name.

The current "wan" port configuration is fine as it is and it should not be touched. xDSL should be the main WAN on this router. Consider also backward compatibility and what would happen when upgrading remote routers that access the internet via xDSL "wan" interface. One would have to be present physically to amend and test the configuration.

Please add the Red Ethernet as an additional port, name it xwan, ewan, dmz, lan2, but it should appear as another LAN interface not a WAN.

Please ensure too that the Yellow switch can be extended to use the Red Ethernet port 5.

@openwrt-bot
Copy link
Author

mkresin:

I tried to interpret what you were trying to do and I edited 02_network as follows to overcome the rejects.

... and you failed. Your change is incomplete. Here is the deal, test my staging tree as it is or forget about it. I don't have the time to explain to you how the world actually works.

You renamed "wan" to "xwan" and assigned "wan" to the Red Ethernet. Not only this is unnecessary, it is wrong because, as I explained in the lede-dev list, there is a very low priority case to use it as a WAN port and it could be done anyway whatever the name.

Have you had a look at the author date of my commits? My commits are way older than your bug ticket. The commits are fixing way more than just your issue. That your issue gets fixed by the commits as well is more or less a side effect.

The current "wan" port configuration is fine as it is and it should not be touched.

No it isn't. At the moment it is not possible to use the ethernet wan port as wan interface out of the box. And that is what an ethernet wan port is for. Just because you don't have a use case to connect an external (fibre) modem doesn't mean that an ethernet wan isn't required.

Please ensure too that the Yellow switch can be extended to use the Red Ethernet port 5.

Seriously? Does it really starts again? In my first post I've provided an example configuration how the ethernet wan port can be used as lan port after applying my patches.

@openwrt-bot
Copy link
Author

ezplanet:

@mathias

I do not want to test your staging tree because you refuse to listen to input and feedback and therefore it would be a waste of my time. You should try to be less hostile in your comments.

I am very satisfied with the change I posted on lede-dev because it is simple, backward compatible and it does exactly what is required. The change applies only to BT Home Hub 5.

I attach the patch hereby to for those who want to get a working Red Ethernet and do not have access to lede-dev mailing list. The Red Ethernet will appear as "dmz" interface. The patch also allows to assign Red Ethernet (dmz port on the switch) to Switch 0.1 and extend the total number of "lan" interface ports to 5.

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

No branches or pull requests

1 participant