Thursday, October 25, 2007

NTP on UNIXTru64

NTP Information

NTP Version
1-ntpd daemon

# /usr/bin/sysman ntp_config

# ntpq -p

remote refid st t when poll reach delay offset jitter
LOCAL(0) LOCAL(0) 3 l 9 64 377 0.000 0.000 0.000
*xyzabc.ethz. .DCFa. 1 u 17 64 377 25.088 -10.040 1.071

% xntpdc -p
remote refid st when poll reach delay offset disp
* 2 47 64 377 31.3 93.94 16.5 3 212 1024 377 33.8 89.58 16.9 2 111 1024 377 39.1 46.98 17.7

Edit the configuration file /etc/ntp.conf

server # local clock
server # (stratum 1)
driftfile /etc/ntp/drift
multicastclient # listen on default
broadcastdelay 0.008

Start NTP Server and check /var/log/messages
# /etc/rc.d/init.d/ntpd start

You can use sysman to configure NTP client.
Edit /etc/ntp.conf and add:

server version 3
server version 3
server version 3

In /etc/rc.config set:

export XNTP_SERV1
export XNTP_SERV2
export XNTP_SERV3

# ntpdc monlist

to get the lis

#ntpdate -b

How To: AIX Networking

Network Administration on AIX

1.TCP/IP related daemon startup script

2.To view the route table
netstat -r

3.To view the route table from the ODM DB
lsattr -EHl inet0 -a route

4.Temporarily add a default route
route add default

5.Temporarily add an address to an interface
ifconfig en0 netmask

6.Temporarily add an alias to an interface
ifconfig en0 netmask alias

7.To permanently add an IP address to the en1 interface
chdev -l en1 -a netaddr= -a netmask=0xffffff00

8.Permanently add an alias to an interface
chdev -l en0 -a alias4=,

9.Remove a permanently added alias from an interface
chdev -l en0 -a delalias4=,

10.List ODM (next boot) IP con guration for interface
lsattr -El en0

11.Permanently set the hostname
chdev -l inet0 -a

12.Turn on routing by putting this in
no -o ipforwarding=1

13.List networking devices
lsdev -Cc tcpip

14.List Network Interfaces
lsdev -Cc if

15.List attributes of inet0
lsattr -Ehl inet0

16.List (physical layer) attributes of ent0
lsattr -El ent0

17.List (networking layer) attributes of en0
lsattr -El en0

18.Speed is found through the entX device
lsattr -El ent0 -a media speed

19.Set the ent0 link to Gig full duplex
(Auto Negotiation is another option)
chdev -l ent0 -a media speed=1000 Full Duplex -P

20.Turn off Interface Speci c Network Options
no -p -o use isno=0

21.Get (long) statistics for the ent0 device (no -d is shorter)
entstat -d ent0javascript:void(0)
Save Now

22.List all open, and in use TCP and UDP ports
netstat -anf inet

23.List all LISTENing TCP ports
netstat -na | grep LISTEN

Timezone on Tru64

Change Timezone on Unix Tru64

Changing localtime to New York
# ln -sf /etc/zoneinfo/America/New_York /etc/zoneinfo/localtime
# ln -sf /etc/zoneinfo/Hongkong /etc/zoneinfo/localtime