linux下網絡卡配置補充

2021-04-02 17:57:12 字數 844 閱讀 4710

redhat  9.0的網絡卡配置檔案可以位於以下三個位置。

/etc/sysconfig/network-scripts/ifcfg-eth0

/etc/sysconfig/networking/devices/ifcfg-eth0

/etc/sysconfig/networking/profiles/default/ifcfg-eth0

預設情況下只存在位於/etc/sysconfig/network-scripts/當中的配置檔案,其他兩個位置並沒有配置檔案。在使用/etc/init.d/network命令啟動網絡卡時直接讀取的也是這個目錄中的配置檔案。因此一般情況下只需要對該檔案進行修改便可以改動網絡卡的相關引數。

另外位於/etc/sysconfig/networking/profiles/default目錄中的配置檔案比較有意思,這個配置檔案單獨並不能起作用,只有當/etc/sysconfig/network-scripts/目錄中有配置檔案時~/default目錄中的檔案才會起作用。

目前看來/etc/sysconfig/network-scripts/目錄中必須得有ifcfg-eth0這個配置檔案,否則執行/etc/init.d/network命令時無法啟動網絡卡.

另外如果/etc/sysconfig/networking/profiles/default目錄中有配置檔案,那麼network-scripts目錄中的配置檔案將成為擺設,執行/etc/init.d/network命令時將從default目錄的配置檔案中讀取引數而不是從network-scripts目錄的配置檔案中讀取引數。

對於redhat  as4來說不存在上述問題,只是位於/etc/sysconfig/network-scripts/目錄中的配置檔案才會起作用

Linux 下網絡卡配置引數

在 linux 下如果想修改網絡卡的引數有很多種方法,第一種方法是修改 etc network inte ces 檔案,這種方法可以在重啟後依然有效 另外一種方法是使用 ifconfig 指令,這種方法只能臨時性的修改網絡卡引數,在重啟後會失效。第一種 修改 inte ces 檔案 inte ces...

Linux環境下網絡卡配置

device eth0 hwaddr 08 00 27 0d 3c f6 type ethernet uuid 73ff4482 1baf 4c9b b859 720ca92a704a onboot yes nm controlled yes bootproto static ipaddr 192....

Linux下網絡卡配置(重啟後仍然有效)

vi etc sysconfig network scripts ifcfg eth0 修改以下內容 device eth0 描述網絡卡對應的裝置別名,例如ifcfg eth0的檔案中它為eth0 bootproto static 設定網絡卡獲得ip地址的方式,可能的選項為static,dhcp或b...

linux下網絡卡配置的使用方法

使用環境為centos6.6版本 1 檢視網絡卡ip地址 ifconfig 網絡卡配置檔案 etc sysconfig network scripts ifcfg eth0 如果有多個網絡卡的話為eth1 eth2 如果linux有多個網絡卡,只想重啟某一個網絡卡使用命令 ifdown eth0 i...

linux下網絡卡相關檢視設定

查整機硬體資訊命令 dmesg 檢視網絡卡裝置相關 dmesg grep eth 檢視網絡卡eth0資訊 dmesg grep eth0 使用ethtool命令檢視指定網絡卡資訊 ethtool eth0 使用 mii tool命令檢視指定網絡卡情況 mii tool v eth1 為了使用lspc...