[OpenWrt-Devel] lantiq/xrx200-net: separate lan and wan ports

Martin Schiller mschiller at tdt.de
Thu Feb 18 05:16:03 EST 2016


On 02/16/2016 at 9:46 AM, Martin Schiller wrote:
> On 02/16/2016 at 8:32 AM, Martin Blumenstingl wrote:
> > On Tue, Feb 16, 2016 at 8:06 AM, Martin Schiller <mschiller at tdt.de> wrote:
> > > Hi!
> > >
> > > I need to set up the xrx200 switch with one LAN switch part (phy2-phy5)
> > and one WAN port (phy1).
> > >
> > > The problem is, that I can see the LAN traffic on the WAN port and vice
> > versa.
> > >
> > > It doesn't also matter if SW_PORTMAP is defined or not.
> > >
> > > I think it maybe has something to do with the PCE_PMAPx setup, but
> how
> > to set this port mappings to get separated LAN and WAN groups?
> > I think you are right on this one. There's one user who investigated
> > some PPPoE/broadcast issue with the WAN port and here's what he found
> > out: [0]
> > Here's where the initialization takes place in the OpenWrt driver: [1]
> >
> > To sum up "ased's" findings, the original driver (at least in some of
> > the ifxmips_ppa_datapath_vr9_* configurations):
> > - PCE_PMAP1 is set to 0x40 (= port 7 / CPU port) instead of 0x7f (= all ports)
> > - PCE_PMAP2 and 3 are set to 0x7f & (~priv->hw->wan_map) ("all but the
> > configured WAN port(s)")
>
> I've already tried this and it will fix only half the problem:
> By removing the wan port from this port mappings, there will be no LAN
> traffic on the WAN port any more.
> But the incoming WAN traffic is still on the LAN side.
>
> I also wonder what the PMAC_EWAN register setting may have to do with
> this, or what it is good for at all.

After crawling through a lots of documents I found an Application Note from Lantiq which includes some kind of "best practice" for this use case.
As this document is distributed to us with NDA, I will use my own words. :-)

- enable global VLAN support
- add the WAN port(s) to the Ethernet WAN group (PMAC_EWAN)
- enable VLAN transparent mode on all ports
- for all LAN ports: PVID = <lan_vid>, FID (Filtering Identifier) = <lan_fid>
- on the CPU port: PVID = <cpu_vid>, FID = <lan_fid>
- for all WAN ports: PVID= <wan_vid>, FID = <wan_fid>
- vlan group <lan_vid> includes all LAN ports + CPU port, all untagged
- vlan group <cpu_vid> includes all ports, all untagged
- vlan group <wan_vid> includes all WAN ports + CPU port, all untagged
- UUCMAP (unknown unicast port map) = 0x7F
- DMCPMAP (unknown multicast, broadcast port map) = 0x7F

To do this, there are some changes on the xrx200net driver neccessary (dedicated PVID setup; one port can be (untagged) member of multiple VLAN groups, FID (Filtering Identifier) support)

My first test seems ok so far.

Some patches will follow.

>
> >
> > I don't have access to the datasheets, so I cannot say what
> > "monitoring" means exactly (PCE_PMAP1).
> > Unfortunately I did not have time to play around with it yet, so I
> > can't tell you much more.
> > But maybe someone with access to the datasheets can at least confirm
> > this and explain the PCE_PMAP1 register.

The PCE_PMAP1 register isn't usefull in this context und should be left with the reset value 0x00 so far.
As far as I understand this register is for monitoring / redirection purposes, where all/some configured kind of packets are send to these mapped ports.

> >
> >
> > Regards,
> > Martin
> >
> >
> > [0] http://openwrt.ebilan.co.uk/viewtopic.php?p=893#p893
> > [1]
> >
> https://github.com/openwrt/openwrt/blob/master/target/linux/lantiq/patc
> > hes-4.4/0025-NET-MIPS-lantiq-adds-xrx200-net.patch#L1696


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list