How to set up a network in Debian

Anonim

Setting up a network in Debian

Debian is a specific operating system. Most users, setting it, are experiencing a different kind of problem when working with it. The fact is that this OS needs to configure most of the components. The article will talk about how to configure the network in Debian.

According to the result, the configuration file should look like this:

Entering the parameters of a wired connection with a dynamic IP to the Debian configuration file

Only the name of the network interface can differ.

A wired connection with a dynamic address has just been configured. If you have a static IP address, then you need to configure the network otherwise:

  1. Open the configuration file in the Terminal:

    Sudo Nano / etc / Network / Interfaces

  2. Having retreated one line at the end, enter the text below, simultaneously introducing the necessary data to the appropriate places:

    AUTO [Network Interface Name]

    IFACE [Network Interface Name] INET STATIC

    Address [Address]

    NetMask [Address]

    Gateway [Address]

    DNS-NameServers [Address]

  3. Save the changes and exit the Nano editor.

Recall that the name of the network interface can be found by entering the "IP Address" command in the Terminal. If you do not know all other data, they can be found in the documentation from the provider or ask the operator from technical support.

According to the total of all actions, the wired network will be configured. In some cases, so that all changes take effect, you need to perform a special command:

Sudo SystemCTL RESTART NETWORKING

Or restart the computer.

Method 2: Network Manager

If you are inconvenient to use the terminal connection to configure the terminal connection or you are faced with difficulties when executing previously outlined instructions, you can use the special Network Manager program that has a graphical interface.

  1. Open the Network Manager settings window by pressing the Alt + F2 keys and entering this command to the corresponding field:

    NM-Connection-Editor

  2. Opening of the Network Manager window in Debian

  3. Click the "Add" button to add a new network connection.
  4. Adding a new connection button to Network Manager in Debian

  5. Determine the type of new connection as "Ethernet" by selecting the point of the same name from the list and clicking "Create ...".
  6. Select the type of connection in Network Manager in Debian

  7. In the new window that opens, enter the name of the connection.
  8. Entering a wired connection in Network Manager in Debian

  9. On the General tab, install the checkboxes at the first two items so that after starting the computer, all users can automatically connect.
  10. Tab common in Network Manager in Debian

  11. In the Ethernet tab, determine your network card (1) and select the method of cloning MAC address (2). Also in the Link Negotiation list, select the "ignore" (3) string. All remaining fields do not change.
  12. Ethernet tab in Network Manager in Debian

  13. Click the "IPv4" tab and select the setup method as "automatic (DHCP)." If the DNS server you receive not directly from the provider, select "Automatic (DHCP, only address)" and enter the DNS servers to the field of the same name.
  14. Configuring a wired connection with dynamic IP in Network Manager on the IPv4 parameters tab in Debian

  15. Click "Save".

After that, the connection will be installed. But in this way, you can only configure the dynamic IP, if the address address address, follow these steps:

  1. From the "Setup Method" list, select the "Manual" string.
  2. In the "Address" area, click the "Add" button.
  3. Alternately enter the address, network mask and gateway.

    Note: You can find out all the necessary information by contacting your provider.

  4. Specify the DNS servers in the field of the same name.
  5. Click "Save".
  6. Configuring a wired connection with static IP in Network Manager on the IPv4 parameters tab in Debian

Finishing the network will be installed. If you still do not open the sites in the browser, it is recommended to restart the computer.

Method 3: System utility "Network"

Some users may encounter a problem when running Network Manager. In this case, it is recommended to use the system utility that always works stably. You can open it in two ways:

  1. By clicking on the network indicator on the right side of the GNOME panel and selecting the "Wired Network Parameters" item.
  2. Login to the wired connection parameters through the top panel in Debian

  3. Entering the system parameters through the menu and clicking on the "Network" icon.
  4. Login to wired connection via the parameter window in Debian

Once the utility is open, to configure a wired connection, do the following:

  1. Turn the network switch to the active position.
  2. Turning on the connection in the Network window

  3. Click on the button with the image of the gear.
  4. Settings button in the Network window in Debian

  5. In a new window, open the category "Identification", specify the name of the new connection and select the MAC address from the list. Also here you can enable automatic connection to the computer network after starting the OS and make a connection available to all users by setting the check mark at the respective items.
  6. Tab Identification in the Network Settings window in Debian

  7. Go to the "IPv4" category and set all the switches to the actual position if the provider provides a dynamic IP address. If the DNS server needs to be entered manually, then deactivate the "DNS" switch and enter the server yourself.
  8. Setting up IPv4 with dynamic IP in the network Network in Debian

  9. Click "Apply".

With static IP, you must specify other settings in the IPv4 category:

  1. From the drop-down list "Address", select Manual.
  2. In the form that appears for filling, enter the address of the network, mask and gateway.
  3. Just below deactivate the "DNS" switch and enter its address to the appropriate field.

    Note: If necessary, you can click on the "+" button and specify additional DNS servers.

  4. Click "Apply".
  5. Configuring IPv4 with static IP in the network Network in Debian

Now you know how in the Debian operating system, configure a wired connection with static and dynamic IP. It remains only to choose a suitable way.

PPPoe

Unlike a wired connection, you can configure the PPPoE network to Debian in two ways: through the PPPOECONF utility and using the already known Network Manager program.

Method 1: PPPOECONF

The PPPOECONF utility is a simple tool with which you can in any operating system based on the Linux kernel, configure the connection via PPPoE. But unlike most distributions, in Debian, this utility is not pre-installed, respectively, it must be downloaded and installed first.

If you have the ability to configure an Internet connection on a computer by using an open access point, such as Wi-Fi, you need to execute this command to install PPPOECONF to install this command:

Sudo Apt Install PPPOECONF

If you cannot connect to Wi-Fi, you can not, then the utility must be preloaded on another device and place on the Flash drive.

Download PPPOECONF for 64-bit systems

Download PPPOECONF for 32-bit systems

PPPOECONF Utility Downloads page for Debian

After that, insert the USB flash drive and do the following:

  1. Copy the utility to the "Download" folder using the Nautilus standard file manager for this.
  2. Open the Terminal.
  3. Go to it to the directory where the file is located. In this case, you need to go to the "Downloads" folder. To do this, follow:

    CD / Home / UserName / Downloads

    Note: Instead of "UserName", you must specify the username that was specified when installing Debian.

  4. Sign up the PPPOECONF utility by running the command:

    Sudo Dpkg -i [Packagename] .deb

    Where, instead of "[PackageName], you need to specify the full file name.

Once the utility is installed in the system, you can go directly to the PPPoE network. For this:

  1. Run the installed utility by running in the Terminal:

    Sudo PppoConf.

  2. Wait for the scanning of devices.
  3. Device Scanning Window in the PPPOECONF Utility in Debian

  4. Determine the network interface from the list.

    Network device selection window in the PPPOECONF utility in Debian

    Note: If the network card is only one, the network interface is automatically determined and this step will be missed.

  5. Answer the approval - utility offers you the use of popular connection settings that are suitable for most users.
  6. Popular settings window in the Utility PPPOECONF in Debian

  7. Enter the login that has been issued by your provider and click OK.
  8. Enter the name of the user when setting up PPPOE connections in Debian

  9. Enter the password that has given you the provider and click OK.
  10. Password input when configuring PPPOE connections in Debian

  11. Answer in the affirmative if the DNS servers are automatically determined. Otherwise, select "No" and specify them yourself.
  12. Setting up DNS servers when configuring PPPoE connections using the PPPOECONF utility in Debian

  13. Allow the utility to limit the volume of MSS to 1452 bytes. This will exclude errors when opening some sites.
  14. MSS Setup Window in PPPOECONF Utility in Debian

  15. Select "Yes" so that the PPPoE connection is installed automatically each time the system starts.
  16. Configure automatic PPPoE network connection in the PPPoConf Utility window in Debian

  17. To establish a connection right now, answer "Yes."
  18. Connection Connection Window in the PPPOECONF Utility in Debian

If you chose the answer "Yes", the Internet connection must already be installed. Otherwise, to connect, you must enter the command:

Sudo Pon DSL-Provider

To turn off, perform:

Sudo POFF DSL-PROVIDER

On this instruction for setting up the PPPoE network using the PPPOECONF utility, it can be completed. But if you encountered some difficulties when it is fulfilled, then try using the second way.

Method 2: Network Manager

Using Network Manager, the PPPoe connection will take longer, but if you do not have the ability to download the PPPOECONF utility to your computer, then this is the only way to configure the Internet in Debian.

  1. Open the program window. To do this, click the Alt + F2 key combination and enter the following command to the field that appears:

    NM-Connection-Editor

  2. Running Network Manager in Debian

  3. In the window that opens, click on the "Add" button.
  4. Add button in the Network Manager window in Debian

  5. Select the "DSL" string from the list and click the Create button.
  6. Creating a DSL connection in Network Manager in Debian

  7. A window will open in which you need to enter the name of the connection to the appropriate string.
  8. Enter the name of the connection in Network Manager in Debian

  9. In the General tab, it is recommended to put ticks on the first two points so that when you turn on the PC, all users have access to it.
  10. Tab Total when configuring PPPoE connection in Network Manager in Debian

  11. On the DSL tab, enter the username and password to the appropriate fields. If you do not have this data, you can find them from the provider.

    DSL Tab in Network Manager in Debian

    Note: The name of the service is not necessarily.

  12. Going to the "Ethernet" tab, select the Network Interface name in the "Device" list, in the Link Negotiation list - "ignore", and in the "Cloning MAC address" field, specify "Preserve".
  13. Ethernet tab in Network Manager in Debian when configuring PPPoE connections

  14. In the "IPv4" parameters tab, with a dynamic IP, you need to select "Automatically (PPPoE)" during a dynamic IP.
  15. Configuring PPPoE connection with dynamic IP in Network Manager in Debian

    If the DNS server arrives not directly from the provider, select "Automatically (PPPoe, only address)" and enter them yourself in the field of the same name.

    Configuring PPPOE connection without DNS servers with dynamic IP in Network Manager in Debian

    In the case when you have a static IP address, you need to choose a manual way and register all the parameters to the appropriate fields for input.

    Configuring PPPoE connections with static IP in Network Manager in Debian

  16. Click "Save" and close the program window.

An Internet connection after all actions must be installed. If this is not the case, the computer reboot will help.

Dial-Up.

Of all the types of Dial-Up Internet connections are now considered the least popular, therefore programs with a graphical interface, in which you could make a setting, in Debian there. But there is a pppconfig utility with a pseudographic interface. You can also set up using the WVDIAL utility, but everything is in order.

Method 1: pppconfig

The PPPConfig utility is largely similar to PPPoEConfig: when setting up you just need to give answers to questions, after which the connection will be installed. But this utility is not pre-installed in the system, so download it through the "Terminal":

Sudo Apt Install Pppconfig

If you do not have access to the Internet to do this, you will have to install from the flash drive. To do this, first download the PPPConfig package and discard it to the drive.

Download pppconfig for 64-bit systems

Download pppconfig for 32-bit systems

Download PPPConfig Utility page for Debian

Then, for the installation, do the following:

  1. Insert the USB flash drive into your computer.
  2. Move the data from it to the "Downloads" folder, which is located in the home directory of the operating system.
  3. Open the Terminal.
  4. Go to the folder where you moved the file with the utility, that is, in "Downloads":

    CD / Home / UserName / Downloads

    Only instead of "UserName" enter the username that was specified when installing the system.

  5. Install the PPPConfig package using a special command:

    Sudo Dpkg -i [Packagename] .deb

    Where replace "[PACKAGENAME]" on the name of the Deb file.

As soon as the desired package is installed in the system, you can proceed directly to configuring the Dial-Up connection.

  1. Run the pppconfig utility:

    Sudo Pppconfig Docomo.

  2. In the first window of the pseudographic interface, select "Create a Connection Named Docomo" and click OK.
  3. Main Menu window in PPPConfig utility

  4. Then define a method for configuring DNS servers. With a static IP, select "Use Static DNS", with dynamic - "Use Dynamic DNS".

    CONFIGURE NAMERSERVERS DNS window in PPPConfig utility

    Important: If you have chosen "Use Static DNS", then you need to manually enter the IP address of the main and, if there is an additional server.

  5. Determine the authentication method by selecting the "Peer Authentication Protocol" item and click OK.
  6. Authentication Window in PPPConfig Utility in Debian

  7. Enter the login that has been given to you by the provider.
  8. Entering the name of users when configuring the Dial Up connection in the PPPConfig utility in Debian

  9. Enter the password you also received from the provider.

    Entering a user password when configuring a Dial Up connection in the PPPConfig utility in Debian

    Note: If you do not have this data, contact technical support for the provider and find out them from the operator.

  10. Now you need to specify the maximum speed of the Internet, which will give you a modem. If it is not necessary to limit it, you do not need to enter the maximum value in the field and click OK.
  11. Selecting the Internet Speed ​​in the PPPConfig Utility in Debian

  12. Determine the method of dialing as a tonal, respectively, select "Tone" and click OK.
  13. Pulse OR TONE window in PPPConfig Utility when configuring a Dial Up connection in Debian

  14. Enter your phone number. Please note that you need to enter the data without using the dash sign.
  15. Entering the user's phone number when configuring the Dial Up connection in the PPPConfig utility in Debian

  16. Specify the port of your modem to which it is connected.

    Definitions of the modem port when setting up a Dial Up network in the PPPConfig utility in Debian

    Note: TTYS0-TYS3 type ports can be viewed using the Sudo LS -L / DeV / TTYS * command

  17. In the last window, you will be presented with a report on all previously entered data. If they are all correct, then select the "Finished Write Files and Return to Main Menu" string and press ENTER.
  18. Last Stage Connection Connection Dial Up in the PPPConfig Utility in Debian

Now for connecting you remains only one command:

Pon docomo.

To break the connection, use this command:

poff docomo.

Method 2: WVDIAL

If you failed to configure the Dial-Up connection using the previous way, it will definitely do with the WVDIAL utility. It will help create a special file in the system, after which it will be necessary to make some changes. Now it will be detailed how to do it.

  1. First you need to install in the WVDIAL system, for this, in the Terminal, it is enough to perform:

    Sudo Apt Install Wvdial

    Again, if at this moment you are not configured at this point, you can pre-download the desired package from the site on another device, throw it on the USB flash drive and install on your computer.

    Download WVDIAL for 64-bit systems

    Download WVDIAL for 32-bit systems

  2. Website Download WVDIAL utility for Debian

  3. After the utility was installed on your system, it must be started to create the same configuration file that we will subsequently change. To start, run the following command:

    Sudo WvdialConf.

  4. The file was created in the "/ etc /" directory and it is called "wvdial.conf". Open it in a text editor:

    Sudo Nano /etc/wvdial.conf.

  5. It will store parameters read by utility from your modem. You also have to fill out three lines: Phone, UserName and Password.
  6. Configuration File To Configure the Dial Up Connection in Debian

  7. Save the changes (Ctrl + O) and close the editor (Ctrl + X).

Dial-UP connection is configured, but to turn it on, you need to execute another command:

sudo wvdial

To configure an automatic connection to the network, when the computer starts, it is enough to make this command in the Debian autoload.

Conclusion

There are several types of Internet connection, and Debian has all the necessary tools for their configuration. As it can be noted from the foregoing, there are even several ways to configure each type of connection. You still have to decide for yourself how to use them.

Read more