
案例:如上图所示四台主机分别连接在交换机的0/0/5、0/0/6、0/0/7、0/0/8 端口,这四台主机都属于缺省vlan1。根据实际网络的需要,动态学习功能是打开的;主机1 保存有机密资料,任何与它不在一个物理分段的主机不能访问它;主机2 和主机3 分别与端口7 和9建立静态映射关系。
配置步骤如下:
1.设置主机1 的mac 地址00-01-11-11-11-11 为过滤地址;
switch(config)#mac-address-table blackhole address 00-01-11-11-11-11 vlan 1
2.主机2 和主机3 分别与端口7 和9 建立静态映射关系。
switch(config)#mac-address-table static address 00-01-22-22-22-22 vlan 1 interface ethernet 0/0/6
switch(config)#mac-address-table static address 00-01-33-33-33-33 vlan 1 interface ethernet 0/0/7