问t题,我们学校的L2TP设置为:
LNSIP=192.168.129.1
6
211.66.184.0 mask 255.255.248.0;
172.16.0.0 mask 255.252.0.0;
210.38.32.0 mask 255.255.255.0
202.116.41.0 mask 255.255.255.0
168.160.184.0 mask 255.255.255.0
210.21.59.0 mask 255.255.255.0
我根据这样进行建立脚本的
代码: 全选
6。编辑/usr/local/sbin/bras-ctrl
administrator@administrator-desktop:~$ sudo gedit /usr/local/sbin/bras-ctrl
#!/bin/sh
## For xl2tpd: /etc/init.d/xl2tpd
## For l2tpd: /etc/init.d/l2tpd
L2TPD_SCRIPT=/etc/init.d/xl2tpd
## For xl2tpd: /var/run/xl2tpd/l2tp-control
## For l2tpd: /var/run/l2tp-control
L2TPD_PIPE=/var/run/xl2tpd/l2tp-control
case $1 in
route)
GATEWAY=172.17.92.254 #将GATEWAY=172.17092.254 改成你的静态IP的默认网关
{
route $2 -net 220.189.211.160 netmask 255.255.255.224 gw $GATEWAY
route $2 -net 218.108.82.160 netmask 255.255.255.240 gw $GATEWAY
route $2 -net 10.0.0.0 netmask 255.0.0.0 gw $GATEWAY
route $2 -net 172.16.0.0 netmask 255.240.0.0 gw $GATEWAY
route $2 -net 192.168.0.0 netmask 255.255.0.0 gw $GATEWAY
route $2 -net 210.32.24.0 netmask 255.255.252.0 gw $GATEWAY
route del default
if [ "$2"=="add" ]
then
route add -host 192.168.129.1 eth0 # 此处host为拨号服务器地址
fi
if [ "$2"=="del" ]
then
route add -net default gw $GATEWAY
fi
}&>/dev/null
modprobe ip_nat_ftp
;;
start)
echo "" > /var/run/xl2tpd/l2tp-control
xl2tpd
sleep 5
echo "c gdqy" > /var/run/xl2tpd/l2tp-control
;;
stop)
echo "d gdqy" > /var/run/xl2tpd/l2tp-control
;;
*)
echo "Please specify your action: route add/del | start | stop"
;;
esac
问t题就 出现了显示: sudo: bras-ctrl: command not found
查l了很久不知道怎 么解决故来求救!!!
当我执行: sudo route -n
它是这样的:
root@code007-desktop:~# sudo route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.129.1 172.17.150.254 255.255.255.255 UGH 0 0 0 eth0
210.38.32.0 172.17.150.254 255.255.255.0 UG 0 0 0 eth0
172.17.150.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
202.116.41.0 172.17.150.254 255.255.255.0 UG 0 0 0 eth0
210.21.59.0 172.17.150.254 255.255.255.0 UG 0 0 0 eth0
168.160.184.0 172.17.150.254 255.255.255.0 UG 0 0 0 eth0
211.66.184.0 172.17.150.254 255.255.248.0 UG 0 0 0 eth0
172.16.0.0 172.17.150.254 255.252.0.0 UG 0 0 0 eth0
0.0.0.0 172.17.150.254 0.0.0.0 UG 0 0 0 eth0
锐捷可以上,但是只有10多K的下载速度...................痲烦各位高手咯