Mainos / Advertisement:

Linux network configuration

Kohteesta Taisto
Versio hetkellä 29. heinäkuuta 2015 kello 08.53 – tehnyt Frans (keskustelu | muokkaukset) (Ak: Uusi sivu: This command shows you the current interfaces and network configuration.)
Siirry navigaatioon Siirry hakuun
Muut kielet:
English • ‎suomi

Interfaces

Debian's network configurations can be found from this file:

nano /etc/network/interfaces

Example of static IP-address configuration:

auto lo
iface lo inet loopback
auto eth0 
iface eth0 inet static
       address ...
       netmask ...
       gateway ...
  • address = IP address, for example 192.168.1.22
  • netmask = Subnet mask, for example 255.255.255.0
  • gateway = Default gateway, for example 192.168.1.1

Example DHCP configuration:

auto lo
iface lo inet loopback
auto eth0 
iface eth0 inet dhcp

Once you have altered the configurations you must restart the networking service for the changes to take effect.

service networking restart

ifconfig

 ifconfig

This command shows you the current interfaces and network configuration.

Mainos / Advertisement: