Gentoo64無法啟動eth0的問題

2022-02-21 17:35:19 字數 1355 閱讀 5515

gentoo64在net檔案中配置好eth0的靜態ip

** 1.2: /etc/conf.d/net檔案的乙個示例

# dhcp

config_eth0=( "dhcp" )

# 使用cidr形式表示的靜態ip

config_eth0=( "192.168.0.7/24" )

routes_eth0=( "default via 192.168.0.1" )

# 使用netmask形式表示的靜態ip

config_eth0=( "192.168.0.7 netmask 255.255.255.0" )

routes_eth0=( "default via 192.168.0.1" )

配置之後,ifconfig eth0 up選項失敗,無法啟動eth0,出現找不到eth0裝置。

在/sys/class/net找不到eth0裝置。

原因:虛擬機器在之前有乙個mac位址,拷貝之後又有了乙個mac位址,造成mac位址衝突,eth0所對應的mac位址是無效位址。

解決辦法:

[root@localhost ~]# vi /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 0x1022:0x2000 (pcnet32) (custom name provided by external tool)

# subsystem=="net", action=="add", drivers=="?*", attr=="00:0c:29:50:52:46", attr=="1", kernel=="eth*", name="eth0"

# pci device 0x1022:0x2000 (pcnet32)

subsystem=="net", action=="add", drivers=="?*", attr=="00:0c:29:46:6f:cd", attr=="1", kernel=="eth*", name="eth1"

將後邊有正確mac位址的eth1改為eth0就行了。

上述是個人在配置gentoo64時候遇到的問題,gentoo64的詳細配置見:

VMware虛擬機器啟動報錯,無法執行64位操作

一 確保電腦cpu支援vt技術,主機板bios 設定要開啟vt。1 如果要主機板bios 設定要開啟vt。進入bios,通常可以按f2或者f12等,根據不同的廠家的情況區分。2 進入bios後的基本處置流程 1.選擇 configuration 再選擇intel virtual technology...

Oracle HttpServer 無法啟動的問題

錯誤 事件檢視器 fastcgiserver redefinition of a previously defined fastcgi server e oracle ora92 bin isqlplus syntax error on line 92 of e oracle ora92 sqlpl...

Rails console 無法啟動

leslin leslinubt workspace rorails leslincms rails console usr local ruby lib ruby gems 1.9.1 gems railties 3.0.8 lib rails script rails loader.rb 11 ...