The linux network is correctly configured. You can ping the Internet address and cannot open the webpage.

Source: Internet
Author: User
Tags domain name server

The linux network is correctly configured and can be pinged to the Internet address. If you cannot open a webpage, first make sure that the network configuration of the system is correct and that the system can access the internet. Use the following methods to confirm the problem: [root @ localhost ~] # More/etc/sysconfig/network-scripts/ifcfg-eth0 # Intel Corporation 82545EM Gigabit Ethernet Controller (Copper) DEVICE = eth0BOOTPROTO = noneHWADDR = 00: 50: 56: bd: 00: 56 ONBOOT = yesNETMASK = 255.255.255.0IPADDR = 172.16.6.50GATEWAY = 172.16.6.1TYPE = Ethernet [root @ localhost ~] # Ping 172.16.6.1PING 172.16.6.1 (172.16.6.1) 56 (84) bytes of data.64 bytes from 172.16.6.1: icmp_seq = 1 ttl = 255 time = 0.890 ms64 bytes from 172.16.6.1: icmp_seq = 2 ttl = 255 time = 0.841 MS --- 172.16.6.1 ping statistics --- 2 packets transmitted, 2 pinned ed, 0% packet loss, time 999 msrtt min/avg/max/mdev = 0.841/0.865/0.890/0.038 MS in the case of network problems, you can find a solution through the following steps: 1) are you sure you have set the Domain Name Server [root @ localhost ~] # More/etc/resolv. conf search localdomain nameserver 8.8.8.8 # Google's free DNS 2) Are you sure you have set the gateway [root @ localhost ~] # Grep GATEWAY/etc/sysconfig/network-scripts/ifcfg * Tables/etc/sysconfig/network-scripts/ifcfg-eth0: GATEWAY = 172.16.6.1 if no setting is set, you can add a gateway in either of the following ways:. [root @ localhost ~] # Route add default gw 192.168.40.1 B. [root @ localhost ~] # Vi/etc/sysconfig/network-scripts/ifcfg * restart the network service: [root @ localhost ~] # Service network restart 3) determine available dns resolution [root @ localhost ~] # Grep hosts/etc/nsswitch. conf uninstall hosts: files dns ----------------------------------------------------------------- the above conditions are excluded, and the problem can basically be solved ......

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.