ROS_网吧电信光纤固定IP网关网通ADSL动态IP网关(双线)Suitable for optical fiber with ADSL (zero dropped night can Telecom Netcom supplemented)
I am from the online tutorials, compared with the test, walked a lot of detours, and try to make the script simple and practical.
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 Telecom IP
/ 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 and dynamic gateway, access to the gateway is ip->address in the interface=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 gateway of CNC is "CNC", and the standby gateway is "ADSL" (used when switching lines)
CNC gateway casually add anti ADSL drop line, the foot has been automatically 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 resource occupation 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 the check-gateway function to implement gateway detection and reduces the operation step.
Fix and add some new telecom and CNC addresses.
Six
Added ADSL to automatically switch the gateway' s task (to prevent ADSL from dropping scripts)
(take the IP address dynamic (Network) gateway to modify the gateway 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 run strong)
Now you can access Telecom, Telecom Access, CNC Netcom
7. after the automatic switching optical fiber telecommunications dropped into the ADSL line (by night)Netcom Configuration / tool netwatch is used to monitor the on-off of the 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 not prohibiting YES from importing the script, but it is forbidden and does not enable him
The principle of optical fiber and ADSL line switch is automatically disabled when the fiber dropped after routing and Netcom ADSL fiber-optic telecommunications shunting route,activate standby Netcom ADSL (single) (dynamic routing gateway script will automatically detect) . When the fiber recovery
after the disable Netcom ADSL standby (single) routing, enable Telecom 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
快云科技怎么样?快云科技是一家成立于2020年的新起国内主机商,资质齐全 持有IDC ICP ISP等正规商家。云服务器网(yuntue.com)小编之前已经介绍过很多快云科技的香港及美国云服务器了,这次再介绍一下新的优惠方案。目前,香港云沙田CN2云服务器低至29元/月起;美国超防弹性云/洛杉矶CUVIP低至33.6元/月起。快云科技的云主机架构采用KVM虚拟化技术,全盘SSD硬盘,RAID10...
想必我们有一些朋友应该陆续收到国内和国外的域名注册商关于域名即将涨价的信息。大概的意思是说从9月1日开始,.COM域名会涨价一点点,大约需要单个9.99美元左右一个。其实对于大部分用户来说也没多大的影响,毕竟如今什么都涨价,域名涨一点点也不要紧。如果是域名较多的话,确实增加续费成本和注册成本。今天整理看到Dynadot有发布新的八月份域名优惠活动,.COM首年注册依然是仅需48元,本次优惠活动截止...
horain怎么样?horain cloud是一家2019年成立的国人主机商家,隶属于北京辰帆科技有限公司,horain持有增值电信业务经营许可证(B1-20203595),与中国电信天翼云、腾讯云、华为云、UCloud、AWS等签署渠道合作协议,主要提企业和个人提供云服务器,目前商家推出了几款特价物理机,都是在内地,性价比不错,其中有目前性能比较强悍的AMD+NVMe系列。点击进入:horain...