The detailed process of configuring pppoe in ubuntu

Although mine is 22, it has nothing to do with the specific version of ubuntu

1 Why do you need to install pppoe to connect to the Internet?

After installing ubuntu on the Lenovo mainframe, I found that the wifi network could not be found for a while after startup, and suddenly I couldn’t search for it. Later, I asked my tutor to know that my junior sister used this computer before, and then I also encountered it.

So I had to switch to ppoe dial-up and use a network cable to connect to the wifi in the laboratory

what is pppoe

what is pppoe

2 ready

2.1 Make sure your network cable is connected correctly:

insert image description here
insert image description here

2.2 The process of configuring PPPoE (Point-to-Point Protocol over Ethernet) connection is as follows:

1 Open the terminal: In the Ubuntu system, press the keyboard combination of Ctrl + Alt + T to open the terminal.

2 Install the required packages: Enter the following command to install the required packages:

sudo apt update
sudo apt install pppoeconf

3 Run the PPPoE configuration tool: Enter the following command to start the PPPoE configuration tool:

sudo pppoeconf

4 Select a network interface: The PPPoE configuration tool will list the available network interfaces. Select the interface you want to use, such as eth0, enp4s0 (both are the abbreviation or abbreviation of Ethernet), and this will generally help you choose. Press Enter to continue.

insert image description here

5 Configure the user name and password (if you are in school, it is your campus network account and password)

7 After touching the confirmation box behind, just keep pressing yes

8 Enable PPPoE connection: Enter the following command to enable the configured PPPoE connection:

sudo pon dsl-provider

2.3 Testing

1 case1

Ping using an IP address: Try a ping test using a known IP address, such as Google's public DNS server 8.8.8.8:

ping 8.8.8.8

found to be able to ping

2 case2

ping www.baidu.com

Found an error ping: google.com: Temporary failure in name resolution

This is because we have not set up a public DNS domain name server to resolve the domain name of "www.baidu.com" to an ip address

Use the command "cat /etc/resolv.conf" to see that nameserver = 127.0.0.x,
so we now need to replace it with the address of the DNS server

insert image description here

2.4 Set DNS domain name server

1 We should stop the network service first, so that it is convenient for us to modify the conf file and apply it.

sudo systemctl stop networking

2 Modify the configuration file

/etc/resolv.conf

Comment out the line of the original nameserver, and then add a new
nameserver 8.8.8.8
After adding, the effect is as follows:
insert image description here

3 Start the network service (do not use restart, otherwise the configuration file is equal to no modification)

sudo systemctl start networking

2.5 Second test

ping www.baidu.com

Success, now you can open the Internet

Then restart the machine, and then

Guess you like

Origin blog.csdn.net/yxg520s/article/details/131584471