博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
第 6 章 Switch
阅读量:7192 次
发布时间:2019-06-29

本文共 7574 字,大约阅读时间需要 25 分钟。

目录

6.1. 交换机初始化
6.1.1. 密码设置
6.1.2. 域名,网管
6.1.3. Telnet
6.1.3.1. privilege level
6.1.4. 保存当前配置
6.1.5. 恢复交换机出厂值
6.2. interface
6.2.1. show interfaces status
6.2.2. ip address
6.2.3. 配置端口速率及双工模式
6.2.4. range
6.2.5. 端口隔离
6.3. DHCP
6.3.1. Gateway
6.3.2. snooping
6.3.3. DHCP中继代理
6.4. Route port
6.5. 交换机端口镜像配置
6.6. Ethernet Port Groups
6.6.1. LACP
6.6.2. desirable
6.7. VLAN
6.7.1. vlan database
6.7.2. 两层Switch配置讲解
6.7.3. 3 Layer Switch
6.7.4. VTP
6.7.4.1. Configuring a VTP Server
6.7.4.2. Configuring a VTP Client
6.7.4.3. example for vtp
6.8. ACL
6.9. 流量控制
6.9.1. 粗糙的流量限制
6.9.2. bandwidth
6.9.3. priority
6.10. stack-manager
6.11. HSRP(Hot Standby Router Protocol)
6.12. CDP (Cisco Discovery Protocol)
6.12.1. clear cdp counters
6.12.2. show cdp
6.12.3. show cdp entry
6.12.4. show cdp interface
6.12.5. show cdp neighbors
6.13. 4506/4507 专有命令
6.13.1. 用户认证
6.13.2. PoE
6.13.3. show module
6.14. Switch Config Example
6.14.1. VLan Router
6.14.1.1. VLAN间DHCP
6.14.1.2. 多vlan与vlan间路由,并且每个vlan配合一个DHCP池,所有vlan均能访问internet
6.14.2. VLAN下联Switch
6.14.3. LAN to LAN
6.14.4. Cisco 2811 Router + 2960 Switch
6.14.4.1. running-config
6.14.5. Cisco Catalyst 3750 series DHCP + VLAN + Routing Example
6.14.6. Cisco Catalyst 3750 + Cisco Catalyst 2960 VTP Example
6.14.6.1. VTP Server
6.14.6.2. VTP Client
6.14.6.3. Cisco Config File

Cisco 固定配置交换机命名规则

对于Cisco的固定配置的交换机,一般有3750,3550,3560,2960,2970这几个系列。它们在型号命令上有自己相应的规则,特总结如下:eg: WS-C3750G-48TS-SC3750表明这款产品属于3750这个系列,也就是产品的型号。G----表明其所有接口都是支持千兆或以上,如果没有这个就表明其主要端口都是10/100M的或者100M的48----表明其拥有主要的端口数量为48个T----表明其主要端口是电口(也就是所谓的Twirst Pair的端口P----表明其主要端口是电口,同时支持PoE以太网供电S----表明其带的扩展的接口为SFP类型的接口最后部分的-S表明交换机带的软件是SMI标准影像的,-E表明是EMI影像的

6.1. 交换机初始化

Cisco Catalyst 2960 Series Switches

Press RETURN to get started!*Mar  1 00:00:25.073: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, cha                                                                                                 nged state to down*Mar  1 00:00:26.189: %SPANTREE-5-EXTENDED_SYSID: Extended SysId enabled for typ                                                                                                 e vlan*Mar  1 00:00:47.102: %SYS-5-RESTART: System restarted --Cisco IOS Software, C2960 Software (C2960-LANBASEK9-M), Version 12.2(44)SE6, REL                                                                                                 EASE SOFTWARE (fc1)Copyright (c) 1986-2009 by Cisco Systems, Inc.Compiled Mon 09-Mar-09 18:10 by gereddy         --- System Configuration Dialog ---Would you like to enter the initial configuration dialog? [yes/no]:Would you like to enter the initial configuration dialog? [yes/no]: yesAt any point you may enter a question mark '?' for help.Use ctrl-c to abort configuration dialog at any prompt.Default settings are in square brackets '[]'.Basic management setup configures only enough connectivityfor management of the system, extended setup will ask youto configure each interface on the systemWould you like to enter basic management setup? [yes/no]: yesConfiguring global parameters:  Enter host name [Switch]:  The enable secret is a password used to protect access to  privileged EXEC and configuration modes. This password, after  entered, becomes encrypted in the configuration.  Enter enable secret: chen  The enable password is used when you do not specify an  enable secret password, with some older software versions, and  some boot images.  Enter enable password: chen% Please choose a password that is different from the enable secret  Enter enable password: chen  The virtual terminal password is used to protect  access to the router over a network interface.  Enter virtual terminal password: chen  Configure SNMP Network Management? [no]: yes    Community string [public]:Current interface summaryInterface              IP-Address      OK? Method Status                ProtocolVlan1                  unassigned      YES unset  up                    downFastEthernet0/1        unassigned      YES unset  down                  downFastEthernet0/2        unassigned      YES unset  down                  downFastEthernet0/3        unassigned      YES unset  down                  downFastEthernet0/4        unassigned      YES unset  down                  downFastEthernet0/5        unassigned      YES unset  down                  downFastEthernet0/6        unassigned      YES unset  down                  downFastEthernet0/7        unassigned      YES unset  down                  downFastEthernet0/8        unassigned      YES unset  down                  downFastEthernet0/9        unassigned      YES unset  down                  downFastEthernet0/10       unassigned      YES unset  down                  downFastEthernet0/11       unassigned      YES unset  down                  downFastEthernet0/12       unassigned      YES unset  down                  downFastEthernet0/13       unassigned      YES unset  down                  downFastEthernet0/14       unassigned      YES unset  down                  downFastEthernet0/15       unassigned      YES unset  down                  downFastEthernet0/16       unassigned      YES unset  down                  downFastEthernet0/17       unassigned      YES unset  down                  downFastEthernet0/18       unassigned      YES unset  down                  downFastEthernet0/19       unassigned      YES unset  down                  downFastEthernet0/20       unassigned      YES unset  down                  downFastEthernet0/21       unassigned      YES unset  down                  downFastEthernet0/22       unassigned      YES unset  down                  downFastEthernet0/23       unassigned      YES unset  down                  downFastEthernet0/24       unassigned      YES unset  down                  downGigabitEthernet0/1     unassigned      YES unset  down                  downGigabitEthernet0/2     unassigned      YES unset  down                  downEnter interface name used to connect to themanagement network from the above interface summary: FastEthernet0/24Configuring interface FastEthernet0/24:  Configure IP on this interface? [no]: yes    IP address for this interface: 172.16.0.253    Subnet mask for this interface [255.255.0.0] :    Class B network is 172.16.0.0, 16 subnet bits; mask is /16Would you like to enable as a cluster command switch? [yes/no]: yesEnter cluster name: cl1The following configuration command script was created:hostname Switchenable secret 5 $1$W1RW$ZdWR.sS/g2RwJMv4F5sRq0enable password chenline vty 0 15password chensnmp-server community public!!interface Vlan1shutdownno ip address!interface FastEthernet0/1!interface FastEthernet0/2!interface FastEthernet0/3!interface FastEthernet0/4! --More--

6.1.1. 密码设置

基本操作

Switch commandSwitch > en 进入特权模式Switch # conf t 进入全局配置模式Switch(config)# interface interface-num 进入接口Switch(config)# hostname name 给交换机命名Switch(config)# enable password password 设置明文密码Switch(config)# enable secret password 设置加密的启用秘密口令。如果设置则取代明文口令Switch # copy running-config startup-configSwitch # write 保存设置

6.1.2. 域名,网管

初始化设置

Switch setupswitch(config)# ip default-gateway ip-addressswitch(config)# ip domain-name domain-nameswitch(config)# ip name-server IP-address 交换机上设置远程访问,用于交换机管理

6.1.3. Telnet

通过Telnet进入命令行接口

Switch>enableSwitch#conf tSwitch(config)#line vty 0 4Switch(config-line)#loginSwitch(config-line)#password cisco

6.1.3.1. privilege level

line vty 5 15 privilege level 15 password neo login!

6.1.4. 保存当前配置

Save

Switch#wrBuilding configuration...[OK]

6.1.5. 恢复交换机出厂值

Switch# erase startup-config

原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。

你可能感兴趣的文章
编程语言性能游戏排行榜,C/C++第一ATS第二JAVA第三
查看>>
for in 循环的输出顺序问题
查看>>
axis2带list的报文,对象和xml的转换
查看>>
[开发笔记]-控制Windows Service服务运行
查看>>
用XAML做网页!!—广告展示区
查看>>
数字在排序数组中出现的次数
查看>>
转:逻辑坐标系 设备坐标系 客户坐标系 屏幕坐标系
查看>>
转存储过程优劣
查看>>
mysql错误:“ Every derived table must have its own alias”(每个派生出来的表都必须有一个自己的别名)...
查看>>
VMware-workstation-full-10.0.3-1895310 CN
查看>>
Get ListView items from other windows z
查看>>
thinkphp 内置函数详解
查看>>
app 图标规格参考表
查看>>
RMAN异机还原遭遇ORA-19698错误案例
查看>>
ECMall如何支持SSL连接邮件服务器的配置
查看>>
敏捷软件开发要点【转载】
查看>>
ubuntu apache2 虚拟主机服务
查看>>
Workflow_工作流的基本概念(概念)
查看>>
iOS开发UI篇—UITabBarController简单介绍
查看>>
我眼里的正则表达式(入门)
查看>>