灯火互联
管理员
管理员
  • 注册日期2011-07-27
  • 发帖数41778
  • QQ
  • 火币41290枚
  • 粉丝1086
  • 关注100
  • 终身成就奖
  • 最爱沙发
  • 忠实会员
  • 灌水天才奖
  • 贴图大师奖
  • 原创先锋奖
  • 特殊贡献奖
  • 宣传大使奖
  • 优秀斑竹奖
  • 社区明星
阅读:2471回复:0

ubuntu网络配置

楼主#
更多 发布于:2012-12-20 16:11

ubuntu网络配置
 
 
 
一、dhcp自动获取IP
 
编辑/etc/network/interfaces


auto lo                                       # 开机自动激lo接口
 
ifacelo inet loopback                        # 配置lo接口为环回口
 
# The primarynetwork interface (配置主网络接口)
 
autoeth0                                     #开机自动激活eth0接口
 
iface eth0 inetdhcp                         #配置eth0接口为DHCP自动获取
 
重启网络:
 
 
 
sudo /etc/init.d/networkingrestart
 
二、配置静态IP
 
编辑/etc/network/interfaces
 
 
 
#The loopback network interface(配置环回口)
 
  autolo                                       # 开机自动激lo接口
 
  iface lo inetloopback                        # 配置lo接口为环回口
 
  # The primary networkinterface (配置主网络接口)
 
  auto eth0                                    #开机自动激活eth0接口
 
  iface eth0 inet static                       #配置eth0接口为静态设置IP地址
 
  address 10.16.3.99
 
  netmask255.255.255.0
 
  gateway 10.16.3.1
 
重启网络:
 


喜欢0 评分0
游客

返回顶部