반응형

 

 
• Written by Jung Byung Wook
 

 


0. 목차

  • AIX CPU ID 확인

1. CPU ID 확인

  • 설명1 : CPU ID 확인
  • 설명2 : 일반적으로 NIM Master에서 NIM Client를 등록할 때 사용되는 정보

 

  • 00F6AFE64C00 : CPU ID
1
2
[root@jbw-aix /]# uname -auM
AIX jbw-aix 2 7 00F6AFE64C00 IBM,9117-MMB IBM,0210AEE69
 
jbw

 

 

 

 

  •  

 

반응형
Posted by 정병욱

반응형

 

 
• Written by Jung Byung Wook
 

 


0. 목차

  • AIX HBA  Port 링크 상태 및 포트 스피드 확인
  • HBA 펌웨어 버전 확인
  • HBA 드라이브 버전 확인

1. fcstat 명령어로, 지원속도 / 동작속도 / 링크 상태 확인

  • 설명 : 현재 운영체제의 fc port의 지원속도 / 현재 동작중인 속도 / 링크 상태(Up/down)을 확인할 수 있음.
1
2
3
4
[root@jbw-aix /]# # fcstat fcs0 | egrep -"speed|attention"
Port Speed (supported): 8 GBIT
Port Speed (running):   8 GBIT
Attention Type:   Link Up
 
jbw
 

2. HBA카드 펌웨어 버전 확인

    • lsmcode와 lscfg/fcstat의 펌웨어 버전이 서로 다르게 보이는 것은 lsmcode는 10진수로, lscfg/fcstat은 16진수로 표기
    • 확인1 : lsmcode 명령어로 확인
      • 펌웨어 버전 : 203305
1
2
3
4
5
6
7
[root@jbw-aix /]# # lsmcode -d fcs0
DISPLAY MICROCODE LEVEL
fcs0    8Gb PCI Express Dual Port FC Adapter (df1000f114108a03)

The current microcode level for fcs0 is 203305.
 
Use Enter to continue.
 
jbw
 
  • 확인2 : lscfg 명령어로 확인
    • 펌웨어 버전 : 2.03X5
1
2
[root@jbw-aix /]# #lscfg -vpl fcs0 |grep -i za
        Device Specific.(ZA)........U2D2.03X5
jbw

 

    • 확인3 : fcstat 명령어로 확인
      • 펌웨어 버전 : 2.03X5
1
2
[root@jbw-aix /]# fcstat fcs0 | grep -i za
ZA: U2D2.03X5
jbw

 


3. HBA카드 드라이버 버전 확인

  • 대체적으로 AIX OS Level과 매칭되며, 이는 OS버전과 하드웨어 상호 호환성을 지원하기 위함. (다른 경우도 존재)

 

  • 확인 : Device Type 확인후, 해당 Device Type의 드라이버 파일셋 조회
    • "lslpp -l | grep -i df1000f114108a03"로 조회했을 때, grep 조건식 때문에 버전이 안나오는 경우가 있기 때문에 아래와 같이 파일셋을 지정해서 조회해보는 것을 권장 
1
2
3
4
5
6
7
8
9
10
11
[root@jbw-aix /]# lsdev -Cc adapter |grep -i fcs
fcs0    Available 01-00 8Gb PCI Express Dual Port FC Adapter (df1000f114108a03)
fcs1    Available 01-01 8Gb PCI Express Dual Port FC Adapter (df1000f114108a03)
 
[root@jbw-aix /]# lslpp -l devices.pciex.df1000f114108a03.rte
  Fileset                      Level  State      Description
  ----------------------------------------------------------------------------
Path: /usr/lib/objrepos
  devices.pciex.df1000f114108a03.rte
                             7.2.4.0  COMMITTED  8Gb FC PCI Express Dual Port
                                                 Adapter Device Software
jbw

 

반응형

'GENERAL > Device' 카테고리의 다른 글

[AIX] HBA 포트의 WWN 확인  (0) 2024.07.15
Posted by 정병욱

반응형

 

 
• Written by Jung Byung Wook
 

 


0. 목차

  • AIX HBA 포트의 WWN 확인

1. lscfg 명령어로 확인

  • 설명 : HBA 포트의 WWN을 확인하는 첫번째 방법
1
2
[root@jbw-aix /]# lscfg -vl fcs0 | grep -i network
   Network Address.............10000000C980DBE8
jbw

 

  • 스크립트1 : 전체 HBA Port(FC Port)의 WWN 확인
1
2
3
4
5
[root@jbw-aix /]# # for i in $(lscfg |grep fcs |awk '{print $2}'); do echo $i && lscfg -vl $i|grep Network;done
fcs0     Network Address.............10000000ABCD1234
fcs1     Network Address.............10000000EFGH4567
fcs2     Network Address.............10000000IJKL88900
fcs3     Network Address.............10000000ABEF4567
 
jbw

 

  • 스크립트2 : 전체 HBA Port(FC Port)의 WWN 확인
1
2
3
4
5
[root@jbw-aix /]# # lsdev -Cc adapter |grep -i fcs | awk '{print "lscfg -vpl",$1 " |grep -i network"}' |sh
Network Address.............10000000ABCD1234
Network Address.............10000000EFGH4567
Network Address.............10000000IJKL88900
Network Address.............10000000ABEF4567
 
jbw

2. fcstat 명령어로 확인

    • 설명 : HBA 포트의 WWN을 확인하는 두번째
1
2
[root@jbw-aix /]# # fcstat fcs0 | grep -"port name"
  World Wide Port Name: 0x10000000C9A8C4A6           <--adapter WWPN
jbw

 

  • fcstat 명령어에서 Display 항목중 "World Wide Node Name" 과 "World Wide Port name"이 있다.
    • World Wide Node Name [WWNN]
      • FC 어댑터의 고유 식별자
      • SAN Network에서 어댑터(노드)의 식별 및 관리목적으로 활용됨.
      • 일반적으로 SAN 조닝시, 사용되지 않음.
    • World Wide Port Name [WWPN]
      • FC 어댑터의 특정 포트의 고유 식별자
      • SAN 조닝시, 사용됨.
반응형
Posted by 정병욱

AIX MPIO Path 제거

GENERAL/IO2023. 9. 17. 09:05
반응형

 



 
• Written by Jung Byung Wook

운영체제 : AIX

 

 


0. AIX MPIO Path 제거가 필요한 케이스

  • MPIO Path를 인식하거나, 제거되는 과정간에 정상적이지 않은 Path가 "Garbage" path로 남아있는 경우.
  • 특정 어댑터에 인식되어있는 패스를 수동으로 제거 해야하는 경우.

 

1. AIX MPIO Path 확인

1) AIX MPIO 전체  Path 확인

1
2
3
4
5
6
7
8
9
10
11
[root@AIX /]#lspath | grep -i fscsi
Enabled   hdisk2 fscsi0
Enabled   hdisk2 fscsi2
Enabled   hdisk3 fscsi0
Enabled   hdisk3 fscsi2
Enabled   hdisk4 fscsi0
Enabled   hdisk4 fscsi2
Enabled   hdisk5 fscsi0
Enabled   hdisk5 fscsi2
Enabled   hdisk6 fscsi0
Enabled   hdisk6 fscsi2
jbw

 

2) 특정 디스크 Path 확인

1
2
3
4
5
[root@AIX /]#lspath -Hl hdisk2
status  name   parent
 
Enabled hdisk2 fscsi0
Enabled hdisk2 fscsi2
jbw

 


2. AIX MPIO Path 제거

 1) 패스 제거 [완전제거]

    • 하기 명령어는 해당 Path을 완전제거하는 옵션.
1
2
[root@AIX /]#rmpath -dl hdisk2 -p fscsi0
path deleted
jbw

 

 2) 패스 Define 상태로 변경

      • 해당 Path의 상태를 "Defined" 상태로 변경.
1
2
[root@AIX /]#rmpath -l hdisk2 -p fscsi0
path defined
jbw

 

반응형
Posted by 정병욱

AIX IP 설정

GENERAL/Network2021. 10. 9. 17:53
반응형
 
=== Written by Jung Byung Wook ===
 
  • AIX에서 Network Interface에 IP 설정하는 방법 기술

1. IP 할당할 인터페이스 확인

  • 어떤 인터페이스에 IP를 할당할지 확인.
  • Network랑 통신하는 Interface의 device name은 "ent"로 시작.
  • ent에 해당하는 Device만 IP할당이 가능.
1
2
3
4
5
6
7
8
9
10
[his-jbw:root] /etc > lsdev -Cc adapter |grep -i ent
ent0     Available 02-00 2-Port 10/100/1000 Base-TX PCI-Express Adapter (14104003)
ent1     Available 02-01 2-Port 10/100/1000 Base-TX PCI-Express Adapter (14104003)
ent2     Available       Virtual I/O Ethernet Adapter (l-lan)
ent3     Available       Virtual I/O Ethernet Adapter (l-lan)
ent4     Available       Virtual I/O Ethernet Adapter (l-lan)
ent5     Available       Virtual I/O Ethernet Adapter (l-lan)
ent6     Available       Logical Host Ethernet Port (lp-hea)
ent7     Available       Shared Ethernet Adapter
ent8     Available       Shared Ethernet Adapter
 
 

 

2. 단순 IP 할당

  • 방법1 : smitty chinet
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
+--------------------------------------------------------------------------+
|                       Available Network Interfaces                       |
|                                                                          |
| Move cursor to desired item and press Enter.                             |
|                                                                          |
|   en0   02-00   Standard Ethernet Network Interface                      |
|   ---------------------------------------------------  "en0 선택"        |
|   en1   02-01   Standard Ethernet Network Interface                      |
|   en2           Standard Ethernet Network Interface                      |
|   en3           Standard Ethernet Network Interface                      |
|   en4           Standard Ethernet Network Interface                      |
|   en5           Standard Ethernet Network Interface                      |
|   en6           Standard Ethernet Network Interface                      |
|   en7           Standard Ethernet Network Interface                      |
|   en8           Standard Ethernet Network Interface                      |
|   et0   02-00   IEEE 802.3 Ethernet Network Interface                    |
|   et1   02-01   IEEE 802.3 Ethernet Network Interface                    |
|   et2           IEEE 802.3 Ethernet Network Interface                    |
|   et3           IEEE 802.3 Ethernet Network Interface                    |
|   et4           IEEE 802.3 Ethernet Network Interface                    |
|   et5           IEEE 802.3 Ethernet Network Interface                    |
|   et6           IEEE 802.3 Ethernet Network Interface                    |
|   et7           IEEE 802.3 Ethernet Network Interface                    |
|   et8           IEEE 802.3 Ethernet Network Interface                    |
|                                                                          |
| F1=Help                 F2=Refresh              F3=Cancel                |
| F8=Image                F10=Exit                Enter=Do                 |
| /=Find                  n=Find Next                                      |
+--------------------------------------------------------------------------+
 
           Change / Show a Standard Ethernet Interface
                                                                                                         
 
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
 
                                                        [Entry Fields]
  Network Interface Name                              en0
  INTERNET ADDRESS (dotted decimal)                  [10.0.0.81]       <- IP 주소 지정.
  Network MASK (hexadecimal or dotted decimal)       [255.255.255.0]   <- Network netmask 지정
  Current STATE                                       up               <- detach 상태를 yes로 변경.                                                                                        
  Use Address Resolution Protocol (ARP)?              yes     
  BROADCAST ADDRESS (dotted decimal)                 []
  Interface Specific Network Options
    ('NULL' will unset the option)
    rfc1323                                          []
    tcp_mssdflt                                      []
    tcp_nodelay                                      []
    tcp_recvspace                                    []
    tcp_sendspace                                    []
  Apply change to DATABASE only                       no                                                                                              
 
 

 

  • 방법2 : chdev 명령어
1
[his-jbw:root] / > chdev -l en1 -a netaddr=10.0.0.81 -a netmask=255.255.255.0 -a state=up
 

 

3. Default Gateway 지정 및 IP 할당

  • 방법 : smitty mktcpip
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
+--------------------------------------------------------------------------+
|                       Available Network Interfaces                       |
|                                                                          |
| Move cursor to desired item and press Enter.                             |
|                                                                          |
|   en0   02-00   Standard Ethernet Network Interface                      |
|   ---------------------------------------------------  "en0 선택"        |
|   en1   02-01   Standard Ethernet Network Interface                      |
|   en2           Standard Ethernet Network Interface                      |
|   en3           Standard Ethernet Network Interface                      |
|   en4           Standard Ethernet Network Interface                      |
|   en5           Standard Ethernet Network Interface                      |
|   en6           Standard Ethernet Network Interface                      |
|   en7           Standard Ethernet Network Interface                      |
|   en8           Standard Ethernet Network Interface                      |
|   et0   02-00   IEEE 802.3 Ethernet Network Interface                    |
|   et1   02-01   IEEE 802.3 Ethernet Network Interface                    |
|   et2           IEEE 802.3 Ethernet Network Interface                    |
|   et3           IEEE 802.3 Ethernet Network Interface                    |
|   et4           IEEE 802.3 Ethernet Network Interface                    |
|   et5           IEEE 802.3 Ethernet Network Interface                    |
|   et6           IEEE 802.3 Ethernet Network Interface                    |
|   et7           IEEE 802.3 Ethernet Network Interface                    |
|   et8           IEEE 802.3 Ethernet Network Interface                    |
|                                                                          |
| F1=Help                 F2=Refresh              F3=Cancel                |
| F8=Image                F10=Exit                Enter=Do                 |
| /=Find                  n=Find Next                                      |
+--------------------------------------------------------------------------+
 
                     Minimum Configuration & Startup
                                                                                                                                                                                                      
   To Delete existing configuration data, please use Further Configuration menus
 
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
 
                                                        [Entry Fields]
* HOSTNAME                                           [his-jbw]     <- hostname
* Internet ADDRESS (dotted decimal)                  [10.0.0.81]   <- IP 주소
  Network MASK (dotted decimal)                      [255.255.255.0]  <- Netmask
* Network INTERFACE                                   en0
  NAMESERVER
           Internet ADDRESS (dotted decimal)         []
           DOMAIN Name                               []
  Default Gateway
       Address (dotted decimal or symbolic name)     [10.0.0.1]       <- Default Gateway
       Cost                                          [0]                                                                                                              
       Do Active Dead Gateway Detection?              no                                                                                                              
  Your CABLE Type                                     N/A                                                                                                             
  START TCP/IP daemons Now                            no                                                                                                              
cs

 

4. IP 할당 내역 및 Default gateway 확인

  • IP할당 내역 확인 : #ifconfig -a
1
2
3
4
5
6
7
8
9
[his-jbw:root] / > ifconfig -a
en0: flags=1e080863,400c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),LARGESEND,CHAIN>
        inet 10.0.0.81 netmask 0xffffff00 broadcast 10.0.0.255
         tcp_sendspace 131072 tcp_recvspace 65536 rfc1323 0
 
lo0: flags=e08084b,c0<UP,BROADCAST,LOOPBACK,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,LARGESEND,CHAIN>
        inet 127.0.0.1 netmask 0xff000000 broadcast 127.255.255.255
        inet6 ::1%1/0
         tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1
 
 

 

  • Default gateway 확인 : #netstat -rn
1
2
3
4
5
6
7
8
9
10
11
12
[his-jbw:root] / > netstat -rn
Routing tables
Destination        Gateway           Flags   Refs     Use  If   Exp  Groups
Route tree for Protocol Family 2 (Internet):
default            10.0.0.1          UG        0    133794 en0      -      -   
10.0.0.0           10.0.0.81         UHSb      0         0 en0      -      -   =>
10/24              10.0.0.81         U         0    953262 en0      -      -   
10.0.0.81          127.0.0.1         UGHS      0         2 lo0      -      -   
10.0.0.255         10.0.0.81         UHSb      0         4 en0      -      -   
127/8              127.0.0.1         U        16   8836890 lo0      -      -   
Route tree for Protocol Family 24 (Internet v6):
::1%1              ::1%1             UH        0    501153 lo0      -      -   
 
반응형

'GENERAL > Network' 카테고리의 다른 글

AIX Socket 종료(rmsock)  (0) 2021.10.08
AIX 특정 서비스 포트를 사용하는 프로세스 확인  (0) 2021.10.03
Posted by 정병욱

반응형

1. Socket 종료(Close)

  • Socket을 종료할수 있는 조건

    ▹ 해당 Socket이 사용중인 파일이 없어야 함.

    ▹ 연관 프로세스가 종료된 상태여야 함.

    ▹ Socket의 상태가 LISTEN / ESTABLISHED 등 프로세스와 직접적인 통신이 수행되고 있는 경우에는 Socket 종료 불가.

    ▹ 일반적으로 프로세스가 완전 종료되는 시점에서 Socket은 모두 정리된다.

   

  • 주의 사항 : Socket을 수동으로 종료할때, Kernel과 관련된 프로세스일 경우 Kernel crash 발생 가능성있음.
  • rmsock 수행로직

    ▹ Scoket과 연관된 프로세스에서 열린 파일이 있는지 검사.

    ▹ 열려있는 파일이 없으면, Socket 종료.

    ▹ 만약, 열려있는 파일이 있으면, syslogd에 내용이 전달되며, /var/adm/ras/rmsock.log 파일에 기록됨.

 

  • Socket 종료 방법
1
2
3
4
5
[his-jbw:root] / > netstat -aAn|grep "\.443"
f100060000bedb98 tcp4       0      0  *.443              *.*                LISTEN
 
[his-jbw:root] / > rmsock f100060000bedb98  tcpcb
 
 
 

 

2. Socket  Close가 안될때, 확인방법

  • 위에서 언급한 Socket 종료조건이 충족되지 않으면, 정상 Socket close는 불가능하다.
  • rmsock 명령어를 사용했을 때, command prompt에 조건에 의해서 rmsock 명령어 수행이 불가한지 내용이 출력되지만, /var/adm/ras/rmsock.log에도 해당 내용이 기록된다.

    ▹ 메세지1 : socket 0xf1000f00002ac808 held by process 7012626 (sshd) can't be removed.

    ▹ 메세지2 : Wait for exiting processes to be cleaned up before removing the socket

 

1
2
3
4
5
6
7
8
9
[his-jbw:root] / > cat /var/adm/ras/rmsock.log
socket 0xf1000f00002ac808 held by process 7012626 (sshd) can't be removed.
socket 0xf1000f00002ab008 held by process 7012626 (sshd) can't be removed.
socket 0xf1000f00003e0808 held by process 6160892 (httpd) can't be removed.
socket 0xf1000f00003f3808 held by process 3670430 (snmpdv3ne) can't be removed.
socket 0xf1000f00003e1808 held by process 6160892 (httpd) can't be removed.
socket 0xf1000f0004316008 held by process 4587970 (inetd) can't be removed.
socket 0xf1000f00003fa808 held by process 6881552 (rmcd) can't be removed.
 
 
 

 

 

반응형

'GENERAL > Network' 카테고리의 다른 글

AIX IP 설정  (0) 2021.10.09
AIX 특정 서비스 포트를 사용하는 프로세스 확인  (0) 2021.10.03
Posted by 정병욱

반응형

 



 
* Written by Jung Byung Wook
 

 

1. lsof 명령어로 특정 서비스 포트 사용하는 프로세스 확인

1
2
3
4
5
6
7
8
9
10
[his-jbw:root] /etc > lsof -i TCP:23
lsof: WARNING: compiled for AIX version 6.1.3.0; this is 6.1.0.0.
COMMAND     PID USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
inetd   2032034 root    9u  IPv6 0xf100050000529bb8      0t0  TCP *:telnet (LISTEN)
telnetd 3211574 root    0u  IPv6 0xf1000500001653b8    0t213  TCP his-jbw:telnet->192.168.0.54:12516 (ESTABLISHED)
telnetd 3211574 root    1u  IPv6 0xf1000500001653b8    0t213  TCP his-jbw:telnet->192.168.0.54:12516 (ESTABLISHED)
telnetd 3211574 root    2u  IPv6 0xf1000500001653b8    0t213  TCP his-jbw:telnet->192.168.0.54:12516 (ESTABLISHED)
telnetd 4587556 root    0u  IPv6 0xf100050000165bb8    0t213  TCP his-jbw:telnet->192.168.0.54:fyre-messanger (ESTABLISHED)
telnetd 4587556 root    1u  IPv6 0xf100050000165bb8    0t213  TCP his-jbw:telnet->192.168.0.54:fyre-messanger (ESTABLISHED)
telnetd 4587556 root    2u  IPv6 0xf100050000165bb8    0t213  TCP his-jbw:telnet->192.168.0.54:fyre-messanger (ESTABLISHED)
 
  • lsof 명령어는  AIX 기본 명령어가 아니며, "AIX Expansion pack"에서 별도로 설치해줘야한다.
  • [lsof.base, lsof.license, lsof.man.en_US] 파일셋을 설치.

 

2. netstat 명령어로 특정 서비스 포트 사용하는 프로세스 확인

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
[his-jbw:root] / > netstat -aAn|grep "\.443"
f100060000bedb98 tcp4       0      0  *.443              *.*                LISTEN
 
[his-jbw:root] / > kdb
(0)> sockinfo f100060000bedb98 tcpcb
 
---- TCPCB ----(@ F100060000BEDB98)----
    seg_next......@F100060000BEDB98  seg_prev......@F100060000BEDB98
    t_softerror... 00000000 t_state....... 00000004 (ESTABLISHED)
    t_timer....... 00000000 (TCPT_REXMT)
    t_timer....... 00000000 (TCPT_PERSIST)
    t_timer....... 00003508 (TCPT_KEEP)
 
..... 제일 끝 화면의 PID정보 확인....
 
proc/fd:  90/323
 
proc/fd: fd: 323
SLOT NAME     STATE      PID    PPID          ADSPACE  CL #THS
pvproc+017400   90*httpds   ACTIVE 005A0022 004901E 00000001144C1400
 
(0)> hcal 005A0022
Value hexa: 005A0022          Value decimal: 5898274
 
[his-jbw:root] / > ps -ef |grep 5898274
    root 5898274  004901E   0   Jan 20      -  0:05 /usr/sbin/httpds    <---  해당 port를 사용중인 application
 
  • netstat 명령어로 서비스 포트 검색.
  • netstat 명령어(netstat -Aan)에서 출력되는 첫번째 컬럼이 Socket address.
  • kdb 명령어로, 해당 Socket 정보 확인
  • Socket 정보에서 제일 하단에 해당 Socket의 사용 프로세스 ID 출력.
  • 프로세스 ID(16진수) > 10진수로 변환.
  • ps -ef 명령어로 해당 프로세스 조회.
반응형

'GENERAL > Network' 카테고리의 다른 글

AIX IP 설정  (0) 2021.10.09
AIX Socket 종료(rmsock)  (0) 2021.10.08
Posted by 정병욱

반응형

1.  NTP Client 구성

  ▪ Time zone은 NTP Server와 동일하게 설정  [KORST-9]

  ▪ NTP daemon은 Server / Client간 1000초(16분) 이상 차이가 나면 동기화 되지 않는다.

  ▪ 그러므로, Server / Client 간에 16분 이상 차이 나지 않게 설정해준다.

        권장사항은 NTP Server와 가장 근소한 시간으로 맞추는 것.


 2. NTP Client 설정

  ▪ NTP Server Hostname / IP : ntp_server / 192.168.0.10

1) /etc/hosts에 NTP Server 정보 등록

  ▪ ntpq 명령어를 통해, Local NTP 서버를 구분하기 위해, /etc/hosts에 정보등록

1
2
[root@ntp_client:/] vi /etc/hosts
192.168.0.10    ntp_server
 

 

2) NTP Client 설정

  ▪ NTP Server의 정보 등록.

1
2
3
4
5
[root@ntp_client:/] vi /etc/ntp.conf
#broadcastclient
server ntp_server   #NTP 서버 IP 등록
driftfile /etc/ntp.drift # where to keep drift data
tracefile /etc/ntp.trace
 

 

3) NTP daemon 시작

만약, 참조하는 Time server이 현재 시간보다 과거시점으로 시간이 변경되었을 때, 해당 Time server를 참조하는 클라이언트 측에서 시간이 뒤로 돌아가는 것을 방지하기 위해서, Daemon 시작시, -x option을 준다.

        Tme backward 방지, 클라이언트 시간흐름을 조절하여 동기화

 

1
2
3
4
5
6
7
8
9
10
11
12
13
[root@ntp_client:/] startsrc -s xntpd -"-x" 
0513-059 The xntpd Subsystem has been started. Subsystem PID is 6946978.
 
[root@ntp_client:/] lssrc -|grep -i xntpd 
  xntpd            tcpip                        active
 
[root@ntp_client:/] ntpq -np   
 
      remote           refid      st  t when poll reach   delay   offset    disp 
================================================================================ 
* ntp_server        0.0.0.0     16  -  -   64    0     0.00    0.000 16000.0 
  127.127.1.0          127.127.1.0  3  l  10  64   17     0.00    0.000 1885.01        
 
 
 

 

▪ /etc/rc.tcpip ➟ xntpd 항목 수정

        재부팅 후에 NTP daemon이 기동될 때도 "-x" option 적용 설정.

1
2
3
[root@ntp_server:/] vi /etc/rc.tcpip
# Start up Network Time Protocol(NTP) daemon
start /usr/sbin/xntpd "$src_running" "-x"
 

 

 

반응형

'GENERAL > NTP' 카테고리의 다른 글

AIX NTP 서버 설정  (0) 2020.01.22
setclock 명령어로 시간 동기화  (0) 2015.03.13
NTP의 필요성 및 취약점  (0) 2015.03.13
Posted by 정병욱

반응형

1. NTP 설명

  ▪ NTP(network time protocol)는 UDP Port 123번을 사용.

  ▪ UDP Port 123가 이 포트가 open되어 있지 않으면 NTP 서버와 동기화할 수 없음.

  ▪ 서버 ⬌ 클라이언트간 시간 동기화는 8~10분 정도가 소요됨.


2. NTP 서버 구성

  ▪ NTP(network time protocol)는 UDP Port 123번을 사용.

  ▪ UDP Port 123가 이 포트가 open되어 있지 않으면 NTP 서버와 동기화할 수 없음.

  ▪ 서버 ⬌ 클라이언트간 시간 동기화는 8~10분 정도가 소요됨.

 

1) 현재 Timezone 및 "KORST-9" 로 변경

  ▪ 초기 설치시 : 별도의 Timezone 설정을 하지 않았따면, 북아메리카 Timezone (CDT)로 설정되어 있음.

  ▪ 국내에서는 "KORST-9" Timezone으로 설정하는 것이 일반적임.

  ▪ Timezone을 변경 후, 재기동 필요.

        일정시간이 지나면, "date" 명령어상에서는 변경된 것으로 보이나, 시스템 전체에 적용하기 위해서는 AIX 운영체제 재기동 필요.

 

 

1
2
3
4
5
6
7
8
[root@ntp_server:/# date
Sat Mar 14 01:01:43 CDT 2015
 
[root@ntp_server:/# chtz "KORST-9"
[root@ntp_server:/# cat /etc/environment | grep -i tz
TZ=KORST-9
 
[root@ntp_server:/# shutdown -Fr
 

 

2) NTP 서버 설정

1
2
3
4
5
6
7
8
[root@ntp_server:/] vi /etc/ntp.conf 
#broadcastclient
server ntp.kornet.net prefer   #선호하는 NTP Server IP
server 127.127.1.0  # NTP Server 자기 자신의 Local clock을 참조
 
fudge 127.127.1.0 stratum 0 # values for local clock
driftfile /etc/ntp.drift # where to keep drift data
tracefile /etc/ntp.trace
cs

 

▪ server ntp.kornet.net prefer : "ntp.kornet.net" Time server를 참조.

        끝부분에 prefer를 설정하면, 설정된 여러 Time server 중 가장 우선순위로 시간동기화를 실행.

▪ server 127.127.1.0 : 운영체제의 Local Clock 기준으로 동기화.

        단, "ntp.kornet.net"이 우선순위가 높으므로, 선호되는 Time server가 통신이 안될 시, 그 다음인 Local Clock을 참조

 

3) NTP daemon 시작

만약, 참조하는 Time server이 현재 시간보다 과거시점으로 시간이 변경되었을 때, 해당 Time server를 참조하는 클라이언트 측에서 시간이 뒤로 돌아가는 것을 방지하기 위해서, Daemon 시작시, -x option을 준다.

        Tme backward 방지, 클라이언트 시간흐름을 조절하여 동기화

 

1
2
3
4
5
6
7
8
9
10
11
12
13
[root@ntp_server:/] startsrc -s xntpd -"-x" 
0513-059 The xntpd Subsystem has been started. Subsystem PID is 6946978.
 
[root@ntp_server:/] lssrc -|grep -i xntpd 
  xntpd            tcpip                        active
 
[root@ntp_server:/] ntpq -np   
 
      remote           refid      st  t when poll reach   delay   offset    disp 
================================================================================ 
* ntp.kornet.net       0.0.0.0     16  -  -   64    0     0.00    0.000 16000.0 
  127.127.1.0          127.127.1.0  3  l  10  64   17     0.00    0.000 1885.01        
 
 
 

 

▪ /etc/rc.tcpip ➟ xntpd 항목 수정

        재부팅 후에 NTP daemon이 기동될 때도 "-x" option 적용 설정.

1
2
3
[root@ntp_server:/] vi /etc/rc.tcpip
# Start up Network Time Protocol(NTP) daemon
start /usr/sbin/xntpd "$src_running" "-x"
 

 

 

반응형

'GENERAL > NTP' 카테고리의 다른 글

AIX NTP Client 구성  (0) 2021.03.30
setclock 명령어로 시간 동기화  (0) 2015.03.13
NTP의 필요성 및 취약점  (0) 2015.03.13
Posted by 정병욱

보안로그

GENERAL/Security2018. 10. 3. 23:09
반응형


su 명령이 실행되면 /var/adm/sulog에 다음 항목의 switch user의 기록이 남는다

- su 명령을 실행한 날짜와 시간

- su 명령이 실행된 터미널

- 그 명령을 실행한 계정

- 사용자가 변경을 시도한 계정


만약 권한 없는 su를 시도한다면 해킹을 의심해봐야 한다


1
2
3
4
5
6
7
8
9
# cat /var/adm/sulog
 
SU 07/07 18:45 + pts/2 approot-webroot
SU 07/08 13:32 - pts/2 webroot-root
SU 07/10 15:23 + pts/4 root-toms
SU 03/12 10:58 + pts/9 root-indigo
SU 05/31 14:25 + pts/5 root-test1
SU 05/31 17:11 + pts/5 root-webroot
SU 06/23 15:26 + pts/5 webroot-search
cs



보안 로그


사용자가 로그인에 성공하면 로그인 기록이 /var/adm/wtmp에 기록되고, 현재 로그인 되어 있는 사용자는 /etc/utmp에 기록된다. 

이들 파일은 바이너리 파일로 해당 내용을 보기 위해서는 who 명령어를 사용한다


1
2
3
4
5
6
7
8
9
10
11
12
13
# who /etc/utmp
 
root        pts/1        4월 30일 09:2   (mycom)
root        pts/4        4월 30일 09:3   (mycom)
root        pts/5        4월 30일 09:5   (172.22.*.*)
 
 
 
# who /var/adm/wtmp
 
fedev       ftp1867934   4월  1일 09:1   (172.22.*.*)
root        pts/1        4월  1일 09:1   (mycom)
fidev       ftp1867936   4월  1일 09:2   (172.22.*.*)
cs



반응형
Posted by 정병욱