1、路由器的命令及解释路由器的命令及各命令的解释 #RouterOS命令解释#-#1、未解释的命令为系统初始默认设置。#2、所有命令为实际环境测试并使用的,保证没有问题,包括VPN部分和PPPoE的设置也可正常使用。#3、使用这些命令时,要根据自己网络环境做相应修改,特别是ADSL拨号部分和手动设置IP部分要做相应改变。#4、注意这里没有管理员密码修改命令,请注意管理员密码。#5、为了保护隐私,有些设置项用“*”号代替,请根据实际需要修改或补充完整。#-# jan/14/2009 08:46:50 by RouterOS 2.9.27# software id = FQM8-46T#-# 设置内网
2、外网接口名称、启用内网外网接口、内网接口ARP模式为只回应(配合ARP绑定避免ARP欺骗)。/ interface ethernet set wan name=wan mtu=1500 mac-address=00:0A:EB:43:FA:F0 arp=enabled disable-running-check=yes auto-negotiation=yes full-duplex=yes cable-settings=default speed=100Mbps comment= disabled=no set lan name=lan mtu=1500 mac-address=00:E0:
3、4C:9E:5B:23 arp=reply-only disable-running-check=yes auto-negotiation=yes full-duplex=yes cable-settings=default speed=100Mbps comment= disabled=no #-#设置L2TP服务,因为XP连接此服务需要对XP注册表进行修改,所以不推荐使用L2TP服务。/ interface l2tp-server server set enabled=yes max-mtu=1460 max-mru=1460 authentication=pap,chap,mschap1
4、,mschap2 default-profile=default-encryption #-#设置PPPoE服务,客户机使用路由器中的PPPoE服务进行上网,可避免ARP欺骗,并且可进行简单的用户认证。/ interface pppoe-server server add service-name=pppoe-service1 interface=lan max-mtu=1488 max-mru=1488 authentication=pap,chap,mschap1,mschap2 keepalive-timeout=10 one-session-per-host=no max-sessio
5、ns=0 default-profile=pppoe-service-profile disabled=no #-#添加PPTP服务器接口,远程办公人员可通过PPTP服务器接口连接到公司网络,它是VPN连接的一种方式。/ interface pptp-server add name=pptp-in1 user= disabled=no #-#设置PPTP服务器/ interface pptp-server server set enabled=yes max-mtu=1460 max-mru=1460 authentication=pap,chap,mschap1,mschap2 keepal
6、ive-timeout=120 default-profile=default-encryption #-#配置外网接口为ADSL拨号/ interface pppoe-client add name=pppoe-out1 max-mtu=1480 max-mru=1480 interface=wan user=nj*nj1.201 password=* profile=default service-name= ac-name= add-default-route=yes dial-on-demand=no use-peer-dns=no allow=pap,chap,mschap1,msc
7、hap2 disabled=no #-#建立多个IP地址池,这些IP地址池被DHCP服务、PPPOE服务、L2TP服务和PPTP服务使用。/ ip pool add name=dhcp ip pool ranges=192.168.0.181-192.168.0.190 add name=pppoe-service-pool ranges=10.0.1.181-10.0.1.190 add name=l2tp-service-pool ranges=10.0.3.181-10.0.3.190 add name=pptp-server-pool ranges=10.0.2.181-10.0.2.
8、190 #-/ ip telephony region / ip telephony gatekeeper set gatekeeper=none remote-id= remote-address=0.0.0.0 / ip telephony aaa set use-radius-accounting=no interim-update=0s / ip telephony codec move G.711-uLaw-64k/sw move G.711-ALaw-64k/sw move G.729A-8k/sw move G.729-8k/sw move G.723.1-6.3k/sw mov
9、e GSM-06.10-13.2k/sw move LPC-10-2.5k/sw / ip accounting set enabled=no account-local-traffic=no threshold=256 / ip accounting web-access set accessible-via-web=no address=0.0.0.0/0 #-#修改路由器的服务端口/ ip service set telnet port=23 address=0.0.0.0/0 disabled=no set ftp port=2121 address=0.0.0.0/0 disable
10、d=no set www port=8080 address=0.0.0.0/0 disabled=no set ssh port=22 address=0.0.0.0/0 disabled=no set www-ssl port=443 address=0.0.0.0/0 certificate=none disabled=yes #-/ ip upnp set enabled=no allow-disable-external-interface=yes show-dummy-rule=yes #-#绑定ARP/ ip arp add address=192.168.0.3 mac-add
11、ress=00:15:F2:CF:F7:8A interface=lan comment= disabled=no add address=192.168.0.10 mac-address=00:1D:60:8D:40:65 interface=lan comment= disabled=no add address=192.168.0.12 mac-address=00:E0:A0:13:9B:97 interface=lan comment= disabled=no add address=192.168.0.18 mac-address=00:134:C5:5C:60 interface
12、=lan comment= disabled=no add address=192.168.0.26 mac-address=00:15:F2:3A:E7:B2 interface=lan comment= disabled=no add address=192.168.0.32 mac-address=00:1D:608:67:19 interface=lan comment= disabled=no add address=192.168.0.250 mac-address=00:0B:6A:89:F7:CE interface=lan comment= disabled=no add a
13、ddress=192.168.0.251 mac-address=00:E0:4C:71:BD:4B interface=lan comment= disabled=no add address=192.168.0.244 mac-address=00:0E:A6:8A:9C:83 interface=lan comment= disabled=no add address=192.168.0.1 mac-address=00:1A:92:EF:B1:9D interface=lan comment= disabled=no add address=192.168.0.14 mac-addre
14、ss=00:15:F2:EB:F7:CC interface=lan comment= disabled=no add address=192.168.0.30 mac-address=00:15:F2:90:5C3 interface=lan comment= disabled=no add address=192.168.0.37 mac-address=00:1D:60:D8:68:EE interface=lan comment= disabled=no add address=192.168.0.44 mac-address=00:1B:FC:5B:0E:3D interface=l
15、an comment= disabled=no add address=192.168.0.49 mac-address=00:13:D4:D3:13:24 interface=lan comment= disabled=no add address=192.168.0.53 mac-address=00:15:F2:EB:F8:5B interface=lan comment= disabled=no add address=192.168.0.247 mac-address=00:0F:1F:81:73:21 interface=lan comment= disabled=no add a
16、ddress=192.168.0.252 mac-address=00:02:B3:38:3A:C5 interface=lan comment= disabled=no add address=192.168.0.201 mac-address=00:1B:FC:92:1D:F8 interface=lan comment= disabled=no add address=192.168.0.225 mac-address=00:17:31:42:F5:BF interface=lan comment= disabled=no add address=192.168.0.227 mac-ad
17、dress=00:1A:4D:95:EB:0D interface=lan comment= disabled=no add address=192.168.0.36 mac-address=00:1A:92:98:98:3B interface=lan comment= disabled=no add address=192.168.0.43 mac-address=00:1A:92:D6:CE:2E interface=lan comment= disabled=no add address=192.168.0.62 mac-address=00:1F:C6:22:34:BB interf
18、ace=lan comment= disabled=no add address=192.168.0.64 mac-address=00:15:F2:EB:F9:3D interface=lan comment= disabled=no add address=192.168.0.253 mac-address=00:0F:CB:73:24:20 interface=lan comment= disabled=no add address=192.168.0.22 mac-address=00:15:F2:EB:F8:5F interface=lan comment= disabled=no
19、add address=192.168.0.58 mac-address=00:1F:C6:C8:EC:07 interface=lan comment= disabled=no add address=192.168.0.66 mac-address=00:1D:60:45:6C:30 interface=lan comment= disabled=no add address=192.168.0.48 mac-address=00:1A:92:98:98:A2 interface=lan comment= disabled=no add address=192.168.0.57 mac-a
20、ddress=00:15:F2:3A:E7:C6 interface=lan comment= disabled=no add address=192.168.0.59 mac-address=00:1E:8C:26:13:5D interface=lan comment= disabled=no add address=192.168.0.202 mac-address=00:11:D8:C4:A7:0B interface=lan comment= disabled=no add address=192.168.0.203 mac-address=00:E0:4C:39:1C:B0 int
21、erface=lan comment= disabled=no add address=192.168.0.204 mac-address=00:18:F3:FE:B8:14 interface=lan comment= disabled=no add address=192.168.0.206 mac-address=00:1F:C6:AB:F7:9F interface=lan comment= disabled=no add address=192.168.0.207 mac-address=00:0C:6E:3F:78:E2 interface=lan comment= disable
22、d=no add address=192.168.0.208 mac-address=00:1A:92:EF:B0:39 interface=lan comment= disabled=no add address=192.168.0.209 mac-address=00:13:D4:C5:5B:68 interface=lan comment= disabled=no add address=192.168.0.210 mac-address=00:15:F2:EB:F8:C4 interface=lan comment= disabled=no add address=192.168.0.
23、215 mac-address=00:1B:FC:92:1C:6D interface=lan comment= disabled=no add address=192.168.0.221 mac-address=00:22:15:C5:CE:FF interface=lan comment= disabled=no add address=192.168.0.222 mac-address=00:0C:6E:0B:8A:25 interface=lan comment= disabled=no add address=192.168.0.223 mac-address=00:11:D8:75
24、:E3:D2 interface=lan comment= disabled=no add address=192.168.0.224 mac-address=00:11:D8:42:80:88 interface=lan comment= disabled=no add address=192.168.0.234 mac-address=00:E0:18:95:62:A9 interface=lan comment= disabled=no add address=192.168.0.245 mac-address=00:15:F2:EB:F8:85 interface=lan commen
25、t= disabled=no add address=192.168.0.230 mac-address=00:1F:C6:C8:EC:53 interface=lan comment= disabled=no add address=192.168.0.11 mac-address=00:15:F2:EB:F7:CA interface=lan comment= disabled=no add address=192.168.0.17 mac-address=00:1D:60:4A:B7:3A interface=lan comment= disabled=no add address=19
26、2.168.0.29 mac-address=00:22:15:81:8C:5E interface=lan comment= disabled=no add address=192.168.0.4 mac-address=00:0B:6A:90:20:3F interface=lan comment= disabled=no add address=192.168.0.231 mac-address=00:1B:FC:92:1C:69 interface=lan comment= disabled=no add address=192.168.0.9 mac-address=00:1D:60
27、:8D:40:19 interface=lan comment= disabled=no add address=192.168.0.13 mac-address=00:15:F2:EB:F8:57 interface=lan comment= disabled=no add address=192.168.0.15 mac-address=00:22:15:A1:31:55 interface=lan comment= disabled=no add address=192.168.0.19 mac-address=00:1D:60:D8:66:FB interface=lan commen
28、t= disabled=no add address=192.168.0.23 mac-address=00:15:F2:EB:F8:53 interface=lan comment= disabled=no add address=192.168.0.24 mac-address=00:1B:FC:5B:0E:23 interface=lan comment= disabled=no add address=192.168.0.25 mac-address=00:15:F2:EB:F8:51 interface=lan comment= disabled=no add address=192.168.0.35 mac-address=00:15:F2:EB:F8:78 interface=lan
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1