找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 3664|回复: 3

[负载平衡] 请教nth问题

[复制链接]
发表于 2008-6-27 09:17:16 | 显示全部楼层 |阅读模式

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

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

×
/ ip address

add address=192.168.0.1/24 network=192.168.0.0 broadcast=192.168.0.255 interface=Local

add address=10.111.0.2/24 network=10.111.0.0 broadcast=10.111.0.255 interface=wlan2

add address=10.112.0.2/24 network=10.112.0.0 broadcast=10.112.0.255 interface=wlan1



/ ip firewall mangle

add chain=prerouting in-interface=Local connection-state=new nth=1,1,0 \

    action=mark-connection new-connection-mark=odd passthrough=yes

add chain=prerouting in-interface=Local connection-mark=odd action=mark-routing \

    new-routing-mark=odd passthrough=no

add chain=prerouting in-interface=Local connection-state=new nth=1,1,1 \

    action=mark-connection new-connection-mark=even passthrough=yes

add chain=prerouting in-interface=Local connection-mark=even action=mark-routing  new-routing-mark=even passthrough=no



/ ip firewall nat

add chain=srcnat connection-mark=odd action=src-nat to-addresses=10.111.0.2 \

    to-ports=0-65535

add chain=srcnat connection-mark=even action=src-nat to-addresses=10.112.0.2 \

    to-ports=0-65535



/ ip route

add dst-address=0.0.0.0/0 gateway=10.111.0.1 scope=255 target-scope=10 routing-mark=odd

add dst-address=0.0.0.0/0 gateway=10.112.0.1 scope=255 target-scope=10 routing-mark=even

add dst-address=0.0.0.0/0 gateway=10.112.0.1 scope=255 target-scope=10

这个方案有没有人做过,我试了可不行,怀疑ip firewall nat 中应为routeing-mark=even/odd  但是无论怎样都不行,请教高人
routeros
发表于 2008-6-27 15:05:06 | 显示全部楼层
你的/ip route 和/ ip firewall nat 没有做相应的comment,肯定不行了!
routeros
回复

使用道具 举报

发表于 2008-9-11 23:11:09 | 显示全部楼层
为什么一定要有"comment"? 这不是注释吗~
routeros
回复

使用道具 举报

发表于 2008-9-12 06:58:07 | 显示全部楼层
你怎么个不行,晕死,现在要回答问题真难
routeros
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-18 11:26 , Processed in 0.058597 second(s), 6 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2023 Discuz! Team.

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