It is currently Wed May 22, 2019 1:24 am
All times are UTC + 8 hours

Use all ethernet ports bridged like a switch

Use all ethernet ports bridged like a switch

Postby anna » Thu Mar 14, 2019 11:37 pm

Hello!

I just got a AS4002T. I would like to use one 1G port for a network printer and the 10G port for a workstation with 10GbE. However, the traffic does not seem to be routed through per default. All interfaces are independent and listening for a DHCP server.

Is there a function in ADM to enable a bridge/switch mode?

Or can you help me with the shell code and where to put the code to be loaded so ADM is ok with it :)

As a test I connected via ssh into the NAS and made a bridge manually:

brctl addbr br0
brctl addif br0 eth0
brctl addif br0 eth1
brctl addif br0 eth2
ip link set dev br0 up

That works well to route traffic through, all devices connected to the NAS can see each other, yeah! However, the NAS itself is not reachable anymore :roll:. Should I reset and try to add a 'dhclient br0'? Any other tips?

best,
anna
anna
 
Posts: 1
Joined: Thu Mar 14, 2019 11:24 pm

Re: Use all ethernet ports bridged like a switch

Postby father.mande » Fri Mar 15, 2019 1:31 am

Hi,
... I don't think any solution exist in A.D.M. (and no possible workaround using VLAN (the most easy way))

Two problems in one :
The bridge itself ...
seem you start as well, but you must add an address on the br0 interface
... by providing a fixed address and corresponding elements (gateway, route, etc.) or using as suggested DHCP client.
... this address become the NAS address BUT depend at what time in boot it's done, perhaps you must have to restart services (SMB, etc.)
... be sure also that route are correct (get the Asustor route definition first)
... be sure that you don't conflict with another bridge (ex. for a VPN)
... if some iptables rules are apply, remove and update them
... ATTENTION a link aggregate (menu in network config of the NAS) can generate also conflict.

Last remember that you must respect (so configure) some rules
... bridge spanning tree
... order of eth based on MAC (low to upper) to avoid problem with network analyzing tools and ARP
... bridge learning state, forwarding state and max wait.

The second point is how to add this at boot ...
... you can follow method proposed by Asustor to add your own init script, but SAME as before take care of the order, start it early (low Sxx value) and restart services already done
... the best is also to add an escape sequence ... to be able in case the bridge don't work as well ... to don't start your init shell with bridge configuration (use wget or curl or nc to call a file or a target ... and if file exist (returned) don't start the shell (it's only an example lot of solutions exist.)

LAST, ask to Asustor to add by default a bridge (even with only one link like eth0 at normal boot) to permit a more easy configuration later and keeping network up, even you do some error in script.

because, I don't own a model with a 10GB interface so don't have specific information on network config for this model.
also, be sure to really need a 10GB link for a workstation, because I don't know the "real" throughput you can expect, this depends of the usage (ex. big 3D graphics, etc. can require 10 GB when other (photo, video ) require 1 GB or 2 GB by aggregation.

Good luck.
Philippe.
AS5002T / AS202TE / AS1002T
APKG Download : https://www.father-mande.ovh/
In addition to this forum ; NOT to replace it
My Forum specific to my APKG : https://www.father-mande.ovh/phpBB3/
User avatar
father.mande
 
Posts: 659
Joined: Sat Sep 12, 2015 2:55 am

Return to [Official] For AS40XX Series

  • You cannot post new topics in this forum
    You cannot reply to topics in this forum
    You cannot edit your posts in this forum
    You cannot delete your posts in this forum
    You cannot post attachments in this forum
  • Who is online

    Users browsing this forum: No registered users and 1 guest