美文网首页
ubuntu 修改dhcp 为静态ip

ubuntu 修改dhcp 为静态ip

作者: 繁华丶凋零 | 来源:发表于2019-01-09 10:41 被阅读0次

1.9更新

静态 ip 不能连接外网

##############################################
因为老的虚拟机有ubuntu桌面 以及一些磁盘的问题, 想 迁移 自己的虚拟机,
连带着 把ip 也迁移,(公司有些界面是 通过我的虚拟机ip访问的。)

编辑

root@ubuntu:/home/ubuntu# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address 168.192.10.72
netmask  255.255.255.0
gateway  168.192.0.1

然后重启即可

相关文章

网友评论

      本文标题:ubuntu 修改dhcp 为静态ip

      本文链接:https://www.haomeiwen.com/subject/txewrqtx.html