PVLAN实验-创新互联
实验二:PVLAN
1.SW1配置Primary VLAN 100,Isolate VLAN 101,Community VLAN 102
2.Fa0/3设置成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的基础上,把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
现象:
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
现象:
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
现象:
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
另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。
分享名称:PVLAN实验-创新互联
本文地址:http://azwzsj.com/article/jsddc.html