debian設定一網絡卡多IP時的錯誤

2021-06-19 17:37:05 字數 656 閱讀 2545

如果/etc/network目錄有ifstate檔案,則修改內容,否則新建內容,如下:

lo=lo

eth0=eth0

eth0:1=eth0:1

修改inte***ces檔案內容,如下:

auto lo

iface lo inet loopback

auto eth0

iface eth0 inet static

address ***.***.***.***

netmask ***.***.***.***

gateway ***.***.***.***

auto eth0:1

iface eth0:1 inet static

address ***.***.***.***

netmask ***.***.***.***

gateway ***.***.***.***

***.***.***.***為你自己的ip,掩碼和閘道器

執行/etc/init.d/networking restart時提示reconfiguring network inte***ces...rtnetlink answers: file exists

這是因為你機器的網絡卡正被你ssh或其它程序占用,將機器reboot(重啟)一下,就ok了:)

LINUX一網絡卡多IP設定

方法1 少量ip手動繫結 這裡以繫結ip到eth0為例,其它網絡卡的話修改相應的檔名即可 1.複製ifcfg eth0的網絡卡配置檔案並改名為ifcfg eth0 0 root akinlau cp etc sysconfig network scripts ifcfg eth0 etc sysco...

CentOS6網絡卡靜態IP設定

centos網絡卡配置原始檔如下 device eth0 hwaddr 00 0c 29 a8 67 46 type ethernet uuid 4103d7a8 d073 4e93 ac68 e6f8496f35f0 onboot no nm controlled yes bootproto dh...

Linux網路管理(一) 網絡卡驅動與Linux核心

下圖簡單描述了網絡卡驅動與linux核心之間的聯絡 關於上圖的一些說明 系統初始化 1.協議模組呼叫 dev add pack 來註冊協議處理函式到鍊錶 ptype base 2.init br init 用於初始化橋接相關的操作 3.init net dev init 初始化了兩個軟中斷 網絡卡驅...