|
现在网络安全要求也越来越高了,一个局域网有时候也希望能够做到互相不能访问。我主要是给大家介绍一下在cisco的交换机上面如何来实现大家的需求。 在cisco 低端交换机中的实现方法:
1.通过端口保护(switchitchport protected)来实现的。
2.通过pvlan(private vlan 私有vlan)来实现.
主要操作如下:
相对来说cisco 3550或者2950交换机配置相对简单,进入网络接口配置模式:
switch(config)#int range f0/1 - 24 #同时操作f0/1到f0/24口可根据自己的需求来选择端口
switch(config-if-range)#switchitchport protected #开启端口保护
ok...到此为止,在交换机的每个接口启用端口保护,目的达到.
由于4500系列交换机不支持端口保护,可以通过pvlan方式实现。
主要操作如下:
首先建立second vlan 2个
switch(config)#vlan 101
switch(config-vlan)#private-vlan community
###建立vlan101 并指定此vlan为公共vlan
switch(config)vlan 102
switch(config-vlan)private-vlan isolated
###建立vlan102 并指定此vlan为隔离vlan
switch(config)vlan 200
switch(config-vlan)private-vlan primary
switch(config-vlan)private-vlan association 101
switch(config-vlan)private-vlan association add 102
###建立vlan200 并指定此vlan为主vlan,同时制定vlan101以及102为vlan200的second vlan
switch(config)#int vlan 200
switch(config-if)#private-vlan mapping 101,102
###进入vlan200 配置ip地址后,使second vlan101与102之间路由,使其可以通信
switch(config)#int f3/1
switch(config-if)#switchitchport private-vlan host-association 200 102
switch(config-if)#switchitchport private-vlan mapping 200 102
switch(config-if)#switchitchport mode private-vlan host
###进入接口模式,配置接口为pvlan的host模式,配置pvlan的主vlan以及second vlan,一定用102,102是隔离vlan
本贴来自天极网群乐社区--http://q.yesky.com/group/review-17617578.html |
|
|
|
|
|
|