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
? ? ? ?创梦网络怎么样,创梦网络公司位于四川省达州市,属于四川本地企业,资质齐全,IDC/ISP均有,从创梦网络这边租的服务器均可以****,属于一手资源,高防机柜、大带宽、高防IP业务,另外创梦网络近期还会上线四川联通大带宽,四川联通高防IP,一手整CIP段,四川电信,联通高防机柜,CN2专线相关业务。成都优化线路,机柜租用、服务器云服务器租用,适合建站做游戏,不须要在套CDN,全国访问快...
官方网站:点击访问火数云活动官网活动方案:CPU内存硬盘带宽流量架构IP机房价格购买地址4核4G50G 高效云盘20Mbps独享不限openstack1个九江287元/月立即抢购4核8G50G 高效云盘20Mbps独享不限openstack1个九江329元/月立即抢购2核2G50G 高效云盘5Mbps独享不限openstack1个大连15.9元/月立即抢购2核4G50G 高效云盘5Mbps独享不限...
lcloud怎么样?lcloud零云,UOVZ新开的子站,现在沪港iplc KVM VPS有端午节优惠,年付双倍流量,200Mbps带宽,性价比高。100Mbps带宽,500GB月流量,10个,512MB内存,优惠后月付70元,年付700元。另有国内独立服务器租用,泉州、佛山、成都、德阳、雅安独立服务器低至400元/月起!点击进入:lcloud官方网站地址lcloud零云优惠码:优惠码:bMVbR...