【华为】AC三层旁挂直接转发

【华为】AC三层旁挂直接转发

  • 实验需求
  • 实验拓扑
  • 配置
    • AC和AP二层通信
      • AC
      • LSW1
      • LSW2
      • AP2获取到的管理地址
      • AP3获取到的管理地址
    • AP上线
    • 配置WLAN业务
      • AC
      • LSW1(作DHCP地址池)
      • 业务成功下发
    • 访问公网(NAT)
      • LSW1
      • AR1
  • 配置文档
    • AC
    • LSW1
    • LSW2
    • AR1
    • ISP

在这里插入图片描述

实验需求

AC组网方式:旁挂三层组网。
业务数据转发方式:直接转发(缺省方式)。
DHCP部署方式:
汇聚交换机作为DHCP服务器为AP和STA分配IP地址
AC作为AP的DHCP服务器,分配管理地址

AP管理:VLAN 200,网段为192.168.200.0/24。网关为AC上的VLANIF200接口IP。

无线业务:
VLAN 100,SSID为IT,密码为a1234567,网段为192.168.100.0/24。网关为汇聚交换机上的VLANIF100接口IP。
VLAN 110,SSID为HR,密码为b1234567,网段为192.168.110.0/24。网关为汇聚交换机上的VLANIF110接口IP。

AC与AP建立管理隧道的源接口:AC上的VLANIF200。

AC与汇聚交换机三层互联的接口:VLANIF200。

汇聚交换机与出口网关三层互联的接口:VLANIF10。

实验拓扑

在这里插入图片描述


配置

在这里插入图片描述


AC和AP二层通信

AC

[AC6605]dhcp enable        ## 开启DHCP 功能
Info: The operation may take a few seconds. Please wait for a moment.done.

[AC6605]vlan 200

[AC6605]int vlan 200	  ## 配置SVI200 接口地址,使它能够与核心交换机通信
[AC6605-Vlanif200]dhcp select interface             ## 选择接口下的DHCP
[AC6605-Vlanif200]dhcp server dns-list 8.8.8.8      ## 下发的DNS
[AC6605-Vlanif200]qu

## 把与LSW1相连接的接口配置成Trunk接口,并放行管理VLAN200
[AC6605]interface GigabitEthernet0/0/1      
[AC6605-GigabitEthernet0/0/1]port link-type trunk
[AC6605-GigabitEthernet0/0/1]port trunk allow-pass vlan 200
[AC6605-GigabitEthernet0/0/1]quit

LSW1

[LSW1]vlan batch 100 110 200           ## 批量创建vlan 100 110 200 

[LSW1]interface Vlanif200              ## 创建VLANif200
[LSW1-Vlanif200]ip address 192.168.200.100 255.255.255.0  ##配置IP地址,能让LSW1与AC实现通信
[LSW1-Vlanif200]quit

## 把与AC相连接的接口配置成Trunk接口,并放行管理VLAN200
[LSW1]interface GigabitEthernet0/0/2                     
[LSW1-GigabitEthernet0/0/2] port link-type trunk
[LSW1-GigabitEthernet0/0/2] port trunk allow-pass vlan 200
[LSW1-GigabitEthernet0/0/2]quit

## 把LSW1下端的接口配置成Trunk接口,并放行VLAN 100 110 200 流量
[LSW1]interface GigabitEthernet0/0/3
[LSW1-GigabitEthernet0/0/3] port link-type trunk
[LSW1-GigabitEthernet0/0/3] port trunk allow-pass vlan 100 110 200
[LSW1-GigabitEthernet0/0/3]quit

LSW2

[LSW2]vlan batch 100 110 200
Info: This operation may take a few seconds. Please wait for a moment...done.

[LSW2]interface Ethernet0/0/1 
[LSW2-Ethernet0/0/1] port link-type trunk       
[LSW2-Ethernet0/0/1] port trunk allow-pass vlan 100 110 200
[LSW2-Ethernet0/0/1]quit

[LSW2]interface Ethernet0/0/2
[LSW2-Ethernet0/0/2] port link-type trunk
[LSW2-Ethernet0/0/2] port trunk pvid vlan 200                  ## 配置该接口的pvid为管理VLAN,使AP能够获取到管理IP地址
[LSW2-Ethernet0/0/2] port trunk allow-pass vlan 100 110 200    ## 放行vlan 100 110 200
[LSW2-Ethernet0/0/2]quit

[LSW2]interface Ethernet0/0/3
[LSW2-Ethernet0/0/3] port link-type trunk
[LSW2-Ethernet0/0/3] port trunk pvid vlan 200                  ## 配置该接口的pvid为管理VLAN,使AP能够获取到管理IP地址
[LSW2-Ethernet0/0/3] port trunk allow-pass vlan 100 110 200    ## 放行vlan 100 110 200
[LSW2-Ethernet0/0/3]quit

AP2获取到的管理地址

dispaly ip int brief
在这里插入图片描述

AP3获取到的管理地址

dispaly ip int brief
在这里插入图片描述

AP上线

[AC6605]capwap source interface Vlanif 200                  ## 指定capwap隧道源接口为VLANif200

[AC6605-wlan-view]regulatory-domain-profile name domain     ## 创建管理域名为“domain”(缺省CN)
[AC6605-wlan-regulate-domain-domain]quit

[AC6605-wlan-view]ap-group name IT                          ## 创建AP组为“IT”
Info: This operation may take a few seconds. Please wait for a moment.done.
[AC6605-wlan-ap-group-IT]regulatory-domain-profile domain   ## 关联管理域“domain”
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 ## 重启AP
[AC6605-wlan-ap-group-IT]quit

[AC6605-wlan-view]ap-group name HR                          ## 创建AP组为“HR”
Info: This operation may take a few seconds. Please wait for a moment.done.
[AC6605-wlan-ap-group-HR]regulatory-domain-profile domain   ## 关联管理域“domain”
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 ## 重新上线该AP
[AC6605-wlan-ap-group-HR]quit

[AC6605-wlan-view]ap auth-mode mac-auth                      ## ap认证模式为MAC认证

[AC6605-wlan-view]ap-id 1 ap-mac 00e0-fce5-38e0              ## ap编号为1,mac地址为 00e0-fce5-38e0 
[AC6605-wlan-ap-1]ap-name IT                                 ## ap的名字为 “IT”
[AC6605-wlan-ap-1]ap-group IT                                ## 关联ap组“IT”
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                                             ## 重新上线该AP
[AC6605-wlan-ap-1]quit

[AC6605-wlan-view]ap-id 2 ap-mac 00e0-fc15-3860              ## ap编号为2,mac地址为 00e0-fc15-3860           
[AC6605-wlan-ap-2]ap-name HR                                 ## ap的名字为 “HR”
[AC6605-wlan-ap-2]ap-group HR                                ## 关联ap组“HR”
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                                             ## 重新上线该AP
Info: This operation may take a few seconds. Please wait for a moment.. done.
[AC6605-wlan-ap-2]quit

此时执行命令 display ap all 查看到AP的“State”字段为“nor”时,表示AP正常上线,示例如下。

在这里插入图片描述

配置WLAN业务

AC

[AC6605-wlan-view]security-profile name IT                                 ## 创建安全模板名为“IT”
[AC6605-wlan-sec-prof-IT]security wpa-wpa2 psk pass-phrase a1234567 aes    ## 设置无线密码,方式为psk认证,密码a1234567,用aes加密
[AC6605-wlan-sec-prof-IT]quit

[AC6605-wlan-view]ssid-profile name IT                                     ## 创建SSID模板名为“IT”
[AC6605-wlan-ssid-prof-IT]ssid IT                                          ## 设置SSID名为“IT”
Info: This operation may take a few seconds, please wait.done.
[AC6605-wlan-ssid-prof-IT]quit

[AC6605-wlan-view]vap-profile name IT                                      ## 创建VAP模板“IT”
[AC6605-wlan-vap-prof-IT]ssid-profile IT                                   ## 关联SSID模板“IT”
Info: This operation may take a few seconds, please wait.done.
[AC6605-wlan-vap-prof-IT]security-profile IT                               ## 关联安全模板“IT”
Info: This operation may take a few seconds, please wait.done.
[AC6605-wlan-vap-prof-IT]forward-mode direct-forward                       ## 定义转发方式为直连转发(缺省)
[AC6605-wlan-vap-prof-IT]service-vlan vlan-id 100                          ## 指定VAP模板“IT”的业务流量
Info: This operation may take a few seconds, please wait.done.
[AC6605-wlan-vap-prof-IT]quit

[AC6605-wlan-view]security-profile name HR                                 ## 创建安全模板名为“HR”
[AC6605-wlan-sec-prof-HR]security wpa-wpa2 psk pass-phrase b1234567 aes    ## 设置无线密码,方式为psk认证,密码b1234567,用aes加密
[AC6605-wlan-sec-prof-HR]qu

[AC6605-wlan-view]ssid-profile name HR                                     ## 创建SSID模板名为“HR”
[AC6605-wlan-ssid-prof-HR]ssid HR                                          ## 设置SSID名为“HR”
Info: This operation may take a few seconds, please wait.done.
[AC6605-wlan-ssid-prof-HR]qu

[AC6605-wlan-view]vap-profile name HR                                      ## 创建VAP模板“HR”
[AC6605-wlan-vap-prof-HR]security-profile HR                               ## 关联安全模板“HR”
Info: This operation may take a few seconds, please wait.done.
[AC6605-wlan-vap-prof-HR]ssid-profile HR                                   ## 关联SSID模板“HR”
Info: This operation may take a few seconds, please wait.done.
[AC6605-wlan-vap-prof-HR]forward-mode direct-forward                       ## 定义转发方式为直连转发(缺省)
[AC6605-wlan-vap-prof-HR]service-vlan vlan-id 110                          ## 指定VAP模板“HR”的业务流量
Info: This operation may take a few seconds, please wait.done.
[AC6605-wlan-vap-prof-HR]qu

[AC6605-wlan-view]ap-group name IT                                         ## 进入AP组“IT”
[AC6605-wlan-ap-group-IT]vap-profile IT wlan 1 radio all                   ## 关联vap模板“IT”,wlan编号为1,射频为all(0,1,2)
Info: This operation may take a few seconds, please wait...done.
[AC6605-wlan-ap-group-IT]quit

[AC6605-wlan-view]ap-group name HR                                         ## 进入AP组“HR”
[AC6605-wlan-ap-group-HR]vap-profile HR wlan 2 radio all                   ## 关联vap模板“HR”,wlan编号为1,射频为all(0,1,2)
Info: This operation may take a few seconds, please wait...done.
[AC6605-wlan-ap-group-HR]quit

LSW1(作DHCP地址池)

作为STA的业务DHCP服务器,下发业务流量

[LSW1]dhcp enable

[LSW1]int vlan 100
[LSW1-Vlanif100]ip address 192.168.100.254 24
[LSW1-Vlanif100]dhcp select interface
[LSW1-Vlanif100]quit

[LSW1]int vlan 110
[LSW1-Vlanif110]ip address 192.168.110.254 24
[LSW1-Vlanif110]dhcp select interface 
[LSW1-Vlanif110]qu

业务成功下发

在这里插入图片描述
在这里插入图片描述

在这里插入图片描述
在这里插入图片描述

访问公网(NAT)

LSW1

[LSW1]interface Vlanif10
[LSW1-Vlanif10] ip address 192.168.10.2 255.255.255.0
[LSW1-Vlanif10]quit

## 指向AR1
[LSW1]ip route-static 0.0.0.0 0.0.0.0 192.168.10.1

AR1

## 匹配感兴趣流量(允许上网的流量)
[AR1]acl 2000
[AR1-acl-basic-2000]rule permit source 192.168.10.0 0.0.0.255
[AR1-acl-basic-2000]rule permit source 192.168.100.0 0.0.0.255
[AR1-acl-basic-2000]rule permit source 192.168.110.0 0.0.0.255

## 在外接口启用Easy IP
[AR1]int g0/0/0
[AR1-GigabitEthernet0/0/0]ip address 202.101.1.2 24
[AR1-GigabitEthernet0/0/0]nat outbound 2000
[AR1-GigabitEthernet0/0/0]quit

## 与LSW1实现互联
[AR1]int g0/0/1
[AR1-GigabitEthernet0/0/1]ip address 192.168.10.1 24
[AR1-GigabitEthernet0/0/1]quit

## 默认路由通往ISP
[AR1]ip route-static 0.0.0.0 0.0.0.0 202.101.1.1
## 静态路由指回内部
[AR1]ip route-static 192.168.100.0 255.255.255.0 192.168.10.2
[AR1]ip route-static 192.168.110.0 255.255.255.0 192.168.10.2

成功上网啦
在这里插入图片描述
在这里插入图片描述

配置文档

AC

dhcp enable       
 
vlan 200

int vlan 200
ip address 192.168.200.254 24	  
dhcp select interface            
dhcp server dns-list 8.8.8.8      
qu

interface GigabitEthernet0/0/1      
port link-type trunk
port trunk allow-pass vlan 200
quit

capwap source interface Vlanif 200

wlan
regulatory-domain-profile name domain
quit

ap-group name IT
regulatory-domain-profile domain
yes
 quit

ap-group name HR
regulatory-domain-profile domain
yes
 quit

ap auth-mode mac-auth                    

ap-id 1 ap-mac 00e0-fce5-38e0(添加自己的AP MAC地址)              
ap-name IT                             
ap-group IT                             
yes                                
 quit

ap-id 2 ap-mac 00e0-fc15-3860(添加自己的AP MAC地址)          
ap-name HR                                 
ap-group HR
yes
 quit

security-profile name IT
security wpa-wpa2 psk pass-phrase a1234567 aes    
quit

ssid-profile name IT
ssid IT
quit

vap-profile name IT
ssid-profile IT
security-profile IT
forward-mode direct-forward
service-vlan vlan-id 100
quit

security-profile name HR
security wpa-wpa2 psk pass-phrase b1234567 aes
qu

ssid-profile name HR
ssid HR
qu

vap-profile name HR
security-profile HR
ssid-profile HR
forward-mode direct-forward
service-vlan vlan-id 110
qu

ap-group name IT
vap-profile IT wlan 1 radio all
quit

ap-group name HR
vap-profile HR wlan 2 radio all
quit

LSW1

#
sysname LSW1
#
undo info-center enable
#
vlan batch 10 100 110 200
#
dhcp enable
#
interface Vlanif10
 ip address 192.168.10.2 255.255.255.0
#
interface Vlanif100
 ip address 192.168.100.254 255.255.255.0
 dhcp select interface
#
interface Vlanif110
 ip address 192.168.110.254 255.255.255.0
 dhcp select interface
#
interface Vlanif200
 ip address 192.168.200.100 255.255.255.0
#
interface GigabitEthernet0/0/1
 port link-type access
 port default vlan 10
#
interface GigabitEthernet0/0/2
 port link-type trunk
 port trunk allow-pass vlan 200
#
interface GigabitEthernet0/0/3
 port link-type trunk
 port trunk allow-pass vlan 100 110 200
#
ip route-static 0.0.0.0 0.0.0.0 192.168.10.1
#

LSW2

#
sysname LSW2
#
undo info-center enable
#
vlan batch 100 110 200
#
interface Ethernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 100 110 200
#
interface Ethernet0/0/2
 port link-type trunk
 port trunk pvid vlan 200
 port trunk allow-pass vlan 100 110 200
#
interface Ethernet0/0/3
 port link-type trunk
 port trunk pvid vlan 200
 port trunk allow-pass vlan 100 110 200

AR1

#
 sysname AR1
 #
undo info-center enable
#
acl number 2000  
 rule 5 permit source 192.168.100.0 0.0.0.255 
 rule 10 permit source 192.168.110.0 0.0.0.255 
 rule 15 permit source 192.168.10.0 0.0.0.255 
#
interface GigabitEthernet0/0/0
 ip address 202.101.1.2 255.255.255.0 
 nat outbound 2000
#
interface GigabitEthernet0/0/1
 ip address 192.168.10.1 255.255.255.0 
#
ip route-static 0.0.0.0 0.0.0.0 202.101.1.1
ip route-static 192.168.100.0 255.255.255.0 192.168.10.2
ip route-static 192.168.110.0 255.255.255.0 192.168.10.2
#

ISP

#
sysname ISP
#
undo info-center enable
#
interface GigabitEthernet0/0/0
 ip address 202.101.1.1 255.255.255.0 
#
interface LoopBack0
 ip address 1.1.1.1 255.255.255.255

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mfbz.cn/a/593852.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

杭电acm1013 Digital Roots 数字根 Java解法 高精度

Problem - 1013 (hdu.edu.cn) 高精度算术模拟 开long没过想到开bI 开bl一次过 import java.math.BigInteger; import java.util.Scanner;public class Main {public static void main(String[] args) {Scanner sc new Scanner(System.in);BigInteger i;while (!(i sc.nextB…

Docker新建容器 修改运行容器端口

目录 一、修改容器的映射端口 二、解决方案 三、方案 一、修改容器的映射端口 项目需求修改容器的映射端口 二、解决方案 停止需要修改的容器 修改hostconfig.json文件 重启docker 服务 启动修改容器 三、方案 目前正在运行的容器 宿主机的3000 端口 映射 容器…

【Python项目】基于时间序列的【大气污染预测系统】

技术简介:使用Python技术、B/S架构、MYSQL数据库等实现。 系统简介:本系统的主要使用角色为普通用户和管理员用户,两者的功能几乎是一致的,但管理员用户比普通用户多了用户管理的功能,可以对系统内的用户进行管理。普通…

Java IO编程必备:FilterInputStream类的原理与实现

哈喽,各位小伙伴们,你们好呀,我是喵手。运营社区:C站/掘金/腾讯云;欢迎大家常来逛逛 今天我要给大家分享一些自己日常学习到的一些知识点,并以文字的形式跟大家一起交流,互相学习,一…

如何构建进攻性的网络安全防护策略

进攻性安全(Offensive security)是指一系列主动安全策略,这些策略与恶意行为者在现实世界的攻击中使用的策略相同,区别在于其目的是加强而非损害网络安全。常见的进攻性安全方法包括红队、渗透测试和漏洞评估。 进攻性安全行动通…

C++入门 ——类和对象(二)

this指针 this指针的引出 我们先来定义一个日期类 Date class Date { public:void Init(int year, int month, int day){_year year;_month month;_day day;}void Print(){cout <<_year<< "-" <<_month << "-"<< _da…

基于springboot+vue+Mysql的自习室预订系统

开发语言&#xff1a;Java框架&#xff1a;springbootJDK版本&#xff1a;JDK1.8服务器&#xff1a;tomcat7数据库&#xff1a;mysql 5.7&#xff08;一定要5.7版本&#xff09;数据库工具&#xff1a;Navicat11开发软件&#xff1a;eclipse/myeclipse/ideaMaven包&#xff1a;…

Springboot工程创建

目录 一、步骤 二、遇到的问题及解决方案 一、步骤 打开idea,点击文件 ->新建 ->新模块 选择Spring Initializr&#xff0c;并设置相关信息。其中组为域名&#xff0c;如果没有公司&#xff0c;可以默认com.example。点击下一步 蓝色方框部分需要去掉&#xff0c;软件包…

牛客NC382 切割木头【中等 二分超找 Java/Go/C++】

题目 题目链接&#xff1a; https://www.nowcoder.com/practice/707d98cee255448c838c76918a702be0 核心 二分查找Java代码 import java.util.*;public class Solution {/*** 代码中的类名、方法名、参数名已经指定&#xff0c;请勿修改&#xff0c;直接返回方法规定的值即可…

SpringBoot指标监控

一.SpringBoot指标监控_添加Actuator功能 Spring Boot Actuator可以帮助程序员监控和管理SpringBoot应用&#xff0c;比如健康检查、内存使用情况统计、线程使用情况统计等。我 们在SpringBoot项目中添加Actuator功能&#xff0c;即可使用Actuator监控 项目&#xff0c;用法如…

Vue的项目启动指令分析

通过Vue CLI脚手架创建的项目&#xff0c;默认的启动项目方式是 npm run serve 这里的serve是可以修改的。 在创建的项目目录中&#xff0c;找到package.json 双击打开&#xff0c;找到scripts部分 在scripts部分&#xff0c;有一个"serve"键值对&#xff0c;这里的…

知乎23届数据分析校招A卷——笔记

1、and 和 or的并列运用[先看and] 条件1 OR 条件2 AND 条件3 执行顺序是先执行AND操作符&#xff08;先看条件2和3&#xff09;&#xff0c;再根据其结果判断是否需要执行OR操作符&#xff0c;并最终返回整个表达式的逻辑结果。 条件1 and 条件2 or 条件3 执行逻辑是先执行…

使用socket+Python实现ping

import os import socket import struct import select import time# 计算校验和&#xff0c;用于确保数据的完整性 def checksum(source_string):sum 0count 0max_count len(source_string)# 处理成对的字节while count < max_count - 1:val source_string[count 1] *…

nginx的前世今生(二)

书接上回&#xff1a; 上回书说到&#xff0c;nginx的前世今生&#xff0c;这回我们继续说 3.缓冲秘籍&#xff0c;洪流控水 Nginx的缓冲区是其处理数据传输和提高性能的关键设计之一&#xff0c;主要用于暂存和管理进出的数据流&#xff0c;以应对不同组件间速度不匹配的问题…

PG WAL日志理解

类似于oracle的redo log&#xff0c;用于数据库恢复&#xff0c;当一条SQL语句执行&#xff0c;PG会把对应的块放到缓冲区执行&#xff0c;&#xff0c;会写进WAL缓冲区会进行写操作&#xff0c;commit后&#xff0c;WAL writer进程进行写操作&#xff0c;把日志缓冲区WAL buff…

SpringData JPA - ORM 框架下,打造高效数据访问层

目录 一、SpringData JPA 概述 1.1、什么是 JPA 1.2、什么是 ORM 1.3、什么是 Hibernate 1.4、JPA 和 Hibernate 的关系 1.5、JPA 的优势 二、SpringData JPA 实战开发 2.1、依赖 2.2、配置文件 2.3、启动类 2.4、创建实体 2.5、基于 JpaRepository 的 CRUD 三、…

超市购物|基于SprinBoot+vue的超市购物系统(源码+数据库+文档)

目录 基于SprinBootvue的企业人事管理系统 一、前言 二、系统设计 三、系统功能设计 1商品管理 2公告管理 3公告类型管理 四、数据库设计 五、核心代码 六、论文参考 七、最新计算机毕设选题推荐 八、源码获取&#xff1a; 博主介绍&#xff1a;✌️大厂码农|毕设…

C语言--带环链表问题

继续学习 一、判断链表是否带环 141. 环形链表 - 力扣&#xff08;LeetCode&#xff09; 思路&#xff1a;用快慢指针&#xff0c;快指针走两步&#xff0c;慢指针走一步&#xff0c;当慢指针走一半快指针进到环里 当慢指针进环&#xff0c;快指针已经在环中转了一会儿了 | |…

“字节跳动-文远知行杯”——广东工业大学第十四届程序设计竞赛

补题补题&#xff1a; A、hzy 和zsl 的生存挑战 题解&#xff1a;由于我们去考虑最优解&#xff0c;那么其中两人就应该是这样走法&#xff0c;一人选择相同数&#xff0c;另一人选择相反数&#xff0c;这样必会通关 #include <iostream> using namespace std;int main(…

Web服务器手动配置

目录 配置环境 http配置 配置步骤 1、首先安装Nginx&#xff08;已经安装的跳过这步&#xff09; 2、查看一下下Nginx的配置文件结构&#xff0c;了解如何配置&#xff0c;以及配置的各个条目有什么作用&#xff08;为接下来的配置打基础&#xff09; 3、创建你的网页 4、…
最新文章