1.5 KiB
1.5 KiB
LFCS 2.2: Time synchronization
The time zone, chrony and systemd-timesyncd as clients, and chrony as a server for other hosts.
Before you start
The lab sets up the peer, a second machine at 10.99.0.2 on the lab
network 10.99.0.0/24; this VM is 10.99.0.1 there. On Ubuntu the peer
runs an NTP server. Run commands on the peer with
sudo ip netns exec lepeer COMMAND.
Tasks
- Set the time zone to
Europe/Berlin. - RHEL family: make chrony use only
time.cloudflare.com(remember thesourcedir /run/chrony-dhcpline). - Ubuntu: make systemd-timesyncd use
time.google.com. - RHEL family: make this VM an NTP server for its lab network,
10.99.0.0/24, so the peer can get the time from it. If firewalld is running, allow NTP through. - Ubuntu: make this VM an NTP client of the peer's server,
10.99.0.2, with chrony (install it). Do task 3 first: chrony replaces systemd-timesyncd, and task 3 is then graded on its configuration.
Hints
timedatectl list-timezones,timedatectl set-timezone.- Every source:
serverandpoollines, andsourcedir, in/etc/chrony.conf; then restart chronyd and runchronyc sources. - A drop-in in
/etc/systemd/timesyncd.conf.d/, thentimedatectl timesync-status. allowin chrony.conf, and the firewall if one runs. Test from the peer withsudo ip netns exec lepeer chronyd -Q 'server 10.99.0.1 iburst', thensudo chronyc clientshere./etc/chrony/chrony.confon Ubuntu; the service ischrony.