TA的每日心情 | 擦汗 2025-7-9 21:50 |
---|
签到天数: 18 天 连续签到: 1 天 [LV.4]偶尔看看III
升级
  100%
管理员
- 积分
- 15430
|
1 交换机、路由器安全策略配置(ACL、VLAN 隔离).pdf
(1.16 MB, 下载次数: 0, 售价: 8 贡献)
1 交换机、路由器安全策略配置(ACL、VLAN 隔离).doc
(2.22 MB, 下载次数: 0, 售价: 8 贡献)
操作步骤
配置网络互通
# 配置接入交换机SwitchA的接口GE0/0/1和GE0/0/3加入VLAN20、VLAN100和VLAN101,GE0/0/2接入VLAN20。
<HUAWEI> system-view
[HUAWEI] sysname SwitchA
[SwitchA] vlan batch 20 100 101
[SwitchA] interface gigabitethernet 0/0/1
[SwitchA-GigabitEthernet0/0/1] port link-type trunk
[SwitchA-GigabitEthernet0/0/1] port trunk pvid vlan 100
[SwitchA-GigabitEthernet0/0/1] port trunk allow-pass vlan 20 100 101
[SwitchA-GigabitEthernet0/0/1] port-isolate enable
[SwitchA-GigabitEthernet0/0/1] quit
[SwitchA] interface gigabitethernet 0/0/2
[SwitchA-GigabitEthernet0/0/2] port link-type trunk
[SwitchA-GigabitEthernet0/0/2] port trunk allow-pass vlan 20
[SwitchA-GigabitEthernet0/0/2] quit
[SwitchA] interface gigabitethernet 0/0/3
[SwitchA-GigabitEthernet0/0/3] port link-type trunk
[SwitchA-GigabitEthernet0/0/3] port trunk allow-pass vlan 20 100 101
[SwitchA-GigabitEthernet0/0/3] quit
# 配置汇聚交换机SwitchB的接口GE0/0/1加入VLAN20、VLAN100和VLAN101,GE0/0/2加入VLAN100和VLAN102,GE0/0/3加入VLAN103,GE0/0/4加入VLAN104,GE0/0/5加入VLAN105。
<HUAWEI> system-view
[HUAWEI] sysname SwitchB
[SwitchB] vlan batch 20 100 to 105
[SwitchB] interface gigabitethernet 0/0/1
[SwitchB-GigabitEthernet0/0/1] port link-type trunk
[SwitchB-GigabitEthernet0/0/1] port trunk allow-pass vlan 20 100 101
[SwitchB-GigabitEthernet0/0/1] quit
[SwitchB] interface gigabitethernet 0/0/2
[SwitchB-GigabitEthernet0/0/2] port link-type trunk
[SwitchB-GigabitEthernet0/0/2] port trunk allow-pass vlan 100 102
[SwitchB-GigabitEthernet0/0/2] quit
[SwitchB] interface gigabitethernet 0/0/3
[SwitchB-GigabitEthernet0/0/3] port link-type trunk
[SwitchB-GigabitEthernet0/0/3] port trunk pvid vlan 103
[SwitchB-GigabitEthernet0/0/3] port trunk allow-pass vlan 103
[SwitchB-GigabitEthernet0/0/3] quit
[SwitchB] interface gigabitethernet 0/0/4
[SwitchB-GigabitEthernet0/0/4] port link-type trunk
[SwitchB-GigabitEthernet0/0/4] port trunk pvid vlan 104
[SwitchB-GigabitEthernet0/0/4] port trunk allow-pass vlan 104
[SwitchB-GigabitEthernet0/0/4] quit
[SwitchB] interface gigabitethernet 0/0/5
[SwitchB-GigabitEthernet0/0/5] port link-type trunk
[SwitchB-GigabitEthernet0/0/5] port trunk pvid vlan 105
[SwitchB-GigabitEthernet0/0/5] port trunk allow-pass vlan 105
[SwitchB-GigabitEthernet0/0/5] quit
# 在汇聚交换机SwitchB上创建VLANIF102、VLANIF103、VLANIF104和VLANIF105接口,并配置下一跳为Router的缺省路由。
[SwitchB] interface vlanif 102
[SwitchB-Vlanif102] ip address 10.23.102.1 24
[SwitchB-Vlanif102] quit
[SwitchB] interface vlanif 103
[SwitchB-Vlanif103] ip address 10.23.103.2 24
[SwitchB-Vlanif103] quit
[SwitchB] interface vlanif 104
[SwitchB-Vlanif104] ip address 10.23.104.1 24
[SwitchB-Vlanif104] quit
[SwitchB] interface vlanif 105
[SwitchB-Vlanif105] ip address 10.23.105.2 24
[SwitchB-Vlanif105] quit
[SwitchB] ip route-static 0.0.0.0 0.0.0.0 10.23.104.2
# 在AC上创建用于授权的VLAN20,配置AC的接口GE0/0/1加入VLAN100和VLAN102,创建VLANIF102接口,并配置指向RADIUS服务器的静态路由。
<AC6605> system-view
[AC6605] sysname AC
[AC] vlan batch 20 100 102
[AC] interface gigabitethernet 0/0/1
[AC-GigabitEthernet0/0/1] port link-type trunk
[AC-GigabitEthernet0/0/1] port trunk allow-pass vlan 100 102
[AC-GigabitEthernet0/0/1] quit
[AC] interface vlanif 102
[AC-Vlanif102] ip address 10.23.102.2 24
[AC-Vlanif102] quit
[AC] ip route-static 10.23.103.0 24 10.23.102.1
# 配置Router的接口GE0/0/1的IP地址,并配置指向STA网段的静态路由。
<Huawei> system-view
[Huawei] sysname Router
[Router] interface gigabitethernet 0/0/1
[Router-GigabitEthernet0/0/1] ip address 10.23.104.2 24
[Router-GigabitEthernet0/0/1] quit
[Router] ip route-static 10.23.101.0 24 10.23.104.1
配置AC作为DHCP服务器为AP分配IP地址,SwitchB作为DHCP服务器为STA分配IP地址
# 在AC上配置VLANIF100接口为AP提供IP地址。
[AC] dhcp enable
[AC] interface vlanif 100
[AC-Vlanif100] ip address 10.23.100.1 24
[AC-Vlanif100] dhcp select interface
[AC-Vlanif100] quit
# 在汇聚交换机SwitchB上配置VLANIF101接口为STA提供IP地址。
[SwitchB] dhcp enable
[SwitchB] interface vlanif 101
[SwitchB-Vlanif101] ip address 10.23.101.1 24
[SwitchB-Vlanif101] dhcp select interface
[SwitchB-Vlanif101] quit
# 在汇聚交换机SwitchB上配置VLANIF20接口为授权用户提供IP地址。其中,IP地址段10.23.20.2–10.23.20.100不参与分配。
[SwitchB] interface vlanif 20
[SwitchB-Vlanif20] ip address 10.23.20.1 24
[SwitchB-Vlanif20] dhcp select interface
[SwitchB-Vlanif20] dhcp server excluded-ip-address 10.23.20.2 10.23.20.100
[SwitchB-Vlanif20] quit
配置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. Continue?[Y/N]:y
[AC-wlan-ap-group-ap-group1] quit
[AC-wlan-view] quit
# 配置AC的源接口。
[AC] capwap source interface vlanif 100
V200R021C00版本开始,配置CAPWAP源接口或源地址时,会检查和安全相关的配置是否已存在,包括DTLS加密的PSK、AC间DTLS加密的PSK、登录AP的用户名和密码、全局离线管理VAP的接入密码,均已存在才能成功配置,否则会提示用户先完成相关的配置。
Set the DTLS PSK(contains 8-32 plain-text characters, or 48 or 68 cipher-text characters that must be a combination of at least two
of the following: lowercase letters a to z, uppercase letters A to Z, digits, and special characters): //配置DTLS加密的PSK
Confirm PSK: //重复输入DTLS加密的PSK,两次输入保持一致
Configuring the new PSK, waiting...
Info: Deliver DTLS PSK to devices using CAPWAP connections. It may take a few minutes.
------------------------------------------------------------------------------
CAPWAP DTLS PSK deliver result
Deliver Number : 0
Success Number : 0
Failed Number : 0
------------------------------------------------------------------------------...................done.
Set the DTLS inter-controller PSK(contains 8-32 plain-text characters, or 48 or 68 cipher-text characters that must be a combination
of at least two of the following: lowercase letters a to z, uppercase letters A to Z, digits, and special characters): //配置AC间DTLS加密的PSK
Confirm PSK: //重复输入AC间DTLS加密的PSK,两次输入保持一致
Configuring the new PSK, waiting......................done.
Set the user name for FIT APs(The value is a string of 4 to 31 characters, which can contain letters, underscores, and digits, and m
ust start with a letter):admin //统一配置FIT AP的登录用户名
Set the password for FIT APs(plain-text password of 8-128 characters or cipher-text password of 48-188 characters that must be a com
bination of at least three of the following: lowercase letters a to z, uppercase letters A to Z, digits, and special characters): //统一配置FIT AP的登录密码
Confirm password: //重复输入FIT AP的登录密码,两次输入保持一致
Set the global temporary-management psk(contains 8-63 plain-text characters, or 48-108 cipher-text characters that must be a combina
tion of at least two of the following: lowercase letters a to z, uppercase letters A to Z, digits, and special characters): //配置全局离线管理VAP的接入密码
Confirm PSK: //重复输入全局离线管理VAP的接入密码,两次输入保持一致
Warning: Ensure that the management VLAN and service VLAN are different. Otherwise, services may be interrupted.
Warning: Before an added device goes online for the first time, enable DTLS no-auth if it runs a version earlier than V200R021C00 or
enable DTLS certificate-mandatory-match if it runs V200R021C00 or later.
[AC] capwap dtls no-auth enable //V200R021C00版本开始,AC默认开启CAPWAP控制隧道的DTLS加密功能。添加AP时AP会上线失败,此时需要先开启CAPWAP DTLS不认证方式让AP上线,以便AP获取安全凭证,AP上线后应及时关闭该功能(undo capwap dtls no-auth enable),避免未授权AP上线。
Warning: This operation allows for device access in non-DTLS encryption mode even when DTLS is enabled and brings security risks. Af
ter the device goes online for the first time, disable this function to prevent security risks. Continue?[Y/N]:y
# 在AC上离线导入AP,并将AP加入AP组“ap-group1”中。假设AP的MAC地址为bc76-c55d-bc30,并且根据AP的部署位置为AP配置名称,便于从名称上就能够了解AP的部署位置。例如MAC地址为bc76-c55d-bc30的AP部署在1号区域,命名此AP为area_1。
ap auth-mode命令缺省情况下为MAC认证,如果之前没有修改其缺省配置,可以不用执行ap auth-mode mac-auth。
[AC] wlan
[AC-wlan-view] ap auth-mode mac-auth
[AC-wlan-view] ap-id 0 ap-mac bc76-c55d-bc30
[AC-wlan-ap-0] ap-name area_1
[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 configurations of the radio, Whether to continue? [Y/N]:y
[AC-wlan-ap-0] quit
# 将AP上电后,当执行命令display ap all查看到AP的“State”字段为“nor”时,表示AP正常上线。
[AC-wlan-view] display ap all
Total AP information:
nor : normal [1]
--------------------------------------------------------------------------------------------------------
ID MAC Name Group IP Type State STA Uptime
--------------------------------------------------------------------------------------------------------
0 bc76-c55d-bc30 area_1 ap-group1 10.23.100.254 AirEngine5762-12SW nor 0 10S
--------------------------------------------------------------------------------------------------------
Total: 1
在AC上配置802.1X认证
配置RADIUS认证参数。
# 创建RADIUS服务器模板
[AC-wlan-view] quit
[AC] radius-server template wlan-net
[AC-radius-wlan-net] radius-server authentication 10.23.103.1 1812
[AC-radius-wlan-net] radius-server accounting 10.23.103.1 1813
[AC-radius-wlan-net] radius-server shared-key cipher YsHsjx_202206
[AC-radius-wlan-net] quit
# 配置设备与RADIUS服务器通信的源IP地址
[AC] radius-server source ip-address 10.23.102.2
# 配置RADIUS授权服务器
[AC] radius-server authorization server-source ip-address 10.23.102.2
[AC] radius-server authorization 10.23.103.1 shared-key cipher YsHsjx_202206 server-group wlan-net
# 创建认证方案
[AC] aaa
[AC-aaa] authentication-scheme wlan-net
[AC-aaa-authen-wlan-net] authentication-mode radius
[AC-aaa-authen-wlan-net] quit
# 创建计费方案
[AC-aaa] accounting-scheme wlan-net
[AC-aaa-accounting-wlan-net] accounting-mode radius
[AC-aaa-accounting-wlan-net] quit
[AC-aaa] quit
配置802.1X接入模板,管理802.1X接入控制参数。
# 创建名为“wlan-net”的802.1X接入模板,配置认证方式为EAP中继模式。
[AC] dot1x-access-profile name wlan-net
[AC-dot1x-access-profile-wlan-net] dot1x authentication-method eap
[AC-dot1x-access-profile-wlan-net] quit
创建名为“wlan-net”的认证模板,并引用802.1X接入模板、RADIUS服务器模板、认证方案和计费方案。
[AC] authentication-profile name wlan-net
[AC-authentication-profile-wlan-net] dot1x-access-profile wlan-net
[AC-authentication-profile-wlan-net] radius-server wlan-net
[AC-authentication-profile-wlan-net] authentication-scheme wlan-net
[AC-authentication-profile-wlan-net] accounting-scheme wlan-net
[AC-authentication-profile-wlan-net] quit
配置WLAN业务参数。
# 创建名为“wlan-net”的安全模板,并配置安全策略。
[AC] wlan
[AC-wlan-view] security-profile name wlan-net
[AC-wlan-sec-prof-wlan-net] security wpa-wpa2 dot1x aes
[AC-wlan-sec-prof-wlan-net] quit
# 创建名为“wlan-net”的SSID模板,并配置SSID名称为“wlan-net”。
[AC-wlan-view] ssid-profile name wlan-net
[AC-wlan-ssid-prof-wlan-net] ssid wlan-net
[AC-wlan-ssid-prof-wlan-net] quit
# 创建名为“wlan-net”的VAP模板,配置业务数据转发模式为直接转发、业务VLAN,并且引用安全模板、认证模板和SSID模板。
[AC-wlan-view] vap-profile name wlan-net
[AC-wlan-vap-prof-wlan-net] forward-mode direct-forward
[AC-wlan-vap-prof-wlan-net] service-vlan vlan-id 101
[AC-wlan-vap-prof-wlan-net] security-profile wlan-net
[AC-wlan-vap-prof-wlan-net] authentication-profile wlan-net
[AC-wlan-vap-prof-wlan-net] ssid-profile wlan-net
[AC-wlan-vap-prof-wlan-net] quit
# 配置AP组引用VAP模板,AP上射频0和射频1都使用VAP模板“wlan-net”的配置。
[AC-wlan-view] ap-group name ap-group1
[AC-wlan-ap-group-ap-group1] vap-profile wlan-net wlan 1 radio 0
[AC-wlan-ap-group-ap-group1] vap-profile wlan-net wlan 1 radio 1
[AC-wlan-ap-group-ap-group1] quit
[AC-wlan-view] quit
配置认证成功后的授权参数ACL3002
[AC] acl 3002
[AC-acl-adv-3002] rule 5 permit ip destination 10.23.105.1 0
[AC-acl-adv-3002] rule 10 deny ip destination any
[AC-acl-adv-3002] quit
|
|