Huawei-R&S-网络工程师实验笔记20190608-VLAN划分基础(基于端口、MAC地址、子网地址、协议)
》Huawei-R&S-网络工程师实验笔记20190608-VLAN划分基础(基于端口、MAC地址、子网地址、协议)
》》实验开始,先上拓扑图参考:

一、基于端口划分VLAN:
[SWA]vlan //创建VLAN10,这一步是前提(设备默认只有VLAN 1)
[SWA-vlan10]
Jun ::-: SWA DS//DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
.191.3. configurations have been changed. The current change number is , the c
hange loop count is , and the maximum number of records is .
[SWA-vlan10]q [SWA]int g0//
[SWA-GigabitEthernet0//]port link-type ? //查询配置端口类型的命令
access Access port
dot1q-tunnel QinQ port
hybrid Hybrid port
trunk Trunk port [SWA-GigabitEthernet0//]port link-type access //配置端口为Access类型
[SWA-GigabitEthernet0//]
Jun ::-: SWA DS//DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
.191.3. configurations have been changed. The current change number is , the c
hange loop count is , and the maximum number of records is .
[SWA-GigabitEthernet0//]port default vlan //将端口划分到VLAN 10
[SWA-GigabitEthernet0//]
Jun ::-: SWA DS//DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
.191.3. configurations have been changed. The current change number is , the c
hange loop count is , and the maximum number of records is . [SWA-GigabitEthernet0//]int g0//
[SWA-GigabitEthernet0//]port link-type access
[SWA-GigabitEthernet0//]
Jun ::-: SWA DS//DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
.191.3. configurations have been changed. The current change number is , the c
hange loop count is , and the maximum number of records is .
[SWA-GigabitEthernet0//]port default vlan
[SWA-GigabitEthernet0//]
Jun ::-: SWA DS//DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
.191.3. configurations have been changed. The current change number is , the c
hange loop count is , and the maximum number of records is . [SWA-GigabitEthernet0//]int g0//
[SWA-GigabitEthernet0//]port link-type access
[SWA-GigabitEthernet0//]
Jun ::-: SWA DS//DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
.191.3. configurations have been changed. The current change number is , the c
hange loop count is , and the maximum number of records is .
[SWA-GigabitEthernet0//]port def
[SWA-GigabitEthernet0//]port default vlan
[SWA-GigabitEthernet0//]
Jun ::-: SWA DS//DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
.191.3. configurations have been changed. The current change number is , the c
hange loop count is , and the maximum number of records is .
[SWA-GigabitEthernet0//]q
[SWA]dis vlan //查看VLAN端口信息
The total number of vlans is :
--------------------------------------------------------------------------------
U: Up; D: Down; TG: Tagged; UT: Untagged;
MP: Vlan-mapping; ST: Vlan-stacking;
#: ProtocolTransparent-vlan; *: Management-vlan;
-------------------------------------------------------------------------------- VID Type Ports
--------------------------------------------------------------------------------
common UT:GE0//(D) GE0//(D) GE0//(D) GE0//(D) //默认VLAN 1的端口
GE0//(D) GE0//(D) GE0//(D) GE0//(D)
GE0//(D) GE0//(D) GE0//(D) GE0//(D)
GE0//(D) GE0//(D) GE0//(D) GE0//(D)
GE0//(D) GE0//(D) GE0//(D) GE0//(D)
GE0//(D) common UT:GE0//(U) GE0//(U) GE0//(U) //3个端口被划分进了VLAN 10 VID Status Property MAC-LRN Statistics Description
-------------------------------------------------------------------------------- enable default enable disable VLAN
enable default enable disable VLAN [SWA]dis port vlan active //查看VLAN端口信息,显示PVID和VLAN LIST
T=TAG U=UNTAG
-------------------------------------------------------------------------------
Port Link Type PVID VLAN List
-------------------------------------------------------------------------------
GE0// access U:
GE0// access U:
GE0// access U:
GE0// hybrid U:
GE0// hybrid U:
GE0// hybrid U:
GE0// hybrid U:
[SWA]
二、基于MAC地址划分VLAN:
[SWA]dis vlan //检查VLAN状态信息
The total number of vlans is : //显示只有一个默认VLAN 1
--------------------------------------------------------------------------------
U: Up; D: Down; TG: Tagged; UT: Untagged;
MP: Vlan-mapping; ST: Vlan-stacking;
#: ProtocolTransparent-vlan; *: Management-vlan;
--------------------------------------------------------------------------------
VID Type Ports
--------------------------------------------------------------------------------
common UT:GE0//(U) GE0//(U) GE0//(U) GE0//(D)
GE0//(D) GE0//(D) GE0//(D) GE0//(D)
GE0//(D) GE0//(D) GE0//(D) GE0//(D)
GE0//(D) GE0//(D) GE0//(D) GE0//(D)
GE0//(D) GE0//(D) GE0//(D) GE0//(D)
GE0//(D) GE0//(D) GE0//(D) GE0//(D) VID Status Property MAC-LRN Statistics Description
--------------------------------------------------------------------------------
enable default enable disable VLAN [SWA]vlan //创建VLAN 10 [SWA-vlan10]int g0//
[SWA-GigabitEthernet0//]port hybrid untagged vlan //在G0/0/1(默认Hybrid)端口下配置Untagged VLAN 10
[SWA-GigabitEthernet0//]
Jun ::-: SWA DS//DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
.191.3. configurations have been changed. The current change number is , the c
hange loop count is , and the maximum number of records is . [SWA-GigabitEthernet0//]int g0//
[SWA-GigabitEthernet0//]port hybrid untagged vlan 10 //在G0/0/2(默认Hybrid)端口下配置Untagged VLAN 10
[SWA-GigabitEthernet0//]
Jun ::-: SWA DS//DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
.191.3. configurations have been changed. The current change number is , the c
hange loop count is , and the maximum number of records is . [SWA-GigabitEthernet0//]int g0//
[SWA-GigabitEthernet0//]port hybrid untagged vlan 10 //在G0/0/3(默认Hybrid)端口下配置Untagged VLAN 10
[SWA-GigabitEthernet0//]
Jun ::-: SWA DS//DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
.191.3. configurations have been changed. The current change number is , the c
hange loop count is , and the maximum number of records is .
[SWA-GigabitEthernet0//]q [SWA]dis port vlan active //检查VLAN端口激活状况(Hybrid端口的Untagged列表中默认只有VLAN 1)
T=TAG U=UNTAG
-------------------------------------------------------------------------------
Port Link Type PVID VLAN List
-------------------------------------------------------------------------------
GE0// hybrid U: //Hybrid端口的Untagged列表中配置增加了VLAN 10
GE0// hybrid U: //Hybrid端口的Untagged列表中配置增加了VLAN 10
GE0// hybrid U: //Hybrid端口的Untagged列表中配置增加了VLAN 10
GE0// hybrid U:
GE0// hybrid U:
GE0// hybrid U:
GE0// hybrid U:
[SWA]
[SWA]vlan
[SWA-vlan10]mac-vlan ?
mac-address MAC address
[SWA-vlan10]mac-vlan mac-address ?
H-H-H MAC address //指定与vlan10关联的MAC地址,常见格式xx:xx:xx:xx:xx:xx,此处xxxx-xxxx-xxxx(都是16进制)
[SWA-vlan10]mac-vlan mac-address -- ?
H-H-H Value of MAC address mask //指定MAC地址的掩码,格式还是xxxx-xxxx-xxxx(16进制)
INTEGER<-> Length of MAC address mask //指定MAC地址的掩码长度,整数型
priority Priority information //指定MAC地址对应vlan的802.1p优先级[0-7](默认为0,值越大、级越高)
<cr>
[SWA-vlan10]mac-vlan mac-address -- //在vlan10中绑定主机A的MAC地址
Jun ::-: SWA DS//DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
.191.3. configurations have been changed. The current change number is , the c
hange loop count is , and the maximum number of records is .
[SWA-vlan10]mac-vlan mac-address -- //在vlan10中绑定主机B的MAC地址
Jun ::-: SWA DS//DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
.191.3. configurations have been changed. The current change number is , the c
hange loop count is , and the maximum number of records is .
[SWA-vlan10]mac-vlan mac-address -- //在vlan10中绑定主机C的MAC地址
Jun ::-: SWA DS//DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
.191.3. configurations have been changed. The current change number is , the c
hange loop count is , and the maximum number of records is . [SWA-vlan10]int g0//
[SWA-GigabitEthernet0//]mac-vlan enable //开启G0/0/1端口下MAC-VLAN
Info: This operation may take a few seconds. Please wait for a moment...done.
[SWA-GigabitEthernet0//]
Jun ::-: SWA DS//DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
.191.3. configurations have been changed. The current change number is , the c
hange loop count is , and the maximum number of records is .
[SWA-GigabitEthernet0//]int g0//
[SWA-GigabitEthernet0//]mac-vlan enable //开启G0/0/2端口下MAC-VLAN
Info: This operation may take a few seconds. Please wait for a moment...done.
[SWA-GigabitEthernet0//]
Jun ::-: SWA DS//DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
.191.3. configurations have been changed. The current change number is , the c
hange loop count is , and the maximum number of records is .
[SWA-GigabitEthernet0//]int g0//
[SWA-GigabitEthernet0//]mac-vlan enable //开启G0/0/3端口下MAC-VLAN
Info: This operation may take a few seconds. Please wait for a moment...done.
[SWA-GigabitEthernet0//]
Jun ::-: SWA DS//DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
.191.3. configurations have been changed. The current change number is , the
change loop count is , and the maximum number of records is .
[SWA-GigabitEthernet0//]q
[SWA]
[SWA]dis mac-vlan mac-address all //检查vlan10中MAC地址绑定条目
---------------------------------------------------
MAC Address MASK VLAN Priority
---------------------------------------------------
-- ffff-ffff-ffff
-- ffff-ffff-ffff
-- ffff-ffff-ffff Total MAC VLAN address count:
[SWA]
三、基于子网地址划分VLAN:
[SWA]display vlan //流程同上,先检查vlan和创建vlan10
---------
[SWA]vlan 10
---------
[SWA-vlan10]int g0/0/1 //再分别进入G0/0/1、2、3端口配置剥离vlan标签的功能
[SWA-GigabitEthernet0//]port hybrid untagged vlan
---------
[SWA-GigabitEthernet0//]int g0//
[SWA-GigabitEthernet0//]port hybrid untagged vlan
---------
[SWA-GigabitEthernet0//]int g0//
[SWA-GigabitEthernet0//]port hybrid untagged vlan
---------
[SWA-GigabitEthernet0//]vlan
[SWA-vlan10]
[SWA-vlan10]ip-subnet-vlan ? //根据子网信息绑定vlan
INTEGER<-> Ip-subnet index,ranging from integer to
ip IP address [SWA-vlan10]ip-subnet-vlan ip ?
X.X.X.X IP address [SWA-vlan10]ip-subnet-vlan ip 192.168.0.1 ?
INTEGER<-> Length of IP address mask
X.X.X.X IP address mask [SWA-vlan10]ip-subnet-vlan ip 192.168.0.1 //在vlan10中绑定主机A的IP地址
Jun ::-: SWA DS//DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
.191.3. configurations have been changed. The current change number is , the c
hange loop count is , and the maximum number of records is .
[SWA-vlan10]ip-subnet-vlan ip 192.168.0.2 //在vlan10中绑定主机B的IP地址
Jun ::-: SWA DS//DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
.191.3. configurations have been changed. The current change number is , the c
hange loop count is , and the maximum number of records is .
[SWA-vlan10]ip-subnet-vlan ip 192.168.0.3 //在vlan10中绑定主机C的IP地址
Jun ::-: SWA DS//DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
.191.3. configurations have been changed. The current change number is , the c
hange loop count is , and the maximum number of records is . [SWA-vlan10]dis this
#
vlan
ip-subnet-vlan ip 192.168.0.1 255.255.255.255
ip-subnet-vlan ip 192.168.0.2 255.255.255.255
ip-subnet-vlan ip 192.168.0.3 255.255.255.255
#
return
[SWA-vlan10]int g0//
[SWA-GigabitEthernet0//]ip-subnet-vlan enable //开启G0/0/1端口下ip-subnet-vlan
[SWA-GigabitEthernet0//]
Jun ::-: SWA DS//DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
.191.3. configurations have been changed. The current change number is , the c
hange loop count is , and the maximum number of records is .
[SWA-GigabitEthernet0//]int g0//
[SWA-GigabitEthernet0//]ip-subnet-vlan enable //开启G0/0/2端口下ip-subnet-vlan
[SWA-GigabitEthernet0//]
Jun ::-: SWA DS//DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
.191.3. configurations have been changed. The current change number is , the c
hange loop count is , and the maximum number of records is .
[SWA-GigabitEthernet0//]int g0//
[SWA-GigabitEthernet0//]ip-subnet-vlan enable //开启G0/0/3端口下ip-subnet-vlan
[SWA-GigabitEthernet0//]
Jun ::-: SWA DS//DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
.191.3. configurations have been changed. The current change number is , the
change loop count is , and the maximum number of records is .
[SWA-GigabitEthernet0//]quit [SWA]dis ip-subnet-vlan vlan all //检查vlan10中IP地址(子网)绑定条目
----------------------------------------------------------------
Vlan Index IpAddress SubnetMask Priority
----------------------------------------------------------------
192.168.0.1 255.255.255.255
192.168.0.2 255.255.255.255
192.168.0.3 255.255.255.255
----------------------------------------------------------------
ip-subnet-vlan count: total count:
[SWA]
四、基于协议划分VLAN:
[SWA]display vlan //流程同上,先检查vlan和创建vlan10
---------
[SWA]vlan 10
---------
[SWA-vlan10]int g0/0/1 //再分别进入G0/0/1、2、3端口配置剥离vlan标签的功能
[SWA-GigabitEthernet0/0/1]port hybrid untagged vlan 10
---------
[SWA-GigabitEthernet0/0/1]int g0/0/2
[SWA-GigabitEthernet0/0/2]port hybrid untagged vlan 10
---------
[SWA-GigabitEthernet0/0/2]int g0/0/3
[SWA-GigabitEthernet0/0/3]port hybrid untagged vlan 10
---------
[SWA-GigabitEthernet0/0/3]vlan 10
[SWA-vlan10]protocol-vlan ? //根据指定协议划分vlan(华为支持多种二层、三层协议)
INTEGER<-> Protocol index
at AT(AppleTalk Protocol) configuration information
ipv4 IPv4 configuration information
ipv6 IPv6 configuration information
ipx IPX(Internetwork Packet eXchange) configuration information
mode Other protocol mode configuration information [SWA-vlan10]protocol-vlan ipv4 //配置根据IPv4协议划分vlan
[SWA-vlan10]
Jun ::-: SWA DS//DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
.191.3. configurations have been changed. The current change number is , the c
hange loop count is , and the maximum number of records is .
[SWA-vlan10]int g0//
[SWA-GigabitEthernet0//]protocol-vlan vlan all //开启G0/0/1端口下protocol-vlan,关联vlan10,并引用所有配置协议
Jun ::-: SWA DS//DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
.191.3. configurations have been changed. The current change number is , the c
hange loop count is , and the maximum number of records is .
[SWA-GigabitEthernet0//]protocol-vlan vlan ?
INTEGER<-> Protocol index
all All the protocols of the VLAN
[SWA-GigabitEthernet0//]int g0//
[SWA-GigabitEthernet0//]protocol-vlan vlan all //开启G0/0/2端口下protocol-vlan,关联vlan10,并引用所有配置协议
[SWA-GigabitEthernet0//]
Jun ::-: SWA DS//DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
.191.3. configurations have been changed. The current change number is , the c
hange loop count is , and the maximum number of records is .
[SWA-GigabitEthernet0//]int g0//
[SWA-GigabitEthernet0//]protocol-vlan vlan all //开启G0/0/3端口下protocol-vlan,关联vlan10,并引用所有配置协议
[SWA-GigabitEthernet0//]
Jun ::-: SWA DS//DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.
.191.3. configurations have been changed. The current change number is , the c
hange loop count is , and the maximum number of records is .
[SWA-GigabitEthernet0//]q
[SWA]
[SWA]dis protocol-vlan vlan all //查看vlan中绑定的协议
----------------------------------------------------------------
VLAN Protocol Index Protocol Type
----------------------------------------------------------------
ipv4
Huawei-R&S-网络工程师实验笔记20190608-VLAN划分基础(基于端口、MAC地址、子网地址、协议)的更多相关文章
- Huawei-R&S-网络工程师实验笔记20190525-设备登录、VRP基本配置、文件系统
>Huawei-R&S-网络工程师实验笔记20190525-设备登录.VRP基本配置.文件系统(环回接口.telnet远程.AAA登录.命令行.时钟.banner.文件目录) >& ...
- Huawei-R&S-网络工程师实验笔记20190524-VRP的系统、接口视图下基本操作
>Huawei-R&S-网络工程师实验笔记20190524-VRP的系统.接口视图下基本操作(重命名.配置IP.VLAN接口.双工模式.console口) >>实验开始,先上 ...
- Huawei-R&S-网络工程师实验笔记20190530-FTP上传下载、STelnet登录、SFTP登录
>Huawei-R&S-网络工程师实验笔记20190530-FTP上传下载.STelnet登录.SFTP登录 >>实验开始,参考<Huawei-R&S-网络工程 ...
- Huawei-R&S-网络工程师实验笔记20190527-华为设备密码重置、设置web管理
>Huawei-R&S-网络工程师实验笔记20190527-华为设备密码重置.设置web管理 >>实验开始(使用SecureCRT 等工具软件): 一.华为设备密码重置,通过 ...
- Huawei-R&S-网络工程师实验笔记20190607-STP生成树协议(基本配置、桥优先级、根桥选举、根端口、路径开销、边缘端口)
>Huawei-R&S-网络工程师实验笔记20190607-STP生成树协议(基本配置.桥优先级.根桥选举.根端口.路径开销.边缘端口) >>实验开始,先上拓扑图参考: &l ...
- Huawei-R&S-网络工程师实验笔记20190615-IP基础(AR201上配置IP)
>Huawei-R&S-网络工程师实验笔记20190615-IP基础(AR201上配置IP) >>实验开始,先上拓扑图参考: >>>一般正常配置IP操作如下 ...
- Huawei-R&S-网络工程师实验笔记20190609-VLAN划分综合(Hybrid端口)
>Huawei-R&S-网络工程师实验笔记20190609-VLAN划分综合(Hybrid端口) >>实验开始,先上拓扑图参考: >>>实验目标:分别实现主 ...
- Huawei-R&S-网络工程师实验笔记20190609-VLAN划分综合(Access和Trunk端口)
>Huawei-R&S-网络工程师实验笔记20190609-VLAN划分综合(Access和Trunk端口) >>实验开始,先上拓扑图参考: >>>实验目标 ...
- 网络对抗实验一 逆向及Bof基础实践
网络对抗实验一 逆向及Bof基础实践 一.实验目的 本次实践的对象是一个名为pwn1的linux可执行文件. 该程序正常执行流程是:main调用foo函数,foo函数会简单回显任何用户输入的字符串. ...
随机推荐
- ubuntu下使用crontab定时器
crontab 定时工具(周期性执行的任务列表称为Cron Table),其中每一个任务,被称为Cron Job. 可以,每分钟执行,每小时执行,每天执行,每周执行,每月执行. 检查服务 1.查看任务 ...
- Rails5 Route Document
创建: 2017/06/29 完成: 2017/06/29 更新: 2017/06/30 最开头的有效路径展示补充网页版 更新: 2017/07/21 修正错别字 更新: 2017/09/02 增加m ...
- Factstone Benchmark(数学)
http://poj.org/problem?id=2661 题意:Amtel在1960年发行了4位计算机,并实行每十年位数翻一番的策略,将最大整数n作为改变的等级,其中n!表示计算机的无符号整数(n ...
- Aspose Cells dll 实现数据简单下载
Workbook workbook = new Workbook(); //工作簿 Worksheet sheet = workbook.Worksheets[ ...
- Android开发之Intent.Action Android中Intent的各种常见作用
1 Intent.ACTION_MAIN String: android.intent.action.MAIN 标识Activity为一个程序的开始.比较常用. Input:nothing Outpu ...
- Ubuntu下搭建repo服务器(三): 搭建Android repo服务器
1. 配置repo 1.1 下载git-repo.git(B端) mkdir -p ~/gitCfg cd ~/gitCfg git clone https://gerrit.googlesourc ...
- 使用A*寻路小记
前几天做另一个DEMO 要用实现自动寻路功能,看到普遍都是A* 学习了下 我的主循环代码: isFindEndPoint = false; //主循环 do { CreateOutSkirtsNode ...
- JVM 优化之逃逸分析
整理自 周志明<深入JVM> 1, 是JVM优化技术,它不是直接优化手段,而是为其它优化手段提供依据. 2,逃逸分析主要就是分析对象的动态作用域. 3,逃逸有两种:方法逃逸和线程逃逸. ...
- 实现PC延迟执行函数
头文件内容: #pragma once typedef function<void ()> DelayClickHandler; typedef void (*pDelayFun)(); ...
- CSS——行内元素的margin与padding
行内元素: 1.margin:0 20px:只可以定义左右. 2.pading:20px 20px 20px 20px:上下左右都有效 例如span: <!DOCTYPE html> &l ...