interfaces

alan's 的頭像

etc/network/interfaces 是 Debian 系統中最為重要的網路設定檔案,許多網路介面的設定都是透過這個檔案。
詳細說明:ifupdown - DebianWiki

如果是 dhcp,可以寫成:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

上網設定範例:

$ sudo vi /etc/resolv.conf

nameserver 168.95.192.1
nameserver 168.95.1.1

$ sudo vi /etc/network/interfaces

# 開機時,自動啟用 localhost 及 eth1 這兩個網路設定
auto lo eth1

# 開機啟用: 「localhost」
iface lo inet loopback

# 使 eth0 這個網卡自動取得 IP
iface eth0 inet dhcp

# 使 eth1 使用固定 IP
iface eth1 inet static
#網址
address 163.26.108.129
#遮罩
netmask 255.255.255.128
#網段代表號
network 163.26.108.128
#廣播
broadcast 163.26.108.255
#路由器位置
gateway 163.26.108.254

restart your network:

$ sudo /etc/init.d/networking restart

詳細資訊:

  1. Linux 基礎研習 -- 使用B2D Server 版
  2. Debian 參考手冊 - 網路設定
  3. 搞定 Ubuntu 底下的網路設定 | MacBlog2
  4. 在Kubuntu 6.04 下使用無線網卡 Buffalo WLI-U2-KG54 | Rostin碎碎念
  5. Debian on My ThinkPad R40 (5) - 無線網路的設定 | mfhsieh's BLOG
  6. 手動安裝 第二張網卡 | 南投縣教育網路討論區

發表新回應

這個欄位的內容會保密,不會公開顯示。
  • 可使用的 HTML 標籤:<a> <em> <pre><strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd><img><h1><h2><h3>
  • 自動斷行和分段。

更多關於格式選項的資訊