본문 바로가기

IBM/AIX

etherchannel

개요
Etherchannel은 원래 Cisco사의 trademark로서, 일반적으로는 network interface aggregation 또는 trunking이라고도 합니다. 즉, etherchannel은 특정 hardware나 software 제품을 지칭하는 것은 아니고, Cisco에서 만든 일종의 기술 표준입니다.

이 기술을 이용하면, 2개 또는 4개의 ethernet interface를 모아서, 하나의 새로운 virtual ethernet interface를 만들어낼 수 있습니다. 이렇게 하여, 4개의 Ethernet interface에 하나의 공통 IP address를 줄 수 있으므로, bandwidth를 크게 늘릴 수 있고, network load balancing 및 high availability도 구현할 수도 있습니다. 이 기술을 사용하기 위해서는 먼저 network switch가 Etherchannel 표준을 지원하는 것이어야 하고, 또 OS에서도 Etherchannel을 지원해야 합니다. AIX 433에서는 이를 기본으로 지원합니다.

Etherchannel 방식의 종류


Etherchannel에는 다음과 같은 3가지 구성 방식이 있습니다.

Standard mode

외부로 나가는 traffic이 어느 interface를 이용하는지를, 목적지의 IP address를 hashing하여 그 마지막 bit에 따라 결정합니다. 가령, 마지막 bit가 0이면 첫번째 interface를 사용하고, 1이면 두번째 interface를 사용하는 식입니다. 이 방식에 따르면 외부로 나가는 packet이 어떤 순서로 어떤 interface를 이용할지 보장이 되지만, 전체적인 bandwidth에 대해 load balancing이 된다고는 보장할 수 없습니다.

Round-robin mode

글자 그대로, 각 interface마다 한 개씩의 packet을 분배해서 던져주는 방식입니다. 이 방식으로는 전체 bandwidth의 load balancing이 비교적 잘 되지만, packet이 밖으로 보내지는 순서는, 전체 channel에 대해 원래 보낸 순서와는 다소 다를 수도 있습니다. (그렇다고 뭐 문제가 꼭 있는 것은 물론 아닙니다.)

Network IP backup mode (netif_backup)

이 방식은 비교적 새로 추가된 방식입니다. AIX 433 maintenance level 8을 적용하면 이 mode가 사용가능해집니다.

이 mode에서는 한번에 하나의 adapter 만을 active하게 사용합니다. 만약 이 연결에 문제가 발생하면, channel은 자동적으로 현재 active한 ethernet과 backup 상태였던 ethernet을 swapping합니다. 즉, 이 mode에서는 load balancing 효과는 없고, availability만을 보장하게 됩니다.

그렇다면 다른 방식에 비해서 기능이 떨어지는 편인데 왜 굳이 이 mode가 사용될까요 ?
이 mode는 switch 장비가 etherchannel을 지원하지 않아도 사용이 가능하기 때문입니다. 일반 dummy hub에서 사용할 때도 구성이 가능합니다.

Etherchannel 구현 방법


Etherchannel의 구성은 smit menu를 이용하면 편합니다. Fast path로 "smit etherchannel" 로 직접 들어가면 다음 화면을 보실 수 있습니다.

Etherchannel

Move cursor to desired item and press Enter.

List All Etherchannels
Add An Etherchannel
Change / Show Characteristics of an Etherchannel
Remove An Etherchannel



여기서 "Add An Etherchannel" 을 선택하면 다음의 menu를 볼 수 있습니다.

Available Network Adapters

| Move cursor to desired item and press F7.
|
| ONE OR MORE items can be selected.
|
| Press Enter AFTER making all selections.
|
|
| ent0
| ent1
| ent2
| ent3
| ent4



이중 2개, 또는 4개를 선택하면 다음 화면을 볼 수 있습니다.

Add an Etherchannel
Press Enter AFTER making all desired changes. [Entry Fields]
Etherchannel Adapters ent0 ent1
Enable ALTERNATE ETHERCHANNEL address no
ALTERNATE ETHERCHANNEL address []
Mode standard
Enable GIGABIT ETHERNET JUMBO frames no
Internet Address to Ping []
Number of Retries []
Retry Timeout (sec) []



만약, 여기서 선택한 Ethernet interface가 이미 사용 중인, 즉, IP가 부여되어 있는 상태라면, 다음과 같은 error가 납니다. Interface를 Defined 상태로 만들어 두고 다시 하시기 바랍니다.


Method error (/usr/lib/methods/cfgech):
0514-001 System error:
Method error (/usr/lib/methods/chgent):
0514-062 Cannot perform the requested function because the specified device is busy.



위의 menu에서, Alternate Etherchannel address를 지정하지 않으면, 첫번째 interfce (여기서는 ent0)의 MAC address가 전체 etherchannel의 MAC address가 됩니다.
또, 마지막 세개의 항목은 mode를 netif_backup mode로 했을 때에만 사용하는 것으로, Etherchannel을 준수하지 않는 network 장비에서도 Ethernet interface에 문제가 발생했을 경우를 탐지하기 위해 기입하는 field입니다.

Internet Address to Ping : 여기에 기입된 IP 주소로 주기적으로 ping을 던지면서 자기 interface의 이상 여부를 점검합니다.
Number of Retries : ping이 성공적이지 않을 경우, 일시적인 것인지 확인하기 위해 retry하는 횟수를 정하는 곳입니다.

Retry Timeout (sec) : 각각의 retry마다 몇 초씩 timeout을 줄 지 정하는 곳입니다.

 

etherchannel 구성 확인 하기

 

etherchannel이 어떤 adapter로 구성되어 있고, 어떤 adapter로 통신하고 있는지 알아 봅시다. ^^

우선 etherchannel로인해 생겨난 adapter를 찾아봅시다.

#>lsdev -Cc adapter
ent0      Available 0A-08 2-Port 10/100/1000 Base-TX PCI-X Adapter (14108902)
ent1      Available 0A-09 2-Port 10/100/1000 Base-TX PCI-X Adapter (14108902)
ent2      Available 0C-08 Gigabit Ethernet-SX PCI-X Adapter (14106802)
                                             <<<<중략>>>>
ent9      Available 0a-08 Gigabit Ethernet-SX PCI-X Adapter (14106802)
ent10     Available       EtherChannel / IEEE 802.3ad Link Aggregation
위 command를 실행하면 정의된 adapter들이 display됩니다. 그중에 Etherchannel로 구성된

adapter를 볼 수 있는데요,,,,위그림에선 ent10 입니다.

다음은 ent10이 어떤 adapter들로 구성되어 있는지 살펴 보겠습니다.

#>entstat -d ent10   (결과가 너무길어 중간중간 잘랐습니다. ^^;)

굵은 부분만 확인하겠습니다.

-------------------------------------------------------------
ETHERNET STATISTICS (ent10) :
Device Type: EtherChannel  (etherchannel 임을 알 수 있죠^^)
Hardware Address: 00:11:25:bd:4f:c2
Elapsed Time: 15 days 0 hours 10 minutes 40 seconds

Transmit Statistics:                          Receive Statistics:
--------------------                          -------------------
Packets: 336134852                            Packets: 905805337
Bytes: 82399749818                            Bytes: 280038409197
Interrupts: 0                                 Interrupts: 836373299
Transmit Errors: 0                            Receive Errors: 0
Packets Dropped: 0                            Packets Dropped: 0
Current HW Transmit Queue Length: 2

General Statistics:
-------------------
No mbuf Errors: 0
Adapter Reset Count: 0
Adapter Data Rate: 2000
Driver Flags: Up Broadcast Running
        Simplex 64BitSupport ChecksumOffload
        PrivateSegment LargeSend DataRateSet

=============================================================
=============================================================

Statistics for every adapter in the EtherChannel:
-------------------------------------------------

Number of adapters: 2  (2개의 adapter로 구성되어 있음을 알 수 있습니다.)
Active channel: primary channel  (현재 primary channel로 통신을 하고 있습니다.)
Operating mode: Network interface backup mode (현재 backup 구성이 되어있다는 mode상태지요.)

-------------------------------------------------------------

ETHERNET STATISTICS (ent3) :  (primary adapter입니다.)
Device Type: Gigabit Ethernet-SX PCI-X Adapter (14106802)
Hardware Address: 00:11:25:bd:4f:c2

Transmit Statistics:                          Receive Statistics:
--------------------                          -------------------
Packets: 336134854                            Packets: 606870342
Bytes: 82399751398                            Bytes: 170701901699
Interrupts: 0                                 Interrupts: 558218583
Transmit Errors: 0                            Receive Errors: 0
Packets Dropped: 0                            Packets Dropped: 0

Gigabit Ethernet-SX PCI-X Adapter (14106802) Specific Statistics:
-----------------------------------------------------------------
Link Status : Up (primary adapter의 연결 상태입니다. Up이군요~~ ^^)
Media Speed Selected: Auto negotiation
Media Speed Running: 1000 Mbps Full Duplex
PCI Mode: PCI-X (100-133)
PCI Bus Width: 64-bit
Latency Timer: 144
-------------------------------------------------------------
Backup adapter - ent9: (backup adapter로 ent9가 설정되어 있습니다.)
======================

ETHERNET STATISTICS (ent9) :
Device Type: Gigabit Ethernet-SX PCI-X Adapter (14106802)

Hardware Address: 00:11:25:bd:4f:c2

Transmit Statistics:                          Receive Statistics:
--------------------                          -------------------
Packets: 0                                    Packets: 298935004
Bytes: 0                                      Bytes: 113631477854
Interrupts: 0                                 Interrupts: 278154725
Transmit Errors: 0                            Receive Errors: 0
Packets Dropped: 0                            Packets Dropped: 0
                                              Bad Packets: 0
General Statistics:
-------------------
No mbuf Errors: 0
Adapter Reset Count: 0
Adapter Data Rate: 2000
Driver Flags: Up Broadcast Running
        Simplex 64BitSupport ChecksumOffload
        PrivateSegment LargeSend DataRateSet

Gigabit Ethernet-SX PCI-X Adapter (14106802) Specific Statistics:
-----------------------------------------------------------------
Link Status : Up (역시 연결상태는 Up입니다. ^^)
Media Speed Selected: Auto negotiation
Media Speed Running: 1000 Mbps Full Duplex
PCI Mode: PCI-X (100-133)
PCI Bus Width: 64-bit
Latency Timer: 144
Cache Line Size: 128

이상 etherchannel의 구성을 살펴볼 수 있는 명령어를 살펴 보았습니다. ^^

간단히 어떤 adapter들로 구성되었는지 보고 싶다면

#>smitty etherchannel 명령으로 좀 더 간단히 볼 수 있습니다..

이 글은 스프링노트에서 작성되었습니다.

'IBM > AIX' 카테고리의 다른 글

Programming Language Products for AIX: C and C++ Compilers  (0) 2011.03.28
NFS DIO and CIO support  (0) 2010.12.29
I/O completion ports error when attempting to set up Domino 6.x on AIX  (0) 2010.12.29
Upgrade to IPv6 with IPv4 configured  (0) 2010.11.03
AIX 6.1 최적화와 성능 튜닝 (한글)  (0) 2010.10.25
GPFS  (0) 2010.10.14
FTP  (0) 2010.08.22
chmod  (0) 2010.08.21
Storage Management in AIX 5L Version 5.3  (0) 2010.08.10
LVM  (0) 2010.08.10