7 ways to look at network connections on Linux

Uncategorized

Whether you’re handling a network at work or simply keeping an eye out for your home systems, it is very important to understand your network connections– how you communicate with public systems and those on the local network. This article covers some of the most important commands readily available on Linux to help you get a clear understanding of your regional network and how it reaches outside.While the links

provided include essential tips on using network commands, some consist of commands that have actually been deprecated in favor of newer commands. A few of the most important commands to know today include ip a, ip neigh, ping, tracepath, dig, tcpdump and whois. (If a command is

deprecated, it doesn’t indicate it does not work or isn’t offered. It indicates that the command has been replaced with a newer command that serves the very same function and is most likely better supported.)

ip a

The ip a command will provide info on your network interface. This includes your designated IP address (even if appointed immediately) and the loopback address that is utilized when the system requires to communicate with itself, the benefit being that it stays stable where the designated IP address might not constantly be the same.The ip a command has actually largely changed the deprecated ifconfig command. It offers the same range of information, but in a different format. The output listed below programs the loopback(lo) address (127.0.0.1) and the system’s assigned (enp0s25) address (192.168.0.7).

$ ip a 1: lo: 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 permanently preferred_lft forever inet6::1/ 128 scope host valid_lft permanently preferred_lft forever 2: enp0s25: mtu 1500 qdisc fq_codel state UP group default qlen 1000 link/ether 00:1 d:09:77:9 d:08 brd ff: ff: ff: ff: ff: ff inet 192.168.0.7/ 24 brd 192.168.0.255 scope international dynamic noprefixroute enp0s25 valid_lft 74857sec preferred_lft 74857sec inet6 fe80:: bb32:464 a:77 a3: acd7/64 scope link noprefixroute valid_lft permanently preferred_lft permanently

The ip link command offers comparable info, however less of it.

$ ip link 1: lo: mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: enp0s25: mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000 link/ether 00:1 d:09:77:9 d:08 brd ff: ff: ff: ff: ff: ff

ip neigh

$ arp -a _ entrance (192.168.0.1) at 1c:64:99: ec: b1:97 [ether] on enp0s25? (192.168.0.6) at b0: c0:90:3 f:10:15 [ether] on enp0s25? (192.168.0.4) at 74: e2:0 c: da:27:53 [ether] on enp0s25? (192.168.0.18) at cc:3 d:82:39:78:85 [ether] on enp0s25? (192.168.0.22) at on enp0s25 $ ip neigh 192.168.0.1 dev enp0s25 lladdr 1c:64:99: ec: b1:97 STALE 192.168.0.6 dev enp0s25 lladdr b0: c0:90:3 f:10:15 REACHABLE 192.168.0.4 dev enp0s25 lladdr 74: e2:0 c: da:27:53 REACHABLE 192.168.0.18 dev enp0s25 lladdr cc:3 d:82:39:78:85 REACHABLE 192.168.0.22 dev enp0s25 FAILED fe80::1 e64:99 ff: feec: b197 dev enp0s25 lladdr 1c:64:99: ec: b1:97 router STALE

The ip neigh command can provide much more information about systems on your network including MAC address, and it supports removing IP addresses from your arp table.ping The ping

command continues to be really helpful by sending out packages to another system to gather an action that shows that the system is up and reachable.

$ ping www.networkworld.com PING idg.map.fastly.net (146.75.30.165) 56( 84) bytes of information. 64 bytes from 146.75.30.165 (146.75.30.165): icmp_seq=1 ttl=57 time=49.2 ms 64 bytes from 146.75.30.165 (146.75.30.165): icmp_seq=2 ttl=57 time=32.4 ms 64 bytes from 146.75.30.165 (146.75.30.165): icmp_seq=3 ttl=57 time=125 ms 64 bytes from 146.75.30.165 (146.75.30.165): icmp_seq=4 ttl=57 time=75.9 ms– idg.map.fastly.net ping statistics– 4 packets transmitted, 4 got, 0% package loss, time 3000ms rtt min/avg/max/ mdev = 32.388/ 70.534/ 124.680/ 34.892 ms

tracepath

The tracepath command follows …

Source

Leave a Reply

Your email address will not be published. Required fields are marked *