华为访问控制列表的配置

任务一:基本访问控制列表的配置

一、基础配置

RA:

<Huawei>sys

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

Huaweiundo info-center ena

Info: Information center is disabled.

Huaweisysn RA

RAint g0/0/0

RA-GigabitEthernet0/0/0ip add 192.168.1.254 24

RA-GigabitEthernet0/0/0int g0/0/1

RA-GigabitEthernet0/0/1ip add 192.168.2.254 24

RA-GigabitEthernet0/0/1int s1/0/0

RA-Serial1/0/0ip add 192.168.3.1 24

RA-Serial1/0/0qu

RAip route-static 192.168.4.0 24 192.168.3.2

RAqu

RB:

<Huawei>sys

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

Huaweiundo info-center ena

Info: Information center is disabled.

Huaweisysn RB

RBint g0/0/0

RB-GigabitEthernet0/0/0ip add 192.168.4.254 24

RB-GigabitEthernet0/0/0int s1/0/0

RB-Serial1/0/0ip add 192.168.3.2 24

RB-Serial1/0/0qu

RBip route-static 192.168.1.0 24 192.168.3.1

RBip route-static 192.168.2.0 24 192.168.3.1

RBqu

配置完成后,PC1、PC2都可以访问PC3。

二、基本访问控制列表配置

RB:

RBacl 2000 //基本访问控制列表编号为2000---2999

RB-acl-basic-2000rule deny source 192.168.2.0 0.0.0.255

RB-acl-basic-2000qu

RBint g0/0/0

RB-GigabitEthernet0/0/0traffic-filter outbound acl 2000

RB-GigabitEthernet0/0/0qu

配置完成后,只有PC1可以访问PC3,PC2不能访问PC3。

任务二:高级访问控制列表的配置

一、基本配置

RA:

<Huawei>sys

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

Huaweiundo info-center ena

Info: Information center is disabled.

Huaweisysn RA

RAint g0/0/0

RA-GigabitEthernet0/0/0ip add 192.168.1.254 24

RA-GigabitEthernet0/0/0int g0/0/1

RA-GigabitEthernet0/0/1ip add 192.168.2.254 24

RA-GigabitEthernet0/0/1int s1/0/0

RA-Serial1/0/0ip add 192.168.3.1 24

RA-Serial1/0/0qu

RAip route-static 192.168.4.0 24 192.168.3.2

RAqu

RB:

<Huawei>sys

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

Huaweiundo info-center ena

Info: Information center is disabled.

Huaweisysn RB

RBint g0/0/0

RB-GigabitEthernet0/0/0ip add 192.168.4.254 24

RB-GigabitEthernet0/0/0int s1/0/0

RB-Serial1/0/0ip add 192.168.3.2 24

RB-Serial1/0/0qu

RBip route-static 192.168.1.0 24 192.168.3.1

RBip route-static 192.168.2.0 24 192.168.3.1

RBqu

配置完成后,PC1、PC2都可以访问PC3。

二、高级访问控制列表的配置

RAacl 3000 //高级访问控制列表的编号为3000---3999

RA-acl-adv-3000rule deny tcp source 192.168.1.0 0.0.0.255 destination 192.168.

4.0 0.0.0.255 destination-port range 20 21 //拒绝FTP服务

RA-acl-adv-3000rule permit tcp source 192.168.1.0 0.0.0.255 destination 192.16

8.4.0 0.0.0.255 destination-port eq 80 //允许WEb服务

RA-acl-adv-3000rule deny ip

RA-acl-adv-3000qu

RAint g0/0/0

RA-GigabitEthernet0/0/0traffic-filter inbound acl 3000

RA-GigabitEthernet0/0/0qu

配置完成后PC1可以访问PC3的WEB服务,但不能访问FTP服务。PC2可以访问PC3的WEB和FTP服务。

相关推荐
xiaoye-duck1 小时前
《Linux 网络编程》深入理解 IP 协议(二):网段划分、私有 IP 与 NAT 地址转换
linux·网络·ip
传奇开心果编程2 小时前
【ArkUI 练中学】第15课:UI 界面设计与实战
学习·ui·华为·harmonyos
zx_741484812 小时前
【Linux入门】Shell 函数、正则表达式与文本处理:cut 与 awk
linux·运维·正则表达式
Zenova EdgeOS2 小时前
Linux dmesg 工业边缘实战:内核日志过滤、持久化与故障定位
linux·运维·边缘计算·工业边缘·dmesg·内核日志
wdfk_prog3 小时前
ROS教程08:从 TransportTCP::connect() 追到 TCPROS Connection Header、序列化与 Socket 数据传输
运维·缓存·docker·容器·ros
做运维的阿瑞3 小时前
Python 标准库汇总:分类速览与常用模块清单
linux·运维·python
广州宏帝箱包4 小时前
出口箱包的包装标准:防潮、防摔、运输安全的设计要点
大数据·网络
彧azz4 小时前
Linux 网络编程学习总结
linux·网络·笔记·学习·面试
日常筹谋记4 小时前
自动化仓储安全防护工况评估:明治传感器AS-33C技术适配性分析
大数据·运维·创业创新·业界资讯
updayday8545 小时前
离职域账号状态变更与Ping64操作记录核对
大数据·网络·数据库·安全·智能路由器