acl协议实验

在这里插入图片描述

代码

R1 [Huawei]acl 3000 [Huawei-acl-adv-3000]rule deny ip source
192.168.1.1 0.0.0.0 destination 12.0.0. 2 0.0.0.0 [Huawei-acl-adv-3000]rule deny tcp source 192.168.1.2 0.0.0.0 des
[Huawei-acl-adv-3000]rule deny tcp source 192.168.1.2 0.0.0.0
destination 12.0.0 .2 0.0.0.0 destination-port eq telnet
[Huawei-GigabitEthernet0/0/0]traffic-filter inbound acl 3000
R2
[Huawei]user-interface vty 0 4 [Huawei-ui-vty0-4]authentication-mode
aaa [Huawei-ui-vty0-4]q [Huawei]aaa [Huawei-aaa]local-user huawei
password cipher 123456 Info: Add a new user.
R3
[Huawei]ip route-static 0.0.0.0 0 192.168.1.254
R4
[Huawei]ip route-static 0.0.0.0 0 192.168.1.254

结果

PC1.

ping 12.0.0.2 PING 12.0.0.2: 56 data bytes, press CTRL_C to
break
Request time out
Request time out
Request time out
Request time out
Request time out

— 12.0.0.2 ping statistics —
5 packet(s) transmitted
0 packet(s) received
100.00% packet loss

PC2:

ping 12.0.0.2 PING 12.0.0.2: 56 data bytes, press CTRL_C to
break
Reply from 12.0.0.2: bytes=56 Sequence=1 ttl=254 time=80 ms
Reply from 12.0.0.2: bytes=56 Sequence=2 ttl=254 time=40 ms
Reply from 12.0.0.2: bytes=56 Sequence=3 ttl=254 time=50 ms
Reply from 12.0.0.2: bytes=56 Sequence=4 ttl=254 time=40 ms
Reply from 12.0.0.2: bytes=56 Sequence=5 ttl=254 time=40 ms

— 12.0.0.2 ping statistics —
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 40/50/80 ms telnet 12.0.0.2 Press CTRL_] to quit telnet mode Trying 12.0.0.2 … Error: Can’t
connect to the remote host

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值