ACL练习题

题目如图:

先配置IP,以及AR1、AR2启动telnet服务:

在AR1添加ACL 3000并在GE0/0/1入口注册启用:

[R1]display acl 3000
Advanced ACL 3000, 6 rules
Acl's step is 5
 rule 5 deny icmp source 192.168.1.1 0 destination 192.168.1.3 0 
 rule 10 deny icmp source 192.168.1.1 0 destination 192.168.2.1 0 (5 matches)
 rule 15 deny tcp source 192.168.1.1 0 destination 192.168.2.2 0 destination-por
t eq telnet (5 matches)
 rule 20 deny tcp source 192.168.1.2 0 destination 192.168.1.3 0 destination-por
t eq telnet 
 rule 25 deny tcp source 192.168.1.2 0 destination 192.168.2.1 0 destination-por
t eq telnet 
 rule 30 deny icmp source 192.168.1.2 0 destination 192.168.2.2 0 

测试结果:

PC1:

<Pc1>ping 192.168.2.2
  PING 192.168.2.2: 56  data bytes, press CTRL_C to break
    Reply from 192.168.2.2: bytes=56 Sequence=1 ttl=254 time=140 ms
    Reply from 192.168.2.2: bytes=56 Sequence=2 ttl=254 time=170 ms
    Reply from 192.168.2.2: bytes=56 Sequence=3 ttl=254 time=80 ms

  --- 192.168.2.2 ping statistics ---
    3 packet(s) transmitted
    3 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 80/130/170 ms

<Pc1>ping 192.168.2.1
  PING 192.168.2.1: 56  data bytes, press CTRL_C to break
    Request time out
    Request time out
    Request time out
    Request time out

  --- 192.168.2.1 ping statistics ---
    4 packet(s) transmitted
    0 packet(s) received
    100.00% packet loss


<Pc1>telnet 192.168.2.1
Trying 192.168.2.1 ...
Press CTRL+K to abort
Connected to 192.168.2.1 ...

Login authentication


Username:

  Configuration console exit, please retry to log on

Info: The connection was closed by the remote host.
<Pc1>telnet 192.168.2.2
Trying 192.168.2.2 ...
Press CTRL+K to abort

——————————----------------------------------------------------------------
PC2:

<Pc2>ping 192.168.2.1
  PING 192.168.2.1: 56  data bytes, press CTRL_C to break
    Reply from 192.168.2.1: bytes=56 Sequence=1 ttl=255 time=80 ms
    Reply from 192.168.2.1: bytes=56 Sequence=2 ttl=255 time=70 ms
    Reply from 192.168.2.1: bytes=56 Sequence=3 ttl=255 time=100 ms
    Reply from 192.168.2.1: bytes=56 Sequence=4 ttl=255 time=140 ms

  --- 192.168.2.1 ping statistics ---
    4 packet(s) transmitted
    4 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 70/97/140 ms

<Pc2>ping 192.168.2.2
  PING 192.168.2.2: 56  data bytes, press CTRL_C to break
    Request time out
    Request time out
    Request time out
    Request time out

  --- 192.168.2.2 ping statistics ---
    4 packet(s) transmitted
    0 packet(s) received
    100.00% packet loss

<Pc2>telnet 192.168.2.2
Trying 192.168.2.2 ...
Press CTRL+K to abort
Connected to 192.168.2.2 ...

Login authentication


Username:

  Configuration console exit, please retry to log on

Info: The connection was closed by the remote host.
<Pc2>telnet 192.168.2.1
Trying 192.168.2.1 ...
Press CTRL+K to abort

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值