》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地址、子网地址、协议)的更多相关文章

  1. Huawei-R&S-网络工程师实验笔记20190525-设备登录、VRP基本配置、文件系统

    >Huawei-R&S-网络工程师实验笔记20190525-设备登录.VRP基本配置.文件系统(环回接口.telnet远程.AAA登录.命令行.时钟.banner.文件目录) >& ...

  2. Huawei-R&S-网络工程师实验笔记20190524-VRP的系统、接口视图下基本操作

    >Huawei-R&S-网络工程师实验笔记20190524-VRP的系统.接口视图下基本操作(重命名.配置IP.VLAN接口.双工模式.console口) >>实验开始,先上 ...

  3. Huawei-R&S-网络工程师实验笔记20190530-FTP上传下载、STelnet登录、SFTP登录

    >Huawei-R&S-网络工程师实验笔记20190530-FTP上传下载.STelnet登录.SFTP登录 >>实验开始,参考<Huawei-R&S-网络工程 ...

  4. Huawei-R&S-网络工程师实验笔记20190527-华为设备密码重置、设置web管理

    >Huawei-R&S-网络工程师实验笔记20190527-华为设备密码重置.设置web管理 >>实验开始(使用SecureCRT 等工具软件): 一.华为设备密码重置,通过 ...

  5. Huawei-R&S-网络工程师实验笔记20190607-STP生成树协议(基本配置、桥优先级、根桥选举、根端口、路径开销、边缘端口)

    >Huawei-R&S-网络工程师实验笔记20190607-STP生成树协议(基本配置.桥优先级.根桥选举.根端口.路径开销.边缘端口) >>实验开始,先上拓扑图参考: &l ...

  6. Huawei-R&S-网络工程师实验笔记20190615-IP基础(AR201上配置IP)

    >Huawei-R&S-网络工程师实验笔记20190615-IP基础(AR201上配置IP) >>实验开始,先上拓扑图参考: >>>一般正常配置IP操作如下 ...

  7. Huawei-R&S-网络工程师实验笔记20190609-VLAN划分综合(Hybrid端口)

    >Huawei-R&S-网络工程师实验笔记20190609-VLAN划分综合(Hybrid端口) >>实验开始,先上拓扑图参考: >>>实验目标:分别实现主 ...

  8. Huawei-R&S-网络工程师实验笔记20190609-VLAN划分综合(Access和Trunk端口)

    >Huawei-R&S-网络工程师实验笔记20190609-VLAN划分综合(Access和Trunk端口) >>实验开始,先上拓扑图参考: >>>实验目标 ...

  9. 网络对抗实验一 逆向及Bof基础实践

    网络对抗实验一 逆向及Bof基础实践 一.实验目的 本次实践的对象是一个名为pwn1的linux可执行文件. 该程序正常执行流程是:main调用foo函数,foo函数会简单回显任何用户输入的字符串. ...

随机推荐

  1. MODULE_DEVICE_TABLE的理解【转】

    本文转载自:http://blog.csdn.net/sidely/article/details/39666471 在Linux IIC驱动中看到一段代码: static struct platfo ...

  2. 修改select默认样式

    http://www.qkzone.com/code/2015-11-26/1.html

  3. java SWing事件调用的两种机制

      Java(91)  /** * java swing中事件调用的两种机制: * (一)响应机制 * (二)回调机制 */ package test; import java.awt.*; impo ...

  4. 47. Ext.form.Field.prototype.msgTarget

    转自:https://blog.csdn.net/a1542aa/article/details/24295791 ExtJS.form中msgTarget Ext表单提示方式:msgTarget:有 ...

  5. putty+Xmanager登陆Linux,实现图形界面操作.

  6. 【RAID在数据库存储上的应用 】

    随着单块磁盘在数据安全.性能.容量上呈现出的局限,磁盘阵列(Redundant Arrays of Inexpensive/Independent Disks,RAID)出现了,RAID把多块独立的磁 ...

  7. 9.2NOIP模拟题

    9.2 NOIP模拟 题目名称 “与” 小象涂色 行动!行动! 输入文件 and.in elephant.in move.in 输出文件 and.out elephant.in move.in 时间限 ...

  8. HTML--文本域,支持多行文本输入

    当用户需要在表单中输入大段文字时,需要用到文本输入域. 语法: <textarea rows="行数" cols="列数">文本</texta ...

  9. ASP.NET MVC5 之数据迁移

    SQL 中新建数据库 DataSystem 1.web.config 数据库连接字符串: <add name="APPDataConnection" connectionSt ...

  10. Coursera公开课-Machine_learing:编程作业7

    这周的编程作业主要是两方面内容. 1.K-means聚类. 2.PCA(Principle Component Analys)主成分分析. 方式主要是通过对图像的聚类实现压缩图像,后来发现PCA也可以 ...