在华为ENSP中进行ACL网络标准访问控制和扩展访问控制

实验目的:

•理解基本和扩展访问控制列表应用场景;

•掌握标准访问控制列表的配置方法;

•掌握扩展访问控制列表的配置方法;

•掌握基于名称的访问列表的配置方法。

实验拓扑图:

实验拓扑图如上所示,一共有一个路由器三个客户机。

基础ip配置

接下来进行三个客户端的配置,所有的ip地址都标在了拓扑图上:

第一个客户机ip为192.168.2.2,网关为192.168.2.254,为此客户机对应路由器的接口的ip地址,会在接下来路由器的配置中进行再次设置.域名服务器设置为另一台客户机服务器。

剩下两台的服务器的网关都设置该网段的最后一位也就是末尾是254最为服务器,这里传输http协议的文件如下所示:

文件是自己随意建立的,大家也可随便设置一个文件。

路由器的基础ip配置:

把靠近各自主机的端口都配置为主机的网关,这样可以保证各个主机可以相互访问。

主机访问测试:

Clent1 可以访问获取http的数据,也可以进行ping操作,如下:

PC1可以访问clent1也可访问sever1,如下所示:

acl标准配置:

此次的目的是让PC1可以ping通客户端 但是不能ping通服务器:

这里我们设置两个ACL,一个是准许192.168.0.2通过 一个是不准许通过,然后在两个节点上分别执行两个语句,就可以达到我们的效果。执行语句如下:

上图所示,我们希望PC1可以访问clent1 所以在clent的那个节点执行ACL2002 也就是准许的控制,同理我们在sever执行deny 也就是拒绝访问。

结果演示

如上所示,我们可以访问clent1 但是不能访问sever 实验成功。

我们进行抓包分析可以得到,请求是没有回应的。

扩展ACL

我们的目的是让clent不能ping通服务器,但是可以访问服务器的www,也就是可以使用http协议进行访问。

我们首先取消ACL2001和ACL2002 :

然后进扩展ACL的配置:

In the same way, we set up an acl3001 and set two rules at the same time. One rule is to allow the tcp protocol to pass, that is, to allow access through http, and the second rule is to not allow the ICMP protocol to access, that is, we cannot ping.

Verify the results, we use clent1 to access and find that we can get http data, but there is no way to get ping data:

Then we perform packet capture analysis:

It can be seen that ICMP did not respond four times, and the experiment was successful.

ACL is a very interesting experiment that can precisely control network access. After this experiment, I understand the interestingness of the network. 

Guess you like

Origin blog.csdn.net/weixin_53665577/article/details/128892351