Debian網路設定

 

Debian 網路設定,可用

1.NetworkManager

安裝 #apt-get install networkmanager

2.手動設定

修改 #vim /etc/network/interfaces

 

網路設定範例

/etc/network/interfaces 有哪些參數可以設定? 下面把常用的都列出來.

  • DHCP (自動取得 IP)

    auto eth0
    iface eth0 inet dhcp

  • Static IP (固定/靜態 IP)

    iface eth0 inet static
    address 192.168.0.7
    netmask 255.255.255.0
    gateway 192.168.0.254

  • PPPoE

    auto dsl-provider
    iface dsl-provider inet ppp
    pre-up /sbin/ifconfig eth0 up # line maintained by pppoeconf
    provider dsl-provider

    auto eth0
    iface eth0 inet manual

  • 更多設定

    auto eth0
    iface eth0 inet static
    address 192.168.1.2
    netmask 255.255.255.0
    gateway 192.168.1.254
    network 192.168.1.0
    broadcast 192.168.1.255
    gateway 192.168.1.254
    # dns-* options are implemented by the resolvconf package, if installed
    dns-nameservers 168.95.1.1 168.95.192.1 8.8.8.8 8.8.4.4
    dns-search longwin.com.tw

    auto eth0
    iface eth0:0 inet static
    address 192.168.1.41
    netmask 255.255.255.0
    broadcast 192.168.1.255

除此之外, 還想要做些進階設定, 例如下述:

相關網頁

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *