LINUX安装好后无法访问网络
LINUX安装好后无法访问网络
在虚拟机安装好新的LINUX系统后,ping www.baidu.com ,发现无法ping通。
键入ifconfig查询配置:
|
eno16777728: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 |
|
ether 00:0c:29:3e:ad:2d txqueuelen 1000 (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 |
|
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 942 bytes 79580 (77.7 KiB) |
|
RX errors 0 dropped 0 overruns 0 frame 0 |
|
TX packets 942 bytes 79580 (77.7 KiB) |
|
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 |
得到本机的网卡是eno16777728
然后,重启网卡服务:service network restart
再次查询:ifconfig,发现依旧如上所示,并且无法访问网络。
修改网卡配置: root模式下vim /etc/sysconfig/network-scripts/ifcfg-eno16777728(最后的数字不一定一致,不要照搬,根据查询出来的配置信息灵活替换),然后将文件里最后一项的ONBOOT=no在插入模式中修改为yes并保存退出,以后计算机自动启动网卡。
现在手动启动网卡服务ifup eno16777736
重新键入ifconfig:
|
eno16777728: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 |
|
inet 192.168.81.134 netmask 255.255.255.0 broadcast 192.168.81.255 |
|
inet6 fe80::20c:29ff:fe3e:ad2d prefixlen 64 scopeid 0x20<link> |
|
ether 00:0c:29:3e:ad:2d txqueuelen 1000 (Ethernet) |
|
RX packets 125 bytes 14963 (14.6 KiB) |
|
RX errors 0 dropped 0 overruns 0 frame 0 |
|
TX packets 147 bytes 15265 (14.9 KiB) |
|
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 946 bytes 80000 (78.1 KiB) |
|
RX errors 0 dropped 0 overruns 0 frame 0 |
|
TX packets 946 bytes 80000 (78.1 KiB) |
|
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 |
问题解决,网卡服务成功启动,并且后续不需要每次都手动启动网卡服务
本文参照:http://114193107.blog.51cto.com/3025337/1676433
LINUX安装好后无法访问网络的更多相关文章
- Linux安装Tomcat外部不能访问
Linux安装Tomcat后本地可以正常访问,可是这时Tomcat还不能被外界访问需要在Linux默认防护墙上打开8080端口 打开 /etc/sysconfig/iptables [root@loc ...
- linux安装mysql后root无法登录 sql 无法登录
linux安装mysql后root无法登录 问题:[root@localhost mysql]# mysql -u root -pEnter password: ERROR 1045 (28000): ...
- linux安装MySQL后输入mysql显示 ERROR 2002 (HY000): Can't connect to local MySQL server through socket
我是小白,大佬勿喷 *** linux安装MySQL后输入mysql显示 ERROR 2002 (HY000): Can't connect to local MySQL server through ...
- linux安装tomcat后启动报错Cannot find ./catalina.sh的解决方法
linux安装tomcat后启动报错: Cannot find ./catalina.shThe file is absent or does not have execute permissionT ...
- widows10 安装1803 版本后不能访问网络上的机器解决方法
安装Windows10 1803 版本后,发现网络上的机器好多不见了. 使用 ping 可以ping 通,但是访问网络共享提示下面错误. 这个原因是1803 中没有安装 SMB1.0 协议.因为 S ...
- linux tomcat启动后无法访问
先是按网上资料先下载安装包,然后上传到linux,启动后发现8080端口并未被占用.查了很多资料,不知道神马原因了.最后用yum安装后就可以访问了. 教程如下: 本教程介绍在CentOS 7服务器上使 ...
- linux安装vsftpd后无法登陆
安装完成后在主机上登陆时,不管是输入用户,还是匿名都无法登陆 经过检查,发现是因为/etc/hosts.deny禁止了所有ip访问 将hosts.deny中的all:all删除,或者在/etc/hos ...
- 关于阿里云服务器Linux安装Tomcat后,外网不能访问解决方案
这里需要提及三个方面的问题 第一个方面:Linux上启动防火墙的问题 当下比较流行的Linux镜像是CentOS,所以防火墙也随之变成了firewall,那么怎么操作这个防火墙呢? #停止fi ...
- 安装docker后,VMware网络无法访问了,VMware重置网络设置
1.vmware虚拟机处于关闭状态 2.vmware程序->edit(编辑)-->左下角 "Restore Default"恢复默认设置 [恢复]完成后 ...
随机推荐
- Machine learning preface
Machine learning Preface Definition T: Task E: Experience P: Performance Sequence: T -> E -> P ...
- Python 科学工具使用
Python 科学工具笔记 numpy a = numpy.array([1,2,3,4]);// 创建一个numpy的数组对象 此时a.shape显示的值为(4,); 由此得出结论在一维的数组中, ...
- Jersey初始化配置
一 实际项目配置 公司VIP平台因为业务的特殊性,对业务数据的操作.以及前后端解耦等要求,使用到了jersey框架.同时使用到了spring框架. 二 jersey初始化 配置web项目配置文件web ...
- HDU 1281——棋盘游戏——————【最大匹配、枚举删点、邻接表方式】
棋盘游戏 Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status ...
- 一个position为fixed的div,宽高自适应,怎样让它水平垂直都在窗口居中?
.div{ position: fixed; left: %; top: %; -webkit-transform: translate(-%, -%); transform: translate(- ...
- 关于微信小程序登录授权
小程序的API接口文档写的很清晰,现在理一遍思路. 前端通过wx.login()获取code ,把code发给后台,后台返回openid,再获取用户的授权信息(这里先判断是否授权,授权过的就直接进入小 ...
- the wait queue
using System; using System.Collections.Concurrent; using System.Threading; namespace Base { public c ...
- hibernate课程 初探一对多映射2-6 测试-添加和查询学生信息
package com.ddwei.entity; import java.util.Set; import org.hibernate.Session; import org.hibernate.T ...
- Windows之CMD查看系统信息
Windows 系统通过命令行(CMD)查询系统信息有两种方式: 1.图形化界面: 在“运行”中键入CMD,然后输入 dxdiag,回车后弹出图形化界面 ------ DirectX 诊断工具. 2. ...
- Java Knowledge series 4
JVM & Bytecode Has-a or Is-a relationship(inheritance or composition) 如果想利用新类内部一个现有类的特性,而不想使用它的接 ...