|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
×
请帮我看看是哪出错了!!!!!!
网吧要实现网通+电信,网通为主的,我的设置如下:
1,网卡为类:
0 LAN 内网 1 CNC 网通 2 TEL 电信
2,加入IP,子掩码
/ ip address
add address=192.168.0.1/24 network=192.168..0 broadcast=192.168.0.255 \
interface=LAN comment="" disabled=no
add address=221.229.122.106/30 network=自动设置 broadcast=自动设置
interface=TEL comment="" disabled=no
add address=61.29.147.29/24 network=自动设置 broadcast=自动设置
interface=CNC comment="" disabled=no
3,增加网关(电信的路由网关)
(电信网关:221.229.122.105,,,,,,,,,,,,网通网关:61.147.29.254)
/ip route
add dst-address=58.32.0.0/13 gateway=221.229.122.105 check-gateway=ping \
distance=0 scope=255 target-scope=10 comment="tel" disabled=no
add dst-address=58.40.0.0/15 gateway=221.229.122.105 check-gateway=ping \
distance=0 scope=255 target-scope=10 comment="tel" disabled=no
add dst-address=58.42.0.0/16 gateway=221.229.122.105 check-gateway=ping \
distance=0 scope=255 target-scope=10 comment="tel" disabled=no
add dst-address=58.44.0.0/14 gateway=221.229.122.105 check-gateway=ping \
distance=0 scope=255 target-scope=10 comment="tel" disabled=no
下略
add dst-address=0.0.0.0/0 gateway=61.29.147.254 check-gateway=ping distance=0 \
scope=255 target-scope=10 comment="cnc" disabled=no
4,设置好监控的开关
/ tool netwatch
add host=221.229.122.105 timeout=1s interval=1m up-script=dxup \
down-script=dxdown comment="TEL" disabled=no
add host=61.29.147.254 timeout=1s interval=1m up-script=CNCup \
down-script=CNCdown comment="CNC" disabled=no
5,自动切换脚本
/ system script
add name="dxup" source="/ip route set \[/ip route find comment=TEL\] gateway \
221.229.122.105\n" policy=ftp,reboot,read,write,policy,test,winbox,password
add name="CNCup" source="/ip route set \[/ip route find comment=CNC\] gateway \
61.29.147.254\n" policy=ftp,reboot,read,write,policy,test,winbox,password
add name="dxdown" source=":if \(\[/tool netwatch get \[/tool netwatch find \
comment=CNC\] status\]=\"down\"\) do {/ip route set \[/ip route find \
comment=TEL\] gateway \[/ip address get \[/ip address find \
interface=pppoe-out1\] network\]} else {/ip route set \[/ip route find \
comment=TEL\] gateway 61.29.147.254}" \
policy=ftp,reboot,read,write,policy,test,winbox,password
add name="CNCdown" source=":if \(\[/tool netwatch get \[/tool netwatch find \
comment=TEL\] status\]=\"down\"\) do {/ip route set \[/ip route find \
comment=CNC\] gateway \[/ip address get \[/ip address find \
interface=pppoe-out1\] network\]} else {/ip route set \[/ip route find \
comment=CNC\] gateway 221.229.122.105}" \
policy=ftp,reboot,read,write,policy,test,winbox,password
到这,就能实现网通上网了,可电信不行,且在用winbox工具PING时,网通网关可通PING到,电信的PING 不到,但把电信的接到单机或路由上,设置好后,电信是可以上网的
IP\子掩吧\网关,221.229.122.106, 255.255.255.252, 221.229.122.105
现线等待回复................. |
|