Chinaunix首页 | 论坛 | 博客
  • 博客访问: 921477
  • 博文数量: 286
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 2874
  • 用 户 组: 普通用户
  • 注册时间: 2019-01-04 10:09
个人简介

Linux资讯分享

文章分类

全部博文(286)

文章存档

2019年(286)

我的朋友

分类: LINUX

2019-06-02 22:01:35

静态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

然后重启即可

阅读(1158) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~