构建直连三层组网直接转发WLAN

本案例将说明采用AC+FIT架构、直连三层组网和直接转发方式下构建WLAN的基本配置过程。网络拓扑如图3-1-15所示。案例中使用了VLAN pool作为业务VLAN。

构建直连三层组网直接转发WLAN_第1张图片

图3-1-15直连三层组网直接转发

1. 参数规划

三层组网时,AP和AC不在同一个网段,因此管理VLAN有两个,一个VLAN用于AP管理,另一个VLAN是AC所在的VLAN。

3-1-10参数规划表

项目

数据

管理VLAN(AP)

VLAN10

管理VLAN(AC)

VLAN100

STA业务VLAN

VLAN pool

  • 名称:sta-pool
  • VLAN pool中加入的VLAN:101、102

AC与Router互通

VLAN200:

AC创建VLANIF200并配置IP地址10.1.200.2/24;Router接口G0/0/0配置IP地址10.1.200.1/24

DHCP服务器

AC作为AP、STA的DHCP服务器

AP地址池

10.1.10.2~10.1.10.254/24

STA地址池

10.1.101.2~10.1.101.254/24

10.1.102.2~10.1.102.254/24

AC源接口IP地址

VLANIF100:10.1.100.1/24

AP组

  • 名称:ap-group1
  • 引用模板:VAP模板wlan-sz、域管理模板default

域管理模板

  • 名称:default
  • 国家码:cn

SSID模板

  • 名称:wlan-sz
  • SSID名称:wlan-sz

VAP模板

  • 名称:wlan-sz
  • 转发模式:直接转发
  • 业务VLAN:VLAN pool
  • 引用模板:SSID模板wlan-sz

2. 配置步骤

1)配置网络互通

# 配置接入交换机SW1的GE0/0/1、GE0/0/2接口加入VLAN10、VLAN101和VLAN102,GE0/0/1的缺省VLAN为VLAN10。直接转发模式下,无线业务数据帧不再通过CAPWAP隧道转发,而是按照有线数据帧相同的方式转发,因此,相应的设备端口需要放行业务VLAN。

system-view

[HUAWEI] sysname SW1

[SW1] vlan batch 10 101 102

[SW1] interface gigabitethernet 0/0/1

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

[SW1-GigabitEthernet0/0/1] port trunk pvid vlan 10

[SW1-GigabitEthernet0/0/1] port trunk allow-pass vlan 10 101 102

[SW1-GigabitEthernet0/0/1] port-isolate enable

[SW1-GigabitEthernet0/0/1] quit

[SW1] interface gigabitethernet 0/0/2

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

[SW1-GigabitEthernet0/0/2] port trunk allow-pass vlan 10 101 102

[SW1-GigabitEthernet0/0/2] quit

# 配置汇聚交换机SW2的接口GE0/0/1加入VLAN10、VLAN101和VLAN102,接口GE0/0/2加入VLAN100、VLAN101和VLAN102,并创建接口VLANIF100,地址为10.1.100.2/24。

system-view

[HUAWEI] sysname SW2

[SW2] vlan batch 10 100 101 102

[SW2] interface gigabitethernet 0/0/1

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

[SW2-GigabitEthernet0/0/1] port trunk allow-pass vlan 10 101 102

[SW2-GigabitEthernet0/0/1] quit

[SW2] interface gigabitethernet 0/0/2

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

[SW2-GigabitEthernet0/0/2] port trunk allow-pass vlan 100 101 102

[SW2-GigabitEthernet0/0/2] quit

[SW2] interface vlanif 100

[SW2-Vlanif100] ip address 10.1.100.2 24

[SW2-Vlanif100] quit

# Router的接口GE0/0/0配置IP地址10.1.200.1/24。

system-view

[Huawei] sysname Router

[Router] interface gigabitethernet 0/0/0

[Router-GigabitEthernet0/0/0] ip add 10.1.200.1 24

# 在Router上配置目的地址为用户网段的静态路由。

[Router]ip route-static 10.1.101.0 24 10.1.200.2

[Router]ip route-static 10.1.102.0 24 10.1.200.2

# 配置AC的接口GE0/0/1加入VLAN100、VLAN101和VLAN102,GE0/0/2加入VLAN200,并创建接口VLANIF100、VLANIF200。直接转发模式下,相应的设备端口需要放行业务VLAN,所以,AC的接口GE0/0/1放行了VLAN101和VLAN102。

system-view

[AC6605] sysname AC

[AC] vlan batch 100 101 102 200

[AC] interface vlanif 100

[AC-Vlanif100] ip address 10.1.100.1 24

[AC-Vlanif100] quit

[AC] interface vlanif 200

[AC-Vlanif100] ip address 10.1.200.2 24

[AC-Vlanif100] quit

[AC] interface gigabitethernet 0/0/1

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

[AC-GigabitEthernet0/0/1] port trunk allow-pass vlan 100 101 102

[AC-GigabitEthernet0/0/1] quit

[AC] interface gigabitethernet 0/0/2

[AC-GigabitEthernet0/0/2] port link-type access

[AC-GigabitEthernet0/0/2] port default vlan 200

[AC-GigabitEthernet0/0/2] quit

# 配置AC到AP的路由,下一跳为SW2的VLANIF100。AP与AC之间必须路由可达。

[AC] ip route-static 10.1.10.0 24 10.1.100.2

2)配置DHCP服务器为STA和AP分配IP地址

# 在SW2上为AP配置DHCP中继。

[SW2] dhcp enable

[SW2] interface vlanif 10

[SW2-Vlanif10] ip address 10.1.10.1 24

[SW2-Vlanif10] dhcp select relay

[SW2-Vlanif10] dhcp relay server-ip 10.1.100.1

[SW2-Vlanif10] quit

# 在AC上创建VLANIF101和VLANIF102接口为STA提供地址。

[AC] dhcp enable

[AC] interface vlanif 101

[AC-Vlanif101] ip address 10.1.101.1 24

[AC-Vlanif101] dhcp select interface

[AC-Vlanif101] quit

[AC] interface vlanif 102

[AC-Vlanif102] ip address 10.1.102.1 24

[AC-Vlanif102] dhcp select interface

[AC-Vlanif102] quit

# 在AC上创建全局地址池为AP提供地址。在全局地址池中,通过选项option 43提供AC的IP地址

[AC] ip pool wlan-ap

[AC-ip-pool-wlan-ap] network 10.1.10.0 mask 24

[AC-ip-pool-wlan-ap] gateway-list 10.1.10.1

[AC-ip-pool-wlan-ap] option 43 sub-option 3 ascii 10.1.100.1

[AC-ip-pool-wlan-ap] quit

# 配置VLAN pool,用于作为业务VLAN。在AC上新建VLAN pool,并将VLAN101和VLAN102加入其中,配置VLAN pool中的VLAN分配算法为“hash”。本例VLAN pool中的VLAN分配算法配置为“hash”。分配算法缺省情况下为“hash”,如果之前没有修改其缺省配置,可以不用执行命令assignment hash

[AC] vlan batch 101 102

[AC] vlan pool sta-pool

[AC-vlan-pool-sta-pool] vlan 101 102

[AC-vlan-pool-sta-pool] assignment hash

[AC-vlan-pool-sta-pool] quit

3)配置AP上线

# 创建AP组,用于将相同配置的AP都加入同一AP组中。

[AC] wlan

[AC-wlan-view] ap-group name ap-group1

[AC-wlan-ap-group-ap-group1] quit

# 创建域管理模板,在域管理模板下配置AC的国家码并在AP组下引用域管理模板。

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

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

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

[AC-wlan-view] ap-group name ap-group1

[AC-wlan-ap-group-ap-group1] regulatory-domain-profile default

Warning: Modifying the country code will clear channel, power and antenna gain configurations of the radio and reset the AP. Continu

e?[Y/N]:y

[AC-wlan-ap-group-ap-group1] quit

[AC-wlan-view] quit

# 配置AC的源接口。

[AC]capwap source ip-address 10.1.100.1

# 在AC上离线导入AP,并将AP加入AP组“ap-group1”中。假设AP的MAC地址为60ae-5268-c250,并且根据AP的部署位置为AP配置名称,便于从名称上就能够了解AP的部署位置。例如MAC地址为60ae-5268-c250(所对应的AP 的MAC地址)的AP部署在办公区域,命名此AP为office。

[AC] wlan

[AC-wlan-view] ap auth-mode mac-auth

[AC-wlan-view] ap-id 0 ap-mac 60ae-5268-c250(所对应的AP 的MAC地址)

[AC-wlan-ap-0] ap-name office

Warning: This operation may cause AP reset. Continue? [Y/N]:y

[AC-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 configuration

s of the radio, Whether to continue? [Y/N]:y

[AC-wlan-ap-0] quit

# 将AP上电后,当执行命令display ap all查看到AP的“State”字段为“nor”时,表示AP正常上线。

构建直连三层组网直接转发WLAN_第2张图片

 

4)配置WLAN业务参数

# 创建名为“WLAN-SZ”的SSID模板,并配置SSID名称为“WLAN-SZ”。

[AC-wlan-view] ssid-profile name WLAN-SZ

[AC-wlan-ssid-prof-WLAN-SZ] ssid WLAN-SZ

[AC-wlan-ssid-prof-WLAN-SZ] quit

# 创建名为“wlan-sz”的VAP模板,配置业务数据转发模式为直接转发(direct-forward)、业务VLAN,并且引用SSID模板。

[AC-wlan-view] vap-profile name wlan-sz

[AC-wlan-vap-prof-wlan-sz] forward-mode direct-forward

[AC-wlan-vap-prof-wlan-sz] service-vlan vlan-pool sta-pool

[AC-wlan-vap-prof-wlan-sz] ssid-profile wlan-sz

[AC-wlan-vap-prof-wlan-sz] quit

# 配置AP组引用VAP模板,AP上射频0和射频1都使用VAP模板“wlan-sz”的配置。

[AC-wlan-view] ap-group name ap-group1

[AC-wlan-ap-group-ap-group1] vap-profile wlan-sz wlan 1 radio 0

[AC-wlan-ap-group-ap-group1] vap-profile wlan-sz wlan 1 radio 1

[AC-wlan-ap-group-ap-group1] quit

5)配置AP射频的信道和功率

#关闭射频的信道和功率自动调优功能。

[AC-wlan-view] rrm-profile name default

[AC-wlan-rrm-prof-default] calibrate auto-channel-select disable

[AC-wlan-rrm-prof-default] calibrate auto-txpower-select disable

[AC-wlan-rrm-prof-default] quit

# 配置AP射频0的信道和功率。

[AC-wlan-view] ap-id 0

[AC-wlan-ap-0] radio 0

[AC-wlan-radio-0/0] channel 20mhz 6

Warning: This action may cause service interruption. Continue?[Y/N]y

[AC-wlan-radio-0/0] eirp 127

[AC-wlan-radio-0/0] quit

# 配置AP射频1的信道和功率。

[AC-wlan-ap-0] radio 1

[AC-wlan-radio-0/1] channel 20mhz 149

Warning: This action may cause service interruption. Continue?[Y/N]y

[AC-wlan-radio-0/1] eirp 127

[AC-wlan-radio-0/1] quit

[AC-wlan-ap-0] quit

6)验证配置结果

WLAN业务配置会自动下发给AP,配置完成后,通过执行命令display vap ssid wlan-sz查看如下信息,当“Status”项显示为“ON”时,表示AP对应的射频上的VAP已创建成功。

构建直连三层组网直接转发WLAN_第3张图片

STA搜索到名为“wlan-sz”的无线网络,并正常关联后,在AC上执行display station ssid wlan-sz命令,可以查看到用户已经接入到无线网络“wlan-sz”中。

构建直连三层组网直接转发WLAN_第4张图片

 

测试连通性:STA ping Router,观察结果。

 构建直连三层组网直接转发WLAN_第5张图片

 

你可能感兴趣的:(网络)