华为eNSP模拟器:搭建 WLAN 直连式二层组网,实现无线业务数据流直接转发。

文章详细描述了如何配置华为设备中的AP分配静态IP、管理VLAN100和101,包括配置DHCP服务、创建IP池,以及配置无线业务、SSID、VAP模板和安全策略。最后,文章展示了AP上线、验证和用户连接的步骤。
摘要由CSDN通过智能技术生成
1、配置 AP 管理 vlan100
步骤 1: 配置AP1静态IP地址 10.1.100.66 和网关 10.1.100.1,配置 AC 的地址 10.1.100.2,重启生效,使用 display ap-address-info 查看配置是否生效。

<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.    
[Huawei]ap-address mode static 
Info: The configuration takes effect after the AP is restarted.
[Huawei]ap-address static ip-address 10.1.100.66 24 10.1.100.1
Info: The configuration takes effect after the AP is restarted.
[Huawei]ap-address static ac-list 10.1.100.2
Info: The configuration takes effect after the AP is restarted.
[Huawei]quit
<Huawei>reboot 
System will reboot! Continue ? [y/n]:y
Info: system is rebooting ,please wait...
<Huawei>display ap-address-info

==============================================================
Active AP Address Info
  AP Mode     : static
  Ip Address  : 10.1.100.66
  Ip Version  : 4
  Mask        : 255.255.255.0
  Gateway     : 10.1.100.1
  AC 0 ip     : 10.1.100.2
  AC 1 ip     : -
  AC 2 ip     : -
  AC 3 ip     : -
--------------------------------------------------------------
Reboot Active AP Address Info
  AP Mode     : static
  Ip Address  : 10.1.100.66
  Ip Version  : 4
  Mask        : 255.255.255.0
  Gateway     : 10.1.100.1
  AC 0 ip     : 10.1.100.2
  AC 1 ip     : -
  AC 2 ip     : -
  AC 3 ip     : -
==============================================================

步骤 2:配置AP2静态IP地址10.1.100.88 和网关 10.1.100.1,设置 AC 的地址为 10. 1.100.2,重启生效,使用 display ap-address-info 查看配置是否生效。

<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]ap-address mode static 
Info: The configuration takes effect after the AP is restarted.
[Huawei]ap-address static ip-address 10.1.100.88 24 10.1.100.1
Info: The configuration takes effect after the AP is restarted.
[Huawei]ap-address static ac-list 10.1.100.2
Info: The configuration takes effect after the AP is restarted.
[Huawei]quit
<Huawei>reboot
System will reboot! Continue ? [y/n]:y
Info: system is rebooting ,please wait...
<Huawei>display ap-address-info

==============================================================
Active AP Address Info
  AP Mode     : static
  Ip Address  : 10.1.100.88
  Ip Version  : 4
  Mask        : 255.255.255.0
  Gateway     : 10.1.100.1
  AC 0 ip     : 10.1.100.2
  AC 1 ip     : -
  AC 2 ip     : -
  AC 3 ip     : -
--------------------------------------------------------------
Reboot Active AP Address Info
  AP Mode     : static
  Ip Address  : 10.1.100.88
  Ip Version  : 4
  Mask        : 255.255.255.0
  Gateway     : 10.1.100.1
  AC 0 ip     : 10.1.100.2
  AC 1 ip     : -
  AC 2 ip     : -
  AC 3 ip     : -
==============================================================
步骤 3: 配置AC,创建 vlan100,并设置 G0/0/1 和 G0/0/2 为trunk,设置 G0/0/1 和 G0/0/2 的 pvid为vlan100, 设置 G0/0/3 为trunk,并设置vlan100 虚接口 IP 地址为 10.1.100.2。
<AC6005>system-view 
Enter system view, return user view with Ctrl+Z.
[AC6005]vlan 100
Info: This operation may take a few seconds. Please wait for a moment...done.
[AC6005-vlan100]quit    
[AC6005]interface GigabitEthernet 0/0/1

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

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

[AC6005-GigabitEthernet0/0/1]port trunk allow-pass vlan all 
[AC6005-GigabitEthernet0/0/1]quit
[AC6005]interface GigabitEthernet 0/0/2
[AC6005-GigabitEthernet0/0/2]port link-type trunk

[AC6005-GigabitEthernet0/0/2]port trunk pvid vlan 100
[AC6005-GigabitEthernet0/0/2]port trunk allow-pass vlan all
[AC6005-GigabitEthernet0/0/2]quit
[AC6005]interface GigabitEthernet 0/0/3
[AC6005-GigabitEthernet0/0/3]port link-type trunk
[AC6005-GigabitEthernet0/0/3]port trunk allow-pass vlan all
[AC6005-GigabitEthernet0/0/3]quit
[AC6005]interface vlanif 100
[AC6005-Vlanif100]ip address 10.1.100.2 24
[AC6005-Vlanif100]quit
[AC6005]
步骤 4: 配置S5700 ,创建vlan100,配置 G0/0/1 为 trunk, 配置vlanif100:10.1.100.1。

<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname S5700
Dec 15 2023 23:28:09-08:00 S5700 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
25.191.3.1 configurations have been changed. The current change number is 4, the
 change loop count is 0, and the maximum number of records is 4095.
[S5700]vlan 100
[S5700-vlan100]quit
[S5700]interface GigabitEthernet 0/0/1
[S5700-GigabitEthernet0/0/1]port link-type trunk     
[S5700-GigabitEthernet0/0/1]port trunk allow-pass vlan all 
[S5700-GigabitEthernet0/0/1]quit
[S5700]interface Vlanif 100
[S5700-Vlanif100]ip address 10.1.100.1 24
[S5700-Vlanif100]
Dec 15 2023 23:29:51-08:00 S5700 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol 
IP on the interface Vlanif100 has entered the UP state.

验证 AP1 和 AP2 上,可以 ping 通 10.1.100.1和10.1.100.2。

<Huawei>ping 10.1.100.1
  PING 10.1.100.1: 56  data bytes, press CTRL_C to break
    Reply from 10.1.100.1: bytes=56 Sequence=1 ttl=255 time=80 ms
    Reply from 10.1.100.1: bytes=56 Sequence=2 ttl=255 time=10 ms
    Reply from 10.1.100.1: bytes=56 Sequence=3 ttl=255 time=10 ms
    Reply from 10.1.100.1: bytes=56 Sequence=4 ttl=255 time=20 ms
    Reply from 10.1.100.1: bytes=56 Sequence=5 ttl=255 time=20 ms

  --- 10.1.100.1 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 10/28/80 ms

<Huawei>ping 10.1.100.2
  PING 10.1.100.2: 56  data bytes, press CTRL_C to break
    Reply from 10.1.100.2: bytes=56 Sequence=1 ttl=255 time=1 ms
    Reply from 10.1.100.2: bytes=56 Sequence=2 ttl=255 time=10 ms
    Reply from 10.1.100.2: bytes=56 Sequence=3 ttl=255 time=1 ms
    Reply from 10.1.100.2: bytes=56 Sequence=4 ttl=255 time=10 ms
    Reply from 10.1.100.2: bytes=56 Sequence=5 ttl=255 time=1 ms

  --- 10.1.100.2 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 1/4/10 ms

2、配置无线业务 vlan101
步骤 1: 配置AC,启动 DHCP 服务,作为无线业务网段10.1.101.0/24 网段的 DHCP 服务器,创建 DHCP 地址池,定义网络、网关、排 除 IP,创建 VLAN101,配置 vlanif101:10.1.101.2,并启用接口 DHCP 服务选择全局地址池。
[AC6005]dhcp enable 
Info: The operation may take a few seconds. Please wait for a moment.done.
[AC6005]vlan 101    
[AC6005]ip pool vlan101pool
Info: It is successful to create an IP address pool.
[AC6005-ip-pool-vlan101pool]network 10.1.101.0 mask 24    
[AC6005-ip-pool-vlan101pool]gateway-list 10.1.101.1    
[AC6005-ip-pool-vlan101pool]excluded-ip-address 10.1.101.1 10.1.101.10
Info: Some of addresses not be excluded are not idle or not in the pool.
[AC6005-ip-pool-vlan101pool]quit    
[AC6005]interface Vlanif 101
[AC6005-Vlanif101]ip address 10.1.101.2 24
[AC6005-Vlanif101]dhcp select global 
[AC6005-Vlanif101]quit
步骤 2: S5700 配置,创建 VLAN101,配置 VLAN101 虚接口 IP 地址为 10.
1.101.1。
[S5700]vlan 101
[S5700-vlan101]quit
Dec 15 2023 23:53:10-08:00 S5700 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
25.191.3.1 configurations have been changed. The current change number is 10, th
e change loop count is 0, and the maximum number of records is 4095.    
[S5700]interface Vlanif 101
[S5700-Vlanif101]ip address 10.1.101.1 24
[S5700-Vlanif101]quit
3、配置 AP 在 AC 上线
步骤 1:在 AC6005 上创建域管理模板,名称为 domain1,配置 AC 的国家码为中国 CN,然后创建 AP 组 ap-group1,绑定域管理模板 domain1 到 AP 组 ap-group1。
[AC6005]wlan    
[AC6005-wlan-view]regulatory-domain-profile name domain1
[AC6005-wlan-regulate-domain-domain1]country-code cn
Info: The current country code is same with the input country code.
[AC6005-wlan-regulate-domain-domain1]quit
[AC6005-wlan-view]ap-group name ap-group1
Info: This operation may take a few seconds. Please wait for a moment.done.
[AC6005-wlan-ap-group-ap-group1]regulatory-domain-profile domain1
Warning: Modifying the country code will clear channel, power and antenna gain c
onfigurations of the radio and reset the AP. Continue?[Y/N]:y
[AC6005-wlan-ap-group-ap-group1]quit
步骤 2:配置 AC 的源接口
[AC6005]capwap source interface Vlanif 100
步骤 3:配置 AP 认证方式,此处的认证方式是指 AC 根据什么来验证 AP 的 身份,从而同意 AP 接入 AC。默认情况是对 AP 的 mac 地址进行认证,此处采用不认证的方式。
[AC6005]wlan     
[AC6005-wlan-view]ap auth-mode no-auth 
Warning: It is insecure to configure none authentication mode.
步骤 4:将 AP加入到 ap-group1 组中。
[AC6005-wlan-view]ap-id 0    
[AC6005-wlan-ap-0]ap-group ap-group1
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 c
ontinue? [Y/N]:y
Info: This operation may take a few seconds. Please wait for a moment.. done.
[AC6005-wlan-ap-0]quit
[AC6005-wlan-view]ap-id 1
[AC6005-wlan-ap-1]ap-group ap-group1
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 c
ontinue? [Y/N]:y
Info: This operation may take a few seconds. Please wait for a moment.. done.
验证:在 AC上通过 display ap all, 可以查看到 AP和 AP已在 ap-group1 组中。
[AC6005]display ap all
Info: This operation may take a few seconds. Please wait for a moment.done.
Total AP information:
nor  : normal          [2]
--------------------------------------------------------------------------------
--------------------
ID   MAC            Name           Group     IP          Type            State S
TA Uptime
--------------------------------------------------------------------------------
--------------------
0    00e0-fc30-1950 00e0-fc30-1950 ap-group1 10.1.100.88 AP2050DN        nor   0
   1M:14S
1    00e0-fcd7-5760 00e0-fcd7-5760 ap-group1 10.1.100.66 AP2050DN        nor   0
   53S
--------------------------------------------------------------------------------
--------------------
Total: 2
4、配置安全模板
步骤 1:配置安全模板,名称为 security-1, 在安全模板下,可以配置密码 等,就是配置接入这个 WiFi是否需要密码等。本处不设置用户安全接入,为开放式。
[AC6005]wlan    
[AC6005-wlan-view]security-profile name security-1
[AC6005-wlan-sec-prof-security-1]security open
[AC6005-wlan-sec-prof-security-1]quit
步骤 2:配置 SSID 模板,名称为 ssid-1, ssid 模板就是定义用户可见的wlan名字,wlan的名字为 huawei。
[AC6005]wlan
[AC6005-wlan-view]ssid-profile name ssid-1
[AC6005-wlan-ssid-prof-ssid-1]ssid huawei
Info: This operation may take a few seconds, please wait.done.
[AC6005-wlan-ssid-prof-ssid-1]quit
步骤 3:配置 VAP 模板,VAP 模板名称为 huawei-vap,设置转发方式为直接转发,设置无线业务wlan为101,并绑定安全模板 security-1 和 SSID 模板 ssid-1。
[AC6005]wlan
[AC6005-wlan-view]vap-profile name huawei-vap
[AC6005-wlan-vap-prof-huawei-vap]forward-mode direct-forward 
[AC6005-wlan-vap-prof-huawei-vap]service-vlan vlan-id 101
Info: This operation may take a few seconds, please wait.done.
[AC6005-wlan-vap-prof-huawei-vap]security-profile security-1
Info: This operation may take a few seconds, please wait.done.
[AC6005-wlan-vap-prof-huawei-vap]ssid-profile ssid-1
Info: This operation may take a few seconds, please wait.done.
[AC6005-wlan-vap-prof-huawei-vap]quit
步骤 4:绑定 VAP 模板到 AP 组,并设定wlan的编号为 1,使用所有的射频卡, 即使用 2. 4G 频段和 5G 频段。

[AC6005]wlan    
[AC6005-wlan-view]ap-group name ap-group1
[AC6005-wlan-ap-group-ap-group1]vap-profile huawei-vap wlan 1 radio all
Info: This operation may take a few seconds, please wait...done.

最终结果:

验证:
用户 STA1 和 STA2 可以发现有ssid为 huawei 的无线网络,在 STA1 和 STA2 的命令行界面,通过 ipconfig 可以查看到自动获取了10.1.101.0/24 网 段的 IP 地址。并且从 AC可以 ping 通 STA1 和 STA2 的 IP 地址。从 S5700 也可以 ping 通 STA1 和 STA2 的 IP 地址。在 AC 上使用 display station all 可以看到接入的 STA 的 MAC 地址、IP 地址、所接入的 AP、频段等信息。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值