dimabagow

Network in Debian

Article for those using Debian Linux on the desktop.
To configure the network, disable all GUI network configuration programs. It is much easier to do everything via 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 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:
nameserver 22.222.22.2 — Write your provider’s DNS.
nameserver 111.11.111.1 — Alternative DNS.
Now similarly enter network settings:
sudo kate /etc/network/interfaces
In the file write the same, but with your parameters:
auto lo
iface lo inet loopback — Do not touch this if you don’t know what it is.
auto eth0
iface eth0 inet static
address 192.168.0.03 — Put your IP here.
netmask 252.225.248.0 — Subnet mask here.
broadcast 255.255.255.255 — Broadcast, leave as is.
hostname bagow — Write your network hostname here.
gateway 112.13.137.123 — Put provider gateway here.
Now bring up the interface — sudo ifup eth0
sudo /etc/network/interfaces 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.