vlan配置命令
# 为VLAN10 指定一个描述字符串“connect to LAB1”。
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] vlan 10
[Sysname-vlan10] description connect to LAB1
# 为Vlan-interface1 接口指定一个描述字符串“gateway of LAB1”
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Vlan-interface 1
[Sysname-Vlan-interface1] description gateway of LAB1
# 显示所有已创建的VLAN 接口的相关信息。
<Sysname> display interface Vlan-interface 1
Vlan-interface1 current state :UP
Line protocol current state :UP
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 00e0-fc00-5191
Internet Address is 192.168.0.1/24 Primary
Internet Address is 10.1.1.1/24 Sub
Description : Vlan-interface1 Interface
The Maximum Transmit Unit is 1500
# 显示VLAN1 的信息。
<Sysname> display vlan 1
VLAN ID: 1
VLAN Type: static
Route Interface: configured
IP Address: 192.168.0.39
1-4
Subnet Mask: 255.255.255.0
Description: VLAN 0001
Name: VLAN 0001
Tagged Ports:
GigabitEthernet1/0/1
Untagged Ports:
GigabitEthernet1/0/2
# 为VLAN1 创建对应的VLAN 接口并进入Vlan-interface1 的接口视图。
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Vlan-interface 1
[Sysname-Vlan-interface1]
# 指定VLAN 2 的名称为“test vlan”。
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] vlan 2
[Sysname-vlan2] name test vlan
# 关闭Vlan-interface2 接口。
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Vlan-interface 2
[Sysname-Vlan-interface2] shutdown
# 创建VLAN5 并进入VLAN5 的视图。
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] vlan 5
[Sysname-vlan5]
# 删除VLAN 5。
[Sysname-vlan5] quit
[Sysname] undo vlan 5
# 创建VLAN 4 到VLAN 100。
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] vlan 4 to 100
Please wait............. Done.
# 批量删除VLAN2 到VLAN9,其中VLAN 7 已经被配置为Voice VLAN。
[Sysname] undo vlan 2 to 9
Note:The VLAN kept by protocol, the voice VLAN, the default VLAN, the management VLAN and
the remote probe VLAN will not be deleted!
Please wait... Done.
[Sysname] display vlan
The following VLANs exist:
1(default), 7
以上信息表示,已经被配置为Voice VLAN 的VLAN 无法使用undo vlan 命令直接删除,其他VLAN
已经被正常删除。
# 显示当前系统存在的Hybrid 端口。
<Sysname> display port hybrid
The following hybrid ports exist:
GigabitEthernet1/0/1 GigabitEthernet1/0/2
以上信息表示当前系统有两个Hybrid 端口,分别为GigabitEthernet1/0/1 和GigabitEthernet1/0/2。
# 向VLAN 2 中加入从GigabitEthernet1/0/2 到GigabitEthernet1/0/4 的以太网端口。
1-9
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] vlan 2
[Sysname-vlan2] port GigabitEthernet 1/0/2 to GigabitEthernet 1/0/4
# 将GigabitEthernet1/0/1 端口加入到VLAN3 中。
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface GigabitEthernet 1/0/1
[Sysname-GigabitEthernet1/0/1] port access vlan 3
# 将Hybrid 端口GigabitEthernet1/0/1 的缺省VLAN 设为100。
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface GigabitEthernet 1/0/1
[Sysname-GigabitEthernet1/0/1] port link-type hybrid
[Sysname-GigabitEthernet1/0/1] port hybrid pvid vlan 100
# 将Hybrid 端口GigabitEthernet1/0/1 加入到VLAN2、VLAN4、VLAN50~VLAN100 中(假设指
定的VLAN 都已经创建),并且设置该端口在发送这些VLAN 的报文时将保留VLAN Tag。
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface GigabitEthernet 1/0/1
[Sysname-GigabitEthernet1/0/1] port link-type hybrid
[Sysname-GigabitEthernet1/0/1] port hybrid vlan 2 4 50 to 100 tagged
# 将以太网端口GigabitEthernet1/0/1 设置为Trunk 端口。
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface GigabitEthernet 1/0/1
1-12
[Sysname-GigabitEthernet1/0/1] port link-type trunk
# 将Trunk 端口GigabitEthernet1/0/1 加入到VLAN2、VLAN4、VLAN50~VLAN 100 中。
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface GigabitEthernet 1/0/1
[Sysname-GigabitEthernet1/0/1] port link-type trunk
[Sysname-GigabitEthernet1/0/1] port trunk permit vlan 2 4 50 to 100
Please wait... Done.
# 将Trunk 端口GigabitEthernet1/0/1 的缺省VLAN 设为100。
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface GigabitEthernet 1/0/1
[Sysname-GigabitEthernet1/0/1] port link-type trunk
[Sysname-GigabitEthernet1/0/1] port trunk pvid vlan 100
# 显示端口GigabitEthernet1 /0/1 和GigabitEthernet1/0/2 上所配置的协议信息及协议的索引。
<Sysname> display protocol-vlan interface GigabitEthernet 1/0/1 to GigabitEthernet 1/0/2
Interface: GigabitEthernet1/0/1
VLAN ID Protocol-Index Protocol-type
50 0 ip
80 1 ip
100 0 ip
100 1 ipx ethernetii
Interface: GigabitEthernet1/0/2
VLAN ID Protocol-Index Protocol-type
50 1 ipx raw
80 2 at
100 3 snap etype 0x0abc
100 4 llc dsap 0xac ssap 0xbd
# 显示VLAN10 到VLAN20 上所配置的协议信息及协议的索引。
<Sysname> display protocol-vlan vlan 10 to 20
VLAN ID: 10
VLAN Type: Protocol-based VLAN
Protocol-Index Protocol-Type
0 ip
1 ip
2 ipx ethernetii
3 at
VLAN ID: 15
VLAN Type: Protocol-based VLAN
Protocol-Index Protocol-Type
0 ip
1 snap etype 0x0abcd
# 将GigabitEthernet1/0/1 端口与协议VLAN 3 中索引值为0 到2 的协议模板进行绑定(假设相应
的协议模板已经创建)。
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface GigabitEthernet 1/0/1
[Sysname-GigabitEthernet1/0/1] port hybrid protocol-vlan vlan 3 0 to 2
# 取消GigabitEthernet1/0/1 端口与协议VLAN3 中索引值为1 到4 之间的协议模板的绑定关系。
[Sysname-GigabitEthernet1/0/1] undo port hybrid protocol-vlan vlan 3 1 to 4
Protocol index 1 does not exist in VLAN 3
Protocol index 4 does not exist in VLAN 3
vlan配置命令的更多相关文章
- H3C交换机配置命令(收集)
1:配置登录用户,口令等 <H3C> //用户直行模式提示符,用户视图 <H3C>system-view //进入配置视图 [ ...
- IB交换机配置命令总结
串口通过远程CRT登录,波特率9600用户名和密码都是adminDo you want to use the wizard for initial configuration?选择no打开ip rou ...
- 思科Cisco 2960系列交换机配置命令
配置密码: 2960>en :第一次密码为空 2960h#conf t :进入全局配置模式 2960(config)#hostname swa :设置交换机名 2960(config)#enab ...
- CISCO动态VLAN配置
一.基于VMPS的动态VLAN配置实例 网络中VLAN实现分为静态 VLAN和动态VLAN.静态VLAN又被称为是基于端口的VLAN.顾名思义,就是明确指定各端口属于哪个VLAN的设定方法,交换机中某 ...
- CISCO3560 VLAN配置实例
1.注意事项 1.1.交换机启动需要大约4-5分钟: 1.2.网线插入交换机接口从黄变为绿需要大约1-2分钟,即进入正常工作模式: 1.3.建议使用XP系统进行操作,2003默认没有安装超级终端,需要 ...
- [HCNA]VLAN配置Hybrid接口
实验名称 VLAN配置Hybrid接口 日期 2018年4月13日 实验目的 1.掌握配置Hybrid接口的方法. 2.理解Hybrid接口处理Untagged数据帧过程 3.理解Hybrid接口处理 ...
- swconfig--交换接口配置命令
swconfig是交换接口(switch)配置命令. swconfig list ; 列出可用的SWITCH设备信息(dev参数) Found: switch0 - ag71xx-mdio. swco ...
- HCNP学习笔记之史上最全华为路由器交换机配置命令大合集
先来一张思科和华为命令的对照表: 史上最全华为路由器交换机配置命令大合集,熟练掌握下面的华为路由器交换机配置知识点,你只需花几分钟的时间就能明白华为路由器交换机配置.交换机的配置命令等等. 华为路由器 ...
- Linux 网桥配置命令:brctl
Linux网关模式下将有线LAN和无线LAN共享网段实现局域网内互联: 思路其实很简单:就是将虚拟出一个bridge口,将对应的有线LAN和无线LAN都绑定在这个虚拟bridge口上,并给这个brid ...
随机推荐
- iOS开发中断言的使用—NSAssert()
原文链接:http://blog.csdn.net/univcore/article/details/16859263 断言(assertion)是指在开发期间使用的.让程序在运行时进行自检的代码(通 ...
- Spark累加器
spark累计器 因为task的执行是在多个Executor中执行,所以会出现计算总量的时候,每个Executor只会计算部分数据,不能全局计算. 累计器是可以实现在全局中进行累加计数. 注意: 累加 ...
- Windows Server 2008 R2 Enterprise 上用 SqlServer 2008 R2 创建发布出现异常
标题: 新建发布向导------------------------------ SQL Server 无法将“AC”配置为分发服务器. ------------------------------其 ...
- (转载)Java中对List集合内的元素进行顺序、倒序、随机排序的示例代码
1 import java.util.Collections; 2 import java.util.LinkedList; 3 import java.util.List; 4 5 public c ...
- 在JSP中常见问题,防止SpringMVC拦截器拦截js等静态资源文件的解决方案
方案一.拦截器中增加针对静态资源不进行过滤(涉及spring-mvc.xml) <mvc:resources location="/" mapping="/**/* ...
- windows 老掉牙CMD的命令
再老,也得温习下: net use \\' /user:'administrator' //ipc连接 net use \\127.0.0.1\ipc$ /delete //退出ipc net use ...
- Hive 外部表新增字段或者修改字段类型等不生效
标题比较笼统,实际情况是: 对于Hive 的分区外部表的已有分区,在对表新增或者修改字段后,相关分区不生效. 原因是:表元数据虽然修改成功,但是分区也会对应列的元数据,这个地方不会随表的元数据修改而修 ...
- Java时间的使用
JAVA处理日期时间常用方法: 1.java.util.Calendar Calendar 类是一个抽象类,它为特定瞬间与一组诸如 YEAR.MONTH.DAY_OF_MONTH.HOUR 等 日历字 ...
- spring之IOC模拟实现
使用Spring框架已经有很长时间了,一直没有仔细的想过框架的设计思想是什么样的,底层到底是怎么实现的,这几天调试程序看了些源码,写下来做个记录.由于Spring框架博大精深,个人理解的难免有不正确的 ...
- Golang之并发资源竞争(互斥锁)
并发本身并不复杂,但是因为有了资源竞争的问题,就使得我们开发出好的并发程序变得复杂起来,因为会引起很多莫名其妙的问题. package main import ( "fmt" &q ...