ROS_网吧电信光纤固定IP网关网通ADSL动态IP网关(双线)Suitable for optical fiber with ADSL (zero dropped night canTelecom Netcom supplemented)
I am from the online tutorials, compared with the test, walkeda lot of detours, and try to make the script simple andpractical.
Telecommunications fiber optic data are as follows:
IP address: 111. 111. 111. 111/30
Gateway address: 111. 111. 111. 112
Network Name: CTC
CNC ADSL data:
Account number: ADSL
P as swor d: XXXXXX
Network Name: CNC
LAN data:
Routing intranet IP (intranet gateway) : 192. 168.0. 1/24Network Name: LAN
ROS installation (Baidu, yeah, everywhere)
Impl ementation
1, in/ip address configuration network IP, fiber optic TelecomIP
/ IP address
Add, address=192. 168.0. 1/24, interface=lan, comment=, "Lan""Add, address=111. 111. 111. 111/30, interface=ctc, comment=,"CTC""
2, configure the ADSL line
/interface pppoe-client configure ADSL dialing information.Let ADSL pull it up
/interface pppoe-client
Add, name=pppoe-out1, interface=cnc, user=adsl,password=xxxxxx
After ROS dial-up success, you will get ADSL dynamic IP anddynamic gateway, access to the gateway is ip->address in theinterface=pppoe-out1 network entries.
For example, the dial up IP is the address gateway in
222.222.222.223 and the 222. 222.222. 221 in the network
3. configure IP camouflage (shared Internet access)
/ip, firewall, src-nat, add, action, masquerade
4. conf igure routing (Gateway)
Default Telecom gateway 111. 111. 111. 112
The gateway for marking telecommunication is "CTC". The gatewayof CNC is "CNC", and the standby gateway is "ADSL" (used whenswitching lines)
CNC gateway casually add anti ADSL drop line, the foot has beenautomatically modified it
/ IP route
Add, dst-address=0.0.0.0/0, gateway=111. 111. 111. 112,comment=, "CTC""
Add, dst-address=0.0.0.0/0, gateway=222.222.222. 221,comment=, CNC, check-gateway=ping, rout ing-mark=cnc
Add, dst-address=0.0.0.0/0, gateway=222.222.222. 221,comment=, "ADSL", disable=yes
5. add CNC routing table.
Chengdu network (cnc1n.rsc download address:http://www.mikrotik.com.cn/down.asp in MikroTik RouterOS 2.9new telecommunications network script download)
The routing table is now more route rule add rules, the resourceoccupation is relatively small, previously added directly in/route requires each rule to enable the check-gateway function,repeat too much operation. Now only one gateway rule opens thecheck-gateway function to implement gateway detection andreduces the operation step.
Fix and add some new telecom and CNC addresses.
Six
Added ADSL to automatically switch the gateway' s task (toprevent ADSL from dropping scripts)
(take the IP address dynamic (Network) gateway to modify thegateway in IP route)
: local oldip
: local newip
Set newip, [/ip, address, [/ip, get, address, find, dynamic=yes,interface=pppoe-out 1] network]
Set, oldip, [/ip, route, get, [/ip, route, find, comment=cnc],gateway]
: if ($newip = = $oldip) do={
/ip, route, set, [/ip, route, f ind, comment=cnc] ,gateway=$newi p
}
Dynamic=yes (ADSL runs strong) dynamic=no (ADSL does not runstrong)
Now you can access Telecom, Telecom Access, CNC Netcom
7. after the automatic switching optical fibertelecommunications dropped into the ADSL line (by night)NetcomConfiguration / tool netwatch is used to monitor the on-off ofthe network
/ tool netwatch
Add, host=111. 111. 111. 112, timeout=1s, interval=1m,up-script=dxup, down-script=dxdown
Add the following script
Dxup (Telecom on line)
Dxdown (Telecom drop line)
Dxup (Telecom on line)
/ip, route, disable, [/ip, route, find, comment=adsl]/ip, route, enable, [/ip, route, f ind, comment=ctc]
/ip, route, enable, [/ip, route, f ind, comment=cnc]
Dxdown (Telecom drop line)
: local adslwg
: set, adslwg, [/ip, address, get, [/ip, address, f ind, ,dynamic=yes, interface=pppoe-out1] , network]
/ip, route, set, [/ip, route, f ind, comment=adsl],gateway=$adslwg
/ip, route, disable, [/ip, route, find, comment=ctc]
/ip, route, disable, [/ip, route, find, comment=cnc]
/ip, route, enable, [/ip, route, f ind, comment=adsl]
Enable enable disable disable (stop) remove removal
Disable=no enable disable=yes disable
The disable=no command means "no". "NO" stands for notprohibiting YES from importing the script, but it is forbiddenand does not enable him
The principle of optical fiber and ADSL line switch isautomatically disabled when the fiber dropped after routing andNetcom ADSL fiber-optic telecommunications shunting route,activate standby Netcom ADSL (single) (dynamic routing gatewayscript will automatically detect) . When the fiber recovery
after the disable Netcom ADSL standby (single) routing, enableTelecom and Netcom shunt the routing.
8. fill in DNS
The first method: IP--DNS--Settings, Primary, DNS, Tim Telecom,DNS, Seconday, DNS, Tim Netcom, the main DNS
Hit the hook on the Allow Remote Requests. If you don't hit it,it' s going to go wrong,
The client' s DNS fills the ROS intranet IP
Second methods:
Client preferred DNS Tim Telecom DNS
Spare DNS Tim Netcom DNS
弘速云是创建于2021年的品牌,运营该品牌的公司HOSU LIMITED(中文名称弘速科技有限公司)公司成立于2021年国内公司注册于2019年。HOSU LIMITED主要从事出售香港VPS、美国VPS、香港独立服务器、香港站群服务器等,目前在售VPS线路有CN2+BGP、CN2 GIA,该公司旗下产品均采用KVM虚拟化架构。可联系商家代安装iso系统。国庆活动 优惠码:hosu10-1产品介绍...
每年的7月的最后一个周五是全球性质的“系统管理员日”,据说是为了感谢系统管理员的辛苦工作....friendhosting决定从现在开始一直到9月8日对其全球9个数据中心的VPS进行4.5折(优惠55%)大促销。所有VPS基于KVM虚拟,给100M带宽,不限制流量,允许自定义上传ISO...官方网站:https://friendhosting.net比特币、信用卡、PayPal、支付宝、微信、we...
阿里云(aliyun)在这个月又推出了一个金秋上云季活动,到9月30日前,每天两场秒杀活动,包括轻量应用服务器、云服务器、云数据库、短信包、存储包、CDN流量包等等产品,其中Aliyun轻量云服务器最低60元/年起,还可以99元续费3次!活动针对新用户和没有购买过他们的产品的老用户均可参与,每人限购1件。关于阿里云不用多说了,国内首屈一指的云服务器商家,无论建站还是学习都是相当靠谱的。活动地址:h...