Minor Fault: RHEL 5 cannot access the Internet

Source: Internet
Author: User

During the use of the RHEL virtual machine at home today, after the network is switched from Wi-Fi to wired, a problem suddenly occurs: unable to connect to the network. This problem was discovered by the wsdl2h tool during gsoap code writing. It always prompts that the server cannot be connected to the specified server.

Ping Baidu.com, but it seems that it is a DNS problem. Modify the/etc/resolv. conf file, change the nameserver in it to the same as that in Windows (automatically obtained by DHCP), and then restart the network service:

/Etc/init. d/network restart

Ping www.baidu.com again, still not good, think of/etc/sysconfig/network-scripts/ifcfg-eth0 file has not been modified, so go in to change gateway to the same as windows, and then restart the network service, finally, you can ping Baidu.

I have never found this problem because I have always used wi-fi at home, and I have always used wired lines at the company. Today I have used wired lines at home for a long time, as a result, RHEL uses the wired network configuration and thus cannot access the Internet (because the company's DNS servers and gateways are the company's intranet addresses, which are different from those at home ).

Pay attention to this issue later.

 

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.