User Tools

Site Tools


doc:appunti:linux:sa:etc_network_interfaces

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
doc:appunti:linux:sa:etc_network_interfaces [2012/06/06 10:06] – [/etc/network/interfaces] niccolodoc:appunti:linux:sa:etc_network_interfaces [2019/01/20 20:27] – [WiFi interfaces with WPA] niccolo
Line 1: Line 1:
 ====== /etc/network/interfaces ====== ====== /etc/network/interfaces ======
  
-The manpage for this Debian configuration file is **''man 5 interfaces''**, see also **''man wireless''** and **''/usr/share/doc/wireless-tools/README.Debian''**. For ''resolvconf'' options (''dns-nameservers'', etc.) see also **''man resolvconf''**. +The reference documents for this Debian configuration file are:
  
 +  * **''man 5 interfaces''**
 +  * **''man wireless''**
 +  * **''man resolvconf''** for ''resolvconf'' options (''dns-nameservers'', etc.)
 +  * **''/usr/share/doc/wireless-tools/README.Debian''**
 +  * **''/usr/share/doc/wpasupplicant/README.Debian.gz''** for wpa- options
 ===== Examples ===== ===== Examples =====
  
Line 9: Line 14:
 See this two pages: [[http://wiki.debian.org/WPA#wpa_supplicant_in_Debian_6.0_.28Squeeze.29|wpa_supplicant in Debian 6.0]] and [[http://wiki.debian.org/WiFi/HowToUse#wpasupplicant|How To Use wpasupplicant]]. See this two pages: [[http://wiki.debian.org/WPA#wpa_supplicant_in_Debian_6.0_.28Squeeze.29|wpa_supplicant in Debian 6.0]] and [[http://wiki.debian.org/WiFi/HowToUse#wpasupplicant|How To Use wpasupplicant]].
  
-With this configuration the WiFi connection will be not managed by NetworkManager:+**Automatic IP address and WPA security** (credential can be in the same file, or in ''wpa_supplicant.conf'': 
 + 
 +<file> 
 +allow-hotplug wlan0 
 +iface wlan0 inet dhcp 
 +    #wpa-ssid MyESSID 
 +    #wpa-psk MyWPASecret 
 +    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf 
 +</file> 
 + 
 +**Static IP address with WPA security**; with this configuration the WiFi connection will be not managed by NetworkManager:
  
 <file> <file>
Line 18: Line 33:
         gateway 10.0.0.189         gateway 10.0.0.189
         dns-nameservers 62.48.51.6 151.99.125.2         dns-nameservers 62.48.51.6 151.99.125.2
-        wpa-ssid MyESSID +        #wpa-ssid MyESSID 
-        wpa-psk MyWPASecret+        #wpa-psk MyWPASecret 
 +        wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
 </file> </file>
  
-==== WiFi interfaces without encryption ====+**Static IP address, without encryption**:
  
 <file> <file>
Line 35: Line 51:
         wireless-key off         wireless-key off
 </file> </file>
 +
 +==== Static address, not managed by NetworkManager ====
 +
 +Debian (9 Stretch) installs the **network-manager** package, which handles the configuration of Ethernet interface automatically, via DHCP. If you want to manually configure the interface, just put this in **/etc/network/interfaces** configuration file:
 +
 +<file>
 +allow-hotplug enp2s0
 +iface enp2s0 inet static
 +        address 10.0.1.2
 +        netmask 255.255.255.0
 +        gateway 10.0.1.252
 +        dns-nameservers 144.76.67.15 8.8.8.8
 +</file>
 +
 +You need the **resolvconf** package to make the //dns-nameservers// option working. That option adds the **nameserver** line into the **/etc/resolv.conf** file at boot time.
doc/appunti/linux/sa/etc_network_interfaces.txt · Last modified: 2023/03/17 11:53 by niccolo