HCIP的vlan的实验

目录

1.题型及要求

 2.拓扑

 3.在sw1上的配置

3.1创建vlan

3.2 pc2,4,5,6用hybird

3.3在sw2上的配置

3.4trunk

3.5DHCP

4.演示


1.题型及要求

 2.拓扑

 3.在sw1上的配置

3.1创建vlan

[sw1]vlan batch 2 to 6
[sw1]int e0/0/1
[sw1-Ethernet0/0/1]port link-type access 
[sw1-Ethernet0/0/1]port default vlan 2
[sw1]int e0/0/3
[sw1-Ethernet0/0/3]port link-type access 
[sw1-Ethernet0/0/3]port default vlan 2

3.2 pc2,4,5,6用hybird

[sw1]int e0/0/2
[sw1-Ethernet0/0/2]port hybrid pvid vlan 3
[sw1-Ethernet0/0/2]port hybrid untagged vlan 2 to 6
 
[sw1-Ethernet0/0/2]int e0/0/4
[sw1-Ethernet0/0/4]port hybrid pvid vlan 4
[sw1-Ethernet0/0/4]port hybrid untagged vlan 2 to 4

3.3在sw2上的配置

[sw2]int e0/0/1
[sw2-Ethernet0/0/1]port hybrid pvid vlan 5
[sw2-Ethernet0/0/1]port hybrid untagged vlan 2 3 5
[sw2-Ethernet0/0/1]int e0/0/2
[sw2-Ethernet0/0/2]port hybrid pvid vlan 6
[sw2-Ethernet0/0/2]port hybrid untagged vlan 2 3 6

3.4trunk

[sw1-Ethernet0/0/4]int e0/0/5
[sw1-Ethernet0/0/5]port hybrid tagged vlan 2 to 6	
[sw1-Ethernet0/0/5]int e0/0/6
[sw1-Ethernet0/0/6]port hybrid tagged vlan 2
[sw1-Ethernet0/0/6]port hybrid untagged vlan 3 to 6 

[sw2-Ethernet0/0/3]port hybrid tagged vlan 2 to 6

3.5DHCP

[r1]dhcp enable 
[r1]ip pool v2
[r1-ip-pool-v2]network 192.168.1.0 mask 24
[r1-ip-pool-v2]gateway-list 192.168.1.250
[r1]ip pool v3to6
[r1-ip-pool-v3to6]network 192.168.2.0 mask 24
[r1-ip-pool-v3to6]gateway-list 192.168.2.250
vlan2加标签
[r1]int g0/0/0.1 
[r1-GigabitEthernet0/0/0.1]dot1q termination vid 2
[r1-GigabitEthernet0/0/0.1]ip add 192.168.1.250 24
[r1-GigabitEthernet0/0/0.1]arp broadcast enable 
[r1-GigabitEthernet0/0/0.1]dhcp select global 
 
vlan3到6不加标签
[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip add 192.168.2.250 24
[r1-GigabitEthernet0/0/0]dhcp select global 

4.演示

 pc1/3能访问2456

 pc4不能访问56

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值