首页 > 系统服务 > 详细

【转】Ubuntu网卡配置

时间:2016-04-19 14:02:01      阅读:258      评论:0      收藏:0      [点我收藏+]

一、网卡地址配置
Ubuntu的网络配置文件是:/etc/network/interfaces
1、以DHCP 方式配置网卡
   auto eth0
   iface eth0 inet dhcp
用sudo /etc/init.d/networking restart命令使网络设置生效

2、为网卡配置静态IP地址
sudo vi /etc/network/interfaces
auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1
sudo /etc/init.d/networking restart

3、设定第二个IP地址(虚拟IP地址)
sudo vi /etc/network/interfaces
auto eth0:1
iface eth0:1 inet static
address 192.168.1.101
netmask 255.255.0
gateway 192.168.1.1
sudo /etc/init.d/networking restart

4、设置主机名称(hostname)
使用下面的命令来查看当前主机的主机名称:
  sudo /bin/hostname
使用下面的命令来设置当前的主机名称:
  sudo /bin/hostname newname

5、配置DNS
   (1) /etc/hosts中加入一些主机名称和这些主机名称对应的IP地址,这是本机的静态查询
   (2) /etc/resolv.conf 
       nameserver *.*.*.*

 

 

原文地址:http://blog.chinaunix.net/uid-656828-id-3098797.html

【转】Ubuntu网卡配置

原文:http://www.cnblogs.com/GaZeon/p/5407723.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!