Netdev List
 help / color / mirror / Atom feed
* query on VLAN with linux DSA ports
@ 2024-10-24 14:14 SIMON BABY
  2024-10-24 14:29 ` Andrew Lunn
  0 siblings, 1 reply; 6+ messages in thread
From: SIMON BABY @ 2024-10-24 14:14 UTC (permalink / raw)
  To: netdev, Andrew Lunn

Hello Team,

Can I know what is the best way of  implementing VLAN on linux DSA user ports ?

I would like to know if I can go with VLAN interface or VLAN filtering
on bridge interface. I am using Marvel DSA  (88E6390) running on Linux
6.1 kernel.

Below is my requirement.

eth0 (conduit interface)

lan1 ----VLAN 10    192.168.1.1/24
lan2 ----VLAN 10

lan3 -----VLAN 20   192.168.2.1/24

lan4------VLAN 30    192.168.3.1/24

Do I need to create a separate bridge interface for each port which
belongs to different subnets?

Is it better to use a VLAN aware bridge (with vlan_filitering = 1) or
create multiple vlan interfaces ?


Thanks, Simon

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: query on VLAN with linux DSA ports
  2024-10-24 14:14 query on VLAN with linux DSA ports SIMON BABY
@ 2024-10-24 14:29 ` Andrew Lunn
  2024-10-24 15:15   ` SIMON BABY
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Lunn @ 2024-10-24 14:29 UTC (permalink / raw)
  To: SIMON BABY; +Cc: netdev

On Thu, Oct 24, 2024 at 07:14:28AM -0700, SIMON BABY wrote:
> Hello Team,
> 
> Can I know what is the best way of  implementing VLAN on linux DSA user ports ?

Ignore the fact these are ports on a switch. How would you do this if
for any sort of linux interface?

	Andrew

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: query on VLAN with linux DSA ports
  2024-10-24 14:29 ` Andrew Lunn
@ 2024-10-24 15:15   ` SIMON BABY
  2024-10-29 15:36     ` Vladimir Oltean
  0 siblings, 1 reply; 6+ messages in thread
From: SIMON BABY @ 2024-10-24 15:15 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: netdev

Thank you.

I have the below query specific to linux.

I read that there are two approaches for VLAN configuration in Linux.

The traditional way of creating a vlan interface and assigning an IP
address to the interface and the vlan aware bridge. Do you recommend a
better way from these two approaches? Any advantages of using vlan
aware bridges?

option 1:

ip link set dev eth0 up
ip link add link eth0 name eth0.10 up type vlan id 10
ip addr add dev eth0.10 192.0.2.2/24
ip route add default via 192.0.2.1 dev eth0.10

option 2:

ip link add name br0 type bridge vlan_filtering 1
ip link set dev eth0 master br0
ip link set br0 up
bridge vlan add vid 10 dev br0 pvid untagged self
bridge vlan add vid 10 dev eth0 pvid
ip addr add 192.0.2.2/24 dev br0
ip route add default via 192.0.2.1



Regards
Simon

On Thu, Oct 24, 2024 at 7:29 AM Andrew Lunn <andrew@lunn.ch> wrote:
>
> On Thu, Oct 24, 2024 at 07:14:28AM -0700, SIMON BABY wrote:
> > Hello Team,
> >
> > Can I know what is the best way of  implementing VLAN on linux DSA user ports ?
>
> Ignore the fact these are ports on a switch. How would you do this if
> for any sort of linux interface?
>
>         Andrew

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: query on VLAN with linux DSA ports
  2024-10-24 15:15   ` SIMON BABY
@ 2024-10-29 15:36     ` Vladimir Oltean
  2024-10-30  5:04       ` SIMON BABY
  2024-11-08  1:26       ` SIMON BABY
  0 siblings, 2 replies; 6+ messages in thread
From: Vladimir Oltean @ 2024-10-29 15:36 UTC (permalink / raw)
  To: SIMON BABY; +Cc: Andrew Lunn, netdev

On Thu, Oct 24, 2024 at 08:15:50AM -0700, SIMON BABY wrote:
> Any advantages of using vlan aware bridges?

Bridges can have more than one lower interface, unlike VLAN (8021q) interfaces.
The lower interfaces of a bridge will forward packets between each other
according to the destination MAC address (optionally + VLAN ID), which is
something VLANs don't do.

I don't believe that a bridge with a single lower interface (port), as in
your example, is exactly "intended use".

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: query on VLAN with linux DSA ports
  2024-10-29 15:36     ` Vladimir Oltean
@ 2024-10-30  5:04       ` SIMON BABY
  2024-11-08  1:26       ` SIMON BABY
  1 sibling, 0 replies; 6+ messages in thread
From: SIMON BABY @ 2024-10-30  5:04 UTC (permalink / raw)
  To: Vladimir Oltean; +Cc: Andrew Lunn, netdev

Thank you Vladimir.

Regards
Simon

On Tue, Oct 29, 2024 at 8:36 AM Vladimir Oltean <olteanv@gmail.com> wrote:
>
> On Thu, Oct 24, 2024 at 08:15:50AM -0700, SIMON BABY wrote:
> > Any advantages of using vlan aware bridges?
>
> Bridges can have more than one lower interface, unlike VLAN (8021q) interfaces.
> The lower interfaces of a bridge will forward packets between each other
> according to the destination MAC address (optionally + VLAN ID), which is
> something VLANs don't do.
>
> I don't believe that a bridge with a single lower interface (port), as in
> your example, is exactly "intended use".

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: query on VLAN with linux DSA ports
  2024-10-29 15:36     ` Vladimir Oltean
  2024-10-30  5:04       ` SIMON BABY
@ 2024-11-08  1:26       ` SIMON BABY
  1 sibling, 0 replies; 6+ messages in thread
From: SIMON BABY @ 2024-11-08  1:26 UTC (permalink / raw)
  To: Vladimir Oltean; +Cc: Andrew Lunn, netdev

Hello Team,

Do we have any patch available for linux DSA interface for configuring
QOS in marvel 88E6390 switch hardware?

Regards
Simon


On Tue, Oct 29, 2024 at 8:36 AM Vladimir Oltean <olteanv@gmail.com> wrote:
>
> On Thu, Oct 24, 2024 at 08:15:50AM -0700, SIMON BABY wrote:
> > Any advantages of using vlan aware bridges?
>
> Bridges can have more than one lower interface, unlike VLAN (8021q) interfaces.
> The lower interfaces of a bridge will forward packets between each other
> according to the destination MAC address (optionally + VLAN ID), which is
> something VLANs don't do.
>
> I don't believe that a bridge with a single lower interface (port), as in
> your example, is exactly "intended use".

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-11-08  1:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-24 14:14 query on VLAN with linux DSA ports SIMON BABY
2024-10-24 14:29 ` Andrew Lunn
2024-10-24 15:15   ` SIMON BABY
2024-10-29 15:36     ` Vladimir Oltean
2024-10-30  5:04       ` SIMON BABY
2024-11-08  1:26       ` SIMON BABY

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox