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
相关推荐
全栈若城2 小时前
HarmonyOS 6 实战:使用 ArkGraphics3D 加载 GLB 模型与 Scene 初始化全流程
3d·华为·架构·harmonyos·harmonyos6
qq_553760326 小时前
鸿蒙图片上传工具开发全解析及踩坑指南
华为·harmonyos·鸿蒙
轻口味6 小时前
HarmonyOS 6 NDK开发系列1:音视频播放能力介绍
华为·音视频·harmonyos
Navicat中国8 小时前
Navicat Premium Lite 正式登录鸿蒙应用市场
数据库·华为·harmonyos·navicat
攻城狮在此11 小时前
华为eNSP网络模拟器安装,实验环境搭建
网络·华为
轻口味11 小时前
HarmonyOS 6 原生图表库 qCharts 深度解析:高性能、全场景交互的 ArkUI 实战
华为·交互·harmonyos
互联网散修14 小时前
鸿蒙(HarmonyOS)ArkTS 实战: animateTo属性动画实现连续涟漪扩散
华为·harmonyos·鸿蒙属性动画
lxysbly17 小时前
鸿蒙harmonyos端怀旧游戏模拟器,支持fc红白机 街机 gba psp ps1 nds n64世嘉md gbc gb sfc等主机
游戏·华为·harmonyos
想你依然心痛19 小时前
HarmonyOS 5.0行业解决方案:基于端侧AI的智能工业质检APP开发实战
人工智能·华为·harmonyos