小型校园网配置笔记

1,搭建网络拓扑图

LSW1:三层交换机命令:

<Huawei>sys

[Huawei]undo info-center enable

Info: Information center is disabled.

[Huawei]vlan batch 10 20 30 40 100 101

[Huawei]int vlan 10

[Huawei-Vlanif10]ip add 192.168.10.254 24  vlan10配置网关

[Huawei-Vlanif10]vrrp vrid 10 virtual-ip 192.168.10.252  虚拟网关

[Huawei-Vlanif10]vrrp vrid 10 priority 120  指定当前设备的 VRRP 优先级

[Huawei-Vlanif10]vrrp vrid 10 track interface g0/0/1  配置接口跟踪

[Huawei-Vlanif10]vrrp vrid 10 track interface g0/0/3

[Huawei-Vlanif10]quit

[Huawei]int vlan 20

[Huawei-Vlanif20]ip add 192.168.20.254 24

[Huawei-Vlanif20]vrrp vrid 20 virtual-ip 192.168.20.252

[Huawei-Vlanif20]vrrp vrid 20 priority 120

[Huawei-Vlanif20]vrrp vrid 20 track interface g0/0/1

[Huawei-Vlanif20]vrrp vrid 20 track interface g0/0/3

[Huawei]int vlan 30

[Huawei-Vlanif30]ip add 192.168.30.254 24

[Huawei-Vlanif30]vrrp vrid 30 virtual-ip 192.168.30.252

[Huawei-Vlanif30]vrrp vrid 30 track interface g0/0/1

[Huawei-Vlanif30]vrrp vrid 30 track interface g0/0/3

[Huawei]int vlan 40

[Huawei-Vlanif40]ip add 192.168.40.254 24

[Huawei-Vlanif40]vrrp vrid 40 virtual-ip 192.168.40.252

[Huawei-Vlanif40]vrrp vrid 40 track interface g0/0/1

[Huawei-Vlanif40]vrrp vrid 40 track interface g0/0/3

[Huawei-Vlanif40]int vlan 100

[Huawei-Vlanif100]ip add 192.168.100.254 24

[Huawei-Vlanif100]undo shutdown

Info: Interface Vlanif100 is not shutdown.

[Huawei-Vlanif100]qu

[Huawei]vlan batch 5 7   创建vlan5vlan7应用于上面的5网段和7网段

[Huawei]int vlan 5

[Huawei-Vlanif5]ip add 192.168.5.2 24

[Huawei-Vlanif5]int vlan 7

[Huawei-Vlanif7]ip add 192.168.7.2 24

[Huawei]int g0/0/1

[Huawei-GigabitEthernet0/0/1]port link-type access

[Huawei-GigabitEthernet0/0/1]port default vlan 5

[Huawei-GigabitEthernet0/0/1]int g0/0/3

[Huawei-GigabitEthernet0/0/3]port link-type access

[Huawei-GigabitEthernet0/0/3]port default vlan 7

[Huawei-GigabitEthernet0/0/3]qu

[Huawei]int Eth-Trunk 1

[Huawei-Eth-Trunk1]port link-type trunk   Eth-Trunk 1 上的端口为 Trunk 端口

[Huawei-Eth-Trunk1]port trunk allow-pass vlan all

[Huawei-Eth-Trunk1]trunkport GigabitEthernet 0/0/2

[Huawei-Eth-Trunk1]trunkport GigabitEthernet 0/0/7

[Huawei-Eth-Trunk1]dis this

#

interface Eth-Trunk1

 port link-type trunk

 port trunk allow-pass vlan 2 to 4094

#

return

[Huawei-Eth-Trunk1]qui

[Huawei]dis eth-trunk 1

Eth-Trunk1's state information is:

WorkingMode: NORMAL         Hash arithmetic: According to SIP-XOR-DIP        

Least Active-linknumber: 1  Max Bandwidth-affected-linknumber: 8             

Operate status: up          Number Of Up Port In Trunk: 2                    

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

PortName                      Status      Weight

GigabitEthernet0/0/2          Up          1               确保都处于开启状态

GigabitEthernet0/0/7          Up          1     

以下命令是将此交换机上的其余端口都配置为trunk

[Huawei]interface GigabitEthernet 0/0/5

[Huawei-GigabitEthernet0/0/5]port link-type trunk

[Huawei-GigabitEthernet0/0/5]port trunk allow-pass vlan all

[Huawei-GigabitEthernet0/0/5]interface GigabitEthernet 0/0/6

[Huawei-GigabitEthernet0/0/6]port link-type trunk

[Huawei-GigabitEthernet0/0/6]port trunk allow-pass vlan all

[Huawei-GigabitEthernet0/0/6]interface GigabitEthernet 0/0/9

[Huawei-GigabitEthernet0/0/9]port link-type trunk

[Huawei-GigabitEthernet0/0/9]port trunk allow-pass vlan all

[Huawei-GigabitEthernet0/0/9]interface GigabitEthernet 0/0/12

[Huawei-GigabitEthernet0/0/12]port link-type trunk

[Huawei-GigabitEthernet0/0/12]port trunk allow-pass vlan all

[Huawei-GigabitEthernet0/0/12]interface GigabitEthernet 0/0/8

[Huawei-GigabitEthernet0/0/8]port link-type trunk

[Huawei-GigabitEthernet0/0/8]port trunk pvid vlan 101

[Huawei-GigabitEthernet0/0/8]port trunk allow-pass vlan all

[Huawei]stp enable

[Huawei]stp region-configuration

[Huawei-mst-region]region-name huawei   MST 区域设置一个名称huawei

[Huawei-mst-region]revision-level 5

[Huawei-mst-region]instance 1 vlan 10 20 100

[Huawei-mst-region]instance 2 vlan 30 40

[Huawei-mst-region]active region-configuration 启用

[Huawei]stp instance 1 root primary

[Huawei]stp instance 2 root secondary

undo info-center enable

是一条 Huawei 设备命令,用于关闭设备的信息中心功能。当 undo info-center enable 命令被执行时,信息中心功能将被关闭,设备将不再记录和输出任何日志信息。这条命令通常被用于调试和测试过程中,或者在不需要进行日志记录的情况下,关闭信息中心以减少设备的负载和消耗。

virtual-ip 192.168.10.252

表示设置 VRRP 虚拟 IP 地址为 192.168.10.252。VRRP 虚拟 IP 地址是一组 VRRP 路由器共享的 IP 地址,用于作为默认网关向外提供服务,客户端设备可以将该 IP 地址配置为其默认网关。

vrrp vrid 10 virtual-ip 192.168.10.252

命令的作用是将当前设备配置为一组 VRRP 路由器中的一员,虚拟路由器 ID 为 10,共享的虚拟 IP 地址为 192.168.10.252,并通过 VRRP 协议与其他 VRRP 路由器实现状态同步和故障转移。

vrrp vrid 10

指定 VRRP 的虚拟路由器 ID,该 ID 必须在 1 到 255 的范围内。

priority 120

指定当前设备的 VRRP 优先级。VRRP 的优先级越高,那么当前设备就越有可能成为虚拟路由器的主机。该参数的取值范围为 1 到 254,默认值为 100。

vrrp vrid 10

指定 VRRP 的虚拟路由器 ID,该 ID 必须在 1 到 255 的范围内。

vrrp vrid 10 track interface g0/0/1

该命令的含义是将 g0/0/1 接口添加到 VRRP 跟踪列表中,如果该接口出现故障,那么当前设备的 VRRP 优先级将降低,从而减少其成为虚拟路由器主机的概率。

[Huawei-Vlanif100]undo shutdown

这条命令是华为交换机的命令,意思是取消对VLAN 100的禁用,使其启用。根据输出信息,命令执行成功,表示该接口已经被启用。

[Huawei-GigabitEthernet0/0/1]port link-type access

表示将 GigabitEthernet0/0/1 端口配置为接入端口,即连接的设备为终端设备,而非交换机、路由器等网络设备。在 access 模式下,该端口只能加入一个 VLAN,不能对数据进行 VLAN 标记。即使 GigabitEthernet0/0/1 端口上连接的是路由器,执行 port link-type access 命令也会将该端口配置为接入端口。在 access 模式下,该端口只能加入一个 VLAN,不能对数据进行 VLAN 标记。虽然路由器通常被认为是网络设备,但连接到交换机上的接口通常被配置为 access 模式,以便将其连接到特定的 VLAN。

[Huawei-GigabitEthernet0/0/1]port default vlan 5

表示将 GigabitEthernet0/0/1 端口的默认 VLAN ID 设置为 5。默认 VLAN ID 是指当该端口接收到的数据没有 VLAN 标记时所属的 VLAN ID,也称为 PVID(Port VLAN ID)。通过该命令可以将接入该端口的终端设备归属到 VLAN 5。

[Huawei]int Eth-Trunk 1

这条命令是进入交换机上的聚合接口 Eth-Trunk 1 的配置模式。聚合接口(或称汇聚接口)是将多个物理接口绑定为一个逻辑接口来实现增加带宽、提高可靠性和实现负载均衡的技术。通过聚合接口,可以将多个物理接口合成一个逻辑接口,使其能够承载更多的数据流量, Trunk的名字是可以自己定义的。

[Huawei-Eth-Trunk1]port link-type trunk

 设置 Eth-Trunk 1 上的端口为 Trunk 端口

[Huawei-Eth-Trunk1]port trunk allow-pass vlan all

该命令的作用是将所有的VLAN都允许通过Eth-Trunk1。

[Huawei]dis eth-trunk 1

这个命令输出的是华为交换机中Eth-Trunk 1的状态信息,其中包括工作模式,哈希算法,最小活跃链路数,最大带宽影响链路数,操作状态,当前聚合组中的端口数量,以及每个端口的状态、权重等信息。从输出结果可以看出,Eth-Trunk1目前的操作状态为“up”,当前聚合组中有两个端口(GigabitEthernet0/0/2和GigabitEthernet0/0/7),它们的状态都为“up”。

[Huawei-GigabitEthernet0/0/8]port trunk pvid vlan 101   

这条命令是将端口GigabitEthernet0/0/8的PVID(Port VLAN ID)设置为101,表示该端口接收和发送未打上VLAN标签的数据包都属于VLAN 101。如果该端口接收到打上VLAN标签的数据包,则会按照标签的VLAN ID进行处理。

[Huawei]stp enable 

该命令用于在交换机上启用STP (Spanning Tree Protocol)功能,STP可以防止网络中的环路,保证网络的可靠性和稳定性。当STP被启用后,交换机会进行选举,选出根交换机,然后建立树形拓扑结构,剩下的交换机将根据其距离根交换机的远近决定其在树形拓扑结构中的位置。

[Huawei]stp region-configuration

是在华为设备上用于配置区域参数的命令。在基于Spanning Tree协议的网络中,设备需要配置相同的区域参数才能相互通信。区域参数包括区域名称和区域优先级。使用此命令可以配置区域名称和区域优先级。

[Huawei-mst-region]revision-level 5

为 MST 区域设置一个修订级别,取值范围为 0 到 63,这里设置为 5。

instance 1 vlan 10 20 100:

配置 MST 区域的实例 1,以及属于实例 1 的 VLAN,这里设置为 VLAN 10、20、100。

MST 技术是一种可以将多个 VLAN 映射到一个或多个实例的 STP 实现,它允许对单个实例使用单一的根桥和拓扑,从而简化网络的维护和管理。在 MST 中,可以将多个 VLAN 分配到同一个实例,而不是像传统 STP 那样,每个 VLAN 都对应一个单独的 STP 实例。这些实例组成 MST 区域,并在 MST 区域内运行 MST 协议,用来计算网络中的冗余路径,确保网络的高可靠性和快速收敛。

stp instance 1 root primary

该命令将 STP 实例 1 的优先级设为最高,即优先级值为 0。这意味着该交换机将成为 STP 实例 1 的根交换机。

LSW2配置:

<Huawei>sys

[Huawei]undo inf enable

Info: Information center is disabled.

[Huawei]sys cor2

[cor2]vlan batch 10 20 30 40 100 101 6 8

[cor2]int vlan 10

[cor2-Vlanif10]ip add 192.168.10.254 24

[cor2-Vlanif10]vrrp vrid 10 virtual-ip 192.168.10.252

[cor2-Vlanif10]vrrp vrid 10 track interface g0/0/3

[cor2-Vlanif10]vrrp vrid 10 track interface g0/0/2

[cor2-Vlanif10]int vlan 20

[cor2-Vlanif20]ip add 192.168.20.254 24

[cor2-Vlanif20]vrrp vrid 20 virtual-ip 192.168.20.252

[cor2-Vlanif20]vrrp vrid 20 track interface g0/0/3

[cor2-Vlanif20]vrrp vrid 20 track interface g0/0/2

[cor2-Vlanif20]int vlan 30

[cor2-Vlanif30]ip add 192.168.30.254 24

[cor2-Vlanif30]vrrp vrid 30 virtual-ip 192.168.30.252

[cor2-Vlanif30]vrrp vrid 30 track interface g0/0/2

[cor2-Vlanif30]vrrp vrid 30 track interface g0/0/3

[cor2-Vlanif30]vrrp vrid 30 priority 120

[cor2-Vlanif30]int vlan 40

[cor2-Vlanif40]ip add 192.168.40.254 24

[cor2-Vlanif40]vrrp vrid 40 virtual-ip 192.168.40.252

[cor2-Vlanif40]vrrp vrid 40 track interface g0/0/3

[cor2-Vlanif40]vrrp vrid 40 track interface g0/0/2

[cor2-Vlanif40]vrrp vrid 40 priority 120

[cor2-Vlanif30]int vl 6

[cor2-Vlanif6]ip add 192.168.6.2 24

[cor2-Vlanif6]int vl 8

[cor2-Vlanif8]ip add 192.168.8.2 24

[cor2-Vlanif8]qu

[cor2]int g0/0/2

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

[cor2-GigabitEthernet0/0/2]port default vlan 8

[cor2-GigabitEthernet0/0/2]int g0/0/3

[cor2-GigabitEthernet0/0/3]port link-type access

[cor2-GigabitEthernet0/0/3]port default vlan 6

[cor2-GigabitEthernet0/0/3]qu

[cor2]int Eth-Trunk 1

[cor2-Eth-Trunk1]port link-type trunk

[cor2-Eth-Trunk1]port trunk allow-pass vlan all

[cor2-Eth-Trunk1]trunkport GigabitEthernet 0/0/1

[cor2-Eth-Trunk1]trunkport GigabitEthernet 0/0/7

[cor2-Eth-Trunk1]qu

[cor2]dis eth-trunk

Eth-Trunk1's state information is:

WorkingMode: NORMAL         Hash arithmetic: According to SIP-XOR-DIP        

Least Active-linknumber: 1  Max Bandwidth-affected-linknumber: 8             

Operate status: up          Number Of Up Port In Trunk: 2                    

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

PortName                      Status      Weight

GigabitEthernet0/0/1          Up          1     

GigabitEthernet0/0/7          Up          1     

[cor2]int g0/0/8

[cor2-GigabitEthernet0/0/8]port link-type trunk

[cor2-GigabitEthernet0/0/8]port trunk allow-pass vlan all

[cor2-GigabitEthernet0/0/8]int g0/0/9

[cor2-GigabitEthernet0/0/9]port link-type trunk

[cor2-GigabitEthernet0/0/9]port trunk allow-pass vlan all

[cor2-GigabitEthernet0/0/9]int g0/0/10

[cor2-GigabitEthernet0/0/10]port link-type trunk

[cor2-GigabitEthernet0/0/10]port trunk allow-pass vlan all

[cor2-GigabitEthernet0/0/10]int g0/0/4

[cor2-GigabitEthernet0/0/4]port link-type trunk

[cor2-GigabitEthernet0/0/4]port trunk allow-pass vlan all

[cor2-GigabitEthernet0/0/4]qu

[cor2]stp enable

[cor2]stp region-configuration

[cor2-mst-region]revision-level 5

[cor2-mst-region]instance 2 vlan 30 40

[cor2-mst-region]instance 1 vlan 10 20 100

[cor2-mst-region]active region-configuration

[cor2-mst-region]dis this

#

stp region-configuration

 revision-level 5

 instance 1 vlan 10 20 100

 instance 2 vlan 30 40

 active region-configuration

#

return

[cor2-mst-region]qu

[cor2]stp instance 1 root secondary  

[cor2]stp instance 2 root primary

LSW3配置

[Huawei]undo info-center enable

Info: Information center is disabled.

[Huawei]sysname lsw3

[lsw3]vlan batch 10 20 30 40 100 101

[lsw3]stp enable

[lsw3]stp region-configuration

[lsw3-mst-region]region-name huawei

[lsw3-mst-region]revision-level 5

[lsw3-mst-region]instance 1 vlan 10 20 100

[lsw3-mst-region]instance 2 vlan 30 40

[lsw3-mst-region]active region-configuration

[lsw3]int e0/0/3  

[lsw3-Ethernet0/0/3]port link-type access

[lsw3-Ethernet0/0/3]port default vlan 10

[lsw3-Ethernet0/0/3]int e0/0/4

[lsw3-Ethernet0/0/4]port link-type access

[lsw3-Ethernet0/0/4]port default vlan 10

[lsw3-Ethernet0/0/4]int e0/0/1

[lsw3-Ethernet0/0/1]port link-type trunk

[lsw3-Ethernet0/0/1]port trunk allow-pass vlan all

[lsw3-Ethernet0/0/1]int e0/0/2

[lsw3-Ethernet0/0/2]port link-type trunk

[lsw3-Ethernet0/0/2]port trunk allow-pass vlan all

[lsw3-GigabitEthernet0/0/1]qu

[lsw3]qu

<lsw3>save

The current configuration will be written to the device.

Are you sure to continue?[Y/N]y

Info: Please input the file name ( *.cfg, *.zip ) [vrpcfg.zip]:lcy3.zip

Now saving the current configuration to the slot 0.

Save the configuration successfully.

LSW4配置

<Huawei>sys

Enter system view, return user view with Ctrl+Z. 

[Huawei]undo info-center enable

Info: Information center is disabled.

[Huawei]sys lsw4

[lsw4]vlan batch 10 20 30 40 100 101

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

[lsw4]stp enable

[lsw4]stp region-configuration

[lsw4-mst-region]region-name huawei

[lsw4-mst-region]revision-level 5

[lsw4-mst-region]instance 1 vlan 10 20 100

[lsw4-mst-region]instance 2 vlan 30 40

[lsw4-mst-region]active region-configuration

[lsw4-mst-region]dis this

#

stp region-configuration

 region-name huawei

 revision-level 5

 instance 1 vlan 10 20 100

 instance 2 vlan 30 40

 active region-configuration

#

return

[lsw4-mst-region]int e0/0/1

[lsw4-Ethernet0/0/1]port link-type trunk

[lsw4-Ethernet0/0/1]port trunk allow-pass vlan all

[lsw4-Ethernet0/0/1]int e0/0/2

[lsw4-Ethernet0/0/2]port link-type trunk

[lsw4-Ethernet0/0/2]port trunk allow-pass vlan all

[lsw4-Ethernet0/0/2]int e0/0/3

[lsw4-Ethernet0/0/3]port link-type access

[lsw4-Ethernet0/0/3]port default vlan 20

[lsw4-Ethernet0/0/3]int e0/0/4

[lsw4-Ethernet0/0/4]port link-type access

[lsw4-Ethernet0/0/4]port default vlan 20

LSW5配置

<Huawei>sys

Enter system view, return user view with Ctrl+Z.

[Huawei]undo info-center enable

Info: Information center is disabled.

[Huawei]sys LSW5

[LSW5]vlan batch 10 20 30 40 100 101

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

[LSW5]stp enable

[LSW5]stp region-configuration

[LSW5-mst-region]region-name huawei

[LSW5-mst-region]revision-level 5

[LSW5-mst-region]instance 1 vlan 10 20 100

[LSW5-mst-region]instance 2 vlan 30 40

[LSW5-mst-region]active region-configuration

[LSW5-mst-region]int e0/0/1

[LSW5-Ethernet0/0/1]port link-type trunk

[LSW5-Ethernet0/0/1]port trunk allow-pass vlan all

[LSW5-Ethernet0/0/1]int e0/0/2

[LSW5-Ethernet0/0/2]port link-type trunk

[LSW5-Ethernet0/0/2]port trunk allow-pass vlan all

[LSW5-Ethernet0/0/2]int e0/0/3

[LSW5-Ethernet0/0/3]port link-type access

[LSW5-Ethernet0/0/3]port default vlan 30

[LSW5-Ethernet0/0/3]int e0/0/4

[LSW5-Ethernet0/0/4]port link-type access

[LSW5-Ethernet0/0/4]port default vlan 30

LSW6配置

<Huawei>sys

Enter system view, return user view with Ctrl+Z.

[Huawei]undo info-center enable

Info: Information center is disabled.

[Huawei]sys LSW6

[LSW6]vlan batch 10 20 30 40 100 101

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

[LSW6]stp enable

[LSW6]stp region-configuration

[LSW6-mst-region]region-name huawei

[LSW6-mst-region]revision-level 5

[LSW6-mst-region]instance 1 vlan 10 20 100

[LSW6-mst-region]instance 2 vlan 30 40

[LSW6-mst-region]active region-configuration

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

[LSW6-mst-region]int e0/0/1

[LSW6-Ethernet0/0/1]port link-type trunk

[LSW6-Ethernet0/0/1]port trunk allow-pass vlan all

[LSW6-Ethernet0/0/1]int e0/0/2

[LSW6-Ethernet0/0/2]port link-type trunk

[LSW6-Ethernet0/0/2]port trunk allow-pass vlan all

[LSW6-Ethernet0/0/2]int e0/0/3

[LSW6-Ethernet0/0/3]port link-type access

[LSW6-Ethernet0/0/3]port default vlan 40

[LSW6-Ethernet0/0/3]int e0/0/4

[LSW6-Ethernet0/0/4]port link-type access

[LSW6-Ethernet0/0/4]port default vlan 40

AC1配置

[AC1]vlan batch 100 101

[AC1]int vlan 100

[AC1-vlan100]ip add 192.168.100.1 24

Qu

Dhcp enable

Int vlan 100

Dhcp select global

Qu

Int vlan 101

Ip add 192.168.101.1 24

Dhcp select interface

Qu

Ip pool vlan100

­Gateway-list 192.168.100.254

Network 192.168.100.0

[AC1-ip-pool-vlan100]dns-list 192.168.200.4

[AC1-ip-pool-vlan100]excluded-ip-address 192.168.100.1

[AC1-ip-pool-vlan100]qu

[AC1-wlan-view]ap-group name huawei

[AC1-wlan-ap-group-huawei]qu

[AC1-wlan-view]regulatory-domain-profile name huawei-domain

[AC1-wlan-regulate-domain-huawei-domain]country-code cn

[AC1-wlan-regulate-domain-huawei-domain]qu

[AC1-wlan-view]ap-group name ap-huawei

[AC1-wlan-ap-group-ap-huawei]regulatory-domain-profile huawei-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

[AC1-wlan-ap-group-ap-huawei]qu

[AC1-wlan-view]qu

[AC1]capwap source interface Vlanif 101

[AC1]wlan 

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

[AC1-wlan-view]ap-id 0 ap-mac 00e0-fc12-6130 (AP1mac)

[AC1-wlan-ap-0]ap-name area-1

[AC1-wlan-ap-0]ap-group ap-huawei

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.

[AC1-wlan-ap-0]qu

[AC1-wlan-view]qu

[AC1]dis ap all

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

Total AP information:

idle : idle            [1]

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

ID   MAC            Name   Group     IP Type            State STA Uptime

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

0    00e0-fc12-6130 area-1 ap-huawei -  -               idle  0   -

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

Total: 1

[AC1]int g0/0/1

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

[AC1-GigabitEthernet0/0/1]port trunk allow-pass vlan all

[AC1-GigabitEthernet0/0/1]qu

[AC1]dis ap all

 [AC1]wlan

[AC1-wlan-view]security-profile name sec

[AC1-wlan-sec-prof-sec]security wpa2 psk pass-phrase huawei@123 aes

[AC1-wlan-sec-prof-sec]qu

[AC1-wlan-view]ssid-profile  name ssid-1

[AC1-wlan-ssid-prof-ssid-1]ssid huawei

Info: This operation may take a few seconds, please wait.done.

[AC1-wlan-ssid-prof-ssid-1]qu

[AC1-wlan-view]vap-profile name vap-1

[AC1-wlan-vap-prof-vap-1]forward-mode tunnel

Info: This operation may take a few seconds, please wait.done.

[AC1-wlan-vap-prof-vap-1]service-vlan vlan-id 100

Info: This operation may take a few seconds, please wait.done.

[AC1-wlan-vap-prof-vap-1]security-profile sec

Info: This operation may take a few seconds, please wait.done.

[AC1-wlan-vap-prof-vap-1]ssid-profile ssid-1

Info: This operation may take a few seconds, please wait.done.

[AC1-wlan-vap-prof-vap-1]qu

[AC1-wlan-view]ap-group name ap-huawei

[AC1-wlan-ap-group-ap-huawei]vap-profile vap-1 wlan 1 radio 0

Info: This operation may take a few seconds, please wait...done.

[AC1-wlan-ap-group-ap-huawei]qu

[AC1-wlan-view]qu

[AC1]qu

<AC1>save

  The current configuration will be written to the device.

  Are you sure to continue? (y/n)[n]:y

  It will take several minutes to save configuration file, please wait........

  Configuration file has been saved successfully

  Note: The configuration file will take effect after being activated

AR2配置

<Huawei>sys

[Huawei]sys cor1

[cor1]undo info-center enable

Info: Information center is disabled.

[cor1]int g2/0/0

[cor1-GigabitEthernet2/0/0]ip add 192.168.5.1 24

[cor1-GigabitEthernet2/0/0]int g2/0/1

[cor1-GigabitEthernet2/0/1]ip add 192.168.6.1 24

[cor1-GigabitEthernet2/0/1]int g0/0/1

[cor1-GigabitEthernet0/0/1]ip add 192.168.4.1 24

[cor1-GigabitEthernet0/0/1]int g0/0/0

[cor1-GigabitEthernet0/0/0]ip add 192.168.2.2 24

AR4配置

<Huawei>sys

Enter system view, return user view with Ctrl+Z.

   

[Huawei]undo info-center enable

Info: Information center is disabled.

[Huawei]sys cor2

[cor2]int g0/0/0

[cor2-GigabitEthernet0/0/0]ip add 192.168.3.2 24

[cor2-GigabitEthernet0/0/0]int g0/0/1

[cor2-GigabitEthernet0/0/1]ip add 192.168.4.2 24

[cor2-GigabitEthernet2/0/0]int g2/0/1

[cor2-GigabitEthernet2/0/1]ip add 192.168.8.1 24

[cor2-GigabitEthernet2/0/1]int g2/0/0

[cor2-GigabitEthernet2/0/0]ip add 192.168.7.1 24

防火墙配置

初始用户名:admin

初始密码  Admin@123

新的密码  huawei@123

[USG6000V1]sys FW1

[FW1]undo inf en

[FW1]int g1/0/0

[FW1-GigabitEthernet1/0/0]ip add 192.168.2.1 24

[FW1-GigabitEthernet1/0/0]int g0/0/0

[FW1-GigabitEthernet0/0/0]ip add 192.168.3.1 24

[FW1-GigabitEthernet0/0/0]int g1/0/1

[FW1-GigabitEthernet1/0/1]ip add 192.168.200.1 24

[FW1-GigabitEthernet1/0/1]int g1/0/2

[FW1-GigabitEthernet1/0/2]ip add 200.10.10.1 30

[FW1-GigabitEthernet1/0/2]qu

[FW1]firewall zone trust

[FW1-zone-trust]add interface g0/0/0

[FW1-zone-trust]add interface g1/0/0

[FW1-zone-trust]qu

[FW1]firewall zone untrust

[FW1-zone-untrust]add interface g1/0/2

[FW1-zone-untrust]qu

[FW1]firewall zone dmz

[FW1-zone-dmz]add interface g1/0/1

[FW1-zone-dmz]qu

[FW1]security-policy

[FW1-policy-security]rule name tr-untr

[FW1-policy-security-rule-tr-untr]source-zone trust

[FW1-policy-security-rule-tr-untr]source-address 192.168.0.0 0.0.255.255

[FW1-policy-security-rule-tr-untr]destination-zone

Info: The schedule update of IPS-SDB is triggered.

[FW1-policy-security-rule-tr-untr]destination-zone untrust

Info: The schedule update of AV-SDB is triggered.

[FW1-policy-security-rule-tr-untr]action permit

[FW1]int g1/0/0

[FW1-GigabitEthernet1/0/0]service-manage all permit

[FW1-GigabitEthernet1/0/0]int g0/0/0 

[FW1-GigabitEthernet0/0/0]service-manage all permit

[FW1-GigabitEthernet0/0/0]int g1/0/1

[FW1-GigabitEthernet1/0/1]service-manage all permit

[FW1-GigabitEthernet1/0/1]int g1/0/2

[FW1-GigabitEthernet1/0/2]service-manage all permit

LSW1配置

[Huawei]sys lsw1

[lsw1]ospf 10

[lsw1-ospf-10]area 0

[lsw1-ospf-10-area-0.0.0.0]network 192.168.10.0 0.0.0.255

[lsw1-ospf-10-area-0.0.0.0]network 192.168.20.0 0.0.0.255

[lsw1-ospf-10-area-0.0.0.0]network 192.168.30.0 0.0.0.255

[lsw1-ospf-10-area-0.0.0.0]network 192.168.40.0 0.0.0.255

[lsw1-ospf-10-area-0.0.0.0]network 192.168.100.0 0.0.0.255

[lsw1-ospf-10-area-0.0.0.0]network 192.168.5.0 0.0.0.255

[lsw1-ospf-10-area-0.0.0.0]network 192.168.7.0 0.0.0.255

LSW2配置

[cor2]sys sw2

[sw2]ospf 20

[sw2-ospf-20]area 0

[sw2-ospf-20-area-0.0.0.0]network 192.168.10.0 0.0.0.255

[sw2-ospf-20-area-0.0.0.0]network 192.168.20.0 0.0.0.255

[sw2-ospf-20-area-0.0.0.0]network 192.168.30.0 0.0.0.255

[sw2-ospf-20-area-0.0.0.0]network 192.168.40.0 0.0.0.255

[sw2-ospf-20-area-0.0.0.0]network 192.168.6.0 0.0.0.255

[sw2-ospf-20-area-0.0.0.0]network 192.168.8.0 0.0.0.255

AR2配置

[cor1]ospf 30

[cor1-ospf-30]area 0

[cor1-ospf-30-area-0.0.0.0]network 192.168.5.0 0.0.0.255

[cor1-ospf-30-area-0.0.0.0]network 192.168.6.0 0.0.0.255

[cor1-ospf-30-area-0.0.0.0]network 192.168.4.0 0.0.0.255

[cor1-ospf-30-area-0.0.0.0]network 192.168.2.0 0.0.0.255

AR4配置

[cor2]ospf 40

[cor2-ospf-40]area 0

[cor2-ospf-40-area-0.0.0.0]network 192.168.7.0 0.0.0.255

[cor2-ospf-40-area-0.0.0.0]network 192.168.8.0 0.0.0.255

[cor2-ospf-40-area-0.0.0.0]network 192.168.3.0 0.0.0.255

[cor2-ospf-40-area-0.0.0.0]network 192.168.4.0 0.0.0.255

防火墙配置

<FW1>sys

Enter system view, return user view with Ctrl+Z.

[FW1]ospf 50

[FW1-ospf-50]area 0

[FW1-ospf-50-area-0.0.0.0]network 192.168.2.0 0.0.0.255

[FW1-ospf-50-area-0.0.0.0]network 192.168.3.0 0.0.0.255

[FW1-ospf-50-area-0.0.0.0]network 192.168.200.0 0.0.0.255

[FW1-ospf-50-area-0.0.0.0]qu

[FW1-ospf-50]default-route-advertise always

[FW1-ospf-50]qu

[FW1]ip route-static 0.0.0.0 0.0.0.0 200.10.10.2 

默认路由一般用在末稍网络,指只有一个唯一出口的网络。默认路由的配置方法为:# ip route 0.0.0.0 0.0.0.0 下一跳IP地址。

[FW1]nat-policy

[FW1-policy-nat]rule name easy-ip

[FW1-policy-nat-rule-easy-ip]source-address 192.168.0.0 0.0.255.255

[FW1-policy-nat-rule-easy-ip]source-zone trust

[FW1-policy-nat-rule-easy-ip]source-zone dmz

[FW1-policy-nat-rule-easy-ip]destination-zone untrust

[FW1-policy-nat-rule-easy-ip]action source-nat easy-ip     nat地址转换

<FW1>sa a

The current configuration will be written to the device.

Are you sure to continue?[Y/N]y

Now saving the current configuration to the slot 0..

Save the configuration successfully.

AR3配置

<Huawei>sys

Enter system view, return user view with Ctrl+Z.

[Huawei]sys name isp-r

[name isp-r]undo info en

Info: Information center is disabled.

[name isp-r]int g0/0/0

[name isp-r-GigabitEthernet0/0/0]ip add 200.10.10.2 30

[name isp-r-GigabitEthernet0/0/0]int g0/0/1

[name isp-r-GigabitEthernet0/0/1]ip add 200.10.20.1 28

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

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

相关文章

vivado FIFO IP核的使用

FIFO是先进先出的数据缓存器。起到跨时钟域的数据缓冲作用&#xff0c;一般在实际应用过程当中采用异步读写的方式&#xff0c; 选择的配置如下 封装IP核 module clk_wiz(input resetn ,input clk_in1 ,output clk_out1 ,output clk_out2 …

VScode Error Lens插件

安装完成之后&#xff0c;当我们输入一些错误的语法格式的时候&#xff0c;它都会有一些提示&#xff01; 一开始是英文提示 修改为中文提示 设置搜索 typescript.local

力扣串题:字符串中的第二大数字

此题的精妙之处在于char类型到int类型的转化&#xff0c;需要运算来解决 int secondHighest(char * s) {int max1-1;int max2-1;int szstrlen(s);int i 0 ;for(i0;i<sz;i){if(s[i]>0&&s[i]<9){if((s[i]-0)>max1){max2max1;max1s[i]-0;}else if((s[i]-0)&l…

VUE/HTML网页在线编辑AutoCAD DWG文档

猿大师办公助手作为一款专业的网页在线编辑Office插件&#xff0c;不仅支持微软Office、金山WPS及永中Office完整嵌入到最新版Chrome、Ddge、Firefox等浏览器中使用&#xff0c;猿大师还可以把Autodesk的AutoCAD、DWG TrueView、Design Review等软件嵌入到浏览器网页中&#xf…

写给新手的单元测试框架unittest运行的简单问题

当使用unittest框架编写和运行单元测试时&#xff0c;需要遵循以下步骤&#xff1a; 1、导入unittest模块&#xff1a;在代码中首先导入unittest模块。 import unittest 2、创建测试类&#xff1a;创建一个继承自unittest.TestCase的测试类。该类将包含一系列测试方法。 clas…

《ElementPlus 与 ElementUI 差异集合》icon 图标使用(包含:el-button,el-input和el-dropdown 差异对比)

安装 注意 ElementPlus 的 Icon 图标 要额外安装插件 element-plus/icons-vue. npm install element-plus/icons-vue注册 全局注册 定义一个文件 element-icon.js &#xff0c;注意代码第 6 行。加上了前缀 ElIcon &#xff0c;避免组件命名重复&#xff0c;且易于理解为 e…

深入解析C++树形关联式容器:map、set及其衍生容器的使用与原理

文章目录 一、引言二、关联式容器的中的 paira.pair 的创建及使用b.pair 间的比较 三、 map 与 set 详解1. map 的基本操作2. set 的基本操作3.关联式容器的迭代器 四、 multimap 与 multiset 的特性五、关联式容器的使用技巧与注意事项1. 键值类型的选择与设计2. 自定义比较函…

openGauss学习笔记-241 openGauss性能调优-SQL调优-审视和修改表定义

文章目录 openGauss学习笔记-241 openGauss性能调优-SQL调优-审视和修改表定义241.1 审视和修改表定义概述241.2 选择存储模型241.3 使用局部聚簇241.4 使用分区表241.5 选择数据类型 openGauss学习笔记-241 openGauss性能调优-SQL调优-审视和修改表定义 241.1 审视和修改表定…

R语言复现:如何利用logistic逐步回归进行影响因素分析?

Logistic回归在医学科研、特别是观察性研究领域&#xff0c;无论是现况调查、病例对照研究、还是队列研究中都是大家经常用到的统计方法&#xff0c;而在影响因素研究筛选自变量时&#xff0c;大家习惯性用的比较多的还是先单后多&#xff0c;P&#xff1c;0.05纳入多因素研究&…

【深度学习笔记】8_2 异步计算

注&#xff1a;本文为《动手学深度学习》开源内容&#xff0c;部分标注了个人理解&#xff0c;仅为个人学习记录&#xff0c;无抄袭搬运意图 8.2 异步计算 此节内容对应的内容有兴趣的可以去看看原文。 今天的计算机是高度并行的系统&#xff0c;由多个CPU核、多个GPU、多个处…

yolov5模型压缩-torch_pruning

参考论文:DepGraph: Towards Any Structural Pruning(https://arxiv.org/abs/2301.12900) 主要原理:物理的移除参数,并自动找出层与层以及层之间的依赖,完成模型的自动裁剪 模型压缩效果:yolov5剪枝流程如下: pip install torch_pruning 新建prune.py: import torch_…

AppLink对51Tracking的集成方式

什么是51Tracking 51Tracking是一个提供国际物流跟踪服务的平台&#xff0c;用户可以通过该平台跟踪包裹在全球范围内的物流信息。该平台提供多家物流公司的跟踪服务&#xff0c;帮助用户更方便地了解包裹的运输情况和到达时间。提供实时运单查询、运单管理功能&#xff0c;支…

echarts绘制雷达图

<template><div><div>【云端报警风险】</div><div ref"target" class"w-full h-full" stylewidth&#xff1a;200px;height:300px></div></div> </template><script setup> import { ref, onMounte…

找视频素材软件去哪个app?推荐做短视频必备的几款APP!

做短视频的小伙伴们&#xff0c;有没有遇到过找不到合适素材的烦恼呢&#xff1f;有时候脑子里有好创意&#xff0c;却因为找不到合适的素材而搁置。 今天&#xff0c;我就来给大家推荐几个超实用的视频素材app&#xff0c;帮你的创意加加油&#xff01; 1. 蛙学网材网 首先要…

机器视觉检测设备的组成要素

机器视觉检测设备是一种先进的自动化检测技术工具&#xff0c;它利用光学、图像处理和计算机硬件及软件技术模拟并扩展人类的视觉功能&#xff0c;以实现对产品或目标物体进行自动化的尺寸测量、缺陷检测、表面质量评估、颜色识别、形状匹配以及位置判断等功能。这种设备通常包…

APP测试基本流程以及APP测试要点

一、 APP测试基本流程 1、流程图 2、测试周期 测试周期可按项目的开发周期来确定测试时间&#xff0c;一般测试时间为两三周&#xff08;即15个工作日&#xff09;&#xff0c;根据项目情况以及版本质量可适当缩短或延长测试时间。 3、测试资源 测试任务开始前&#xff0c;…

如何在群晖NAS部署WPS容器并实现无公网IP远程访问本地office软件

文章目录 1. 拉取WPS Office镜像2. 运行WPS Office镜像容器3. 本地访问WPS Office4. 群晖安装Cpolar5. 配置WPS Office远程地址6. 远程访问WPS Office小结 7. 固定公网地址 wps-office是一个在Linux服务器上部署WPS Office的镜像。它基于WPS Office的Linux版本&#xff0c;通过…

案例分析篇09:Web架构设计相关20个考点(7~11)(2024年软考高级系统架构设计师冲刺知识点总结)

专栏系列文章推荐: 2024高级系统架构设计师备考资料(高频考点&真题&经验)https://blog.csdn.net/seeker1994/category_12593400.html 【历年案例分析真题考点汇总】与【专栏文章案例分析高频考点目录】(2024年软考高级系统架构设计师冲刺知识点总结-案例分析篇-…

TimescaleDB 安装部署

文章目录 1.Yum安装TimescaleDB1.1.安装PostgreSQL1.2.安装Timescaledb插件1.3.创建Timescaledb扩展 2.Docker安装Timescaledb 开源中间件 # TimescaleDBhttps://iothub.org.cn/docs/middleware/ https://iothub.org.cn/docs/middleware/timescale/timescale-deploy/1.Yum安装…

Rabbit算法:轻量高效的加密利器

title: Rabbit算法&#xff1a;轻量高效的加密利器 date: 2024/3/13 18:14:31 updated: 2024/3/13 18:14:31 tags: Rabbit算法流密码高安全性高性能密钥调度加密解密抗攻击性 Rabbit算法起源&#xff1a; Rabbit算法是由Martin Boesgaard和Mette Vesterager提出的一种流密码算…