• 注册
当前位置:1313e > 默认分类 >正文

华为设备的AP与AC的配置

华为设备-企业网络的无线网络部署

 

实验需求:

   所有的无线终端,连接wifi,实现互通  

实验思路:

1.确保AP获得IP地址 [vlan100]

2.确保AP注册到AC上

3.正确配置AC,确保AP可以产生无线信号

4.确保“无线终端”正确连接 wifi 信号,并获得IP地址

5.测试“无线终端”之间的连通性

----------------------------------------------------------------

分解任务1:确保AP动态获取IP地址(vlan 100)

分析:

1.SW1连接AP的端口,必须同时接收多个VLAN的数据(vlan101/102/103/104/100)

  所以SW1的口是 trunk

  命令:

    port-group group-member gi0/0/1 to gi0/0/4

port link-type trunk

port trunk allow-pass vlan all

quit

2.AP本身发送出来的 DHCP 报文,通过 Gi0/0/0发出。但是这个口在 AP 上默认的

  模式是 hybrid,并且PVID是1。所以该端口发送出来的DHCP报文是不带标签

3.SW1从 Gi0/0/1接收到AP1发送过来的数据,因为没有标签,所以需要使用Gi0/0/2

  的 PVID 表示的 VLAN 给报文添加1个标签。(默认是vlan1)

  但是,项目要求 AP 属于 vlan 100,即 AP 自动获取的IP地址,也得属于 vlan 100

  所以,必须要求让 SW1 将收到的从 AP-1 学习过来的 DHCP 报文,归属到VLAN 100

  所以,我们应你该修改SW1连接AP时,所使用的那些端口的 PVID 为 100 。

  命令:

    SW1:

vlan 100

   quit

    port-group group-member gi0/0/1 to gi0/0/4

port trunk pvid vlan 100

quit   

4.因为整个项目中的所有的 VLAN 的网关IP地址都在 SW2 上,

  所以SW1需要将终端用户的VLAN数据,以及 AP 本身发送的数据,传送给 SW2 。

  所以SW1与SW2之间的链路,必须是 Trunk,允许所有 VLAN

  命令:

  SW1:

  interface gi0/0/5

    port link-type trunk

port trunk allow-pass vlan all

quit

5.因为 AP 属于 VLAN100 ,但是 DHCP 服务器属于 VLAN 210 。

  所以我们需要为 AP 配置 DHCP 中继(网关),所以我们在SW2上配置 vlan100

  的网关接口IP地址以及将其配置为中继。

  命令:

  SW2:

    interface gi0/0/1

  port link-type trunk

  port trunk allow-pass vlan all

  quit

vlan 100

  quit

    interface vlanif 100

      ip address 192.168.100.254 24

      quit

    dhcp enable

    interface vlanif 100

      dhcp select relay

      dhcp relay server-ip  192.168.210.1

      quit

6.配置 DHCP 服务器 ,创建属于 VLAN100 的地址池

  命令:

  DHCP-Server:  

    undo terminal monitor

    system-view

    sysname DHCP-Server

    interface gi0/0/0

     ip address 192.168.210.1 24

     quit

    dhcp enable

ip pool VLAN100   

   network 192.168.100.0  mask 24

   gateway-list 192.168.100.254

   quit

 

    interface gi0/0/0

       dhcp select global

       quit    

7.配置 VLAN210和DHCP服务器的路由,确保 VLAN 100 的中继与 DHCP服务器互通    

  SW2:

    vlan 210

      quit

    interface gi0/0/10

      port link-type access

      port default vlan 210  

      quit

    interface vlanif 210

      ip address 192.168.210.254 24

      quit     

  DHCP-Server:

    ip route-static  192.168.100.0  24  192.168.210.254

-----------------------------------------------------------------

分解任务2.确保AP注册到AC上

1.确保 AP 知道 AC 服务器的IP地址

  此时,我们可以通过 DHCP 服务器,为每个 AP 自动下发 AC 服务器的IP地址

  命令:

    DHCP-Server:

   ip  pool VLAN100

      option 43 sub-option 3 ascii 192.168.200.2  //AC服务器的IP地址

2.确保 AP 到 AC 的路由是互通的

   -配置SW2为 AC 的网关

      vlan 200

    quit

  interface gi0/0/11

    port link-type access

port default vlan 200

quit

  interface vlanif 200

    ip address 192.168.200.1  24

quit

   -配置 AC 的接口IP地址

      vlan 200

    quit

  interface gi0/0/11

    port link-type access

port default vlan 200

quit

  interface vlanif 200

    ip address 192.168.200.2 24

quit

 

      ip route-static  192.168.100.0  24  192.168.200.1

3.确保 AC 上提前添加好了 AP 的相关信息

#创建 AP-group,为的是后期对大量AP进行批量管理

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

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

 

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

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

 

#创建 “域配置文件”,指定的是 AP 所使用的是哪个国家的无线频率范围;

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

[AC6605-wlan-regulate-domain-China]country-code CN

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

 

#将配置好的“域配置文件”关联到每一个 ap-group ;

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

[AC6605-wlan-ap-group-wailai]regulatory-domain-profile China

Warning: Modifying the country code will clear channel, power and antenna gain configurations of the radio and reset the AP. Continue?[Y/N]:Y

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

 

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

[AC6605-wlan-ap-group-neibu]regulatory-domain-profile China

Warning: Modifying the country code will clear channel, power and antenna gain configurations of the radio and reset the AP. Continue?[Y/N]:Y

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

#在 AC 上手动添加 ap (基于MAC地址进行注册)

[AC6605-wlan-view]ap-id 1 ap-mac 00e0-fcb6-4850  [是要自己查看的]

[AC6605-wlan-ap-1]ap-name wailai-1   [为了区分设备上的多个ap,取的名字]

[AC6605-wlan-ap-1]ap-group wailai    [为ap指定所加入的 ap-group]

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

[AC6605-wlan-ap-1]quit

 

[AC6605-wlan-view]ap-id 2 ap-mac 00e0-fcee-0670

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

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

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

[AC6605-wlan-ap-2]quit

 

[AC6605-wlan-view]ap-id 3 ap-mac 00e0-fc44-6910

[AC6605-wlan-ap-3]ap-name neibu-1

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

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

[AC6605-wlan-ap-3]quit

 

[AC6605-wlan-view]ap-id  4 ap-mac 00e0-fcc9-22f0

[AC6605-wlan-ap-4]ap-name neibu-2

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

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

[AC6605-wlan-ap-4]quit

#最为关键:指定 AC 上用于和 AP 通信时所使用的IP地址

[AC6605]capwap  source  interface vlanif 200

注意:

  capwap 是 AP 与 AC 之间的“注册协议” 。

 

此时,我们在 AC 上查看每个 AP 的状态(正常应该是 nor [normal-正常])

display  ap all

Info: This operation may take a few seconds. Please wait for amoment.done.

Total AP information:

nor  : normal          [4]

--------------------------------------------------------------------------

ID   MAC           Name     Group   IP            Type   State STA Uptime

--------------------------------------------------------------------------

1   00e0-fcb6-4850 wailai-1 wailai 192.168.100.252 AP5030DN nor 0 5M:7S

2   00e0-fcee-0670 wailai-2 wailai 192.168.100.250 AP5030DN nor 0 5M:3S

3   00e0-fc44-6910 neibu-1  neibu  192.168.100.251 AP5030DN nor 0 5M:4S

4   00e0-fcc9-22f0 neibu-2  neibu  192.168.100.253 AP5030DN nor 0 5M:1S

--------------------------------------------------------------------------

Total: 4

-------------------------------------------------------------------------

分解任务3:AP可以产生无线信号

#在AC的系统视图下,配置 vlan pool ,用于为无线客户端提供 vlan

[AC6605]vlan pool wailai

[AC6605-vlan-pool-wailai]vlan 101 102

[AC6605-vlan-pool-wailai]quit

 

[AC6605]vlan pool neibu

[AC6605-vlan-pool-neibu]vlan 103 104

[AC6605-vlan-pool-neibu]quit

 

#在 AC 的 WLAN 视图下,配置 wifi 的业务参数

-配置为外来人员使用的 wifi 的密码

[AC6605]wlan

[AC6605-wlan-view]security-profile name wailai

[AC6605-wlan-sec-prof-wailai]security wpa2 psk pass-phrase a123456789 aes

[AC6605-wlan-sec-prof-wailai]quit

[AC6605-wlan-view]

 

-配置为内部人员使用的 wifi 的密码 

[AC6605-wlan-view]security-profile name neibu

[AC6605-wlan-sec-prof-neibu]security  wpa2 psk pass-phrase b123456789 aes

[AC6605-wlan-sec-prof-neibu]quit

[AC6605-wlan-view]

 

 

-配置为外部人员使用的 wifi 的名字

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

[AC6605-wlan-ssid-prof-wailai]ssid wailai

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

 

-配置为外部人员使用的 wifi 的名字

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

[AC6605-wlan-ssid-prof-neibu]ssid neibu

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

 

-将配置好的密码、wifi 名字、vlan池,配置到 AP 的“虚拟配置文件”中;

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

[AC6605-wlan-vap-prof-wailai]security-profile wailai

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

[AC6605-wlan-vap-prof-wailai]service-vlan vlan-pool wailai

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

-将配置好的密码、wifi 名字、vlan池,配置到 AP 的“虚拟配置文件”中;

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

[AC6605-wlan-vap-prof-neibu]security-profile neibu

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

[AC6605-wlan-vap-prof-neibu]service-vlan vlan-pool neibu

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

[AC6605-wlan-view]

-将为AP配置的“虚拟配置文件”,关联到 ap-group,下发到该ap-group的每一个AP

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

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

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

 

-将为AP配置的“虚拟配置文件”,关联到 ap-group,下发到该ap-group的每一个AP

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

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

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

[AC6605-wlan-ap-group-neibu]

到此为止,每个AP就都可以散发出无线信号

 

 

 

 

 

 

 

 

 

 

 

 

 

本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 162202241@qq.com 举报,一经查实,本站将立刻删除。

最新评论

欢迎您发表评论:

请登录之后再进行评论

登录