祖瑞科技 全国计算机 网络IT运维社区!

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 活动 交友 discuz
查看: 7750|回复: 0

HCNA-8 VLAN基础配置

[复制链接]

205

主题

218

帖子

1286

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1286
发表于 2021-2-5 13:34:56 | 显示全部楼层 |阅读模式
HCNA-8 VLAN基础配置
                              
<Huawei>clocktimezone BJ add 8:00:00
<Huawei>clockdatetime 16:01 2020-04-28
<Huawei>system-view
[Huawei]sysnamesw2
[sw2]vlan 10  //创建VLAN
[sw2-vlan10]descriptionmarketing  //VLAN描述
[sw2-vlan10]vlan20
[sw2-vlan20]descriptionit
[sw2-vlan20]quit
[sw2]interfaceGigabitEthernet 0/0/1  //接口视图
[sw2-GigabitEthernet0/0/1]undonegotiation auto  //不执行自协商
[sw2-GigabitEthernet0/0/1]duplexfull  //全双工
[sw2-GigabitEthernet0/0/1]speed1000  //速率1000M
[sw2-GigabitEthernet0/0/1]portlink-type access  //接口链路类型 访问
[sw2-GigabitEthernet0/0/1]portdefault vlan 10  //接口默认VLAN
[sw2-GigabitEthernet0/0/1]quit
[sw2]interfaceGigabitEthernet 0/0/2
[sw2-GigabitEthernet0/0/2]undonegotiation auto
[sw2-GigabitEthernet0/0/2]duplexfull
[sw2-GigabitEthernet0/0/2]speed1000
[sw2-GigabitEthernet0/0/2]portlink-type access
[sw2-GigabitEthernet0/0/2]portdefault vlan 10
[sw2-GigabitEthernet0/0/2]quit
[sw2]interfaceGigabitEthernet 0/0/3
[sw2-GigabitEthernet0/0/3]undonegotiation auto
[sw2-GigabitEthernet0/0/3]duplexfull
[sw2-GigabitEthernet0/0/3]speed1000
[sw2-GigabitEthernet0/0/3]portlink-type access
[sw2-GigabitEthernet0/0/3]portdefault vlan 20
[sw2-GigabitEthernet0/0/3]quit
[sw2]interfaceGigabitEthernet 0/0/24
[sw2-GigabitEthernet0/0/24]undonegotiation auto
[sw2-GigabitEthernet0/0/24]duplexfull
[sw2-GigabitEthernet0/0/24]speed1000
[sw2-GigabitEthernet0/0/24]portlink-type trunk
[sw2-GigabitEthernet0/0/24]porttrunk allow-pass vlan all
[sw2-GigabitEthernet0/0/24]quit
[sw2]displayvlan  //查看VLAN
[sw2]displayport vlan active  //查看接口VLAN激活状态
[sw2]return  
<sw2>save

<Huawei>clocktimezone BJ add 8:00:00
<Huawei>clockdatetime 16:15 2020-04-28
<Huawei>system-view
[Huawei]sysnamesw3
[sw3]vlanbatch 20 30  //批量创建VLAN
[sw3-vlan20]descriptionit
[sw3-vlan30]descriptionproject
[sw3-vlan30]quit
[sw3]port-groupgroup-member GigabitEthernet 0/0/1 to gigabitethernet 0/0/3  //接口组 组成员
[sw3-port-group]undonegotiation auto
[sw3-port-group]duplexfull
[sw3-port-group]speed1000
[sw3-port-group]portlink-type access
[sw3-port-group]quit
[sw3]interfaceGigabitEthernet 0/0/3
[sw3-GigabitEthernet0/0/1]portdefault vlan 20
[sw3-GigabitEthernet0/0/1]quit
[sw3]port-groupgroup-member GigabitEthernet 0/0/1 to GigabitEthernet 0/0/2
[sw3-port-group]portdefault vlan 30
[sw3]interfaceGigabitEthernet 0/0/24
[sw3-GigabitEthernet0/0/24]undonegotiation auto
[sw3-GigabitEthernet0/0/24]duplexfull
[sw3-GigabitEthernet0/0/24]speed1000
[sw3-GigabitEthernet0/0/24]portlink-type trunk
[sw3-GigabitEthernet0/0/24]porttrunk allow-pass vlan all
[sw3-GigabitEthernet0/0/24]quit
[sw3]displayvlan
[sw3]displayport vlan active
[sw3]return
<sw3>save

<Huawei>clocktimezone BJ add 8:00:00
<Huawei>clockdatetime 16:40 2020-04-28
<Huawei>system-view
[Huawei]sysnamesw1
[sw1]vlan10
[sw1-vlan10]descriptionmarketing
[sw1-vlan10]vlan20
[sw1-vlan20]descriptionit
[sw1-vlan20]vlan30
[sw1-vlan30]descriptionproject
[sw1-vlan30]quit
[sw1]port-groupgroup-member GigabitEthernet 0/0/1 to GigabitEthernet 0/0/2
[sw1-port-group]undonegotiation auto
[sw1-port-group]duplexfull
[sw1-port-group]speed1000
[sw1-port-group]portlink-type trunk
[sw1-port-group]porttrunk allow-pass vlan all
[sw1-port-group]quit
[sw1]displayvlan
[sw1]displayport vlan active
[sw1]return
<sw1>save

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
祖瑞(上海)网络科技有限公司
我们在全国范围提供企业IT运维、网络工程、弱电安装、监控安防、计算机产品收售、办公设备耗材等服务!
期待与您的合作!
邮箱:sanne@zurkj.com
电话:021-51850021 18918292296
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

公司网站

QQ|Archiver|手机版|小黑屋|祖瑞科技 全国计算机 网络IT运维社区! ( 沪ICP备16021636号-2 )

GMT+8, 2024-11-26 01:49 , Processed in 0.040002 second(s), 20 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表