Community
20
Community
10
Isolated
30
Promiscuous
100
10,20,30
Host
100
10
Host
100
10
Host
100
20
Host
100
30
Host
100
30
Fa 0/1
Fa 0/2
Fa 0/3
Fa 0/4
Fa 0/5
Fa 0/6
Srv-2
192.168.2.112
Srv-3
192.168.2.113
Srv-4
192.168.2.114
Router(or Firewall)
192.168.2.1
Srv-5
192.168.2.115
Switch#configure terminal
Switch(config)#vtp mode transparent
Switch(config)#vlan 10
Switch(config-vlan)#private-vlan community
Switch(config-vlan)#vlan 20
Switch(config-vlan)#private-vlan community
Switch(config-vlan)#vlan 30
Switch(config-vlan)#private-vlan isolated
Switch(config-vlan)#vlan 100
Switch(config-vlan)#private-vlan primary
Switch(config-vlan)#private-vlan association 10,20,30
Srv-6
192.168.2.116
Switch(config)#vlan 100
Switch(config-vlan)#private-vlan association add 40
%Command rejected: invalid private vlan association between vlan100 and vlan40. Isolated VLAN 30 is
already associated with VLAN 100.
Switch(config)#no vlan 40
Switch#show vlan
VLAN Name
Status
Ports
---- -------------------------------- --------- ------------------------------1
default
active
Fa0/7, Fa0/8, Fa0/9, Fa0/10
Fa0/11, Fa0/12, Fa0/13, Fa0/14
Fa0/15, Fa0/16, Fa0/17, Fa0/18
Fa0/19, Fa0/20, Fa0/21, Fa0/22
Fa0/23, Fa0/24, Gi0/1, Gi0/2
10
VLAN0010
active
20
VLAN0020
active
30
VLAN0030
active
100 VLAN0100
active
1002 fddi-default
act/unsup
1003 token-ring-default
act/unsup
1004 fddinet-default
act/unsup
1005 trnet-default
act/unsup
VLAN
---1
10
20
30
Type
----enet
enet
enet
enet
SAID
---------100001
100010
100020
100030
MTU
----1500
1500
1500
1500
Parent
------
RingNo
------
BridgeNo
--------
Stp
----
BrdgMode
--------
Trans1
-----0
0
0
0
Trans2
-----0
0
0
0
Secondary
--------10
20
30
Type
----------------community
community
isolated
Ports
-----------------------------------------Fa0/1, Fa0/2, Fa0/3
Fa0/1, Fa0/4
Fa0/1, Fa0/5, Fa0/6
timed
timed
timed
timed
out.
out.
out.
out.
C:\>ping 192.168.2.115
Pinging 192.168.2.115 with 32 bytes of data:
Request
Request
Request
Request
timed
timed
timed
timed
out.
out.
out.
out.
C:\>ping 192.168.2.116
Pinging 192.168.2.116 with 32 bytes of data:
Request
Request
Request
Request
timed
timed
timed
timed
out.
out.
out.
out.
C:\>ping 192.168.2.115
Pinging 192.168.2.115 with 32 bytes of data:
Request
Request
Request
Request
timed
timed
timed
timed
out.
out.
out.
out.
Switch(config)#ip routing
Switch(config)#interface vlan 100
Switch(config-if)#ip address 192.168.2.99 255.255.255.0
Switch(config-if)#no shut
Switch#ping 192.168.2.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/203/1006 ms
Switch#ping 192.168.2.113
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.113, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
Switch#conf t
Switch(config)#interface vlan 100
Switch(config-if)#private-vlan mapping 10
witch#ping 192.168.2.113
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.113, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
Switch#ping 192.168.2.112
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.112, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/9 ms
Switch#ping 192.168.2.114
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.114, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
Switch#conf t
Switch(config)#inter vlan 100
Switch(config-if)#private-vlan mapping add 20
Switch(config-if)#^Z
Switch#sh
Interface
--------vlan100
Switch#ping 192.168.2.114
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.114, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/9 ms
Omidreza Omidbahar