實驗二:PVLAN
1.SW1配置Primary VLAN 100,Isolate VLAN 101,Community VLAN 102
2.Fa0/3設(shè)置成promiscuous端口,把主VLAN和子VLAN映射到Fa0/3;
3.Fa0/1-2劃分到IsolateVLAN,測試R1-R3之間的連通性;
4.把Fa0/1-2劃分到Community VLAN,測試R1-R3之間的連通性;
5.Fa0/1劃分到isolate VLAN,Fa0/2劃分到community VLAN,測試R1-R3之間的連通性.
6.在SW2上配置相同的Primary VLAN 100,Isolate VLAN 101,Community VLAN 102.
7.SW1-SW2之間起Trunk.在需求3的基礎(chǔ)上,把SW2的Fa0/4劃分到isolate VLAN,測試inter-switch PVLAN的連通性;Fa0/4劃分到community VLAN.測試連通性
R1的配置
R1(config)#int f0/0
R1(config-if)#ip add 10.10.1.1 255.255.255.0
R1(config-if)#no sh
R2的配置
R2(config)#int f0/0
R2(config-if)#ip add 10.10.1.2 255.255.255.0
R2(config-if)#no sh
R3的配置
R3(config)#int f0/0
R3(config-if)#ip add 10.10.1.3 255.255.255.0
R3(config-if)#no sh
R4的配置
R4(config)#int e0/0
R4(config-if)#ip add 10.10.1.4 255.255.255.0
R4(config-if)#no sh
SW1的配置
SW1(config)# vlan 100
SW1(config)# private-vlan primary?
SW1(config)#?private-vlan association 101,102
SW1(config)# vlan 101
SW1(config)#?private-vlan isolated?
SW1(config)# vlan 102
SW1(config)#?private-vlan community?
SW1(config)#int ?f0/3
SW1(config-if)#switchport private-vlan?mapping 100 101-102
SW1(config-if)#switchport mode private-vlan?promiscuous
SW1#show vlan private-vlan type
#########################################
第三題
SW1(config)#int range f0/1 - 2
SW1(config-if)#switchport private-vlan host-association 100 101
SW1(config-if)#switchport mode private-vlan host
現(xiàn)象:
R1#ping 10.10.1.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.1.2, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
R1#ping 10.10.1.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.1.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
#########################################
第四題
SW1(config)#int range f0/1 - 2
SW1(config-if)#switchport private-vlan host-association 100 102
SW1(config-if)#switchport mode private-vlan host
現(xiàn)象:
R1#ping 10.10.1.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.1.2, timeout is 2 seconds:
!!!!!
Success rate is 0 percent (0/5)
R1#ping 10.10.1.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.1.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
#########################################
第五題
SW1(config)#int ?f0/1?
SW1(config-if)#switchport private-vlan host-association 100 101
SW1(config-if)#switchport mode private-vlan host
SW1(config)#int f0/2
SW1(config-if)#switchport private-vlan host-association 100 102
SW1(config-if)#switchport mode private-vlan host
現(xiàn)象:
R1#ping 10.10.1.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.1.2, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
R1#ping 10.10.1.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.1.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
R2#ping 10.10.1.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.1.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
#########################################
SW1(config)#int ?f0/23?
SW1(config-if)#switchport trunk encapsulation dot1q
SW1(config-if)#switchport mode trunk
SW2(config)#int ?f0/23?
SW2(config-if)#switchport trunk?encapsulation dot1q
SW2(config-if)#switchport mode trunk
SW2(config)#int ?f0/4?
SW2(config-if)#switchport private-vlan host-association 100 101
SW2(config-if)#switchport mode private-vlan host
R1#ping 10.10.1.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.1.2, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
R4#ping 10.10.1.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.1.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)scvps.cn,海內(nèi)外云服務(wù)器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務(wù)可用性高、性價比高”等特點與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場景需求。