>> One possibility would be to make a separate vlan for each switch port
>> and bridge them all.
>
> Do you mean, VLAN 100-105 (example) and every is TAGGED on a port?
> Could you send me a example config to do what you mean?
> I'm not sure I understood it... :(

I'm not sure what hardware you're using, but I assume it probably has
1 (or more) wifi chips/cards and a switch chip (which probably shows
up as the eth0 'nic').  Sometimes there's also a dedicated eth1 which
bypasses the chip (sometimes this bypass is physical, sometimes it is
actually configurable in the switch chip).
Ignore wifi.

Fundamentally for wired there's two possibilities.

(a) just a switch chip, vlan's are used to make one port WAN and the
rest LAN, switching happens in chip.
eth0.X is WAN
eth0.Y is bridged with wifi interface(s) into LAN
It's common for X and Y to be 0/1 1/0 1/2 2/1

(b) there's actually a separate interface for WAN
ethA is WAN
ethB.X is bridged with wifi interface(s) into LAN
A is probably 1, B is probably 0, X is probably 0 or 1

Now what you actually want depends on whether you have (a) or (b)

(a)
eth0.X is WAN
eth0.Y1 eth0.Y2 eth0.Y3 ... and wifi interfaces are bridged into LAN

(b)
ethA is WAN
ethB.Y1 ethB.Y2 ethB.Y3 ... and wifi interfaces are bridged into LAN

You'll have to edit /etc/config/network.

Something like the following, but note, the following is for
configuration (a), it is copied from an 8.09.2 ancient WRT54GL router,
and it is modified post-copy so will probably need adjusting
(in particular I'm not sure how to specify multiple interfaces to add
to a bridge, it's probably either multiple lines, or space or comma
separated in a single line)

Furthermore using software switching (which this does) will be slower
then using hardware switching.

#### VLAN configuration
# Port 0 - LAN [right-most] (switch)
# Port 1 - LAN [right-mid]  (voip)
# Port 2 - LAN [left-mid]   (desktop)
# Port 3 - LAN [left-most]  (nas)
# Port 4 - WAN [separate]   (cablemodem)
# Port 5 - cpu
config switch eth0
option vlan0 "5t*"
option vlan1 "4 5t"
option vlan2 ""
option vlan3 ""
option vlan4 ""
option vlan5 ""
option vlan6 ""
option vlan7 ""
option vlan8 ""
option vlan9 ""
option vlan10 "0 5t"
option vlan11 "1 5t"
option vlan12 "2 5t"
option vlan13 "3 5t"
option vlan14 ""
option vlan15 ""


#### Loopback configuration
config interface loopback
option ifname "lo"
option proto static
option ipaddr 127.0.0.1
option netmask 255.0.0.0


#### LAN configuration
config interface lan
option type bridge
option ifname "eth0.10"
option ifname "eth0.11"
option ifname "eth0.12"
option ifname "eth0.13"
option proto static
option ipaddr 192.168.1.1
option netmask 255.255.255.0


#### WAN configuration
config interface wan
option ifname "eth0.1"
# option proto dhcp
option proto static
option ipaddr A.B.C.D
option netmask 255.255.255.0
option gateway A.B.C.E
option dns      "8.8.4.4 8.8.8.8"

I'm guessing that this above configuration format is long obsolete
now, read up on http://wiki.openwrt.org/doc/uci/network


> But the Switch MUST know this information or it could not route the
> packets...

The hardware switch knows it, yes.  That doesn't mean it is willing to
give up this hard earned knowledge.
It can be stubborn.  There's a possibility there is no way to get it
out of the hardware.  And even if the hardware
exposes this information via some mechanism, it is pretty likely that
there is no driver to actually read it out of the hardware.
_______________________________________________
openwrt-users mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-users

Reply via email to