配置linux ip

来源:互联网 发布:c语言运算符优先级规律 编辑:程序博客网 时间:2024/05/19 04:26

配置ip:

动态ip:

ubuntu系统下的配置文件位置 /etc/network/interface

其他Linux的ip配置文件可能位于/etc/sysconfig/network-script/ifcfg-eth0

     ifcase eth0 inet dhcp


静态ip:

      ifcase eth0 inet static

     address 192.168.1.1

     netmask 255.255.255.0

     broadcast 192.168.1.255

     gateway 192.168.1.1


配置DNS:

     nameserver 210.41.192.22
     nameserver 202.98.96.68


重启网络:

service network restart

原创粉丝点击