网关ROS_网吧电信光纤固定IP网关 网通ADSL动态IP网关(双线)

双线双ip  时间:2021-01-13  阅读:()

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

乐凝网络支持24小时无理由退款,香港HKBN/美国CERA云服务器,低至9.88元/月起

乐凝网络怎么样?乐凝网络是一家新兴的云服务器商家,目前主要提供香港CN2 GIA、美国CUVIP、美国CERA、日本东京CN2等云服务器及云挂机宝等服务。乐凝网络提供比同行更多的售后服务,让您在使用过程中更加省心,使用零云服务器,可免费享受超过50项运维服务,1分钟内极速响应,平均20分钟内解决运维问题,助您无忧上云。目前,香港HKBN/美国cera云服务器,低至9.88元/月起,支持24小时无理...

Megalayer(月599元)限时8月香港和美国大带宽服务器

第一、香港服务器机房这里我们可以看到有提供四个大带宽方案,是全向带宽和国际带宽,前者适合除了中国大陆地区的全网地区用户可以用,后者国际带宽适合欧美地区业务。如果我们是需要大陆地区速度CN2优化的,那就需要选择常规的优化带宽方案,参考这里。CPU内存硬盘带宽流量价格选择E3-12308GB240GB SSD50M全向带宽不限999元/月方案选择E3-12308GB240GB SSD100M国际带宽不...

HoRain Cloud:国内特价物理机服务器,镇江机房,内地5线BGP接入,月付499元起

horain怎么样?horain cloud是一家2019年成立的国人主机商家,隶属于北京辰帆科技有限公司,horain持有增值电信业务经营许可证(B1-20203595),与中国电信天翼云、腾讯云、华为云、UCloud、AWS等签署渠道合作协议,主要提企业和个人提供云服务器,目前商家推出了几款特价物理机,都是在内地,性价比不错,其中有目前性能比较强悍的AMD+NVMe系列。点击进入:horain...

双线双ip为你推荐
主机空间主机空间和流量的具体意思!cm域名注册cm域名是什么含义?价格是多少?注册地址是多少?有什么投资价值?vps主机vps主机用途有哪些?免费国内空间中国有什么免费的空间论坛虚拟主机论坛虚拟主机的IP地址在后台的那个地方呀域名解析什么是域名解析,为什么要域名解析免费域名有哪些免费域名域名服务器服务器与域名的区别万网域名都说万网的域名好,有哪些优势?域名升级访问拼多多问题升级通知什么意思?
fdcservers 精品网 vmsnap3 主机合租 建立邮箱 国外代理服务器软件 什么是服务器托管 路由跟踪 英雄联盟台服官网 中国电信宽带测速 vim 报警主机 中国最年轻博士 web服务器搭建软件 关闭空间申请 **tp服务器是什么 免费mysql空间 深圳摇号申请网站 北京居住证申请网站 免费网络相册 更多