• 검색 결과가 없습니다.

VLAN & Link Aggregation 2 / 15

N/A
N/A
Protected

Academic year: 2022

Share "VLAN & Link Aggregation 2 / 15 "

Copied!
15
0
0

로드 중.... (전체 텍스트 보기)

전체 글

(1)

조 재구

SUN SLS 컨설턴트

http://café.daum.net/osschool (기술 자료)

(2)

VLAN & Link Aggregation 2 / 15

목 차

VLAN 설정... 4

1. VLAN 설정 가능 NIC 파악 ... 4

1.1) Instance File에서 확인 ... 4

1.2) 현재 NIC 설정 확인 ... 4

2. bge Interface VLAN 설정 ... 5

2.1) VLAN설정을 위한 NIC Instance Number ... 5

2.2) 사용 가능 한 NIC 확인... 5

2.3) NIC 별 link 상태 확인 ... 5

2.4) VID ‘3’ 으로 plumb... 5

2.5) 상대방 Host에서 동일한 VLAN용 NIC 설정 ... 6

2.6) 두 Host 간에 통신 test ... 6

3. ce Interface VLAN 설정 ... 7

3.1) VLAN설정을 위한 NIC Instance Number ... 7

3.2) 사용 가능 한 NIC 확인... 7

3.3) NIC 별 link 상태 확인 ... 7

3.4) VID ‘3’ 으로 plumb... 7

4. e1000g Interface VLAN 설정... 8

4.1) VLAN설정을 위한 NIC Instance Number ... 8

4.2) 사용 가능 한 NIC 확인... 8

4.3) NIC 별 link 상태 확인 ... 8

4.4) VID ‘3’ 으로 plumb... 8

Link Aggregation ... 9

1. Link Aggregation 설정... 9

1.1) plumb 되어 있는 Interface unplumb ... 9

1.2) Aggregation 생성... 9

1.3) Aggregation configure 파일 확인... 9

1.4) Aggredation 확인... 9

1.5) Aggredation 상태 확인... 10

1.6) Aggregation Interface setup... 10

1.7) rebooting 후에도 자동 설정되도록 파일 생성 ... 10

1.8) Interface별 사용량 모니터링 ... 11

2. Aggregation 변경... 12

2.1) 정책(policy) 및 LACP확인... 12

(3)

VLAN & Link Aggregation 3 / 15

2.2) 정책 변경 L4 -> L3... 12

2.3) LACP mode 변경 passive -> active ... 13

2.4) LACP mode 변경 active-> passive ... 13

3. Aggregation VLAN 설정 ... 14

3.1) VLAN Interface 생성 ... 14

4. Aggregation 제거... 15

4.1) Interface unplumb... 15

4.2) Aggregation 제거... 15

4.3) 파일 제거 ... 15

저 자 : 조 재구 <http://cafe.daum.net/osschool>

제 목 : VLAN용 NIC VLAN 설정

수정 날짜 : 2008 . 6 . 7 <Solaris version: 10>

저 작 권 : 이 문서의 모든 권리는 조재구에게 있습니다. 이 문서 내에 저작자의 이름 또는 출처가 변경 되지 않는 한 복제나 배포가 가능합니다.

(4)

VLAN & Link Aggregation 4 / 15

VLAN 설정

VLAN (Virtual LAN )은 하나의 NIC(Network Interface Card) 에 여러 개의 가상 NIC를 만들 어 동일한 VLAN ID를 가지고 있는 NIC간에 통신 할 수 있도록 가상 선로를 만들어 주는 것을 말한다. VLAN은 network Card가 ‘e1000g’,‘ bge, ce’ 등 COS (Class of service) 가능한 카드 만 설정할 수 있다.

1. VLAN 설정 가능 NIC 파악

1.1) Instance File에서 확인

VLAN을 지원하는 NIC는 bge 와 ce 가 있으며 ‘/etc/path_to_inst’ 파일에서 NIC의 종류와 개 수를 확인 한다.

jaekoo[/] # egrep 'bge|ce' /etc/path_to_inst

위의 출력된 결과로 ‘bge’ NIC가 두 개 , ‘ce’ NIC 가 두 개 인 것을 확인함.

1.2) 현재 NIC 설정 확인

jaekoo[/] # ifconfig -a

"/pci@1e,600000/pci@0/pci@2/pci@0/network@4" 0 "bge"

"/pci@1e,600000/pci@0/pci@2/pci@0/network@4,1" 1 "bge"

"/pci@1e,600000/pci@0/pci@9/pci@0,2/pci@1/network@0" 0 "ce"

"/pci@1e,600000/pci@0/pci@9/pci@0,2/pci@1/network@1" 1 "ce"

lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000

bge0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2 inet 122.199.186.61 netmask ff000000 broadcast 122.199.186.255

ether 0:14:4f:80:e3:2a

(5)

VLAN & Link Aggregation 5 / 15

2. bge Interface VLAN 설정

2.1) VLAN설정을 위한 NIC Instance Number

VLAN은 NIC의 Instance 번호를 조합하여 다음과 같은 방법으로 생성 한다.

NIC + (1000 * VLAN ID ) + Instance Number

예를 들어 첫 번째 ‘bge1’ NIC 에 2번 VLANID를 설정 한다면

bge + (1000 * 2 ) + 1 = bge2001

2.2) 사용 가능 한 NIC 확인

jaekoo[/] # dladm show-link

2.3) NIC 별 link 상태 확인

link 상태는 ifconfig 명령에 의해 plumb up되어 있을 경우 ‘링크up’ 이라 표시된다.

jaekoo[/] # dladm show-dev

2.4) VID ‘3’ 으로 plumb

jaekoo[/] # ifconfig bge3000 plumb 10.10.30.202 broadcast + up jaekoo[/] # ifconfig -a

lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000

bge0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2 inet 122.199.186.61 netmask ff000000 broadcast 122.199.186.255

ether 0:14:4f:80:e3:2a

bge3000: flags=201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS> mtu 1500 index 10 inet 10.10.30.202 netmask ff000000 broadcast 10.20.1.255

ether 0:14:4f:80:e3:2a

bge0 유형: 비vlan mtu: 1500 장치: bge0 bge1 유형: 비vlan mtu: 1500 장치: bge1

bge0 링크: up 속도: 1000 Mbps 이중: full bge1 링크: down 속도: 0 Mbps 이중: unknown

(6)

VLAN & Link Aggregation 6 / 15

jaekoo[/] # dladm show-link

2.5) 상대방 Host에서 동일한 VLAN용 NIC 설정

[상대방 host에 설정 시 반드시 동일한 VID를 이용해야 한다.]

jaekoo-2[/] # ifconfig bge3000 plumb 10.20.1.2 broadcast + up jaekoo-2[/] # ifconfig -a

2.6) 두 Host 간에 통신 test

jaekoo-2[/] # ping 10.10.30.202

lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000

bge0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2 inet 122.199.186.138 netmask ff000000 broadcast 122.199.186.255

ether 0:14:4f:80:e3:2

bge3000: flags=201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS> mtu 1500 index 10 inet 10.20.1.2 netmask ff000000 broadcast 10.20.1.255

ether 0:14:4f:80:e3:2

10.10.30.202 is alive

bge0 유형: 비vlan mtu: 1500 장치: bge0

bge3000

유형:

vlan 3

mtu: 1500 장치: bge0 bge1 유형: 비vlan mtu: 1500 장치: bge1

(7)

VLAN & Link Aggregation 7 / 15

3. ce Interface VLAN 설정

3.1) VLAN설정을 위한 NIC Instance Number

VLAN은 NIC의 Instance 번호를 조합하여 다음과 같은 방법으로 생성 한다.

NIC + (1000 * VLAN ID ) + Instance Number

예를 들어 첫 번째 ‘bge1’ NIC 에 2번 VLANID를 설정 한다면

ce + (1000 * 123 ) + 1 = bge123001

3.2) 사용 가능 한 NIC 확인

jaekoo[/] # dladm show-link

3.3) NIC 별 link 상태 확인

jaekoo[/] # dladm show-dev

3.4) VID ‘3’ 으로 plumb

jaekoo[/] # ifconfig ce3000 plumb 10.10.40.202 broadcast + up jaekoo[/] # ifconfig -a

jaekoo[/] # dladm show-link

lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000

ce3000: flags=201000803<UP,BROADCAST,MULTICAST,IPv4,CoS> mtu 1500 index 7 inet 10.10.40.202 netmask ff000000 broadcast 10.255.255.255

ether 0:14:4f:66:f3:70

ce0 유형: 레거시 mtu: 1500 장치: ce0 ce1 유형: 레거시 mtu: 1500 장치: ce1

ce0 링크: unknown 속도: 0 Mbps 이중: unknown ce1 링크: unknown 속도: 0 Mbps 이중: unknown

ce0 유형: 레거시 mtu: 1500 장치: ce0 ce1 유형: 레거시 mtu: 1500 장치: ce1

(8)

VLAN & Link Aggregation 8 / 15

4. e1000g Interface VLAN 설정

4.1) VLAN설정을 위한 NIC Instance Number

VLAN은 NIC의 Instance 번호를 조합하여 다음과 같은 방법으로 생성 한다.

NIC + (1000 * VLAN ID ) + Instance Number

예를 들어 첫 번째 ‘bge1’ NIC 에 2번 VLANID를 설정 한다면

e1000g + (1000 * 123 ) + 1 = e1000g123001

4.2) 사용 가능 한 NIC 확인

jaekoo[/] # dladm show-link

4.3) NIC 별 link 상태 확인

jaekoo[/] # dladm show-dev

4.4) VID ‘3’ 으로 plumb

jaekoo[/] # ifconfig e1000g3000 plumb 10.10.1.2 broadcast + up jaekoo[/] # ifconfig -a

jaekoo[/] # dladm show-link

lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000

e1000g3000: flags=201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS> mtu 1500 index 3 inet 10.10.1.2 netmask ff000000 broadcast 10.255.255.255

ether 0:14:4f:af:a7:b2

e1000g0 유형: 비vlan mtu: 1500 장치: e1000g0 e1000g1 유형: 비vlan mtu: 1500 장치: e1000g1 e1000g2 유형: 비vlan mtu: 1500 장치: e1000g2 e1000g3 유형: 비vlan mtu: 1500 장치: e1000g3

e1000g0 링크: up 속도: 1000 Mbps 이중: full e1000g1 링크: unknown 속도: 0 Mbps 이중: half e1000g2 링크: unknown 속도: 0 Mbps 이중: half e1000g3 링크: unknown 속도: 0 Mbps 이중: half

e1000g0 유형: 비vlan mtu: 1500 장치: e1000g0

e1000g3000 유형: vlan 3

mtu: 1500 장치: e1000g0 e1000g1 유형: 비vlan mtu: 1500 장치: e1000g1 e1000g2 유형: 비vlan mtu: 1500 장치: e1000g2 e1000g3 유형: 비vlan mtu: 1500 장치: e1000g3

(9)

VLAN & Link Aggregation 9 / 15

Link Aggregation

1. Link Aggregation 설정

1.1) plumb 되어 있는 Interface unplumb

jaekoo[/] # ifconfig –a

jaekoo[/] # ifconfig e1000g0 unplumb

1.2) Aggregation 생성

[ key ‘1’ 로 두개의 Interface를 설정 ]

jaekoo[/] # dladm create-aggr -d e1000g0 -d e1000g1 1

1.3) Aggregation configure 파일 확인

jaekoo[/] # tail -1 /etc/aggregation.conf

1.4) Aggredation 확인

jaekoo[/] # dladm show-link

lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000

e1000g0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2 inet 10.10.1.1 netmask ff000000 broadcast 10.255.255.255

ether 0:14:4f:af:a7:b2

e1000g0 유형: 비vlan mtu: 1500 장치: e1000g0 e1000g1 유형: 비vlan mtu: 1500 장치: e1000g1 e1000g2 유형: 비vlan mtu: 1500 장치: e1000g2 e1000g3 유형: 비vlan mtu: 1500 장치: e1000g3

aggr1 유형: 비vlan mtu: 1500 집계: 키 1

1 L4 2 e1000g0,e1000g1 auto off short

(10)

VLAN & Link Aggregation 10 / 15

1.5) Aggredation 상태 확인

jaekoo[/] # dladm show-aggr

1.6) Aggregation Interface setup

jaekoo[/] # ifconfig aggr1 plumb 10.10.1.1 up jaekoo[/] # ifconfig -a

jaekoo[/] # dladm show-aggr

1.7) rebooting 후에도 자동 설정되도록 파일 생성

jaekoo[/] # vi /etc/hostname.aggr1

키: 1 (0x0001) 정책: L4 주소: 0:14:4f:af:a7:b2 (자동)

장치 주소 속도 이중 링크 상태

e1000g0 0:14:4f:af:a7:b2 0 Mbps half up standby e1000g1 0:14:4f:af:a7:b3 0 Mbps half unknown standby

lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000

aggr1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 4 inet 10.10.1.1 netmask ff000000 broadcast 10.255.255.255

ether 0:14:4f:af:a7:b2

키: 1 (0x0001) 정책: L4 주소: 0:14:4f:af:a7:b2 (자동)

장치 주소 속도 이중 링크 상태

e1000g0 0:14:4f:af:a7:b2 1000 Mbps full up attached e1000g1 0:14:4f:af:a7:b3 1000 Mbps full up attached

10.10.1.2 up

(11)

VLAN & Link Aggregation 11 / 15

1.8) Interface별 사용량 모니터링

[ key ‘1’ 의 Interface 들을 1초 단위로 모니터링 ] jaekoo[/] # dladm show-aggr 1 -s -i 1

key: 1 ipackets rbytes opackets obytes %ipkts %opkts Total 4056 420565 232 23218

e1000g0 3873 402357 232 23218 95.5 100.0 e1000g1 183 18208 0 0 4.5 0.0 key: 1 ipackets rbytes opackets obytes %ipkts %opkts

Total 3 794 1 102

e1000g0 2 448 1 102 66.7 100.0 e1000g1 1 346 0 0 33.3 0.0

(12)

VLAN & Link Aggregation 12 / 15

2. Aggregation 변경

2.1) 정책(policy) 및 LACP확인

jaekoo[/] # dladm show-aggr -L

2.2) 정책 변경 L4 -> L3

jaekoo[/] # dladm modify-aggr 1 -P L3 jaekoo[/] # dladm show-aggr -L

키: 1 (0x0001)

정책: L4

주소: 0:14:4f:af:a7:b2 (자동) LACP 모드: off LACP 타이머: short

장치 작동 timeout 집계 가능 동기화 coll dist 기본값 만료됨 e1000g0 passive short yes no no no no no e1000g1 passive short yes no no no no no

[정책]

L2 : 각 packet의 MAC을 이용하여 outgoing header로 결정 L3 : 각 packet의 IP header를 이용하여 outgoing packet 결정

L4 : 각 packet의 TCP/UCP 또는 ULP(Upper Level Protocol) header를 이용하여 outgoing packet 결정

키: 1 (0x0001)

정책: L3

주소: 0:14:4f:af:a7:b2 (자동) LACP 모드: off LACP 타이머: short

장치 작동 timeout 집계 가능 동기화 coll dist 기본값 만료됨 e1000g0 passive short yes no no no no no e1000g1 passive short yes no no no no no

[작동 ,LACP]

aggregation과 switch 간에 LACP mode 설정 방법 (Link Aggregation Control Protocol) off : aggregation을 위한 기본 mode. LACP Packet (LACPDUs) 는 생성 되지 않 음.

Active : 시스템에서 LACPDUs를 일반적으로 만들어 낸다.

passive : switch에 의해서 LACPDUs가 만들어 졌을 때 시스템에서 만들게 된다.

(13)

VLAN & Link Aggregation 13 / 15

2.3) LACP mode 변경 passive -> active

jaekoo[/] # dladm modify-aggr -l active 1 jaekoo[/] # dladm show-aggr -L

2.4) LACP mode 변경 active-> passive

jaekoo[/] # dladm modify-aggr -l passive -P L4 1 jaekoo[/] # dladm show-aggr -L

키: 1 (0x0001) 정책: L3 주소: 0:14:4f:af:a7:b2 (자동) LACP 모드: active LACP 타이머: short

장치 작동 timeout 집계 가능 동기화 coll dist 기본값 만료됨 e1000g0 active short yes no no no yes yes e1000g1 active short yes no no no yes yes

키: 1 (0x0001) 정책: L4 주소: 0:14:4f:af:a7:b2 (자동) LACP 모드: passive LACP 타이머: short

장치 작동 timeout 집계 가능 동기화 coll dist 기본값 만료됨 e1000g0 passive short yes no no no yes no e1000g1 passive short yes no no no yes no

(14)

VLAN & Link Aggregation 14 / 15

3. Aggregation VLAN 설정

3.1) VLAN Interface 생성

NIC + (1000 * VLAN ID ) + Instance Number

예를 들어 첫 번째 ‘bge1’ NIC 에 2번 VLANID를 설정 한다면

aggr + (1000 * 3 ) + 1 = aggr3001

jaekoo[/] # ifconfig aggr3001 plumb 20.20.1.2 up jaekoo[/] # ifconfig aggr3001

jaekoo[/] # dladm show-link

aggr3001: flags=201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS> mtu 1500 index 7 inet 20.20.1.2 netmask ff000000 broadcast 20.255.255.255

ether 0:14:4f:af:a7:b2

e1000g0 유형: 비vlan mtu: 1500 장치: e1000g0 e1000g1 유형: 비vlan mtu: 1500 장치: e1000g1 e1000g2 유형: 비vlan mtu: 1500 장치: e1000g2 e1000g3 유형: 비vlan mtu: 1500 장치: e1000g3 aggr1 유형: 비vlan mtu: 1500 집계: 키 1

(15)

VLAN & Link Aggregation 15 / 15

4. Aggregation 제거

4.1) Interface unplumb

jaekoo[/] # ifconfig aggr1 unplumb

4.2) Aggregation 제거

jaekoo[/] # dladm delete-aggr 1 jaekoo[/] # dladm show-link

4.3) 파일 제거

jaekoo[/] # rm /etc/hostname.aggr1

e1000g0 유형: 비vlan mtu: 1500 장치: e1000g0 e1000g1 유형: 비vlan mtu: 1500 장치: e1000g1 e1000g2 유형: 비vlan mtu: 1500 장치: e1000g2 e1000g3 유형: 비vlan mtu: 1500 장치: e1000g3

참조

관련 문서

달리 분류되지 않는 농림수산식품.. Human Computer

Control of the PCS Interface is via GPIB using an external controller or the Test Set’s internal IBASIC controller, or via the serial port by the Agilent 8924C whose

Basic aspects of AUTOSAR architecture and methodology Safety mechanisms supported by AUTOSAR.. Technical safety concepts supported by AUTOSAR Relationship to ISO

– 각 지점 서비스를 위한 오버레이 VLANs for branch services (VLAN 1개 정도) – 역할 기반의 보안

각 창은 종류에 따라 크기를 일부 조절할 수 있도록 설정한다.. 크기를 조절할 수 있는 창은

3.7 Fracture interface after tensile shear test with plunge depth 43 Table.. 3.13 Fracture interface after tensile shear test with dwell time

라즈베리파이 운영체제 설치 라즈베리파이 한글설정 + 라즈베리파일 카메라 설정 + 코랩 인공지능모델 파일 업로드

&amp; kinetics on surface, liquid interfaces, and application to catalysis, electrocatalysis,