免费注册 查看新帖 |

Chinaunix

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

[FreeBSD] FreeBSD PPPoE拨号问题,要崩溃了!(附:配置) [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-01-12 23:54 |只看该作者 |倒序浏览
一个星期了,今天无意中PPPoE终于成功了,是因为我把FreeBSD的机器和ADSL都接到了交换机上,但是网卡直接连ADSL拨不通,在Windows 2003下以上两种连接都可以拨通。谁能告诉我这是为什么?

我不懂网络,只是想在FreeBSD下做些底层开发。


请问我在FreeBSD下用双网卡做ADSL共享,如何配置?把所有机器和ADSL都接到交换机上可以吗?老是提示ARP错误啊。

各位老大,救救我吧!

ppp.conf

default:
set log Phase tun command
set device PPPoE:re0
set speed sync
set mru 1492
set mtu 1492
nat enable yes
nat same_ports yes
nat use_sockets yes
enable dns
add! default HISADDR

adsl:
set authname USERNAME
set authkey PASSWORD
set dial
set login


rc.conf (ADSL的IP是:192.168.1.1)

usbd_enable="YES"
keyrate="fast"

ifconfig_re0="inet 192.168.1.21  netmask 255.255.255.0"
ifconfig_vr0="inet 192.168.0.1  netmask 255.255.255.0"
hostname="FreeBSD.48t.org"
#defaultrouter="192.168.1.1"

inetd_enable="YES"
geteway_enable="YES"
named_enable="YES"
ppp_enable="YES"
ppp_mode="ddial"
ppp_nat="YES"
ppp_profile="adsl"


ppp.log

Jan 10 01:19:26  newsyslog[538]: logfile first created
Jan 11 12:22:06 FreeBSD ppp[715]: Phase: Using interface: tun0
Jan 11 12:22:06 FreeBSD ppp[715]: Phase: deflink: Created in closed state
Jan 11 12:22:06 FreeBSD ppp[715]: tun0: Command: default: ident user-ppp VERSION (built COMPILATIONDATE)
Jan 11 12:22:06 FreeBSD ppp[715]: tun0: Command: default: set timeout 180
Jan 11 12:22:06 FreeBSD ppp[715]: tun0: Command: default: enable dns
Jan 11 12:22:06 FreeBSD ppp[715]: tun0: Command: adsl: set device PPPoE:re0
Jan 11 12:22:06 FreeBSD ppp[715]: tun0: Command: adsl: set authname ********
Jan 11 12:22:06 FreeBSD ppp[715]: tun0: Command: adsl: set authkey ********
Jan 11 12:22:06 FreeBSD ppp[715]: tun0: Command: adsl: set dial
Jan 11 12:22:06 FreeBSD ppp[715]: tun0: Command: adsl: set login
Jan 11 12:22:06 FreeBSD ppp[715]: tun0: Command: adsl: add default HISADDR
Jan 11 12:22:06 FreeBSD ppp[728]: tun0: Phase: PPP Started (ddial mode).
Jan 11 12:22:06 FreeBSD ppp[728]: tun0: Phase: bundle: Establish
Jan 11 12:22:06 FreeBSD ppp[728]: tun0: Phase: deflink: closed -> opening
Jan 11 12:22:06 FreeBSD ppp[728]: tun0: Phase: deflink: Connected!
Jan 11 12:22:06 FreeBSD ppp[728]: tun0: Phase: deflink: opening -> dial
Jan 11 12:22:06 FreeBSD ppp[728]: tun0: Phase: deflink: dial -> carrier
Jan 11 12:22:11 FreeBSD ppp[728]: tun0: Phase: deflink: Disconnected!
Jan 11 12:22:11 FreeBSD ppp[728]: tun0: Phase: deflink: carrier -> hangup
Jan 11 12:22:11 FreeBSD ppp[728]: tun0: Phase: deflink: Connect time: 5 secs: 0 octets in, 0 octets out
Jan 11 12:22:11 FreeBSD ppp[728]: tun0: Phase: deflink: 0 packets in, 0 packets out
Jan 11 12:22:11 FreeBSD ppp[728]: tun0: Phase:  total 0 bytes/sec, peak 0 bytes/sec on Fri Jan 11 12:22:06 2008
Jan 11 12:22:11 FreeBSD ppp[728]: tun0: Phase: deflink: hangup -> opening
Jan 11 12:22:11 FreeBSD ppp[728]: tun0: Phase: deflink: Enter pause (30) for redialing.
Jan 11 12:22:42 FreeBSD ppp[728]: tun0: Chat: deflink: Redial timer expired.
Jan 11 12:22:42 FreeBSD ppp[728]: tun0: Phase: deflink: Connected!
Jan 11 12:22:42 FreeBSD ppp[728]: tun0: Phase: deflink: opening -> dial
Jan 11 12:22:42 FreeBSD ppp[728]: tun0: Phase: deflink: dial -> carrier
Jan 11 12:22:47 FreeBSD ppp[728]: tun0: Phase: deflink: Disconnected!
Jan 11 12:22:47 FreeBSD ppp[728]: tun0: Phase: deflink: carrier -> hangup
Jan 11 12:22:47 FreeBSD ppp[728]: tun0: Phase: deflink: Connect time: 5 secs: 0 octets in, 0 octets out
Jan 11 12:22:47 FreeBSD ppp[728]: tun0: Phase: deflink: 0 packets in, 0 packets out
Jan 11 12:22:47 FreeBSD ppp[728]: tun0: Phase:  total 0 bytes/sec, peak 0 bytes/sec on Fri Jan 11 12:22:42 2008
Jan 11 12:22:47 FreeBSD ppp[728]: tun0: Phase: deflink: hangup -> opening
Jan 11 12:22:47 FreeBSD ppp[728]: tun0: Phase: deflink: Enter pause (30) for redialing.
Jan 11 12:23:17 FreeBSD ppp[728]: tun0: Chat: deflink: Redial timer expired.
Jan 11 12:23:17 FreeBSD ppp[728]: tun0: Phase: deflink: Connected!
Jan 11 12:23:17 FreeBSD ppp[728]: tun0: Phase: deflink: opening -> dial
Jan 11 12:23:17 FreeBSD ppp[728]: tun0: Phase: deflink: dial -> carrier
Jan 11 12:23:22 FreeBSD ppp[728]: tun0: Phase: deflink: Disconnected!
Jan 11 12:23:22 FreeBSD ppp[728]: tun0: Phase: deflink: carrier -> hangup
Jan 11 12:23:22 FreeBSD ppp[728]: tun0: Phase: deflink: Connect time: 5 secs: 0 octets in, 0 octets out
Jan 11 12:23:22 FreeBSD ppp[728]: tun0: Phase: deflink: 0 packets in, 0 packets out
Jan 11 12:23:22 FreeBSD ppp[728]: tun0: Phase:  total 0 bytes/sec, peak 0 bytes/sec on Fri Jan 11 12:23:17 2008
Jan 11 12:23:22 FreeBSD ppp[728]: tun0: Phase: deflink: hangup -> opening
Jan 11 12:23:22 FreeBSD ppp[728]: tun0: Phase: deflink: Enter pause (30) for redialing.


[ 本帖最后由 pernlee 于 2008-1-13 15:11 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2008-01-13 10:22 |只看该作者
你也总该帖几个关于无法连接的错误日志,或者ppp的配置吧。

论坛徽章:
0
3 [报告]
发表于 2008-01-13 12:43 |只看该作者
同志们,看贴一定要回的!

论坛徽章:
0
4 [报告]
发表于 2008-01-13 15:10 |只看该作者
被浏览了96次,也没人回啊!

[ 本帖最后由 pernlee 于 2008-1-13 16:17 编辑 ]

论坛徽章:
0
5 [报告]
发表于 2008-01-13 23:30 |只看该作者
把 re0的netmask改为:255.255.255.255

论坛徽章:
0
6 [报告]
发表于 2008-01-14 00:47 |只看该作者
然后我客户端怎么配呢?

论坛徽章:
0
7 [报告]
发表于 2008-01-14 02:40 |只看该作者
还是收到ARP错误啊 kernel: arp: 192.168.0.23 is on vr0 but got reply from 00:1a:4d:9c:7b:09 on re0

论坛徽章:
0
8 [报告]
发表于 2008-01-14 13:07 |只看该作者
好像改成这样就可以了ifconfig_re0="inet 192.168.1.21  netmask 255.255.255.0 -arp"

论坛徽章:
1
寅虎
日期:2013-09-29 23:15:15
9 [报告]
发表于 2008-01-14 17:35 |只看该作者
简单写一下就OK了,lz可以参考一下.

# cat /etc/rc.conf
ppp_enable="YES"
ppp_mode="ddial"
ppp_nat="YES"
ppp_profile="gzDSL"

# cat ppp.conf
default:
        set log Phase tun command
        set ifaddr 10.0.0.1/0 10.0.0.2/0
gzDSL:
        set device PPPoE:bge1
        set authname gzDSLxxxxx@163.gd
        set authkey xxxxxx
        set dial
        set login
        add default HISADDR

论坛徽章:
0
10 [报告]
发表于 2008-01-16 23:33 |只看该作者
打开服务器的nat功能。客户端网关是vr0。其它不用改
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP