网络诊断:
注:检查一下主机服务,是否VMware服务被禁掉。。。。。。。
1. 链接之前,检查网卡是否被系统捕获
[root@test2 test]# dmesg | grep -in eth
[root@test2 test]# lspci | grep -in ethernet
若是捕获不到,则需考虑驱动模块是否匹配
[root@test2 test]# lsmod | grep e1000
[root@test2 test]# modinfo e1000
2. 测试链接
[root@test2 test]# nmcli conn mod ens38 ipv4.addresses 192.168.10.200
[root@test2 test]# ifconfig ens38 192.168.10.200
3. 网络环境测试
注:检查防火墙
测试局域网,用mtr追踪
#追踪网关
[root@test2 test]# mtr 192.168.10.2
4. 测试公网
注:检查dns配置,服务器等
[root@test2 test]# ping 223.5.5.5
[root@test2 test]# ping www.baidu.com
#可以用nslookup查看
[root@test2 test]# yum install bind-utils
[root@test2 test]# nslookup
> 223.5.5.5
5.5.5.223.in-addr.arpa name = public1.alidns.com.
Authoritative answers can be found from:
> www.baidu.com
Server: 223.5.5.5
Address: 223.5.5.5#53
Non-authoritative answer:
www.baidu.com canonical name = www.a.shifen.com.
Name: www.a.shifen.com
Address: 14.215.177.39
Name: www.a.shifen.com
Address: 14.215.177.38
[root@test2 test]# yum provides traceroute
[root@test2 test]# traceroute 192.168.10.2
[root@test2 test]# traceroute www.baidu.com
相关问题
1. 硬件问题
检查网卡,网线是否正常
2. 软件问题
检查IP配置是否有问题:子网掩码,网卡驱动程序等
检查路由及协议
3. 其它问题,一些端口被防火墙拦截,或者应用程序本身有问题
网络诊断工具
ping
-c :发送包的个数
-t ttl值:经过一次路由其值减1,默认255. #若此值为0,则数据不能反回
-M do :数据包不分割
-M done:默认值,包可以分割
-s 数据长度
-W 等待时间,等待时间超过指定值会自动退出
MTU值的调整
本地MTU < 网络MTU值
数据包太大,在网络传输时由于本地MTU值的限制,数据包会频繁的分割,降低传输效率,浪费系统资源
本地MTU > 网络MTU值
网络的性能没有充分发挥,网络资源浪费
使用场景:
出局域网的场景不会进行调整
一般调整局域网,若传输文件都是小文件,可以相对调小
------------------------------------------------------------------------------------------------------- 返回目录