在新版本的Linux下, 已經包含了e1000e網卡的驅動, 因此驅動自己已經不在稱爲問題,但一個很奇怪的現象, 在於這個網卡在DHCP環境中, 沒法得到IP地址。但這個網卡採用static ip又是能夠工做的。
咱們能夠依次檢查以下
1, lspci能夠看到系統的網卡類型。
2,檢查lsmod或者kernel, 能夠發現相應的e1000e模塊已經安裝。
3,經過ifconfig能夠觀察到對應的網卡狀態/信息,除了沒有ip address,別的都起來了。
4,檢查dhcp的日誌信息
Feb 22 04:03:48 triceratops kernel: [24233.334381] e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX
Feb 22 04:03:48 triceratops kernel: [24233.334535] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Feb 22 04:03:48 triceratops dhcpcd[8091]: eth0: carrier acquired
Feb 22 04:03:48 triceratops dhcpcd[8091]: eth0: rebinding lease of 71.195.255.75
Feb 22 04:03:48 triceratops dhcpcd[8091]: eth0: acknowledged 71.195.255.75 from 68.87.66.21
Feb 22 04:03:48 triceratops dhcpcd[8091]: eth0: checking for 71.195.255.75
Feb 22 04:03:53 triceratops dhcpcd[8091]: eth0: leased 71.195.255.75 for 320676 seconds
Feb 22 04:03:53 triceratops kernel: [24238.491916] e1000e: eth0 changing MTU from 1500 to 576
Feb 22 04:03:53 triceratops dhcpcd: eth0: MTU set to 576
Feb 22 04:03:53 triceratops dhcpcd[8091]: eth0: carrier lost
Feb 22 04:03:53 triceratops dhcpcd: eth0: MTU restored to 1500
Feb 22 04:03:53 triceratops kernel: [24238.581934] e1000e: eth0 changing MTU from 576 to 1500
能夠觀察到DHCP服務器已經分發了對應的IP地址, 可是沒有被本地系統所接收。
問題到這裏, 就能夠很清楚了, 在於DHCP服務器和nic driver在協商MTU的時候,不能達成一致。致使IP地址分配失敗。這個問題多是
1) 上游的DHCP想設置MTU爲576. 也許是DHCP服務器的問題.
2) NIC的驅動有問題,在設置MTU時沒法bring link.
解決方案: 修改/etc/dhcpcd.conf, 將其中的option interface_mtu註釋掉。
強制dhcpcd忽略來自DHCP服務器的MTU設定就能夠了。
注: 之因此把這個問題寫出來, 是由於發現Intel e1000e的網卡驅動, 在不少Linux下,都存在這個問題,而這個問題經過從新編譯驅動並沒有法解決。
另外,該問題出現的幾個可能緣由
1, 在ESX中克隆出的虛擬機, 也有可能出現啓動時,找不到網卡的狀況, 一般這種狀況,是因爲eth0設備所裝載的配置與讀取默認配置的Mac地址不一致,致使加載網卡失敗。
最直接的作法:rm /etc/udev/rules.d/70-persistent-net.rules,重啓虛擬機,配置網絡,搞定。一切都讓udev本身來處理。
dhcpcd的安裝
emerge dhcpcd; rc-update add dhcpcd default
要確保系統已經安裝並運行了syslog
emerge syslog-ng
rc-update add syslog-ng default
network的配置
echo "config_eth0=dhcp" >> /etc/conf.d/net
Reference:
Linux* e1000e Base Driver overview and installation
http://www.intel.com/support/cn/mt/mt_win.htm服務器