Network Services Flashcards
NTP
NTP is used to synchronize timekeeping among a set of distributed time servers and clients. NTP uses UDP port 123 as both the source and destination, which in turn runs over IP.
An NTP network usually gets its time from an authoritative time source, such as a radio clock or an atomic clock that is attached to a time server. NTP then distributes this time across the network. An NTP client makes a transaction with its server over its polling interval (from 64 to 1024 seconds). This transaction dynamically changes over time depending on the network conditions between the NTP server and the client. No more than one NTP transaction per minute is needed to synchronize two machines.
The communications between machines running NTP (associations) are usually statically configured. Each machine is given the IP addresses of all machines with which it should form associations. However, in a LAN, NTP can be configured to use IP broadcast messages instead. This alternative reduces configuration complexity because each machine can be configured to send or receive broadcast messages. However, the accuracy of timekeeping is marginally reduced because the information flow is one-way only.
NTP Versions
NTPv4 is an extension of NTPv3 and provides the following capabilities:
NTPv4 supports IPv6, making NTP time synchronization possible over IPv6. Security is improved over NTPv3. NTPv4 provides a whole security framework that is based on public key cryptography and standard X.509 certificates. Using specific multicast groups, NTPv4 can automatically calculate its time-distribution hierarchy through an entire network. NTPv4 automatically configures the hierarchy of the servers to achieve the best time accuracy for the lowest bandwidth cost. In NTPv4 for IPv6, IPv6 multicast messages instead of IPv4 broadcast messages are used to send and receive clock updates.
Stratum
NTP uses the concept of a stratum to describe how many NTP hops away a machine is from an authoritative time source. For example, a Stratum 1 time server has a radio or atomic clock that is directly attached to it. It then sends its time to a Stratum 2 time server through NTP, and so on. A machine running NTP automatically chooses the machine with the lowest stratum number that is configured to communicate with by using NTP as its time source. This strategy effectively builds a self-organizing tree of NTP speakers.
NTP Sychronization
NTP avoids synchronizing to a machine whose time may not be accurate in two ways:
NTP never synchronizes to a machine that is not synchronized itself. NTP compares the time that several machines report. NTP will not synchronize to a machine whose time is significantly different from the others, even if its stratum is lower.
NTP Modes
NTP can operate in these four different modes that provide you with the flexibility for configuring time synchronization in your network:
Server Client Peer Broadcast/multicast
NTP Mode - Client
It synchronizes its time to the server.
A device that is an NTP client can act as an NTP server to another device.
NTP Mode - Server
It provides accurate time information to clients.
A device that is an NTP client can act as an NTP server to another device.
NTP Mode - Peer
Peers exchange time synchronization information. The peer mode is also commonly known as symmetric mode. It is intended for configurations where a group of low stratum peers operate as mutual backups for each other.
Symmetric modes are most often used between two or more servers operating as a mutually redundant group and are configured with the ntp peer command. In these modes, the servers in the group members arrange the synchronization paths for maximum performance, depending on network jitter and propagation delay. If one or more of the group members fail, the remaining members automatically reconfigure as required.
NTP Mode - Broadcast/Multicast
The broadcast mode requires a broadcast server on the same subnet. Because routers do not propogate broadcast messages, only broadcast servers on the same subnet are used. Broadcast mode is intended for configurations that involve one or a few servers and a potentially large client population. On a Cisco device, a broadcast server is configured by using the broadcast command with a local subnet address. A Cisco device acting as a broadcast client is configured by using the broadcast client command, allowing the device to respond to broadcast messages that are received on any interface.
NTP Authentication Configuration
Cisco devices support only MD5 authentication for NTP. To configure NTP authentication, follow these steps:
Define the NTP authentication key or keys with the ntp authentication-key command. Every number specifies a unique NTP key. Enable NTP authentication by using the ntp authenticate command. Tell the device which keys are valid for NTP authentication by using the ntp trusted-key command. The only argument to this command is the key that you defined in the first step. 4. Specify the NTP server that requires authentication by using the ntp server ip_address key key_number command. You can similarly authenticate NTP peers by using the ntp server ip_address key key_number command.
Not all clients need to be configured with NTP authentication. NTP does not authenticate clients—it authenticates the source. Therefore, the device will still respond to unauthenticated requests. Be sure to use access lists to limit NTP access.
NTP ACL Restrictions
For NTP, the following four restrictions can be configured through access lists:
peer: Time synchronization requests and control queries are allowed. A device is allowed to synchronize itself to remote systems that pass the access list. serve: Time synchronization requests and control queries are allowed. A device is not allowed to synchronize itself to remote systems that pass the access list. serve-only: It allows synchronization requests only. query-only: It allows control queries only.
PTP
defined in IEEE 1588 as Precision Clock Synchronization for Networked Measurements and Control Systems. PTP was developed to synchronize clocks in packet-based networks that include distributed device clocks of varying precision and stability. PTP is designed specifically for industrial, networked measurement and control systems, and is optimal for use in distributed systems because it requires minimal bandwidth and little processing overhead.
PTP Characteristics
The following are PTP characteristics:
Smart grid power automation applications, such as peak-hour billing, virtual power generators, and outage monitoring and management, require extremely precise time accuracy and stability. Timing precision improves network monitoring accuracy and troubleshooting ability. The PTP message-based protocol can be implemented on packet-based networks, such as Ethernet networks. The benefits of using PTP in an Ethernet network include: Low cost and easy setup in existing Ethernet networks. Limited bandwidth is required for PTP data packets.
Best Master Clock Algorithm (BMCA)
pecifies how each clock on the network determines the best primary clock in its subdomain of all the clocks it can see, including itself. The BMCA runs locally on each port in the network continuously for every announce interval and quickly adjusts for changes in network configuration. BMCA based on IEEE 1588-2008 uses announce messages for advertising clock properties.
BMCA Criteria
The BMCA uses the following criteria to determine the best primary clock in the subdomain:
Clock quality, where GPS is considered the highest quality. Clock accuracy of the clock’s time base. Stability of the local oscillator. Closest clock to the grandmaster.