事的大概是这样的
房东(PC4)非常大方的将网络分享给了
甲(PC1)乙(PC2)丙(PC3)三个租客
开始总是美好的
结局总会有点悲伤
因为房东不想让租客甲访问他的电脑资源
先来看一看,美好的开始
SW1:
sysname sw1
#
vlan batch 11 to 13 100
#
interface Vlanif11
ip address 10.10.11.1 255.255.255.0
#
interface Vlanif12
ip address 10.10.12.1 255.255.255.0
#
interface Vlanif13
ip address 10.10.13.1 255.255.255.0
#
interface Vlanif100
ip address 10.10.100.1 255.255.255.0
#
interface MEth0/0/1
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 11
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 12
#
interface GigabitEthernet0/0/3
port link-type access
port default vlan 13
#
interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 11 to 13 100
SW2:
sysname sw2
#
vlan batch 11 to 13 100
#
interface Vlanif1
#
interface Vlanif100
ip address 10.10.100.2 255.255.255.0
#
interface MEth0/0/1
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 100
#
interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 11 to 13 100
#
虽然租客多,但是都很融洽,彼此保持交流
但
当租客甲让房东生气的那一刻
交流终止了
acl number 2000
rule 5 deny source 10.10.11.0 0.0.0.255
对租客甲的请求进行过滤拒绝
#
traffic classifier 1
if-match acl 2000
配置流分类1,匹配acl 2000
#
traffic behavior 2
deny
配置流行为2,动作为拒绝,匹配到source的报文就禁止通过
即发现有租客甲的请求立即让它回去
#
traffic policy 3
classifier 1 behavior 2
配置流策略3,将流策略和流行为关联
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 100
traffic-policy 3 outbound
在SW2的GE 0/0/1接口的出方向应用流策略3
当房东以风骚的手法完成这一犀利的操作之后
整体的画风就是下图这样
租客乙、租客丙和房东还是很和谐的
可怜的租客甲此刻正在想
房东难道戒了电脑都不开机了吗?