Table des matières

Network

Ubuntu 18.04: switch back to /etc/network/interfaces

Network

lshw -C network
WARNING: you should run this program as super-user.
  *-network                 
       description: Ethernet interface
       product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:03:00.0
       logical name: enp3s0
       version: 11
       serial: 40:16:7e:ad:77:93
       size: 10Mbit/s
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half firmware=rtl8168g-2_0.0.1 02/06/13 latency=0 link=no multicast=yes port=MII speed=10Mbit/s
       resources: irq:18 ioport:d000(size=256) memory:f7200000-f7200fff memory:f2100000-f2103fff
  *-network
       description: Wireless interface
       product: AR93xx Wireless Network Adapter
       vendor: Qualcomm Atheros
       physical id: 0
       bus info: pci@0000:06:00.0
       logical name: wlp6s0
       version: 01
       serial: e8:de:27:0b:93:42
       width: 64 bits
       clock: 33MHz
       capabilities: bus_master cap_list rom ethernet physical wireless
       configuration: broadcast=yes driver=ath9k driverversion=4.15.0-45-generic firmware=N/A ip=192.168.0.171 latency=0 link=yes multicast=yes wireless=IEEE 802.11
       resources: irq:19 memory:f7100000-f711ffff memory:f7120000-f712ffff
WARNING: output may be incomplete or inaccurate, you should run this program as super-user.

En plus court : inxi -Nn

Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet driver: r8169 
           IF: enp3s0 state: down mac: 40:16:7e:ad:77:93 
           Device-2: Qualcomm Atheros AR93xx Wireless Network Adapter driver: ath9k 
           IF: wlp6s0 state: up mac: e8:de:27:0b:93:42 

nmtui

nmtui permet de configurer le network manager en mode graphique.

network-manager

Redémarrage du network manager :

sudo service network-manager restart

Configurer l'interface

sudo gedit /etc/network/interfaces
# On doit avoir

auto lo
iface lo inet loopback
 

Redémarrer une interface réseau

Ne semble fonctionner que si l'interface est déclarée dans /etc/network/interfaces
sudo ifdown wlp6s0 && sudo ifup -v wlp6s0

Commandes de base

lspci -vvnn | grep -A 9 Network
ifconfig

cat /etc/network/interfaces
sudo iwlist scan
sudo /etc/init.d/networking restart
iwconfig
sudo dhclient wlan0
sudo iwconfig wlan0 <essid> <SSID>
ifconfig | grep HWaddr

ou :

ifconfig | grep ether

Ethernet

Affichage des connexions internet

ip a
sudo lshw -class network

DNS

Vérification du DNS

nmcli device show wlp6s0 | grep IP4.DNS
IP4.DNS[1]:                             192.168.0.254

Variante :

dig something.unknown  | grep SERVER:
;; SERVER: 192.168.0.254#53(192.168.0.254)

Variante :

nslookup null
Server:		192.168.0.254
Address:	192.168.0.254#53

** server can't find null: NXDOMAIN

Gérer le Wifi

sudo apt-get install rfkill

Lister l’activation du Wifi :

sudo rfkill list

ou

rfkill list all
0: phy0: Wireless LAN
	Soft blocked: no
	Hard blocked: no

Activer l’interface WiFi :

sudo rfkill unblock wifi

Désactiver l’interface WiFi :

sudo rfkill block wifi

Activer la carte WiFi :

sudo ifconfig wlp6s0 up

Liste des réseaux accessibles :

sudo iwlist wlp6s0 scan
sudo iwlist wlp6s0 scan | grep -E 'ESSID|Cell'
sudo iwlist wlp6s0 scan | grep 'ESSID\|Cell'

nmcli r wifi on

Gérer le Bluetooth

sudo apt-get install rfkill

Lister l’activation du Bluetooth :

sudo rfkill list

ou

rfkill list all
0: phy0: Wireless LAN
	Soft blocked: no
	Hard blocked: no
2: hci0: Bluetooth
	Soft blocked: no
	Hard blocked: no

Activer l’interface Bluetooth :

sudo rfkill unblock bluetooth

Désactiver l’interface Bluetooth :

sudo rfkill block bluetooth

Pour désactiver en permanence le Bluetooth:

sudo vi /etc/rc.local

rfkill block bluetooth
exit 0

Installer blueman (manager amélioré) pour gérer le Bluetooth:

sudo apt-get install blueman

Connexion de machines par câble RJ45 croisé

Connexion de machines par câble RJ45 croisé

Références

Ubuntu - Wifi