news 2026/7/10 7:05:21

华为访问控制列表的配置

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
华为访问控制列表的配置

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

一、基础配置

RA:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]undo info-center ena
Info: Information center is disabled.
[Huawei]sysn RA
[RA]int g0/0/0
[RA-GigabitEthernet0/0/0]ip add 192.168.1.254 24
[RA-GigabitEthernet0/0/0]int g0/0/1
[RA-GigabitEthernet0/0/1]ip add 192.168.2.254 24
[RA-GigabitEthernet0/0/1]int s1/0/0
[RA-Serial1/0/0]ip add 192.168.3.1 24
[RA-Serial1/0/0]qu
[RA]ip route-static 192.168.4.0 24 192.168.3.2
[RA]qu
RB:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]undo info-center ena
Info: Information center is disabled.
[Huawei]sysn RB
[RB]int g0/0/0
[RB-GigabitEthernet0/0/0]ip add 192.168.4.254 24
[RB-GigabitEthernet0/0/0]int s1/0/0
[RB-Serial1/0/0]ip add 192.168.3.2 24
[RB-Serial1/0/0]qu
[RB]ip route-static 192.168.1.0 24 192.168.3.1
[RB]ip route-static 192.168.2.0 24 192.168.3.1
[RB]qu

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

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

RB:

[RB]acl 2000 //基本访问控制列表编号为2000---2999
[RB-acl-basic-2000]rule deny source 192.168.2.0 0.0.0.255
[RB-acl-basic-2000]qu
[RB]int g0/0/0
[RB-GigabitEthernet0/0/0]traffic-filter outbound acl 2000
[RB-GigabitEthernet0/0/0]qu

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

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

一、基本配置

RA:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]undo info-center ena
Info: Information center is disabled.
[Huawei]sysn RA
[RA]int g0/0/0
[RA-GigabitEthernet0/0/0]ip add 192.168.1.254 24
[RA-GigabitEthernet0/0/0]int g0/0/1
[RA-GigabitEthernet0/0/1]ip add 192.168.2.254 24
[RA-GigabitEthernet0/0/1]int s1/0/0
[RA-Serial1/0/0]ip add 192.168.3.1 24
[RA-Serial1/0/0]qu
[RA]ip route-static 192.168.4.0 24 192.168.3.2
[RA]qu
RB:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]undo info-center ena
Info: Information center is disabled.
[Huawei]sysn RB
[RB]int g0/0/0
[RB-GigabitEthernet0/0/0]ip add 192.168.4.254 24
[RB-GigabitEthernet0/0/0]int s1/0/0
[RB-Serial1/0/0]ip add 192.168.3.2 24
[RB-Serial1/0/0]qu
[RB]ip route-static 192.168.1.0 24 192.168.3.1
[RB]ip route-static 192.168.2.0 24 192.168.3.1
[RB]qu

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

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

[RA]acl 3000 //高级访问控制列表的编号为3000---3999
[RA-acl-adv-3000]rule 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-3000]rule 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-3000]rule deny ip
[RA-acl-adv-3000]qu
[RA]int g0/0/0
[RA-GigabitEthernet0/0/0]traffic-filter inbound acl 3000
[RA-GigabitEthernet0/0/0]qu
配置完成后PC1可以访问PC3的WEB服务,但不能访问FTP服务。PC2可以访问PC3的WEB和FTP服务。

版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/7/10 0:36:41

快速验证创意:用快马1小时做出JSON转Excel的MVP产品

快速体验 打开 InsCode(快马)平台 https://www.inscode.net输入框内输入如下内容&#xff1a; 构建一个JSON转Excel的MVP产品原型&#xff0c;包含核心功能&#xff1a;1. 用户注册/登录 2. JSON文件上传 3. 转换配置选项 4. Excel下载 5. 转换历史记录。使用Next.js前端和Fir…

作者头像 李华
网站建设 2026/7/10 12:29:40

Typst文件嵌入终极指南:从入门到精通

Typst文件嵌入终极指南&#xff1a;从入门到精通 【免费下载链接】typst A new markup-based typesetting system that is powerful and easy to learn. 项目地址: https://gitcode.com/GitHub_Trending/ty/typst 在Typst文档创作中&#xff0c;文件嵌入技术是实现文档模…

作者头像 李华
网站建设 2026/7/10 11:03:50

前端下载文件的 “72变”

在现代 Web 开发中&#xff0c;文件下载是高频交互需求之一&#xff0c;涵盖静态资源获取、动态数据导出、跨域文件获取等多种场景。不同场景下&#xff0c;前端需选择适配的下载方案以兼顾兼容性、用户体验和功能需求。 一、基础原生方法&#xff1a;适合简单静态资源下载 此…

作者头像 李华