Pages

Thursday, April 3, 2014

Juniper Date and Time manually or from NTP sever

### Juniper Date Time Show and set manually and from NTP server

To show date time
================

user1@router>show system uptime    

Current time: 2014-04-03 11:34:26 BDT
System booted: 2014-01-15 11:48:29 BDT (11w0d 23:45 ago)
Protocols started: 2014-01-15 11:49:26 BDT (11w0d 23:45 ago)
Last configured: 2014-04-02 13:32:26 BDT (22:02:00 ago) by root
11:34AM  up 77 days, 23:46, 2 users, load averages: 0.27, 0.70, 0.65


IN CLI MOde

set date YYYYMMDDHHMM.ss source-address

user1@myswitch# set date 201102151010.55

For example, the following command sets the date and time from an NTP server:
user1@myswitch# set date ntp 1.bd.pool.ntp.org

For example, the following command sets the date and time from more than one NTP server:
user1@myswitch# set date ntp 1.bd.pool.ntp.org 2.asia.pool.ntp.org

Linux DHCP server sample config file


 yum install dhcp

 vi /etc/dhcp/dhcpd.conf
===============================
# {
# DHCP sever Configuration
# Sample Config For Linux Class by Tayab Khan
# Here we use free google dns for name servers
# and local network 192.168.50.0 and DHCP server IP 192.168.50.1
# This IP address and Netmask must be on Linux interface and IP range must
be same network
# Config Starts from here
option domain-name "khan.com";
option domain-name-servers 8.8.8.8, 4.2.2.2;
default-lease-time 600;
max-lease-time 7200;
log-facility local6;
subnet 192.168.50.0 netmask 255.255.255.0 {
  range 192.168.50.10 192.168.50.20;
  option routers 192.168.50.1;
}


===========================
# use rsyslog.conf or syslog.conf

vi /etc/rsyslog.conf

local6.*          /var/log/dhcpd.log