vmware red hat 5.3系統複製後網卡配置

來源:互聯網
上載者:User

標籤:vmware red hat5.3 虛擬機器copy

linux虛擬機器在vmware workstation 上複製後,網卡使用手工配置後總是從net8上自動獲得地址,無法完成自己配置的地址

[[email protected] ~]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0C:29:5C:5C:4A 
          inet addr:192.168.83.134  Bcast:192.168.83.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:84 errors:0 dropped:0 overruns:0 frame:0
          TX packets:69 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:9911 (9.6 KiB)  TX bytes:7415 (7.2 KiB)
          Interrupt:177 Base address:0x1400

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:1725 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1725 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:98764 (96.4 KiB)  TX bytes:98764 (96.4 KiB)

[[email protected] ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]
DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
HWADDR=00:0c:29:5c:5c:4a
IPADDR=192.168.83.11
NETMASK=255.255.255.0
GATEWAY=192.168.83.1

將網卡目錄下備份的所有網卡裝置名稱eth0修改

[[email protected] ~]# cd /etc/sysconfig/network-scripts/
[[email protected] network-scripts]# ls
ifcfg-eth0       ifdown-isdn    ifup-eth    ifup-routes
ifcfg-eth0.bak   ifdown-post    ifup-ippp   ifup-sit
ifcfg-eth0.bak2  ifdown-ppp     ifup-ipsec  ifup-sl
ifcfg-lo         ifdown-routes  ifup-ipv6   ifup-tunnel
ifdown           ifdown-sit     ifup-ipx    ifup-wireless
ifdown-bnep      ifdown-sl      ifup-isdn   init.ipv6-global
ifdown-eth       ifdown-tunnel  ifup-plip   net.hotplug
ifdown-ippp      ifup           ifup-plusb  network-functions
ifdown-ipsec     ifup-aliases   ifup-post   network-functions-ipv6
ifdown-ipv6      ifup-bnep      ifup-ppp
[[email protected] network-scripts]# vi ifcfg-eth0.bak

# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]
DEVICE=eth00
BOOTPROTO=static
HWADDR=00:0C:29:23:CA:C5
ONBOOT=yes
IPADDR=192.168.204.10
NETMASK=255.255.255.0
GATEWAY=192.168.204.1

修改後的效果

[[email protected] ~]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0C:29:5C:5C:4A 
          inet addr:192.168.83.11  Bcast:192.168.83.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:437 errors:0 dropped:0 overruns:0 frame:0
          TX packets:330 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:41000 (40.0 KiB)  TX bytes:43033 (42.0 KiB)
          Interrupt:177 Base address:0x1400

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:2101 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2101 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:120432 (117.6 KiB)  TX bytes:120432 (117.6 KiB)

 

原理:linux下裝置udev採用動態管理和UUID號有關係

網上有人修改

 vi /etc/modprobe.conf 

也有人修改

rm -f /etc/udev/rules.d/70-persistent-net.rules 

也有人先刪除網卡,再添加網卡解決問題

 

但是5.3遇到的情況是

[[email protected] rules.d]# ls
05-udev-early.rules  51-hotplug.rules  60-pcmcia.rules      90-alsa.rules  95-pam-console.rules
40-multipath.rules   60-net.rules      60-raw.rules         90-dm.rules    98-kexec.rules
50-udev.rules        60-net.rules.bak  85-pcscd_ccid.rules  90-hal.rules   bluetooth.rules

沒有70-persistent-net.rules 這個檔案,最後想到是備份網卡修改裝置名稱解決問題。圖形化介面可以在網卡管理裡,刪除copy產生的網卡,重啟網路服務即可。

 

希望對大家有協助

本文出自 “測試” 部落格,請務必保留此出處http://33205687.blog.51cto.com/6173537/1621130

vmware red hat 5.3系統複製後網卡配置

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.