免费注册 查看新帖 |

Chinaunix

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

[FreeBSD] 求助 MPD5 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-10-01 18:55 |只看该作者 |倒序浏览
我在 FreeBSD 7.2 下使用mpd5 建立pppoe server 已经正常使用

但是 不能正常使用自带的 限速程序(mpd-filter 、mpd-limit)

ng_car ng_bpf 确定已经加载这些模块了

/etc/radius.conf 里面加了这些参数:

mpd-filter += "1#1=nomatch dst net 10.0.0.0/24",
mpd-filter += "1#2=match dst net 10.10.0.0/8",
mpd-filter += "2#1=nomatch src net 10.0.0.0/24",
mpd-filter += "2#2=match src net 10.10.0.0/8",
mpd-limit += "in#1=flt1 pass",
mpd-limit += "in#2#Biz=all shape 64000 4000",
mpd-limit += "out#1=flt2 pass",
mpd-limit += "out#2#Biz=all rate-limit 1024000 150000 300000",

同时打开 mpd.conf 里面的 set radius config /etc/radius.conf

发现拨号时总是 691 错误信息如下:

RADIUS: rad_config: /etc/radius.conf:1: quoted string not followed by white space
AUTH: RADIUS returned error

不知该怎么做了

按手册上讲的 字典文件添加过了 还是不行

#----------------------------------------------------------
# dictionary.mpd

VENDOR mpd 12341

ATTRIBUTE mpd-rule 1 string mpd
ATTRIBUTE mpd-pipe 2 string mpd
ATTRIBUTE mpd-queue 3 string mpd
ATTRIBUTE mpd-table 4 string mpd
ATTRIBUTE mpd-table-static 5 string mpd
ATTRIBUTE mpd-filter 6 string mpd
ATTRIBUTE mpd-limit 7 string mpd
ATTRIBUTE mpd-input-octets 8 string mpd
ATTRIBUTE mpd-input-packets 9 string mpd
ATTRIBUTE mpd-output-octets 10 string mpd
ATTRIBUTE mpd-output-packets 11 string mpd
ATTRIBUTE mpd-link 12 string mpd
ATTRIBUTE mpd-bundle 13 string mpd
ATTRIBUTE mpd-iface 14 string mpd
ATTRIBUTE mpd-iface-index 15 integer mpd
ATTRIBUTE mpd-input-acct 16 string mpd
ATTRIBUTE mpd-output-acct 17 string mpd
ATTRIBUTE mpd-action 18 string mpd
ATTRIBUTE mpd-drop-user 154 integer mpd
#----------------------------------------------------------


我改怎么做?

radius 使用安腾和SBRNT 都试过 不行哦

哪位能指点一二?



1、mpd.conf:



  1. startup:
  2.         # configure mpd users
  3.         #set user foo bar admin
  4.         #set user foo1 bar1
  5.         set user admin zhimalet5in.admin admin
  6.         # configure the console
  7.         set console self 127.0.0.1 5005
  8.         set console open
  9.         # configure the web server
  10.         #set web self 0.0.0.0 5006
  11.         #set web open




  12. default:
  13.         load pppoe_server

  14. pppoe_server:
  15.    create bundle template B
  16.         set iface disable proxy-arp        
  17.         set iface enable tcpmssfix
  18.         set ipcp dns 221.11.1.67 221.11.1.68
  19.    #set ipcp enable vjcomp
  20.         set ippool add pool1 10.10.0.0 10.10.255.255
  21.         set ipcp ranges 11.88.0.1/32 ippool pool1
  22.         create link template common pppoe
  23.    #set link enable multilink
  24.    set link action bundle B
  25.    set link bandwidth 2000
  26.         set link disable chap pap eap
  27.    set link mtu 1492
  28.    set link mru 1492
  29.    set link enable pap
  30.    load radius
  31.    create link template em1 common
  32.    set link max-children 5000
  33.    set pppoe iface em1
  34.         set pppoe service ""
  35.         #set pppoe acname "GXT"
  36.    set link enable incoming
  37.         set auth max-logins 1


  38. radius:
  39. # You can use radius.conf(5), its useful, because you can share the
  40. # same config with userland-ppp and other apps.
  41.    set radius config /etc/radius.conf
  42. # or specify the server directly here
  43.         set radius server 172.16.88.35 111111 1812 1813
  44.         set radius retries 3
  45.         set radius timeout 3
  46. # send the given IP in the RAD_NAS_IP_ADDRESS attribute to the server.
  47.         set radius me 192.168.0.2
  48. # send accounting updates every 5 minutes
  49.         set auth acct-update 300
  50. # enable RADIUS, and fallback to mpd.secret, if RADIUS auth failed
  51.         set auth enable radius-auth
  52.         set auth disable internal
  53. # enable RADIUS accounting
  54.         set auth enable radius-acct
  55. # protect our requests with the message-authenticator
  56. #   #set radius enable message-authentic

复制代码



2、/etc/radius.conf:



  1. mpd-filter += "1#1=nomatch dst net 10.0.0.0/24",
  2. mpd-filter += "1#2=match dst net 10.10.0.0/16",
  3. mpd-filter += "2#1=nomatch src net 10.0.0.0/24",
  4. mpd-filter += "2#2=match src net 10.10.0.0/16",
  5. mpd-limit += "in#1=flt1 pass",
  6. mpd-limit += "in#2#Biz=all shape 64000 4000",
  7. mpd-limit += "out#1=flt2 pass",
  8. mpd-limit += "out#2#Biz=all rate-limit 1024000 150000 300000",

复制代码


PS:  mpd-filter、mpd-limit 写在radius.conf 里面是 mpd5 手册上写的

http://mpd.sourceforge.net/doc5/mpd30.html#radius

论坛徽章:
0
2 [报告]
发表于 2009-10-06 12:04 |只看该作者
等了好久  没有人能指点下吗?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP