[Linuxptp-users] PTP sync over UDP fails. Slave is selected as Best Master Clock

2018-10-18 Thread Dolly Gyanchandani
I was facing the same issue. The slave always chose its own clock as the
best master clock.

In my case, that was because the UDP ports 319 and 320 required for ptp4l
were not open on the master and slave.

After adding the iptables entry for ports 319 and 320 in both master and
slave, the slave was able to sync its time from the master clock as
expected.

# *iptables -I INPUT -p udp -m udp --dport 319 -j ACCEPT*
# *iptables -I INPUT -p udp -m udp --dport 320 -j ACCEPT*

You can refer to this link for details:
https://docs.oracle.com/cd/E37670_01/E41138/html/section_kpy_1gh_pp.html

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


Re: [Linuxptp-users] PTP sync over UDP fails. Slave is selected as Best Master Clock

2018-04-13 Thread Florent Lambert
I have found the solution. For people experiencing the same issue here is
what I did wrong :

1) In my environment, the domainNumber was not the default one and so I had
to modify it.

2) I was using a separate interface, not my regular internet interface
(en0). Since I was using PTP over UDP, the interface must have an IP !

Thank you.

2018-04-12 16:07 GMT+02:00 Florent Lambert :

> Hello,
>
> I try to be PTP synchronized with my network over UDP. Although I receive
> PTP packets (tested with tcpdump, see below for capture), when I run ptp4l,
> the local clock is elected as best master. It is as if there was no other
> master clock in the network. I can't find why.
>
>
> Here are some details of my environment :
> NIC : Intel X710
> NIC driver : i40e 2.4.6 (latest, compiled with CFLAGS_EXTRA="-DI40E_PTP")
> NIC firmware : NVM 6.01 (latest)
> Kernel version : 3.10.0-693.21.1.e17.x86_64
> CentOS 7.4.1708
> linuxptp : 1.8
>
> I tried with linux ptp from 1.6 to 1.9.2.
> I tried with different  i40e driver/NIC firmware/kernel/linuxptp matching
> version.
>
> I know for sure that in my network, there is a working grand master. There
> is a switch in between me and the master but the switch is normally
> properly configurated.
>
> The config I use for ptp4l match the grand master's one.
>
> Here is the output of ptp4l :
>
> ptp4l -i interface -f /etc/ptp4l.conf -smq
>
> ptp4l[5042.815]: selected /dev/ptp1 as PTP clock
> ptp4l[5042.816]: port 1: INITIALIZING to LISTENING on INITIALIZE
> ptp4l[5042.816]: port 0: INITIALIZING to LISTENING on INITIALIZE
> ptp4l[5042.816]: port 1: link up
> ptp4l[5043.674]: selected best master clock 3cfdfe.fffe.a13059
> ptp4l[5044.576]: selected best master clock 3cfdfe.fffe.a13059
> ptp4l[5045.573]: selected best master clock 3cfdfe.fffe.a13059
>
> I get the same exact output if i don't even use a config file.
>
> The MAC address 3c:fd:fe:a1:30:59 is the MAC adress of the specified
> interface. (The interface that should be slave!)
> I don't have any logs like "new foreign master" ...
>
> Here is what a tcpdump on the interface looks like :
>
> 15:59:18.470412 IP 10.22.8.19.ptp-general > 224.0.1.129.ptp-general: UDP,
> length 60
> 15:59:18.471144 IP 10.22.8.3.ptp-general > 224.0.1.129.ptp-general: UDP,
> length 60
> 15:59:18.471441 IP 10.22.8.19.ptp-general > 224.0.1.129.ptp-general: UDP,
> length 60
> 15:59:18.472071 IP 10.22.8.19.ptp-general > 224.0.1.129.ptp-general: UDP,
> length 60
> 15:59:18.472552 IP 10.22.8.3.ptp-general > 224.0.1.129.ptp-general: UDP,
> length 60
> 15:59:18.473185 IP 10.22.8.3.ptp-general > 224.0.1.129.ptp-general: UDP,
> length 60
> 15:59:18.473656 IP 10.22.8.19.ptp-general > 224.0.1.129.ptp-general: UDP,
> length 60
> 15:59:18.476813 IP 10.195.1.250.ptp-general > 224.0.1.129.ptp-general:
> UDP, length 100
> 15:59:18.479403 IP 10.22.8.3.ptp-general > 224.0.1.129.ptp-general: UDP,
> length 60
> 15:59:18.479816 IP 10.22.8.19.ptp-general > 224.0.1.129.ptp-general: UDP,
> length 60
> 15:59:18.482479 IP 10.195.1.250.ptp-general > 224.0.1.129.ptp-general:
> UDP, length 100
> 15:59:18.485089 IP 10.22.8.3.ptp-general > 224.0.1.129.ptp-general: UDP,
> length 60
> 15:59:18.485488 IP 10.22.8.19.ptp-general > 224.0.1.129.ptp-general: UDP,
> length 60
> 15:59:18.487728 IP 10.195.1.250.ptp-general > 224.0.1.129.ptp-general:
> UDP, length 100
> 15:59:18.490379 IP 10.22.8.3.ptp-general > 224.0.1.129.ptp-general: UDP,
> length 60
> 15:59:18.490897 IP 10.22.8.19.ptp-general > 224.0.1.129.ptp-general: UDP,
> length 60
> 15:59:18.491309 IP 172.27.105.251.ptp-event > 224.0.1.129.ptp-event: UDP,
> length 44
> 15:59:18.518822 IP 172.27.105.251.ptp-general > 224.0.1.129.ptp-general:
> UDP, length 44
> 15:59:18.616328 IP 172.27.105.251.ptp-event > 224.0.1.129.ptp-event: UDP,
> length 44
> 15:59:18.620510 IP 172.27.105.251.ptp-general > 224.0.1.129.ptp-general:
> UDP, length 44
>
>
> I must be missing something. Any help is appreciated. I can provide other
> information if needed !
>
> Thanks.
>
>
>
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Linuxptp-users mailing list
Linuxptp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-users


[Linuxptp-users] PTP sync over UDP fails. Slave is selected as Best Master Clock

2018-04-12 Thread Florent Lambert
Hello,

I try to be PTP synchronized with my network over UDP. Although I receive
PTP packets (tested with tcpdump, see below for capture), when I run ptp4l,
the local clock is elected as best master. It is as if there was no other
master clock in the network. I can't find why.


Here are some details of my environment :
NIC : Intel X710
NIC driver : i40e 2.4.6 (latest, compiled with CFLAGS_EXTRA="-DI40E_PTP")
NIC firmware : NVM 6.01 (latest)
Kernel version : 3.10.0-693.21.1.e17.x86_64
CentOS 7.4.1708
linuxptp : 1.8

I tried with linux ptp from 1.6 to 1.9.2.
I tried with different  i40e driver/NIC firmware/kernel/linuxptp matching
version.

I know for sure that in my network, there is a working grand master. There
is a switch in between me and the master but the switch is normally
properly configurated.

The config I use for ptp4l match the grand master's one.

Here is the output of ptp4l :

ptp4l -i interface -f /etc/ptp4l.conf -smq

ptp4l[5042.815]: selected /dev/ptp1 as PTP clock
ptp4l[5042.816]: port 1: INITIALIZING to LISTENING on INITIALIZE
ptp4l[5042.816]: port 0: INITIALIZING to LISTENING on INITIALIZE
ptp4l[5042.816]: port 1: link up
ptp4l[5043.674]: selected best master clock 3cfdfe.fffe.a13059
ptp4l[5044.576]: selected best master clock 3cfdfe.fffe.a13059
ptp4l[5045.573]: selected best master clock 3cfdfe.fffe.a13059

I get the same exact output if i don't even use a config file.

The MAC address 3c:fd:fe:a1:30:59 is the MAC adress of the specified
interface. (The interface that should be slave!)
I don't have any logs like "new foreign master" ...

Here is what a tcpdump on the interface looks like :

15:59:18.470412 IP 10.22.8.19.ptp-general > 224.0.1.129.ptp-general: UDP,
length 60
15:59:18.471144 IP 10.22.8.3.ptp-general > 224.0.1.129.ptp-general: UDP,
length 60
15:59:18.471441 IP 10.22.8.19.ptp-general > 224.0.1.129.ptp-general: UDP,
length 60
15:59:18.472071 IP 10.22.8.19.ptp-general > 224.0.1.129.ptp-general: UDP,
length 60
15:59:18.472552 IP 10.22.8.3.ptp-general > 224.0.1.129.ptp-general: UDP,
length 60
15:59:18.473185 IP 10.22.8.3.ptp-general > 224.0.1.129.ptp-general: UDP,
length 60
15:59:18.473656 IP 10.22.8.19.ptp-general > 224.0.1.129.ptp-general: UDP,
length 60
15:59:18.476813 IP 10.195.1.250.ptp-general > 224.0.1.129.ptp-general: UDP,
length 100
15:59:18.479403 IP 10.22.8.3.ptp-general > 224.0.1.129.ptp-general: UDP,
length 60
15:59:18.479816 IP 10.22.8.19.ptp-general > 224.0.1.129.ptp-general: UDP,
length 60
15:59:18.482479 IP 10.195.1.250.ptp-general > 224.0.1.129.ptp-general: UDP,
length 100
15:59:18.485089 IP 10.22.8.3.ptp-general > 224.0.1.129.ptp-general: UDP,
length 60
15:59:18.485488 IP 10.22.8.19.ptp-general > 224.0.1.129.ptp-general: UDP,
length 60
15:59:18.487728 IP 10.195.1.250.ptp-general > 224.0.1.129.ptp-general: UDP,
length 100
15:59:18.490379 IP 10.22.8.3.ptp-general > 224.0.1.129.ptp-general: UDP,
length 60
15:59:18.490897 IP 10.22.8.19.ptp-general > 224.0.1.129.ptp-general: UDP,
length 60
15:59:18.491309 IP 172.27.105.251.ptp-event > 224.0.1.129.ptp-event: UDP,
length 44
15:59:18.518822 IP 172.27.105.251.ptp-general > 224.0.1.129.ptp-general:
UDP, length 44
15:59:18.616328 IP 172.27.105.251.ptp-event > 224.0.1.129.ptp-event: UDP,
length 44
15:59:18.620510 IP 172.27.105.251.ptp-general > 224.0.1.129.ptp-general:
UDP, length 44


I must be missing something. Any help is appreciated. I can provide other
information if needed !

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