
二层交换嘛,不配也行。
vlan 10
int e0/0/1
port link-type trunk
port trunk allow-pass vlan 10
int e0/0/2
port link-type access
port default vlan 10
int e0/0/2
port link-type access
port default vlan 10
vlan batch 10 30
int vlan 10
ip add 192.168.1.254 24
int vlan 30
ip add 1.1.1.2 24
int g0/0/1
port link-type trunk
port trunk allow-pass vlan 10
int g0/0/2
port link-type trunk
port trunk allow-pass vlan all
dhcp enable
ip pool forap
gateway-list 192.168.1.254
network 192.168.1.0 mask 255.255.255.0
option 43 sub-option 2 ip-address 1.1.1.1
上面这句这是重点。
interface Vlanif 10
dhcp select global
三层交换要在是vlanif调用全局地址池。
vlan 30
int vlan 30
ip add 1.1.1.1 24
ip route-static 192.168.1.0 24 1.1.1.2
int g0/0/1
port link-type trunk
port trunk allow-pass vlan all
wlan
[AC6005-wlan-view]regulatory-domain-profile name dom
命令解释:
创建名为dom的管理模板。
[AC6005-wlan-regulate-domain-dom]country-code cn
命令解释:
设置国家码为cn,中国是cn。
Info: The current country code is same with the input country code.
[AC6005-wlan-regulate-domain-dom]q
这个模板将被引用到4G射频,不理解没关系慢慢看。
[AC6005-wlan-view]ssid-profile name ssid-cfg-1
命令解释:
创建名为 ssid-cfg-1的ssid模板。
[AC6005-wlan-ssid-prof-ssid-cfg-2]ssid wifi-2.4GHz
命令解释:
将ssid命名为wifi-2.4GHz,即WiFi的名称。
Info: This operation may take a few seconds, please wait.done.
[AC6005-wlan-ssid-prof-ssid-cfg-2]q
这个模板将被引用到5G射频。
[AC6005-wlan-view]ssid-profile name ssid-cfg-2
[AC6005-wlan-ssid-prof-ssid-cfg-2]ssid wifi-5GHz
Info: This operation may take a few seconds, please wait.done.
[AC6005-wlan-ssid-prof-ssid-cfg-2]q
[AC6005-wlan-view]security-profile name sec
命令解释:
创建名为sec的安全模板。
[AC6005-wlan-sec-prof-sec]security wpa-wpa2 psk pass-phrase a1234567 aes
命令解释:
配置 wpa-wpa2 psk的安全策略,密码为a1234567,密码加密方式为aes.
[AC6005-wlan-sec-prof-sec]q
[AC6005-wlan-view]vap-profile name vap-cfg-1
命令解释:
创建名为vap-cfg-1的VAP模板。
[AC6005-wlan-vap-prof-vap-cfg-1]forward-mode direct-forward
命令解释:
将AP的转发方式设定为直接转发。
[AC6005-wlan-vap-prof-vap-cfg-1]security-profile sec
命令解释:
引用名为sec的安全模板。
Info: This operation may take a few seconds, please wait.done.
[AC6005-wlan-vap-prof-vap-cfg-1]ssid-profile ssid-cfg-1
命令解释:
引用名为ssid-cfg-1的ssid模板,引用这个模板无线信号会显示为wifi-2.4GHz,理解上面的ssid模板没有哇。
Info: This operation may take a few seconds, please wait.done.
[AC6005-wlan-vap-prof-vap-cfg-1]q
[AC6005-wlan-view]vap-profile name vap-cfg-2
[AC6005-wlan-vap-prof-vap-cfg-2]forward-mode direct-forward
[AC6005-wlan-vap-prof-vap-cfg-2]security-profile sec
Info: This operation may take a few seconds, please wait.done.
[AC6005-wlan-vap-prof-vap-cfg-2]ssid-profile ssid-cfg-2
Info: This operation may take a few seconds, please wait.done.
[AC6005-wlan-vap-prof-vap-cfg-2]q
[AC6005-wlan-view]ap-group name ap-g
命令解释:
创建名为ap-g的AP组。
进入到名为ap-g的AP组也用这句命令。
[AC6005-wlan-ap-group-ap-g]regulatory-domain-profile dom
命令解释:
引用名为dom的管理模板,需提前创建。
Warning: Modifying the country code will clear channel, power and antenna gain configurations of the radio and reset the AP. Continue?[Y/N]:y
[AC6005-wlan-ap-group-ap-g]vap-profile vap-cfg-1 wlan 1 radio 0
命令解释:
在编号为1的wlan中,编号为0的radio射频引用名为vap-cfg-1的VAP模板。
编号为0的radio射频是4G。
Info: This operation may take a few seconds, please wait…done.
[AC6005-wlan-ap-group-ap-g]vap-profile vap-cfg-2 wlan 1 radio 1
命令解释:
在编号为1的wlan中,编号为1的radio射频引用名为vap-cfg-2的VAP模板。
编号为1的radio射频是5G。
Info: This operation may take a few seconds, please wait…done.
[AC6005-wlan-view]ap auth-mode mac-auth
命令解释:ap的认证方式为mac-auth,即mac地址认证。
[AC6005-wlan-view]ap-id 1 ap-mac 00e0-fc07-0840
命令解释:硬件地址为00e0-fc07-0840的AP上线,编号为1
[AC6005-wlan-ap-1]ap-group ap-g
命令解释:将编号为1的AP添加到名为ap-g的AP组
Warning: This operation may cause AP reset. If the country code changes, it will clear channel, power and antenna gain configurations of the radio, Whether to continue? [Y/N]:y
Info: This operation may take a few seconds. Please wait for a moment… done.
[AC6005-wlan-view]ap-id 2 ap-mac 00e0-fc55-7750
[AC6005-wlan-ap-2]ap-group ap-g
Warning: This operation may cause AP reset. If the country code changes, it will clear channel, power and antenna gain configurations of the radio, Whether to continue? [Y/N]:y
Info: This operation may take a few seconds. Please wait for a moment… done.
[AC6005-wlan-ap-2]q
[AC6005-wlan-view]q
[AC6005]capwap source interface vlanif 30
注意:这句命令并不是在WLAN视图下配置的。
有这两个大圈圈就表示OK了

如果对ssid模板还是不理解,可以看下图。

首先:capwap那句命令容易漏掉。
其次:在配置dhcp地址池的时候,option 43这句容易漏掉。
再次:必须得先option 43再dhcp select global,不能已经dhcp select global发现没option 43 ,再去配置option 43,知道为啥嘛?因为分配的dhcp地址和地址池中的东西已经生效,还在租期之内,使用的是没有option 43的地址池中的东西。
最后:这些都是交换机,配IP地址请到vlaif,dhcp select global也一样。
如果有收获,嘿嘿,点个赞呗!
如何在buildr项目中使用Ruby?我在很多不同的项目中使用过Ruby、JRuby、Java和Clojure。我目前正在使用我的标准Ruby开发一个模拟应用程序,我想尝试使用Clojure后端(我确实喜欢功能代码)以及JRubygui和测试套件。我还可以看到在未来的不同项目中使用Scala作为后端。我想我要为我的项目尝试一下buildr(http://buildr.apache.org/),但我注意到buildr似乎没有设置为在项目中使用JRuby代码本身!这看起来有点傻,因为该工具旨在统一通用的JVM语言并且是在ruby中构建的。除了将输出的jar包含在一个独特的、仅限ruby
在rails源中:https://github.com/rails/rails/blob/master/activesupport/lib/active_support/lazy_load_hooks.rb可以看到以下内容@load_hooks=Hash.new{|h,k|h[k]=[]}在IRB中,它只是初始化一个空哈希。和做有什么区别@load_hooks=Hash.new 最佳答案 查看rubydocumentationforHashnew→new_hashclicktotogglesourcenew(obj)→new_has
我想用ruby编写一个小的命令行实用程序并将其作为gem分发。我知道安装后,Guard、Sass和Thor等某些gem可以从命令行自行运行。为了让gem像二进制文件一样可用,我需要在我的gemspec中指定什么。 最佳答案 Gem::Specification.newdo|s|...s.executable='name_of_executable'...endhttp://docs.rubygems.org/read/chapter/20 关于ruby-在Ruby中编写命令行实用程序
我有一个在Linux服务器上运行的ruby脚本。它不使用rails或任何东西。它基本上是一个命令行ruby脚本,可以像这样传递参数:./ruby_script.rbarg1arg2如何将参数抽象到配置文件(例如yaml文件或其他文件)中?您能否举例说明如何做到这一点?提前谢谢你。 最佳答案 首先,您可以运行一个写入YAML配置文件的独立脚本:require"yaml"File.write("path_to_yaml_file",[arg1,arg2].to_yaml)然后,在您的应用中阅读它:require"yaml"arg
我已经在Sinatra上创建了应用程序,它代表了一个简单的API。我想在生产和开发上进行部署。我想在部署时选择,是开发还是生产,一些方法的逻辑应该改变,这取决于部署类型。是否有任何想法,如何完成以及解决此问题的一些示例。例子:我有代码get'/api/test'doreturn"Itisdev"end但是在部署到生产环境之后我想在运行/api/test之后看到ItisPROD如何实现? 最佳答案 根据SinatraDocumentation:EnvironmentscanbesetthroughtheRACK_ENVenvironm
有没有办法在这个简单的get方法中添加超时选项?我正在使用法拉第3.3。Faraday.get(url)四处寻找,我只能先发起连接后应用超时选项,然后应用超时选项。或者有什么简单的方法?这就是我现在正在做的:conn=Faraday.newresponse=conn.getdo|req|req.urlurlreq.options.timeout=2#2secondsend 最佳答案 试试这个:conn=Faraday.newdo|conn|conn.options.timeout=20endresponse=conn.get(url
我的主要目标是能够完全理解我正在使用的库/gem。我尝试在Github上从头到尾阅读源代码,但这真的很难。我认为更有趣、更温和的踏脚石就是在使用时阅读每个库/gem方法的源代码。例如,我想知道RubyonRails中的redirect_to方法是如何工作的:如何查找redirect_to方法的源代码?我知道在pry中我可以执行类似show-methodmethod的操作,但我如何才能对Rails框架中的方法执行此操作?您对我如何更好地理解Gem及其API有什么建议吗?仅仅阅读源代码似乎真的很难,尤其是对于框架。谢谢! 最佳答案 Ru
我正在阅读SandiMetz的POODR,并且遇到了一个我不太了解的编码原则。这是代码:classBicycleattr_reader:size,:chain,:tire_sizedefinitialize(args={})@size=args[:size]||1@chain=args[:chain]||2@tire_size=args[:tire_size]||3post_initialize(args)endendclassMountainBike此代码将为其各自的属性输出1,2,3,4,5。我不明白的是查找方法。当一辆山地自行车被实例化时,因为它没有自己的initialize方法
我的假设是moduleAmoduleBendend和moduleA::Bend是一样的。我能够从thisblog找到解决方案,thisSOthread和andthisSOthread.为什么以及什么时候应该更喜欢紧凑语法A::B而不是另一个,因为它显然有一个缺点?我有一种直觉,它可能与性能有关,因为在更多命名空间中查找常量需要更多计算。但是我无法通过对普通类进行基准测试来验证这一点。 最佳答案 这两种写作方法经常被混淆。首先要说的是,据我所知,没有可衡量的性能差异。(在下面的书面示例中不断查找)最明显的区别,可能也是最著名的,是你的
几个月前,我读了一篇关于rubygem的博客文章,它可以通过阅读代码本身来确定编程语言。对于我的生活,我不记得博客或gem的名称。谷歌搜索“ruby编程语言猜测”及其变体也无济于事。有人碰巧知道相关gem的名称吗? 最佳答案 是这个吗:http://github.com/chrislo/sourceclassifier/tree/master 关于ruby-寻找通过阅读代码确定编程语言的rubygem?,我们在StackOverflow上找到一个类似的问题: