Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> 電腦軟體教學 >> 系統工具

VMware 虛擬機中修改 Linux MAC 位址三大方法:rc.local、vmx 設定檔、網路腳本

編輯:系統工具

方法一:修改 rc.local(最直接)

編輯 Linux 內 /etc/rc.local,新增 MAC 設定指令,重開機生效。

方法二:修改 .vmx 設定檔(最推薦,等同重燒實體網卡 ROM)

關機後編輯虛擬機 .vmx 檔,兩種情況:

靜態 MAC

ethernet0.addressType = "static"
ethernet0.address = "00:50:56:0A:0B:0C"

啟動時若詢問 UUID,選 "KeepAlways"。

自動產生 MAC

ethernet0.addressType = "generated"
uuid.location = "56 4d dc f1 ff aa 75 ea-f1 b9 ee 0d 68 9c 65 5c"
uuid.bios = "56 4d ed 23 13 8c 96 91-7c 68 b2 09 8b aa bb cc"
ethernet0.generatedAddress = "00:0c:29:aa:bb:cc"

修改 uuid.bios 後六位與 ethernet0.generatedAddress 後六位為同一值,MAC 以 00:0c:29 開頭。

方法三:修改網路腳本

vi /etc/sysconfig/network-scripts/ifcfg-eth0
MACADDR=xx:xx:xx:xx:xx:xx
:wq 存檔離開
reboot 重開機

三種方法任選其一,皆可在 VMware 中修改 Linux 客體 MAC 位址。

Copyright © Windows教程網 All Rights Reserved