12 NTP

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Networkforyou

Welcome
To
Network for you
NTP

Email us: 1 of 7 WhatsApp Us : +966532984612


networkforyou4@gmail.com
Networkforyou

NTP (Network time protocol):

• NTP stand for Network Time Protocol.


• NTP is use to provide time.
• NTP is used to allow network devices to synchronize clocks with central source clock.
• NTP is very important for network devices like routers, switches, server and firewalls.
• NTP make sure logging information and timestamps have the accurate time and date.
• NTP is runs over User Datagram Protocol (UDP).
• NTP is a protocol used on networks to maintain clock time.
• NTP uses a hierarchical system of time sources.
• NTP used client server architecture to work.
• NTP uses UDP port number 123.
• NTP have two version NTP Version 3 and Version 4.
• NTP Server is also called as NTP Master.
• CISCO Router and Switch can be configured in three modes Server, Client and Server/Client Mode.
• By default router works in NTP Server/Client mode.
• Stratum defines the reliability and accuracy of NTP source.
• NTP uses of stratum 0 to Stratum 15 for NTP Sources.
• One (1) is the most reliable and 15 are the worst NTP sources.
• Stratum 0 represents Atomic Clock and not used in CISCO Router or Switch.
• Stratum 1 to 15 are valid levels and used in CISCO Router and Switches.
• Stratum 16 represents NTP is not synchronized.
• Default stratum level of CISCO Router or Switches internal clock is 8.
• Syslog messages timestamp using the Network Time Protocol (NTP).

Email us: 2 of 7 WhatsApp Us : +966532984612


networkforyou4@gmail.com
Networkforyou

NTP Stratum:

• NTP Stratum levels define the distance from the reference clock.
• A Stratum- 0 device that is assumed to be most accurate and it has no dely.
• NTP Stratum -0 servers cannot be used on the network.

Email us: 3 of 7 WhatsApp Us : +966532984612


networkforyou4@gmail.com
Networkforyou

NTP Architecture:

• NTP uses stratums 1 to 16 to define clock accuracy.


• A lower NTP stratum value represents higher accuracy.
• Clocks at NTP stratums 1 through 15 are in synchronized state.
• Clocks at Network Time Protocol stratum 16 are not synchronized.

NTP Modes:

• CISCO Router and Switches can use four different NTP modes.
1. NTP Server,
2. NTP Client,
3. NTP Server/Client
4. NTP Peer

NTP Server Mode:

• NTP Server is a network device, which running NTP service.


• NTP Server is configured to provide Time information to NTP Clients.
• NTP Server never accept time synchronization information from other devices.
• NTP Server mode router reads time from NTP source or uses its own clock as NTP source.

NTP Client Mode:

• NTP Clients mode Only receives NTP updates.


• NTP Clients does not advertise received updates.
• NTP Clients uses them to synchronize its own clock.

NTP Server/Clients Mode:

• NTP Server/Clients, Router receives updates from NTP Server.


• NTP Server/Clients also advertises them from its own interfaces.
• CISCO Router and Switch play both role NTP Server and Clients.
• As NTP Clients, it received NTP updates and as NTP Server, it advertises NTP updates.

NTP Peer Mode:

• In NTP peer modes each device can provide time synchronization to other.
• So, one can synchronize the other in case of failures.

Email us: 4 of 7 WhatsApp Us : +966532984612


networkforyou4@gmail.com
Networkforyou

NTP Master:

• When we make NTP master then internal devices can synchronize use NTP master command.
• NTP Master command tells router that it is an NTP Server.
• NTP Server is also referred to as an NTP Master.

NTP Versions:

• We have two NTP version that is version 3 and version 4.


• Version 4 supports IPV6 and it backwards compatible with NTP version 3.
• NTP Version 4 also adds DNS support for IPV6.
• NTPv3 use broadcast messages where as NTPV4 use Multicast.
• NTPV4 is more secure compare to NTP V3.

NTP Security and Authentication:

• NTP can be secured by authentication mechanism that uses MD5 algorithm.


• All NTP packets that can update the clock have to be authenticated.
• The packets will be authenticated using HMAC MD5 which carries a key number.

NTP Lab in Packet Tracer:

Email us: 5 of 7 WhatsApp Us : +966532984612


networkforyou4@gmail.com
Networkforyou

R1 Configuration: SW1 Configuration:


en en
config t config t
hostname R1 hostname SW1
int f0/0
ip add 192.168.1.1 255.255.255.0 int vlan 1
no sh ip add 192.168.1.3 255.255.255.0
no sh
ntp server 192.168.1.2
ip default-gateway 192.168.1.1

ntp server 192.168.1.2


SW2 Configuration: SW3 Configuration:
en en
config t config t
hostname SW2 hostname SW3

int vlan 1 int vlan 1


ip add 192.168.1.4 255.255.255.0 ip add 192.168.1.5 255.255.255.0
no sh no sh
ip default-gateway 192.168.1.1
ip default-gateway 192.168.1.1
ntp server 192.168.1.2
ntp server 192.168.1.2
Output: R1#sh clock
12:18:16.312 UTC Sun Jan 17 2021
Sh ntp status R1#sh ntp status
Sh clock Clock is synchronized, stratum 16, reference is
192.168.1.2
nominal freq is 250.0000 Hz, actual freq is
249.9990 Hz, precision is 2**24
reference time is 17EB4FF2.000002C1
(21:58:10.705 UTC Sat Dec 5 2048)
clock offset is 0.00 msec, root delay is 0.00
msec
root dispersion is 10.00 msec, peer dispersion
is 0.12 msec.
loopfilter state is 'CTRL' (Normal Controlled
Loop), drift is - 0.000001193 s/s system poll
interval is 4, last update was 11 sec ago.

Email us: 6 of 7 WhatsApp Us : +966532984612


networkforyou4@gmail.com
Networkforyou

Lab Time:

R1 Configuration R2 Configuration
en en
config t config t
hostname R1 hostname R2

int f0/0
int f0/0 ip add 192.168.1.2 255.255.255.0
ip add dhcp no sh
no sh
exit

ip name-server 8.8.8.8
ip domain-lookup

int f1/0
ip add 192.168.1.1 255.255.255.0
no sh ip domain-lookup

Adjust Router Clock (R1)


Sh clock
Sh clock detail
Clock set 22:36:00 Oct 20 2020
Config t: Clock timezone UTC+3
Show clock
Config t: ntp server sa.pool.ntp.org
Sh ntp status
Sh ntp associations

Email us: 7 of 7 WhatsApp Us : +966532984612


networkforyou4@gmail.com

You might also like