- 论坛徽章:
- 0
|
我在 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:
- startup:
- # configure mpd users
- #set user foo bar admin
- #set user foo1 bar1
- set user admin zhimalet5in.admin admin
- # configure the console
- set console self 127.0.0.1 5005
- set console open
- # configure the web server
- #set web self 0.0.0.0 5006
- #set web open
- default:
- load pppoe_server
- pppoe_server:
- create bundle template B
- set iface disable proxy-arp
- set iface enable tcpmssfix
- set ipcp dns 221.11.1.67 221.11.1.68
- #set ipcp enable vjcomp
- set ippool add pool1 10.10.0.0 10.10.255.255
- set ipcp ranges 11.88.0.1/32 ippool pool1
- create link template common pppoe
- #set link enable multilink
- set link action bundle B
- set link bandwidth 2000
- set link disable chap pap eap
- set link mtu 1492
- set link mru 1492
- set link enable pap
- load radius
- create link template em1 common
- set link max-children 5000
- set pppoe iface em1
- set pppoe service ""
- #set pppoe acname "GXT"
- set link enable incoming
- set auth max-logins 1
- radius:
- # You can use radius.conf(5), its useful, because you can share the
- # same config with userland-ppp and other apps.
- set radius config /etc/radius.conf
- # or specify the server directly here
- set radius server 172.16.88.35 111111 1812 1813
- set radius retries 3
- set radius timeout 3
- # send the given IP in the RAD_NAS_IP_ADDRESS attribute to the server.
- set radius me 192.168.0.2
- # send accounting updates every 5 minutes
- set auth acct-update 300
- # enable RADIUS, and fallback to mpd.secret, if RADIUS auth failed
- set auth enable radius-auth
- set auth disable internal
- # enable RADIUS accounting
- set auth enable radius-acct
- # protect our requests with the message-authenticator
- # #set radius enable message-authentic
复制代码
2、/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/16",
- mpd-filter += "2#1=nomatch src net 10.0.0.0/24",
- mpd-filter += "2#2=match src net 10.10.0.0/16",
- 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",
复制代码
PS: mpd-filter、mpd-limit 写在radius.conf 里面是 mpd5 手册上写的
http://mpd.sourceforge.net/doc5/mpd30.html#radius |
|