개요
Juniper OS는 LACP(Port Channel 혹은 Ether Channel 등)을 구성하려면 반드시 드라이버를 활성화 시켜야 합니다
위 사전 지식이 없다면 꽤 오랜 시간을 투자해야 합니다(제가 그랬어요...)
그래서 오늘은 Juniper OS에서 LACP를 구성하는 방법에 대해 기술합니다
LACP Driver 활성화
configure 모드 접속 가능한 계정 로그인 후 아래 명령어 입력해주면 됩니다
{master:0}[edit]
root# set chassis aggregated-devices ethernet device-count 5
{master:0}[edit]
root# commit
configuration check succeeds
commit complete
{master:0}[edit]
root# exit
Exiting configuration mode
{master:0}
root> show lacp interfaces ae?
Possible completions:
<interface-name> Name of interface
ae0
ae1
ae2
ae3
ae4
{master:0}
root> show lacp interfaces ae
해당 명령어는 Port Channel을 사용할 수 있는 개수를 설정하는 명령어로 최소 1개부터 최대 32개까지 활성화 가능합니다
위 명령어를 입력하지 않으면 절대 활성화가 되지 않으니 나머지 설정을 해도 무용지물입니다
적용하게 되면 위처럼 ae(LACP) 인터페이스가 ae0 ~ ae4까지 생성됩니다
LACP 설정할 인터페이스 unit 제거
Juniper OS에서 LACP 설정을 할 경우 먼저 인터페이스의 unit을 제거해야 합니다
{master:0}[edit]
root# set interfaces ge-0/0/0 ether-options 802.3ad ae0
{master:0}[edit]
root# set interfaces ge-0/0/2 ether-options 802.3ad ae0
{master:0}[edit]
root# commit
[edit interfaces ge-0/0/0]
'unit 0'
logical unit is not allowed on aggregated links
error: configuration check-out failed
제거되지 않으면 위처럼 적용할 수 없으니 반드시 제거해줍니다
{master:0}[edit]
root# delete interfaces ge-0/0/0 unit 0
{master:0}[edit]
root# delete interfaces ge-0/0/2 unit 0
예제에서는 ge-0/0/0, ge0/0/2 포트를 구성할 예정이므로 위와 같이 설정했습니다
인터페이스 LACP 설정
{master:0}[edit]
root# set interfaces ge-0/0/0 ether-options 802.3ad ae0
{master:0}[edit]
root# set interfaces ge-0/0/2 ether-options 802.3ad ae0
인터페이스에 802.3ad 채널을 개방한 후 ae0(Juniper OS에서 사용하는 LACP 인터페이스) 를 적용해줍니다
이렇게 되면 두 인터페이스가 하나의 ae0 인터페이스로 묶이게 됩니다
LACP 인터페이스 설정
이제 LACP로 묶었으니 설정을 진행합니다
맨 뒤에 active인지, passive인지를 확인 후 설정해줍니다
active
- 해당 포트를 통해 데이터를 전송하는 역할
passive
- 해당 포트를 통해 데이터를 수신 후 응답하는 역할
1. Active 모드 설정
{master:0}[edit]
root# set interfaces ae0 aggregated-ether-options lacp active
2. Passive 모드 설정
{master:0}[edit]
root# set interfaces ae0 aggregated-ether-options lacp passive
이후 switching 모드를 사용할 지 아니면 non switching 모드를 사용할 지, switching 모드를 사용한다면 access인지 trunk인지를 확인해줍니다
switching 모드
- 쉽게 말해 vlan을 사용하는 인터페이스를 만들겠다는 의미
non switching 모드
- 인터페이스에 vlan을 사용하지 않겠다는 의미로 직접 IP를 할당하는 설정이 가능
1. switching 모드(Access) 설정
{master:0}[edit]
root# set interfaces ae0 unit 0 family ethernet-switching port-mode access
2. switching 모드(Trunk) 설정
{master:0}[edit]
root# set interfaces ae0 vlan-tagging
{master:0}[edit]
root# set interfaces ae0 unit 0 family ethernet-switching port-mode trunk
3. non switching 모드 설정
{master:0}[edit]
root# set interfaces ae0 unit 0 family inet
LACP 구성
LACP가 잘 설정되었는지 확인하기 위해서는 configure 모드를 나간 후 명령어를 입력해야 합니다
{master:0}[edit]
root# exit
Exiting configuration mode
{master:0}
root> show lacp interfaces
Aggregated interface: ae0
LACP state: Role Exp Def Dist Col Syn Aggr Timeout Activity
ge-0/0/0 Actor No Yes No No No Yes Fast Active
ge-0/0/0 Partner No Yes No No No Yes Fast Passive
ge-0/0/2 Actor No Yes No No No Yes Fast Active
ge-0/0/2 Partner No Yes No No No Yes Fast Passive
LACP protocol: Receive State Transmit State Mux State
ge-0/0/0 Port disabled No periodic Detached
ge-0/0/2 Port disabled No periodic Detached
링크 연결을 안해서 Receive State와 Transmit State가 Port disabled 와 Noperiodic으로 되어있지만 위처럼 결과가 나온다면 정상적인 설정이 완료된 것입니다
마무리
이로써 LACP 구성이 완료되었습니다






