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年9月中秋特惠优惠促销来源:数脉科技 编辑:数脉科技编辑部 发布时间:2021-09-11 03:31尊敬的新老客户:9月优惠促销信息如下,10Mbps、 30Mbps、 50Mbps、100Mbps香港优质或BGPN2、阿里云线路、华为云线路,满足多种项目需求!支持测试。全部线路首月五折起。数脉官网 https://my.shuhost.com/香港特价数脉阿里云华为云 10MbpsCN...
hostslim美国独立日活动正在进行中,针对一款大硬盘荷兰专用服务器:双E5-2620v2/4x 1TB SATA硬盘,活动价60美元月。HostSlim荷兰服务器允许大人内容,不过只支持电汇、信用卡和比特币付款,商家支持7天内退款保证,有需要欧洲服务器的可以入手试试,记得注册的时候选择中国,这样不用交20%的税。hostslim怎么样?HostSlim是一家成立于2008年的荷兰托管服务器商,...
继阿里云服务商推出轻量服务器后,腾讯云这两年对于轻量服务器的推广力度还是比较大的。实际上对于我们大部分网友用户来说,轻量服务器对于我们网站和一般的业务来说是绝对够用的。反而有些时候轻量服务器的带宽比CVM云服务器够大,配置也够好,更有是价格也便宜,所以对于初期的网站业务来说轻量服务器是够用的。这几天UCLOUD优刻得香港服务器稳定性不佳,于是有网友也在考虑搬迁到腾讯云服务器商家,对于轻量服务器官方...