VMware下Linux網路卡由eth0變為eth1的解決辦法
在VMware下,克隆了一個虛擬機器,開啟克隆後的虛擬機器,發現網路卡識別符號從eth0開始
[root@localhost ~]# ifconfig
eth1 Link encap:Ethernet HWaddr 00:0C:29:81:7A:A7
inet addr:192.168.1.10 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe81:7aa7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:13 errors:0 dropped:0 overruns:0 frame:0
TX packets:17 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:855 (855.0 b) TX bytes:973 (973.0 b)
eth2 Link encap:Ethernet HWaddr 00:0C:29:81:7A:B1
inet addr:192.168.10.10 Bcast:192.168.10.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe81:7ab1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3 errors:0 dropped:0 overruns:0 frame:0
TX packets:17 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:255 (255.0 b) TX bytes:973 (973.0 b)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:836 errors:0 dropped:0 overruns:0 frame:0
TX packets:836 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:70294 (68.6 KiB) TX bytes:70294 (68.6 KiB)
開啟udev檔案
[root@localhost ~]# vim /etc/udev/rules.d/70-persistent-net.rules
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.
# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:81:7a:b1", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:81:7a:a7", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:81:7a:a7", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"
刪除裡面的網路卡配置,重啟系統,即可恢復正常
[root@localhost ~]# vim /etc/udev/rules.d/70-persistent-net.rules
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.
[root@localhost ~]# reboot
重啟後,網路卡配置恢復正常
[root@localhost ~]# ifconfig
eth1 Link encap:Ethernet HWaddr 00:0C:29:81:7A:A7
inet addr:192.168.1.10 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe81:7aa7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:13 errors:0 dropped:0 overruns:0 frame:0
TX packets:17 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:855 (855.0 b) TX bytes:973 (973.0 b)
eth2 Link encap:Ethernet HWaddr 00:0C:29:81:7A:B1
inet addr:192.168.10.10 Bcast:192.168.10.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe81:7ab1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3 errors:0 dropped:0 overruns:0 frame:0
TX packets:17 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:255 (255.0 b) TX bytes:973 (973.0 b)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:836 errors:0 dropped:0 overruns:0 frame:0
TX packets:836 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:70294 (68.6 KiB) TX bytes:70294 (68.6 KiB)
[root@localhost ~]# ifconfig
eth1 Link encap:Ethernet HWaddr 00:0C:29:81:7A:A7
inet addr:192.168.1.10 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe81:7aa7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:13 errors:0 dropped:0 overruns:0 frame:0
TX packets:17 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:855 (855.0 b) TX bytes:973 (973.0 b)
eth2 Link encap:Ethernet HWaddr 00:0C:29:81:7A:B1
inet addr:192.168.10.10 Bcast:192.168.10.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe81:7ab1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3 errors:0 dropped:0 overruns:0 frame:0
TX packets:17 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:255 (255.0 b) TX bytes:973 (973.0 b)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:836 errors:0 dropped:0 overruns:0 frame:0
TX packets:836 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:70294 (68.6 KiB) TX bytes:70294 (68.6 KiB)
[root@localhost ~]# vim /etc/udev/rules.d/70-persistent-net.rules
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.
# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:81:7a:b1", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:81:7a:a7", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:81:7a:a7", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"
刪除裡面的網路卡配置,重啟系統,即可恢復正常
[root@localhost ~]# vim /etc/udev/rules.d/70-persistent-net.rules
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.
[root@localhost ~]# reboot
重啟後,網路卡配置恢復正常
[root@localhost ~]# ifconfig
eth1 Link encap:Ethernet HWaddr 00:0C:29:81:7A:A7
inet addr:192.168.1.10 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe81:7aa7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:13 errors:0 dropped:0 overruns:0 frame:0
TX packets:17 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:855 (855.0 b) TX bytes:973 (973.0 b)
eth2 Link encap:Ethernet HWaddr 00:0C:29:81:7A:B1
inet addr:192.168.10.10 Bcast:192.168.10.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe81:7ab1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3 errors:0 dropped:0 overruns:0 frame:0
TX packets:17 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:255 (255.0 b) TX bytes:973 (973.0 b)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:836 errors:0 dropped:0 overruns:0 frame:0
TX packets:836 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:70294 (68.6 KiB) TX bytes:70294 (68.6 KiB)
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26506993/viewspace-2124449/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 虛擬機器複製後網路卡eth0變成了eth1的解決辦法虛擬機
- vmware下solaris 10網路卡不能正常配置的解決辦法
- Linux 6.3 網路卡 not active 解決辦法Linux
- linux as4網路卡不能啟動的解決辦法Linux
- 網路卡常見故障及解決辦法
- Linux下檢視網路卡設定 ethtool eth0Linux
- 新建的linux虛擬機器找不到eth0解決辦法Linux虛擬機
- win7下Vmware server的vmware host agent無法啟動的解決辦法Win7Server
- centos7網路卡啟動不了的解決辦法CentOS
- centos7的網路卡名修改為eth0CentOS
- linux mint19 無線網路卡wifi速度慢解決辦法LinuxWiFi
- Linux案例01:eth0網路卡異常Linux
- 如果修改VMware下的網路卡MAC地址Mac
- 網路卡故障導致區域網網路故障原因與解決辦法
- Linux下flash player無法全屏看影片的解決辦法!Linux
- Linux 6.4 網路卡 not active 解決Linux
- vmware不顯示usb圖示解決辦法
- CentOS7網路卡命名修改為eth0格式CentOS
- Easyconnect登入提示:拉起虛擬網路卡失敗 解決辦法
- linux伺服器下pptp搭建vpn代理上網很慢的解決辦法Linux伺服器pptp
- vmware中新增網路卡後無法識別
- Linux系統下ssh登陸很慢的解決辦法Linux
- Linux下rpm包相互依賴的解決辦法Linux
- Linux下安裝oracle,遇到錯誤的解決辦法LinuxOracle
- VMware虛擬機器設定固定IP後不能上網的解決辦法虛擬機
- Vmware vSphere常見問題及解決辦法
- VMware 啟動報錯 "Failed to lock the file"解決辦法AI
- Linux Mint下Qt Creator無法輸入中文解決辦法LinuxQT
- Linux系統下無法解除安裝掛載的解決辦法Linux
- vmware虛擬機器執行卡慢的解決辦法虛擬機
- 安裝VMware出現“Error 1406”的解決辦法Error
- vmware虛擬網路卡驅動無法安裝
- 關於vmware下網路卡型別的個人認識型別
- VirtualBox Linux下無法上網的解決方法Linux
- Vue 下 ESLint 的 error 解決辦法VueEsLintError
- 調變解調器已刪除的解決辦法
- VMware下CentOS6.4網路卡設定為橋接模式靜態IP配置方法詳解CentOS橋接模式
- macw教程:word和excel突然變為黑色介面的解決辦法MacExcel