cisco switch 3560 config



//不加HOST表示 就是要用子网掩码 写.


//---------------------------------------------------------------------------------------
//显示IP控制列表
L3SW01#    show ip access-lists                      
Extended IP access list To_Server
    10 permit ip 172.16.0.0 0.0.1.255 192.168.1.0 0.0.0.255 (60 matches)
    20 permit ip 172.16.2.0 0.0.1.255 192.168.1.0 0.0.0.255
    30 deny ip 172.16.0.0 0.0.255.255 192.168.1.0 0.0.0.255 (5000 matches)
    40 permit ip any any (5161 matches)
//配置终端
L3SW01#    configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z.
//进入特权模式
L3SW01(config)#     ip access-list extended To_Server  
//禁止IP 172.16.1.186  访问  192.168.1.173   注意ID号是多少
L3SW01(config-ext-nacl)#     6  deny ip  host 172.16.1.186  host  192.168.1.173  


//禁止IP 172.16.0.0 /16   访问  192.168.1.0/24  
L3SW01(config-ext-nacl)#   6 deny ip 172.16.0.0     0.0.255.255 192.168.1.0      0.0.0.255


exit //退出
--------------当要删除某条策略的做法-------------------------------------------------------
L3SW01#    show ip access-lists    
Extended IP access list To_Server
    6 deny ip host 172.16.1.186 host 192.168.1.173 (87 matches)
    10 permit ip 172.16.0.0 0.0.1.255 192.168.1.0 0.0.0.255 (278 matches)
    20 permit ip 172.16.2.0 0.0.1.255 192.168.1.0 0.0.0.255 (8 matches)
    30 deny ip 172.16.0.0 0.0.255.255 192.168.1.0 0.0.0.255 (1177 matches)
    40 permit ip any any (3109 matches)
  //配置终端
L3SW01#    configure terminal 
//进入特权模式
L3SW01(config)#     ip access-list extended To_Server  
//进入特权模式后 输入 no + id 号即可
L3SW01(config-ext-nacl)#    no 6
// exit
L3SW01(config)#    exit

你可能感兴趣的:(cisco switch 3560 config)