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函数会简单回显任何用户输入的字符串. ...
随机推荐
- 【Codeforces】 Round #374 (Div. 2)
Position:http://codeforces.com/contest/721 我的情况 开始还是rank1,秒出C.(11:00机房都走光了,我ma到11:05才走,只打了一个小时) 结果.. ...
- DVB条件接收系统多密技术的设计与实现
1相关技术比较 1.1DVB同密 DVB同密技术的目的是将两家或两家以上的CA系统应用于同一网络平台中,从电视台角度实现技术的选择和竞争的环境.同密允许在传输的同一套节目流中携带由不同CAS生成的多个 ...
- 65. ExtJs获取文本框中值的几种方式
转自:https://blog.csdn.net/qiu512300471/article/details/17415675/ 1.Html文本框 如:<input type=" ...
- 我的周记1——”云想衣裳花想容"
这里记录过去一周,我学习到的,思考的,看到的,每周五发布. http 网上参考http入门协议 https://juejin.im/post/5afad7f16fb9a07abf72ac30 超文本 ...
- array_column()函数兼容低版本
array_column 用于获取二维数组中的元素(PHP 5.5新增函数),但我们有时候需要在低版本的 function i_array_column($input, $columnKey, $in ...
- c#异步多线程
1.asyncrel = delegate.BeginInvoke实现委托异步调用. 2.异步等待 asyncrel.IsCompleted用于判断是否执行完毕 or EndInvoke用于等待执行完 ...
- layer实现在前台删除前确认弹出框,并回调后台删除事件
最近遇到一些问题,用layer提示消息框,比如删除时,提示消息确定后 return false时,则不管用了,因为layer不支持阻塞,下面就解决一下这个问题:(本文使用Xcode,如要学习,请复下面 ...
- Unity3d dotween
位置 1. 移动到指定位置 obj.transform.DOMove(, , ), 2f); a. 单方向可以用DOMoveX.DOMoveY.DOMoveZ b. 本地坐标系版本:DOLocalMo ...
- ThinkPHP的基础使用
最近学习了ThinkPHP框架写页面,趁着夜色写写自己的一些经验: 我这里用的服务器是phpStudy,数据库是Navicat,项目必须放在phpStudy的WWW目录里面. 1,搭建th项目 1.将 ...
- Android RecyclerView notifyDataSetChanged不起作用
一般listview设置完data后调用notifyDataSetChanged便可刷新布局界面,然而recycleview调用这个方法却没有任何反应.对于很多不熟悉recycleview的话很容易躺 ...