上一页大家津津乐道cisco基本操作命令开关,而端午假期,该cisco简单的开关配置,并希望请您分享“端午节快乐”!Ok,配置交换机,首先,你必须进入全局配置模式Switch,在成功连接开关和着陆成功进入特权模式

1、进入全局配置模式:

switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)#
switch(config)#
switch(config)#

这么简单的一条命令,俺们就进入到全局配置模式了,还记得上一篇中查看port所查询到的信息中name字段下的值吗?这字段事实上代表的是交换机port的描写叙述信息

2、改动port描写叙述

switch#
switch#
switch#conf ter
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)#
switch(config)#int fa0/3
switch(config-if)#
switch(config-if)#desc
switch(config-if)#description updateDesc
switch(config-if)#
switch(config-if)#exit
switch(config)#exit
switch#
switch#show inter
switch#show interfaces statu
switch#show interfaces status Port Name Status Vlan Duplex Speed Type
Fa0/1 connected 1 a-full a-100 10/100BaseTX
Fa0/2 h3c2.250 connected trunk a-full a-100 10/100BaseTX
Fa0/3 updateDesc notconnect 1 auto auto 10/100BaseTX
Fa0/4 connected 1 a-full a-100 10/100BaseTX
Fa0/5 h3c-2.200 connected 1 a-full a-100 10/100BaseTX
Fa0/6 notconnect 1 auto auto 10/100BaseTX

改动描写叙述的关键命令在于,在配置模式下。进入到要改动的port下,然后使用description + “内容”。效果应该非常直观了吧。接下来就是改动port的所在Vlan了

3、改动portVlan

switch#
switch#
switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)#
switch(config)#int fa0/3
switch(config-if)#
switch(config-if)#sw acc vl 2
switch(config-if)#
switch(config-if)#exit
switch(config)#
switch(config)#exit
switch#
switch#show inter statu Port Name Status Vlan Duplex Speed Type
Fa0/1 connected 1 a-full a-100 10/100BaseTX
Fa0/2 h3c2.250 connected trunk a-full a-100 10/100BaseTX
Fa0/3 updateDesc notconnect 2 auto auto 10/100BaseTX
Fa0/4 connected 1 a-full a-100 10/100BaseTX
Fa0/5 h3c-2.200 connected 1 a-full a-100 10/100BaseTX
Fa0/6 notconnect 1 auto auto 10/100BaseTX

逻辑和改动port描写叙述是一样的,对于配置来说,肯定是到了能有配置权限的地方和要配置的对象。这里改动portVlan的关键命令为:sw acc vl + vlantag,命令非常明显被简写了,可是不影响运行。命令的全写为:switchport access vlan + vlantag

另一些对port的简单操作,譬如改动port的模式,

4、改动port模式

switch(config-if)#switchport trunk encap dot1q ----------------设置vlan 中继的封装协议
注:dot1q就是 IEEE 802.1Q协议,是vlan的一种封装方式,是公有协议。 另一种trunk协议,是ISL,也是vlan的一种封装方式,只是这是Cisco思科私有协议。其它厂商不能用。
switch(config-if)#switchport mode trunk ------------------------设置端口类型为trunk
switch(config-if)#switchport trunk allowed vlan 1。2 ---------设置同意的vlan。默认不用配置。为全部vlan
switch(config-if)#switchport trun native vlan 999 ---------------设置trunk口的native vlan

5、port状态

switch(config)#
switch(config)#int fa0/3
switch(config-if)#
switch(config-if)#
switch(config-if)#sw acc vl 1
switch(config-if)#
switch(config-if)#
switch(config-if)#shutd
switch(config-if)#shutdown
switch(config-if)#
switch(config-if)#exit
switch(config)#
switch(config)#exit
switch#
switch#show inter statu Port Name Status Vlan Duplex Speed Type
Fa0/1 connected 1 a-full a-100 10/100BaseTX
Fa0/2 h3c2.250 connected trunk a-full a-100 10/100BaseTX
Fa0/3 updateDesc disabled 1 auto auto 10/100BaseTX
Fa0/4 connected 1 a-full a-100 10/100BaseTX

上面的一系列为切换Vlan,而且shutdownport,这时候大家可能看到了交换机3号port的状态已变成disable了,假设我们要启用port仅仅需

switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)#
switch(config)#int fa0/3
switch(config-if)#
switch(config-if)#no shut
switch(config-if)#no shutdown
switch(config-if)#
switch(config-if)#exit
switch(config)#
switch(config)#exit
switch#
switch#show inter statu Port Name Status Vlan Duplex Speed Type
Fa0/1 connected 1 a-full a-100 10/100BaseTX
Fa0/2 h3c2.250 connected trunk a-full a-100 10/100BaseTX
Fa0/3 updateDesc notconnect 1 auto auto 10/100BaseTX
Fa0/4 connected 1 a-full a-100 10/100BaseTX

今天就到这里了。有时间再来和大家分享一下在工作上须要的而且对自己非常实用的东西与知识。请继续关注下一个——在交换机登录某些设置

版权声明:本文博客原创文章,博客,未经同意,不得转载。

cisco(思科)交换机配置篇【两】的更多相关文章

  1. 思科交换机配置DHCP的四个方面

    这里我们主要讲解了思科交换机配置DHCP的相关内容.我们对网络拓扑先进行一下了解,然后对于其在进行一下说明,之后对于配置的代码和命令再进行一下解析. 思科交换机配置DHCP一.网络拓扑 思科交换机配置 ...

  2. [CISCO] 思科交换机基本配置

    思科交换机基本配置 交换机是局域网中最重要的设备,交换机是基于 MAC 来进行工作的.和路由器类似,交换 机也有 IOS,IOS 的基本使用方法是一样的.本章将简单介绍交换机的一些基本配置,以及交换 ...

  3. Cisco 2960交换机配置

    一. 基本操作 Switch(config)#hostname test01(交换机名称) //全局模式下修改交换机名称 Switch(config)#enable secret 123456 //全 ...

  4. Cisco路由器交换机配置命令详解

    1. 交换机支持的命令: 交换机基本状态:switch: :ROM状态, 路由器是rommon>hostname> :用户模式hostname# :特权模式hostname(config) ...

  5. cisco san交换机配置

    1.配置交换机的管理地址switch(config)# interface mgmt 0 switch(config-if)# ip adress 192.168.100.108 255.255.25 ...

  6. 思科交换机配置单播MAC地址过滤

    1.其他厂商: 在华为,华三等设备上,我们都有“黑洞MAC地址表项” 的配置,其特点是手动配置.不会老化,且重启后也不会丢失.例如如下示例: 黑洞表项是特殊的静态MAC地址表项,丢弃含有特定源MAC地 ...

  7. cisco思科交换机终端远程ssh另一端报错:% ssh connections not permitted from this terminal

    故障现象: XSJ-GH10-C3750->ssh 58.64.xx.xx% ssh connections not permitted from this terminal 解决办法: 原因: ...

  8. Cisco思科模拟器 交换机IP地址的配置 入门详解 - 精简归纳

    Cisco思科模拟器 交换机IP地址的配置 入门详解 - 精简归纳 JERRY_Z. ~ 2020 / 10 / 10 转载请注明出处!️ 目录 Cisco思科模拟器 交换机IP地址的配置 入门详解 ...

  9. 交换机配置——Cisco(思科)-交换机初始化配置

    一.实验目的:完成一台交换机的初始化配置,并且可以用telnet登录 二.拓扑图如下: 三.实验步骤 1.创建一台交换机(S1)和一台主机(PC1) 2.先给PC1主机设置IP地址: 3.S1配置: ...

随机推荐

  1. 使MYSQL能被外部访问_xeyuu_新浪博客

    使MYSQL能被外部访问_xeyuu_新浪博客 使MYSQL能被外部访问 (

  2. Servlet和JSP读书笔记(二)

    一. GenericServlet 1. 前面写的 Servlet和JSP学习笔记(一) 中的实例都是通过实现Servlet接口编写的,这样存在的问题就是:你必须实现Servlet中的所有方法,而不管 ...

  3. php获取server端mac和clientmac的地址

    获取servermac <?php /** 获取网卡的MAC地址原码:眼下支持WIN/LINUX系统 获取机器网卡的物理(MAC)地址 **/ class GetmacAddr{ var $re ...

  4. nginx+tomcat负载均衡策略

    測试环境均为本地,測试软件为: nginx-1.6.0,apache-tomcat-7.0.42-1.apache-tomcat-7.0.42-2.apache-tomcat-7.0.42-3 利用n ...

  5. onkeypress事件.onkeydown事件.onkeyup事件

    onkeypress事件是在按键開始按的时候发生: onkeydown事件是在按键已经按下的时候发生: onkeyup事件是在按键松开(释放)的时候发生.

  6. 《Java并发编程实战》第十六章 Java内存模型 读书笔记

    Java内存模型是保障多线程安全的根基,这里不过认识型的理解总结并未深入研究. 一.什么是内存模型,为什么须要它 Java内存模型(Java Memory Model)并发相关的安全公布,同步策略的规 ...

  7. VS Code开发调试.NET Core

    使用VS Code开发 调试.NET Core 应用程序   使用VS Code开发 调试.NET Core RC2应用程序,由于.NET Core 目前还处于预览版. 本文使用微软提供的示例进行开发 ...

  8. WebService开启远程测试

    WebService部署成站点之后,如果在本地测试webservice的接口可以运行,在远程却显示“测试窗体只能用于来自本地计算机的请求”或者"The test form is only a ...

  9. Wix学习整理(1)——快速入门HelloWorld

    原文:Wix学习整理(1)--快速入门HelloWorld 1 Wix简介 Wix是Windows Installer XML的简称,其通过类XML文件格式来指定了用于创建Windows Instal ...

  10. 【Ruby】Ruby的model学习——Active Record Associations

    在阅读的过程中有不论什么问题,欢迎一起交流 邮箱:1494713801@qq.com    QQ:1494713801 一.怎样定义关联 两个model之间经常会存在关联关系,为了解决这些关联引起的复 ...