> -----Original Message-----
> From: Cliff Spradlin <csprad...@google.com>
> Sent: Friday, July 27, 2018 20:24
> To: Andriy Kohut <andr...@mellanox.com>
> Cc: linuxptp-devel@lists.sourceforge.net
> Subject: Re: [Linuxptp-devel] [PATCH 0/4] RAW UDPv4 transport to support PTP
> on VLAN interfaces
> 
> On Fri, Jul 27, 2018 at 10:14 AM Andriy Kohut <andr...@mellanox.com> wrote:
> > The introduced patches add possibility of using PTP in different VLANs on a
> single L2 interface.
> 
> Why not just configure VLANs in Linux?
> 
> ptp4l already supports using VLANs, e.g. ptp4l -i "eth4.55".

VLAN subinterfaces is a traditional way of VLAN configuration in Linux.
This approach requires configuration of IP address on each subinterface to work 
with UPDv4 transport

The new transport however is intended for a different configuration model - 
VLAN aware bridges with many interfaces and the VLAN devices on top of the 
bridge.
Here is an example how to configure it:

  ip link add name br0 type bridge
  ip link set dev br0 type bridge vlan_filtering 1
  ip link set dev br0 up
 
  ip link set dev eth1 master br0
  ip link set dev eth2 master br0

  bridge vlan add vid 20 dev eth1
  bridge vlan add vid 20 dev eth2
  bridge vlan add vid 30 dev eth1

  bridge vlan add vid 20 dev br0 self
  bridge vlan add vid 30 dev br0 self

  ip link add link br0 name br0.20 type vlan id 20
  ip link add link br0 name br0.30 type vlan id 30

  ip addr add 192.168.20.1 dev br0.20
  ip addr add 192.168.30.1 dev br0.30

  ip link set dev br0.20 up
  ip link set dev br0.30 up

PTP4L configuration file:

  [eth1@20]
  vlan 20
  vlan_intf br0.20
  delay_mechanism E2E
  network_transport RAWUDPv4

  [eth1@30]
  vlan 30
  vlan_intf br0.30
  delay_mechanism E2E
  network_transport RAWUDPv4

  [eth2@20]
  vlan 20
  vlan_intf br0.20
  delay_mechanism E2E
  network_transport RAWUDPv4


Thanks,
Andriy
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to