본문 바로가기

STUDY

VMWare 중첩구조 Network Bridged 오류 해결, Promiscuous Mode

VM을 Network Bridged로 중첩 설치했을 때 안쪽 VM에서 외부 통신이 안되는 문제

 

구조도

+--------------+     +-------------+     +---------------+     +------------+
|   Internet   |-----|   Gateway   |-----|   L3 Switch   |-----|   Server   |
+--------------+     +-------------+     +---------------+     +------------+
                      172.16.10.254                             172.16.10.98
+---------------------------------------------------------------------------------------+
|                                   VM A (172.16.10.126)                                |
| +-----------------------------------------------------------------------------------+ |
| |                                                                                   | |
| |                                                                                   | |
| |                                                                                   | |
| |                                                                                   | |
| |                                                                                   | |
| |                                                                                   | |
| |                                                                                   | |
| |                                 VM B (172.16.10.127)                              | |
| |                                                                                   | |
| |                                                                                   | |
| |                                                                                   | |
| |                                                                                   | |
| |                                                                                   | |
| |                                                                                   | |
| +-----------------------------------------------------------------------------------+ |
|                                                                                       |
+---------------------------------------------------------------------------------------+
|                                 Server (172.16.10.98)                                 |
+---------------------------------------------------------------------------------------+

 

구조

Internet - Gateway (DHCP Server) - L3 Switch - Server: VM A: VM B 중복된 VM 구조 네트워크 연결 Bridged

 

문제

VM B가 Gateway의 DHCP를 받는데 Server에 ping이 가지 않음

 

환경

Gateway 172.16.10.254, DHCP Server Server 172.16.10.98, Ubuntu 20.04 VM A 172.16.10.126, Ubuntu 20.04, Bridged로 연결됨, Workstation Pro 17 VM B 172.16.10.127, Ubuntu 16.04, Bridged로 연결됨, Workstation Pro 17

 

출력 에러

The virtual machine’s operating system has attempted to enable promiscuous mode on adapter ‘Ethernet0’. This is not allowed for security reasons.

 

상태

VM B는 VM A에만 ping이 가고 Server, Gateway에 ping이 가지 않음

 

원인

VM A의 ens33에 Promiscuous 모드가 적용되지 않아서 브로드캐스트의 DHCP Discover와 유니캐스트의 DHCP Offer는 VMware 예외로 받고 나머지 패킷은 전부 버리기 때문

 

근본 원인

root가 아닌 일반 사용자로 VM을 생성하고 사용할 때 /dev/vmnet0 (default VM bridged interface)의 읽고 쓰기가 제한돼서 VM A의 ens33의 Promiscuous 모드가 적용되지 않음. VM의 Network Adapater의 Bridged 아래에 Enable replicate… 옵션으로 Promiscuous 모드를 활성화해도 실패함

 

sudo ls -l /dev/vmnet0 → crw-rw-rw- 1 root root <filesize> <time> /dev/vmnet0

sudo ls -l /dev/vmnet1 → crw------- 1 root root <filesize> <time> /dev/vmnet1

 

해결법

Server에서 sudo chmod a+rw /dev/vmnet0 명령어 실행 후 VM A, B 재실행

권한을 다시 되돌리려면 Server에서 sudo chmod go-rw /dev/vmnet0

 

Promiscuous Mode

원래 NIC은 자기 MAC 주소로 향하는 패킷 외에는 전부 drop하지만 Promiscuous Mode에서는 모든 패킷을 수신한다.

주로 네트워크 분석이나 스니핑에 쓰인다.

대체제로써 VM A를 라우터로 사용한다면 Bridged 구조가 깨진다.

참조

Using virtual ethernet adapters in pomiscuous mode on a Linux host

 

Using virtual ethernet adapters in pomiscuous mode on a Linux host

--> Using virtual ethernet adapters in pomiscuous mode on a Linux host book Article ID: 315331 calendar_today Updated On: Feedback Subscribe Products VMware Desktop Hypervisor Show More Show Less Issue/Introduction How do you set your Virtual Ethernet Adap

knowledge.broadcom.com

Enable promiscuous mode error in VMWare Workstation - YouTube