zoukankan      html  css  js  c++  java
  • Linux网络故障排查

    1. 排查硬件网卡故障
      ethtool ethN
    ~ ethtool enp0s31f6 
    Settings for enp0s31f6:
    	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
    	Advertised link modes:  10baseT/Half 10baseT/Full 
    	                        100baseT/Half 100baseT/Full 
    	                        1000baseT/Full 
    	Advertised pause frame use: No
    	Advertised auto-negotiation: Yes
    	Speed: 100Mb/s
    	Duplex: Full
    	Port: Twisted Pair
    	PHYAD: 1
    	Transceiver: internal
    	Auto-negotiation: on
    	MDI-X: on (auto)
    Cannot get wake-on-lan settings: Operation not permitted
    	Current message level: 0x00000007 (7)
    			       drv probe link
    	Link detected: yes
    
    1. ip addr 查看网卡ip
    ~ ip addr
    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: enp0s31f6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
        link/ether c8:5b:76:3b:c4:43 brd ff:ff:ff:ff:ff:ff
        inet 192.168.60.26/22 brd 192.168.63.255 scope global noprefixroute enp0s31f6
           valid_lft forever preferred_lft forever
        inet6 fe80::4cf0:1171:7df0:df88/64 scope link noprefixroute 
           valid_lft forever preferred_lft forever
    
    1. 网关设置
     ~ route -n
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    0.0.0.0         192.168.60.1    0.0.0.0         UG    0      0        0 enp0s31f6
    172.17.0.0      0.0.0.0         255.255.0.0     U     0      0        0 docker0
    192.168.0.0     192.168.60.1    255.255.0.0     UG    0      0        0 enp0s31f6
    192.168.56.0    0.0.0.0         255.255.255.0   U     0      0        0 vboxnet0
    192.168.60.0    0.0.0.0         255.255.252.0   U     100    0        0 enp0s31f6
    
    1. DNS状况(dig,nslookup)
    ~ nslookup baidu.com
    Server:		192.168.0.186
    Address:	192.168.0.186#53
    
    Non-authoritative answer:
    Name:	baidu.com
    Address: 39.156.69.79
    Name:	baidu.com
    Address: 220.181.38.148
    
    1. 网络排查
    traceroute www.cnblogs.com
    traceroute to www.cnblogs.com (118.31.180.41), 30 hops max, 60 byte packets
     1  192.168.60.1 (192.168.60.1)  5.486 ms  5.965 ms  6.591 ms
     2  * * *
     3  * * *
     4  * * *
     5  * * *
     6  * * *
     7  * * *
     8  * * *
     9  * * *
    10  * * *
    11  * * *
    12  * * *
    13  * * *
    14  * * *
    15  * * *
    16  * * *
    17  * * *
    18  * * *
    19  * * *
    20  * * *
    21  * * *
    22  * * *
    23  * * *
    24  * * *
    25  * * *
    26  * * *
    27  * * *
    28  * * *
    29  * * *
    30  * * *
    
    1. 端口是否开放
    # telnet 220.181.111.188 80
    Trying 220.181.111.188...
    Connected to 220.181.111.188.
    Escape character is '^]'.
    

    Linux系统排查4——网络篇

  • 相关阅读:
    有关线程与进程的参考资料
    [Notes] 各种数据源配置
    [Notes] 显卡更新后docker nvidia-runtime不可用
    [Tips] numpy diff
    [Tips] vs code ssh remote情况下如何选者python
    RSA算法之学习
    湖南大学推荐书《社会学大纲》阅读有感 其一
    解决某些应用程序阻止了IDM集成到浏览器中的问题
    Oracle实现判断功能三种方式总结
    JS实现数字每三位加逗号
  • 原文地址:https://www.cnblogs.com/jiftle/p/13300550.html
Copyright © 2011-2022 走看看