netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Benjamin Beckmeyer <beb@eks-engel.de>
Cc: netdev@vger.kernel.org
Subject: Re: DSA with MV88E6321 and imx28
Date: Tue, 11 Jun 2019 14:19:38 +0200	[thread overview]
Message-ID: <20190611121938.GA20904@lunn.ch> (raw)
In-Reply-To: <635c884a-185d-5b3b-7f91-ce058d9726f4@eks-engel.de>

On Tue, Jun 11, 2019 at 09:36:16AM +0200, Benjamin Beckmeyer wrote:
> >> So all ports are now in forwarding mode (Switch port register 0x4 of all ports 
> >> are 0x7f), but I don't reach it over ping.
> > Hi
> >
> > The most common error for people new to DSA is forgetting to bring
> > the master interface up.
> >
> > The second thing to understand is that by default, all interfaces are
> > separated. So the switch won't bridge frames between ports, until you
> > add the ports to a Linux bridge. But you can give each interface its
> > own IP address.
> >
> >     Andrew
> 
> Hi Andrew,
> thanks for your help again. Sorry for the late reply we had a stats day yesterday. 
> What interface do you mean with master interface? I assume, you mean eth0 (cpu port)?

Yes. The master interface is the pipe between the host and the
switch. It is only used as a pipe. It needs to be up, but there is no
point having an IP address on it, since it cannot send packets itself.

lan1-4 are slave interfaces. They can have IP addresses.

> I deleted the IP address of this interface and tried to add it to the bridge:
> 
> brctl addif bridge0 eth0
> brctl: bridge bridge0: Invalid argument

Yes, you should not do this. Just have the master interface up, but
otherwise leave it alone. It also needs to be up before you bring the
slave interfaces up.

> I tried this with all lan1-4 interfaces and they just work and directly after
> I added them I got some information about the port:
> 
> brctl addif br0 lan4
> [  156.085842] br0: port 4(lan4) entered blocking state
> [  156.091022] br0: port 4(lan4) entered disabled state
> 
> After I brought up the bridge with:
> 
> ip link set br0 up
> [  445.313697] br0: port 4(lan4) entered blocking state
> [  445.318896] br0: port 4(lan4) entered forwarding state
> 
> So I gave my eth0 an IP address and started tcpdump on eth0:

No. If you have created a bridge, put the IP address on the bridge.
If you have a slave which is not part of the bridge, you can give it
an IP address. Just treat the interfaces as Linux interfaces. Run
dhclient on them, use ethtool, iproute2, an snmp agent, add them to a
bridge. They are just normal Linux interfaces, which can make use of
the switch hardware to accelerate some operations, like bridging
frames.

   Andrew

  reply	other threads:[~2019-06-11 12:19 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-04 13:07 DSA with MV88E6321 and imx28 Benjamin Beckmeyer
2019-06-04 13:50 ` Andrew Lunn
2019-06-05  4:52   ` Benjamin Beckmeyer
2019-06-05 12:24     ` Andrew Lunn
2019-06-05 13:12       ` Benjamin Beckmeyer
2019-06-05 13:31         ` Andrew Lunn
2019-06-05 13:54           ` Benjamin Beckmeyer
2019-06-05 18:47             ` Andrew Lunn
2019-06-06  9:39               ` Benjamin Beckmeyer
     [not found]               ` <c27f2b9b-90d7-db63-f01c-2dfaef7a014b@eks-engel.de>
     [not found]                 ` <20190606122437.GA20899@lunn.ch>
2019-06-06 13:27                   ` Benjamin Beckmeyer
2019-06-06 13:35                     ` Andrew Lunn
2019-06-06 13:47                       ` Benjamin Beckmeyer
2019-06-06 13:59                         ` Andrew Lunn
2019-06-07  9:41                           ` Benjamin Beckmeyer
2019-06-07 12:47                             ` Andrew Lunn
2019-06-11  7:36                               ` Benjamin Beckmeyer
2019-06-11 12:19                                 ` Andrew Lunn [this message]
2019-06-11 13:09                                   ` Benjamin Beckmeyer
2019-06-11 13:27                                     ` Andrew Lunn
2019-06-12  9:05                                       ` Benjamin Beckmeyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190611121938.GA20904@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=beb@eks-engel.de \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).