必须手动设置网卡名为wan,内网为lan否则脚本运行出错= 本脚本增加vlan,bridge,adsl,route,修改mss,地址池,pppoe-server=:globallanip;。:globalserip;。 wan数量,默认24条。:setw20;。 vlan开始序列号。:seth1;。 vlan开始id号。:setj2;。:setlanip192.168.10.0/24;。:setserip10.10.10.10;。/ipfimanachain=forwardaction=change-mssnew-mss=clamp-to-pmtutcp-flags=synprotocol=tcp。/ipfiaddaddaddress="$lanip"dROSbled=nolist="lan_ip"。/ippooladdname=pppoeranges="$lanip"。pproaddname=pppoelocal-address="$serip"remote-address=pppoeonly-one=yeschange-tcp-mss=no。 增加拨号ROS。/interfacepppoe-serverserveraddinterface=lanone-session-per-host=yesservice-name=pppoedis=no。/ipfinatachain=srcnatsrc-address-list="lan_ip"action=masquerade。 增加vlan接口。/intvlanaddname=("vlan"."$h")int=wanvlan-id="$j"dis=no。/intbraddname=("bridge"."$h")admin-mac=("00:1F:3B:3A:2B:"."$h")auto-mac=no。/intbrporaddbridge=("bridge"."$h")interface=("vlan"."$h")。 增加adsl拨号。 /intpppoe-claddname=("pppoe-out"."$h")int=("bridge"."$h")dis=nouse-peer-dns=yesuser=123pass=123。/iprouteagateway=("pppoe-out"."$h")routing-mark=("r"."$h")。/iprouteagateway=("pppoe-out"."$h")distance=$。:seth($h+1)。:setj($j+1)。ROS好能打二层vlan标签qinq。编写于2011年11月13日v2版。 |
不良信息举报Q:2000617|Archiver|ROS软路由论坛 ROSABC.com 网络方案网络工程交流
GMT+8, 2025-5-17 21:23 , Processed in 0.135935 second(s), 15 queries .
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.