Article title: jump out of inertia to solve the problem that Linux cannot access the Internet. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
One vSwitch and one Win2003 machine are used as the gateway for the LAN (whose IP address is 192.168.0.1). The telecommunications company gives us an internet account that can dial several machines at the same time. The IP address of other machines is set to 192.168.0. ×, and the Internet can be shared through the gateway, so you can access the Internet without dialing. My machine has two operating systems installed, one Windows XP and the other Linux.
One day, a strange problem suddenly occurred. my Linux system could not access the network. after checking that the ping gateway 192.168.0.1 failed, I restarted my computer to enter the Windows XP system. as usual, I could access the Internet. I thought it was a problem with my Linux. I tried to reconfigure my Linux system by searching on google. After I reinstall the Linux system, I still cannot access the network or ping the gateway. I have tried another Linux version.
If my machine is set as a gateway, can I access the Internet? Since the accounts provided by China Telecom to our company can be dialed by multiple people at the same time, I can set up my own machine as a separate Lan, my own machine acts as a gateway (in order not to conflict with the Win2003 IP address) Address: 192.168.1.1.
Start now.
# Ifconfig eth0 192.168.1.1 netmask 255.255.255.0
# Ifconfig eth0 up
# Pppoe-setup set dialing
# Pppoe-start
Tip: Deleting all exist defaultroute ....
.. Connected!
Actually succeeded.
# Ping 192.168.1.1
Passed
# Ping 202.101.224.68 (Jiangxi telecom DNS address)
Passed
Why have I never thought of doing this before? I haven't used Linux to access the internet for more than two months.
Now it's better.