最简单的WLAN三层组网实验
最简单的WLAN三层组网实验
1、拓扑图
2、组网配置
SW1配置:
[SW1]vlan batch 10 101 102
//放行VLAN
[SW1]interface GigabitEthernet0/0/1
[SW1-GigabitEthernet0/0/1]port link-type trunk
[SW1-GigabitEthernet0/0/1]port trunk pvid vlan 100
[SW1-GigabitEthernet0/0/1]port trunk allow-pass vlan 100 to 101
//放行VLAN
[SW1]interface GigabitEthernet0/0/2
[SW1-GigabitEthernet0/0/2]port link-type trunk
[SW1-GigabitEthernet0/0/2]port trunk allow-pass vlan 10 101
//配置网关
[SW1]interface Vlanif10
[SW1-Vlanif10]ip address 192.168.13.1 255.255.255.0
[SW1]interface Vlanif100
[SW1-Vlanif100]ip address 192.168.100.254 255.255.255.0
[SW1-Vlanif100]dhcp select interface
[SW1-Vlanif100]dhcp server option 43 sub-option 2 ip-address 192.168.13.2
[SW1]interface Vlanif101
[SW1-Vlanif101]ip address 192.168.101.254 255.255.255.0
[SW1-Vlanif101]dhcp select interface
查看SW1中mac地址
00e0-fc4e-5810是AP的mac地址后面有用
[SW1]dis mac-address
MAC address table of slot 0:
-------------------------------------------------------------------------------
MAC Address VLAN/ PEVLAN CEVLAN Port Type LSP/LSR-ID
VSI/SI MAC-Tunnel
-------------------------------------------------------------------------------
00e0-fc63-1698 10 - - GE0/0/2 dynamic 0/-
00e0-fc4e-5810 100 - - GE0/0/1 dynamic 0/-
-------------------------------------------------------------------------------
Total matching items on slot 0 displayed = 2
AC1配置
[AC]vlan batch 10 101
//放行VLAN
[AC]interface GigabitEthernet0/0/1
[AC-GigabitEthernet0/0/1]port link-type trunk
[AC-GigabitEthernet0/0/1]port trunk allow-pass vlan 10 101
//配置IP地址
[AC]interface Vlanif10
[AC-Vlanif10]ip address 192.168.13.2 255.255.255.0
[AC]capwap source ip-address 192.168.13.2
//配置默认路由使AP与AC互通
[AC]ip route-static 192.168.100.0 24 192.168.13.1
//配置AP上线
[AC]wlan
[AC-wlan-view]ap-id 0 ap-mac 00e0-fc63-1698
查看ap是否以及上线
0 00e0-fc4e-5810 00e0-fc4e-5810 default 192.168.100.253 AP2050DN nor
0 14S
这里为nor即为已上线
[AC]dis ap all
Info: This operation may take a few seconds. Please wait for a moment.done.
Total AP information:
nor : normal [1]
--------------------------------------------------------------------------------
----------------------
ID MAC Name Group IP Type State
STA Uptime
--------------------------------------------------------------------------------
----------------------
0 00e0-fc4e-5810 00e0-fc4e-5810 default 192.168.100.253 AP2050DN nor
0 14S
--------------------------------------------------------------------------------
----------------------
Total: 1
AC模板配置
[AC]wlan
[AC-wlan-view]ssid-profile name ljr //ljr为自定义名字
[AC-wlan-ssid-prof-ljr]ssid linjianrong //linjianrong可以理解为WiFi的名字
[AC-wlan-ssid-prof-ljr]q
[AC-wlan-view]security-profile name ljr/ /ljr为自定义名字
[AC-wlan-sec-prof-ljr]security wpa2 psk pass-phrase 2018060301324 tkip
Warning: The current password is too simple. For the sake of security, you are a
dvised to set a password containing at least two of the following: lowercase let
ters a to z, uppercase letters A to Z, digits, and special characters. Continue?
[Y/N]:y
Warning: If the wmm disable command, TKIP, WEP, or radio type of 802.11a/b/g is
configured, the function of denying access of legacy STAs cannot take effect.
这里的 2018060301324 为密码
[AC-wlan-sec-prof-ljr]q
[AC-wlan-view]vap-profile name ljr
[AC-wlan-vap-prof-ljr]forward-mode direct-forward //direct-forward 为直接转发模式
[AC-wlan-vap-prof-ljr]service-vlan vlan-id 101 //管理的vlan,即ap下面管理的PC
[AC-wlan-vap-prof-ljr]ssid-profile ljr //ssid模块
[AC-wlan-vap-prof-ljr]security-profile ljr //安全模块
[AC-wlan-view]ap-group name default
[AC-wlan-ap-group-default]vap-profile ljr wlan 1 radio all
Info: This operation may take a few seconds, please wait...done.
上面的敲完后会出现下面的情况
双击1、2,输入密码2018060301324,点击确定完成连接
可以看到已经连上了
双击STA1,在命令行输入ipconfig查看是否已经获取IP地址
到此为止,整个实验完成。
3、总结:
(1)在ENSP中观察不到AP上线可能需要重启AP;
(2)AP与192.168.13.2IP地址需要互通,AP才可能上线;
名字以明志: python netc.py Traceback (most recent call last): File "E:\学习好好\2024年4月\巡查实例\netc.py", line 3, in <module> import paramiko,time,datetime,getpass,re ModuleNotFoundError: No module named 'paramiko' 真机测试有错误,能给个纤细的代码和解释吗?非常感谢!
初见_の: 您好博主,写的非常好,就是阿里云盘的资源失效了,可以重新发一下吗,谢谢大哥了
weixin_45498766: 谢谢喜欢
weixin_45498766: 嘻嘻
不正经的kimol君: 快进我的收藏夹