↑ Top
Kaai24
dev studios
| Sign in | DE EN

Networking basics

in Linux


If you want do something with networking in Linux you should know these basics.

Show your current config:

ip a

1: lo:  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: enp0s18:  mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 62:66:37:62:66:30 brd ff:ff:ff:ff:ff:ff
    inet 192.168.178.110/24 brd 192.168.178.255 scope global enp0s18
       valid_lft forever preferred_lft forever
    inet6 fe80::7d81:f0b2:7edc:b8fb/64 scope link 
       valid_lft forever preferred_lft forever

nmcli device show enp0s18

GENERAL.DEVICE:                         enp0s18
GENERAL.TYPE:                           ethernet
GENERAL.HWADDR:                         62:66:37:62:66:30
GENERAL.MTU:                            1500
GENERAL.STATE:                          100 (connected)
GENERAL.CONNECTION:                     Wired connection 2
GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/ActiveConnection/1
WIRED-PROPERTIES.CARRIER:               on
IP4.ADDRESS[1]:                         192.168.178.110/24
IP4.GATEWAY:                            192.168.178.4
IP4.DNS[1]:                             37.120.167.17
IP4.DNS[2]:                             1.1.1.1
IP4.DOMAIN[1]:                          localdomain
IP6.ADDRESS[1]:                         fe80::7d81:f0b2:7edc:b8fb/64
IP6.GATEWAY:

Additionally you can find all network related stats like speed, mtu,... in /sys/classes/net/

(Edited 07-08-19)

Comments