分类目录归档:IOS

用RouterOS作为远程DHCP服务器

Cisco的DHCP服务器太难用了,查询起来不直观,要设置个固定的release累死人。Linux上那一堆DHCP daemon也没好到哪里去。想了想作为DHCP服务器的话,最直观方便的也就RouterOS了。简要记述一下把RouterOS作为远程DHCP服务器(不接入客户端所在二层)的配置方法。

配置

三层交换机(Cisco IOS):首先我们关闭ip helper对除DHCP以外其它协议的转发;然后在接口上设置helper address为RouterOS的IP地址即可。

no ip forward-protocol udp
interface Vlan100
 ip address 192.168.1.1 255.255.255.0
 ip helper-address 192.168.0.2

RouterOS:对每个DHCP server配置,接口设置为转发包的来源接口,relay设置为三层交换机面向DHCP客户端的内网端口的IP。

/ip pool
add name=dhcp ranges=192.168.1.10-192.168.1.254
/ip dhcp-server
add address-pool=dhcp conflict-detection=no disabled=no interface=bridge name=user-vlan relay=192.168.1.1
/ip dhcp-server network
add address=192.168.1.0/24 gateway=192.168.1.1 netmask=24

调试

Cisco IOS上可以用debug ip dhcp server packetdebug ip dhcp server events看到每个请求的转发过程。

RouterOS DHCP lease里面出现大量busy是因为conflict detection没有关闭,这种配置下conflict detection时间很长,可能会导致部分客户端超时以后疯狂重试,进而吃光DHCP地址池。因此参考配置里面关掉了conflict detection。


参考:

更新Cisco ISR C800系列路由器的MC7700 LTE网卡固件

方法1:用电脑刷

连接电脑,然后在路由器上

enable
configure terminal
service internal
exit
test cell-host 0 usb-to-dm

把路由器的RSVD接口接到电脑上,电脑应该能识别出一个LTE网卡。然后刷机过程和普通Sierra Wireless卡刷机过程基本一致:下载固件,下载驱动,下载刷机程序,按说明操作即可。

方法2:用路由器刷

首先去下载一个cwe固件(选择QMI版本而非DIP),传到路由器的flash上,然后在路由器上执行:

enable
delete /force /recursive flash:fwlogfile
microcode reload cellular 0 0 modem-provision flash:MC7700_ATT_03.05.10.02_00.cwe

命令询问的问题均回车即可。任何一条命令如果报错,请重启然后从头重试。如果一切正常,刷机日志如下:

Router#$odem-provision flash:3.05.20.05_00_generic_000.000_001_SPKG_MC.cwe
Reload microcode? [confirm]
Log status of firmware download in router flash?[confirm]
Firmware download status will be logged in flash:fwlogfile
Microcode Reload Process launched for Cellular 30711788; hw type = 0x6F3
Router#
*****************************************************
 The interface will be Shut Down for Firmware Upgrade 
 This will terminate any active data connections.
*****************************************************
Modem radio has been turned off
*****************************************************
 Modem will be upgraded!
 Upgrade process will take up to 15 minutes. During 
 this time the modem will be unusable.
 Please do not remove power or reload the router during 
 the upgrade process.
*****************************************************
*Mar  3 07:42:21.375: %LINK-5-CHANGED: Interface Cellular0, changed state to administratively down
Sending F/W[3.05.20.05_00_generic_000.000_001_SPKG_MC.cwe] to the card [38717372 bytes]: 
Firmware file: 3.05.20.05_00_generic_000.000_001_SPKG_MC.cwe sent to the card

The current modem F/W App Version: SWI9200X_03.05.10.02AP R4684 CARMD-EN-10527 2012/02/25 11:58:38
The current modem F/W Boot Version: SWI9200X_03.05.10.02BT R4684 CARMD-EN-10527 2012/02/25 11:50:19
The current modem Carrier String: 0
The current modem Device ID: MC7700
The current modem Package Identifier: 
The current modem SKU ID: 
Firmware Upgrade is in Progress...
*Mar  3 07:42:58.163: %CISCO800-2-MODEM_DOWN: Cellular0 modem is now DOWN.
*Mar  3 07:44:34.639: %CISCO800-2-MODEM_DOWN: Cellular0 modem is now DOWN.
F/W Upgrade: Firmware Upgrade has Completed Successfully
*Mar  3 07:45:01.575: %CISCO800-2-MODEM_UP: Cellular0 modem is now UP.

参考资料: