当前位置: 技术问答>linux和unix
为什么呀?用SOLARIS8上不了网????SOS!!!!
来源: 互联网 发布时间:2015-01-07
本文导语: 我们用的是ADSL代理上网, 个人分到的IP是192.168.0.5,我ping 代理主机192.168.0.1和其他人的机子 如192。168。0。6都能PING得通,可是一用浏览器上网就提示找不到网址了 为什么呀?难道还要配置网关和DNS吗 怎么做呀?详细...
我们用的是ADSL代理上网,
个人分到的IP是192.168.0.5,我ping 代理主机192.168.0.1和其他人的机子
如192。168。0。6都能PING得通,可是一用浏览器上网就提示找不到网址了
为什么呀?难道还要配置网关和DNS吗
怎么做呀?详细点教我呀!
个人分到的IP是192.168.0.5,我ping 代理主机192.168.0.1和其他人的机子
如192。168。0。6都能PING得通,可是一用浏览器上网就提示找不到网址了
为什么呀?难道还要配置网关和DNS吗
怎么做呀?详细点教我呀!
|
还要设置DNS,如下:
/etc/resolv.conf文件
记录DNS服务器的地址和域名
关键字:
domainname
nameserver
# more /etc/resolv.conf
nameserver 202.96.209.5
domainname sunrise.com.cn
/etc/nsswitch.conf文件
记录主机名的搜索顺序等信息
# more /etc/nsswitch.conf
#
# /etc/nsswitch.dns:
#
# An example file that could be copied over to /etc/nsswitch.conf; it uses
# DNS for hosts lookups, otherwise it does not use any other naming service.
#
# "hosts:" and "services:" in this file are used only if the
# /etc/netconfig file has a "-" for nametoaddr_libs of "inet" transports.
passwd: files
group: files
# You must also set up the /etc/resolv.conf file for DNS name
# server lookup. See resolv.conf(4).
hosts: files dns
ipnodes: files
…
…
将这个文件的hosts记录配置成hosts: files dns
/etc/resolv.conf文件
记录DNS服务器的地址和域名
关键字:
domainname
nameserver
# more /etc/resolv.conf
nameserver 202.96.209.5
domainname sunrise.com.cn
/etc/nsswitch.conf文件
记录主机名的搜索顺序等信息
# more /etc/nsswitch.conf
#
# /etc/nsswitch.dns:
#
# An example file that could be copied over to /etc/nsswitch.conf; it uses
# DNS for hosts lookups, otherwise it does not use any other naming service.
#
# "hosts:" and "services:" in this file are used only if the
# /etc/netconfig file has a "-" for nametoaddr_libs of "inet" transports.
passwd: files
group: files
# You must also set up the /etc/resolv.conf file for DNS name
# server lookup. See resolv.conf(4).
hosts: files dns
ipnodes: files
…
…
将这个文件的hosts记录配置成hosts: files dns
|
用root用户在/etc下建一个defaultrouter的文件,里面填写你的代理服务器的ip就可以上网了