vlan作业

未创建vlan默认vlan1,可创建不同的vlan,不同vlan不能通信,相同vlan下可通信

同一路由器交换机下创建几个广播域

1创建新的vlan

[Huawei]vlan batch 2 to 4
Info: This operation may take a few seconds. Please wait for a moment...done.
 

2将接口划入新的vlan

[Huawei]interface e0/0/2  
[Huawei-Ethernet0/0/2]port link-type access 
Nov 22 2022 22:49:17-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5
.25.191.3.1 configurations have been changed. The current change number is 5, th
e change loop count is 0, and the maximum number of records is 4095.v    
[Huawei-Ethernet0/0/2]port default vlan 2
 

3通往路由器的接口默认属于vlan1,用trunk干道承载所以vlan通往路由器

[Huawei]interface e0/0/1 
[Huawei-Ethernet0/0/1]port link-type trunk 
Nov 22 2022 22:52:17-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5
.25.191.3.1 configurations have been changed. The current change number is 11, t
he change loop count is 0, and the maximum number of records is 4095.     
[Huawei-Ethernet0/0/1]port trunk allow-pass vlan all 
 

4创建虚拟子接口属于不同vlan,配置IP pool下发IP或给电脑配置静态ip

[Huawei]interface g0/0/0.2 
[Huawei-GigabitEthernet0/0/0.2]dot1q termination vid 3
[Huawei-GigabitEthernet0/0/0.2]ip address 2.2.2.1 24
Nov 22 2022 22:55:01-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[1]:The line protocol
 IP on the interface GigabitEthernet0/0/0.2 has entered the UP state. 
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值