本篇文章给大家谈谈软路由命令有哪些,以及软路由命令有哪些组合对应的知识点,希望对各位有所帮助,不要忘了收藏本站喔。
本文目录一览:
1、网管如何安装及设置常用软路由
1、
依次单击“开始/程序/管理工具/路由和远程访问”,打开“路由和远程访问”窗口。
2、
单击“操作”菜单,选择“配置并启用路由和远程访问”命令,运行“路由和远程访问服务器安装向导”,单击[下一步]。
3、
由于我们在这里要安装的是路由器,所以,选择“网络路由器”选项,并单击[下一步]。
4、
通常情况下,局域网计算机中只安装TCP/IP协议和NetBEUI协议,而且只有TCP/IP协议拥有路由功能。AppleTalk协议仅用于苹果计算机之间的通讯。由于TCP/IP协议已经显示于“协议”列表之中,因此,选择“是,所有可用的协议都在列表上”选项,并单击[下一步]。
5、
不安装远程访问服务,因此,选择“否”,不使用请求拨号访问远程网络。单击[下一步]。
6、
完成“路由和远程访问服务器安装向导”,单击[完成]。
软路由的设置具体步骤:
1、依次单击“开始/程序/管理工具/路由和远程访问”,打开“路由和远程访问”窗口。
2、右键单击要启用路由的服务器名,然后单击“属性”,显示“属性”对话框。
3、在“常规”选项卡上,选中“路由器”复选框,并选择“仅用于局域网
(LAN)
路由选择”选项,单击[确定]。
4、在“路由和远程访问”窗口中,打开左侧目录树“IP路由选择”,右击“常规”,并在快捷菜单中选择“新路由选择协议”,显示“新路由选择协议”对话框。
5、在“路由选择协议”列表中选中“网络地址转换(NAT)”,并单击[确定]。
6、依次单击“开始/程序/管理工具/路由和远程访问”,打开“路由和远程访问”窗口。
7、右键单击要启用路由的服务器名,然后单击“属性”,显示“属性”对话框。
8、在“路由和远程访问”窗口中,打开左侧目录树“IP路由选择”,右击“网络地址转换(NAT)”,并在快捷菜单中选择“新接口”,显示“新接口”对话框。
9、在“接口”列表框中选择第一个网络接口,即“本地连接”,单击[确定],打开“本地连接属性”对话框。(LAN)
10、在常规面板中使用默认设置(使用专用接口连接到专用网络),单击[确定]。
11、再次打开“新接口”,这次是建立ISP的网络。选中“公用接口连接到internet”,转换TCP/UCP头,在地址池中使用指定IP,10.0.0.1,和子网掩码255.0.0.0,单击[确定]。
2、CMD软路由的主要命令有哪些?
AT计划在计算机上运行的命令和程序。 ATTRIB显示或更改文件属性。 BREAK设置或清除扩展式CTRL C检查。 CACLS显示或修改文件的访问控制列表(ACLs)。 CALL从另一个批处理程序调用这一个。 CD显示当前目录的名称或将其更改。 CHCP显示或设置活动代码页数。 CHDIR显示当前目录的名称或将其更改。 CHKDSK检查磁盘并显示状态报告。 CHKNTFS显示或修改启动时间磁盘检查。 CLS清除屏幕。 CMD打开另一个Windows命令解释程序窗口。 COLOR设置默认控制台前景和背景颜色。 COMP比较两个或两套文件的内容。 COMPACT显示或更改NTFS分区上文件的压缩。 CONVERT将FAT卷转换成NTFS。您不能转换 当前驱动器。 COPY将至少一个文件复制到另一个位置。 只列出1小部分。
3、winbox软路由如何安装,命令都有哪些?
命令说明:
RouterOS的基本设置包括四个部分interface、ip address、ip route 、ip firewall src-nat。
1.interface的命令中主要为修改接口称和激活接口;
2.ip address的命令主要为分别在两接相应接口上增加外网IP地址和局域网IP地址;
3.ip route的命令主要是墙加路由表,这里简单的网络路由表中只有三条,一条是手动加的,两条是动态路由项;
4.ip firewall src-nat 的命令是用来设置网络地址转换,这里的伪装masquerade)即是网络地址转换NAT)的一种特殊形式,局域网多台机器使用一个外网IP上网一般都用伪装masquerade)。
如果只是做单纯的路由器来使用,把上面绿色部分的IP按实际的网络修改即可!
此过程本人已全新安装测试多次,均很正常,如果你按照此命令设置仍不能让局域网访问外网,最有可能的是你的内网和外网网线插反了网卡,更不要忘了客户机的TCP/IP属性配置。
设置RouterOS筒明教程官方设置) RouterOS V2.8
设置RouterOS筒明教程
如何设置RouterOS文档版本:1.5 应用于:MikroTik RouterOS V2.8
怎么样保护你的MikroTik RouterOS�6�4?
属性描述
要保护你的MikroTik RouterOS�6�4, 你不应该只是修改你的admin的密码,还需要设置数据包的过滤,所以目的地到路由器的数据包需要在一次经过ip firewall的input链表处理。注意input链表不会去**通过路由器的传输数据。
你可以添加下面的规则到/ip firewall rule input 只需要通过'copy 和paste'到路由器的Terminal Console(终端控制台)或
在winbox中配置相关的参数):
/ip firewall rule input add connection-state=invalid action=drop \
comment="Drop invalid connections"
/ip firewall rule input add connection-state=established \
comment="Allow established connections"
/ip firewall rule input add connection-state=related \
comment="Allow related connections"
/ip firewall rule input add protocol=udp comment="Allow UDP"
/ip firewall rule input add protocol=icmp comment="Allow ICMP Ping"
/ip firewall rule input add src-address=10.0.0.0/24 \
comment="Allow access from our local network. Edit this!"
/ip firewall rule input add src-address=192.168.0.0/24 protocol=tcp dst-port=8080 \
comment="This is web proxy service for our customers. Edit this!"
/ip firewall rule input add action=drop log=yes \
comment="Log and drop everything else"
使用/ip firewall rule input print packets 命令可以看到有多少个数据包被里面的规则处理过。使用reset-counters 命令去复位统计值。检查系统日志文件通过/log print可以看到数据包被丢弃的信息。
你可能需要在里面添加允许来至确认主机的访问。例如:记住出现在列表中的防火墙规则在命令中被处理。一个规则匹配的数据包,不会被之后其他的规则处理。添加了新的规则后,如果想优先被处理,通过move命令移动到所以规则之上。
怎样保护你的MikroTik RouterOS�6�4 从来至 Spam的请求
Description
To protect your MikroTik RouterOS�6�4 from being used as spam relay you have to:
保证你的路由器使用了防火墙规则。 See the How To section about it!
配置web proxy 访问列表
web proxy访问列表配置在/ip web-proxy access下。例如,添加下面规则允许来至确认主机的访问。 只需要通过'copy 和paste'到路由器的Terminal Console(终端控制台)或
在winbox中配置相关的参数):
/ip web-proxy access add src-address=192.168.0.0/24 \
comment="Our customers"
/ip web-proxy access add dst-port=23-25 action=deny \
comment="Deny using us as telnet and SMTP relay"
/ip web-proxy access add action=deny \
comment="Deny everything else"
注意,允许确认服务首先你应该由规则,并且在规则的最后通常为拒绝任何的访问。
如何连接你的家庭网络到xDSL?
属性描述
确认你的家用DSL modem以安装好,并想通过一个安全的方式将你的家庭网络连接到Internet,首先你需要安装MikroTik路由器在DSL modem和你家庭网络中间:
下一步连接你的家庭网络到xDSL:
首先你的MikroTik路由器有两张以太网卡,一个对应家庭的DSL modem ,一个对应你的家庭网络。
安装时,确定你安装了dhcp软件功能包。
启用两个网卡,如下:
/interface enable ether1,ether2
配置DHCP客户端在对外的接口上xDSL) 接收来至IP配置的服务:
/ip dhcp-client set enabled=yes interface=ether1
检查,如果你收到IP配置信息后使用lease print,如下:
[admin@MikroTik] ip dhcp-client lease print
address: 81.198.16.4/21
expires: may/10/2001 04:41:49
gateway: 81.198.16.1
primary-dns: 195.13.160.52
secondary-dns: 195.122.1.59
[admin@MikroTik] ip dhcp-client
添加你的私有网络地址到ether2网卡上,如下:
/ip address add address=192.168.0.1/24 interface=ether2
在你的本地网络配置伪装:
/ip firewall src-nat add out-interface=ether1 action=masquerade \ comment="Masquerades everything leaving the external interface"
配置防火墙保护你的路由器:
/ip firewall rule input add connection-state=invalid action=drop \
comment="Drop invalid connection packets"
/ip firewall rule input add connection-state=established \
comment="Allow established connections"
/ip firewall rule input add connection-state=related \
comment="Allow related connections"
/ip firewall rule input add protocol=udp comment="Allow UDP"
/ip firewall rule input add protocol=icmp comment="Allow ICMP Ping"
/ip firewall rule input add src-address=192.168.0.0/24 \
comment="From my home network"
/ip firewall rule input add action=drop log=yes \
comment="Log and drop everything else"
可选)配置DHCP服务散发IP配置到你的家庭网络中去:
/ip pool add name=private ranges=192.168.0.2-192.168.0.254
/ip dhcp-server network add gateway=192.168.0.1 address=192.168.0.0/24 \
dns-server=195.13.160.52,195.122.1.59 domain="mail.com"
/ip dhcp-server add name=home interface=ether2 lease-time=3h \
address-pool=private
/ip dhcp-server enable home
这样!你能通过你的家庭网络访问Internet。
如何保持我的路由器的更新
属性描述
保持你的路由器更新,你应该:
更新最新的RouterOS软件版本
如果你有一个RouterBoard,需要更新BIOS固件版本
在这部分将介绍你如何升级你的RouterBoard的BIOS固件版本。
首先,At first, 检查你的一个routerboard功能包被安装
[admin@MikroTik] system package print
Flags: I - invalid
# NAME VERSION BUILD-TIME UNINSTALL
0 routerboard 2.8.14 aug/06/2004 15:30:32 no
1 security 2.8.14 aug/06/2004 14:08:54 no
2 system 2.8.14 aug/06/2004 14:03:02 no
3 advanced-tools 2.8.14 aug/06/2004 14:04:55 no
4 wireless 2.8.14 aug/06/2004 14:42:17 no
[admin@MikroTik] system package
检查你的RouterBoard BIOS固件:
[admin@MikroTik] system routerboard print
routerboard: yes
model: 230
serial-number: 8387617
current-firmware: 1.3.1 Aug/06/2004 15:30:19)
upgrade-firmware: 1.3.1 Aug/06/2004 15:30:19)
[admin@MikroTik] system routerboard
可以通过在下载页面查看在all packages文档最新的BIOS更新( )。BIOS更新文件被命名为wlb-bios-[version_number].fwf 这里的version_number 是BIOS固件版本。
如果这个文件包含一个较新的版本,通过FTP使用二进制文件传输模式,拷贝到路由器。但完成后,你应该能在/file目录看到文件以及包含的BIOS固件信息:
[admin@MikroTik] system routerboard /file print
# NAME TYPE SIZE CREATION-TIME
0 wlb-bios-1.3.2.fwf routerbios 73079 sep/07/2004 00:12:05
[admin@MikroTik] system routerboard
检查RouterBoard的BIOS固件版本和你可以看到能一个能用于更新的版本:
[admin@MikroTik] system routerboard print
routerboard: yes
model: 230
serial-number: 8387617
current-firmware: 1.3.1 Aug/06/2004 15:30:19)
upgrade-firmware: 1.3.2 Aug/22/2004 12:13:56)
[admin@MikroTik] system routerboard
现在通过upgrade命令更新BIOS版本。
[admin@MikroTik] system routerboard upgrade
Firmware upgrade requires reboot of the router. Continue? [y/n]
选择y后软件将升级BIOS,路由器将自动重启,请不要手动重启路由器。在路由器重启完成后,可用检查新的BIOS版本:
[admin@MikroTik] system routerboard print
routerboard: yes
model: 230
serial-number: 8387617
current-firmware: 1.3.2 Aug/22/2004 12:13:56)
upgrade-firmware: 1.3.2 Aug/22/2004 12:13:56)
[admin@MikroTik] system routerboard
如何配置透明桥在两个网络中?
属性描述
远程网络能通过MikroTik RouterOS�6�4基于IP的以太传输(EoIP)或WDS功能简单桥接起来,使用EoIP能扩展到其他别的类型的网卡上,如PPTP, CISCO/Aironet, Prism 。WDS 只能工作在Prism与Atheros网卡上。
注:因为MikroTik RouterOS不能直接在两个无线设备上做透明桥,所以通过EoIP方式实现。
让我们假设下面的一个网络设置:
使用EoIP隧道的透明桥
下面的步骤将使用EoIP接口创建透明桥:
确定你以将两个MikroTik路由器连接,例如一个路由器配置为服务端 AP),另外一个则为客户端station):
[admin@AP] interface wireless set wlan1 mode=bridge ssid=mikrotik \
\... disabled=no
[admin@Station] interface wireless print
[admin@Station] interface wireless set wlan1 mode=station ssid=mikrotik disabled=no
确定IP配置正确,并能从一个路由器访问到另一个:
[admin@AP] ip address add address=10.1.0.1/24 interface=wlan1
[admin@Station] ip address add address=10.1.0.2/24 interface=wlan1
[admin@Station] ping 10.1.0.1
10.1.0.1 64 byte pong: ttl=64 time=1 ms
10.1.0.1 64 byte pong: ttl=64 time=1 ms
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 1/1.0/1 ms
[admin@Station]
添加EoIP隧道接口:
[admin@AP] interface eoip add remote-address=10.1.0.2 tunnel-id=1 disabled=no
[admin@Station] interface eoip add remote-address=10.1.0.1 tunnel-id=1 \\... disabled=no
添加桥接口并将相应的接口放入:
[admin@AP] interface bridge add forward-protocols=ip,arp,other disabled=no
[admin@AP] interface bridge port set eoip-tunnel1,ether1 bridge=bridge1
[admin@Station] interface bridge add forward-protocols=ip,arp,other \
\... disabled=no
[admin@Station] interface bridge port set eoip-tunnel1,ether1 bridge=bridge1
注:
如果你是通过ether1连接的,那在设置后将会丢失连接。这是因为网卡设置的切换。
将以太网卡的IP地址移动到桥接口上:
[admin@AP] ip address set [find interface=ether1 ] interface=bridge1
[admin@AP] ip address print
Flags: X - disabled, I - invalid, D - dynamic
# ADDRESS NETWORK BROADCAST INTERFACE
0 10.0.0.215/24 10.0.0.0 10.0.0.255 bridge1
1 10.1.0.1/24 10.1.0.0 10.1.0.255 wlan1
[admin@AP] ip address
[admin@Station] ip address set [find interface=ether1 ] interface=bridge1
[admin@Station] ip address print
Flags: X - disabled, I - invalid, D - dynamic
# ADDRESS NETWORK BROADCAST INTERFACE
0 10.0.0.216/24 10.0.0.0 10.0.0.255 bridge1
1 10.1.0.2/24 10.1.0.0 10.1.0.255 wlan1 [admin@Station] ip address
现在你可以通过在ether1上的bridge1接口连接到路由器。
通过ping 测试桥连接从10.0.0.215到10.0.0.216。注,桥需要10到30秒时间学习地址和开始经过的流量。
如果你有prism、CISCO/Aironet网卡或加密的PPTP隧道,同样可以创建EoIP透明桥然而,EoIP隧道只能用于建立两个MikroTik路由器之间。
如何将公网地址连接到一个本地地址?
4、安装软路由的命令
命令说明:
RouterOS的基本设置包括四个部分interface、ip address、ip route 、ip firewall src-nat。
1.interface的命令中主要为修改接口称和激活接口;
2.ip address的命令主要为分别在两接相应接口上增加外网IP地址和局域网IP地址;
3.ip route的命令主要是墙加路由表,这里简单的网络路由表中只有三条,一条是手动加的,两条是动态路由项;
4.ip firewall src-nat 的命令是用来设置网络地址转换,这里的伪装masquerade)即是网络地址转换NAT)的一种特殊形式,局域网多台机器使用一个外网IP上网一般都用伪装masquerade)。
如果只是做单纯的路由器来使用,把上面绿色部分的IP按实际的网络修改即可!
此过程本人已全新安装测试多次,均很正常,如果你按照此命令设置仍不能让局域网访问外网,最有可能的是你的内网和外网网线插反了网卡,更不要忘了客户机的TCP/IP属性配置。
设置RouterOS筒明教程官方设置) RouterOS V2.8
设置RouterOS筒明教程
如何设置RouterOS文档版本:1.5 应用于:MikroTik RouterOS V2.8
怎么样保护你的MikroTik RouterOS™?
属性描述
要保护你的MikroTik RouterOS™, 你不应该只是修改你的admin的密码,还需要设置数据包的过滤,所以目的地到路由器的数据包需要在一次经过ip firewall的input链表处理。注意input链表不会去**通过路由器的传输数据。
你可以添加下面的规则到/ip firewall rule input 只需要通过'copy 和paste'到路由器的Terminal Console(终端控制台)或
在winbox中配置相关的参数):
/ip firewall rule input add connection-state=invalid action=drop \
comment="Drop invalid connections"
/ip firewall rule input add connection-state=established \
comment="Allow established connections"
/ip firewall rule input add connection-state=related \
comment="Allow related connections"
/ip firewall rule input add protocol=udp comment="Allow UDP"
/ip firewall rule input add protocol=icmp comment="Allow ICMP Ping"
/ip firewall rule input add src-address=10.0.0.0/24 \
comment="Allow access from our local network. Edit this!"
/ip firewall rule input add src-address=192.168.0.0/24 protocol=tcp dst-port=8080 \
comment="This is web proxy service for our customers. Edit this!"
/ip firewall rule input add action=drop log=yes \
comment="Log and drop everything else"
使用/ip firewall rule input print packets 命令可以看到有多少个数据包被里面的规则处理过。使用reset-counters 命令去复位统计值。检查系统日志文件通过/log print可以看到数据包被丢弃的信息。
你可能需要在里面添加允许来至确认主机的访问。例如:记住出现在列表中的防火墙规则在命令中被处理。一个规则匹配的数据包,不会被之后其他的规则处理。添加了新的规则后,如果想优先被处理,通过move命令移动到所以规则之上。
怎样保护你的MikroTik RouterOS™ 从来至 Spam的请求
Description
To protect your MikroTik RouterOS™ from being used as spam relay you have to:
保证你的路由器使用了防火墙规则。 See the How To section about it!
配置web proxy 访问列表
web proxy访问列表配置在/ip web-proxy access下。例如,添加下面规则允许来至确认主机的访问。 只需要通过'copy 和paste'到路由器的Terminal Console(终端控制台)或
在winbox中配置相关的参数):
/ip web-proxy access add src-address=192.168.0.0/24 \
comment="Our customers"
/ip web-proxy access add dst-port=23-25 action=deny \
comment="Deny using us as telnet and SMTP relay"
/ip web-proxy access add action=deny \
comment="Deny everything else"
注意,允许确认服务首先你应该由规则,并且在规则的最后通常为拒绝任何的访问。
如何连接你的家庭网络到xDSL?
属性描述
确认你的家用DSL modem以安装好,并想通过一个安全的方式将你的家庭网络连接到Internet,首先你需要安装MikroTik路由器在DSL modem和你家庭网络中间:
下一步连接你的家庭网络到xDSL:
首先你的MikroTik路由器有两张以太网卡,一个对应家庭的DSL modem ,一个对应你的家庭网络。
安装时,确定你安装了dhcp软件功能包。
启用两个网卡,如下:
/interface enable ether1,ether2
配置DHCP客户端在对外的接口上xDSL) 接收来至IP配置的服务:
/ip dhcp-client set enabled=yes interface=ether1
检查,如果你收到IP配置信息后使用lease print,如下:
[admin@MikroTik] ip dhcp-client lease print
address: 81.198.16.4/21
expires: may/10/2001 04:41:49
gateway: 81.198.16.1
primary-dns: 195.13.160.52
secondary-dns: 195.122.1.59
[admin@MikroTik] ip dhcp-client
添加你的私有网络地址到ether2网卡上,如下:
/ip address add address=192.168.0.1/24 interface=ether2
在你的本地网络配置伪装:
/ip firewall src-nat add out-interface=ether1 action=masquerade \ comment="Masquerades everything leaving the external interface"
配置防火墙保护你的路由器:
/ip firewall rule input add connection-state=invalid action=drop \
comment="Drop invalid connection packets"
/ip firewall rule input add connection-state=established \
comment="Allow established connections"
/ip firewall rule input add connection-state=related \
comment="Allow related connections"
/ip firewall rule input add protocol=udp comment="Allow UDP"
/ip firewall rule input add protocol=icmp comment="Allow ICMP Ping"
/ip firewall rule input add src-address=192.168.0.0/24 \
comment="From my home network"
/ip firewall rule input add action=drop log=yes \
comment="Log and drop everything else"
可选)配置DHCP服务散发IP配置到你的家庭网络中去:
/ip pool add name=private ranges=192.168.0.2-192.168.0.254
/ip dhcp-server network add gateway=192.168.0.1 address=192.168.0.0/24 \
dns-server=195.13.160.52,195.122.1.59 domain="mail.com"
/ip dhcp-server add name=home interface=ether2 lease-time=3h \
address-pool=private
/ip dhcp-server enable home
这样!你能通过你的家庭网络访问Internet。
如何保持我的路由器的更新
属性描述
保持你的路由器更新,你应该:
更新最新的RouterOS软件版本
如果你有一个RouterBoard,需要更新BIOS固件版本
在这部分将介绍你如何升级你的RouterBoard的BIOS固件版本。
首先,At first, 检查你的一个routerboard功能包被安装
[admin@MikroTik] system package print
Flags: I - invalid
# NAME VERSION BUILD-TIME UNINSTALL
0 routerboard 2.8.14 aug/06/2004 15:30:32 no
1 security 2.8.14 aug/06/2004 14:08:54 no
2 system 2.8.14 aug/06/2004 14:03:02 no
3 advanced-tools 2.8.14 aug/06/2004 14:04:55 no
4 wireless 2.8.14 aug/06/2004 14:42:17 no
[admin@MikroTik] system package
检查你的RouterBoard BIOS固件:
[admin@MikroTik] system routerboard print
routerboard: yes
model: 230
serial-number: 8387617
current-firmware: 1.3.1 Aug/06/2004 15:30:19)
upgrade-firmware: 1.3.1 Aug/06/2004 15:30:19)
[admin@MikroTik] system routerboard
可以通过在下载页面查看在all packages文档最新的BIOS更新()。BIOS更新文件被命名为wlb-bios-[version_number].fwf 这里的version_number 是BIOS固件版本。
如果这个文件包含一个较新的版本,通过FTP使用二进制文件传输模式,拷贝到路由器。但完成后,你应该能在/file目录看到文件以及包含的BIOS固件信息:
[admin@MikroTik] system routerboard /file print
# NAME TYPE SIZE CREATION-TIME
0 wlb-bios-1.3.2.fwf routerbios 73079 sep/07/2004 00:12:05
[admin@MikroTik] system routerboard
检查RouterBoard的BIOS固件版本和你可以看到能一个能用于更新的版本:
[admin@MikroTik] system routerboard print
routerboard: yes
model: 230
serial-number: 8387617
current-firmware: 1.3.1 Aug/06/2004 15:30:19)
upgrade-firmware: 1.3.2 Aug/22/2004 12:13:56)
[admin@MikroTik] system routerboard
现在通过upgrade命令更新BIOS版本。
[admin@MikroTik] system routerboard upgrade
Firmware upgrade requires reboot of the router. Continue? [y/n]
选择y后软件将升级BIOS,路由器将自动重启,请不要手动重启路由器。在路由器重启完成后,可用检查新的BIOS版本:
[admin@MikroTik] system routerboard print
routerboard: yes
model: 230
serial-number: 8387617
current-firmware: 1.3.2 Aug/22/2004 12:13:56)
upgrade-firmware: 1.3.2 Aug/22/2004 12:13:56)
[admin@MikroTik] system routerboard
如何配置透明桥在两个网络中?
属性描述
远程网络能通过MikroTik RouterOS™基于IP的以太传输(EoIP)或WDS功能简单桥接起来,使用EoIP能扩展到其他别的类型的网卡上,如PPTP, CISCO/Aironet, Prism 。WDS 只能工作在Prism与Atheros网卡上。
注:因为MikroTik RouterOS不能直接在两个无线设备上做透明桥,所以通过EoIP方式实现。
让我们假设下面的一个网络设置:
使用EoIP隧道的透明桥
下面的步骤将使用EoIP接口创建透明桥:
确定你以将两个MikroTik路由器连接,例如一个路由器配置为服务端 AP),另外一个则为客户端station):
[admin@AP] interface wireless set wlan1 mode=bridge ssid=mikrotik \
\... disabled=no
[admin@Station] interface wireless print
[admin@Station] interface wireless set wlan1 mode=station ssid=mikrotik disabled=no
确定IP配置正确,并能从一个路由器访问到另一个:
[admin@AP] ip address add address=10.1.0.1/24 interface=wlan1
[admin@Station] ip address add address=10.1.0.2/24 interface=wlan1
[admin@Station] ping 10.1.0.1
10.1.0.1 64 byte pong: ttl=64 time=1 ms
10.1.0.1 64 byte pong: ttl=64 time=1 ms
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 1/1.0/1 ms
[admin@Station]
添加EoIP隧道接口:
[admin@AP] interface eoip add remote-address=10.1.0.2 tunnel-id=1 disabled=no
[admin@Station] interface eoip add remote-address=10.1.0.1 tunnel-id=1 \\... disabled=no
添加桥接口并将相应的接口放入:
[admin@AP] interface bridge add forward-protocols=ip,arp,other disabled=no
[admin@AP] interface bridge port set eoip-tunnel1,ether1 bridge=bridge1
[admin@Station] interface bridge add forward-protocols=ip,arp,other \
\... disabled=no
[admin@Station] interface bridge port set eoip-tunnel1,ether1 bridge=bridge1
注:
如果你是通过ether1连接的,那在设置后将会丢失连接。这是因为网卡设置的切换。
将以太网卡的IP地址移动到桥接口上:
[admin@AP] ip address set [find interface=ether1 ] interface=bridge1
[admin@AP] ip address print
Flags: X - disabled, I - invalid, D - dynamic
# ADDRESS NETWORK BROADCAST INTERFACE
0 10.0.0.215/24 10.0.0.0 10.0.0.255 bridge1
1 10.1.0.1/24 10.1.0.0 10.1.0.255 wlan1
[admin@AP] ip address
[admin@Station] ip address set [find interface=ether1 ] interface=bridge1
[admin@Station] ip address print
Flags: X - disabled, I - invalid, D - dynamic
# ADDRESS NETWORK BROADCAST INTERFACE
0 10.0.0.216/24 10.0.0.0 10.0.0.255 bridge1
1 10.1.0.2/24 10.1.0.0 10.1.0.255 wlan1 [admin@Station] ip address
现在你可以通过在ether1上的bridge1接口连接到路由器。
通过ping 测试桥连接从10.0.0.215到10.0.0.216。注,桥需要10到30秒时间学习地址和开始经过的流量。
如果你有prism、CISCO/Aironet网卡或加密的PPTP隧道,同样可以创建EoIP透明桥然而,EoIP隧道只能用于建立两个MikroTik路由器之间。
如何将公网地址连接到一个本地地址?
属性描述
例如一个电脑有一个自己在局域网的地址但需要使用公务网络的通信。
让我们假设两个地址(10.0.0.216和10.0.0.217)被分配到路由器。在这个例子中我们将在一个'full NAT'到内网地址192.168.0.4指向外网的10.0.0.216的地址。10.0.0.217的外网地址仍然用于自己内部网络的伪装。
添加10.0.0.216/24和10.0.0.217/24 地址到路由器的外网网卡上,并设置192.168.0.254/24到内网网卡:
/ip address
add address=10.0.0.216/24 interface=Public
add address=10.0.0.217/24 interface=Public
add address=192.168.0.254/24 interface=Local
Flags: X - disabled, I - invalid, D - dynamic
# ADDRESS NETWORK BROADCAST INTERFACE
0 10.0.0.216/24 10.0.0.0 10.0.0.255 Public
1 10.0.0.217/24 10.0.0.0 10.0.0.255 Public
2 192.168.0.254/24 192.168.0.0 192.168.0.255 Local
在添加默认路由的时你应该意识到有两个地址。While adding the default route to the router you should be aware of having two addresses. You should specify the address that the router will be using while talking to the outer networks:
/ip route
add gateway=10.0.0.1 preferred-source=10.0.0.217
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 10.0.0.1 1 Public
1 DC 10.0.0.0/24 r 0.0.0.0 0 Public
2 DC 192.168.0.0/24 r 0.0.0.0 0 Local
添加dst-nat规则允许从外网到内网服务器的访问:
/ip firewall dst-nat
add dst-address=10.0.0.216/32 action=nat to-dst-address=192.168.0.4
Flags: X - disabled, I - invalid, D - dynamic
0 dst-address=10.0.0.216/32 action=nat to-dst-address=192.168.0.4
添加src-nat规则允许内网服务器能与外网通信,并这是除192.168.0.4主机地址通过外网地址10.0.0.216出去,其他的内网地址通过10.0.0.217:
/ip firewall src-nat
add src-address=192.168.0.4/32 action=nat to-src-address=10.0.0.216
add src-address=192.168.0.0/24 action=nat to-src-address=10.0.0.217
Flags: X - disabled, I - invalid, D - dynamic
0 src-address=192.168.0.4/32 action=nat to-src-address=10.0.0.216
1 src-address=192.168.0.0/24 action=nat to-src-address=10.0.0.217
一些提示:
如果你是ADSL用户,在上文描述的基础上不要在外网的网络接口上指定IP及掩码,也不要在路由表中加入任何静态路由记录,但要在外网的网络接口上加入PPPoE Client,在PPPoE Client属性中输入ADSL帐号和密码。这时外网接口会自动获得IP,也可获得路由记录。
如果你仅仅是动态IP用户但不是ADSL用户,应在上文描述的基础上不要在外网的网络接口上指定IP及掩码,也不要在路由表中加入任何静态路由记录,只需要在外网的网络接口上加入DHCP Client即可。这时外网接口会自动获得IP,也可获得路由记录。
MikroTik RouterOS 中为IP10限速的设置
请把下面的打印改为命令
[root@MikroTik] queue simple print
Flags: X - disabled, I - invalid, D - dynamic
0 name="queue1" target-address=0.0.0.0/0 dst-address=192.168.1.10/32
interface=all queue=default priority=8 limit-at=0/0
max-limit=800000/00
MikroTik RouterOS 把迅雷限制为单资源下载的设置
请把下面的打印改为命令
[admin@MikroTik] ip firewall rule forward print
Flags: X - disabled, I - invalid, D - dynamic
0 ;;; 允许IP252所有
src-address=192.168.1.252/32 action=accept
1 ;;; 禁迅雷TCP两端口
dst-address=:3076-3077 protocol=tcp action=drop
2 ;;; 禁迅雷UDP两端口
dst-address=:3076-3077 protocol=udp action=drop
MikroTik RouterOS 端口映射的设置
[admin@MikroTik] ip firewall dst-nat dst-address=218.*.*.170/32:21 protocol=tcp action=nat to-dst-address=192.168.1.251 to-dst-port=21
5、软路由怎么命令开启up
简单的说:UPNP能够打通内网与路由之间的完全映射关系,建立透明的点对点网络连接,最大限度的提高软件的下载速度。开启步骤如下:
1、点击“IP” -- “UPNP”,将Enabled(启用)和Allow To Disable External Interface(允许禁用外部接口),打钩并点击Apple,OK,保存设置。
2、重新打开“IP” -- “UPNP”,UPNP Settings界面,点击Interfaces,然后在UPnP Interface Settings界面点击“+”号,添加2条配置。
如果是PPPOE接入外网,就填pppoe-out1接口名,静态IP接入就填WAN接口名。
内网如未使用网桥则选择LAN口,ROS开启UPNP后,会自动映射端口,所有生成的端口映射可以在“IP” -- “Firewall” -- “NAT”中查询。
软路由命令有哪些的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于软路由命令有哪些组合、软路由命令有哪些的信息别忘了在本站进行查找喔。