HCIA ACL基础配置以及拓展配置

实验要求:

1.pc1不能ping通pc2,但是pc2可以ping通pc1

2.r1可以ping通r3,但不能登陆r3

3.r3可以登陆r1,但不能ping通r1

给pc机手动配置静态IP

pc1:192.168.1.2

pc2: 192.168.2.2

pc3: 192.168.3.2

 

实验步骤:

1.pc1不能ping通pc2,但是pc2可以ping通pc1

方法一

在r1上面干掉过去的流量,使r1ping不通r2,r2ping通r1

[r1]acl 3000

[r1-acl-adv-3000]rule deny icmp source 192.168.1.2 0.0.0.0 destination 192.168.2.2 0.0.0.0 icmp-type echo

[r1-acl-adv-3000]rule permit ip source any destination any

[r1]interface g0/0/1

[r1-GigabitEthernet0/0/1]traffic-filter inbound acl 3000

pc1 ping不通 pc2

pc2 可以ping通 pc1

方法二

在r2上面干掉回来的流量,使r1ping不通r2,r2ping通r1

[r2]acl 3000

[r2-acl-adv-3000]rule deny icmp source 192.168.2.2 0.0.0.0 destination 192.168.1.2 0.0.0.0 icmp-type echo-reply

[r2-acl-adv-3000]rule permit ip source any destination any

[r2]interface g0/0/2

[r2-GigabitEthernet0/0/2]traffic-filter inbound acl 3000

pc1 ping不通 pc2

pc2 可以ping通 pc1

 

2.r1可以ping通r3,但不能登陆r3

在r3上打开远程登录并授权

[r3]aaa

[r3-aaa]local-user xx privilege level 15 password cipher yy

(没有限制之前r1 r3既可以ping通,也可以在r1上远程登录r3)

r1 ping r3

r1远程登录r3

 

干掉远程登录,靠近源靠近目标(靠近r1 r3 即在r2上配置)

[r2]acl 3000

[r2-acl-adv-3000]rule deny tcp source 12.1.1.1 0.0.0.0 destination 23.1.1.2 0.0.0.0 destination-port eq telnet

[r2-acl-adv-3000]rule permit ip source any destination any

[r2]interface g0/0/0

[r2-GigabitEthernet0/0/0]traffic-filter inbound acl 3000

 

r1不能远程登录r3

 

3.r3可以登陆r1,但不能ping通r1

在r1上面打开远程登录

[r1]aaa

[r1-aaa]local-user xx privilege level 15 password cipher yy

再r2上面干掉r3去往r1的流量,使r3不能ping通r1

[r2]acl 3001

[r2-acl-adv-3001]rule deny icmp source 23.1.1.2 0.0.0.0 destination 12.1.1.1 0.0.0.0 icmp-type echo

[r2-acl-adv-3001]rule permit ip source any destination any

[r2]interface g0/0/1

[r2-GigabitEthernet0/0/1]traffic-filter inbound acl 3001

r3不能ping通r1

r3可以远程登录r1

 

实验完成

 

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值