访问控制列表(ACL)相关配置


实验配置:
    一、所有路由器基本配置

    1、配置主机名
    R(config)#hostname ×××

    2、配置加密的使能口令(本实验未配置)
    R(config)#enable secret×××

    3、禁用DNS
    R(config)#no ip domain-lookup

    4、配置超时并显示同步
    R(config)#line console 0
    R(config_line)#exec-timeout 0 0
    R(config_line)logging synchronous



    二、使整个网络互通配置

    R1

    1、接口IP地址配置
    R1(config)#interface f0/0
    R1(config-if)#ip address 192.168.1.2 255.255.255.0
    R1(config-if)#no shutdown

    R1(config)#interface s1/0
    R1(config-if)#ip address 192.168.3.1 255.255.255.0
    R1(config-if)#no shutdown

    R1(config)#interface s1/0
    R1(conifg-if)#ip address 192.168.2.1 255.255.255.0
    R1(config-if)#no shutdown

    2、RIP路由配置
    R1(config)#router rip
    R1(config-router)#no auto-summary
    R1(config-router)#network 192.168.1.0
    R1(config-router)#network 192.168.2.0
    R1(config-router)#network 192.168.3.0

    R2

    1、接口IP地址配置
    R2(config)#interface f0/0
    R2(config-if)#ip address 10.10.1.2 255.0.0.0
    R2(config-if)#no shutdown

    R2(config)#interface s1/0
    R2(config-if)#ip address 192.168.4.1 255.255.255.0
    R2(config-if)#clock rate 64000
    R2(config-if)#no shutdown

    R2(config)#interface s1/1
    R2(config-if)#ip address 192.168.2.2 255.255.255.0
    R2(config-if)#clock rate 64000
    R2(config-if)#no shutdown

    2、RIP路由配置
    R2(config)#router rip
    R2(config-router)#no auto-summary
    R2(config-router)#network 10.0.0.0
    R2(config-router)#network 192.168.2.0
    R2(config-router)#network 192.168.4.0

    R3

    1、接口IP地址配置
    R3(config)#interface f0/0
    R3(config-if)#ip address 172.16.1.2 255.255.0.0
    R3(config-if)#no shutdown

    R3(config)#interface s1/0
    R3(config-if)#ip address 192.168.4.2 255.255.255.0
    R3(config-if)#no shutdown

    R3(config)#interface s1/1
    R3(config-if)#ip address 192.168.3.2 255.255.255.0
    R3(config-if)#clock rate 64000
    R3(config-if)#no shutdown

    2、RIP路由配置
    R3(config)#router rip
    R3(config-router)#no auot-summary
    R3(config-router)#network 172.16.0.0
    R3(config-router)#netwrok 192.168.3.0
    R3(config-router)#network 192.168.4.0

    三、实验要求配置

    (一)标准访问控制列表

    R1

    1、创建拒绝来自172.16.1.1流量的标准ACL
    R1(config)#access-list 1 deny host 172.16.1.1
    R1(config)#access-list 1 permit any

    2、将标准ACL应用到f0/0出口方向
    R1(config)#interface f0/0
    R1(config-if)#ip access-group 1 out

    (二)扩展访问控制列表

    注意:在开始做这个实验时,要先要no掉f0/0应用的标准ACL。命令如下:
    R1(config)#interface f0/0
    R1(config-if)#no ip access-group 1 out

    R1

    1、建立拒绝来自172.16.1.0去往192.168.1.0的www流量的扩展ACL
    R1(config)#access-list 101 deny tcp 172.16.1.0 0.0.0.255 192.168.1.0 0.0.0.255 eq 80
    R1(config)#access-list 101 permit any

    2、将扩展ACL应用到f0/0出口方向
    R1(config)#interface f0/0
    R1(config-if)#ip access-group 101 out




[本日志由 晓风残月 于 2011-05-13 09:57 AM 编辑]
文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags:
相关日志:
评论: 0 | 引用: 0 | 查看次数: -
发表评论
昵 称:
密 码: 游客发言不需要密码.
内 容:
验证码: 验证码
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.