Menu

#66 IP address required in raw Ethernet mode

v1.0_(example)
closed
None
5
2014-02-17
2014-02-12
No

When trying to use:

ptpengine:interface = enp0s25
ptpengine:transport = ethernet

with no IP address assigned to that interface, a failure occurs at startup stage, displaying the following message:

failed to get ip address      (strerror: Cannot assign requested address)
Error: Cannot use enp0s25 interface
PTPDv2 startup failed

According to source code, this message is generated by the findIface function in dep/net.c, with PTPd 2.3.0 on Linux 3.11.10.

In my understanding, such a behavior is incorrect, since raw Ethernet mode should not have anything to do with or somehow rely on IP[v4] or other higher-layer protocols. Indeed, exchanged frames with EtherType 0x88F7 don't mention IP addresses, as far as I can see.

For example, my primary network interface is a soft-bridge named br0, and it has multiple IPv4 addresses assigned to it. But this interface naturally doesn't have hardware timestamping capabilities, thus I need to specify the real physical port named enp0s25 to be sure that hardware timestamping is used. However, PTPd refuses to accept this physical interface, as the latter has no IP addresses. The only solution is to destroy the bridge and assign IP addresses to the physical interface directly, which doesn't seem appropriate.

Discussion

  • Wojciech Owczarek

    You are correct. Ethernet mode should have no dependency on IP addresses. This is a legacy issue from before we had the Ethernet transport implemented, we'll see if we can address it in the near future.

    FYI - ptpd currently has no hardware timestamping support (yet), but the ethernet operation is as close to hardware as possible with software timestamping.

     
  • Wojciech Owczarek

    • status: open --> pending
    • assigned_to: Wojciech Owczarek
     
  • Wojciech Owczarek

    Fix committed in svn 474: findIface is now gone; testInterface will check for the presence of an IP address only when running IP transport.

     
    • Anton Samsonov

      Anton Samsonov - 2014-02-17

      Confirming: that works for me. Thanks!

       
  • Wojciech Owczarek

    • status: pending --> closed
     
  • Wojciech Owczarek

    Confirmed working - closing bug. Tested on Linux, FreeBSD and NetBSD.

     

Log in to post a comment.