Files
gitea-pages/admin-guide/troubleshooting/network.md
2024-08-07 16:19:36 +02:00

2.4 KiB

Network

Test hostname resolution with getent, for example getent hosts www.psi.ch. Unlike nslookup or dig, it uses the system resolver.

The systems IP addresses and routes can be displayed using ip:

[root@lx ~]# ip address
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    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: ens160: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:50:56:9d:6d:03 brd ff:ff:ff:ff:ff:ff
    inet 10.129.160.195/24 brd 10.129.160.255 scope global ens160
        valid_lft forever preferred_lft forever
    inet6 fe80::250:56ff:fe9d:6d03/64 scope link 
        valid_lft forever preferred_lft forever


[root@lx ~]# ip route
default via 10.129.160.1 dev ens160
10.129.160.0/24 dev ens160 proto kernel scope link src 10.129.160.195 
169.254.0.0/16 dev ens160 scope link metric 1002    

The link status and other information of an interface can be displayed using ethtool:

  1. Link status:
[root@lx ~]# ethtool ens160
Settings for ens160:
    [...]
    Speed: 10000Mb/s
    Duplex: Full
    [...]
    Link detected: yes
  1. Statistics (driver-specific, but look for errors/discards/dropped)::
[root@lx ~]# ethtool -S ens160
NIC statistics:
        Tx Queue#: 0
        TSO pkts tx: 21529
        TSO bytes tx: 91036062
        ucast pkts tx: 1036632
        ucast bytes tx: 235421707
        mcast pkts tx: 8
        mcast bytes tx: 648
        bcast pkts tx: 7
        bcast bytes tx: 294
        pkts tx err: 0
        pkts tx discard: 0
        drv dropped tx total: 0
            too many frags: 0
            giant hdr: 0
            hdr err: 0
            tso: 0
        ring full: 0
        pkts linearized: 0
        hdr cloned: 0
        giant hdr: 0
        Rx Queue#: 0
        LRO pkts rx: 6913
        LRO byte rx: 100534073
        ucast pkts rx: 551554
        ucast bytes rx: 161369441
        mcast pkts rx: 4
        mcast bytes rx: 344
        bcast pkts rx: 753276
        bcast bytes rx: 45787629
        pkts rx OOB: 0
        pkts rx err: 0
        drv dropped rx total: 0
            err: 0
            fcs: 0
        rx buf alloc fail: 0
        tx timeout count: 0