vacl

好长时间没弄交换,一次无意中想到的VACL,

就给点基于,

在有写工程中要求在同个VLAN 用户直接的互访的问题,就稍微做个事例:

               VI:10.1.1.10

PC1------SW---------PC2

10.1.1.1                       10.1.1.2

sw:

conf t

vlan 10

name vlan10

exit

inter vlan 10

ip add 10.1.1.10 255.255.255.0

no sh

inter vlan 10

vlan access-group ccnp 10 //创建VACL

match ip add 101 //匹配ACL101

action forward //动作:放行匹配流量

exit

vlan access-group ccnp 20

action drop  //其他流量全部丢弃

exit

vlan filter ccnp vlan-list 10 //把VACL应用到VLAN 10

access-list 101 permit icmp host 10.1.1.1 any echo

access-list 101 permit icmp any host 10.1.1.1 echo-reply

exit

结果:PC1可以PING SW,PC2,而SW,不能PING PC1,PC2,;

 

 

 

你可能感兴趣的:(职场,sw,休闲,VCL)