概述
1、PC1和PC3所在接口为access ;属于vlan2 ;
PC2/4/5/6处于同一网段﹔其中PC2可以访问PC4/5/6,PC4可以访问PC5,不能访问PC6
2、PC5不能访问PC6
3、PC1/3与PC2/4/5/6不在同一个网段
4、所有PC通过DHCP获取IP地址,且PC1/3可以正常访问PC2/4/5/6
实验步骤
[LSW1]vlan batch 2 to 6
[LSW2]vlan batch 2 to 6
[LSW3]vlan batch 2 to 6
[LSW1]int g0/0/1
[LSW1-GigabitEthernet0/0/1]port link-type access
[LSW1-GigabitEthernet0/0/1]port default vlan 2
[LSW1-GigabitEthernet0/0/1]int g0/0/2
[LSW1-GigabitEthernet0/0/2]port link-type hybrid(默认hybrid)
[LSW1-GigabitEthernet0/0/2]port hybrid pvid vlan 3
[LSW1-GigabitEthernet0/0/2]port hybrid untagged vlan 3 4 5 6
将SW1的g 0/0/3接口设置为trunk接口并允许所有
[LSW1]int g0/0/3
[LSW1-GigabitEthernet0/0/3]port link-type trunk
[LSW1-GigabitEthernet0/0/3]port trunk allow-pass vlan all
[LSW1]int g0/0/4
[LSW1-GigabitEthernet0/0/4]port link-type hybrid
[LSW1-GigabitEthernet0/0/4]port hybrid tagged vlan 2
[LSW1-GigabitEthernet0/0/4]port hybrid untagged vlan 3 4 5 6
LSW2
[LSW2]int g0/0/1
[LSW2-GigabitEthernet0/0/1]p l a
[LSW2-GigabitEthernet0/0/1]p d v 2
[LSW2-GigabitEthernet0/0/1]int g0/0/2
[LSW2-GigabitEthernet0/0/2]p l h
[LSW2-GigabitEthernet0/0/2]p h p v 4
[LSW2-GigabitEthernet0/0/2]p h u v 3 4 5
[LSW2-GigabitEthernet0/0/2]int g0/0/3
[LSW2-GigabitEthernet0/0/3]p l t
[LSW2-GigabitEthernet0/0/3]p t a v a
[LSW2-GigabitEthernet0/0/3]int g0/0/4
[LSW2-GigabitEthernet0/0/4]p l t
[LSW2-GigabitEthernet0/0/4]p t a v a
[LSW3]int g0/0/1
[LSW3-GigabitEthernet0/0/1]p l h
[LSW3-GigabitEthernet0/0/1]p h p v 5
[LSW3-GigabitEthernet0/0/1]p h u v 3 4 5
[LSW3-GigabitEthernet0/0/1]int g0/0/2
[LSW3-GigabitEthernet0/0/2]p l h
[LSW3-GigabitEthernet0/0/2]p h p v 6
[LSW3-GigabitEthernet0/0/2]p h u v 3 6
[LSW3-GigabitEthernet0/0/2]int g0/0/3
[LSW3-GigabitEthernet0/0/3]p l t
[LSW3-GigabitEthernet0/0/3]p t a v a
[R1]int g0/0/0.1
[R1-GigabitEthernet0/0/0.1]ip ad 192.168.1.1 24
[R1-GigabitEthernet0/0/0.1]dot1q termination vid 2
[R1-GigabitEthernet0/0/0.1]arp broadcast enable
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip ad 192.168.2.1 24
地址池
[R1]dhcp enable
[R1]ip pool aa
[R1-ip-pool-aa]network 192.168.1.0 mask 24
[R1-ip-pool-aa]gateway-list 192.168.1.1
[R1-ip-pool-aa]dns-list 114.114.114.114
[R1]ip pool bb
[R1-ip-pool-bb]network 192.168.2.0 mask 24
[R1-ip-pool-bb]gateway-list 192.168.2.1
[R1-ip-pool-bb]dns-list 114.114.114.114
[R1] int g0/0/0.1
[R1-GigabitEthernet0/0/0.1]dhcp select global
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]dhcp select global
PC1pingPC6
最后
以上就是标致皮带为你收集整理的HCIP VLAN的全部内容,希望文章能够帮你解决HCIP VLAN所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复