求助!Ubuntu15.10 server 版怎么设定固定ip地址

Web、Mail、Ftp、DNS、Proxy、VPN、Samba、LDAP 等基础网络服务
回复
默ljh
帖子: 2
注册时间: 2016-03-14 10:26
系统: ubuntu15.10

求助!Ubuntu15.10 server 版怎么设定固定ip地址

#1

帖子 默ljh » 2016-03-14 10:30

想在仅主机模式下设定固定ip。已修改interfaces 文件,但是重启网卡后不能获得配置的ip地址,求助
附件
截图
截图
截图
截图
头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

Re: 求助!Ubuntu15.10 server 版怎么设定固定ip地址

#2

帖子 vickycq » 2016-03-14 11:02

代码: 全选

# ifdown eth0
# ifup eth0
看看有何输出

是虚拟机?大致说明你的硬件网络环境
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
默ljh
帖子: 2
注册时间: 2016-03-14 10:26
系统: ubuntu15.10

Re: 求助!Ubuntu15.10 server 版怎么设定固定ip地址

#3

帖子 默ljh » 2016-03-14 23:12

vickycq 写了:

代码: 全选

# ifdown eth0
# ifup eth0
看看有何输出

是虚拟机?大致说明你的硬件网络环境
虚拟机。改了interfaces 文件后,这两个命令用不了了,说读取不了interfaces这个文件
用ifconfig eth0 就没问题
huoke
帖子: 5
注册时间: 2015-04-20 21:40
系统: ubuntu14.04

Re: 求助!Ubuntu15.10 server 版怎么设定固定ip地址

#4

帖子 huoke » 2016-07-07 10:23

onboot yes

来自我的 SM-G5109 上的 Tapatalk
DaveJoey
帖子: 1
注册时间: 2016-07-09 14:42
系统: UbuntuServer

Re: 求助!Ubuntu15.10 server 版怎么设定固定ip地址

#5

帖子 DaveJoey » 2016-07-09 14:59

修改二个文件:
/etc/network/interfaces
auto eth0
iface eth0 inet static
address x.x.x.x
netmask x.x.x.x
gateway x.x.x.x
/etc/resolvconf/resolv.conf.d/base
nameserver 114.114.114.114
再重启一下即可
sudo reboot
manami5
帖子: 116
注册时间: 2016-06-21 13:16

Re: 求助!Ubuntu15.10 server 版怎么设定固定ip地址

#6

帖子 manami5 » 2016-07-27 0:44

man interfaces查看幫助
manami5
帖子: 116
注册时间: 2016-06-21 13:16

Re: 求助!Ubuntu15.10 server 版怎么设定固定ip地址

#7

帖子 manami5 » 2016-09-07 9:41

如果有nmtui命令,直接进入nmtui修改网络连接就好了。
不然就得修改interfaces和resolv.conf文件。
回复