8.华为两台交换机的三种连接方式access 、trunk、undo portswitch

目的:两台三层交换机的三种连接方式

1.access

2.trunk

3.undo portswitch 模拟机不支持此配置,实体机支持

第一种access

CE1配置

bash 复制代码
[~HUAWEI]vlan batch 10
[~HUAWEI]int Vlanif 10
[~HUAWEI-Vlanif10]ip add 10.10.10.1 24
[~HUAWEI]int g1/0/0
[~HUAWEI-GE1/0/0]port link-type access 
[~HUAWEI-GE1/0/0]port default vlan 10

CE2配置

bash 复制代码
[~HUAWEI]vlan batch 10
[~HUAWEI]int Vlanif 10
[~HUAWEI-Vlanif10]ip add 10.10.10.2 24
[~HUAWEI]int g1/0/0
[~HUAWEI-GE1/0/0]port link-type access 
[~HUAWEI-GE1/0/0]port default vlan 10

第二种trunk

CE1配置

bash 复制代码
[~HUAWEI]vlan batch 10
[~HUAWEI]int Vlanif 10
[~HUAWEI-Vlanif10]ip add 10.10.10.1 24
[~HUAWEI]int g1/0/0
[*HUAWEI-GE1/0/0]port link-type trunk 
[*HUAWEI-GE1/0/0]port trunk allow-pass vlan all

CE2配置

bash 复制代码
[~HUAWEI]vlan batch 10
[~HUAWEI]int Vlanif 10
[~HUAWEI-Vlanif10]ip add 10.10.10.2 24
[~HUAWEI]int g1/0/0
[*HUAWEI-GE1/0/0]port link-type trunk 	
[*HUAWEI-GE1/0/0]port trunk allow-pass vlan all

第三种undo portswitch

CE1配置

bash 复制代码
[*HUAWEI]int g1/0/0	
[*HUAWEI-GE1/0/0]undo portswitch
[*HUAWEI-GE1/0/0]ip add 10.10.10.1 24

CE2配置

bash 复制代码
[*HUAWEI]int g1/0/0	
[*HUAWEI-GE1/0/0]undo portswitch
[*HUAWEI-GE1/0/0]ip add 10.10.10.2 24
相关推荐
爱笑的眼睛111 天前
深入探讨HarmonyOS分布式数据库同步:原理、实现与最佳实践
华为·harmonyos
爱笑的眼睛111 天前
深入探索HarmonyOS ArkTS异步编程模式
华为·harmonyos
SuperHeroWu71 天前
【HarmonyOS 6】为什么getContext 废弃,使用getHostContext说明
华为·harmonyos·context·上下文·getcontext·gethostcontext
lqj_本人1 天前
鸿蒙Qt权限避坑:动态申请与Crash修复
qt·华为·harmonyos
边缘计算社区1 天前
谷歌正式跟进苹果PCC,华为OPPO同步入局:边缘AI隐私战打响
人工智能·华为
不爱吃糖的程序媛2 天前
彻底解决 Flutter 开发 HarmonyOS 应用:No Hmos SDK found 报错
flutter·华为·harmonyos
liuxf12342 天前
fvm管理鸿蒙flutter
flutter·华为·harmonyos
lqj_本人2 天前
HarmonyOS + Cordova 工程搭建与目录结构:从零到跑通 & 常见报错排查
华为·harmonyos
爱笑的眼睛112 天前
HarmonyOS应用崩溃捕获与上报:分布式场景下的深度实践与优化
华为·harmonyos
御承扬2 天前
鸿蒙原生系列之拖拽事件
华为·harmonyos·拖拽事件·ndk ui