Sponsored Content
Full Discussion: ntp time synchronization
Operating Systems Linux Red Hat ntp time synchronization Post 302563313 by rahul11c on Tuesday 11th of October 2011 01:39:45 AM
Old 10-11-2011
ntp time synchronization

hello all,,

am trying to do a time synchronization between a ntp server and a client, but facing some problems in doing so:

i run the ntpdate in debug mode and this is what i got. please help me out..

Code:
[root@stn228-cub3 etc]# ntpd -d -u 172.22.1.207
ntpd 4.2.2p1@1.1570-o Sun Aug 28 19:21:03 UTC 2011 (1)
addto_syslog: precision = 1.000 usec
create_sockets(123)
addto_syslog: no IPv6 interfaces found
addto_syslog: ntp_io: estimated max descriptors: 1024, initial socket boundary: 16
addto_syslog: bind() fd 16, family 2, port 123, addr 0.0.0.0, in_classd=0 flags=9 fails: Address already in use
addto_syslog: bind() fd 16, family 2, port 123, addr 127.0.0.1, in_classd=0 flags=5 fails: Address already in use
addto_syslog: bind() fd 16, family 2, port 123, addr 172.22.2.101, in_classd=0 flags=25 fails: Address already in use
init_io: maxactivefd 0
local_clock: time 0 base 0.000000 offset 0.000000 freq 0.000 state 0
addto_syslog: getaddrinfo: "::1" invalid host address, ignored
getaddrinfo: "::1" invalid host address, ignored.
key_expire: at 0
peer_clear: at 0 next 1 assoc ID 59492 refid INIT
newpeer: 172.22.2.101->203.200.188.4 mode 3 vers 4 poll 6 10 flags 0x1 0x1 ttl 0 key 00000000
key_expire: at 0
peer_clear: at 0 next 2 assoc ID 59493 refid INIT
newpeer: 172.22.2.101->210.212.45.242 mode 3 vers 4 poll 6 10 flags 0x1 0x1 ttl 0 key 00000000
key_expire: at 0
peer_clear: at 0 next 3 assoc ID 59494 refid INIT
newpeer: 172.22.2.101->123.108.200.163 mode 3 vers 4 poll 6 10 flags 0x1 0x1 ttl 0 key 00000000
key_expire: at 0
peer_clear: at 0 next 4 assoc ID 59495 refid INIT
newpeer: 172.22.2.101->172.22.1.207 mode 3 vers 4 poll 6 10 flags 0x1 0x1 ttl 0 key 00000000
key_expire: at 0
peer_clear: at 0 next 4 assoc ID 59495 refid RMOT
addto_syslog: frequency initialized 88.950 PPM from /var/lib/ntp/drift
local_clock: time 0 base 0.000000 offset 0.000000 freq 88.950 state 1
addto_syslog: Cannot find user `172.22.1.207'

Moderator's Comments:
Mod Comment Video tutorial on how to use code tags

Last edited by pludi; 10-11-2011 at 03:48 AM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

TIME SYNC (NTP)

Is there a utility which offers the ability to utilize NTP to sync time on machine. If so please point to man page or web site (3 Replies)
Discussion started by: SmartJuniorUnix
3 Replies

2. UNIX for Advanced & Expert Users

ntp across time zones

I've been tasked to implement ntp on my SCO Unix servers. I have over 600 servers spread across the US in different time zones. Each remote server has network connectivity to a main server here, through their local ISP. (That's how we currently deliver mail to them). My question is, how can... (5 Replies)
Discussion started by: Howeird
5 Replies

3. UNIX for Dummies Questions & Answers

Time synchronization

All What is the best way to keep the system clock synchronized? I have looked at ntp and netdate. Is one good over the other? Basically I want to know if what is the most secure way to keep the system clock insync. netdate will require me to open up some port 37... is this safe? ntp also... (1 Reply)
Discussion started by: skotapal
1 Replies

4. HP-UX

NTP time

Is anyone familiar with adding NTP timing to a HPUX 10 OS? Thanks Brian (2 Replies)
Discussion started by: breigner
2 Replies

5. UNIX for Advanced & Expert Users

time synchronization

i have an HP UNIX box w/c acts as ntp server... I tried to change the time plus 8 minutes... the problem is that the other HP UNIX ntp client did not follow the time... when I tried to restart ntp client... using stop start it only sync to the server once... when I issue the command "ntpq -p", w/c... (2 Replies)
Discussion started by: inquirer
2 Replies

6. AIX

NTP - with time difference

We have configured most of 1200 servers with an NTP server. For the rest of the servers, I have a strange requirement. I want to synchronize them with NTP time with a lag of 15 minutes. Is it possible ? If yes How ? (0 Replies)
Discussion started by: shauche
0 Replies

7. Linux

How often does Linux NTP server update its time with the external NTP server?

All here, thank you for listening. Now I've set up a Linux NTP server by adding a external windows NTP server in /etc/ntp.conf. Then I start the ntpd daemon. But how often does the Linux NTP server update its time with the external NTP server? I've looked up everywhere but found no information... (1 Reply)
Discussion started by: MichaelLi
1 Replies

8. Red Hat

Auto NTP Time Synchronization

Good morning, My first post and first visit, so hello. I have been asked to see if one of our Linux boxes can have it's time sync automatically because the person who built the system has told our staff it cannot be done. To me that raised some flags because although I am no Linux expert, I just... (12 Replies)
Discussion started by: YSupport
12 Replies

9. HP-UX

Ntp time synchronization problems

There is one server in my company where the time is out of sync. When I checked (compared with other servers whose time is correct), the XNTPD variable in /etc/rc.config.d/netdaemons was set as 0. I changed this to 1, and tried restarting the xntpd process with : # /sbin/init.d/xntpd start ... (4 Replies)
Discussion started by: anaigini45
4 Replies

10. UNIX for Advanced & Expert Users

Ntp : How is the synchronization time scheduled?

Hello, one of my clients has the following task for me: To write a Perl script that checks, whether ntp is active on a particular AIX or Linux box. Obviously the last synchronization is logged in the file ntp.log So, my task would be find out, when the synchronization SHOULD have taken... (1 Reply)
Discussion started by: Bloehdian1
1 Replies
traceroute(1M)						  System Administration Commands					    traceroute(1M)

NAME
traceroute - print the route packets take to network host SYNOPSIS
traceroute [-adFIlnSvx] [-A addr_family] [-c traffic_class] [-f first_hop] [-g gateway [-g gateway...] | -r] [-i iface] [-L flow_label] [-m max_hop] [-P pause_sec] [-p port] [-Q max_timeout] [-q nqueries] [-s src_addr] [-t tos] [-w wait_time] host [packetlen] DESCRIPTION
The Internet is a large and complex aggregation of network hardware, connected by gateways. Tracking the route a packet follows can be dif- ficult. The utility traceroute traces the route that an IP packet follows to another internet host. The traceroute utility utilizes the both the IPv4 and IPv6 protocols. Use the -A option to override the default behavior. traceroute uses the IPv4 protocol ttl (time to live) field or the IPv6 field hop limit. It attempts to elicit an ICMP or ICMP6 TIME_EXCEEDED response from each gateway along the path, and a PORT_UNREACHABLE(or ECHO_REPLY if -I is used) response from the destination host. It starts by sending probes with a ttl or hop limit of 1 and increases by 1 until it either gets to the host, or it hits the maximum max_hop. The default maxi- mum max_hop is 30 hops, but this can be set by the -m option. Three probes are sent at each ttl (hop limit) setting, and a line is printed showing the ttl (hop limit), the hostname and the address of the gateway, and the rtt (round trip time) of each probe. The number of probes may be specifically set using the -q option. If the probe answers come from different gateways, the hostname and the address of each responding system will be printed. If there is no response within a 5 second timeout interval, an asterisk (*) is displayed for that probe. The -w option may be used to set the timeout interval. Other possible annotations that may appear after the time are: ! the ttl (hop limit) value in the received packet is <= 1. !H host unreachable. !X communication administratively prohibited. <!N> ICMP (ICMP6) unreachable code N. The following annotations appear only for IPv4: !F fragmentation needed. This should never occur. If this is seen, the associated gateway is broken. !N network unreachable. !P protocol unreachable. !S source route failed. It is likely that the gateway does not support source routing. !T unreachable for the specified tos (type-of-service). !U source host isolated or precedence problem. The following annotations appear only for IPv6: !A host unreachable for a reason other than lack of an entry in the routing table. !B packet too big. !E destination is not a neighbor. !R unrecognized next header. If almost all the probes result in some kind of unreachable code, then traceroute gives up and exits. The destination host is not supposed to process the UDP probe packets, so the destination port default is set to an unlikely value. How- ever, if some application on the destination is using that value, the value of port can be changed with the -p option. The only mandatory parameter is the destination host name or IP number. The default probe datagram length is 40 bytes (60 bytes for IPv6), but this may be increased by specifying a packet length (in bytes) after the destination host name. All integer arguments to traceroute can be specified in either decimal or hexadecimal notation. For example, packetlen can be specified either as 256 or 0x100. OPTIONS
-A addr_family Specify the address family of the target host. addr_family can be either inet or inet6. Address family determines which protocol to use. For an argument of inet, IPv4 is used. For inet6, IPv6 is used. By default, if the name of a host is provided, not the literal IP address, and a valid IPv6 address exists in the name service data- base, traceroute will use this address. Otherwise, if the name service database contains an IPv4 address, it will try the IPv4 address. Specify the address family inet or inet6 to override the default behavior. If the argument specified is inet, traceroute will use the IPv4 address associated with the hostname. If none exists, traceroute will state that the host is unknown and exit. It will not try to determine if an IPv6 address exists in the name service database. If the specified argument is inet6, traceroute will use the IPv6 address that is associated with the hostname. If none exists, tracer- oute will state that the host is unknown and exit. -a Probe all of the addresses of a multi-homed destination. The output looks like traceroute has been run once for each IP address of the destination. If this option is used together with -A, traceroute probes only the addresses that are of the specified address family. While probing one of the addresses of the destination, user can skip to the next address by sending a SIGINT, or exit traceroute by sending a SIGQUIT signal. See signal(3C) -c traffic_class Specify the traffic class of probe packets. The value must be an integer in the range from 0 to 255. Gateways along the path may route the probe packet differently depending upon the value of traffic_class set in the probe packet. This option is valid only on IPv6. -d Set the SO_DEBUG socket option. -F Set the "don't fragment" bit. This option is valid only on IPv4. When specified from within a shared-IP zone, this option has no effect as the "don't fragment" bit is always set in this case. -f first_hop Set the starting ttl ( hop limit) value to first_hop, to override the default value 1. traceroute skips processing for those intermedi- ate gateways which are less than first_hop hops away. -g gateway Specify a loose source route gateway. The user can specify more than one gateway by using -g for each gateway. The maximum number of gateways is 8 for IPv4 and 127 for IPv6. Note that some factors such as the link MTU can further limit the number of gateways for IPv6. This option cannot be used with the -r option. Only users with the {PRIV_NET_RAWACCESS} privilege can specify a loose source route with this option. -I Use ICMP (ICMP6) ECHO instead of UDP datagrams. -i iface For IPv4, this option specifies a network interface to obtain the source IP address. This is normally only useful on a multi-homed host. The -s option is also another way to do this. For IPv6, it specifies the network interface on which probe packets are transmit- ted. The argument can be either an interface index, for example, 1, 2, or an interface name, for example, eri0, hme0. -L flow_label Specify the flow label of probe packets. The value must be an integer in the range from 0 to 1048575. This option is valid only on IPv6. -l Print the value of the ttl (hop limit) field in each packet received. -m max_hop Set the maximum ttl (hop limit) used in outgoing probe packets. The default is 30 hops, which is the same default used for TCP connec- tions. -n Print hop addresses numerically rather than symbolically and numerically. This saves a nameserver address-to-name lookup for each gate- way found on the path. -P pause_sec Specify a delay, in seconds, to pause between probe packets. This may be necessary if the final destination does not accept undeliver- able packets in bursts. By default, traceroute sends the next probe as soon as it has received a reply. Note that pause_sec is a real number. -p port Set the base UDP port number used in probes.The default is 33434. traceroute hopes that nothing is listening on UDP ports (base+(nhops-1)*nqueries) to (base+(nhops*nqueries)-1)at the destination host, so that an ICMP (ICMP6) PORT_UNREACHABLE message will be returned to terminate the route tracing. If something is listening on a port in the default range, this option can be used to select an unused port range. nhops is defined as the number of hops between the source and the destination. -Q max_timeout Stop probing this hop after max_timeout consecutive timeouts are detected. The default value is 5. Useful in combination with the -q option if you have specified a large nqueries probe count. -q nqueries Set the desired number of probe queries. The default is 3. -r Bypass the normal routing tables and send directly to a host on an attached network. If the host is not on a directly-attached network, an error is returned. This option can be used to send probes to a local host through an interface that has been dropped by the router deamon. See in.routed(1M). You cannot use this option if the -g option is used. -S Display a summary of how many probes were not answered for each hop. -s src_addr Use the following address, which usually is given as a literal IP address, not a hostname, as the source address in outgoing probe packets. On multi-homed hosts, those with more than one IP address, this option can be used to force the source address to be something other than the IP address traceroute picks by default. If the IP address is not one of this machine's interface addresses, an error is returned and nothing is sent. For IPv4, when used together with the -i option, the given IP address should be configured on the speci- fied interface. Otherwise, an error will be returned. In the case of IPv6, the interface name and the source address do not have to match. -t tos Set the tos(type-of-service) in probe packets to the specified value. The default is zero. The value must be an integer in the range from 0 to 255. Gateways along the path may route the probe packet differently depending upon the tos value set in the probe packet. This option is valid only on IPv4. -v Verbose output. For each hop, the size and the destination of the response packets is displayed. Also ICMP (ICMP6) packets received other than TIME_EXCEEDED and UNREACHABLE are listed as well. -w waittime Set the time, in seconds, to wait for a response to a probe. The default is 5 seconds. -x Prevent traceroute from calculating checksums. Checksums are usually required for the last hop when using ICMP ECHO probes. This option is valid only on IPv4. See the -I option. When specified from within a shared-IP zone, this option has no effect as the checksum is always calculated by the operating sys- tem in this case. OPERANDS
The following operands are supported: host The network host. EXAMPLES
Example 1 Sample Output From the traceroute Utility Some sample output from the traceroute utility might be: istanbul% traceroute london traceroute: Warning: london has multiple addresses; using 4::114:a00:20ff:ab3d:83ed traceroute: Warning: Multiple interfaces found; using 4::56:a00:20ff:fe93:8dde @ eri0:2 traceroute to london (4::114:a00:20ff:ab3d:83ed), 30 hops max, 60 byte packets 1 frbldg7c-86 (4::56:a00:20ff:fe1f:65a1) 1.786 ms 1.544 ms 1.719 ms 2 frbldg7b-77 (4::255:0:0:c0a8:517) 2.587 ms 3.001 ms 2.988 ms 3 london (4::114:a00:20ff:ab3d:83ed) 3.122 ms 2.744 ms 3.356 ms The target host, london, has both IPv4 and IPv6 addresses in the name service database. According to the default behavior, traceroute uses IPv6 address of the destination host. Example 2 Using the traceroute Utility For a Host Which has Only IPv4 Addresses In the following examples, traceroute is tracking the route to host sanfrancisco, which has only IPv4 addresses in the name service data- base. Therefore traceroute uses only IPv4 addresses. The following shows the 7-hop path that a packet would follow from the host istanbul to the host sanfrancisco. istanbul% traceroute sanfrancisco traceroute: Warning: Multiple interfaces found; using 172.31.86.247 @eri0 traceroute to sanfrancisco (172.29.64.39), 30 hops max, 40 byte packets 1 frbldg7c-86 (172.31.86.1) 1.516 ms 1.283 ms 1.362 ms 2 bldg1a-001 (172.31.1.211) 2.277 ms 1.773 ms 2.186 ms 3 bldg4-bldg1 (172.30.4.42) 1.978 ms 1.986 ms 13.996 ms 4 bldg6-bldg4 (172.30.4.49) 2.655 ms 3.042 ms 2.344 ms 5 ferbldg11a-001 (172.29.1.236) 2.636 ms 3.432 ms 3.830 ms 6 frbldg12b-153 (172.29.153.72) 3.452 ms 3.146 ms 2.962 ms 7 sanfrancisco (172.29.64.39) 3.430 ms 3.312 ms 3.451 ms Example 3 Using the traceroute Utility With Source Routing The following example shows the path of a packet that goes from istanbul to sanfrancisco through the hosts cairo and paris, as specified by the -g option. The -I option makes traceroute send ICMP ECHO probes to the host sanfrancisco. The -i options sets the source address to the IP address configured on the interface qe0. istanbul% traceroute -g cairo -g paris -i qe0 -q 1 -I sanfrancisco traceroute to sanfrancisco (172.29.64.39), 30 hops max, 56 byte packets 1 frbldg7c-86 (172.31.86.1) 2.012 ms 2 flrbldg7u (172.31.17.131) 4.960 ms 3 cairo (192.168.163.175) 4.894 ms 4 flrbldg7u (172.31.17.131) 3.475 ms 5 frbldg7c-017 (172.31.17.83) 4.126 ms 6 paris (172.31.86.31) 4.086 ms 7 frbldg7b-82 (172.31.82.1) 6.454 ms 8 bldg1a-001 (172.31.1.211) 6.541 ms 9 bldg6-bldg4 (172.30.4.49) 6.518 ms 10 ferbldg11a-001 (172.29.1.236) 9.108 ms 11 frbldg12b-153 (172.29.153.72) 9.634 ms 12 sanfrancisco (172.29.64.39) 14.631 ms EXIT STATUS
The following exit values are returned: 0 Successful operation. >0 An error occurred. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
netstat(1M), signal(3C), ping(1M), attributes(5), privileges(5), zones(5) WARNINGS
This utility is intended for use in network testing, measurement and management. It should be used primarily for manual fault isolation. Because of the load it could impose on the network, it is unwise to use traceroute(1M) during normal operations or from automated scripts. SunOS 5.11 18 Sep 2008 traceroute(1M)
All times are GMT -4. The time now is 02:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy