免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2137 | 回复: 6
打印 上一主题 下一主题

为什么我在BSD系统上网,不能解析域名 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-06-09 22:39 |只看该作者 |倒序浏览
ppp.conf 文件如下:
#################################################################
# PPP  Sample Configuration File
# Originally written by Toshiharu OHNO
# Simplified 5/14/1999 by wself@cdrom.com
#
# See /usr/share/examples/ppp/ for some examples
#
# $FreeBSD: src/etc/ppp/ppp.conf,v 1.10 2004/11/19 17:12:56 obrien Exp $
#################################################################

default:
set log Phase Chat LCP IPCP CCP tun command
ident user-ppp VERSION (built COMPILATIONDATE)

# Ensure that "device" references the correct serial port
# for your modem. (cuad0 = COM1, cuad1 = COM2)
#

#set speed sync
#set ctsrts off
#set timeout 30 # 0.5 minute idle timer
#disable lqr
#deny lqr
add default HISADDR
#set timeout 180                        # 3 minute idle timer (the default)
enable dns                                # request DNS info (for resolv.conf)

kuandai:
set device PPPoE:fxp0
set authname 413******
set authkey gfd***
set mru 1492
set mtu 1492
set dial
set login

set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0
nat enable yes
add default HISADDR                        # Add a (sticky) default route

我的网络是需要用户名的宽带连接。
运行:ppp -ddial kuandai后,
可以连接网络。
但ping www.sohu.com,提示不能解析域名。

[ 本帖最后由 liangyuyong 于 2008-6-10 01:21 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2008-06-10 06:33 |只看该作者
# vi /etc/resolv.conf

nameserver dns-server-ip

论坛徽章:
0
3 [报告]
发表于 2008-06-10 18:51 |只看该作者
晕啊,竟然没有resolv.conf文件

论坛徽章:
0
4 [报告]
发表于 2008-06-10 19:06 |只看该作者
可以了
echo "nameserver  211.103.158.182" >  /etc/resolv.conf

谢谢

[ 本帖最后由 liangyuyong 于 2008-6-10 22:24 编辑 ]

论坛徽章:
0
5 [报告]
发表于 2008-06-11 09:09 |只看该作者
手册是个宝贝

论坛徽章:
2
2015年迎新春徽章
日期:2015-03-12 10:39:39IT运维版块每日发帖之星
日期:2015-10-10 06:20:00
6 [报告]
发表于 2008-06-11 11:12 |只看该作者

论坛徽章:
0
7 [报告]
发表于 2008-06-11 12:47 |只看该作者
不错,不错..顶一下哦
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP