实验1_配置标准IPv4 ACL

2024-06-19 04:52
文章标签 配置 实验 ipv4 标准 acl

本文主要是介绍实验1_配置标准IPv4 ACL,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

1、实验目的

通过本实验可以掌握:

  • IPv4 ACL工作方式和工作过程
  • 定义编号和命名的标准IPv4 ACL的方法
  • 接口和VTY下应用标准IPv4 ACL的方法

2、实验拓扑

配置IPv4 ACL的实验拓扑如图9-2所示

        配置 ACL 实验拓扑如下图所示。本实验中,通过配置标准 ACL 实现拒绝 PC2 所在网段访问 Server1,同时只允许主机 PC1 访问路由器 R1、R2 和 R3 的 Telnet 服务,实现对路由器进行远程管理。整个网络配置RIPv2路由协议保证 IP 的连通性。

3、实验步骤

(1)配置路由器R1

R1(config)#router rip 
R1(config-router)#version 2  
R1(config-router)#no auto-summary 
R1(config-router)#network 172.16.0.0
R1(config-router)#passive-interface ethernet 0/0
R1(config-router)#passive-interface ethernet 0/1
R1(config-router)#exit
R1(config)#access-list 2 remark ONLY HOST PC CAN TELNET
R1(config)#access-list 2 permit host 172.16.1.100
R1(config)#line vty 0 4
R1(config-line)#access-class 2 in 
R1(config-line)#password cisco123
R1(config-line)#privilege level 15
R1(config-line)#login 
R1(config-line)#exit

(2)配置路由器R2

R2(config)#router rip 
R2(config-router)#version 2
R2(config-router)#no auto-summary 
R2(config-router)#network 172.16.0.0
R2(config-router)#exit
R2(config)#access-list 2 remark ONLY HOST PC1 CAN TELENT
R2(config)#access-list 2 permit host 172.16.1.100
R2(config)#line vty 0 4
R2(config-line)#access-class 2 in
R2(config-line)#password cisco
R2(config-line)#privilege level 15
R2(config-line)#login 
R2(config-line)#exit

(3)配置路由器R3

R3(config)#router rip
R3(config-router)#version 2
R3(config-router)#no auto-summary 
R3(config-router)#network 172.16.0.0
R3(config-router)#passive-interface ethernet 0/0
R3(config-router)#exit
R3(config)#access-list 2 remark ONLY HOST PC1 CAN TELENT
R3(config)#access-list 2 permit host 172.16.1.100
R3(config)#access-list 1 remark DENY NETWORK 172.16.2.0 FROM R1
R3(config)#access-list 1 deny 172.16.2.0 0.0.0.255 log
R3(config)#access-list 1 permit any 
R3(config)#interface ethernet 0/0
R3(config-if)#ip access-group 1 out 
R3(config-if)#exit
R3(config)#line vty 0 4
R3(config-line)#access-class 2 in
R3(config-line)#password cisco
R3(config-line)#privilege level 15
R3(config-line)#login
R3(config-line)#exit

4、实验调试

(1)Telent测试

        除了PC1主机上Telnet路由器的各个接口地址可以成功外,以其它地址为源Telnet各个路由器都不能成功,显示如如下

% Connection refused by remote host

(2)ping测试

在路由器R1上ping主机172.16.3.100,结果如下

R1#ping 172.16.3.100
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.3.100, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 18/19/20 ms
##以上输出表明使用标准ping命令,可以ping通,因为标准ping命令是以路由器R1的s2/1接口发出的,没有被R3上的IPv4 ACL拒绝
R1#ping 172.16.3.100 source 172.16.1.254
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.3.100, timeout is 2 seconds:
Packet sent with a source address of 172.16.1.254 
UUUU

(3)查看定义的IPv4 ACL及流量匹配情况

R3#show ip access-lists 
Standard IP access list 110 deny   172.16.2.0, wildcard bits 0.0.0.255 log20 permit any (10 matches)
Standard IP access list 210 permit 172.16.1.100

(4)查看IPv4 ACL应用情况

R3#show ip interface ethernet 0/0
Ethernet0/0 is up, line protocol is upInternet address is 172.16.3.254/24Broadcast address is 255.255.255.255

这篇关于实验1_配置标准IPv4 ACL的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1074065

相关文章

MySQL zip安装包配置教程

《MySQLzip安装包配置教程》这篇文章详细介绍了如何使用zip安装包在Windows11上安装MySQL8.0,包括下载、解压、配置环境变量、初始化数据库、安装服务以及更改密码等步骤,感兴趣的朋... 目录mysql zip安装包配置教程1、下载zip安装包:2、安装2.1 解压zip包到安装目录2.2

MySQL 中的服务器配置和状态详解(MySQL Server Configuration and Status)

《MySQL中的服务器配置和状态详解(MySQLServerConfigurationandStatus)》MySQL服务器配置和状态设置包括服务器选项、系统变量和状态变量三个方面,可以通过... 目录mysql 之服务器配置和状态1 MySQL 架构和性能优化1.1 服务器配置和状态1.1.1 服务器选项

SpringBoot+MyBatis-Flex配置ProxySQL的实现步骤

《SpringBoot+MyBatis-Flex配置ProxySQL的实现步骤》本文主要介绍了SpringBoot+MyBatis-Flex配置ProxySQL的实现步骤,文中通过示例代码介绍的非常详... 目录 目标 步骤 1:确保 ProxySQL 和 mysql 主从同步已正确配置ProxySQL 的

Spring Boot整合log4j2日志配置的详细教程

《SpringBoot整合log4j2日志配置的详细教程》:本文主要介绍SpringBoot项目中整合Log4j2日志框架的步骤和配置,包括常用日志框架的比较、配置参数介绍、Log4j2配置详解... 目录前言一、常用日志框架二、配置参数介绍1. 日志级别2. 输出形式3. 日志格式3.1 PatternL

配置springboot项目动静分离打包分离lib方式

《配置springboot项目动静分离打包分离lib方式》本文介绍了如何将SpringBoot工程中的静态资源和配置文件分离出来,以减少jar包大小,方便修改配置文件,通过在jar包同级目录创建co... 目录前言1、分离配置文件原理2、pom文件配置3、使用package命令打包4、总结前言默认情况下,

VScode连接远程Linux服务器环境配置图文教程

《VScode连接远程Linux服务器环境配置图文教程》:本文主要介绍如何安装和配置VSCode,包括安装步骤、环境配置(如汉化包、远程SSH连接)、语言包安装(如C/C++插件)等,文中给出了详... 目录一、安装vscode二、环境配置1.中文汉化包2.安装remote-ssh,用于远程连接2.1安装2

Redis多种内存淘汰策略及配置技巧分享

《Redis多种内存淘汰策略及配置技巧分享》本文介绍了Redis内存满时的淘汰机制,包括内存淘汰机制的概念,Redis提供的8种淘汰策略(如noeviction、volatile-lru等)及其适用场... 目录前言一、什么是 Redis 的内存淘汰机制?二、Redis 内存淘汰策略1. pythonnoe

windos server2022的配置故障转移服务的图文教程

《windosserver2022的配置故障转移服务的图文教程》本文主要介绍了windosserver2022的配置故障转移服务的图文教程,以确保服务和应用程序的连续性和可用性,文中通过图文介绍的非... 目录准备环境:步骤故障转移群集是 Windows Server 2022 中提供的一种功能,用于在多个

windos server2022里的DFS配置的实现

《windosserver2022里的DFS配置的实现》DFS是WindowsServer操作系统提供的一种功能,用于在多台服务器上集中管理共享文件夹和文件的分布式存储解决方案,本文就来介绍一下wi... 目录什么是DFS?优势:应用场景:DFS配置步骤什么是DFS?DFS指的是分布式文件系统(Distr

关于Maven中pom.xml文件配置详解

《关于Maven中pom.xml文件配置详解》pom.xml是Maven项目的核心配置文件,它描述了项目的结构、依赖关系、构建配置等信息,通过合理配置pom.xml,可以提高项目的可维护性和构建效率... 目录1. POM文件的基本结构1.1 项目基本信息2. 项目属性2.1 引用属性3. 项目依赖4. 构