現在網絡安全要求也越來越高了,一個區域網路有時候也希望能夠做到互相不能通路。我主要是給大家介紹一下在cisco的交換機上面如何來實作大家的需求。
在cisco 低端交換機中的實作方法:
1.通過端口保護(switchitchport protected)來實作的。
2.通過pvlan(private vlan 私有vlan)來實作.
主要操作如下:
相對來說cisco 3550或者2950交換機配置相對簡單,進入網絡接口配置模式:
switch(c range f0/1 - 24 #同時操作f0/1到f0/24口可根據自己的需求來選擇端口
switch(c protected #開啟端口保護
ok...到此為止,在交換機的每個接口啟用端口保護,目的達到.
由于4500系列交換機不支援端口保護,可以通過pvlan方式實作。
首先建立sec vlan 2個
switch(c 101
switch(c community
###建立vlan101 并指定此vlan為公共vlan
switch(c 102
switch(c isolated
###建立vlan102 并指定此vlan為隔離vlan
switch(c 200
switch(c primary
switch(c association 101
switch(c association add 102
###建立vlan200 并指定此vlan為主vlan,同時制定vlan101以及102為vlan200的sec vlan
switch(c vlan 200
switch(c mapping 101,102
###進入vlan200 配置ip位址後,使sec vlan101與102之間路由,使其可以通信
switch(c f3/1
switch(c private-vlan host-association 200 102
switch(c private-vlan mapping 200 102
switch(c mode private-vlan host
###進入接口模式,配置接口為pvlan的host模式,配置pvlan的主vlan以及sec vlan,一定用102,102是隔離vlan
至此,配置結束,經過實驗檢測,各個端口之間不能通信,但都可以與自己的網關通信。
注:cisco網站上的配置執行個體好像不能按照此方式使用,隻是啟用隔離而不能與本vlan的網關通信。按照cisco網站上的配置,private vlan不能up。如果有多個vlan要進行pvlan配置,sec vlan必須要相應的增加,一個vlan隻能在private vlan下作為 sec vlan。
本文轉自CC部落格51CTO部落格,原文連結http://blog.51cto.com/levelive/5885如需轉載請自行聯系原作者
刀博士