TIME ========= .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **What is TIME?** The TIME protocol is a simple network protocol used for retrieving the current time from a remote server. It allows clients to synchronize their clocks by receiving a timestamp from a server. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Why is TIME useful?** * Provides an easy and lightweight way to synchronize system clocks. * Essential for logging and time-based functions in computer systems. * Often used in legacy systems or where precision time synchronization (like NTP) is not required. * Helps in the alignment of time across devices on a network. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **How it works?** * A client sends a request to a TIME server. * The server responds with the current time in a standardized format. * The client adjusts its system clock based on the received timestamp. * The protocol operates over TCP, using port 37 for communication. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Where is TIME used?** * Often used in older systems or devices that need simple time synchronization. * Primarily found in legacy computing systems or embedded devices. * Used where high precision (like NTP) is not required, and basic time updates are sufficient. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which OSI layer does this protocol belong to?** * The TIME protocol operates at the Application Layer (Layer 7) of the OSI model. * It relies on the Transport Layer for communication, typically using TCP. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Is TIME Windows specific?** * No, TIME is not Windows-specific. * It is supported on various operating systems, including UNIX, Linux, and even some embedded systems. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Is TIME Linux specific?** * No, TIME is not Linux-specific. * It can be implemented on any operating system that supports TCP/IP and can use port 37 for communication. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which Transport Protocol is used by TIME?** * TIME typically uses TCP (Transmission Control Protocol) for communication. * It ensures reliable, ordered transmission of time data from the server to the client. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which Port is used by TIME?** * The TIME protocol operates over TCP port 37 for communication between the client and server. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Is TIME using Client-server model?** * Yes, the TIME protocol follows the client-server model. * The client sends a request to the server, which then responds with the current time. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Topics in this section, * :ref:`Learnings in this section ` * :ref:`Terminology ` * :ref:`Version Info ` * :ref:`TIME Version&RFC Details ` * :ref:`TIME Basic Setup on Ubuntu using IPv4 ` * :ref:`TIME Basic Setup on Ubuntu using IPv6 ` * :ref:`TIME Protocol Packet Details ` * :ref:`TIME Usecases ` * :ref:`TIME Basic Features ` * :ref:`TIME Feature : Simplicity ` * :ref:`TIME Feature : Ligthweight Communication ` * :ref:`TIME Feature : TCP and UDP Support ` * :ref:`TIME Feature : Fixed Epoch ` * :ref:`TIME Feature : Stateless Server ` * :ref:`TIME Feature : Firewall Friendly ` * :ref:`TIME Feature : Cross Platform Compatibility ` * :ref:`TIME Feature : No Authentication Required ` * :ref:`TIME Feature : Legacy System Support ` * :ref:`TIME Feature : Quick Time Retrieval ` * :ref:`Reference links ` .. _TIME_step1: .. tab-set:: .. tab-item:: Learnings in this section * In this section, you are going to learn .. _TIME_step2: .. tab-set:: .. tab-item:: Terminology * Terminology .. _TIME_step3: .. tab-set:: .. tab-item:: Version Info * Version Info .. _TIME_step5: .. tab-set:: .. tab-item:: TIME Version&RFC Details .. csv-table:: :file: ./TIME/TIME_RFC_Details.csv :widths: 10,10,10,30 :header-rows: 1 .. _TIME_step19: .. tab-set:: .. tab-item:: TIME Basic Setup on Ubuntu using IPv4 **TIME protocol over TCP using IPv4 on interface enp0s8** * Step-1: Assign IPv4 Addresses for two VM's. .. code-block:: shell test:~$sudo ip addr add 192.168.200.1/24 dev enp0s8 test:~$sudo ip link set enp0s8 up test:~$sudo ip addr add 192.168.200.2/24 dev enp0s8 test:~$sudo ip link set enp0s8 up * Step-2: Create TIME Service Configs. .. code-block:: shell test:~$sudo nano /etc/xinetd.d/time-tcp * Step-3: Enable and Start xinetd. .. code-block:: shell test:~$sudo systemctl enable xinetd test:~$sudo systemctl restart xinetd * Step-4: Verify TIME service is listening. .. code-block:: shell test:~$sudo netstat -tulnp | grep ":37" * Step-5: Test from Another VM. .. code-block:: shell test:~$rdate -p 192.168.200.1 You should see the current time printed * Step-6: Wireshark Capture. :download:Download wireshark capture