1、下载光盘iso,刻盘,然后将硬盘设为主盘,接在第一个ide口上,光驱随便接哪个都行,设置城光盘启动,开始安装。——我一开始将硬盘接ide2上了,结果安装正常,就是安装完一旦取出光盘,就运行不正常了。
2、固定光纤的话,不需要选择其他的附加模块就能用,如果客户机比较多,可以选择web proxy, 然后按i安装,完毕重新启动机器,注意要将光盘取出或是改为从硬盘启动。 在另一机器上算出注册号码,注意在算号器中要严格按照机器给出的输入,注意大小写,在routeos机器上输入注册号码就不考虑大小写了,甚至连中间的"-" 都可以省掉!
3、接下来需要登录,用户名:admin ,密码为空,成功登录后提示符是这样子:
[admin@MikroTik]>
后面可以输入一些命令,知道命令的话可以输入 ?察看当前可以使用的命令,此时需要做的是输入:setup , 然后系统提示enable interface :ether1, 回车,在ip address :后输入你想用的内网卡地址,一般是192.168.0.1之类,然后是子网掩码:255.255.255.0, 随后是输入网关:注意固定ip用户这里要输入isp提供的网关地址,例如我用的 61.182.238.1
4、在一台装了win98的系统的计算机上安装好网卡。把网卡的IP地址设置为:ip地址:192.168.0.10,子网掩码:255.255.255.0,网关:192.168.0.1,DNS:192.168.0.1
然后把路由的内网网卡和win98的网卡连通。然后在win98的IE里输入192.168.0.1 系统打开一个网页。按照提示。选那个downl....下在winbox。保存到硬盘里。运行winbox。Connect To:输入192.168.0.1、Login:输入admin、password:空白,点击Connect,登录后打开一个新的窗口,这就是winbox的管理界面。接着你需要启用ether2,点击Interface,单击灰色的ether2,单击窗口上的兰色勾。
5、选 ip address 添加isp提供的的合法地址,注意这里需要选择interface为ether2,也就是连结外部的那块网卡,我的是填入 :61.182.238.128/28。
6、察看 ip routes 应该显示有三条: 一条的标志为 s ,另两条标志为 DC。
此时,选择 tools ping ,在ping to 中填入isp给你的网关ip,点ping ,应该能看到回应。
7、 ip firewall 中,在source nat中添加一项:除掉acction 选择masquerade外其他默认,此时设置完成。
8、设置你的客户机 ip域routeos同一网段、网关routeos内网卡ip,dns可以用isp提供的,这样就可以上网了!
9、 如果安装时你选择了dns cache,那可以选择 ip dns cache ,然后在dns cache seting 中启用,即勾选 enable ,再在ip dns 中加入isp提供的 dns的ip地
址。这样客户机的dns可以指向routeos的地址。另外这里还可以实现内部主机域名的解析。
10、如果你选择了web proxy ,那可以在ip web proxy 选择setting,然后勾选enable,注意下面的maximum cache size 是缓存大小,根据你自己需要选择,默认是不缓存的。 这样的话,下面的客户机可以不设置网关,而是在ie的连结属性中加上代理服务器的地址,端口3128.
如果内部有需要对外发布的服务,例如ftp、web等,可以在ip firewall 的destination nat中设置,添加是注意:dst.address 要用你对外的ip,选择相应的协议,端口号,另外acction中选择 nat ,天上内网对应主机ip 、端口号。
ip firewall的 filter rules 则是添加一些防火墙规则的,可以登录 : demo.mt.lv看看人家的设置,另外可以参考一些其他资料。
RouteOS光纤和ADSL负载平衡的实现
版本:2.7.12
许可:基本许可
功能包:PPP,advacend tools
基本情况:用户有两条INTERNET线路,一条是使用中国电信光纤10M,另一条是使用中国电信4MADSL.使用IP伪装使一个有200个终端局域网共享
上网。RouteOS共有3块网卡,ether1用于ADSL,ether2用于光纤,ether3用于连接终端。
目的:实现负载平衡,并且在其中一条线路断掉后自动切换为单线路,线路恢复后,继续使用负载平衡。
实施:
1、配置光纤线路
在/ip address中为光纤线路配置IP地址,子网掩码。
/ip address add address 61.139.77.77 mask 24 interface ether2
2、配置ADSL线路
/interface pppoe-client 配置ADSL拨号信息。
/interface pppoe-client add name pppoe-line1 service CHN-telecom/ user rh999@169 password kkjjh interface ether1 use-peer-dns yes mtu 1942 mru 1942
3、配置IP伪装
/ip firewall src-nat add action masquerade
/ip firewall mangle add protocol tcp tcp-options syn-only tcp-mss 1448
4、配置路由
/ip route add dst 0.0.0.0/0 gat 61.139.77.1,218.88.32.1 (注:61.139.77.1为光纤的网关,218.88.32.1则为ADSL的网关)
/ip route add dst 61.139.88.105/32 get 218.88.32.1(注:如果ADSL连通后PING不通网关的话,才加这条,如果PING得通则不须要。)
5、配置自动切换脚本
/system script add name="downadsl" source="/in pppoe-client dis [/in pppoe-client find name pppoe-lin owner="admin" policy=reboot,read,write,policy,test
/system script add name="upf" source="/ip route set[/ip route find dst 0.0.0.0] gateway 61.139.73.1,218.88.32.1" owner="admin" policy=reboot,read,write,policy,test
/system script add name="downf" source="/ip route set[/ip route find dst 0.0.0.0] gateway 218.88.32.1 owner="admin" policy=reboot,read,write,policy,test
/system script add name="upadsl" source="/ip route set[/ip route find dst 0.0.0.0] gateway 61.139.73.1,218.88.32.1" owner="admin" policy=reboot,read,write,policy,test
6、配置NETWATCH用于监视网络的通断情况。
/tool netwatch add host=61.157.88.105 timeout=1s interval=5s up-script=upadsl down-script=downadsl
(注:61.157.88.105是监视ADSL是否通的IP,也可以是ADSL的网关。)
/tool netwatch add host=61.139.73.1 timeout=1s interval=5s up-script=upf down-script=downf
至此配置完成,注你成功。
功能包可以到www.mikrotik.com.cn上下载相应版本的功能包。