红联首页 凝聚Linux人的力量
菜鸟过关 | 精华文档 | 同城人(交友) | 我与Linux的故事 | Linux新闻 | Linux视频 | Linux人才 | 软件下载 | 大学校园 | English
发新话题
打印

debian的网络配置

debian的网络配置

1、ip的配置
编辑interfaces文件
路径: /etc/network/interfaces

命令行输入:vim /etc/network/interfaces

得到如下内容
# The primary network interface
allow-hotplug eth0
#iface eth0 inet dhcp                动态dhcp分配IP(用#注释掉了)
iface eth0 inet static                  静态IP
        address 192.168.0.201        IP地址
        netmask 255.255.255.0        子网掩码
        network 192.168.0.0           网段
        broadcast 192.168.0.255      广播地址
        gateway 192.168.0.1           网关
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 192.168.0.1 DNSF服务器地址
        dns-search localhost

重启网络服务:
/etc/init.d/networking restart

TOP

发新话题