ROS软路由论坛 ROSABC.com 网络方案网络工程交流

 找回密码
 会员注册

QQ登录

只需一步,快速开始

查看: 15060|回复: 11

[交流] ROS软路由多条外网线路,采用脚本自动化检测最优外网线路

[复制链接]
发表于 2009-4-8 03:55:39 | 显示全部楼层 |阅读模式

马上注册成为ROSABC会员,随时发帖回复。

您需要 登录 才可以下载或查看,没有账号?会员注册

x
实现“ROS软路由多条外网线路,采用脚本自动化检测最优外网线路”,分两部分:
1.脚本实现对外网线路最优判断
2.脚本实现线路选择的切换


下面是脚本实现线路自动化选择切换

  • :global status118
  • :global status210
  • :global status101
  • :global s210
  • :global s118
  • :global s101
  • :local num118
  • :local num210
  • :local num101
  • :local num1
  • :local num2
  • :local e 1;
  • :set status118 [/inte**ce get [/inte**ce find name="pptp_out_118" ] running]
  • :set status101 [/inte**ce get [/inte**ce find name="pptp_out_101" ] running]
  • :set status210 [/inte**ce get [/inte**ce find name="pptp_out_210" ] running]
  • :set s210 [/inte**ce get [/inte**ce find name="pptp_out_210" ] disable]
  • :set s118 [/inte**ce get [/inte**ce find name="pptp_out_118" ] disable]
  • :set s101 [/inte**ce get [/inte**ce find name="pptp_out_101" ] disable]
  • :if ($status118=false && $s118=false) do={
  • /inte**ce disable pptp_out_118
  • /inte**ce enable pptp_out_210
  • :set num1 ($e+1);
  • } else={
  • :if ($status118=true && $status210=false && $status101=false) do={
  • :log info "There is 118 lines!"
  • }
  • }
  • :if ($status210=false && $s210=false) do={
  • /inte**ce disable pptp_out_210
  • /inte**ce enable pptp_out_118
  • :set num2 ($e+1);
  • } else={
  • :if ($status210=true && $status118=false && $status101=false) do={
  • :log info "There is 210 lines!"
  • }
  • }
  • :if ($num1=2 && $num2=2) do={
  • /inte**ce enable pptp_out_101
  • /inte**ce disable pptp_out_210
  • /inte**ce disable pptp_out_118
  • :delay 5
  • :if ($status101=false && $s101=false) do={
  • /inte**ce disable pptp_out_101
  • /inte**ce enable pptp_out_118
  • } else={
  • :if ($status101=true && $status210=false && $status118=false) do={
  • :log info "There is 101 lines!"
  • }
  • }}

复制代码
另外脚本实现对外网线路最优判断
发表于 2009-4-8 09:53:07 | 显示全部楼层
看看学习下
发表于 2009-4-10 06:01:21 | 显示全部楼层
成功了???
发表于 2009-4-11 17:09:57 | 显示全部楼层
看不懂,是ping值检查?
发表于 2009-4-12 17:13:35 | 显示全部楼层
谢谢分享!
发表于 2009-4-13 01:46:46 | 显示全部楼层
jackey 发表于 2012-9-15 12:38

                               
登录/注册后可看大图

成功了???


还没有,在做脚本自动化检测最优外网线路,处理如何获取流量值进行选取对比
发表于 2009-4-13 02:17:08 | 显示全部楼层
这个如果能用,还是很不错的!
发表于 2009-4-14 06:19:40 | 显示全部楼层
谢谢谢快写快写
发表于 2009-4-14 13:48:50 | 显示全部楼层
ROS多条外网线路,采用脚本自动化检测最优外网线路 [
发表于 2009-4-15 02:18:27 | 显示全部楼层
晕 这有什么 意思????????
您需要登录后才可以回帖 登录 | 会员注册

本版积分规则

不良信息举报Q:2000617

软路由

不良信息举报Q:2000617|Archiver|ROS软路由论坛 ROSABC.com 网络方案网络工程交流

GMT+8, 2024-5-6 03:56 , Processed in 0.068453 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表