On Wed, Nov 23, 2022 at 03:12:36PM +0100, Miroslav Lichvar wrote:
> This is not an issue with the protocol. As I understand it, the kernel
> will normally not send or accept a unicast packet to itself over a
> real network interface. It has the loopback interface for that.
> 
> One way to get around that is to use multiple network namespaces.

You can run 2x ptp4l, one on each port.

If you use layer2 transport (-2 command line option) then it just
works.

If you want UDP transport, then you must configure the kernel
networking stack to accept messages from itself:

        # In order to run PTP tests with two or more local interfaces, the
        # kernel must be told to accept packets from a local address.
        
        all="eth6 eth4 eth3"
        
        for x in $all; do
                echo 1 > /proc/sys/net/ipv4/conf/$x/accept_local
        done

HTH,
Richard




_______________________________________________
Linuxptp-users mailing list
Linuxptp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-users

Reply via email to