RouterOS多区域×××设置指南
PPTP设置
总公司设置
1、添加PPTP用户
CODE
ppp secret> add name=branch1 service=pptp password=12345
local-address=10.0.0.254 remote-address=10.0.0.1
ppp secret> add name=branch2 service=pptp password=12345
local-address=10.0.0.254 remote-address=10.0.0.2

2、在PPTP服务列表中添加上述两个用户
CODE
interface pptp-server> add user=branch1
interface pptp-server> add user=branch2

3、启用PPTP服务
CODE
interface pptp-server server> set enabled=yes


分公司1设置
添加PPTP客户端
CODE
interface pptp-client> add connect-to=202.202.200.1 user=branch1 \
\... password=12345 disabled=no


分公司2设置
添加PPTP客户端
CODE
interface pptp-client> add connect-to=202.202.200.1 user=branch2 \
\... password=12345 disabled=no
至此3个网络的PPTP隧道已经建立,在总公司路由器上可以ping到10.0.0.1和10.0.0.2,两个分公司则只可以ping到10.0.0.254,三个内网也不能互通。

路由设置
总公司
CODE
ip route add dst-address 192。168.1.0/24 gateway 10.0.0.1
ip route add dst-address 192。168.2.0/24 gateway 10.0.0.2

分公司1
CODE
ip route add dst-address 192。168.0.0/24 gateway 10.0.0.254

分公司2
CODE
ip route add dst-address 192。168.0.0/24 gateway 10.0.0.254

现在总公司分别与两个分公司的网络可以互通,但两个分公司之间还不能互通,所以还需要在分公司的路由器上添加路由规则
分公司1
CODE
ip route add dst-address 10.0.0.0/24 gateway 10.0.0.254
ip route add dst-address 192.168.2.0/24 gateway 10.0.0.254

分公司2
CODE
ip route add dst-address 10.0.0.0/24 gateway 10.0.0.254
ip route add dst-address 192.168.1.0/24 gateway 10.0.0.254

至此三个网络之间可以完全互联互通

 


---------------------------------------------------------------------------

EOIP:

Ethernet over IP (EoIP) 隧道将在Ethernet之间建立一个连接。
可以工作的环境:lans over internet;LANs over encrypted tunnels ;LANs over 802.11b 'ad-hoc' wireless networks


1。首先创建ppptp tunnel,首先假设有两台os电脑,一台是Our_GW ,(另一台为Remote)

CODE
[admin@Our_GW] interface pptp-server> /ppp secret add name=joe service=pptp password=top_s3 local-address=10.0.0.1 remote-address=10.0.0.2

[admin@Our_GW] interface pptp-server> add name=from_remote user=joe

[admin@Our_GW] interface pptp-server> server set enable=yes




而Remote router 就是一个pptp client:

CODE
[admin@Remote] interface pptp-client> add name=pptp user=joe connect-to=192.168.1.1 password=top_s3 mtu=1500 mru=1500


[admin@Remote] interface pptp-client> enable pptp



2。接着配置EOIP增加到两个os路由的连接中去,通过刚刚用ppptp拨号建立的ppptp 隧道
在Our_GW设置:

CODE
[admin@Our_GW] interface eoip> add name="eoip-remote" tunnel-id=0 remote-address=10.0.0.2
[admin@Our_GW] interface eoip> enable eoip-remote




在Remote设置:

CODE
[admin@Remote] interface eoip> add name="eoip" tunnel-id=0 remote-address=10.0.0.1

[admin@Remote] interface eoip> enable eoip-main



3。桥接EOIP
在Our_GW上设置:

CODE
[admin@Our_GW] interface bridge> add forward-protocols=ip,arp,other disabled=no

[admin@Our_GW] interface bridge> port print
Flags: X - disabled
# INTERFACE BRIDGE
0 eoip-remote none
1 office-eth none
2 isp none


[admin@Our_GW] interface bridge> port set "0,1" bridge=bridge1

(这里的0,1是对应上面的print)

同样要在Remote设置:

CODE
[admin@Remote] interface bridge> add forward-protocols=ip,arp,other disabled=no


[admin@Remote] interface bridge> port print
Flags: X - disabled
# INTERFACE BRIDGE
0 ether none
1 adsl none
2 eoip-main none

[admin@Remote] interface bridge> port set "0,2" bridge=bridge1

(说明同上)


注意:EOIP的MAC 地址是自己设置的,取间位于00-00-5E-80-00-00 to 00-00-5E-FF-FF-FF

两个os的eoip的MAC地址不能一样。。

这些都是用熟悉ROUTER OS了以后的才做,既然有人有兴趣,就贴一下吧,上面大都是官方的设置方法,都没有错误。