news 2026/6/10 18:31:44

WLAN二层旁挂组网-隧道转发

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
WLAN二层旁挂组网-隧道转发

WLAN二层隧道转发是一种数据转发模式,AP和AC之间通过CAPWAP隧道封装用户数据,所有用户报文都先送到AC集中处理,再由AC转发出去。

核心特点

  • 集中控制‌:所有用户数据都经过AC处理,便于统一管理和安全控制。
  • 配置简单‌:通常只需要在AP和AC直连的接口上配置为Trunk模式,允许业务VLAN通过。
  • 适用场景‌:适合中小规模网络,或者对集中管理和安全要求较高的环境。

​​​​​​​

R1路由配置

[Huawei-GigabitEthernet0/0/1]interface GigabitEthernet 0/0/0

[Huawei-GigabitEthernet0/0/0]ip add 192.168.111.1 24

[Huawei-GigabitEthernet0/0/0]quit

[Huawei]ip route-static 192.168.0.0 16 192.168.111.2

SW1核心交换机配置

<Huawei>system-view

[Huawei]vlan batch 100 111 110

[Huawei]interface vlanif100

[Huawei-Vlanif100]ip add 192.168.100.1 24

[Huawei-Vlanif100]interface vlanif111

[Huawei-Vlanif111]ip add 192.168.111.2 24

[Huawei]interface vlanif110

[Huawei-Vlanif110]ip add 192.168.110.1 24

[Huawei-Vlanif110]quit

[Huawei]interface GigabitEthernet 0/0/1

[Huawei-GigabitEthernet0/0/1]port link-type access

[Huawei-GigabitEthernet0/0/1]port default vlan 111

[Huawei-GigabitEthernet0/0/1]interface GigabitEthernet 0/0/2

[Huawei-GigabitEthernet0/0/2]port link-type trunk

[Huawei-GigabitEthernet0/0/2]port trunk allow-pass vlan 100 110

[Huawei-GigabitEthernet0/0/2]port trunk pvid vlan 100

[Huawei-GigabitEthernet0/0/2]interface GigabitEthernet 0/0/3

[Huawei-GigabitEthernet0/0/3]port link-type access

[Huawei-GigabitEthernet0/0/3]port default vlan 100

[Huawei-GigabitEthernet0/0/3]quit

[Huawei]ip route-static 0.0.0.0 0 192.168.111.1

[Huawei]ip route-static 192.168.0.0 16 192.168.110.2

AC1上面的配置

<AC6605>system-view

[AC6605]vlan batch 100 110

[AC6605]interface vlanif 110

[AC6605-Vlanif110]ip add 192.168.110.2 24

[AC6605-Vlanif110]interface vlanif 100

[AC6605-Vlanif100]ip add 192.168.100.2 24

[AC6605]interface GigabitEthernet 0/0/1

[AC6605-GigabitEthernet0/0/1]port link-type trunk

[AC6605-GigabitEthernet0/0/1]port trunk pvid vlan 100

[AC6605-GigabitEthernet0/0/1]port trunk allow-pass 100 110

[AC6605-GigabitEthernet0/0/1]quit

[AC6605]vlan batch 101 102

[AC6605]interface vlanif 101

[AC6605-Vlanif101]ip add 192.168.101.1 24

[AC6605-Vlanif101]interface vlanif 102

[AC6605-Vlanif102]ip add 192.168.102.1 24

[AC6605-Vlanif102]quit

[AC6605]ip route-static 0.0.0.0 0 192.168.110.1

AC1上配置DHCP

[AC6605]dhcp enable

[AC6605]ip pool vlan100

[AC6605-ip-pool-vlan100]network 192.168.100.0 mask 24

[AC6605-ip-pool-vlan100]gateway-list 192.168.100.1

[AC6605-ip-pool-vlan100]dns-list 8.8.8.8

[AC6605-ip-pool-vlan100]quit

[AC6605]ip pool vlan101

[AC6605-ip-pool-vlan101]network 192.168.101.0 mask 24

[AC6605-ip-pool-vlan101]gateway-list 192.168.101.1

[AC6605-ip-pool-vlan101]dns-list 8.8.8.8

[AC6605-ip-pool-vlan101]quit

[AC6605]ip pool vlan102

[AC6605-ip-pool-vlan102]network 192.168.102.0 mask 24

[AC6605-ip-pool-vlan102]gateway-list 192.168.102.1

[AC6605-ip-pool-vlan102]dns-list 8.8.8.8

[AC6605-ip-pool-vlan102]quit

[AC6605]interface vlanif 100

[AC6605-Vlanif100]dhcp select global

[AC6605-Vlanif100]quit

[AC6605]interface vlanif101

[AC6605-Vlanif101]dhcp select global

[AC6605-Vlanif101]quit

[AC6605]interface vlanif102

[AC6605-Vlanif102]dhcp select global

[AC6605-Vlanif102]quit

在AC1上配置AP上线

指定和AP建立capwap的地址或接口

[AC6605]capwap source interface vlanif 100

配置域管理模版

[AC6605]wlan

[AC6605-wlan-view]regulatory-domain-profile name default

[AC6605-wlan-regulate-domain-default]country-code cn

[AC6605-wlan-regulate-domain-default]quit

创建AP组(因为有多个AP所以创建组来进行区分)

[AC6605]wlan

[AC6605-wlan-view]ap-group name ap-office1

[AC6605-wlan-ap-group-ap-office1]regulatory-domain-profile default

onfigurations of the radio and reset the AP. Continue?[Y/N]:y

[AC6605-wlan-ap-group-ap-office1]quit

[AC6605-wlan-view]ap-group name ap-office2

[AC6605-wlan-ap-group-ap-office2]regulatory-domain-profile default

onfigurations of the radio and reset the AP. Continue?[Y/N]:y

[AC6605-wlan-ap-group-ap-office2]quit

[AC6605-wlan-view]

将AP添加到AP组中

[AC6605-wlan-view]ap-id 1 ap-mac 00e0-fc6e-26b0

[AC6605-wlan-ap-1]ap-name ap1

[AC6605-wlan-ap-1]ap-group ap-office1

Warning: This operation may cause AP reset. If the country code changes, it willclear 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.

[AC6605-wlan-ap-1]quit

[AC6605-wlan-view]ap-id 2 ap-mac 00e0-fcc0-34c0

[AC6605-wlan-ap-2]ap-name ap2

[AC6605-wlan-ap-2]ap-group ap-office1

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.

[AC6605-wlan-ap-2]quit

[AC6605-wlan-view]ap-id3ap-mac00e0-fca7-18d0

[AC6605-wlan-ap-3]ap-name ap3

[AC6605-wlan-ap-3]ap-group ap-office2

Warning: This operation may cause AP reset. If the country code changes, it willclear 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.

[AC6605-wlan-ap-3]quit

[AC6605-wlan-view]ap-id4ap-mac00e0-fc8f-3db0

[AC6605-wlan-ap-4]ap-name ap4

[AC6605-wlan-ap-4]ap-group ap-office2

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.

[AC6605-wlan-ap-4]quit

配置AP上线

  1. 配置SSID模版
  2. 配置安全模版
  3. 配置vap模版
  4. 在ap组中应用vap模版、

配置SSID模版

[AC6605]wlan

[AC6605-wlan-view]ssid-profile name ssid-office1

[AC6605-wlan-ssid-prof-ssid-office1]quit

[AC6605-wlan-view]ssid

[AC6605-wlan-view]ssid-profile name ssid-office2

[AC6605-wlan-ssid-prof-ssid-office2]

[AC6605-wlan-ssid-prof-ssid-office2]quit

配置安全模版

[AC6605-wlan-view]security-profile name sec-office1

[AC6605-wlan-sec-prof-sec-office1]security wpa-wpa2 psk pass-phrase a1234567 aes

[AC6605-wlan-sec-prof-sec-office1]security-profile name sec-office2

[AC6605-wlan-sec-prof-sec-office2]security wpa-wpa2 psk pass-phraseb1234567 aes

配置vap模版

[AC6605-wlan-view]vap-profile name vap-office1

[AC6605-wlan-vap-prof-vap-office1]forward-mode tunnel

Info: This operation may take a few seconds, please wait.done.

[AC6605-wlan-vap-prof-vap-office1]service-vlan vlan-id 101

Info: This operation may take a few seconds, please wait.done.

[AC6605-wlan-vap-prof-vap-office1]ssid-profile ssid-office1

Info: This operation may take a few seconds, please wait.done.

[AC6605-wlan-vap-prof-vap-office1]security-profile sec-office1

Info: This operation may take a few seconds, please wait.done.

[AC6605-wlan-vap-prof-vap-office1]quit

[AC6605-wlan-view]

[AC6605-wlan-view]vap-profile name vap-office2

[AC6605-wlan-vap-prof-vap-office2]forward-mode tunnel

Info: This operation may take a few seconds, please wait.done.

[AC6605-wlan-vap-prof-vap-office2]service-vlan vlan-id 102

Info: This operation may take a few seconds, please wait.done.

[AC6605-wlan-vap-prof-vap-office2]ssid-profile ssid-office2

Info: This operation may take a few seconds, please wait.done.

[AC6605-wlan-vap-prof-vap-office2]security-profile sec-office2

Info: This operation may take a few seconds, please wait.done.

[AC6605-wlan-vap-prof-vap-office2]quit

在ap组中应用vap模版

[AC6605-wlan-view]ap-group name ap-office1

[AC6605-wlan-ap-group-ap-office1]vap-profile vap-office1 wlan 1 radio 0

Info: This operation may take a few seconds, please wait...done.

[AC6605-wlan-ap-group-ap-office1]vap-profile vap-office1 wlan 1 radio 1

Info: This operation may take a few seconds, please wait...done.

[AC6605-wlan-ap-group-ap-office1]quit

[AC6605-wlan-view]ap-group name ap-office2

[AC6605-wlan-ap-group-ap-office2]vap-profile vap-office2wlan2radio 0

Info: This operation may take a few seconds, please wait...done.

[AC6605-wlan-ap-group-ap-office2]vap-profile vap-office2wlan2radio 1

Info: This operation may take a few seconds, please wait...done.

[AC6605-wlan-ap-group-ap-office2]quit

测试结果

版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/6/10 11:27:21

Z-Image Turbo实战总结:AI绘画提效的三大核心功能

Z-Image Turbo实战总结&#xff1a;AI绘画提效的三大核心功能 1. 本地极速画板&#xff1a;不联网、低门槛、开箱即用的AI绘图体验 你有没有试过等一张图生成要两分钟&#xff0c;结果还是一片漆黑&#xff1f;或者刚调好参数&#xff0c;模型就报错退出&#xff0c;连提示词…

作者头像 李华
网站建设 2026/6/10 11:13:27

Ollama一键部署translategemma-12b-it:55种语言翻译模型5分钟上手

Ollama一键部署translategemma-12b-it&#xff1a;55种语言翻译模型5分钟上手 你是否试过在本地电脑上&#xff0c;不依赖网络、不上传隐私文本&#xff0c;就能完成高质量的多语言翻译&#xff1f; 是否希望把一张菜单、说明书、产品图&#xff0c;直接“看懂”并精准翻成中文…

作者头像 李华
网站建设 2026/6/10 11:44:17

VibeVoice Pro GPU算力优化指南:RTX 3090上实现8GB显存高效推理

VibeVoice Pro GPU算力优化指南&#xff1a;RTX 3090上实现8GB显存高效推理 1. 为什么在RTX 3090上跑VibeVoice Pro需要专门优化&#xff1f; 你可能已经试过直接拉起VibeVoice Pro&#xff0c;在RTX 3090上执行bash /root/build/start.sh&#xff0c;结果发现——界面能打开…

作者头像 李华
网站建设 2026/6/10 15:30:46

Z-Image-Edit与Midjourney对比:图像编辑能力实战评测

Z-Image-Edit与Midjourney对比&#xff1a;图像编辑能力实战评测 1. 为什么这次对比值得你花5分钟看完 你是不是也遇到过这些情况&#xff1a; 想把一张商品图的背景换成纯白&#xff0c;结果用PS抠图半小时还毛边&#xff1b;客户说“把模特衣服换成蓝色&#xff0c;但要保…

作者头像 李华
网站建设 2026/5/31 19:41:10

如何从零开始部署你的私有文档AI助手?完整指南来了

如何从零开始部署你的私有文档AI助手&#xff1f;完整指南来了 【免费下载链接】anything-llm 这是一个全栈应用程序&#xff0c;可以将任何文档、资源&#xff08;如网址链接、音频、视频&#xff09;或内容片段转换为上下文&#xff0c;以便任何大语言模型&#xff08;LLM&am…

作者头像 李华
网站建设 2026/6/5 21:01:53

无需配置!SiameseUIE信息抽取模型开箱即用教程

无需配置&#xff01;SiameseUIE信息抽取模型开箱即用教程 在自然语言处理的实际落地中&#xff0c;信息抽取常被视作“高门槛任务”&#xff1a;模型加载失败、环境依赖冲突、分词器报错、实体识别冗余……这些问题让很多业务同学望而却步。但如果你正面临一个简单明确的需求…

作者头像 李华