H3C三层交换机配置命令
[H3C]dis cur ;显示当前配置
[H3C]display current-configuration ;显示当前配置
[H3C]display interfaces ;显示接口信息
[H3C]display vlan all ;显示路由信息
[H3C]display version ;显示版本信息
[H3C]super password ;修改特权用户密码
[H3C]sysname ;交换机命名
[H3C]interface ethernet 0/1 ;进入接口视图
[H3C]interface vlan x ;进入接口视图
[H3C-Vlan-interfacex]ip address 10.65.1.1 255.255.0.0 ;配置VLAN的IP地址
[H3C]ip route-static 0.0.0.0 0.0.0.0 10.65.1.2 ;静态路由=网关
[H3C]rip ;三层交换支持
[H3C]local-user ftp 增加用户名
[H3C]user-interface vty 0 4 ;进入虚拟终端
[S3026-ui-vty0-4]authentication-mode password ;设置口令模式
[S3026-ui-vty0-4]set authentication-mode password simple 222 ;设置口令
[S3026-ui-vty0-4]user privilege level 3 ;用户级别
[H3C]interface ethernet 0/1 ;进入端口模式
[H3C]int e0/1 ;进入端口模式
[H3C-Ethernet0/1]duplex {half|full|auto} ;配置端口工作状态
[H3C-Ethernet0/1]speed {10|100|auto} ;配置端口工作速率
[H3C-Ethernet0/1]flow-control ;配置端口流控
[H3C-Ethernet0/1]mdi {across|auto|normal} ;配置端口平接扭接
[H3C-Ethernet0/1]port link-type {trunk|access|hybrid} ;设置端口工作模式
[H3C-Ethernet0/1]port access vlan 3 ;当前端口加入到VLAN
[H3C-Ethernet0/2]port trunk permit vlan {ID|All} ;设trunk允许的VLAN
[H3C-Ethernet0/3]port trunk pvid vlan 3 ;设置trunk端口的PVID
[H3C-Ethernet0/1]undo shutdown ;激活端口
[H3C-Ethernet0/1]shutdown ;关闭端口
[H3C-Ethernet0/1]quit ;返回
[H3C]vlan 3 ;创建VLAN
[H3C-vlan3]port ethernet 0/1 ;在VLAN中增加端口
[H3C-vlan3]port e0/1 ;简写方式
[H3C-vlan3]port ethernet 0/1 to ethernet 0/4 ;在VLAN中增加端口
[H3C-vlan3]port e0/1 to e0/4 ;简写方式
[H3C]monitor-port <interface_type interface_num> ;指定镜像端口
[H3C]port mirror <interface_type interface_num> ;指定被镜像端口
[H3C]port mirror int_list observing-port int_type int_num ;指定镜像和被镜像
[H3C]description string ;指定VLAN描述字符
[H3C]description ;删除VLAN描述字符
[H3C]display vlan [vlan_id] ;查看VLAN设置
[H3C]stp {enable|disable} ;设置生成树,默认关闭
[H3C]stp priority 4096 ;设置交换机的优先级
[H3C]stp root {primary|secondary} ;设置为根或根的备份
[H3C-Ethernet0/1]stp cost 200 ;设置交换机端口的花费
[H3C]link-aggregation e0/1 to e0/4 ingress|both ; 端口的聚合
[H3C]undo link-aggregation e0/1|all ; 始端口为通道号
[SwitchA-vlanx]isolate-user-vlan enable ;设置主vlan
[SwitchA]isolate-user-vlan <x> secondary <list> ;设置主vlan包括的子vlan
[H3C-Ethernet0/2]port hybrid pvid vlan <id> ;设置vlan的pvid
[H3C-Ethernet0/2]port hybrid pvid ;删除vlan的pvid
[H3C-Ethernet0/2]port hybrid vlan vlan_id_list untagged ;设置无标识的vlan
如果包的vlan id与PVId一致,则去掉vlan信息. 默认PVID=1。
所以设置PVID为所属vlan id, 设置可以互通的vlan为untagged.
2025 年 4 月 一 二 三 四 五 六 日 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 查找内容
分类
-
近期文章
归档
页面
点击
- 欢迎,这里记录的是我的学习笔记 - 6,226 views
- 因为环境不干净导致的kubeadm部署失败,及解决办法 - 2,157 views
- 解决systemd’s start request repeated too quickly for xxx.service的办法 - 1,317 views
- 2-openstack(rocky)最小环境安装(包括cinder和swift) - 1,270 views
- Nextcloud/ownCloud上传大于512MB的文件的相关配置 - 1,139 views
- KVM迁移时报错:Host CPU does not provide required features: xxx,xxx,xxx,….的解决办法 - 1,051 views
- qemu-kvm: CPU feature spec-ctrl not found - 1,008 views
- Nextcloud报错”You are using a fallback implementation of the intl extension.“解决方法 - 957 views
- Redis绑定IP后报 bind: Cannot assign requested address 异常解决方法 - 945 views
- 磁盘扩容时报错 unexpected output in sfdisk - 882 views
标签
- ansible (4)
- aws (1)
- centos7 (3)
- ceph (5)
- clickhouse (1)
- cloud (2)
- cron (1)
- dd (1)
- disk (1)
- DNS (1)
- docker (20)
- ELK (7)
- git (3)
- gitlab (9)
- jenkins (7)
- jumpserver (1)
- kubernetes (3)
- kvm (6)
- ls (1)
- mcrypt (1)
- mysql (20)
- network (2)
- nextcloud (9)
- nginx (10)
- openstack (21)
- php (1)
- python (4)
- qps (1)
- redis (9)
- rpm (1)
- shell (8)
- sns (1)
- sqs (1)
- ssh (4)
- ssl (1)
- svn (3)
- timezone (3)
- tps (1)
- win10 (2)
- windows (1)
- wipefs (1)
- yum (5)
- zabbix (4)
- 群晖 (1)
- 阿里云 (2)