找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 2372|回复: 2

[其它] 请问如何做多进多出的路由?

[复制链接]
发表于 2005-4-28 19:14:36 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

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

×
请问如何做多进多出的路由?比如一条光钎进出口/192.168.0.1+一条ADSL进出口/192.168.0.2客机直接输入其中的一个网关自动走其中一条线路。
routeros
发表于 2005-4-28 21:21:20 | 显示全部楼层
客户机掩码用255.255.254.0就可以。而且两条线互备。/ ip address add address=192.168.0.254/24 network=192.168.0.0 broadcast=192.168.0.255 \    interface=LAN comment="added by setup" disabled=no add address=192.168.1.254/24 network=192.168.1.0 broadcast=192.168.1.255 \    interface=LAN1 comment="added by setup" disabled=no add address=XXX.XXX.220.116/27 network=XXX.XXX.220.96 broadcast=XXX.XXX.220.127 \    interface=WAN comment="" disabled=no add address=XXX.XXX.228.220/27 network=XXX.XXX.228.192 \    broadcast=XXX.XXX.228.223 interface=ADSL comment="" disabled=no/ ip policy-routing add name="table1" / ip policy-routing rule add src-address=0.0.0.0/0 dst-address=0.0.0.0/0 flow="" interface=LAN1\    action=lookup table=table1 comment="" disabled=no add src-address=0.0.0.0/0 dst-address=0.0.0.0/0 flow="" interface=all \    action=lookup table=main comment="" disabled=no / ip policy-routing table main add dst-address=0.0.0.0/0 gateway=XXX.XXX.220.97 preferred-source=0.0.0.0 \    comment="" disabled=no / ip policy-routing table table1 add dst-address=0.0.0.0/0 gateway=XXX.XXX.228.193 preferred-source=0.0.0.0 \    comment="" disabled=no/ system script add name="table1down" source="/ ip policy-routing table table1 \n\nset \[/ \    ip policy-routing table table1 find dst-address=0.0.0.0\] gateway \    XXX.XXX.220.97\n\n" policy=ftp,reboot,read,write,policy,test add name="table1up" source="/ ip policy-routing table table1 \n\nset \[/ ip \    policy-routing table table1 find dst-address=0.0.0.0\] gateway \    XXX.XXX.228.193\n\n" policy=ftp,reboot,read,write,policy,test add name="maindown" source="/ ip policy-routing table main \n\nset \[/ ip \    policy-routing table main find dst-address=0.0.0.0\] gateway \    XXX.XXX.228.193" policy=ftp,reboot,read,write,policy,test add name="mainup" source="/ ip policy-routing table main\n\n set \[/ ip \    policy-routing table main find dst-address=0.0.0.0\] gateway \    XXX.XXX.220.97" policy=ftp,reboot,read,write,policy,test / tool netwatch add host=XXX.XXX.220.97 timeout=2s interval=10s up-script=mainup \    down-script=maindown comment="" disabled=no add host=XXX.XXX.228.193 timeout=2s interval=15s up-script=table1up \    down-script=table1down comment="" disabled=no
routeros
回复

使用道具 举报

 楼主| 发表于 2005-5-2 04:09:43 | 显示全部楼层
还是看不懂~不用改掩码的做法有吗?
routeros
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|小黑屋|软路由 ( 渝ICP备15001194号-1|渝公网安备 50011602500124号 )

GMT+8, 2024-9-20 13:49 , Processed in 0.054570 second(s), 4 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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