월간 보관물: 2016 8월

rhev 3.6 -> rhv4.0 으로 upgrade

rhev3.6 → rhv4 upgrade

일단 rhev3.6 rhv4 를 설치한다.

우선 3.5나 그 이하버전에서 4.0으로는 갈 수 없다. 무조건 3.6에서만 갈 수 있다.

1
현재상태

Red Hat Enterprise Virtualization Manager 버전: 3.6.8.1-0.1.el6

(c) 2016 Red Hat Inc. All rights reserved.

2
host
상태 잘 올라와 있는걸 확인 할 수 있다.

hypervisor os 는 각각 datacenter version을 다르게 하여 rhel6(3.5) rhel7(3.6)을 올렸다.

3
가상머신
2대도 잘 올라간다.

[root@upgrade36 ~]# engine-backup --scope=all --mode=backup --file=backup.bck --log=backuplog.log

Backing up:

Notifying engine

- Files

- Engine database 'engine'

Packing into file 'backup.bck'

Notifying engine

Done.

[root@upgrade36 ~]#

rhv4 를 설치할 node에서 아래 명령어 실행 한다.

[root@upgrade4 ~]# engine-backup --mode=restore --file=backup.bck --log=restore.log --provision-db --no-restore-permissions [92/5152]

Preparing to restore:

- Unpacking file 'backup.bck'

Restoring:

- Files

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

Please note:

Operating system is different from the one used during backup.

Current operating system: redhat7

Operating system at backup: redhat6

Apache httpd configuration will not be restored.

You will be asked about it on the next engine-setup run.

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

Provisioning PostgreSQL users/databases:

- user 'engine', database 'engine'

Restoring:p temporary tables in engine database 'engine'

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

Please note:

The engine database was backed up at 2016-08-30 17:52:57.000000000 +0900 .

Objects that were added, removed or changed after this date, such as virtual

machines, disks, etc., are missing in the engine, and will probably require

recovery or recreation.

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

You should now run engine-setup.

Done.

[root@upgrade4 ~]#

[root@upgrade4 ~]# engine-setup

[ INFO ] Stage: Initializing

[ INFO ] Stage: Environment setup

Configuration files: ['/etc/ovirt-engine-setup.conf.d/10-packaging-wsp.conf', '/etc/ovirt-engine-setup.conf.d/10-packaging.conf', '/etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.con

f']

Log file: /var/log/ovirt-engine/setup/ovirt-engine-setup-20160830180514-zag09e.log

Version: otopi-1.5.1 (otopi-1.5.1-3.el7ev)

[ INFO ] Stage: Environment packages setup

[ INFO ] Stage: Programs detection

[ INFO ] Stage: Environment setup

[ INFO ] Stage: Environment customization

Welcome to the RHEV 4.0 setup/upgrade.

Please read the RHEV 4.0 install guide

https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Virtualization/4.0/html/Installation_Guide/index.html.

Please refer to the RHEV Upgrade Helper application

https://access.redhat.com/labs/rhevupgradehelper/ which will guide you in the upgrading process.

Would you like to proceed? (Yes, No) [Yes]:

--== PRODUCT OPTIONS ==--

Configure Image I/O Proxy on this host? (Yes, No) [Yes]:

Please note: Data Warehouse is required for the engine. If you choose to not configure it on this host, you have to configure it on a remote host, and then configure the engine on this

host so that it can access the database of the remote Data Warehouse host.

Configure Data Warehouse on this host (Yes, No) [Yes]: no

--== PACKAGES ==--

[ INFO ] Checking for product updates...

[ INFO ] No product updates found

--== NETWORK CONFIGURATION ==--

Setup can automatically configure the firewall on this system.

Note: automatic configuration of the firewall may overwrite current settings.

Do you want Setup to configure the firewall? (Yes, No) [Yes]:

[WARNING] Firewall manager was previously set to 'iptables', which is currently not available.

[ INFO ] firewalld will be configured as firewall manager.

--== DATABASE CONFIGURATION ==--

--== OVIRT ENGINE CONFIGURATION ==--

--== STORAGE CONFIGURATION ==--

--== PKI CONFIGURATION ==--

--== APACHE CONFIGURATION ==--

Setup can configure the default page of the web server to present the application home page. This may conflict with existing applications.

Do you wish to set the application as the default page of the web server? (Yes, No) [Yes]:

Setup can configure apache to use SSL using a certificate issued from the internal CA.

Do you wish Setup to configure that, or prefer to perform that manually? (Automatic, Manual) [Automatic]:

--== SYSTEM CONFIGURATION ==--

--== MISC CONFIGURATION ==--

--== END OF CONFIGURATION ==--

[ INFO ] Stage: Setup validation

[ ERROR ] Failed to execute stage 'Setup validation': Trying to upgrade from unsupported versions: 3.5

[ INFO ] Stage: Clean up

Log file is located at /var/log/ovirt-engine/setup/ovirt-engine-setup-20160830180514-zag09e.log

[ INFO ] Generating answer file '/var/lib/ovirt-engine/setup/answers/20160830180540-setup.conf'

[ INFO ] Stage: Pre-termination

[ INFO ] Stage: Termination

[ ERROR ] Execution of setup failed

[root@upgrade4 ~]#

3.5 버전에서 upgrade 하는것은 서포트 하지 않는다고 나온다. 분명 3.6.8 version 에서 upgrade 하는데 위와 같은 결과가 나왔다. logfile 에서도 같은 message가 있다.

3.6 에서 3.5 버전호환 datacenter 가 있었다. 이걸 지우고 다시 해보자.

[root@upgrade4 ~]# !116

engine-backup --mode=restore --file=backup2.bck --log=restore.log --provision-db --no-restore-permissions

Preparing to restore:

- Unpacking file 'backup2.bck'

Restoring:

- Files

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

Please note:

Operating system is different from the one used during backup.

Current operating system: redhat7

Operating system at backup: redhat6

Apache httpd configuration will not be restored.

You will be asked about it on the next engine-setup run.

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

Provisioning PostgreSQL users/databases:

- user 'engine', database 'engine'

FATAL: Existing database 'engine' or user 'engine' found and temporary ones created - Please clean up everything and try again

[root@upgrade4 ~]#

engine-backup restore 를 했더니 위와같은 error 가 떳다.

database engine 이나 user engine 이 이미 있다고 뿌려준 error 이다. 지워주자.

[root@upgrade4 ~]# !su

su - postgres

마지막 로그인: 830 18:26:06 KST 2016 일시 pts/0

-bash-4.2$ psql

psql (9.2.15)

Type "help" for help.

postgres=# \l

List of databases

Name | Owner | Encoding | Collate | Ctype | Access privileges

-----------------------+-----------------------+----------+-------------+-------------+-----------------------

engine | engine | UTF8 | en_US.UTF-8 | en_US.UTF-8 |

engine_20160830182408 | engine_20160830182408 | UTF8 | en_US.UTF-8 | en_US.UTF-8 |

postgres | postgres | UTF8 | ko_KR.UTF-8 | ko_KR.UTF-8 |

template0 | postgres | UTF8 | ko_KR.UTF-8 | ko_KR.UTF-8 | =c/postgres +

| | | | | postgres=CTc/postgres

template1 | postgres | UTF8 | ko_KR.UTF-8 | ko_KR.UTF-8 | =c/postgres +

| | | | | postgres=CTc/postgres

(5 rows)

postgres=# drop database engine;

DROP DATABASE

postgres=# drop database engine_20160830182408;

DROP DATABASE

postgres=# drop user engine;

DROP ROLE

postgres=# drop role engine;

ERROR: role "engine" does not exist

postgres=# \deu

List of user mappings

Server | User name

--------+-----------

(0 rows)

postgres=#

database ‘engine’ user role ‘engine’ 이 지워진 것을 확인 했다.

[root@upgrade4 ~]# !engine

engine-backup –mode=restore –file=backup2.bck –log=restore.log –provision-db –no-restore-permissions

Preparing to restore:

– Unpacking file ‘backup2.bck’

Restoring:

– Files

——————————————————————————

Please note:

Operating system is different from the one used during backup.

Current operating system: redhat7

Operating system at backup: redhat6

Apache httpd configuration will not be restored.

You will be asked about it on the next engine-setup run.

——————————————————————————

Provisioning PostgreSQL users/databases:

– user ‘engine’, database ‘engine’

Restoring:

– Engine database ‘engine’

– Cleaning up temporary tables in engine database ‘engine’

——————————————————————————

Please note:

The engine database was backed up at 2016-08-30 18:19:01.000000000 +0900 .

Objects that were added, removed or changed after this date, such as virtual

machines, disks, etc., are missing in the engine, and will probably require

recovery or recreation.

——————————————————————————

You should now run engine-setup.

Done.

[root@upgrade4 ~]#

restore 가 잘 되었다.


[root@upgrade4 ~]# engine-setup

[ INFO ] Stage: Initializing

[ INFO ] Stage: Environment setup

Configuration files: [‘/etc/ovirt-engine-setup.conf.d/10-packaging-wsp.conf’, ‘/etc/ovirt-engine-setup.conf.d/10-packaging.conf’, ‘/etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.con

f’]

Log file: /var/log/ovirt-engine/setup/ovirt-engine-setup-20160830183849-cft2zg.log

Version: otopi-1.5.1 (otopi-1.5.1-3.el7ev)

[ INFO ] Stage: Environment packages setup

[ INFO ] Stage: Programs detection

[ INFO ] Stage: Environment setup

[ INFO ] Stage: Environment customization

Welcome to the RHEV 4.0 setup/upgrade.

Please read the RHEV 4.0 install guide

https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Virtualization/4.0/html/Installation_Guide/index.html.

Please refer to the RHEV Upgrade Helper application

https://access.redhat.com/labs/rhevupgradehelper/ which will guide you in the upgrading process.

Would you like to proceed? (Yes, No) [Yes]:

–== PRODUCT OPTIONS ==–

Configure Image I/O Proxy on this host? (Yes, No) [Yes]:

Please note: Data Warehouse is required for the engine. If you choose to not configure it on this host, you have to configure it on a remote host, and then configure the engine on this

host so that it can access the database of the remote Data Warehouse host.

Configure Data Warehouse on this host (Yes, No) [Yes]: no

–== PACKAGES ==–

[ INFO ] Checking for product updates…

[ INFO ] No product updates found

–== NETWORK CONFIGURATION ==–

Setup can automatically configure the firewall on this system.

Note: automatic configuration of the firewall may overwrite current settings.

Do you want Setup to configure the firewall? (Yes, No) [Yes]:

[WARNING] Firewall manager was previously set to ‘iptables’, which is currently not available.

[ INFO ] firewalld will be configured as firewall manager.

–== DATABASE CONFIGURATION ==–

–== OVIRT ENGINE CONFIGURATION ==–

–== STORAGE CONFIGURATION ==–

–== PKI CONFIGURATION ==–

–== APACHE CONFIGURATION ==–

Setup can configure the default page of the web server to present the application home page. This may conflict with existing applications.

Do you wish to set the application as the default page of the web server? (Yes, No) [Yes]:

Setup can configure apache to use SSL using a certificate issued from the internal CA.

Do you wish Setup to configure that, or prefer to perform that manually? (Automatic, Manual) [Automatic]:

–== SYSTEM CONFIGURATION ==–

–== MISC CONFIGURATION ==–

–== END OF CONFIGURATION ==–

[ INFO ] Stage: Setup validation

[ ERROR ] Failed to execute stage ‘Setup validation’: Trying to upgrade from unsupported versions: 3.5

[ INFO ] Stage: Clean up

Log file is located at /var/log/ovirt-engine/setup/ovirt-engine-setup-20160830183849-cft2zg.log

[ INFO ] Generating answer file ‘/var/lib/ovirt-engine/setup/answers/20160830183909-setup.conf’

[ INFO ] Stage: Pre-termination

[ INFO ] Stage: Termination

[ ERROR ] Execution of setup failed

[root@upgrade4 ~]#

3.5 호환버전 datacenter를 삭제 했지만 여전히 같은 error 로 진행이 안된다.

확인 해 봤더니 datacenter 는 삭제 되었지만 3.5 버전 호환 cluster 가 남아 있었다. 이걸 지우고 다시 백업 후 복구를 해봤다.

[root@upgrade4 ~]# engine-setup [89/9065]

[ INFO ] Stage: Initializing

[ INFO ] Stage: Environment setup

Configuration files: [‘/etc/ovirt-engine-setup.conf.d/10-packaging-wsp.conf’, ‘/etc/ovirt-engine-setup.conf.d/10-packaging.conf’, ‘/etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.con

f’]

Log file: /var/log/ovirt-engine/setup/ovirt-engine-setup-20160830191209-ese3kl.log

Version: otopi-1.5.1 (otopi-1.5.1-3.el7ev)

[ INFO ] Stage: Environment packages setup

[ INFO ] Stage: Programs detection

[ INFO ] Stage: Environment setup

[ INFO ] Stage: Environment customization

Welcome to the RHEV 4.0 setup/upgrade.

Please read the RHEV 4.0 install guide

https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Virtualization/4.0/html/Installation_Guide/index.html.

Please refer to the RHEV Upgrade Helper application

https://access.redhat.com/labs/rhevupgradehelper/ which will guide you in the upgrading process.

Would you like to proceed? (Yes, No) [Yes]:

–== PRODUCT OPTIONS ==–

Configure Image I/O Proxy on this host? (Yes, No) [Yes]:

Please note: Data Warehouse is required for the engine. If you choose to not configure it on this host, you have to configure it on a remote host, and then configure the engine on this

host so that it can access the database of the remote Data Warehouse host.

Configure Data Warehouse on this host (Yes, No) [Yes]: no

–== PACKAGES ==–

[ INFO ] Checking for product updates…

[ INFO ] No product updates found

–== NETWORK CONFIGURATION ==–

Setup can automatically configure the firewall on this system.

Note: automatic configuration of the firewall may overwrite current settings.

Do you want Setup to configure the firewall? (Yes, No) [Yes]:

[WARNING] Firewall manager was previously set to ‘iptables’, which is currently not available.

[ INFO ] firewalld will be configured as firewall manager.

–== DATABASE CONFIGURATION ==–

–== OVIRT ENGINE CONFIGURATION ==–

–== STORAGE CONFIGURATION ==–

–== PKI CONFIGURATION ==–

–== APACHE CONFIGURATION ==–

Setup can configure the default page of the web server to present the application home page. This may conflict with existing applications.

Do you wish to set the application as the default page of the web server? (Yes, No) [Yes]:

Setup can configure apache to use SSL using a certificate issued from the internal CA.

Do you wish Setup to configure that, or prefer to perform that manually? (Automatic, Manual) [Automatic]:

–== SYSTEM CONFIGURATION ==–

–== MISC CONFIGURATION ==–

–== END OF CONFIGURATION ==–

[ INFO ] Stage: Setup validation

[WARNING] Less than 16384MB of memory is available

[ INFO ] Cleaning stale zombie tasks and commands

–== CONFIGURATION PREVIEW ==–

Default SAN wipe after delete : False

Firewall manager : firewalld

Update Firewall : True

Host FQDN : upgrade36.test.dom

Engine database secured connection : False

Engine database host : localhost

Engine database user name : engine

Engine database name : engine

Engine database port : 5432

Engine database host name validation : False

Engine installation : True

PKI organization : test.dom

Set application as default page : True

Configure Apache SSL : True

DWH installation : False

Configure local DWH database : False

Engine Host FQDN : upgrade36.test.dom

Configure Image I/O Proxy : True

Configure VMConsole Proxy : True

Configure WebSocket Proxy : True

Please confirm installation settings (OK, Cancel) [OK]:

[ INFO ] Cleaning async tasks and compensations

[ INFO ] Unlocking existing entities

[ INFO ] Checking the Engine database consistency

[ INFO ] Stage: Transaction setup

[ INFO ] Stopping engine service

[ INFO ] Stopping ovirt-fence-kdump-listener service

[ INFO ] Stopping Image I/O Proxy service

[ INFO ] Stopping websocket-proxy service

[ INFO ] Stage: Misc configuration

[ INFO ] Stage: Package installation

[ INFO ] Stage: Misc configuration

[ INFO ] Upgrading CA

[ INFO ] Backing up database localhost:engine to ‘/var/lib/ovirt-engine/backups/engine-20160830191245.trnZdh.dump’.

[ INFO ] Creating/refreshing Engine database schema

[ INFO ] Configuring Image I/O Proxy

[ INFO ] Configuring WebSocket Proxy

[ INFO ] Creating/refreshing Engine ‘internal’ domain database schema

[ INFO ] Generating post install configuration file ‘/etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf’

[ INFO ] Stage: Transaction commit

[ INFO ] Stage: Closing up

[ INFO ] Starting engine service

[ ERROR ] Failed to execute stage ‘Closing up’: Failed to start service ‘ovirt-imageio-proxy’

[ INFO ] Stage: Clean up

Log file is located at /var/log/ovirt-engine/setup/ovirt-engine-setup-20160830191209-ese3kl.log

[ INFO ] Generating answer file ‘/var/lib/ovirt-engine/setup/answers/20160830191611-setup.conf’

[ INFO ] Stage: Pre-termination

[ INFO ] Stage: Termination

[ ERROR ] Execution of setup failed

[root@upgrade4 ~]#

… 이전 error 는 지나갔는데 새로운 데서 error 가 생겼다…

[root@upgrade4 ~]# systemctl status ovirt-engine

ovirt-engine.service – oVirt Engine

Loaded: loaded (/usr/lib/systemd/system/ovirt-engine.service; enabled; vendor preset: disabled)

Active: active (running) since 2016-08-30 19:16:10 KST; 40min ago

Main PID: 24680 (ovirt-engine.py)

CGroup: /system.slice/ovirt-engine.service

├─24680 /usr/bin/python /usr/share/ovirt-engine/services/ovirt-engine/ovirt-engine.py –redirect-output –systemd=notify start

└─24747 ovirt-engine -server -XX:+TieredCompilation -Xms1024M -Xmx1024M -Djava.awt.headless=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djs…

830 19:16:08 upgrade4.test.dom systemd[1]: Starting oVirt Engine…

830 19:16:10 upgrade4.test.dom systemd[1]: Started oVirt Engine.

[root@upgrade4 ~]#

일단 ovirt-engine service 가 올라오긴 햇는데…

[root@upgrade4 bin]# /usr/share/ovirt-engine/setup/bin/ovirt-engine-rename

[ INFO ] Stage: Initializing

Welcome to the ovirt-engine-rename utility

More details about the operation and possible implications

of running this utility can be found here:

http://www.ovirt.org/Changing_Engine_Hostname

[ INFO ] Stage: Environment setup

Configuration files: [‘/etc/ovirt-engine-setup.conf.d/10-packaging-wsp.conf’, ‘/etc/ovirt-engine-setup.conf.d/10-packaging.conf’, ‘/etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.con

f’]

Log file: /var/log/ovirt-engine/setup/ovirt-engine-rename-20160830195843-tiyd2o.log

Version: otopi-1.5.1 (otopi-1.5.1-3.el7ev)

[ INFO ] Stage: Environment packages setup

[ INFO ] Stage: Programs detection

[ INFO ] Stage: Environment setup

[ INFO ] Stage: Environment customization

New fully qualified server name: []: upgrade4.test.dom

–== PRODUCT OPTIONS ==–

[ INFO ] Stage: Setup validation

During execution engine service will be stopped (OK, Cancel) [OK]:

[ INFO ] The following files will be updated:

/etc/ovirt-engine/engine.conf.d/10-setup-protocols.conf

/etc/ovirt-engine/imageuploader.conf.d/10-engine-setup.conf

/etc/ovirt-engine/isouploader.conf.d/10-engine-setup.conf

/etc/ovirt-engine/logcollector.conf.d/10-engine-setup.conf

/etc/ovirt-engine/ovirt-vmconsole-proxy-helper.conf.d/10-setup.conf

/etc/pki/ovirt-engine/cert.conf

/etc/pki/ovirt-engine/cert.template

/etc/pki/ovirt-engine/certs/apache.cer

/etc/pki/ovirt-engine/keys/apache.key.nopass

/etc/pki/ovirt-engine/keys/apache.p12

[ INFO ] Stage: Transaction setup

[ INFO ] Stopping engine service

[ INFO ] Stage: Misc configuration

[ INFO ] Stage: Package installation

[ INFO ] Stage: Misc configuration

[ INFO ] Generating post install configuration file ‘/etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf’

[ INFO ] Stage: Transaction commit

[ INFO ] Stage: Closing up

–== SUMMARY ==–

[ INFO ] Starting engine service

[ INFO ] Restarting httpd

Rename completed successfully

–== END OF SUMMARY ==–

[ INFO ] Stage: Clean up

Log file is located at /var/log/ovirt-engine/setup/ovirt-engine-rename-20160830195843-tiyd2o.log

[ INFO ] Generating answer file ‘/var/lib/ovirt-engine/setup/answers/20160830195915-rename.conf’

[ INFO ] Stage: Pre-termination

[ INFO ] Stage: Termination

[ INFO ] Execution of rename completed successfully

[root@upgrade4 bin]#

내 경우 hostname 이 바뀌어서 ovirt-engine-rename command를 실행 시켜주었다.

[root@upgrade4 bin]# systemctl status ovirt-imageio-proxy.service

ovirt-imageio-proxy.service – oVirt ImageIO Proxy

Loaded: loaded (/usr/lib/systemd/system/ovirt-imageio-proxy.service; enabled; vendor preset: disabled)

Active: failed (Result: start-limit) since 2016-08-30 20:02:09 KST; 25s ago

Process: 25691 ExecStart=/usr/bin/ovirt-imageio-proxy (code=exited, status=1/FAILURE)

Main PID: 25691 (code=exited, status=1/FAILURE)

830 20:02:08 upgrade4.test.dom systemd[1]: Failed to start oVirt ImageIO Proxy.

830 20:02:08 upgrade4.test.dom systemd[1]: Unit ovirt-imageio-proxy.service entered failed state.

830 20:02:08 upgrade4.test.dom systemd[1]: ovirt-imageio-proxy.service failed.

830 20:02:09 upgrade4.test.dom systemd[1]: ovirt-imageio-proxy.service holdoff time over, scheduling restart.

830 20:02:09 upgrade4.test.dom systemd[1]: start request repeated too quickly for ovirt-imageio-proxy.service

830 20:02:09 upgrade4.test.dom systemd[1]: Failed to start oVirt ImageIO Proxy.

830 20:02:09 upgrade4.test.dom systemd[1]: Unit ovirt-imageio-proxy.service entered failed state.

830 20:02:09 upgrade4.test.dom systemd[1]: ovirt-imageio-proxy.service failed.

[root@upgrade4 bin]#

그래도 여전히 이건 안올라오더라… 이건 다음 이시간에…

이후 cluster 호환버전을 4.0으로 올려주고, datacenter 호환버전을 4.0으로 올려준 후, hypervisor hostrhv4.0 repo 추가하고 upgrade 해주었다.

4
버전정보

Red Hat Virtualization Manager 버전: 4.0.2.7-0.1.el7ev

(c) 2016 Red Hat Inc. All rights reserved.

5

데이터센터 호환버전 4.0

6
클러스터 호환버전 4.0

7

가상머신도 잘 올라가는것을 확인 하였다.

VLAN, VXLAN – 2

VLAN, VXLAN
https://tools.ietf.org/html/rfc7348

위는 RFC7348 의 링크이다.

여기의 개요에 이렇게 나와 있는데

vxlan(Virtual eXtensible Local Area Network) : 가상화 된 layer 2 network layer 3 network 위에서 덮어 씌운 프레임워크 이다… 뭔말인지 한번 천천히 살펴보자.

 

소개

서버 가상화는 물리적인 네트워크 인프라에대한 수요를 증가시켰다. 한개의 물리적 서버는 여러개의 가상머신의 MAC(Media Access Control) 주소를 갖고 있다. 이는 잠재적인 수십만 VM의 접속 및 커뮤니케이션을 위해, 보다 큰 MAC 주소 테이블을 필요로한다.

데이터센터내의 가상머신이, 그 가상lan(vlan)에 맞게 그룹화 된 경우에는, VM이 소속성이 있는 특정의 그룹에 맞게 트래픽을 분할한 VLAN 수천개를 필요로 하는 경우가 있습니다. 4096의 현재 VLAN 제한은, 이와같은 상태에서는, 불충분합니다.

데이타센터에서는 대다수의 경우, 독립된 네트워크 도메인과 각각 여러개의 테넌트를 호스팅하기위해 필요합니다. 그것은, 전용의 인프라에서 이것을 실현하려면 경재적이 아니기 때문에, 네트워크관리자는, 공유네트워크상에서의 분리를 시행하는것을 선택합니다. 이와같은 시나리오에서의 일반적인 문제는, 각 테넌트가 독립된 물리네트워크상에서 잠재적으로 MAC 주소및 VLAN ID 를 중복 할당할 수도 있다는 것입니다.

레이어2 물리 인프라스트럭쳐를 사용해서, 가상화 환경을 위해 중요한 요건은, 데이타센터 전체에 걸쳐, 혹은 컴퓨팅, 네트워크, 및 스토리지 리소스의 효율적인 배분을 위해 데이타센터간의 레이어 2 네트워크의 규모를 키웁니다. 이와같은 네트워크에서는, 루프가 없는 토폴로지를 위해 스페닝트리 프로토콜(STP)과같은 전통적인 것을 사용하면, disable 되는 링크의 수가 상당히 많아지게 될 수도 있습니다.

마지막의 시나리오는, 네트워크 오퍼레이터가 물리 인프라의 상호접속을 위해서 IP를 사용하는것을 원하는 경우 입니다(예를들면, 위와 같은 disable 된 네트워크 링크를 피하는것, Equal-Cost MultiPath(ECMP) 를 통해 멀티패스의 확장성을 실현하기 위한 것). 하지만 이와같은 환경에서는, VM간 통신을위해 레이어 2 모델을 유지할 필요가 있습니다.

이 시나리오는, 오버레이네트워크의 요건을 나타냅니다. 이 오버레이는, 캡슐화된 형식의 각각 VM에서 MAC트래픽을 전송하기위해 논리적인 터널을 사용합니다.

라고 RFC7348 문서에 나와있다.

 

oraclesolaris 11.2 의 문서에 친절하게 한글로 vxlan 의 개요가 나와있다.

( https://docs.oracle.com/cd/E56343_01/html/E53792/gnmug.html#scrolltoc )

VXLAN계층 3 네트워크 위에 계층 2 네트워크를 만들어서 네트워크 격리를 강화할 수 있는 계층 2 기술입니다. VXLAN은 여러 물리적 계층 2 네트워크를 통해 확장되는 가상 계층 2 네트워크를 제공합니다. 따라서 클라우드 환경의 리소스 프로비저닝은 단일 물리적 계층 2 네트워크로 제한되지 않습니다. 물리적 서버는 IPv4 또는 IPv6 네트워크를 통해 연결될 경우 VXLAN 네트워크의 일부일 수 있습니다. “

 

VXLAN 의 프레임 포멧을 좀 알아보면…

 

  0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1

   Outer Ethernet Header:
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             Outer Destination MAC Address                     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Outer Destination MAC Address | Outer Source MAC Address      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                Outer Source MAC Address                       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |OptnlEthtype = C-Tag 802.1Q    | Outer.VLAN Tag Information    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Ethertype = 0x0800            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

 

외부 이더넷 헤더 : 먼저 L2 계층의 프레임에 outer 목적지 mac 주소와 outer 출발지 주소가 있고 뒤에 802.1Q 헤더가 붙어 있다. 802.1Q 헤더는 옵션이다. 붙어도 되고 안붙어도 되는데, 붙게 되면 lan상에 vxlan을 구별하는 표시가 될 수 도 있다. outer 라고 해둔 이유는, 나중에 L3 위에 udp 계층에서 vxlaninner 목적지/출발지가 나온다. 그래서 innerouter를 구분해놨다. 

   Outer IPv4 Header:
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |Version|  IHL  |Type of Service|          Total Length         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Identification        |Flags|      Fragment Offset    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Time to Live |Protocl=17(UDP)|   Header Checksum             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                       Outer Source IPv4 Address               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                   Outer Destination IPv4 Address              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

 

외부 IP 헤더 : L3 계층의 포멧을 보면, 같다. 이 외부 IP헤더의 송신자 IP 주소는, 통신상대의 VM(내부 헤더의 source MAC 주소로서 표현된다.)이 가지고 있는 VTEP(VXLAN Tunnel End Point) IP 주소를 나타내고 있다. 수신 IP 주소는, 내부헤더의 수신 MAC 주소로서 표현된다. 상대방의 VM이 접속 되어 있는 VTEPIP 주소이다.

 

  Outer UDP Header:
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |           Source Port         |       Dest Port = VXLAN Port  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |           UDP Length          |        UDP Checksum           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

 

외부 UDP Header : 이 외부헤더에는, VTEP에 의해 결정된 소스포트번호화 수신처의 VTEPIANA(Internet Assigned Numbers Authority)에 의해 할당된 well-known(잘 알려진)한 포트번호가 셋팅 되어 있다. source port 번호는 내부 이더넷 프레임헤더의 해시로 하는 것이 권장되고 있다. 이것은 VXLAN 오버레이 상에서 VM으로 부터 VM으로의 트래픽에서 , ECMP(Equal-Cost MultiPath) 또는 로드벨런싱의 엔트로피 레벨을 유효하게 하기 위함이다.

 

UDP checksum 필드는 0 이 송신되어야 한다. 패킷이 UDP checksum0으로 수신됐을 때, 캡슐해제를 위해 반드시 수신되어야만 한다. 옵션으로서, 캡슐링 되어있는 엔드포인트가 0이 아닌 UDP checksump 을 포함하고 있을 때, 캡슐화 된 MAC 프레임과 VXLAN 헤더와, UDP, IP 헤더를 포함하는 전체의 올바른 checksum을 계산하지않으면 안된다. 엔드포인트가 캡슐화를 해제할때, 패킷 checksum 값이 0이 아닌경우, 첵섬값을 검사 할 것이다. 만약 이와같은 검사를 실행하는 것을 선택한 경우, 또한, 그 검사가 실패한 경우는, 패킷은 반드시 파손되어야만 한다. 만약, 수신처의 캡슐화 해제처리가 이런 모양의 검사를 실행 하지않는 경우, 또는 검사가 성공 한 경우, 패킷은 수신되어 캡슐화 해제가 반드시 되야 한다.

 

 VXLAN Header:
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |R|R|R|R|I|R|R|R|            Reserved                           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                VXLAN Network Identifier (VNI) |   Reserved    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


VXLAN Header :
8바이트의 필드는 아래와 같다.

  • 플래그(8bit) 이 “I플래그는 올바른 VXLAN Network ID(VNI)를위해 반드시 1로 셋 되어 있어야만 한다. 남은 7 bit(“R” 이라고 지정된)는 예약된 비트이고, 반드시 0으로 셋 되어 있어야 한다.
  • VXLAN Segment ID / VXLAN Network ID(VNI). 이것은 24 비트의 값으로, VM이 통신하는 개개의 VXLAN오버레이 네트워크를 식별하기위해 사용된다. VXLAN오버레이 네트워크가 다른 경우는 VM은 서로 통신할 수 없다.
  • Reserved (24 bit 8 bit) : 반드시 0으로 초기화 되어 있지않으면 안된다.

 

Inner Ethernet Header:
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             Inner Destination MAC Address                     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Inner Destination MAC Address | Inner Source MAC Address      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                Inner Source MAC Address                       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |OptnlEthtype = C-Tag 802.1Q    | Inner.VLAN Tag Information    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

원래의 VM 이 가지는 MAC 주소이다.

 

 Payload:
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Ethertype of Original Payload |                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               |
   |                                  Original Ethernet Payload    |
   |                                                               |
   |(Note that the original Ethernet Frame's FCS is not included)  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

오리지널 payload 이다. 4 계층 이상의 data.

 

 Frame Check Sequence:
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |   New FCS (Frame Check Sequence) for Outer Ethernet Frame     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
마지막으로 오는 outer frame 이 맞는지를 확인하는 Frame Check Sequence 이다. 

 

data center에서 스위치가 가지는 mac table 의 한계가 있다. 옛날에는 하나의 switch 도메인의 MAC 주소 갯수는 많아봤자 4000개 내외 였는데, 요즘은 가상화 VMnicmac address 를 가지기 때문에 이는 4000개를 훨씬 넘게되어 28만개도 넘어버리게 될 수도 있다. 하나의 스위치가 어딘가로 routing을 하려면 28만개의 테이블을 다 뒤져서 어느 포트로 보낼지 결정 해야하는것이다. 이러면 네트워크 성능저하의 원인이 될 것이다.

 

http://youngmind.tistory.com/entry/Network-Overlay-VXLAN-%EB%B6%84%EC%84%9D-1

여기에 vxlan에 관해 자세히 설명되어 있다. open vswitch 에 관해서 설명이 되면 좋았을뻔 했는데… cisco nexus 1000v(vmware, hyper-v, 등의 hypervisor 에 설치되는 가상 스위치)에 관해 설명되어 있다.

 

일단 왜 생겼는지, 어떤 때 쓰는지를 알았으니… 어떻게 쓰는지를 알아보자.

려고 했는데… 잘안된다.

Open vSwitch 사용법이 엄청 어렵네… ㅠㅠ

 

 

VLAN, VXLAN

 

Red Hat OpenStack Platform 8 문서를 보다가 neutron 에서 vlan vxlan 을 이용해서 network 를 구성하는데 … 어렵더라.

그래서 한번 찾아봤다.

IETF(Internet Engineering Task Force) 의 문서를 찾아봤는데, 아주 잘 나와 있었다. 아주 잘 이해하진 못했지만…

https://tools.ietf.org/html/rfc5517

위의 링크로 가면 볼 수 있다.

일단 기본 개념을 보면…

특별한 layer 2 전송 제한 조건을 적용하여 device isolate 를 달성 할 수 있는 매커니즘을 제공한다… 라고 나와있다.

IEEE 802.1Q wiki를 찾아보면… 이렇게 나와있다.

IEEE 802.1Q 는 하나의 이더넷 네트워크에서 가상 랜(VLAN)을 지원하는 네트워크 표준이다. 이 표준은 이더넷 프레임을 위한 VLAN 태그 추가 시스템과 더불어, 이러한 프레임을 관리 하는데 동반되는 브릿지와 스위치에 쓰이는 절차들을 정의한다. , 이 표준은 IEEE 802표준 위원회의 워킹 그룹인 ieee802.1이 개발한 것으로, 그 뒤로 IEEE 802.1ak, IEEE 802.1at, IEEE 802.1Qay 를 포함한 개정판들을 활발하게 개발 하고 있다…

여기에서 중요한게 위에 볼드체로 쓴것이다.

이 프레임 포맷을 보면…

20160811-1

위가 VLAN tagging이 없는것.. 아래가 있는것이다. 보면 2 계층과 3계층 사이에 4바이트가 더 들어가 있는것을 확인 할 수가 있다. 이는 2 계층에다가 12bit 만큼의 vlan id 를 붙이기 위함인데, 나머지 22bit는 뭘하는지 알아보자.

20160811-2

앞에 16bit TPID(Tag Protocol Identifier , 태그 프로토콜 식별자) 이다. 이는 IEEE 802.1Q 태그 프래임으로서, 프레임을 식별하기위해 0x8100 의 값으로 설정되어 있다. 2 계층 뒤에 0x8100 그러니까 binary로 보면 ‘0b1000000100000000’ 요렇게 되는데, 이게 붙으면 802.1Q 그러니까 VLAN tagging 이 되어 있다는것을 뜻한다. 반대로 이게 없으면 vlan 이 없다는 뜻이겟다.

다음 뒤에나오는 TCI(Tag Control Information, 태그 제어 정보) 인데 이게 각각 3부분으로 나눠진다.

PCP(Priority Code Point) : IEEE 802.1p 에서 정의된 우선도를 지정하는 3 bit 필드이다. 프레임의 우선도를 0(최저) 에서부터 7(최고) 까지 나타내며, 각종 트래픽(음성, 동영상, data ) 의 우선순위를 지정하는데 쓰일 수 있다.

CFI(Canonical Format Indicator) : 1 bit 의 필드로, 1이면 MAC 어드레스는 정규 포멧이 아닌것을 나타낸다. 0 이면, MAC 어드레스는 정규포맷인 것이다. 이더넷의 경우는 일반적으로 0 이다. 이는 이더넷과 토큰링의 상호접속시에 사용된다. 이더넷 포트에서 CFI 1인 프레임을 수신한 경우, 그 프래임은 태그가 붙지않은 포트로는 브릿지되지 않는다. (마지막 문장은 뭔말인지는 잘 모르겟지만 이렇게 써져 있다; )

이게 요즘에는 DEI (Drop Eligible Indicator) 라고 바뀌었다. 똑같이 1bit 필드로, PCP 와는 별도로, 또는 결합해서 쓰이며 트래픽이 혼잡해질 때 제거되기 적합한 프레임들을 가리키는데 사용된다. (라고 나와있다. )

VID(VLAN Identifier) : 12bit 의 필드로, 그 프레임이 속한 VLAN을 지정한다. 0인 경우에는 어느 VLAN에도 속해있지 않는것을 의미하고, 그와같은 802.1Q 태그는 단순히 우선도태그(priority tag) 로서 사용되게 된다. 0XFFF 라는 값은 예약되어 있다. 그 이외의 모든 값은 VLAN의 식별자로서 사용되는것으로, 4094 개의 VLAN을 취급한다. 브릿지 에서는, 1(0x001)을 관리용으로 예약되어 있는경우가 많다.

 

이중태그라는것도 있는데 …

인터넷 서비스 프로바이더에서는, 802.1ad 에서 규정된 이중 태깅이 사용되는 경우가 있다. 이로인해, 기존의 VLAN 태깅이 된 end user 트래픽을 혼합시키면서, 인터넷 서비스 프로바이더가 내부에서 독자로 VLAN태깅을 사용하는것이 가능하다. 서비스 태그 (S-TAG, 외부의 태그, 인터넷 서비스 프로바이더의 VLAN 태그) 를 앞에 두고, 커스토머 태그(C-TAG, 내부의 태그, end user VLAN 태그) 를 그 뒤에 둔다. 이 경우, 외부 태그의 TPID에는 0x9100, 0x9200, 0x9300 라고하는 값을 사용하기도 하지만, 802.1ad 의 규정에서는 외부의 태그의 TPID 에는 0x88a8 을 지정하도록 되어 있다.

마찬가지로 3중태깅도 가능하다…

Multiple VLAN Registration Protocol

이런것도 있는데… 이것은 브릿지군의 특정의 링크를 사용해서 VLAN의 집합에 대해 조정을 하는것이 가능하다. 이것은 switch 들 끼리 자동적으로 VLAN 태깅 정보를 주고 받을 때 사용한단다.

 

자 이제 실제로 한번 써보자…

 

NetworkManager 를 이용한 nmcli 로 하였다. 이는 gui tui 도 동일하게 할 수 있을것이다…(cli밖에 안해봄 ㅎㅎㅎ teaming 인가가 버그가 있어서 guitui 에서는 안되고 cli에서 만 된 적도 있엇다. )

 

[root@vlan1 ~]# nmcli connection add con-name vlan2000 ifname vlan2000-if type vlan dev ens9 id 2000

연결 ‘vlan2000’ (6fabe0ee-34bf-4c6a-8bfe-6e27e68d82cb)이 성공적으로 추가되었습니다.

### vlan1 server 에서 vlan device 를 생성한다. Con-name 이나 ifname 은 생략해도 된다. 생략 할경우 알아서 vlan id 에 맞게 만들어진다. 위는 vlan id 2000 으로 하여 만들었다.

[root@vlan1 ~]# nmcli con mod vlan2000 ipv4.addresses 20.0.0.20/24 ipv4.method manual ipv4.never-default yes connection.autoconnect yes

### ip 설정은 일반설정과 동일하게 하면된다. 위에서는 dns 설정을 하지 않았다.

 

[root@vlan2 ~]# nmcli con add con-name vlan2000-2 ifname vlan2000-2if type vlan dev ens9 id 2000

연결 ‘vlan2000-2’ (afec4f3e-2882-4099-8fa6-395d34dc4eef)이 성공적으로 추가되었습니다.

[root@vlan2 ~]# nmcli con mod vlan2000-2 ipv4.addresses 20.0.0.22/24 ipv4.never-default yes ipv4.method manual connection.autoconnect yes

### vlan2 server 에서도 동일한 vlan id interface 를 설정 해준다.

 

[root@vlan1 ~]# nmcli con up vlan2000

[root@vlan2 ~]# nmcli con up vlan2000-2

### 각각의 server 에서 vlan interface up 상태로 만들어 주고…

[root@vlan1 ~]# ping 20.0.0.22 -c 1

PING 20.0.0.22 (20.0.0.22) 56(84) bytes of data.

64 bytes from 20.0.0.22: icmp_seq=1 ttl=64 time=2.30 ms

 

— 20.0.0.22 ping statistics —

1 packets transmitted, 1 received, 0% packet loss, time 0ms

rtt min/avg/max/mdev = 2.308/2.308/2.308/0.000 ms

### server vlan1 에서 server vlan2 ping을 보냈는데 잘 간다. ㅎㅎ 이제 id를 바꿔서 한번 test를 해보자.

 

[root@vlan2 ~]# nmcli con mod vlan2000-2 vlan.id 4000

[root@vlan2 ~]# nmcli con down vlan2000-2

Connection ‘vlan2000-2’ successfully deactivated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/11)

[root@vlan2 ~]# nmcli con up vlan2000-2

연결이 성공적으로 활성화되었습니다 (D-Bus 활성 경로: /org/freedesktop/NetworkManager/ActiveConnection/12)

[root@vlan1 ~]# !pi

ping 20.0.0.22 -c 1

PING 20.0.0.22 (20.0.0.22) 56(84) bytes of data.

 

— 20.0.0.22 ping statistics —

1 packets transmitted, 0 received, 100% packet loss, time 0ms

### vlan1 에서 vlan2 로 똑같이 ping 을 보냈는데 가지 않는것을 확인 할 수 있다.

 

조금 응용해서 다른 test 도 해보았다.

server : vlan1

ip address : 30.0.0.30/24

vlan id : 2003

 

server : vlan2

ip address : 30.0.0.31/24

vlan id : 2003

 

server : vlan3

ip address : 30.0.0.31/24

vlan id : 2001

 

이렇게 준비 해서 vlan이 다른 동일 ip를 지정 가능한지를 알아 보았다.

 

[root@vlan1 ~]# ping 30.0.0.31 -c 1

PING 30.0.0.31 (30.0.0.31) 56(84) bytes of data.

64 bytes from 30.0.0.31: icmp_seq=1 ttl=64 time=0.919 ms

 

— 30.0.0.31 ping statistics —

1 packets transmitted, 1 received, 0% packet loss, time 0ms

rtt min/avg/max/mdev = 0.919/0.919/0.919/0.000 ms

### 30.0.0.31, vlan id 2003 으로 핑을 보낸다.

[root@vlan2 ~]# !tcp

tcpdump -i any icmp

tcpdump: verbose output suppressed, use -v or -vv for full protocol decode

listening on any, link-type LINUX_SLL (Linux cooked), capture size 65535 bytes

09:24:10.911595 ethertype IPv4, IP 30.0.0.30 > vlan2.test.dom: ICMP echo request, id 4622, seq 1, length 64

09:24:10.911595 IP 30.0.0.30 > vlan2.test.dom: ICMP echo request, id 4622, seq 1, length 64

09:24:10.911742 IP vlan2.test.dom > 30.0.0.30: ICMP echo reply, id 4622, seq 1, length 64

09:24:10.911747 ethertype IPv4, IP vlan2.test.dom > 30.0.0.30: ICMP echo reply, id 4622, seq 1, length 64

### vlan id 가 같은 server vlan2 가 핑을 받는것을 알 수 있다.

[root@vlan1 ~]# nmcli con mod vlan2001 vlan.id 2001

[root@vlan1 ~]# nmcli con down vlan2001

Connection ‘vlan2001’ successfully deactivated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/25)

[root@vlan1 ~]# nmcli con up vlan2001

연결이 성공적으로 활성화되었습니다 (D-Bus 활성 경로: /org/freedesktop/NetworkManager/ActiveConnection/30)

[root@vlan1 ~]#

### server vlan1 vlan id 2003에서 2001 로 바꾸었다.

[root@vlan1 ~]# !pi

ping 30.0.0.31 -c 1

PING 30.0.0.31 (30.0.0.31) 56(84) bytes of data.

64 bytes from 30.0.0.31: icmp_seq=1 ttl=64 time=4.60 ms

 

— 30.0.0.31 ping statistics —

1 packets transmitted, 1 received, 0% packet loss, time 0ms

rtt min/avg/max/mdev = 4.606/4.606/4.606/0.000 ms

### server vlan1 에서 30.0.0.31 로 핑을 보낸다.

[root@vlan3 yum.repos.d]# tcpdump -i any icmp

tcpdump: verbose output suppressed, use -v or -vv for full protocol decode

listening on any, link-type LINUX_SLL (Linux cooked), capture size 65535 bytes

09:29:16.139382 ethertype IPv4, IP 30.0.0.30 > vlan3.test.dom: ICMP echo request, id 5010, seq 1, length 64

09:29:16.139382 IP 30.0.0.30 > vlan3.test.dom: ICMP echo request, id 5010, seq 1, length 64

09:29:16.139608 IP vlan3.test.dom > 30.0.0.30: ICMP echo reply, id 5010, seq 1, length 64

09:29:16.139615 ethertype IPv4, IP vlan3.test.dom > 30.0.0.30: ICMP echo reply, id 5010, seq 1, length 64

### 이번엔 server vlan3 이 핑을 받는것을 알 수 있다.

vlan 만 다르면 같은 ip를 지정해도 아무 문제가 없이 통신이 잘 되는것을 알 수있다.

 

vxlan 은 다음 이시간에