"Virtualization"의 두 판 사이의 차이
잔글 |
잔글 |
||
245번째 줄: | 245번째 줄: | ||
802.1Q Tagged port (Trunk port, Tagged link) | 802.1Q Tagged port (Trunk port, Tagged link) | ||
− | VLAN Tag : 4 bytes | + | VLAN Tag : 4 bytes |
− | *TRID : 16 bits : Tag Protocol Identifier (0x8100, 0x9100, 0x9200, ...) | + | *TRID : 16 bits : Tag Protocol Identifier (0x8100, 0x9100, 0x9200, ...) |
− | *Priority : 3 bits : Priority levels (0 ~ 7) | + | *Priority : 3 bits : Priority levels (0 ~ 7) |
− | *CFI : 1 byte : Cononical Fromat | + | *CFI : 1 byte : Cononical Fromat |
− | **0 : canonical MAC | + | **0 : canonical MAC |
− | **1 : non-canonical MAC | + | **1 : non-canonical MAC |
− | *VID : 12 bytes : Unique VLAN identifier (0 ~ 4095) | + | *VID : 12 bytes : Unique VLAN identifier (0 ~ 4095) |
− | **Reserved VID : 0, 4095 | + | **Reserved VID : 0, 4095 |
− | Ethernet Frame : http://cafe.naver.com/neteg/80475 | + | Ethernet Frame : [http://cafe.naver.com/neteg/80475 http://cafe.naver.com/neteg/80475] |
<span style="color:#006400;">'''Untagged VLAN (Native VLAN)'''</span> | <span style="color:#006400;">'''Untagged VLAN (Native VLAN)'''</span> | ||
268번째 줄: | 268번째 줄: | ||
Switch의 Access port별로 VLAN Tag가 지정이 되므로 untagged VLAN으로 동작 합니다. | Switch의 Access port별로 VLAN Tag가 지정이 되므로 untagged VLAN으로 동작 합니다. | ||
− | <pre>conf t | + | <pre>? #--- 도움말 |
+ | conf t #--- configure terminal | ||
int range fa0/1-3 #--- port 1번에서 3번 지정 | int range fa0/1-3 #--- port 1번에서 3번 지정 | ||
switchport mode access | switchport mode access | ||
278번째 줄: | 279번째 줄: | ||
exit | exit | ||
end | end | ||
+ | |||
show vlan brief</pre> | show vlan brief</pre> | ||
<span style="color:#006400;">'''참고 문헌'''</span> | <span style="color:#006400;">'''참고 문헌'''</span> |
2015년 10월 30일 (금) 13:04 기준 최신판
Virtualization(가상화)을 정리 합니다.
가상화 인프라
- CPU 가상화
- VT (Virtualization Technology)를 지원하는 CPU
- Intel-VT, AMD-V
- Windows에서 CPU가 VT를 지원하는지 확인하는 방법
- Windows*용 인텔® 프로세서 식별 유틸리티 다운로드에서 프로그램을 다운로드 합니다.
- 프로그램 실행 후, 아래 붉은 칸으로 표시된 부분을 확인 합니다.
- Linux에서 CPU가 VT를 지원하는지 확인하는 방법
grep --color vmx /proc/cpuinfo grep --color svm /proc/cpuinfo egrep '(vmx|svm)' --color=always /proc/cpuinfo
- CPU가 VT를 지원하는데 활성화 되어 있지 않은 경우
- Windows를 새로 기동하면서 F2 키를 눌러 BIOS 설정 화면을 표시 합니다.
- SysInfo 탭에서
CPU VT (VT-X) Supported
- Advanced 탭에서
Intel vPro Configuration MEBx Entry Hot-Key [Disabled] CPU VT (VT-x) [Enabled] Intel VT-d [Enabled] Intel TxT [Disabled]
가상화 기술의 종류
가상화 기술의 종류
가상화 기술 | 상세 | |
서버 가상화 | Bare-metal Virtualization |
|
- Full Virtualization |
| |
- Para Virtualization (반 가상화) |
| |
Hosted Virtualization |
| |
데스크탑 가상화 |
| |
애플리케이션 가상화 |
| |
리소스 가상화 |
| |
|
Hypervisor별 가상화 방식
Hypervisor | 상세 |
KVM VMware |
|
Xen |
|
Linux Namespace
Linux에서 제공하는 lightweight 가상화 기술로 격리된 환경을 제공 합니다.
Namespace 분류
분류 | 상세 |
UTS | Hostname 분할 |
IPC | Process 분할 |
PID | PID (Process ID) 분할 |
NS | File system의 mount 지점 분할 |
NET | Network resource 분할 사례) Global namespace에 veth0를 zzns namespace에 veth1을 만들어 통신을 합니다. ip netns add zzns #--- zzns Namespace 생성 ip netns list zzna ip link add veth0 type veth peer name veth1 #--- veth0, veth1 Veth (Virtual Ethernet) 생성 ip link list ip link set veth1 netns zzns #--- veth1을 zzns namespace에 추가 ip netns exec zzns ip link list |
USER | User와 Group ID 분할 |
참고 문헌
- http://bluese05.tistory.com/11
- http://www.joinc.co.kr/modules/moniwiki/wiki.php/man/12/NetworkNamespace
- Docker : LXC (LinuX Container)
Cgroups
Linux Resource의 독점을 방지
CPU, Memory, Block I/O, Network 등을 할당
Subsystem
blkio – control/limit IO from block devices
cpu - uses the kernels scheduler to control access to cpu resource
cpuacct – reporting of cpu usage
cpuset – assignment of cpu and memory nodes
- cpusets.cpus (mandatory)
- cpusets.mems (mandatory)
- others optional
devices – allow or deny device access
freezer – suspend or resume tasks
hugetlb – controls and reporting on hugepages
memory – limit and report on memory usage by tasks
net_cls – tags network packets with class id
net_prio – by network interface set priority of network traffic
ns – namespace subsystem
vi /etc/cgconfig.conf
mount { cpuset = /cgroup/~; } group zzgroup { cpu { ~ } memory { ~ } }
vi /etc/cgrules.conf
mount { cpuset = /cgroup/cpuset; cpu = /cgroup/cpu; cpuacct = /cgroup/cpuacct; memory = /cgroup/memory; devices = /cgroup/devices; freezer = /cgroup/freezer; net_cls = /cgroup/net_cls; blkio = /cgroup/blkio; }
vi /usr/lib/systemd/system/~.service
systemctl daemon-reload
systemctl restart ~.service
service cgconfig start
chkconfig cgconfig on
Sample
yum -y install libcgroup mkdir -p /service_group mount -t cgroup -o cpu,memory,nodev /service_group cd /service_group #--- cgcreate -g subsystem: path cgcreate -g cpu,memory /service_group/web #--- cgroup 생성 cgset -r cpuset.cpus='0,2,4,6,8,10,12,14' web #--- cgroup parameter 설정 cgset -r cpuset.mems = '0' httpd #--- cgset -r parm=value cgroup_path cgcreate -g cpu,memory /service_group/db cgset -r cpuset.cpus='1,3,5,7,9,11,13,15' db cgset -r cpuset.mems = '1' db lscgroup -g cpu:/docker #--- Group 조회 lssubsys ~ #--- Sussystem 조회 cgget ~ #--- cgroup parameter 조회 #--- cgexec -g subsystem:cgroup command cgexec ~ #--- cgroup 정보를 가지고 process 시작 #--- cgdelete [-r] subsystem: path cgdelete #--- cgclassify -g subsystem:cgroup pid cgclassify #--- process를 cgroup에 할당 cgsnapshot systemd-cgls systemd-cgtop ps -eO cgroup
참고 문헌
- http://www.slideshare.net/sprdd/linux-performan-tuning-part-1
- https://share.confex.com/share/125/webprogram/Handout/Session17308/Managing%20Resources%20with%20cgroups.pdf
VLAN
LAN : Local Area Network, L2 Switch로 연결된 network
Virtual LAN
802.1Q Tagged VLAN
IEEE 802.1Q VLAN
802.1Q Tagged port (Trunk port, Tagged link)
VLAN Tag : 4 bytes
- TRID : 16 bits : Tag Protocol Identifier (0x8100, 0x9100, 0x9200, ...)
- Priority : 3 bits : Priority levels (0 ~ 7)
- CFI : 1 byte : Cononical Fromat
- 0 : canonical MAC
- 1 : non-canonical MAC
- VID : 12 bytes : Unique VLAN identifier (0 ~ 4095)
- Reserved VID : 0, 4095
Ethernet Frame : http://cafe.naver.com/neteg/80475
Untagged VLAN (Native VLAN)
가장 많은 Traffic이 있는 VLAN 트래픽에 Tag를 붙이지 않도록 하여 사용
Tagged port에서 오직 한개만 사용 가능
Access VLAN
Switch 장비에서 VLAN 설정하는 방식으로
Access port에 1개의 VLAN Tag를 지정해 주는 방식으로 동작
Switch의 Access port별로 VLAN Tag가 지정이 되므로 untagged VLAN으로 동작 합니다.
? #--- 도움말 conf t #--- configure terminal int range fa0/1-3 #--- port 1번에서 3번 지정 switchport mode access switchport access vlan 10 #--- VLAN Tag 지정 exit int range fa0/4-6 switchport mode access switchport access vlan 20 exit end show vlan brief
참고 문헌
VDI
VDI (Virtual Desktop Infrastructure)의 display protocol
- RDP, RDP 7/8 for windows
- NX : for linux
- SPICE for linux, windows
- VNC