ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 企业环境下如何把ubuntu的dhcp改为静态IP

企业环境下如何把ubuntu的dhcp改为静态IP

Linux操作系统 作者:安全剑客 时间:2019-06-02 10:50:09 0 删除 编辑
静态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

然后重启即可


来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/31559985/viewspace-2646505/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: 编译安装zabbix
请登录后发表评论 登录
全部评论

注册时间:2018-11-01

  • 博文量
    1407
  • 访问量
    1398051