关于centOS6.3无法上网的问题(ip可以上网,网址不能上网)

1.首先DNS的配置问题

配置前的状态绿字:

红字为修改后追加的内容

[root@master ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth3
DEVICE="eth3"
BOOTPROTO=none
NM_CONTROLLED="yes"
ONBOOT=yes
TYPE="Ethernet"
UUID="32e146c1-5b3d-4bcb-b0b3-0dc51de45170"
HWADDR=6C:3B:E5:A2:3D:EB
IPADDR=192.168.182.212
PREFIX=24
GATEWAY=192.168.182.1
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth3"
LAST_CONNECT=1413553030

DNS1=8.8.8.8
DNS2=8.8.4.4

修改结束后保存退出。

执行重启网络命令:

[root@master ~]# service network restart
正在关闭接口 eth3: 设备状态:3 (断开连接)
                                                           [确定]
关闭环回接口:                                             [确定]
弹出环回接口:                                             [确定]
弹出界面 eth3: 活跃连接状态:激活的
活跃连接路径:/org/freedesktop/NetworkManager/ActiveConnection/5
                                                           [确定]

重启成功之后:

屏一下百度

[root@master ~]# ping www.baidu.com
PING www.a.shifen.com (61.135.169.125) 56(84) bytes of data.
64 bytes from 61.135.169.125: icmp_seq=1 ttl=52 time=11.2 ms
64 bytes from 61.135.169.125: icmp_seq=2 ttl=52 time=4.38 ms

屏成功了,可以上网了,下面看一下网页。



你可能感兴趣的:(linux命令,centOS6.3)