Extreme 스위치 시간 설정하기(EXOS 시간 설정)
1. 현재 시간 확인
show switch 명령을 내리면 여러가지 정보가 보여지는데, 현재 시간은 current time 항목을 확인하면 된다.
Switch.1 # show switch SysName: Switch SysLocation: SysContact: support@extremenetworks.com, +1 888 257 3000 System MAC: 00:04:96:51:A9:D5 System Type: X450e-24p SysHealth check: Enabled (Normal) Recovery Mode: All System Watchdog: Enabled Current Time: Tue Mar 3 16:12:35 2020 Timezone: [Auto DST Disabled] GMT Offset: 540 minutes, name is KST. Boot Time: Wed Aug 24 13:55:31 2016 Boot Count: 23 Next Reboot: None scheduled System UpTime: 1287 days 2 hours 17 minutes 4 seconds Current State: OPERATIONAL Image Selected: primary Image Booted: secondary Primary ver: 15.3.5.2 Secondary ver: 15.3.5.2 patch1-10 Config Selected: primary.cfg Config Booted: primary.cfg primary.cfg Created by ExtremeXOS version 15.3.5.2 145375 bytes saved on Fri Dec 13 14:32:05 2019
2. 날자 시간 수동 조정
아래 형식으로 시간 설정 및 조정이 가능하다.
configure time month day year hour minutes seconds
아래는 현재 시간을 2020년 3월 3일 16시 35분 20초로 설정한다.
Switch.2 # configure time 03 03 2020 16 35 20
잘 적용되었는지 확인 해 본다.
Switch.3 # show switch ... Current Time: Tue Mar 3 16:35:24 2020 Timezone: [Auto DST Disabled] GMT Offset: 540 minutes, name is KST. Boot Time: Wed Aug 24 14:16:45 2016 ...
3. sntp-client 설정(Simple Network Time Protocol)
시간이 안맞을때 매번 수동 설정을 할 수도 있겠지만, 많이 불편하다. 이제, time 서버로부터 시간을 자동으로 맞추도록 sntp-client 설정을 해 둔다.
sntp-client 설정이 되어있는지 show 명령어로 확인해본다. 아래처럼 sntp client가 설정되어 있지 않다.
Switch.4 # show sntp-client SNTP client is disabled SNTP time is not valid Primary server: Secondary server: Broadcasts: VR-Mgmt Query interval:64 Last valid SNTP update: None till now. SNTPC Statistics: Packets transmitted: to primary server: 0 to secondary server: 0 Packets received with valid time: from Primary server: 0 from Secondary server: 0 from Broadcast server: 0 Packets received without valid time: from Primary server: 0 from Secondary server: 0 from Broadcast server: 0 Replies not received to requests: from Primary server: 0 from Secondary server: 0
time 서버를 설정한다. 아래 IP 주소는 time.windows.com 의 IP 주소이다.(호스트네임을 사용하려면 dns-client를 사용가능하게 설정하면 된다.)
타임서버 설정후 sntp-client를 사용하도록 설정한다.
Switch.5 # configure sntp-client primary 40.81.94.65 vr "VR-Default" Broadcast VR will be ignored since server configured * Switch.6 # enable sntp-client
sntp-client를 확인해 보면 시간이 타임서버와 동기화 된 것을 볼 수 있다.(Last valid SNTP update 부분)
* Switch.7 # show sntp-client SNTP client is enabled SNTP time is valid Primary server:40.81.94.65 VR-Default Secondary server: Broadcasts: VR-Mgmt Query interval:64 Last valid SNTP update: From server:40.81.94.65, on Tue Mar 3 16:51:42 2020 SNTPC Statistics: Packets transmitted: to primary server: 1 to secondary server: 0 Packets received with valid time: from Primary server: 1 from Secondary server: 0 from Broadcast server: 0 Packets received without valid time: from Primary server: 0 from Secondary server: 0 from Broadcast server: 0 Replies not received to requests: from Primary server: 0 from Secondary server: 0
스위치 로그에는 아래처럼 시간관련 로그가 보인다.
* Switch.8 # show log 03/03/2020 16:51:50.86 <Noti:DM.Notice> Setting hwclock time to system time, and broadcasting time