ACL第一次实验

题目:

1、配置IP,这里将路由器当作PC端,由于路由器没有网关,我们给它手动添加一条缺省路由

       ip route-static 0.0.0.0 0.0.0.0 192.168.1.1

2、在R1和R2上预设登录的账号及密码

[r1]aaa
[r1-aaa]local-user huang privilege level 7 password ci
[r1-aaa]local-user huang privilege level 7 password cipher 2002

[r2]aaa
[r2-aaa]local-user meng privilege level 7 password ci	
[r2-aaa]local-user meng privilege level 7 password cipher 1009


//虚拟登录接口调用:
[r1]user	
[r1]user-interface vty 0 4
[r1-ui-vty0-4]aut	
[r1-ui-vty0-4]authentication-mode aaa

[r2]user
[r2]user-interface vty 0 4
[r2-ui-vty0-4]aut	
[r2-ui-vty0-4]authentication-mode aaa

3、 常见扩展ACL:由于扩展ACL精确匹配流量源、目地址,故调用时尽量靠近源头,避免资源浪费;(在R1的g0/0/0进行创建)

  1. PC1 可以telnet登录R1,不能ping 通R1;
    [r1]acl 3000	
    [r1-acl-adv-3000]rule deny icmp source 192.168.1.2 0.0.0.0 destination 192.168.1
    .1 0.0.0.0
    [r1-acl-adv-3000]rule deny icmp source 192.168.1.2 0.0.0.0 destination 192.168.
    2.10.0.0.0
    
    //接口调用ACL
    [r1]int g0/0/0
    [r1-GigabitEthernet0/0/0]traffic-filter inbound acl 3000

  2. PC1 可以ping 通R2,但不能登录R2
    [r1]acl 3001
    [r1-acl-adv-3001]rule deny tcp source 192.168.1.2 0.0.0.0 destination 192.168.2.
    2 0.0.0.0 destination-port eq 23
    [r1-acl-adv-3001]int g0/0/0
    [r1-GigabitEthernet0/0/0]traffic-filter inbound acl 3001 //需要删掉之前调用的ACL

  3. pc2 不可以telnet登录R1,但能ping 通R1;
    [r1]acl 3002
    [r1-acl-adv-3002]rule deny tcp source 192.168.1.3 0.0.0.0 destination 192.168.1.
    1 0.0.0.0 destination-port eq 23
    
    [r1-acl-adv-3002]int g0/0/0
    [r1-GigabitEthernet0/0/0]traffic-filter inbound acl 3002//需要删掉之前调用的ACL
    

  4. pc2 不可以ping 通R2,但能登录R2
    [r1]acl 3003
    [r1-acl-adv-3003]rule deny icmp source 192.168.1.3 0.0.0.0 destination 192.168.2
    .2 0.0.0.0
    [r1-acl-adv-3003]int g0/0/0
    [r1-GigabitEthernet0/0/0]traffic-filter inbound acl 3003//需要删掉之前调用的ACL

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值