网络问题排查思路
网络模型
- 这是我们的网络知识框架
数据传输路径
- 这是知识框架中串联的线
排查问题路径-自下而上
链路层
- 网线是否正常
]# ethtool ens33
Settings for ens33:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: No
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
MDI-X: off (auto)
Supports Wake-on: d
Wake-on: d
Current message level: 0x00000007 (7)
drv probe link
Link detected: yes
- 网卡状态
]# ip a s
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:0c:29:23:a7:0a brd ff:ff:ff:ff:ff:ff
inet 192.168.74.130/24 brd 192.168.74.255 scope global secondary noprefixroute ens33
valid_lft forever preferred_lft forever
inet6 fe80::ae29:4ab5:ecb8:118d/64 scope link noprefixroute
valid_lft forever preferred_lft forever
网络层
- IP|NETMASK|GATEWAY
]# vim /etc/sysconfig/network-scripts/ifcfg-ens33
TYPE=Ethernet
BOOTPROTO=static
NAME=ens33
UUID=bd385c8f-3c98-4afd-acc9-bc78f744bf16
DEVICE=ens33
ONBOOT=yes
IPADDR=192.168.74.130
NETMASK=255.255.255.0
GATEWAY=192.168.74.2
传输层
- 服务端口
- ss
- netstat
- nmap
- telnet
应用层
- 应用状态
- ps
- systemctl
- log日志
防火墙
本文只是简单介绍了下网络的排查思路和涉及到的命令,命令详细的解决请点击各自链接查看
有些链接尚未可用,因为还没整理处理....