Debian 修改IP地址

kidking2010發表於2011-08-25

昨天遇到同事修改一個debian  linux的網路地址

注意以下步驟:

修改主機的IP

配置檔案為:

 vi /etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet static
        address 192.168.6.100
        netmask 255.255.255.0
        network 192.168.6.0
        broadcast 192.168.6.255
        gateway 192.168.6.1
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 202.96.128.86

修改DNS和(RedHat)CentOS是一樣的

vi  /etc/resolv.conf

nameserver 202.96.128.86

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/23141985/viewspace-705803/,如需轉載,請註明出處,否則將追究法律責任。

相關文章