2015-03-25 1:44 GMT+01:00 Maciej Żenczykowski <[email protected]>:
> >> 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 > Well, I had almost the same problem but eventually I gave up because it was not really relevantfor me. I'm a bit astonished that there is no command like "show mac-address-table" that Cisco devices have to know behind which ethernet interface a MAC address resides. As somebody else has already remarked, the switch OpenWRT works with MUST know out of which port send the frame and hence it must have a small db of them somewhere in memory. It's just a matter of retrieving that information, nothing more. If I have understood correctly what Maciej suggested he wants to create a software-switch by creating different vlan interfaces and then grouping them with brctl. Well, nice trick to create L3 interfaces and then group them back to a L2 one: I know it works but it's just overcomplicating things when that information should be already at hand. Unless when OpenWRT needs to send a frame it just passes it onto the switch and then the switch in hardware takes care. Is there any way to query the switch? My two cents, Alex
_______________________________________________ openwrt-users mailing list [email protected] https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-users
