现在的位置: 首页 > 综合 > 正文

debian 设置静态IP

2013年10月07日 ⁄ 综合 ⁄ 共 513字 ⁄ 字号 评论关闭

vi /etc/netword/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.1.107
        netmask 255.255.255.0
        network 192.168.1.0
        broadcast 192.168.1.255
        gateway 192.168.1.1
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 192.168.1.1

然后重启网络:

$ /etc/init.d/networking restart

抱歉!评论已关闭.