訪問控制列表(ACL)相關配置

1.所有的路由器配置
    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

 
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章