Basic Vlan Configure
Basic Vlan CLI Configure
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#vlan 10
Switch(config-vlan)#name hello
Switch(config-vlan)#exit
Switch(config)#int range fastethernet0/1-10
Switch(config-if-range)#switchport access vlan 10
Switch(config-if-range)#end
Switch#
%SYS-5-CONFIG_I: Configured from console by console
Switch#
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#int range fastethernet0/11-20
Switch(config-if-range)#switchport access vlan 3
% Access VLAN does not exist. Creating vlan 3
Switch(config-if-range)#end
Switch#
%SYS-5-CONFIG_I: Configured from console by console
Switch#show vlan brief
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/21, Fa0/22, Fa0/23, Fa0/24
Gig1/1, Gig1/2
3 VLAN0003 active Fa0/11, Fa0/12, Fa0/13, Fa0/14
Fa0/15, Fa0/16, Fa0/17, Fa0/18
Fa0/19, Fa0/20
10 hello active Fa0/1, Fa0/2, Fa0/3, Fa0/4
Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
Switch#
Vlan Trunking Configuration
DTP: consider the type of trunking. Cisco switches that support ISL and 802.1Q can negotiate which type to use, using the Dynamic Trunking Protocol (DTP). If both switches support both protocols, they use ISL; otherwise, they use the protocol that both support. Today, many Cisco switches do not support the older ISL trunking protocol.
DTP can also negotiate whether the two devices on the link agree to trunk at all, as guided by the local switch port’s administrative mode. The administrative mode refers to the configuration setting for whether trunking should be used. Each interface also has an operational mode, which refers to what is currently happening on the interface, and might have been chosen by DTP’s negotiation with the other device. Cisco switches use the switchport mode interface subcommand to define the
administrative trunking mode
Trunking Administrative Mode Options with the switchport mode Command
Expected Trunking Operational Mode Based on the Configured Administrative Modes
Cisco recommends disabling trunk negotiation on most ports for better security. The majority of switch ports on most switches will be used to connect to users. As a matter of habit, you can disable DTP negotiations altogether using the switchport nonegotiate interface subcommand.
Controlling Which VLANs Can Be Supported on a Trunk
The allowed VLAN list feature provides a mechanism for engineers to administratively disable a VLAN from a trunk. By default, switches include all possible VLANs (1–4094) in each trunk’s allowed VLAN list. However, the engineer can then limit the VLANs allowed on the trunk by using the following interface subcommand:
switchport trunk allowed vlan {add | all | except | remove} vlan-list
This command provides a way to easily add and remove VLANs from the list. For example, the add option permits the switch to add VLANs to the existing allowed VLAN list, and the remove option permits the switch to remove VLANs from the existing list. The all option means all VLANs, so you can use it to reset the switch to its original default setting (permitting VLANs 1–4094 on the trunk). The except option is rather tricky: It adds all VLANs to the list that are not part of the command. For example, the switchport trunk allowed vlan except 100-200 interface subcommand adds VLANs 1 through 99 and 201 through 4094 to the existing allowed VLAN list on that trunk.
switches do not forward frames in nonexistent VLANs or a shutdown VLAN over any of the switch’s trunks.
Mind Map
Practice
Switch 0:
Switch(config)#int gigabit1/1
Switch(config-if)#switchport mode trunk
Switch(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/1, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/1, changed state to up
Switch#show interface gigabit1/1 switchport
Name: Gig1/1
Switchport: Enabled
Administrative Mode: trunk
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk private VLANs: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL
Protected: false
Appliance trust: none
Switch#
Switch 1:
Switch#show interface gigabit1/2 switchport
Name: Gig1/2
Switchport: Enabled
Administrative Mode: dynamic auto
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk private VLANs: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL
Protected: false
Appliance trust: none
Switch#
Basic Vlan Configure的更多相关文章
- Basic Vlan Concepts
1. Vlan Benefit ·To reduce CPU overhead on each device by reducing the number of devices that recei ...
- Openwrt VLAN Configure(2)
1 Scope of Document This document describes vlan design on nodewrt2p 2 Requiremen 2.1 ...
- docker官方文档学习-1-Docker for mac安装配置
https://docs.docker.com/docker-for-mac/ Get started with Docker for Mac 首先像在本博客docker-1-环境安装及例子实践处将环 ...
- [网络] DHCP 之 Mac 绑定
[网络] DHCP 之 Mac 绑定 一.瞎扯 今天我们来简单聊聊Mac绑定,这在设备管理时常常被使用. 当然你可能会说我可以设置静态IP啊.先不提静态IP容易冲突.现在我在设置树莓派时就遇到一个问题 ...
- 国产深度学习框架mindspore-1.3.0 gpu版本无法进行源码编译
官网地址: https://www.mindspore.cn/install 所有依赖环境 进行sudo make install 安装,最终报错: 错误记录信息: cat /tmp/mind ...
- Configure a VLAN on top of a team with NetworkManager (nmcli) in RHEL7
SOLUTION VERIFIED September 13 2016 KB1248793 Environment Red Hat Enterprise Linux 7 NetworkManager ...
- Configure a bridge interface over a VLAN tagged bonded interface
SOLUTION VERIFIED February 5 2014 KB340153 Environment Red Hat Enterprise Linux 6 (All Versions) Red ...
- Qt安装过程中: configure 时发生的经典出错信息之”Basic XLib functionality test failed!”(Z..z..) 之 MySQL support cannot be enabled due to functionality test!
整出错信息是在./configure阶段Basic XLib functionality test failed!You might need to modify the include and li ...
- Configure a VLAN (on top of a bond) with NetworkManager (nmcli) in RHEL7
not on top of a bond Environment Red Hat Enterprise Linux 7 NetworkManager Issue Need an 802.1q VLAN ...
随机推荐
- 【Shell脚本学习2】Shell脚本语言与编译型语言的差异
大体上,可以将程序设计语言可以分为两类:编译型语言和解释型语言. 编译型语言 很多传统的程序设计语言,例如Fortran.Ada.Pascal.C.C++和Java,都是编译型语言.这类语言需要预先将 ...
- centos(linux) 下如何查看端口占用情况及杀死进程
使用这个命令:netstat -nap [root@Jaosn sphinx]# netstat -nap Active Internet connections (servers and estab ...
- 《Cortex-M0权威指南》之体系结构---栈空间操作
转载请注明来源:cuixiaolei的技术博客 栈空间作为一种存储器使用机制,是"先入先出"的结构,在系统空间中用作临时数据的存储.栈空间操作的关键之一为栈指针寄存器,每次执行栈操 ...
- apache2.4 +django1.9+python3+ubuntu15.10
这是我这几天学习部署django的总结,中间出现了不少的问题.特此记录下来,用来复习巩固,同时也希望给想学习的同学一些参考. 第一步:我在ubuntu上装的是python3.sudo apt-get ...
- VMware系统运维(十一)部署虚拟化桌面 Horizon View 5.2 HTML ACCESS安装
如果你希望在浏览器上面能够连接到用户桌面,那么HTML ACCESS是必须安装的,下面开始安装. 1.点击红框文件 2.打开安装向导,点击"下一步" 3.接受协议,点击" ...
- Linux双网卡绑定和解除绑定的实现
双网卡绑定实现就是使用两块网卡虚拟成为一块网卡,这个聚合起来的设备看起来是一个单独的以太网接口设备,通俗点讲就是两块网卡具有相同的IP地址而并行链接聚合成一个逻辑链路工作.根据交换机可支持的功能不 ...
- iOS小技巧 - 和屏幕等宽的Table分割线
前言 因为本人也是学习iOS才一个多月,在写程序的过程中经常会遇到一些看似应该很简单,但是要解决好却要知道一点小trick的问题. 因此后面会陆续记一些这类问题,一来加深印象,二来也可以做个备忘录. ...
- HTML中的英文缩写标记、属性
我们知道是表示一个空格,因为在HTML中手动敲多个空格浏览器会认为是一个空格,具体的英文全称:Non Breaking Spacing 不间断空格
- Slickflow.NET 开源工作流引擎基础介绍(二) -- 引擎组件和业务模块的交互
集成流程引擎的必要性 业务过程的变化是在BPM系统中常见的现象,企业管理层需要不断优化组织架构,改造业务流程,不可避免地带来了业务流程的变化,企业信息系统就会随之面临重构的可能性.一种直接的方式是改造 ...
- 用Drawing画图如何不会消失
方法一:将事件放在form_Load中,在窗体中画图 1: protected void MainForm_Load(object sender,EventArgs e) 2: { 3: Init ...