4.Centos7网络故障排除思路

环境:虚拟机 VMware 10
系统:Centos7

相对应的工具

ping
CMD
ifconfig
ipconfig
vi

排除故障思路

1.先检查虚拟机使用的网络模式是NAT 还是桥接 是否启用网络连接。

4.Centos7网络故障排除思路

#:使用的桥接模式 设备状态也是连接的状态

2.检查Centos7和你所在的网络中 是否是同一网络

4.Centos7网络故障排除思路

#点击开始 输入CMD 回车 跳出DOS界面在输入ipconfig 查看网段的地址

[root@localhost ~]# ifconfig
eno16777736: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.168 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::20c:29ff:fe1f:2eab prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:1f:2e:ab txqueuelen 1000 (Ethernet)
RX packets 10243 bytes 12116300 (11.5 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 4059 bytes 378910 (370.0 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 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

[root@localhost ~]#

#:在Centos7输入ifconfig或者IP add 可以查看到IP地址 如果不是同一网段 只需把Centos7的网卡文件IP段进行修改就好。注一般都问题都出于此处,当修改完毕之后 网卡服务需要重新启动!!!

3.最后测试

先同网络对ping
在ping网关
在ping外网
如果三个测试都正常 证明网络正常

#:当然每人人遇到的问题都不一样,细心一点 都可以解决的。此问题比较简单!!!

转载于:https://blog.51cto.com/sdwaqw/2049717

[xin@localhost ~]$ sudo yum install jsoncpp-devel [sudo] xin 的密码: 已加载插件:fastestmirror, langpacks Loading mirror speeds from cached hostfile Could not retrieve mirrorlist http://mirrorlist.centos.org?arch=x86_64&release=7&repo=sclo-rh error was 14: curl#6 - "Could not resolve host: mirrorlist.centos.org; 未知的错误" One of the configured repositories failed (未知), and yum doesn't have enough cached data to continue. At this point the only safe thing yum can do is fail. There are a few ways to work "fix" this: 1. Contact the upstream for the repository and get them to fix the problem. 2. Reconfigure the baseurl/etc. for the repository, to point to a working upstream. This is most often useful if you are using a newer distribution release than is supported by the repository (and the packages for the previous distribution release still work). 3. Run the command with the repository temporarily disabled yum --disablerepo=<repoid> ... 4. Disable the repository permanently, so yum won't use it by default. Yum will then just ignore the repository until you permanently enable it again or use --enablerepo for temporary usage: yum-config-manager --disable <repoid> or subscription-manager repos --disable=<repoid> 5. Configure the failing repository to be skipped, if it is unavailable. Note that yum will try to contact the repo. when it runs most commands, so will have to try and fail each time (and thus. yum will be be much slower). If it is a very temporary problem though, this is often a nice compromise: yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true Cannot find a valid baseurl for repo: centos-sclo-rh/x86_64
最新发布
06-12
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值