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 정병욱