求 救:关于L2TP上网问題

包含网卡/无线网的网络问题和ADSL/校园网/宽带拨号支持及代理/共享等网络使用问题
回复
Code007
帖子: 15
注册时间: 2009-09-21 1:57

求 救:关于L2TP上网问題

#1

帖子 Code007 » 2010-03-21 4:08

大家 好 ,又来痲煩大家了,我的锐捷连得上,我是广轻的一名学生,我主要是参照了viewtopic.php?f=116&t=163833&start=0的第九楼的回复这篇文章进行设置的,整个过程都没什么问t题,就是最后L2TP导入出现l了
问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
但是最h后我启动它的時候是这样的命l令: sudo -i bras-ctrl start
问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的下载速度...................痲烦各位高手咯
:em06
Code007
帖子: 15
注册时间: 2009-09-21 1:57

Re: 求 救:关于L2TP上网问題

#2

帖子 Code007 » 2010-03-21 10:34

高手帮我一下咯.................
kbitosy
帖子: 10
注册时间: 2010-05-28 17:40

Re: 求 救:关于L2TP上网问題

#3

帖子 kbitosy » 2010-06-14 14:37

这帖子都这么久了,应该都连上了吧!如果还没有的话可以看下财哥的博客http://www.stulog.com/?post=19或许我的http://hi.ba ... 4de96.html
回复