博主介绍:
计算机科班人,全栈工程师,掌握C、C#、Java、Python、Android等主流编程语言,同时也熟练掌握mysql、oracle、sqlserver等主流数据库,能够为大家提供全方位的技术支持和交流。
具有丰富的项目经验和开发技能。提供相关的学习资料、程序开发、技术解答、代码讲解、文档报告等专业服务。
之前VMware安装的虚拟机,ip 是192.168.157.142,正常的时候如下
[root@localhost ~]# ifconfig
eno16777736: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.157.142 netmask 255.255.255.0 broadcast 192.168.157.255
inet6 fe80::20c:29ff:fe21:73d5 prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:21:73:d5 txqueuelen 1000 (Ethernet)
RX packets 2582620 bytes 3563744716 (3.3 GiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 308014 bytes 31467889 (30.0 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 277188 bytes 77287232 (73.7 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 277188 bytes 77287232 (73.7 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
ether 52:54:00:08:79:f5 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
最近打开发现ip突然没了,
[root@localhost ~]# ifconfig
eno16777736: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 00:0c:29:21:73:d5 txqueuelen 1000 (Ethernet)
RX packets 2697684 bytes 3699693648 (3.4 GiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 328615 bytes 33548119 (31.9 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 510384 bytes 128345501 (122.3 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 510384 bytes 128345501 (122.3 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
ether 52:54:00:08:79:f5 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
首先去确认你的网卡配置是否正确,如果没问题,那大概率就是我遇到的这种情况,如下:
确认以下服务,启动即可。
大家点赞、收藏、关注、评论啦!
更多技术干货,请持续关注程序员大佬超。
原创不易,转载请务必注明出处。