debian的网络配置

来源:百度文库 编辑:神马文学网 时间:2024/06/07 16:35:02
debian的网络配置2008年06月22日 星期日 14:291、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