□李 永
兩層隔離技術(shù)是PVLAN技術(shù)實(shí)施的特有技術(shù)配置部署優(yōu)勢,通過配置部署該技術(shù),實(shí)現(xiàn)上層VLAN部署在局域網(wǎng)中全局可見,而下層VLAN部署可以實(shí)現(xiàn)VLAN之間或VLAN內(nèi)部主機(jī)之間的相互隔離。
(一)PVLAN類型。一是主VLAN:PVLAN的一級VLAN。二是隔離VLAN(isolated VLAN):PVLAN二級VLAN,同一個(gè)PVLAN部署時(shí)只允許部署一個(gè)該類型的二級VLAN。三是團(tuán)體VLAN(community VLAN):PVLAN的二級VLAN,同一個(gè)PVLAN部署時(shí)允許部署多個(gè)該類型的二級VLAN.
(二)PVLAN接口類型。一是Isolated port:該類型接口配置時(shí)只能和promiscuous類型接口的終端用戶實(shí)施數(shù)據(jù)通信。二是community port:該類型接口之間可以進(jìn)行數(shù)據(jù)通信,也可以和promiscuous類型接口的終端用戶進(jìn)行數(shù)據(jù)通信,適用于同組內(nèi)終端用戶的相互數(shù)據(jù)通信。三是promiscuous port:該類型接口用于上連接口,可以和PVLAN內(nèi)部的所有端口上的終端用戶進(jìn)行數(shù)據(jù)通信。
(三)PVLAN數(shù)據(jù)通信規(guī)則。一是primary VLAN:與之關(guān)聯(lián)的所有isolated VLAN,community VLAN內(nèi)的終端用戶進(jìn)行數(shù)據(jù)通信。二是community VLAN:與之處于相同community VLAN內(nèi)的community port終端用戶通信,也可以與PVLAN中的promiscuous端口通信。三是isolated VLAN:不能與處于相同isolated VLAN內(nèi)的其它isolated port的終端用戶進(jìn)行數(shù)據(jù)通信,但可以與promiscuous端口的終端用戶進(jìn)行數(shù)據(jù)通信。
(四)配置命令。
配置PVLANs。
Switch(config-vlan)#private-vlan [primary | isolated | community]
Switch(config-vlan)#private-vlan association {secondary_vlan_list| add svl | remove svl}
Switch#show vlan private-vlan type
配置PVLAN端口。
Switch(config-if)#switchport mode private-vlan {host | promiscuous}
Switch(config-if)#switchport private-vlan host-associationprimary_vlan_IDsecondary_vlan_ID}
Switch(config-if)#private-vlan mappingprimary_vlan_ID{secondary_vlan_list| add svl | remove svl}
Switch#show interfaces private-vlan mapping
(一)南京技師學(xué)院宿舍生活區(qū)域設(shè)計(jì)要求。一是網(wǎng)絡(luò)配置部署能給處在共同子網(wǎng)內(nèi)的設(shè)備之間提供更高的安全性。二是網(wǎng)絡(luò)配置部署應(yīng)嚴(yán)禁避免接入層交換機(jī)的設(shè)備之間的互聯(lián)互通。三是網(wǎng)絡(luò)配置部署時(shí)需要內(nèi)部隔離部分終端用戶設(shè)備,隔離的設(shè)備之間嚴(yán)禁進(jìn)行數(shù)據(jù)通信。四是網(wǎng)絡(luò)配置部署方案中,應(yīng)按照網(wǎng)絡(luò)角色要求讓某些設(shè)備聯(lián)通,而讓它們和其他設(shè)備不能相互通信。五是使用專有的借口映射技術(shù),實(shí)現(xiàn)與該VLAN之外的VLAN進(jìn)行數(shù)據(jù)通信。圖1給出南京技師學(xué)院宿舍生活區(qū)域網(wǎng)絡(luò)結(jié)構(gòu)圖。
圖1 南京技師學(xué)院宿舍生活區(qū)域網(wǎng)絡(luò)結(jié)構(gòu)圖
(二)關(guān)鍵設(shè)備的配置部署。
Sw1(config)#vlan 50
Sw1(config-vlan)#private-vlan primary
Sw1(config-vlan)#vlan 500
Sw1(config-vlan)#private-vlan isolated
Sw1(config-vlan)#vlan 501
Sw1(config-vlan)#privated-vlan community
Sw1(config-vlan)#vlan 50
Sw1(config-vlan)#privated-vlan association 500,501
Sw1(config-vlan)#interface range fa3/1-2
Sw1(config-if)#switchport
Sw1(config-if)#switchport mode private-vlan host
Sw1(config-if)#switchport mode private-vlan host-association 50 500
Sw1(config-if)#no shutdown
Sw1(config-if)#interface range fa3/46, fa3/48
Sw1(config-if)#switchport
Sw1(config-if)#switchport mode private-vlan host
Sw1(config-if)#switchport mode private-vlan host-association 50 501
Sw1(config-if)#no shutdown
Sw1(config-if)#interface g1/2
Sw1(config-if)#switchport
Sw1(config-if)#switchport mode private-vlan promiscuous
Sw1(config-if)#switchport mode private-vlan mapping 50 500,501
Sw1(config-if)#no shutdown
Sw1(config-if)#interface vlan 50
Sw1(config-if)#ip address 172.16.90.253
Sw1(config-if)# private-vlan mapping 50 500,501
Sw1(config-if)#no shutdown
Sw1(config-if)#end
Sw1#copy running-config startup-config
專用VLAN技術(shù)解決了多個(gè)VLAN和IP子網(wǎng)隔離二層數(shù)據(jù)通信安全連接的弊端。PVLAN中的終端可以直接部署到PVLAN網(wǎng)絡(luò)中,達(dá)到與默認(rèn)網(wǎng)關(guān)連接的目的,同時(shí)按照PVLAN中一級、二級VLAN的通信規(guī)則,實(shí)現(xiàn)內(nèi)部終端的相互通信。