AC管理AP

IPV6地址的格式

  • 冒号分16进制 - 8段,每段4个16进制 → 128bit

    • 每1个16进制,等于4个2进制
  • IPV6简写方式:

    • 去掉不必要的0
      • 每段中,只有左边的0,都可以省略
      • 每段中,都是0,可以简写为1个0
    • 连续的好几段,都是 0 ,可以简写为1个“双冒号”
    • 如果8个段都是 0 ,则直接简写为“::” 比如默认路由
    • 举例:
2001:000b:f120:0000:acd1:0000:0000:8349
简写后:
2001:b:f120:0:acd1::8349

案例:IPv6地址基本配置

  • 拓扑

  • 需求

    • 如图配置IPv4地址及OSPF多区域配置
    • 测试R1与R6使用IPv4地址互通
    • 在保证IPv4地址正常通信的前提下将网升级为IPv6
    • 如图配置IPv6接口IP地址
    • 配置静态路由,实现R1和R6互通
    • 运行OSPFv3,确保全网互通
  • 配置

配置路由器接口IPV6地址
测试:相同网段的接口地址可以互通即可
R1:
ipv6     
in g0/0/0  
ipv6 enable   
ipv6 address 2001:12::1 64 

R2:
ipv6     
in g0/0/0  
ipv6 enable   
ipv6 address 2001:23::2 64
in g0/0/1  
ipv6 enable   
ipv6 address 2001:12::2 64

R3:
ipv6     
in g0/0/0  
ipv6 enable   
ipv6 address 2001:34::3 64
in g0/0/1  
ipv6 enable   
ipv6 address 2001:23::3 64   

R4:
ipv6     
in g0/0/0  
ipv6 enable   
ipv6 address 2001:45::4 64
in g0/0/1  
ipv6 enable   
ipv6 address 2001:34::4 64   

R5:
ipv6     
in g0/0/0  
ipv6 enable   
ipv6 address 2001:56::5 64
in g0/0/1  
ipv6 enable   
ipv6 address 2001:45::5 64  

R6:
ipv6     
in g0/0/1  
ipv6 enable   
ipv6 address 2001:56::6 64 

测试直连设备之间互通:
**ping ipv6 2001:xx::x **** ** 
------------------------------------------------

**配置IPV6静态路由
格式:ipv6 route-static 目标地址  ****掩码(地址前缀)****  下一跳**

使用静态路由实现R1-R6互通

R1:
ipv6 route-static 2001:56::  64  2001:12::2

R2:
ipv6 route-static 2001:56::  64  2001:23::3

R3:
ipv6 route-static 2001:56::  64  2001:34::4
ipv6 route-static 2001:12::  64  2001:23::2

R4:
ipv6 route-static 2001:56::  64  2001:45::5
ipv6 route-static 2001:12::  64  2001:34::3

R5:
ipv6 route-static 2001:12::  64  2001:45::4


R6:
ipv6 route-static 2001:12::  64  2001:56::5

**display IPV6 routing-table //查看IPV6路由表**

在R1上测试与R6之间互通:
ping ipv6 2001:56::6  


运行OSPFv3,确保全网互通

R1:
ospfv3 1
 router-id 1.1.1.1
 quit
interface g0/0/0
 ospfv3 1 area 12
 quit


R2:
ospfv3 1
 router-id 2.2.2.2
 quit
interface g0/0/1
 ospfv3 1 area 12
 quit
 interface g0/0/0
 ospfv3 1 area 0
 quit

R3:
ospfv3 1
 router-id 3.3.3.3
 quit
interface g0/0/1
 ospfv3 1 area 0
 quit
 interface g0/0/0
 ospfv3 1 area 0
 quit

R4:
ospfv3 1
 router-id 4.4.4.4
 quit
interface g0/0/1
 ospfv3 1 area 0
 quit
 interface gi0/0/0
 ospfv3 1 area 0
 quit

R5:
ospfv3 1
 router-id 5.5.5.5
 quit
interface g0/0/1
 ospfv3 1 area 0
 quit
 interface gi0/0/0
 ospfv3 1 area 56
 quit
 
 R6:
ospfv3 1
 router-id 6.6.6.6
 quit
interface g0/0/1
 ospfv3 1 area 56
 quit
 
 此时实现IPV6网络全网互通
 可以删除OSPFv2(IPV4网络)以及静态IPV6的配置
 
 完成平滑升级

无线网络概述

无线网络,wlan (wireless local area network),也叫wifi (Wi-Fi)

日常的移动办公需求增多,如果此时使用有线网络,就非常的不方便

从这个角度来说:无线就是网线的延长(电脑连接网线,和手机连接无线以后需要干的事儿都是相同的)

比如首先需要获得一个IP地址

手机使用Wi-Fi网络:

  • 手机必须能够搜索到无线信号(AP
    • 胖AP - FAT AP
      • 该AP能够实现的所有的功能,都是通过AP自己配置来实现的
    • 瘦AP - Fit AP
      • 该AP能够实现的所有功能,都是通过无线控制器**(AC)**,统一来配置实现的
  • 无线信号得有不同的名字 (ssid
  • 无线信号得有认证(加密码)
  • 连接上无线信号后,得有IP地址(DHCP

设备3D展示图:

https://info.support.huawei.com/ta/SmartApi/to3DInfo?lang=zh&flag=交换机

无线园区网建设方案

  • 拓扑

  • 需求

AP的管理IP地址,都是属于 vlan10 - 192.168.10.*/24
AP的网关是 192.168.10.254/24,位于交换机-SW2

DHCP服务器,属于vlan 210 ,IP地址为192.168.210.1/24
DHCP服务器端网关,也在交换机上 - SW2

让AP自动获取IP地址,属于 vlan10 - 192.168.10.*/24
  • 思路

    1. DHCP服务器

      1.开启dhcp

      2.创建地址池

      1)ip地址 子网掩码

      2)网关

      3)dns

      4)租期 默认1

      5)保留地址

      3.进入接收DHCP报文的接口

      选择DHCP全局模式

    2. DHCP客户端(AP)默认自动获取

    3. DHCP中继

      1.开启dhcp

      2.进入网关接口

      选择DHCP中继模式

      指定DHCP服务器地址

    4. DHCP客户端与DHCP中继之间的传输网络互通

    5. DHCP服务器与DHCP中继之间的传输网络互通

  • 配置

**阶段一目标:让AP自动获取管理IP地址**

1.DHCP服务器--AP管理地址池配置:
dhcp enable         //开启DHCP
ip pool vlan100     //创建地址池
network 192.168.100.0 mask 24 
gateway-list 192.168.100.254
q
in g0/0/1           //进入接口
dhcp select global  //选择全局模式

2.sw2中继配置:
vlan 100
q
interface Vlanif100      //进入网关接口
 ip address 192.168.100.254 24
 dhcp select relay       //选择中继模式
 dhcp relay server-ip 192.168.210.1  //指定DHCP服务器地址
q

3.DHCP客户端无需配置(AP默认自定获取IP地址)


4.DHCP客户端与DHCP中继之间的传输网络互通
SW2:
interface GigabitEthernet0/0/12
 port link-type trunk
 port trunk allow-pass vlan all
q


SW1:
vlan batch 100 210
interface GigabitEthernet0/0/12
 port link-type trunk
 port trunk allow-pass vlan all
q
**interface GigabitEthernet0/0/1 --连接AP的接口
 port link-type trunk
**** port trunk pvid vlan 100****
 port trunk allow-pass vlan all**
 
 
**交换机的端口收发数据的规则:
@发:
如果发送的数据,所携带的标签,和端口的PVTD相同,则除标签:
@收:
如果收到的数据,没有携带任何标签,则使用这个端口的PVID表示的数值,给数据打一个标签**
-----------------------------------------
5.DHCP服务器与DHCP中继之间的传输网络互通

R1:
in g0/0/1
ip add 192.168.210.1 24
q
**ip route-static 0.0.0.0 0 192.168.210.254**

SW2:
vlan 210
q
interface vlanif 210
ip add 192.168.210.254 24
q
interface GigabitEthernet0/0/11
 port link-type access
 port default vlan 210
q

在sw2上 ping 192.168.210.1 互通

此时AP可以获得IP地址了
在AP上查看 管理vlan的地址(vlan 1)
<Huawei>display ip interface brief 
Interface                         IP Address/Mask      Physical   Protocol  
NULL0                             unassigned           up         up(s)     
**Vlanif1                           192.168.100.253/24   up         up      **** **


阶段二目标:AP与AC互通,建立控制连接

需求

AP与AC互通

建立capwap隧道(AC控制AP专属隧道)

AC自动注册AP

给AP分组方便批量配置

AP注册不成功原因分析图

配置

APAC互通
AC:
sys
vlan 200
q
interface Vlanif 200
ip add 192.168.200.1 24
q
interface GigabitEthernet0/0/10
 port link-type access
 port default vlan 200
q
ip route-static 0.0.0.0 0 192.168.200.254


sw2:
sys
vlan 200
q
interface Vlanif 200
ip add 192.168.200.254 24
q
interface GigabitEthernet0/0/10
 port link-type access
 port default vlan 200
q


0.建立capwap隧道:(用于向AP通信的专有通道)
AC:
capwap source interface Vlanif 200


1.通过DHCP服务器给客户端下发网络参数时
顺便告诉AP  AC的地址
ip pool vlan100
option 43 sub-option 3 ascii 192.168.200.1
q

2.重启AP:让AP重新向DHCP所要网络参数才能知道AC的地址

3.查看APMAC地址并复制
AP
display system-information //查看AP系统信息
...
MAC Address    : 00:e0:fc:32:57:60
...

4.AC:
wlan
ap-id 1 ap-mac 00e0-fc32-5760 (把复制的MAC地址修改格式)


AC上查看AP的注册情况

[AC]display ap all
State:(查看ap注册状态)
 nor : 表示注册成功
 idle: 表示没有注册成功(空闲)
--------------------------------------------------------------------------------
----------------------
ID   MAC            Name           Group   IP              Type            State
 STA Uptime
--------------------------------------------------------------------------------
----------------------
1    00e0-fc32-5760 00e0-fc32-5760 default 192.168.100.253 AP6050DN        nor  
 0   9S
--------------------------------------------------------------------------------
----------------------
Total: 1

添加另外三台AP设备 AP2/3/4 并实现注册:
1.AP自动获取IP地址
之前已经配置好了AP到中继-中继到DHCP服务器的网络
所以只需要将:
SW1:G0/0/2--G0/0/3--G0/0/4配置:
interface GigabitEthernet0/0/2
  port link-type trunk
  port trunk pvid vlan 100
  port trunk allow-pass vlan all
q
2.APAC互通(之前已完成)
3.AP要知道AC的地址(之前已完成)
4.专属管理隧道(capwap)(之前已完成)

5.AC填写AP的注册信息(MAC
AP:
display system-information //查看AP(MAC地址)
AC:AP的信息进行注册绑定
wlan
ap-id 2 ap-mac xxxx-xxxx-xxxx
ap-id 3 ap-mac xxxx-xxxx-xxxx
ap-id 4 ap-mac xxxx-xxxx-xxxx

display ap all //查看是否注册成功
---------------------------------------

创建AP组方便后期批量管理设备
因ap组需要选择国家代码所以
先创建国家代码文件:
wlan       //进入无线配置
regulatory-domain-profile name domain1 //创建国家代码文件起名(domain1 自定义即可)
country-code cn                        //选择国家CN(中国)
q

再创建组(内部组/外来组)
创建内部组:
ap-group name wailai               //创建AP组并起名为wailai(外来的)
regulatory-domain-profile domain1  //调用写好的国家代码文件
Warning:Modifying the country code will clear channel,power and antenna gain
configurations of the radio and reset the AP.Continue?[Y/N]:y  确使用
创建外来组:
ap-group name neibu                        //创建AP组并起名为neibu(内部的)
regulatory-domain-profile domain1          //调用写好的国家代码文件
Warning:Modifying the country code will clear channel,power and antenna gain
configurations of the radio and reset the AP.Continue?[Y/N]:y 确使用
quit


AP改名并添加到相应组
AC:
wlan               //进入无线网络配置
ap-id 1            //进入注册好的AP
ap-name neibu-1   //修改AP名称
ap-group neibu    //将AP加入到相应组
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  确认加入

AP1:neibu-1   加入到neibu组
AP2:neibu-2   加入到neibu组
AP3:wailai-1  加入到wailai组
AP4:wailai-2  加入到wailai组

display ap all  观察效果

纯文本

阶段三目标:在AC上配置参数,对AP进行管理

需求

让设备散发无线信号

wifi名(neibu/wailai)

wifi密码(abc123456)

思路

创建SSID文件,指定wifi名

创建security文件,指定wifi密码

创建vlan池子

创建VAP文件,将wifi名与密码和vlan池子关联起来

查看AP散发无线信号的情况

配置


AC
1.创建ssid文件
wlan
ssid-profile name neibu   //创建SSID文件自定义文件名
ssid neibu                //设置wifi名称
q
ssid-profile name wailai  //创建SSID文件自定义文件名
ssid wailai               //设置wifi名称
q

2.创建密码文件
security-profile name mima  //创建安全文件自定义文件名
security wpa2 psk pass-phrase 12345678 aes //设置wifi密码为123456
q

3.创建vlan池子:
AC:
vlan pool neibu    
vlan 101 102   //将vlan 101与102放入池子
q
vlan pool wailai
vlan 103 104  //将vlan 103与104放入池子
q

4.创建VAP文件,将wifi名与密码和vlan池子关联起来
AC:
vap-profile name neibu    //给内部组打包的配置文件
service-vlan vlan-pool neibu //vlan池子
ssid-profile wailai          //wifi名
security-profile mima        //密码

vap-profile name wailai  //给外来组打包的配置文件
service-vlan vlan-pool wailai
ssid-profile wailai
security-profile mima

5.ACAP组的设备下发vap配置文件-散发无线信息
wlan
ap-group name neibu   //进入AP组下发打包好的配置文件
vap-profile neibu wlan 1 radio 0  
        vap文件名       开启2.4G信号
vap-profile neibu wlan 1 radio 1
                         开启5G信号

wlan
ap-group name wailai  //进入AP组下发打包好的配置文件
vap-profile wailai  wlan 1 radio 0  
vap-profile wailai  wlan 1 radio 1
                        

纯文本

阶段四目标:让PC连接上AP,然后互通

拓扑

思路

配置DHCP

配置中继

PC获取到对应vlan的IP地址

配置


SW1/SW2
创建vlan
vlan batch 101 102 103 104

配置DHCP服务器
创建地址池:
ip pool vlan101
 gateway-list 192.168.101.254 
 network 192.168.101.0 mask 255.255.255.0 
 dns-list 8.8.8.8
q
ip pool vlan102
 gateway-list 192.168.102.254 
 network 192.168.102.0 mask 255.255.255.0 
 dns-list 8.8.8.8
q
ip pool vlan103
 gateway-list 192.168.103.254 
 network 192.168.103.0 mask 255.255.255.0 
 dns-list 8.8.8.8
q
ip pool vlan104
 gateway-list 192.168.104.254 
 network 192.168.104.0 mask 255.255.255.0 
 dns-list 8.8.8.8
q


SW2:配置网关与中继
interface Vlanif 101
ip add 192.168.101.254 24
dhcp select relay
dhcp relay server-ip 192.168.210.1
q
interface Vlanif 102
ip add 192.168.102.254 24
 dhcp select relay
 dhcp relay server-ip 192.168.210.1
q
interface Vlanif 103
ip add 192.168.103.254 24
 dhcp select relay
 dhcp relay server-ip 192.168.210.1
q
interface Vlanif 104
ip add 192.168.104.254 24
dhcp select relay
dhcp relay server-ip 192.168.210.1
q

PC获取到对应vlan网段的IP地址就算成功
在ensp上PC互通需要注意不同AP散发的信号尽量不要叠加在一起

猜你喜欢

转载自blog.csdn.net/pitch_dark/article/details/127897176