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函数会简单回显任何用户输入的字符串. ...
随机推荐
- Android横竖屏切换不重新调用onCreate()
再次感叹Android的碎片化!!!! 设置AndroidManifest.xml中Activity的android:configChanges=”keyboardHidden|orientation ...
- Tiny4412 开发板 编译环境搭建【转】
本文转载自:http://blog.csdn.net/beijiwei/article/details/51055369 版权声明:本文为博主原创文章,未经博主允许不得转载. /*********** ...
- bzoj 3721 Final Bazarek
题目大意: n个数 选k个使和为奇数且最大 思路: 可以先将这n个数排序 然后先去最大的k个数 若和为奇数则直接输出 为偶数可以用没选的最大的奇数替换选了的最小的偶数或用没选的最大的偶数替换选了的最小 ...
- Coursera Algorithms week3 快速排序 练习测验: Selection in two sorted arrays(从两个有序数组中寻找第K大元素)
题目原文 Selection in two sorted arrays. Given two sorted arrays a[] and b[], of sizes n1 and n2, respec ...
- PCB Genesis脚本 C#调用Javascript
曾经用node.js测试写Genesis脚本失败了,这次借助开发PCB规则引擎的机会(基于JS V8引擎与.net深度交互性), 验证一下Javascript是否可用于写Genesis脚本. 一.测试 ...
- E20170930-hm
parse vt. 从语法上描述或分析(词句等);
- akka设计模式系列(Actor模型)
谈到Akka就必须介绍Actor并发模型,而谈到Actor就必须看一篇叫做<A Universal Modular Actor Formalism for Artificial Intellig ...
- Codeforces 792C
题意:给出一个由0到9数字构成的字符串,要求删去最少的数位,使得这个字符串代表的数能被3整除,同时要求不能有前导零,并且至少有一位(比如数字11,删去两个1后就没有数位了,所以不符合).如果能够处理出 ...
- [Luogu 1052] noip 05 过河
[Luogu 1052] noip 05 过河 题目描述 在河上有一座独木桥,一只青蛙想沿着独木桥从河的一侧跳到另一侧.在桥上有一些石子,青蛙很讨厌踩在这些石子上.由于桥的长度和青蛙一次跳过的距离都是 ...
- 349 Intersection of Two Arrays 两个数组的交集
给定两个数组,写一个函数来计算它们的交集.例子: 给定 num1= [1, 2, 2, 1], nums2 = [2, 2], 返回 [2].提示: 每个在结果中的元素必定是唯一的. 我们 ...