站长资讯网
最全最丰富的资讯网站

linux上不了网

linux上不了网

linux上不了网

关闭防火墙

1) 重启后生效

开启: chkconfig iptables on 关闭: chkconfig iptables off

2) 即时生效,重启后失效
开启: service iptables start
关闭: service iptables stop

1、检查当前环境配置的IP信息

linux上不了网

2、检查网络配置是否正确

[root@hadoop/]# cat /etc/sysconfig/network-scripts/ifcfg-eth0

linux上不了网

DECIVE=eth0     //指向的网络配置文件 IPADDR=192.168.1.226    //IP地址  GATEWAY=192.168.1.1  //网关地址 DNS1=8.8.8.8                    //DNS解析服务器 NETMASK=255.255.255.0  //子网掩码

3、ping一下设置的网关是否能够ping通,如果网关无法连通,则需要修改 /etc/sysconfig/network-scripts/ifcfg-eth0文件下的网关地 址

[root@hadoop/]# ping 192.168.1.1

linux上不了网

4、检查DNS服务器是否正确,使用命令

[root@hadoop etc]# cat  resolv.conf

linux上不了网

5、ping配置的DNS服务解析地址,看是否能够ping通,如果无法连通,则需要修改,但必须保证是正常的能使用的DNS地址

linux上不了网

6、只有上述配置都无误后,就可以连通外网资源,再进行测试,是否能ping通外网资源

[root@hadoop etc]# ping www.baidu.com

linux上不了网

推荐:linux运维教程

赞(0)
分享到: 更多 (0)