ITIS 3110 IT INFRASTRUCTURE II Tony Kombol. NTP "Does Anybody Really Know What Time It Is?"*  Time keeping is one of most fundamental aspects of computer.

Slides:



Advertisements
Similar presentations
TCP/IP MODEL Maninder Kaur
Advertisements

Time in Distributed Systems
HIERARCHY REFERENCING TIME SYNCHRONIZATION PROTOCOL Prepared by : Sunny Kr. Lohani, Roll – 16 Sem – 7, Dept. of Comp. Sc. & Engg.
What is a network? A network consists of two or more computers that are linked in order to share resources (such as printers and CD-ROMs) , exchange.
OSI MODEL Maninder Kaur
NetComm Wireless Logging Architecture Feature Spotlight.
Distributed Systems Fall 2010 Time and synchronization.
Oct 21, 2004CS573: Network Protocols and Standards1 IP: Addressing, ARP, Routing Network Protocols and Standards Autumn
SynchronizationCS-4513, D-Term Synchronization in Distributed Systems CS-4513 D-Term 2007 (Slides include materials from Operating System Concepts,
Synchronization in Distributed Systems CS-4513 D-term Synchronization in Distributed Systems CS-4513 Distributed Computing Systems (Slides include.
Data Networking Fundamentals Unit 7 7/2/ Modified by: Brierley.
Chapter 23: ARP, ICMP, DHCP IS333 Spring 2015.
TCP: Software for Reliable Communication. Spring 2002Computer Networks Applications Internet: a Collection of Disparate Networks Different goals: Speed,
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Application Layer Functionality and Protocols Network Fundamentals – Chapter.
Gursharan Singh Tatla Transport Layer 16-May
FIREWALL TECHNOLOGIES Tahani al jehani. Firewall benefits  A firewall functions as a choke point – all traffic in and out must pass through this single.
1 Physical Clocks need for time in distributed systems physical clocks and their problems synchronizing physical clocks u coordinated universal time (UTC)
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
A Security Analysis of the Network Time Protocol (NTP) Presentation by Tianen Liu.
ITIS 3110 IT Infrastructure II
OSI Model Routing Connection-oriented/Connectionless Network Services.
CS426Fall 2010/Lecture 361 Computer Security CS 426 Lecture 36 Perimeter Defense and Firewalls.
CECS 5460 – Assignment 3 Stacey VanderHeiden Güney.
Cisco Discovery Working at a Small-to-Medium Business or ISP CHAPTER 7 ISP Services Jr.
Lecture 2 TCP/IP Protocol Suite Reference: TCP/IP Protocol Suite, 4 th Edition (chapter 2) 1.
What is a Protocol A set of definitions and rules defining the method by which data is transferred between two or more entities or systems. The key elements.
Firewall and Internet Access Mechanism that control (1)Internet access, (2)Handle the problem of screening a particular network or an organization from.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Application Layer Functionality and Protocols.
Networks – Network Architecture Network architecture is specification of design principles (including data formats and procedures) for creating a network.
© McLean HIGHER COMPUTER NETWORKING Lesson 1 – Protocols and OSI What is a network protocol Description of the OSI model.
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Introduction Slide 1 A Communications Model Source: generates.
1 Version 3.0 Module 11 TCP Application and Transport.
I. Basic Network Concepts. I.1 Networks Network Node Address Packet Protocol.
The OSI Model.
TELE 301 Lecture 10: Scheduled … 1 Overview Last Lecture –Post installation This Lecture –Scheduled tasks and log management Next Lecture –DNS –Readings:
1 The Internet and Networked Multimedia. 2 Layering  Internet protocols are designed to work in layers, with each layer building on the facilities provided.
Application Layer Khondaker Abdullah-Al-Mamun Lecturer, CSE Instructor, CNAP AUST.
Layer 3: Internet Protocol.  Content IP Address within the IP Header. IP Address Classes. Subnetting and Creating a Subnet. Network Layer and Path Determination.
TCP Sockets Reliable Communication. TCP As mentioned before, TCP sits on top of other layers (IP, hardware) and implements Reliability In-order delivery.
Data Networking Fundamentals Chapter 7. Objectives In this chapter, you will learn to: Discuss basic networking concepts, including the elements common.
TCP/IP (Transmission Control Protocol / Internet Protocol)
FTP File Transfer Protocol Graeme Strachan. Agenda  An Overview  A Demonstration  An Activity.
Chapter 24 Transport Control Protocol (TCP) Layer 4 protocol Responsible for reliable end-to-end transmission Provides illusion of reliable network to.
Protocols COM211 Communications and Networks CDA College Olga Pelekanou
Silberschatz, Galvin and Gagne  Operating System Concepts UNIT II Operating System Services.
NETWORKING FUNDAMENTALS. Network+ Guide to Networks, 4e2.
ITGS Network Architecture. ITGS Network architecture –The way computers are logically organized on a network, and the role each takes. Client/server network.
Network Components By Kagan Strayer. Network Components This presentation will cover various network components and their functions. The components that.
ITIS 3110 IT INFRASTRUCTURE II Tony Kombol. NTP "Does Anybody Really Know What Time It Is?"*  Time keeping is one of most fundamental aspects of computer.
File Transfer And Access (FTP, TFTP, NFS). Remote File Access, Transfer and Storage Networks For different goals variety of approaches to remote file.
TCP/IP Protocol Suite Suresh Kr Sharma 1 The OSI Model and the TCP/IP Protocol Suite Established in 1947, the International Standards Organization (ISO)
COMP1321 Digital Infrastructure Richard Henson March 2016.
Process-to-Process Delivery:
IP: Addressing, ARP, Routing
ITIS 3110 IT Infrastructure II
Distributed Computing
Module 4 Remote Login.
Chapter 2: System Structures
Infrastructure II NTP.
Introduction to Networks
Data Networking Fundamentals
File Transfer and access
Topic 5: Communication and the Internet
Chapter 3: Open Systems Interconnection (OSI) Model
I. Basic Network Concepts
Presentation by Wyatt Zacharias
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
Networking Theory (part 2)
ITIS 6167/8167: Network and Information Security
Networking Theory (part 2)
Presentation transcript:

ITIS 3110 IT INFRASTRUCTURE II Tony Kombol

NTP

"Does Anybody Really Know What Time It Is?"*  Time keeping is one of most fundamental aspects of computer infrastructure  Many protocols rely on accurate clocks  Correlating information from multiple systems impossible with out a shared clock *Does Anybody Realy Care (CTA aka Chicago, 1969)

Time Sources

Side note: Difference between precision and accuracy  Accuracy  Closeness to the actual value E.g. the clock is 1 hour off  Precision  How much it does not vary E.g. the clock varies approximately a microsecond in a year  So which is better?  A clock might not vary by more than a picosecond, but be off by one hour  A clock might be off by one second, but vary by a millisecond over the day

Network Time Protocol (NTP)  Port 123/udp  Can maintain time to fractions of a second  Can use external time source  e.g. Atomic clock or GPS clock  Most computers and devices act as a client

Network Time Protocol (NTP)  All servers belong to a ‘Stratum’  Denotes how far from the time source they are referencing Prevents Loops Can only sync with servers in same stratum or higher Stratum 0: time source Stratum 1: server directly attached to time source Stratum 2: connected to Stratum 1 server(s) Etc…  Versions available for:  UNIX family  Windows family SNTP for 2000 and XP Full NTP for Server 2003 and Vista

Security concerns  Only a few security problems have been identified in the reference implementation of the NTP codebase in its 25+ year history  The protocol has been undergoing revision and review over its entire history  As of January 2011, there are no security revisions in the NTP specification and no reports at CERT  The current codebase for the reference implementation has been undergoing security audits from several sources for several years now  There are no known high-risk vulnerabilities in the current released software

NTP: Security Considerations  Default configuration is usually client-only  Supports authentication if working in a paranoid environment

NTP Stratum

Clock strata  NTP uses a hierarchical, semi-layered system of levels of clock sources  Each level of this hierarchy is termed a stratum  Assigned a layer number starting with 0 (zero) at the top  The stratum level defines its distance from the reference clock and exists to prevent cyclical dependencies in the hierarchy  Note 1: the stratum level is not a guarantee of quality or reliability  It is common to find stratum 3 time sources that are higher quality than other stratum 2 time sources  Note 2: This definition of stratum is also different from the notion of clock strata used in telecommunication systems

Clock strata  Stratum 0  Devices such as Atomic clocks (cesium, rubidium) GPS clocks Radio clocks (e.g. WWV)  Stratum-0 devices are traditionally not attached to the network Instead they are locally connected to computers e.g., via an RS-232 connection using a pulse per second signal Corrects for the time-delay across the wire  Stratum 1  These are computers attached to Stratum 0 devices.  Normally they act as servers for timing requests from Stratum 2 servers via NTP  These computers are also referred to as time servers  They are typically attached to the network

Clock strata  Stratum 2  Computers that send NTP requests to Stratum 1 servers  Normally a Stratum 2 computer will reference a number of Stratum 1 servers and use the NTP algorithm to gather the best data sample Dropping any Stratum 1 servers that seem obviously wrong  Stratum 2 computers will peer with other Stratum 2 computers to provide more stable and robust time for all devices in the peer group  Stratum 2 computers normally act as servers for Stratum 3 NTP requests  Stratum 3  These computers employ exactly the same algorithms for peering and data sampling as Stratum 2  Can themselves act as servers for stratum 4 computers, and so on…

Clock strata  NTP supports up to 256 strata  Only the first 16 are employed  Any device at Stratum 16 is considered to be unsynchronized  Some systems may reject a time update from a "too highly numbered" stratum  Note: Depends on what version of NTP protocol in use

SNTP - Simple Network Time Protocol  A less complex implementation of NTP  Uses the same protocol  Does not require the storage of state over extended periods of time  Used in some embedded devices and in applications where high accuracy timing is not required  See RFC 1361, RFC 1769, RFC 2030, RFC 4330 and RFC 5905

NTP timestamps  64-bit timestamps used by NTP consist of  32-bit part for seconds  32-bit part for fractional second  Gives NTP:  Time scale that rolls over every 2 32 seconds ~136 years  Theoretical resolution of 2 − 32 seconds ~233 picoseconds 1 psec is 1 trillionth of a second  NTP uses an epoch of January 1, 1900  First rollover occurs in 2036 Before the UNIX year 2038 problem

NTP timestamps  Implementations should disambiguate NTP time using a knowledge of the approximate time from other sources  NTP only works with the differences between timestamps and never their absolute values Wraparound is invisible as long as the timestamps are within 68 years of each other This means that the rollover will be invisible for most running systems, since they will have the correct time to within a very small tolerance  However, systems that are starting up need to know the date within no more than 68 years Given the large allowed error, it is not expected that this is too onerous a requirement  One suggested method is to set the clock to no earlier than the system build date Many systems use a battery powered hardware clock to avoid this problem

NTP timestamps  Even so, future versions of NTP may extend the time representation to 128 bits:  64 bits for the second  64 bits for the fractional-second  The current NTP4 format has support for Era Number and Era Offset, that when used properly should aid fixing date rollover issues  According to Mills (quote): The 64 bit value for the fraction is enough to resolve the amount of time it takes a photon to pass an electron at the speed of light. The 64 bit second value is enough to provide unambiguous time representation until the universe goes dim.

Clock synchronization algorithm  To synchronize its clock with a remote server NTP clients must compute the round-trip delay time and the offset  Round-trip delay d = (t3-t0) – (t2-t1)  Offset o = ((t1-t0) + (t2-t3)) /2  Where: t0 when the request packet was sent t1 when the request packet was received t2 when the response packet was sent t3 when the response packet was received (t3-t0) time on the client side between the sending of the request packet and the receiving of the response packet (t2-t1) time the server waited before sending the answer

Clock synchronization algorithm  NTP synchronization is correct when:  both the incoming and outgoing routes between the client and the server have symmetrical nominal delay  If the routes do not have a common nominal delay Synchronization has a systematic bias of half the difference between the forward and backward travel times

Stratum 0 clocks are usually directly connected to the network A. True B. False 30 sec countdown

Logging

 Best practice is to centralize all logs  To a dedicated log host  Good for debugging, forensics, etc.  Centralized logging needs a shared clock for best results  i.e. did two events on two separate machines really occur at the same time

Syslog  Port 514/UDP  Modern implementations support TCP as well  Most computers and devices can generate syslog messages  UDP is used because it is stateless .e.g it is fast…

Syslog Facilities  Every syslog message is associated with a facility  The facility is the general source of the message  Example facilities are  AUTH  CRON  DAEMON  FTP  MAIL  Allows different facilities to be handled differently  Each facility has its own level

Facility Levels 0-11

Facility Levels (12-23)

Syslog Priorities  Every syslog message has a set priority  Declares how important the message is  Examples are:  debug  notice  warning  error

Severity Levels A common mnemonic used to remember the syslog levels down to top is: "Do I Notice When Evenings Come Around Early".

Syslog Configuration  Messages can be routed based on facility and priority  What subsystem and its importance  Destination can be:  Local log file  Remote syslog server  Log files can be written synchronously or asynchronously  Synchronous – slower but guaranteed write  Asynchronous – faster, but may lose some logs if the system crashes

Example Syslog Configuration

Notes about the configuration  *  The asterisk is a ‘glob’ character. It means to match anything  You will see it in many configuration files as well as on the command line  /dev/console  UNIX has a philosophy that everything is a file  /dev/console is a device file  It writes messages to all locally attached terminals

Syslog: Security Considerations  No authentication  No encryption  UDP source can be spoofed  Malicious user could run log server out of disk space  Same for a misconfigured system

Syslog: Security Mitigations  Limit access to Syslog with a firewall  Run on internal network if possible  Log to a separate partition  Monitor disk usage on log server  Use more feature-rich syslog implementations that support TCP and/or encryption

Why do NTP and Syslog need to work together: A. Both share the same base protocol B. All systems need a common time base for log timestamps C. TCP requires synchronized packet transfers D. It keeps the NSA synchronized 30 sec countdown