dimabagow

Network in Debian

This historical example uses ifupdown and a static IPv4 address. It applies only when that interface is managed by ifupdown; do not disable other network managers indiscriminately. Bringing an interface down disconnects an SSH session using it, so make changes from a local console or with a recovery route. /etc/resolv.conf may be generated by a resolver service. Use real DNS addresses instead of the documentation placeholders below. The machine hostname belongs in /etc/hostname or the system's hostname configuration, not in an inet static stanza. Comments in /etc/network/interfaces must be on separate lines.

Article for those using Debian Linux on the desktop.
Use ifupdown only for interfaces assigned to it; the following steps configure that setup through files and the terminal.
First, you need to know what you want to configure. You should have your provider or network settings in front of you. After placing your settings in front of you, type ifconfig in the terminal. This command will show the current state of your network hardware and settings. Next, before editing our settings, type sudo ifdown eth0 (your network interface name might differ) - this disables the network card interface.
Now let's edit the files. In the terminal type:
sudo kate /etc/resolv.conf - You might use a text editor other than kate, if so substitute its name. This opens the DNS settings file. In the file write:
# Write your provider's DNS.
nameserver 192.0.2.53
# Alternative DNS.
nameserver 192.0.2.54
Now similarly enter network settings:
sudo kate /etc/network/interfaces
In the file write the same, but with your parameters:
auto lo
# Do not touch this if you don't know what it is.
iface lo inet loopback
auto eth0
iface eth0 inet static
# Put your IP here.
address 192.168.0.3
# Subnet mask here.
netmask 255.255.255.0
# Broadcast address for this example subnet.
broadcast 192.168.0.255
# Write your network hostname here.
# hostname: bagow
# Put provider gateway here.
gateway 192.168.0.1
Now bring up the interface - sudo ifup eth0
sudo /etc/init.d/networking restart - and restart the network.
If you entered the correct parameters, everything should work. Now test connection via browser or via command: ping bagow.ru
That is how simply network is configured in Debian.