vmware workstation複製linux後修改網卡為eth0方法

來源:互聯網
上載者:User

vmware workstation複製linux後修改網卡為eth0方法 情境:  vmware workstation 8, guest OS:CentOS 6.2. Host OS:windows 7  問題:  複製RHEL 6.3 後網卡名字有兩個eth0和eth1,實際起作用的是eth1,eth0是複製過來的。  由於複製後mac地址會重建一個,因此系統會在原來的eth0上以為加了一個網卡因此+1為eth1.  處理辦法。  方法一:  1.root登入,cp /etc/udev/rules.d/70-persistent-net.rules /etc/udev/rules.d/70-persistent-net.rules.bak  2. vi /etc/udev/rules.d/70-persistent-net.rules,刪除所有內容  3.reboot  4. vi /etc/udev/rules.d/70-persistent-net.rules,修改eth1為eth0,記錄下mac地址  5.點擊案頭system-perference-network connctions,刪除auto-eth0,修改system eth0名稱為eth0  6.vi /etc/sysconfig/network-scripts/ifcfg-eth0,修改其中的mac地址為步驟4中記錄的地址。  7.重啟,檢查配置  方法二:  1.root登入,cp /etc/udev/rules.d/70-persistent-net.rules /etc/udev/rules.d/70-persistent-net.rules.bak  2. vi /etc/udev/rules.d/70-persistent-net.rules,刪除eth0有關內容,修改eth1為eth0,  記錄下這個新eth0的mac地址  3.vi /etc/sysconfig/network-scripts/ifcfg-eth0,修改其中的mac地址為步驟2中記錄的地址。  4.重啟,檢查配置  另外: 虛擬機器的網路設定中選擇: Bridged: Connected directly to the physical network Replicate physical network connection state打上勾 這樣就可以跟物理機使用同一個網段的IP了 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.