[AIX 네트워크 관리 13] TCP/IP (7) 네트워크 인터페이스와 주소 지정, ISNO, 서브넷
https://archive.horanglab.com/posts/aix-net-tcpip-7
핵심 정리
- 네트워크 인터페이스는 IP 계층과 장치 드라이버 사이의 네트워크별 소프트웨어입니다. 종류: en(이더넷 V2), et(802.3), tr(토큰링), SLIP, lo(루프백), FDDI, so(Serial Optical), at(ATM), PPP, vi(가상 IP). 어댑터
ent0을 설치하면en0과et0이 자동으로 더해집니다. - 인터페이스에서 꼭 설정할 것은 인터넷 주소뿐이고 나머지는 기본값을 씁니다. 기본 MTU: 이더넷 1500, 802.3 1492, 토큰링 1500(브리지를 거치면 최대 I-frame보다 8 작게), SLIP 1006, Serial Optical 61428, ATM 9180. MTU를 바꿀 때는 네트워크의 다른 스테이션과 맞춰야 합니다.
- 같은 네트워크에 인터페이스가 여럿이면 각각 고유한 IP가 있어야 하며, 다중 경로 라우팅으로 나가는 트래픽을 번갈아 보냅니다.
- ISNO(Interface Specific Network Options): 인터페이스마다
rfc1323,tcp_nodelay,tcp_sendspace,tcp_recvspace,tcp_mssdflt를 따로 줘no전체 값을 덮어씁니다(use_isno=1필요, 소켓 옵션이 가장 우선). SMIT로는 못 하며ifconfig(재부팅 전까지)나chdev(ODM에 저장)로 설정하고lsattr·ifconfig로 봅니다. - IPv4 주소는 32비트이며 클래스 A(첫 옥텟 1126, 8/24), B(128191, 16/16), C(192~223, 24/8), D(멀티캐스트)입니다. 호스트 부분이 0인 주소는 와일드카드가 되어 네트워크를 요청으로 넘치게 하므로 피합니다. 서브넷 마스크는 네트워크·서브넷 비트를 1로 둔 4바이트이며, 목적지와 AND한 뒤 로컬 네트워크 주소와 XOR해 0이면 직접 닿는다고 판단합니다. 127.0.0.1은 루프백입니다.
| 항목 | 내용 |
|---|---|
| 버전 | AIX 5.3, AIX 6.1 (5.3판의 AIX 5.1 이전 설명이 6.1판에서 빠짐) |
| 원문 | Networks and communication management — 5.3판 119133쪽, 6.1판 165179쪽 |
| 관련 명령어 | smit inet, smit chinet, smit lsinet, lsdev -C -c if, ifconfig, chdev, lsattr -E -l en0, no -a, netstat -v |
TCP/IP 네트워크 인터페이스 계층은 네트워크 계층의 IP 데이터그램을 특정 네트워크 기술이 이해하고 전송할 수 있는 패킷으로 만듭니다.
네트워크 인터페이스는 네트워크별 장치 드라이버 및 IP 계층과 통신하는 네트워크별 소프트웨어로, IP 계층에 있을 수 있는 모든 네트워크 어댑터에 대한 일관된 인터페이스를 제공합니다.
IP 계층은 전송할 패킷의 목적지 주소를 보고 알맞은 네트워크 인터페이스를 고릅니다. 네트워크 인터페이스마다 네트워크 주소가 있습니다. 네트워크 인터페이스 계층은 메시지를 목적지에 배달하는 데 필요한 링크 계층 프로토콜 머리글을 붙이거나 떼어 내는 일을 맡습니다. 네트워크 어댑터 장치 드라이버는 네트워크 어댑터 카드를 제어합니다.
꼭 필요하지는 않지만 네트워크 인터페이스는 보통 네트워크 어댑터와 연결됩니다. 예를 들어 루프백 인터페이스에는 연결된 네트워크 어댑터가 없습니다. 기계는 연결하는 네트워크(종류가 아니라)마다 네트워크 어댑터 카드가 있어야 합니다. 그러나 네트워크 인터페이스 소프트웨어는 쓰는 네트워크 어댑터 종류마다 하나만 있으면 됩니다. 예를 들어 호스트가 토큰링 네트워크 두 개에 붙으면 네트워크 어댑터 카드는 두 개 있어야 하지만, 토큰링 네트워크 인터페이스 소프트웨어와 토큰링 장치 드라이버는 하나씩만 있으면 됩니다.
TCP/IP가 지원하는 네트워크 인터페이스 종류
- 표준 이더넷 버전 2(en)
- IEEE 802.3(et)
- 토큰링(tr)
- SLIP(Serial Line Internet Protocol)
- 루프백(lo)
- FDDI
- Serial Optical(so)
- ATM(at)
- PPP(Point-to-Point Protocol)
- 가상 IP 주소(vi)
이더넷, 802.3, 토큰링 인터페이스는 LAN에 씁니다. SLIP 인터페이스는 직렬 연결에 씁니다. 루프백 인터페이스는 호스트가 자기 자신에게 메시지를 보낼 때 씁니다. Serial Optical 인터페이스는 Serial Optical Link 장치 처리기를 쓰는 광 점대점 네트워크에 씁니다. ATM 인터페이스는 100Mb/s와 155Mb/s ATM 연결에 씁니다. PPP는 대개 모뎀으로 다른 컴퓨터나 네트워크에 연결할 때 씁니다. 가상 IP 주소 인터페이스(가상 인터페이스)는 특정 네트워크 어댑터와 연결되지 않습니다. 호스트에 가상 인터페이스를 여러 개 구성할 수 있습니다. 가상 인터페이스를 구성하면 응용 프로그램이 다른 인터페이스를 고르지 않는 한 첫 가상 인터페이스의 주소가 출발지 주소가 됩니다. 가상 IP 주소를 출발지 주소로 쓰는 프로세스는 목적지까지 가장 좋은 경로를 제공하는 어떤 네트워크 인터페이스로든 패킷을 보낼 수 있습니다. 가상 IP 주소로 오는 패킷은 어느 인터페이스로 들어오든 프로세스에 배달됩니다.
영어 원문
TCP/IP network interfaces
The TCP/IP Network Interface layer formats IP datagrams at the Network layer into packets that specific network technologies can understand and transmit.
A network interface is the network-specific software that communicates with the network-specific device driver and the IP layer in order to provide the IP layer with a consistent interface to all network adapters that might be present.
The IP layer selects the appropriate network interface based on the destination address of the packet to be transmitted. Each network interface has a network address. The Network Interface layer is responsible for adding or removing any link layer protocol header required to deliver a message to its destination. The network adapter device driver controls the network adapter card.
Although not required, a network interface is usually associated with a network adapter. For instance, the loopback interface has no network adapter associated with it. A machine must have one network adapter card for each network (not network type) to which it connects. However, a machine requires only one copy of the network interface software for each network adapter it uses. For instance, if a host attaches to two token-ring networks, it must have two network adapter cards. However, only one copy of the token-ring network interface software and one copy of the token-ring device driver is required.
TCP/IP supports types of network interfaces
Standard Ethernet Version 2 (en)
IEEE 802.3 (et)
Token-ring (tr)
Serial Line Internet Protocol (SLIP)
Loopback (lo)
FDDI
Serial Optical (so)
ATM (at)
Point-to-Point Protocol (PPP)
Virtual IP Address (vi)
The Ethernet, 802.3, and token-ring interfaces are for use with local area networks (LANs). The SLIP interface is for use with serial connections. The loopback interface is used by a host to send messages back to itself. The Serial Optical interface is for use with optical point-to-point networks using the Serial Optical Link device handler. The ATM interface is for use with 100 Mb/sec and 155 Mb/sec ATM connections. Point to Point protocol is most often used when connecting to another computer or network via a modem. The Virtual IP Address interface (also called virtual interface) is not associated with any particular network adapter. Multiple instances of a virtual interface can be configured on a host. When virtual interfaces are configured, the address of the first virtual interface becomes the source address unless an application has chosen a different interface. Processes that use a virtual IP address as their source address can send packets through any network interface that provides the best route for that destination. Incoming packets destined for a virtual IP address are delivered to the process regardless of the interface through which they arrive.
네트워크 인터페이스 자동 구성
새 네트워크 어댑터를 시스템에 물리적으로 설치하면 운영 체제가 그 어댑터에 알맞은 네트워크 인터페이스를 자동으로 더합니다.
예를 들어 토큰링 어댑터를 설치하면 운영 체제는 어댑터에 tok0이라는 이름을 주고 토큰링 네트워크 인터페이스 tr0을 더합니다. 이더넷 어댑터를 설치하면 어댑터에 ent0이라는 이름을 주고 이더넷 버전 2와 IEEE 802.3 인터페이스, 곧 en0과 et0을 함께 더합니다.
대개 어댑터 이름과 네트워크 인터페이스 이름은 일대일로 대응합니다. 예를 들어 토큰링 어댑터 tok0은 인터페이스 tr0, 어댑터 tok1은 tr1에 대응합니다. 마찬가지로 이더넷 어댑터 ent0은 인터페이스 en0(이더넷 버전 2)과 et0(IEEE 802.3), 어댑터 ent1은 en1과 et1에 대응합니다.
ATM은 RFC1577에 따라 ATM 스테이션 하나가 여러 논리 IP 서브네트워크에 속할 수 있습니다. 이때는 장치 하나에 인터페이스가 여럿 연결됩니다. 그러려면 인터페이스를 명시적으로 더하고 장치 이름을 줘야 합니다.
참고: 보통은 네트워크 인터페이스를 손으로 지우거나 더할 필요가 없습니다. 그러나 문제 판별 절차에 따라 그래야 할 때가 있습니다. 이때는 Web-based System Manager(wsm)나 SMIT 빠른 경로 smit inet으로 알맞은 인터페이스를 지우고 다시 더합니다.
영어 원문
Automatic configuration of network interfaces
When a new network adapter is physically installed in the system, the operating system automatically adds the appropriate network interface for that adapter.
For example, if you install a token-ring adapter in your system, the operating system assigns it the name tok0 and add a token-ring network interface named tr0. If you install an Ethernet adapter in your system, the operating system assigns it the name ent0 and add both an Ethernet Version 2 and an IEEE 802.3 interface, named en0 and et0 respectively.
In most cases, there is a one-to-one correspondence between adapter names and network interface names. For example, token-ring adapter tok0 corresponds to interface tr0, adapter tok1 corresponds to interface tr1, and so on. Similarly, Ethernet adapter ent0 corresponds to interface en0 (for Ethernet Version 2) and et0 (for IEEE 802.3), and adapter ent1 corresponds to interface en1 (for Ethernet Version 2) and et1 (for IEEE 802.3).
In the case of ATM, according to RFC1577, it is possible for an ATM station to be part of multiple Logical IP Subnetworks. In this case, multiple interfaces are associated with a device. This requires that an interface be specifically added and a device name be assigned to it.
Note: Under normal circumstances, you do not need to delete or add a network interface manually. However, some problem determination procedures might require you to do so. In this case, use the Web-based System Manager wsm, or the SMIT fast path, smit inet, to delete and re-add the appropriate interface.
TCP/IP 기본 구성 값
시스템을 시작할 때마다 운영 체제는 ODM 데이터베이스의 정보를 바탕으로 네트워크 인터페이스 소프트웨어를 자동으로 구성합니다. 처음에는 네트워크 인터페이스가 기본값으로 구성됩니다.
어떤 네트워크 인터페이스로 통신하려면 인터넷 주소를 설정해야 합니다. 꼭 설정해야 하는 속성은 이것뿐이며, 필요한 다른 속성은 모두 기본값을 쓸 수 있습니다. 네트워크 인터페이스별 기본값은 다음과 같습니다.
이더넷 기본값
Web-based System Manager(wsm)나 SMIT의 Network Interface Selection 메뉴로 값을 바꿀 수 있는 이더넷 네트워크 어댑터 속성입니다.
| 속성 | 기본값 | 가능한 값 |
|---|---|---|
| netaddr | ||
| state | down | up, down, detach |
| arp | yes | yes, no |
| netmask | ||
| broadcast |
Web-based System Manager(wsm)나 SMIT의 Network Interface Drivers 메뉴로 바꿀 수 있는 이더넷 네트워크 장치 드라이버 속성과 기본값입니다.
| 속성 | 기본값 | 가능한 값 |
|---|---|---|
| mtu | 1500 | 60~1500 |
802.3 기본값
Web-based System Manager(wsm)나 SMIT의 Network Interface Selection 메뉴로 값을 바꿀 수 있는 802.3 네트워크 어댑터 속성입니다.
| 속성 | 기본값 | 가능한 값 |
|---|---|---|
| netaddr | ||
| state | down | up, down, detach |
| arp | yes | yes, no |
| netmask | ||
| broadcast |
Web-based System Manager(wsm)나 SMIT의 Network Interface Drivers 메뉴로 바꿀 수 있는 802.3 네트워크 장치 드라이버 속성과 기본값입니다.
| 속성 | 기본값 | 가능한 값 |
|---|---|---|
| mtu | 1492 | 60~1492 |
토큰링 기본값
Web-based System Manager(wsm)나 SMIT의 Network Interface Selection 메뉴로 값을 바꿀 수 있는 토큰링 네트워크 어댑터 속성입니다.
| 속성 | 기본값 | 가능한 값 |
|---|---|---|
| netaddr | ||
| netmask | ||
| state | down | up, down, detach |
| arp | yes | yes, no |
| hwloop | no | yes, no |
| broadcast | ||
| allcast | no | yes, no |
Web-based System Manager(wsm)나 SMIT의 Network Interface Drivers 메뉴로 바꿀 수 있는 토큰링 네트워크 장치 드라이버 속성과 기본값입니다.
| 속성 | 기본값 | 가능한 값 |
|---|---|---|
| mtu (4Mbps) | 1500 | 60~4056 |
| mtu (16Mbps) | 1500 | 60~17960 |
참고: 브리지를 거쳐 동작할 때는 최대 전송 단위(MTU) 기본값 1500을, 브리지가 라우팅 제어 필드에 알리는 최대 정보 필드(최대 I-frame)보다 8 작은 값으로 바꿔야 합니다. 예를 들어 라우팅 제어 필드의 최대 I-frame 값이 1500이면 MTU를 1492로 설정합니다. 토큰링 네트워크 인터페이스에만 해당합니다. 자세한 내용은 TCP/IP 문제 해결의 토큰링/토큰링 브리지 문제를 봅니다.
IBM 16/4 PowerPC 토큰링 어댑터(ISA)를 쓰면 MTU가 2000으로 제한됩니다.
SLIP 기본값
Web-based System Manager(wsm)나 SMIT의 Network Interface Selection 메뉴로 값을 바꿀 수 있는 SLIP 네트워크 어댑터 속성입니다.
| 속성 | 기본값 | 가능한 값 |
|---|---|---|
| netaddr | ||
| dest | ||
| state | up | up, down, detach |
| netmask |
Web-based System Manager(wsm)나 SMIT의 Network Interface Drivers 메뉴에 보이는 SLIP 네트워크 장치 드라이버 속성과 기본값입니다.
| 속성 | 기본값 | 가능한 값 |
|---|---|---|
| mtu | 1006 | 60~4096 |
Serial Optical 기본값
Web-based System Manager(wsm)나 SMIT의 Network Interface Selection 메뉴로 값을 바꿀 수 있는 Serial Optical 네트워크 채널 변환기 속성입니다.
| 속성 | 기본값 | 가능한 값 |
|---|---|---|
| netaddr | ||
| state | down | up, down, detach |
| netmask |
Web-based System Manager(wsm)나 SMIT의 Network Interface Drivers 메뉴에 보이는 Serial Optical 네트워크 장치 처리기 속성과 기본값입니다.
| 속성 | 기본값 | 가능한 값 |
|---|---|---|
| mtu | 61428 | 1~61428 |
ATM 기본값
Web-based System Manager(wsm)나 SMIT의 Network Interface Selection 메뉴로 값을 바꿀 수 있는 ATM 네트워크 어댑터 속성입니다.
| 속성 | 기본값 | 가능한 값 |
|---|---|---|
| netaddr | ||
| netmask | ||
| state | up | up, down, detach |
| Connection Type | svc_s |
svc_c, svc_s, pvc |
| ATM Server Address | ||
| Alternate Device | ||
| idle timer | 60 | 1~60 |
| Best Effort Bit Rate (UBR), kbit/s | 0 | 1~155,000 |
Web-based System Manager(wsm)나 SMIT의 Network Interface Drivers 메뉴에 보이는 ATM 네트워크 장치 드라이버 속성과 기본값입니다.
| 속성 | 기본값 | 가능한 값 |
|---|---|---|
| mtu | 9180 | 1~64K |
참고: 네트워크 관리자는 MTU 크기를 기본값에서 다른 값으로 바꿀 때 조심해야 합니다. MTU 크기는 네트워크의 다른 스테이션과 맞춰야 합니다.
인터페이스에서 PVC를 쓰려면 VPI:VCI를 정의해야 합니다. Network Interface Selection 메뉴에서 하며, 이 메뉴의 PVCs for IP over ATM Network 옵션으로 PVC를 나열하고, 더하고, 바꾸고, 지웁니다.
영어 원문
TCP/IP default configuration values
At each system startup, the operating system automatically configures the network interface software based upon the information in the ODM database. Initially, the network interface is configured with default values.
In order to communicate through a given network interface, the Internet address must be set. This is the only attribute that you need to set. All other necessary attributes can use the default values. The default values for each network interface follow.
TCP/IP default Ethernet values
Valid Ethernet network adapter attributes along can have their values changed using the Web-based System Manager, wsm or the Network Interface Selection menu in SMIT.
| Attribute | Default value | Possible values |
|---|---|---|
| netaddr | ||
| state | down | up, down, detach |
| arp | yes | yes, no |
| netmask | ||
| broadcast |
The following valid Ethernet network device driver attribute is shown along with its default values, which can be changed using the Web-based System Manager, wsm, or the Network Interface Drivers menu in SMIT.
| Attribute | Default value | Possible values |
|---|---|---|
| mtu | 1500 | 60 through 1500 |
TCP/IP default 802.3 values
Valid 802.3 network adapter attributes can have their values changed using the Web-based System Manager, wsm, or the Network Interface Selection menu in SMIT.
| Attribute | Default value | Possible values |
|---|---|---|
| netaddr | ||
| state | down | up, down, detach |
| arp | yes | yes, no |
| netmask | ||
| broadcast |
The following valid 802.3 network device driver attribute is shown along with its default values, which can be changed using the Web-based System Manager, wsm, or the Network Interface Drivers menu in SMIT.
| Attribute | Default value | Possible values |
|---|---|---|
| mtu | 1492 | 60 through 1492 |
TCP/IP default Token-Ring values
Valid token-ring network adapter attributes can have their values changed using the Web-based System Manager, wsm, or the Network Interface Selection menu in SMIT.
| Attribute | Default value | Possible values |
|---|---|---|
| netaddr | ||
| netmask | ||
| state | down | up, down, detach |
| arp | yes | yes, no |
| hwloop | no | yes, no |
| netmask | ||
| broadcast | ||
| allcast | no | yes, no |
The following valid token-ring network device driver attributes are shown along with its default values, which can be changed using the Web-based System Manager, wsm, or the Network Interface Drivers menu in SMIT.
| Attribute | Default value | Possible values |
|---|---|---|
| mtu (4Mbps) | 1500 | 60 through 4056 |
| mtu (16Mbps) | 1500 | 60 through 17960 |
Note: When operating through a bridge, the default value of 1500 for the maximum transmission unit (MTU) should be changed to a value that is 8 less than the maximum information field (maximum I-frame) advertised by the bridge in the routing control field. For example, if the maximum I-frame value is 1500 in the routing control field, the MTU size should be set to 1492. This is for token-ring network interfaces only. For more information, see TCP/IP problems with a Token-Ring/Token-Ring bridge.
When using the IBM® 16/4 PowerPC token-ring adapter (ISA), the MTU is restricted to 2000.
TCP/IP default SLIP values
Valid SLIP network adapter attributes can have their values changed using the Web-based System Manager, wsm, or the Network Interface Selection menu in SMIT.
| Attribute | Default value | Possible values |
|---|---|---|
| netaddr | ||
| dest | ||
| state | up | up, down, detach |
| netmask |
The following valid SLIP network device driver attribute is shown along with its default values as displayed under the Web-based System Manager, wsm, or the Network Interface Drivers menu in SMIT.
| Attribute | Default value | Possible values |
|---|---|---|
| mtu | 1006 | 60 through 4096 |
TCP/IP default Serial Optical values
Valid Serial Optical network channel converter can have their values changed using the Web-based System Manager, wsm, or the Network Interface Selection menu in SMIT.
| Attribute | Default value | Possible values |
|---|---|---|
| netaddr | ||
| state | down | up, down, detach |
| netmask |
The following valid serial optical network device handler attribute is shown along with its default values as displayed under the Web-based System Manager, wsm, or the Network Interface Drivers menu in SMIT.
| Attribute | Default value | Possible values |
|---|---|---|
| mtu | 61428 | 1 through 61428 |
TCP/IP default ATM values
Valid ATM network adapter attributes can have their values changed using the Web-based System Manager, wsm, or the Network Interface Selection menu in SMIT.
| Attribute | Default value | Possible values |
|---|---|---|
| netaddr | ||
| netmask | ||
| state | up | up, down, detach |
| Connection Type | svc_s |
svc_c, svc_s, pvc |
| ATM Server Address | ||
| Alternate Device | ||
| idle timer | 60 | 1 through 60 |
| Best Effort Bit Rate (UBR) in kbits/sec | 0 | 1 through 155,000 |
The following valid ATM network device driver attribute is shown along with its default values as displayed under the Web-based System Manager, wsm, or the Network Interface Drivers menu in SMIT.
| Attribute | Default value | Possible values |
|---|---|---|
| mtu | 9180 | 1 through 64K |
Note: Network Administrators need to exercise caution while changing MTU size from default to some other value. The MTU size needs to be coordinated with other stations on the network.
If PVCs are to be used on an interface, the VPI:VCIs needs to be defined. This is performed through the Network Interface Selection Menu. The PVCs for IP over ATM Network option on this menu is used to list, add, change, or remove PVCs.
같은 네트워크에 인터페이스가 여럿일 때
네트워크 하나에 여러 네트워크 인터페이스가 붙어 있으면 인터페이스마다 고유한 IP 주소가 있어야 합니다.
다중 경로 라우팅(Multipath Routing) 기능을 쓰면 같은 서브넷의 다중 경로 인터페이스에 대한 경로를 IP 라우팅 표에 더할 수 있습니다. 그러면 나가는 트래픽이 한 인터페이스로만 가지 않고 인터페이스들을 번갈아 씁니다.
영어 원문
Implications of multiple network interfaces on the same network
If multiple network interfaces are attached to a single network, each interface must have a unique IP address.
The Multipath Routing feature allows routes to be added to the IP routing table for multipath interfaces on the same subnet. This allows outgoing traffic to alternate between the interfaces rather than being sent through one interface only.
네트워크 인터페이스 관리
네트워크 인터페이스를 관리하려면 Web-based System Manager(WSM Network 빠른 경로 응용 프로그램)나 다음 표의 작업을 씁니다.
표 62. 네트워크 인터페이스 관리 작업
| 작업 | SMIT 빠른 경로 | 명령이나 파일 | Web-based System Manager |
|---|---|---|---|
| 모든 네트워크 장치 나열 | smit lsinet |
lsdev -C -c if |
Software → Devices → All Devices |
| 네트워크 장치 구성 | smit chinet |
ifconfig 명령과 rc.net 파일 참고 |
Software → Network → TCPIP (IPv4 and IPv6) → Protocol Configuration → Set up basic TCP/IP configuration |
원격 마운트한 /usr로 네트워크 인터페이스 정보 바꾸기 |
smit chdev(주 1, 2) |
chgif(주 1, 2) |
Software → Network → TCPIP (IPv4 and IPv6) → Network Interfaces → 마우스 오른쪽 단추로 Properties → Aliases |
| 네트워크 인터페이스 통계 얻기 | netstat -v |
Software → Network → TCPIP (IPv4 and IPv6) → Network Interfaces → Network Statistics |
주
- 원격 마운트한
/usr에서 바꾼 내용은 네트워크를 다시 시작하거나ifconfig명령으로 바로 적용할 때까지 ODM(Information Database)에만 영향을 줍니다. - 원격 마운트한
/usr를 쓸 때는 쓰고 있는 인터페이스를 고치지 않도록 조심합니다. 그곳에 라이브러리, 명령, 커널이 있기 때문입니다.
영어 원문
Network interface management
To manage network interfaces, use the web-based system manager, WSM Network, FastPath (application) or the tasks in this table.
Table 62. Managing network interfaces tasks
| Task | SMIT fast path | Command or file |
|---|---|---|
| Web-based System Manager Management Environment | ||
| List all network devices | smit lsinet |
lsdev -C -c if Software —> Devices —> All Devices. |
| Configure a network device | smit chinet |
See the ifconfig command and the rc.net file Software —> Network —> TCPIP (IPv4 and IPv6) —> Protocol Configuration —> Set up basic TCP/IP configuration. |
| Changing network interface | ||
| info with remotely mounted | ||
/usr |
smit chdev1,2 |
chgif1,2 Software —> Network —> TCPIP (IPv4 and IPv6) —> Network Interfaces —>. Right-click and select Properties —> Aliases. |
| Obtaining statistics for a | ||
| network interface | netstat -v Software —> Network —> TCPIP (IPv4 and IPv6) —> Network Interfaces —> Network Statistics. |
Note
Changes from a remotely mounted
/usraffect only the Information Database (ODM) until the network is restarted or until the ifconfig command is used to make the changes take effect right away.When using a remotely mounted
/usr, be careful not to modify the interface being used, because that is the location of the libraries, commands, and kernel.
인터페이스별 네트워크 옵션(ISNO)
TCP/IP 인터페이스로 좋은 고속 네트워크 성능(100Mb 이상)을 얻으려면 특별히 조정해야 합니다. 한 시스템에서 여러 네트워크 인터페이스와, 전통적인 인터페이스와 고속 TCP/IP 인터페이스를 섞어 쓸 수 있으므로 이 일이 복잡해집니다.
AIX에서는 ISNO(Interface Specific Network Options)로 시스템 관리자가 TCP/IP 인터페이스를 하나하나 최고 성능으로 조정할 수 있습니다.
지원하는 인터페이스마다 ISNO 매개변수 다섯 개가 있습니다: rfc1323, tcp_nodelay, tcp_sendspace, tcp_recvspace, tcp_mssdflt. 설정하면 이 값이 no 명령으로 설정한 같은 이름의 시스템 전체 매개변수를 덮어씁니다. 특정 인터페이스에 ISNO를 설정하지 않으면 시스템 전체 값을 씁니다. 응용 프로그램이 setsockopt 서브루틴으로 특정 소켓에 옵션을 설정하면 그 옵션이 ISNO를 덮어씁니다.
ISNO가 적용되려면 no 명령으로 설정하는 네트워크 옵션 use_isno가 1이어야 합니다. use_isno의 기본값은 1입니다.
일부 고속 어댑터는 ODM 데이터베이스에 ISNO 매개변수가 기본으로 설정되어 있습니다.
MTU 9000을 쓰도록 구성한 기가비트 이더넷 인터페이스는 기본으로 다음 ISNO 값을 씁니다.
| 이름 | AIX 4.3.3 | AIX 4.3.3 (4330-08) | AIX 5.1 이후 |
|---|---|---|---|
tcp_sendspace |
131072 | 262144 | 262144 |
tcp_recvspace |
92160 | 131072 | 131072 |
| rfc1323 | 1 | 1 | 1 |
MTU 1500을 쓰도록 구성한 기가비트 이더넷 인터페이스는 기본으로 다음 ISNO 값을 씁니다.
| 이름 | AIX 4.3.3 | AIX 4.3.3 (4330-08) | AIX 5.1 이후 |
|---|---|---|---|
tcp_sendspace |
65536 | 131072 | 131072 |
tcp_recvspace |
16384 | 65536 | 65536 |
| rfc1323 | 0 | 설정 안 함 | 설정 안 함 |
MTU 1500을 쓰도록 구성한 ATM 인터페이스는 기본으로 다음 ISNO 값을 씁니다.
| 이름 | AIX 4.3.3 | AIX 4.3.3 (4330-08) | AIX 5.1 이후 |
|---|---|---|---|
tcp_sendspace |
16384 | 설정 안 함 | 설정 안 함 |
tcp_recvspace |
16384 | 설정 안 함 | 설정 안 함 |
| rfc1323 | 0 | 설정 안 함 | 설정 안 함 |
tcp_nodelay |
0 | 설정 안 함 | 설정 안 함 |
tcp_mssdflt |
512 | 설정 안 함 | 설정 안 함 |
MTU 65527을 쓰도록 구성한 ATM 인터페이스는 기본으로 다음 ISNO 값을 씁니다.
| 이름 | AIX 4.3.3 | AIX 4.3.3 (4330-08) | AIX 5.1 이후 |
|---|---|---|---|
tcp_sendspace |
655360 | 655360 | 655360 |
tcp_recvspace |
655360 | 655360 | 655360 |
| rfc1323 | 0 | 1 | 1 |
tcp_nodelay |
0 | 설정 안 함 | 설정 안 함 |
tcp_mssdflt |
512 | 설정 안 함 | 설정 안 함 |
MTU 9180을 쓰도록 구성한 ATM 인터페이스는 기본으로 다음 ISNO 값을 씁니다.
| 이름 | AIX 4.3.3 | AIX 4.3.3 (4330-08) | AIX 5.1 이후 |
|---|---|---|---|
tcp_sendspace |
65536 | 65536 | 65536 |
tcp_recvspace |
65536 | 65536 | 65536 |
| rfc1323 | 0 | 설정 안 함 | 설정 안 함 |
tcp_nodelay |
0 | 설정 안 함 | 설정 안 함 |
tcp_mssdflt |
512 | 설정 안 함 | 설정 안 함 |
MTU 4352를 쓰도록 구성한 FDDI 인터페이스는 기본으로 tcp_sendspace 45046, tcp_recvspace 45046을 씁니다.
ISNO 매개변수는 SMIT로 보거나 바꿀 수 없습니다. chdev 명령이나 ifconfig 명령으로 설정합니다. ifconfig 명령은 다음 재부팅 전까지만 값을 바꿉니다. chdev 명령은 ODM 데이터베이스의 값을 바꾸므로 이후 재부팅에서도 쓰입니다. 현재 값은 lsattr나 ifconfig 명령으로 봅니다.
다음 예는 먼저 시스템과 인터페이스의 지원을 확인한 다음 새 값을 설정하고 확인하는 명령입니다.
no와lsattr명령으로 시스템과 인터페이스가 지원하는지 확인합니다.- 다음과 비슷한 명령으로
use_isno옵션이 켜져 있는지 확인합니다.
- 다음과 비슷한 명령으로
$ no -a | grep isno
use_isno=1
lsattr -El명령으로 인터페이스가 새 ISNO 다섯 개를 지원하는지 확인합니다.
$ lsattr -E -l en0 -H
attribute value description
rfc1323 N/A
tcp_nodelay N/A
tcp_sendspace N/A
tcp_recvspace N/A
tcp_mssdflt N/A
ifconfig나chdev명령으로 인터페이스별 값을 설정합니다.ifconfig명령은 값을 임시로 설정하므로 시험할 때 권장합니다.chdev명령은 ODM을 바꾸므로 사용자 정의 값이 재부팅 뒤에도 유효합니다.- 다음 가운데 하나로
tcp_recvspace와tcp_sendspace를 64K로 하고tcp_nodelay를 켭니다.
- 다음 가운데 하나로
$ ifconfig en0 tcp_recvspace 65536 tcp_sendspace 65536 tcp_nodelay 1
$ chdev -l en0 -a tcp_recvspace=65536 -a tcp_sendspace=65536 -a tcp_nodelay=1
- 또는
no명령이 전체 값rfc1323=1을 보고한다면, root 사용자가 다음 명령으로 en0을 거치는 모든 연결의 rfc1323을 끌 수 있습니다.
$ ifconfig en0 rfc1323 0
$ chdev -l en0 -a rfc1323=0
- 다음 예처럼
ifconfig나lsattr명령으로 설정을 확인합니다.
$ ifconfig en0 <UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT>
en0: flags=e080863
inet 9.19.161.100 netmask 0xffffff00 broadcast 9.19.161.255
tcp_sendspace 65536 tcp_recvspace 65536 tcp_nodelay 1 rfc1323 0
$ lsattr -El en0
rfc1323 0 N/A True
tcp_nodelay 1 N/A True
tcp_sendspace 65536 N/A True
tcp_recvspace 65536 N/A True
tcp_mssdflt N/A True
영어 원문
Interface-specific network options
TCP/IP interfaces must be specially tuned to achieve good, high-speed network performance (100 Mb or more). This effort is complicated by the fact that multiple network interfaces and a combination of traditional and high-speed TCP/IP interfaces can be used on a single system.
In the AIX operating system, Interface Specific Network Options (ISNO) allow system administrators to tune each TCP/IP interface individually for best performance.
There are five ISNO parameters for each supported interface: rfc1323, tcp_nodelay, tcp_sendspace, tcp_recvspace, and tcp_mssdflt. When set, the values for these parameters override the system-wide parameters of the same names that had been set with the no command. When ISNO options are not set for a particular interface, system-wide options are used. When options have been set by an application for a particular socket using the setsockopt subroutine, such options override the ISNOs.
The network option use_isno, set with the no command, must have a value of 1 for the ISNOs to take effect. The default value for use_isno is 1.
Some high-speed adapters have ISNO parameters set by default in the ODM database.
Gigabit Ethernet interfaces, when configured to use an MTU of 9000, use the following ISNO values by default:
| Name | AIX 4.3.3 Value | AIX 4.3.3 (4330-08) Value | AIX 5.1 (and later) Value |
|---|---|---|---|
tcp_sendspace |
131072 | 262144 | 262144 |
tcp_recvspace |
92160 | 131072 | 131072 |
| rfc1323 | 1 | 1 | 1 |
Gigabit Ethernet interfaces, when configured to use an MTU of 1500, use the following ISNO values by default:
| Name | AIX 4.3.3 Value | AIX 4.3.3 (4330-08) Value | AIX 5.1 (and later) Value |
|---|---|---|---|
tcp_sendspace |
65536 | 131072 | 131072 |
tcp_recvspace |
16384 | 65536 | 65536 |
| rfc1323 | 0 | not set | not set |
ATM interfaces, when configured to use an MTU of 1500, use the following ISNO values by default:
| Name | AIX 4.3.3 Value | AIX 4.3.3 (4330-08) Value | AIX 5.1 (and later) Value |
|---|---|---|---|
tcp_sendspace |
16384 | not set | not set |
tcp_recvspace |
16384 | not set | not set |
| rfc1323 | 0 | not set | not set |
tcp_nodelay |
0 | not set | not set |
tcp_mssdflt |
512 | not set | not set |
ATM interfaces, when configured to use an MTU of 65527, use the following ISNO values by default:
| Name | AIX 4.3.3 Value | AIX 4.3.3 (4330-08) Value | AIX 5.1 (and later) Value |
|---|---|---|---|
tcp_sendspace |
655360 | 655360 | 655360 |
tcp_recvspace |
655360 | 655360 | 655360 |
| rfc1323 | 0 | 1 | 1 |
tcp_nodelay |
0 | not set | not set |
tcp_mssdflt |
512 | not set | not set |
ATM interfaces, when configured to use an MTU of 9180, use the following ISNO values by default:
| Name | AIX 4.3.3 Value | AIX 4.3.3 (4330-08) Value | AIX 5.1 (and later) Value |
|---|---|---|---|
tcp_sendspace |
65536 | 65536 | 65536 |
tcp_recvspace |
65536 | 65536 | 65536 |
| rfc1323 | 0 | not set | not set |
tcp_nodelay |
0 | not set | not set |
tcp_mssdflt |
512 | not set | not set |
FDDI interfaces, when configured to use an MTU of 4352, use the following ISNO values by default:
tcp_sendspace— 45046tcp_recvspace— 45046
The ISNO parameters cannot be displayed or changed using SMIT. They can be set using the chdev command or the ifconfig command. The ifconfig command changes the values only until the next reboot. The chdev command changes the values in the ODM database so they are used on subsequent reboots. The lsattr or ifconfig commands can be used to display the current values.
The following examples show commands that can be used first to verify system and interface support and then to set and verify the new values.
- Verify general system and interface support using the no and lsattr commands.
- Ensure the
use_isnooption is enabled using a command similar to the following:
$ no -a | grep isno
use_isno=1
- Ensure the interface supports the five new ISNOs using the lsattr -El command, as shown in the following:
$ lsattr -E -l en0 -H
attribute value description
rfc1323 N/A
tcp_nodelay N/A
tcp_sendspace N/A
tcp_recvspace N/A
tcp_mssdflt N/A
- Set the interface specific values, using either the ifconfig or chdev command. The ifconfig command sets values temporarily, which is recommended for testing. The chdev command alters the ODM, so customized values remain valid after reboot.
- Set the
tcp_recvspaceandtcp_sendspaceto 64K and enabletcp_nodelayby using one of the following:
$ ifconfig en0 tcp_recvspace 65536 tcp_sendspace 65536 tcp_nodelay 1
$ chdev -l en0 -a tcp_recvspace=65536 -a tcp_sendspace=65536 -a tcp_nodelay=1
- Alternatively, assuming the no command reports an
rfc1323=1global value, the root user can turn rfc1323 off for all connections over en0 with the following commands:
$ ifconfig en0 rfc1323 0
$ chdev -l en0 -a rfc1323=0
- Verify the settings using the ifconfig or lsattr command, as shown in the following example:
$ ifconfig en0 <UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT>
en0: flags=e080863
inet 9.19.161.100 netmask 0xffffff00 broadcast 9.19.161.255
tcp_sendspace 65536 tcp_recvspace 65536 tcp_nodelay 1 rfc1323 0
$ lsattr -El en0
rfc1323 0 N/A True
tcp_nodelay 1 N/A True
tcp_sendspace 65536 N/A True
tcp_recvspace 65536 N/A True
tcp_mssdflt N/A True
TCP/IP 주소 지정
TCP/IP에는 사용자와 응용 프로그램이 통신할 특정 네트워크나 호스트를 식별하게 하는 인터넷 주소 체계가 있습니다.
인터넷 주소는 우편 주소처럼 데이터가 고른 목적지로 라우팅되게 합니다. TCP/IP는 네트워크, 서브네트워크, 호스트, 소켓에 주소를 주는 표준과, 브로드캐스트와 로컬 루프백에 특수 주소를 쓰는 표준을 제공합니다.
인터넷 주소는 네트워크 주소와 호스트(로컬) 주소로 이루어집니다. 이렇게 두 부분으로 된 주소 덕분에 보내는 쪽이 네트워크와 그 네트워크의 특정 호스트를 함께 지정할 수 있습니다. 네트워크가 다른 인터넷 네트워크에 연결될 때는 고유한 공식 네트워크 주소를 받습니다. 그러나 로컬 네트워크가 다른 인터넷 네트워크에 연결되지 않으면 로컬에서 쓰기 편한 어떤 네트워크 주소든 줄 수 있습니다.
인터넷 주소 체계는 IP 주소와 IP 주소의 두 특수 경우인 브로드캐스트 주소와 루프백 주소로 이루어집니다.
영어 원문
TCP/IP addressing
TCP/IP includes an Internet addressing scheme that allows users and applications to identify a specific network or host with which to communicate.
An Internet address works like a postal address, allowing data to be routed to the chosen destination. TCP/IP provides standards for assigning addresses to networks, subnetworks, hosts, and sockets, and for using special addresses for broadcasts and local loopback.
Internet addresses are made up of a network address and a host (or local) address. This two-part address allows a sender to specify the network as well as a specific host on the network. A unique, official network address is assigned to each network when it connects to other Internet networks. However, if a local network is not going to connect to other Internet networks, it can be assigned any network address that is convenient for local use.
The Internet addressing scheme consists of Internet Protocol (IP) addresses and two special cases of IP addresses: broadcast addresses and loopback addresses.
인터넷 주소
IP(Internet Protocol)는 두 부분으로 된 32비트 주소 필드를 씁니다.
32비트는 다음처럼 네 옥텟으로 나뉩니다.
01111101 00001101 01001001 00001111
이 이진수는 다음과 같습니다.
125 13 73 15
인터넷 주소의 두 부분은 네트워크 주소 부분과 호스트 주소 부분입니다. 덕분에 원격 호스트가 정보를 보낼 때 원격 네트워크와 그 네트워크의 호스트를 함께 지정할 수 있습니다. 관례상 호스트 번호 0은 네트워크 자체를 가리킵니다.
TCP/IP는 클래스 A, 클래스 B, 클래스 C 세 클래스의 인터넷 주소를 지원합니다. 클래스는 주소의 32비트를 어떻게 나누느냐로 정해집니다. 네트워크가 받는 주소 클래스는 네트워크의 크기에 따라 다릅니다.
클래스 A 0nnnnnnn | hhhhhhhh hhhhhhhh hhhhhhhh 네트워크 8비트 | 로컬 호스트 24비트
클래스 B 10nnnnnn nnnnnnnn | hhhhhhhh hhhhhhhh 네트워크 16비트 | 로컬 호스트 16비트
클래스 C 110nnnnn nnnnnnnn nnnnnnnn | hhhhhhhh 네트워크 24비트 | 로컬 호스트 8비트
그림 17~19. 클래스 A·B·C 주소(원문 그림을 글자로 다시 그림)
클래스 A 주소
클래스 A 주소는 8비트 네트워크 주소와 24비트 로컬(호스트) 주소로 이루어집니다.
네트워크 주소의 첫 비트는 네트워크 클래스를 나타내는 데 쓰이므로 실제 네트워크 주소는 7비트입니다. 7비트로 나타낼 수 있는 가장 큰 수가 128이므로(원문 표현) 가능한 클래스 A 네트워크 주소는 128개입니다. 그 가운데 둘은 특수 용도로 예약되어 있습니다. 네트워크 주소 127은 로컬 루프백 주소용이고, 모두 1인 네트워크 주소는 브로드캐스트 주소를 나타냅니다.
가능한 클래스 A 네트워크 주소는 126개이고, 가능한 로컬 호스트 주소는 16,777,216개입니다. 클래스 A 주소에서 가장 높은 비트는 0입니다.
클래스 A 주소의 첫 옥텟은 1~126 범위입니다.
클래스 B 주소
클래스 B 주소는 16비트 네트워크 주소와 16비트 로컬(호스트) 주소로 이루어집니다.
네트워크 주소의 처음 두 비트는 네트워크 클래스를 나타내는 데 쓰이므로 실제 네트워크 주소는 14비트입니다. 가능한 네트워크 주소는 16,384개이고 로컬 호스트 주소는 65,536개입니다. 클래스 B 주소에서 가장 높은 두 비트는 1과 0입니다.
클래스 B 주소의 첫 옥텟은 128~191 범위입니다.
클래스 C 주소
클래스 C 주소는 24비트 네트워크 주소와 8비트 로컬 호스트 주소로 이루어집니다.
네트워크 주소의 처음 세 비트가 네트워크 클래스를 나타내므로 실제 네트워크 주소는 21비트입니다. 따라서 가능한 네트워크 주소는 2,097,152개이고 로컬 호스트 주소는 256개입니다. 클래스 C 주소에서 가장 높은 비트들은 1-1-0입니다.
곧 클래스 C 주소의 첫 옥텟은 192~223 범위입니다.
어떤 네트워크 주소 클래스를 쓸지 정할 때는 네트워크에 로컬 호스트가 몇 대 있을지, 조직에 서브네트워크가 몇 개 있을지 생각해야 합니다. 조직이 작고 네트워크의 호스트가 256대보다 적으면 클래스 C 주소로 충분할 것입니다. 조직이 크면 클래스 B나 클래스 A 주소가 더 알맞을 수 있습니다.
참고: 클래스 D(가장 높은 비트가 1-1-1-0) 주소는 멀티캐스트 주소이며, 이 운영 체제의 UDP/IP가 지원합니다.
기계는 주소를 이진 코드로 읽습니다. 인터넷 호스트 주소의 관례적 표기는 32비트 주소를 8비트 필드 넷으로 나눈 점 10진수(dotted decimal)입니다. 다음 이진 값은
0001010 00000010 00000000 00110100
다음처럼 나타낼 수 있습니다.
010.002.000.052 또는 10.2.0.52
각 필드의 값은 10진수이고 필드는 마침표로 구분합니다.
참고: hostent 명령은 .08, .008, .09, .009 주소를 인식합니다. 앞에 0이 붙은 주소는 8진수로 해석되며, 8진수에는 8이나 9가 들어갈 수 없습니다.
TCP/IP는 네트워크의 네트워크 인터페이스(어댑터)마다 고유한 인터넷 주소가 있어야 합니다. 이 주소는 구성 데이터베이스의 항목으로 정해지며, /etc/hosts 파일의 항목이나 네트워크가 이름 서버를 쓰면 named 데이터베이스의 항목과 맞아야 합니다.
0을 쓰는 인터넷 주소
클래스 C 인터넷 주소의 호스트 주소 부분이 0이면(예: 192.9.200.0) TCP/IP는 네트워크에 와일드카드 주소를 보냅니다.
그러면 클래스 C 주소가 192.9.200.X(X는 0~254)인 모든 기계가 그 요청에 응답해야 합니다. 결국 네트워크가 존재하지 않는 기계에 대한 요청으로 넘쳐 납니다.
129.5.0.0 같은 클래스 B 주소에서도 마찬가지 문제가 생깁니다. 클래스 B 주소가 129.5.X.X(X는 0~254)인 모든 기계가 요청에 응답해야 합니다. 이때 클래스 B 주소는 클래스 C 주소보다 큰 네트워크를 다루므로, 클래스 C 네트워크보다 훨씬 많은 존재하지 않는 기계에 대한 요청으로 네트워크가 넘칩니다.
영어 원문
Internet addresses
The Internet Protocol (IP) uses a 32-bit, two-part address field.
The 32 bits are divided into four octets as in the following:
01111101 00001101 01001001 00001111
These binary numbers translate into:
125 13 73 15
The two parts of an Internet address are the network address portion and the host address portion. This allows a remote host to specify both the remote network and the host on the remote network when sending information. By convention, a host number of 0 is used to refer to the network itself.
TCP/IP supports three classes of Internet addresses: Class A, Class B, and Class C. The different classes of Internet addresses are designated by how the 32 bits of the address are allocated. The particular address class a network is assigned depends on the size of the network.
Class A addresses
A Class A address consists of an 8-bit network address and a 24-bit local or host address.
The first bit in the network address is dedicated to indicating the network class, leaving 7 bits for the actual network address. Because the highest number that 7 bits can represent in binary is 128, there are 128 possible Class A network addresses. Of the 128 possible network addresses, two are reserved for special cases: the network address 127 is reserved for local loopback addresses, and a network address of all ones indicates a broadcast address.
There are 126 possible Class A network addresses and 16,777,216 possible local host addresses. In a Class A address, the highest order bit is set to 0.
This illustration shows a typical class A address structure. The first 8 bits contain the network address (always beginning with a zero). The remaining 24 bits contain the local host address.
The first octet of a Class A address is in the range 1 to 126. 01111101 00001101 01001001 00001111 (8 bits) (24 bits)
Note: The high-order bit (or first bit) will always be 0 in a Class A address. Network Address Local Host Address
Figure 17. Class A address
Class B addresses
A Class B address consists of a 16-bit network address and a 16-bit local or host address.
The first two bits in the network address are dedicated to indicating the network class, leaving 14 bits for the actual network address. There are 16,384 possible network addresses and 65,536 local host addresses. In a Class B address, the highest order bits are set to 1 and 0.
This illustration shows a typical class B address structure. The first 16 bits contain the network address. The two highest order bits will always be a one and a zero. The remaining 16 bits contain the local host address.
The first octet of a Class B address is in the range 128 to 191.
Class C addresses
A Class C address consists of a 24-bit network address and an 8-bit local host address.
The first three bits in the network address indicate the network class, leaving 21 bits for the actual network address. Therefore, there are 2,097,152 possible network addresses and 256 possible local host addresses. In a Class C address, the highest order bits are set to 1-1-0.
This figure shows a typical class C address structure. The first 24 bits contain the network address (the three highest order bits will always be 1-1-0). The remaining 8 bits contain the local host address.
In other words, the first octet of a Class C address is in the range 192 to 223.
When deciding which network address class to use, you must consider how many local hosts there will be on the network and how many subnetworks will be in the organization. If the organization is small and the network will have fewer than 256 hosts, a Class C address is probably sufficient. If the organization is large, then a Class B or Class A address might be more appropriate. 10011101 00001101 01001001 00001111 (16 bits) (16 bits)
Note: The two highest order bits (or first two bits) will always be 1 and 0 in a Class B address. Network Address Local Host Address
Figure 18. Class B address
Figure 19. Class C address
Note: Class D (1-1-1-0 in the highest order bits) addresses provide for multicast addresses and are supported by UDP/IP under this operating system.
Machines read addresses in binary code. The conventional notation for Internet host addresses is the dotted decimal, which divides the 32-bit address into four 8-bit fields. The following binary value:
0001010 00000010 00000000 00110100
can be expressed as:
010.002.000.052 or 10.2.0.52
where the value of each field is specified as a decimal number and the fields are separated by periods.
Note: The hostent command does recognize the following addresses: .08, .008, .09, and .009. Addresses with leading zeros are interpreted as octal, and numerals in octal cannot contain 8s or 9s.
TCP/IP requires a unique Internet address for each network interface (adapter) on a network. These addresses are determined by entries in the configuration database, which must agree with entries in the /etc/hosts file or the named database if the network is using a name server.
Internet addresses using zeros
When a C class Internet address contains a 0 as the host address portion, (for example, 192.9.200.0), TCP/IP sends a wildcard address on the network.
All machines with a Class C address of 192.9.200.X (where X represents a value between 0 and 254) should respond to the request. This results in a network flooded with requests to nonexistent machines.
Similarly, problems occur for Class B addresses such as 129.5.0.0. All machines with a Class B address of 129.5.X.X. (where X represents a value between 0 and 254) are obliged to respond to the request. In this case, because Class B addresses account for bigger networks than Class C addresses, the network is flooded with significantly more requests to nonexistent machines than for a Class C network.
서브넷 주소
서브넷 주소 지정은 여러 네트워크로 이루어진 자율 시스템이 같은 인터넷 주소를 나눠 쓰게 합니다.
TCP/IP의 서브네트워크 기능으로 네트워크 하나를 여러 논리 네트워크(서브넷)로 나눌 수도 있습니다. 예를 들어 조직은 바깥 사용자에게 알려진 인터넷 네트워크 주소 하나를 가지면서 안에서는 부서별 서브넷으로 네트워크를 구성할 수 있습니다. 어느 경우든 필요한 인터넷 네트워크 주소가 줄고 로컬 라우팅 능력은 좋아집니다.
표준 IP 주소 필드는 네트워크 주소와 로컬 주소 두 부분입니다. 서브넷을 쓰려면 인터넷 주소의 로컬 주소 부분을 서브넷 번호와 호스트 번호로 나눕니다. 서브넷을 식별해 두면 로컬 자율 시스템이 메시지를 믿을 만하게 라우팅할 수 있습니다.
8비트 네트워크 주소와 24비트 로컬 주소로 이루어진 기본 클래스 A 인터넷 주소에서 로컬 주소는 네트워크의 특정 호스트 기계를 나타냅니다.
이 클래스 A 인터넷 주소의 서브넷 주소를 만들려면, 로컬 주소를 물리 네트워크(서브넷)를 나타내는 번호와 그 서브넷의 호스트를 나타내는 번호로 나눌 수 있습니다. 보내는 쪽은 알려진 네트워크 주소로 메시지를 보내고, 로컬 시스템이 자기 서브넷과 그 호스트로 메시지를 라우팅하는 책임을 집니다. 로컬 주소를 서브넷 주소와 호스트 주소로 어떻게 나눌지 정할 때는 서브넷 수와 서브넷마다의 호스트 수를 생각해야 합니다.
다음 그림에서는 로컬 주소를 12비트 서브넷 주소와 12비트 호스트 주소로 나눕니다.
그림 20. 클래스 A 주소
01111101 | 00001101 01001001 00001111
네트워크(8) | 로컬 호스트(24)
그림 21. 서브넷 주소를 나눈 클래스 A 주소
01111101 | 00001101 0100 | 1001 00001111
네트워크(8) | 서브넷(12) | 호스트(12)
서브넷 주소와 호스트 주소는 유연하게 줄 수 있습니다. 로컬 주소의 비트는 조직과 네트워크 구조의 필요와 성장 가능성에 따라 나눌 수 있습니다. 제한은 다음뿐입니다.
network_address는 네트워크의 인터넷 주소입니다.subnet_address는 그 네트워크에서 너비가 일정한 필드입니다.host_address는 너비가 적어도 1비트인 필드입니다.
subnet_address 필드의 너비가 0이면 네트워크는 서브넷으로 나뉘지 않으며, 네트워크에 대한 주소 지정은 인터넷 네트워크 주소로 합니다.
서브넷을 나타내는 비트는 비트 마스크로 지정하므로 주소에서 서로 붙어 있지 않아도 됩니다. 그러나 대개 서브넷 비트가 붙어 있고 로컬 주소의 가장 높은 쪽 비트에 있는 것이 바람직합니다.
서브넷 마스크
호스트가 목적지로 메시지를 보낼 때 시스템은 목적지가 출발지와 같은 네트워크에 있는지, 로컬 인터페이스 가운데 하나로 바로 닿을 수 있는지 판단해야 합니다. 시스템은 서브넷 마스크로 목적지 주소와 호스트 주소를 비교합니다.
목적지가 로컬이 아니면 시스템은 메시지를 게이트웨이로 보냅니다. 게이트웨이도 같은 비교를 해서 목적지 주소가 자기가 로컬로 닿을 수 있는 네트워크에 있는지 봅니다.
서브넷 마스크는 서브넷 나누기 방식을 시스템에 알려 줍니다. 이 비트 마스크는 인터넷 주소의 네트워크 주소 부분과 서브넷 주소 부분으로 이루어집니다.
예를 들어 위에서 정한 나누기 방식을 쓰는 클래스 A 주소의 서브넷 마스크는 다음과 같습니다.
서브넷 마스크는 인터넷 주소처럼 4바이트입니다. 네트워크와 서브네트워크 주소의 비트 위치에 해당하는 높은 비트(1)와, 호스트 주소의 비트 위치에 해당하는 낮은 비트(0)로 이루어집니다. 앞 주소의 서브넷 마스크는 다음 그림과 같습니다.
그림 22. 서브넷 주소를 나눈 클래스 A 주소
01111101 | 00001101 0100 | 1001 00001111
네트워크 | 서브넷 | 호스트
그림 23. 서브넷 마스크 예
11111111 | 11111111 1111 | 0000 00000000
주소 비교
목적지 주소와 로컬 네트워크 주소는 출발지 호스트의 서브넷 마스크로 논리 AND와 배타적 OR(XOR)를 해서 비교합니다.
비교 과정은 다음과 같습니다.
- 목적지 주소와 로컬 서브넷 주소의 마스크를 논리 AND합니다.
- 앞 연산의 결과와 로컬 인터페이스의 로컬 네트워크 주소를 XOR합니다. 결과가 모두 0이면 목적지는 로컬 인터페이스 가운데 하나로 바로 닿을 수 있다고 봅니다.
- 자율 시스템에 인터페이스가 둘 이상(따라서 인터넷 주소가 둘 이상) 있으면 로컬 인터페이스마다 비교를 되풀이합니다.
예를 들어 호스트 네트워크 T125에 로컬 인터페이스가 둘 정의되어 있다고 합니다. 그 인터넷 주소와 이진 표현은 다음과 같습니다.
CLASS A 73.1.5.2 = 01001001 00000001 00000101 00000010
CLASS B 145.21.6.3 = 10010001 00010101 00000110 00000011
로컬 네트워크 인터페이스의 서브넷 마스크는 다음과 같습니다.
CLASS A 73.1.5.2 = 11111111 11111111 11100000 00000000
CLASS B 145.21.6.3 = 11111111 11111111 11111111 11000000
출발지 네트워크 T125가 호스트 주소 114.16.23.8(이진: 01110010 00010000 00010111 00001000)인 목적지 네트워크로 메시지를 보내라는 요청을 받으면, 시스템은 목적지에 로컬 인터페이스로 닿을 수 있는지 확인합니다.
참고: 서브넷을 지원할 모든 호스트의 구성 데이터베이스에 subnetmask 키워드를 설정해야 합니다. 서브네트워크 기능을 쓰기 전에 네트워크의 모든 호스트가 이를 지원해야 합니다. Web-based System Manager 네트워크 응용 프로그램이나 SMIT의 Network Interface Selection 메뉴로 구성 데이터베이스에 서브넷 마스크를 영구히 설정합니다. 실행 중인 시스템에서는 ifconfig 명령으로도 서브넷 마스크를 설정할 수 있지만, 영구적인 변경은 아닙니다.
영어 원문
Subnet addresses
Subnet addressing allows an autonomous system made up of multiple networks to share the same Internet address.
The subnetwork capability of TCP/IP also makes it possible to divide a single network into multiple logical networks (subnets). For example, an organization can have a single Internet network address that is known to users outside the organization, yet it can configure its network internally into departmental subnets. In either case, fewer Internet network addresses are required while local routing capabilities are enhanced.
A standard Internet Protocol address field has two parts: a network address and a local address. To make subnets possible, the local address part of an Internet address is divided into a subnet number and a host number. The subnet is identified so that the local autonomous system can route messages reliably.
In the basic Class A Internet address, which consists of an 8-bit network address and 24-bit local address, the local address identifies the specific host machine on the network.
This illustration shows a typical class A address structure. The first 8 bits contain the network address (always beginning with a zero). The remaining 24 bits contain the local host address.
To create a subnet address for this Class A Internet address, the local address can be divided into a number identifying the physical network (or subnet) and a number identifying the host on the subnet. Senders route messages to the advertised network address, and the local system takes responsibility for routing messages to its subnets and their hosts. When deciding how to partition the local address into subnet address and host address, you should consider the number of subnets and the number of hosts on those subnets.
In the following figure, the local address is partitioned into a 12-bit subnet address and a 12-bit host address.
This illustration shows a typical class A address structure. The first 8 bits contain the network address (always beginning with a zero). The remaining 24 bits contain the local host address with the subnet address occupying the first 8 bits and the host address occupying the last 8 bits.
You have flexibility when assigning subnet addresses and host addresses. The bits of the local address can be divided according to the needs and potential growth of the organization and its network structure. The only restrictions are:
network_addressis the Internet address for the network.subnet_addressis a field of a constant width for a given network.host_addressis a field that is at least 1-bit wide.
If the width of the subnet_address field is 0, the network is not organized into subnets, and addressing to the network is performed using the Internet network address.
The bits that identify the subnet are specified by a bit mask and, therefore, are not required to be adjacent in the address. However, it is generally desirable for the subnet bits to be contiguous and located as the most significant bits of the local address. 01111101 00001101 01001001 00001111 (8 bits) (24 bits) Network Address Local Host Address
Figure 20. Class A address
01111101 00001101 0100 1001 00001111 (8 bits) (24 bits)
Note: The high-order bit (or first bit) will always be 0 in a Class A address. Network Address Local Host Address
Figure 21. Class A address with corresponding subnet address
Subnet masks
When a host sends a message to a destination, the system must determine whether the destination is on the same network as the source or if the destination can be reached directly through one of the local interfaces. The system compares the destination address to the host address using the subnet mask.
If the destination is not local, the system sends the message on to a gateway. The gateway performs the same comparison to see if the destination address is on a network it can reach locally.
The subnet mask tells the system what the subnet partitioning scheme is. This bit mask consists of the network address portion and subnet address portion of the Internet address.
This illustration shows a typical class A address structure. The first 8 bits contain the network address (always beginning with a zero). The remaining 24 bits contain the local host address with the subnet address occupying the first 8 bits and the host address occupying the last 8 bits.
For example, the subnet mask of the Class A address with the partitioning scheme defined above is shown in this figure.
The subnet mask is a set of 4 bytes, just like the Internet address. The subnet mask consists of high bits (1's) corresponding to the bit positions of the network and subnetwork address, and low bits (0's) corresponding to the bit positions of the host address. A subnet mask for the previous address looks like the following figure. 01111101 00001101 0100 1001 00001111 (8 bits) (24 bits) Network Address Local Host Address
Class A Address with Corresponding Subnet Mask Network Address Subnet Address Host Address
Subnet Mask Host Address 01111101 00001101 0100 1001 00001111 (8 bits) (24 bits) Network Address Local Host Address
Figure 22. Class A address with corresponding subnet address
This illustration shows a an example of a subnet mask structure. The first 8 bits contain the network address. The remaining 24 bits contain the local host address with the subnet address occupying the first 8 bits and the host address occupying the last 8 bits.
Address comparison
The destination address and the local network address are compared by performing the logical AND and exclusive OR on the subnet mask of the source host.
The comparison process is outlined below:
Perform a logical AND of the destination address and the mask of the local subnet address.
Perform an exclusive OR on the result of the previous operation and the local net address of the local interface. If the result is all 0's, the destination is assumed to be reachable directly through one of the local interfaces.
If an autonomous system has more than one interface (therefore more than one Internet address), the comparison process is repeated for each local interface.
For example, assume that there are two local interfaces defined for a host network, T125. Their Internet addresses and the binary representations of those addresses are shown in the following example:
CLASS A 73.1.5.2 = 01001001 00000001 00000101 00000010
CLASS B 145.21.6.3 = 10010001 00010101 00000110 00000011
The corresponding subnet masks for the local network interfaces are shown in the following example:
CLASS A 73.1.5.2 = 11111111 11111111 11100000 00000000
CLASS B 145.21.6.3 = 11111111 11111111 11111111 11000000
If the source network, T125, is requested to send a message to a destination network with the host address 114.16.23.8 (represented in binary as: 01110010 00010000 00010111 00001000), the system checks whether the destination can be reached through a local interface.
Note: The subnetmask keyword must be set in the configuration database of each host that is to support subnets. Before the subnetwork capability can be used, all hosts on the network must support it. Set the subnet mask permanently in the configuration database using the Web-based System Manager Network application or the Network Interface Selection menu in SMIT. The subnet mask can also be set in the running system using the ifconfig command. Using the ifconfig command to set the subnet mask is not a permanent change.
브로드캐스트 주소
TCP/IP는 로컬 네트워크의 모든 호스트나, 직접 연결된 모든 네트워크의 모든 호스트에 데이터를 보낼 수 있습니다. 이런 전송을 브로드캐스트 메시지라고 합니다.
예를 들어 routed 라우팅 데몬은 라우팅 조회를 묻고 답하는 데 브로드캐스트 메시지를 씁니다.
직접 연결된 모든 네트워크의 모든 호스트에 데이터를 브로드캐스트하려면 UDP와 IP로 데이터를 보내며, IP 머리글의 호스트 목적지 주소는 모든 비트가 1입니다. 특정 네트워크의 모든 호스트에 데이터를 브로드캐스트하려면 IP 주소의 로컬 주소 부분의 모든 비트를 0으로 합니다. 브로드캐스트 기능을 쓰는 사용자 명령은 없지만 그런 명령이나 프로그램을 만들 수는 있습니다.
브로드캐스트 주소는 ifconfig 명령의 broadcast 매개변수로 임시로 바꿀 수 있습니다. 영구히 바꾸려면 Web-based System Manager(wsm)나 SMIT 빠른 경로 smit chinet을 씁니다. 다른 브로드캐스트 주소를 쓰는 이전 버전 소프트웨어(예: 호스트 ID가 모두 0)와 호환해야 할 때 브로드캐스트 주소를 바꾸면 유용할 수 있습니다.
영어 원문
Broadcast addresses
The TCP/IP can send data to all hosts on a local network or to all hosts on all directly connected networks. Such transmissions are called broadcast messages. 11111111 1111 0000 00000000 (8 bits) (24 bits) Network Address Local Host Address
11111111
Figure 23. Example subnet mask
For example, the routed routing daemon uses broadcast messages to query and respond to routing queries.
For data to be broadcast to all hosts on all directly connected networks, User Datagram Protocol (UDP) and Internet Protocol (IP) are used to send the data, and the host destination address in the IP header has all bits set to 1. For data to be broadcast to all hosts on a specific network, all the bits in the local address part of the IP address are set to 0. There are no user commands that use the broadcast capability, although such commands, or programs, can be developed.
The broadcast address can be changed temporarily by changing the broadcast parameter in the ifconfig command. Change the broadcast address permanently by using the Web-based System Manager, wsm, or the SMIT fast path smit chinet. Changing the broadcast address may be useful if you need to be compatible with older versions of software that use a different broadcast address; for example, the host IDs are all set to 0.
로컬 루프백 주소
IP는 특수 네트워크 주소 127.0.0.1을 로컬 루프백 주소로 정합니다.
호스트는 자기 자신에게 메시지를 보낼 때 로컬 루프백 주소를 씁니다. 로컬 루프백 주소는 시스템 시작 과정에서 구성 관리자가 설정합니다. 로컬 루프백은 커널에 구현되어 있으며 ifconfig 명령으로도 설정할 수 있습니다. 루프백은 시스템이 시작될 때 불립니다.
영어 원문
Local loopback addresses
The Internet Protocol defines the special network address, 127.0.0.1, as a local loopback address.
Hosts use local loopback addresses to send messages to themselves. The local loopback address is set by the configuration manager during the system startup process. Local loopback is implemented in the kernel and can also be set with the ifconfig command. Loopback is invoked when the system is started.