switchport private-vlan host-association

モード
インターフェースモード
カテゴリー
L2スイッチング / バーチャルLAN

構文

コマンド構文

(config-if)# switchport private-vlan host-association <1-4094> add <1-4094>

(config-if)# no switchport private-vlan host-association

コマンド説明

対象スイッチポートがマルチプルVLAN(プライベートVLAN)のホストポート(プライベートポート)として設定されている場合、該当ホストポートの所属先VLAN(セカンダリーVLAN。アイソレートVLANとコミュニティーVLANがある)とプライマリーVLAN(プロミスキャスポートが所属しているVLAN)を指定する。
no形式で実行した場合は、該当ホストポートの所属先VLANとプライマリーVLANの設定を削除する。

パラメーター

<1-4094>
プライマリーVLANのVLAN ID(VID)
add <1-4094>
セカンダリーVLANのVLAN ID(VID)

使用例

プライベートVLAN用ホストポートの設定例。ここでは、プロミスキャスポートの所属するプライマリーVLANがvlan2であると仮定している。
awplus(config)# interface port1.1.3-1.1.8
awplus(config-if)# switchport mode private-vlan host
awplus(config-if)# switchport private-vlan host-association 2 add 21
awplus(config-if)# exit
awplus(config)# interface port1.1.9-1.1.10
awplus(config-if)# switchport mode private-vlan host
awplus(config-if)# switchport private-vlan host-association 2 add 22
awplus(config-if)# exit
awplus(config)# interface port1.1.11-1.1.12
awplus(config-if)# switchport mode private-vlan host
awplus(config-if)# switchport private-vlan host-association 2 add 23

注意・補足事項

本コマンドで指定するプライマリーVLANとセカンダリーVLANは、private-vlan associationコマンドで関連付けされていなくてはならない。

1つのプライマリーVLANに対して、2つ以上のセカンダリーVLAN(アイソレートVLANとコミュニティーVLAN、または2つ以上のコミュニティーVLAN)を設定した場合は、設定を保存してから再起動すること。

コマンドツリー

関連コマンド