Application Example of routeros in China Netcom and China Telecom dual-line

Source: Internet
Author: User
Tags routeros
Article Title: application example of routeros in China Netcom and China Telecom dual-line. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

First, four network interfaces are defined to connect separately.
Cnc-line connecting China Netcom
Ctc-a line connecting China Telecom
Lan-connect to lan
Server -- connect to the server

[Admin @ MikroTik] interface> pr
Flags: X-disabled, D-dynamic, R-running
# Name type RX-RATE TX-RATE MTU
0 R server ether 0 0 1500
1 R ctc ether 0 0 1500
2 R cnc ether 0 0 1500
3 R lan ether 0 0 1500

Then, specify the ip addresses for these ports. China Netcom has two ip addresses: a. a. a.1, a. a.2, and China Telecom has three ip addresses:
B. B. B .1, B. B. B .2, B. B .3
The lan uses 192.168.0.0/24, the lan port ip is defined as 192.168.0.100, and the server port is used
192.168.100.0/24, with the ip address 192.168.100.1

[Admin @ MikroTik] ip address> pr
Flags: X-disabled, I-invalid, D-dynamic
# ADDRESS NETWORK BROADCAST INTERFACE
0 192.168.0.100/24 192.168.0.0 192.168.0.255 lan
1 a. a. a.1/29 cnc
2 B. B. B .1/25 ctc
3 192.168.100.1/24 192.168.100.0 192.168.100.255 server
4 a.a.2/29 cnc
5 B. B. B .2/25 ctc
6 B. B. B .3/25 ctc

China Netcom and China Telecom are interconnected. Therefore, China Telecom lines are used by default to access China Netcom lines.
Use the China Netcom line. All route table forums have

[Admin @ MikroTik] ip route> pr
Flags: X-disabled, I-invalid, D-dynamic, J-rejected,
C-connect, S-static, r-rip, o-ospf, B-bgp
# DST-ADDRESS G GATEWAY DISTANCE INTERFACE
0 S 0.0.0.0/0 r Telecom gateway 1 ctc
1 S 60.0.0.0/13 r Netcom gateway 1 cnc
2 S 60.8.0.0/15 r Netcom gateway 1 cnc
3 S 60.10.0.0/16 r Netcom gateway 1 cnc
Below .....

Create a DNS cache, set a DNS for China Telecom and China Netcom respectively, and set the dns for Intranet machines to the ip address of ros.

192.168.0.0/24 access the China Netcom line on the internet using a.a.a.m. to access the China Telecom line on the internet
And use B. B. B .1
192.168.100.0/24 access the China Netcom line on the internet using a.a.2 to access the China Telecom line on the internet
And use B. B. B .2

[Admin @ MikroTik] ip firewall src-nat> pr
Flags: X-disabled, I-invalid, D-dynamic
0 src-address = 192.168.100.0/24 out-interface = cnc action = nat to-src-
Address = a. a. a.2

1 src-address = 192.168.100.0/24 out-interface = ctc action = nat to-src-
Address = B. B. B .2

2 src-address = 192.168.0.0/24 out-interface = ctc action = nat to-src-
Address = B. B. B .1

3 src-address = 192.168.0.0/24 out-interface = cnc action = nat to-src-
Address = a. a. a.1



Here, 192.168.100.0/24 is basically used as a server and then mapped to the Internet.

[Admin @ MikroTik] ip firewall dst-nat> pr
Flags: X-disabled, I-invalid, D-dynamic
0; ftp @ web server
Dst-address = a. a. a.2/32: 2121 protocol = tcp action = nat to-dst-
Address = 192.168.100.2 to-dst-port = 2121

1; web server
Dst-address = a. a. a.2/32: 80 protocol = tcp action = nat to-dst-
Address = 192.168.100.2 to-dst-port = 80

2; radmin
In-interface = cnc dst-address = a. a.2/32: xxxx protocol = tcp action = nat
To-dst-address = 192.168.100.2
To-dst-port = 3389

3; cs 1.5 server
In-interface = ctc dst-address = B. B. B .1/32: 27015 protocol = udp action = nat
To-dst-address = 192.168.0.195 to-dst-port = 27015

4 in-interface = cnc dst-address = a. a. a.1/32: 27015 protocol = udp
Action = nat to-dst-address = 192.168.0.195
To-dst-port = 27015

Below .....

At home China Netcom, the unit uses telecommunications, and sometimes it is inconvenient to solve the interconnection problem. Now that the network can be implemented
For communication between China Telecom and China Telecom, I want to make it easy for myself: I have set up pptp-server and left several ppp
Account, which can be used together as needed. It is really good.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.