Jump out of inertia to solve the problem that Linux cannot access the network

Source: Internet
Author: User
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.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.