文档库 最新最全的文档下载
当前位置:文档库 › 思科新一代数据中心级交换机中文配置向导Nexus7000

思科新一代数据中心级交换机中文配置向导Nexus7000

思科新一代数据中心级交换机中文配置向导Nexus7000
思科新一代数据中心级交换机中文配置向导Nexus7000

Nexus Configuration Simple Guide

目录

Nexu7000缺省端口配置 (2)

CMP连接管理处理器配置 (3)

带外管理VRF (4)

划分Nexus 7010 VDC (5)

基于EthernetChannel的vPC (7)

割裂的vPC:HSRP和STP (11)

vPC的细部配置 (12)

Nexus的SPAN (13)

VDC的MGMT接口 (13)

DOWN的VLAN端口 (13)

Nexus的路由 (14)

Nexus上的NLB (15)

标识一个部件 (15)

Nexus7000基本配置汇总 (16)

Cisco NX-OS/IOS Configuration Fundamentals Comparison (16)

Cisco NX-OS/IOS Interface Comparison (24)

Cisco NX-OS/IOS Port-Channel Comparison (30)

Cisco NX-OS/IOS HSRP Comparison (35)

Cisco NX-OS/IOS STP Comparison (40)

Cisco NX-OS/IOS SPAN Comparison (44)

Cisco NX-OS/IOS OSPF Comparison (49)

Cisco NX-OS/IOS Layer-3 Virtualization Comparison (54)

vPC Role and Priority (61)

vPC Domain ID (62)

vPC Peer Link (62)

Configuration for single 10 GigE Card (62)

CFSoE (64)

vPC Peer Keepalive or FT Link (64)

vPC Ports (64)

Orphan Ports with non-vPC VLANs (65)

HSRP (66)

HSRP Configuration and Best Practices for vPC (66)

Advertising the Subnet (67)

L3 Link Between vPC Peers (67)

Cisco NX-OS/IOS TACACS+, RADIUS, and AAA Comparison (68)

Nexus5000的配置同步 (73)

初始化Nexus 2000 Fabric Module (75)

Nexu7000缺省端口配置

缺省时所有端口是关闭的

no system default switchport shutdown

copy running-config startup-config vdc-all 存配置

dir bootflash:

dir bootflash://sup-standby/

dir bootflash://sup-remote

show role

show inventory显示系统详细目录,或称为存货清单,可以看到各组件产品编号以及序列号

show hardware 显示系统硬件详细信息

show sprom backplane 1 显示交换机序列号

show environment power 显示电源信息

power redundancy-mode ps-redundant 如果没有双电网供电则使用此模式power redundancy-mode insrc-redundant 如果有双电网供电则使用此模式

show module 检验各模块状态

attach module slot_number

dir bootflash dir slot0:查看ACTIVE引擎的FLASH空间

如果查看备份引擎的FLASH空间呢?首先attach module command to attach to the module number, and then use the dir bootflash: or dir slot0:

out-of-service module slot Shutting Down a Supervisor or I/O Module

out-of-service xbar slot Shutting Down a Fabric Module

show environment

show environment temperature

show environment fan

banner motd #Welcome to the switch#

clock timezone

clock set

reload 重启交换机

reload module number

switchto VDC切换至某VDC管理界面

switchback

poweroff module slot_number

no poweroff module slot_number

poweroff xbar slot_number

CMP连接管理处理器配置

CMP配置:

You should also configure three IP addresses—one for each cmp-mgmt interface and one that is shared between the active and standby supervisor mgmt 0 interfaces.

attach cmp 进入CMP

命令输入后自动存盘,不需要copy run start

通过NX-OS CLI来配置CMP

1. configure terminal

2. interface cmp-mgmt module slot 通过module 槽号分别为5/6来实现主备引擎上的CMP配置

3. ip address ipv4-address/length

4. ip default-gateway i pv4-address

5. show running-config cmp

通过CMP CLI来配置CMP

1. attach cmp

2. configure terminal

3. ip default-gateway i pv4-address

4. interface cmp-mgmt

5. ip address ipv4-address/length

6. show running-config

在CMP上可执行的动作:

show cp state

reload cp

attach cp

monitor cp

ping or traceroute 192.0.2.15

reload system To reload the complete system, including the CMPs

带外管理VRF

Management VRF and Basic Connectivity

The management interface is, by default, part of the management VRF. The management interface “mgmt0” is the only interface allowed to be part of this VRF.

The philosophy beyond Management VRF is to provide total isolation for the management traffic

from the rest of the traffic flowing through the box by confining the former to its own forwarding table.

In this step we will:

- Verify that only the mgmt0 interface is part of the management VRF

- Verify that no other interface can be part of the management VRF

- Verify that the default gateway is reachable only using the management VRF

如果想Ping 带外网管的网关等地址必须在Ping命令后面加上vrf management

ping 10.2.8.1 vrf management

划分Nexus 7010 VDC

VDC是Nexus7000系列的特色功能。通过将物理机箱划分为多个逻辑交换机,核心交换机区域将可以获得多台物理隔离的高性能交换机。VDC具有完全隔离的路由表,VRF和接口,因此可以获得真实交换机属性的配置。

VDC的资源是占用全局机箱的,因此在必要的时候,需要通过调整VDC资源配置来进行VDC功能和性能的调整。所有进入VDC的接口和资源都不能被其他VDC或者缺省VDC使用。

VDC配置

https://www.wendangku.net/doc/5711613397.html,/en/US/docs/switches/datacenter/sw/5_x/nx-os/virtual_device_context/quick/g uide/Cisco_Nexus_7000_Series_NX-OS_Virtual_Device_Context_Quick_Start__Release_5.x_cha pter1.html

vdc MyVDC 创建VDC

allocate interface ethernet 2/11-1 分配接口

switchto vdc MyVDC Switch to the new VDC and enter the VDC admin user account password切换至一个VDC

switchback

setup 根据安装向导配置VDC

show vdc membership

show vdc current-vdc

When interfaces in different VDCs share the same port ASIC, reloading the VDC (with the reload vdc command) or provisioning interfaces to the VDC (with the allocate interface command) might cause short traffic disruptions (of 1 to 2 seconds) for these interfaces. If such behavior is undesirable, make sure to allocate all interfaces on the same port ASIC to the same VDC.

To see how the interfaces are mapping to the port ASIC, use this command:

slot slot_number show hardware internal dev-port-map 这个命令没有帮助,需盲打

copy running-config startup-config vdc-all

通过命令可以查看当前VDC的数量和状态。系统机箱本身默认为VDC1,最多可以建立3个另外的VDC。登录到系统默认的VDC1下,可以通过switchto vdc命令在不同的VDC之

reload都有针对单独VDC的配置。

不同VDC的名称,除了在vpc命令中直接指定,还可以进入到VDC配置界面后,直接用hostname命令进行更改。

基于EthernetChannel的vPC

vPC是Cisco NX-OS由于解决STP Block端口而使用的技术。通过将两台设备虚拟成一台设备,使得系统可以使用两套冗余链路转发数据。

vPC完全基于EthernetChannel技术,所有成员组都必须在EthernetChannel当中,除了peer-link keepalive。vPC仅仅能作用在二层Trunk结构下,完全不兼容任何L3环境。vPC使用连接设备的peer-link必须使用10G以太网接口,而peer-link keepalive必须是路由接口。配置手册推荐使用单独的VRF来隔离,以便于减小地址管理压力。

首先,配置L3端口,保证双方可以ping通:

将会导致一些vPC Domain重新收敛。具体情况请见后面描述。

其次,进行完L3配置后,配置vPC Domain。一台设备属于且只能属于一个vPC Domain,一个vPC Domain有且只能拥有两个成员。Domain的配置当中,需要指定vPC对端设备的IP

态。

再次,配置peer-link。Peer-link是vPC转发机箱间流量的链路,因此链路只能使用10G 以太网,配置手册推荐使用至少2条10G以太网电缆进行捆绑:

最后,将一段设备连接到两侧设备链路推入各自的EthernetChannel的组,并且将参加配置的EthernetChannel加入vPC组,保证对应的EthernetChannel在相同的转发vPC当中,

在配置当中,vpc的数字和port-channel的数字必须相同,并且这两个数字必须和Domain的数字不同。否则,将会导致vpc无法启动的问题。

vPC配置的两端都必须是相容的Trunk配置,例如LACP或者no protocol。

LACP System priority的一致,有利于vPC状态下LARP的收敛,手册推荐配置为vPC成员设备拥有相同的值。配置需要再全局和vPC配置模式下使用。

如果在配置中发现如下现象,则应当首先检查vPC中,成员EthernetChannel配置是否

正常:

注记:

对于不同的设备和不同的拓扑形态,vPC的具体配置也会有所不同。

1.对于简单的downstream设备

如图所示:

对于简单的downstream设备,两台Nexus设备使用标准的vPC配置方法。两台设备之间配置peer-link和peer-link keepalive链路,在完成vPC配置之后,将于downstream连接的接口划入一个EthernetChannel,即便是该EthernetChannel也无妨,然偶将这个EthernetChannel接口划入到对应的vpc中,完成虚拟转发。

2.对于Nexus推荐的域环境

如图所示:

在Nexus5k和Nexus7k当中,使用fullmesh的结构来连接。通过vPC技术,中间这四条链路可以保持全活的状态,结合vPC形成的虚拟拓扑,实际上相当于单台Nexus5k和Nexus7k之间连接了一条40G的链路,从而极大的提高了转发能力。在这种配置实例当中,Nexus5k和Nexus7k需要单独配置自己的vPC Domain,在各自的vPC Domain正常建立后,将交叉的线路绑定成EthernetChannel,绑定协议不限于LACP或者no protocol。

下面的配置仅列出了左侧5k和7k的相关配置。

通过将同一台设备的两条链路捆绑成EthernetChannel,并将其放入相同的vPC转发

组,来完成双向的配置。

CAUTION

配置当中,并需保持vPC两侧配置的同步,即,两侧的VLAN,接口,VDC配置应

当一致,若配置不一致,则会导致vPC工作不正常。

所有的EthernetChannel必须工作在Trunk模式下,需要用Switchport mode trunk方

式和做显式的指派,否则会导致vPC工作不正常。

割裂的vPC:HSRP和STP

vPC处于割裂状态时,vPC Domain成员的状态取决于当前的系统角色(system role)。

当vPC Peer-link Keepalive链路中断时,所有的数据转发都不会受到影响;当vPC Peer-link链路中断时,处于Secondary角色的设备,所有处于vPC成员组的EthernetChannel都会被置为Down状态,使得该设备从vPC管理域中离线,从而停止数据转发,直到链路被修复。

当vPC Domain成员都处在正常工作状态时,对于vPC Peer-link和vPC Peer-link Keepalive的中断都不会终止系统的数据转发,只是vPC收敛可能会导致丢失1~2个数据包。

但是处于下列情况,会导致vPC Domain出现数据转发问题:

保证vPC Domain正常工作,将两台设备中间的链路全部中断,然后在两侧都配置reload restore命令情况下,重启两侧vPC Domain成员,在经过240s后,两侧设备都会处于双活状态,从而导致数据转发环路。从得到的消息看,应该是STP导致的二层环路所致。使用vPC配置命令:peer-switch也许可以解决这个问题。

该问题必须经由严格的操作时序才可重现。

vPC上的HSRP进行了特殊的修正,HSRP的Active负责相应ARP请求,但是standby角色也可以转发带有目的地为HSRP组虚拟MAC地址的数据包,这样就实现了HSRP的Load-Balance。和HSRP一样,GLBP也是vPC所支持的热备份网关协议,但是GLBP通过AVG相应不同的ARP请求,并回应给不同AVF的MAC地址的方式来进行负载均衡。但是HSRP在vPC环境中,收敛速度比GLBP更快。

在vPC当中,所有HSRP、GLPB或者VRRP的,处于Active角色设备,都必须配置在vPC的Primary设备上;同样的,STP配置中,关于VLAN的根桥,也必须和Primary设备保持一致。HSRP在两侧应当拥有相同的HSRP组号,并且同一组号在单一VDC上不能重复。基于vPC 的HSRP不能使用USE-BIA参数。

vPC的细部配置

role priority

vPC在没有role priority配置的情况下,由桥MAC来决定谁是primary设备,MAC绝对值较小的会当选,如果配置了role priority的,则该项配置值相对较小的会当选。但是要shut peer-link一次,才能完成更改。

System-priority

这是vPC当中对于LACP的配置。如果该值不配置,则不影响,但是如果配置了,则vPC Domain 中设备的system-priority值必须相同,如果不匹配,vPC启动可能会遇到麻烦。

Reload restore

该命令用于帮助Nexus启动后,找不到vPC对端时仍能激活vPC的功能。

缺省情况,如果vPC成员设备启动后无法找到对端,会导致所有vPC功能端口出于down状态,不能转发数据。配置了这个命令后,该单独启动的设备会在最少240s后,将vPC成员端口转变为up状态,并且开始转发数据。

CAUTION

在vPC成员设备间所有电缆,包括peer-link和peer-link keepalive电缆中断的情况下,并且两侧vPC全部配置reload restore,将会在两端设备重新启动完成后,存在vPC双活,Nexus 将会与上层转发设备之间形成数据环路。

该情况仅出现在Nexus推荐的域环境中,并且要严格遵循步骤,才能出现。

Peer-switch

Peer-switch命令用于将vPC Domain成员设备虚拟成一个STP的根,从而实现生成树结构的优化,减少Primary设备失败后的STP重算时间。

Nexus的SPAN

Nexus支持SPAN,ESPAN和ERSPAN。

SPAN方式被称为本地SPAN,用于本地交换机接口作为源和目的;ESPAN用于将SPAN流量的目的设定为某个VLAN,并通过Trunk实现远程的SPAN;ERSPAN用于将SPAN流量封装在GRE中,通过路由方式进行远端的SPAN。

Nexus7000最大可以存在48个Session,但是只能有两个在工作;Fex端口只能做SPAN的源,不能做span的目的;EthernetChannel成员不能当span的源,nexus5K上连接fex接口不能当span的源;Nexus5K仅支持SPAN,而Nexus7K则支持所有的SPAN类型。

VDC的MGMT接口

MGMT接口在所有VDC当中共享。在非VDC1中,show interface status 不显示,但是使用命令interface mgmt 0仍然可以将地址进行配置。所有VDC的MGMT接口地址应当在同一个子网内。

DOWN的VLAN端口

在基于vPC的配置中,如果vPC Domain成员交换机关于VLAN配置不一致,就会导致VLAN 接口总是处于DOWN的状态,而无法被激活。

Nexus7K中,VLAN的配置和Interface VLAN的配置是相分离的,仅有Interface VLAN而没有VLAN,是会导致VLAN接口在两侧的配置不同,从而导致L3VLAN接口处于DOWN的状态。缺省情况下,L3VLAN接口被shutdown,需要使用no命令激活。

可以尝试使用VTP来避免配置上的错误。

Nexus的路由

Nexus的OSPF

在Nexus当中,OSPF的带宽计算参考值已经从原来的100Mbps更改为40Gbps,并设定为默认值。

Nexus的OSPF已经不允许在OSPF进程下进行网络的宣告,所有对于OSPF的网络宣告都要

Nexus上的NLB

基于Windows Server系列操作系统的NLB,实验确认可以被支持。

标识一个部件

Nexus常常由很多部件构成,例如Fabric Module,或者xBAR等等,使用下面的命令可以激活面板上的Identification灯,从而标识出需要更换或者处理的模块。

locator-led {chassis | fan f-number | module slot | powersupply ps-number | xbar x-number} no locator-led{chassis | fan f-number | module slot | powersupply ps-number | xbar x-number}

这个命令模板是基于Nexus7k的,在Nexus5k上有些参数不能用,但是有fex参数用来标识

Fabric Module

光纤的类型

对于使用SFP的Nexus5010而言,需要考虑跨机房连接时的光纤类型。系统提示的信息如下:

Nexus7000基本配置汇总

Cisco NX-OS/IOS Configuration Fundamentals Comparison

Objective

This tech note outlines the main differences for the configuration fundamentals between the Cisco NX-OS software and the Cisco IOS? Software. Sample configurations are included for Cisco NX-OS and Cisco IOS Software to illustrate some the differences after the first system startup. Please refer to the NX-OS documentation on https://www.wendangku.net/doc/5711613397.html, for a complete list of supported features.

Cisco NX-OS Overview

The Cisco NX-OS is a data center class operating system designed for maximum scalability and application availability. The CLI interface for the NX-OS is very similar to Cisco IOS, so if you understand the Cisco IOS you

can easily adapt to the Cisco NX-OS. However, a few key differences should be understood prior to working with the Cisco NX-OS.

Important Cisco NX-OS and Cisco IOS Software Differences

In Cisco NX-OS:

When you first log into the NX-OS, you go

directly into EXEC mode.

Role Based Access Control (RBAC)

determines a user’s permissions by default.

NX-OS 5.0(2a) introduced privilege levels

and two-stage authentication using an enable

secret that can be enabled with the global

feature privilege configuration command.

By default, the admin user has

network-admin rights that allow full

read/write access. Additional users can be

created with very granular rights to permit or

deny specific CLI commands.

The Cisco NX-OS has a Setup Utility that

allows a user to specify the system defaults,

perform basic configuration, and apply a

pre-defined Control Plane Policing (CoPP)

security policy.

The Cisco NX-OS uses a feature based

license model. An Enterprise or Advanced

Services license is required depending on the

features required. Additional licenses may be

required in the future.

A 120 day license grace period is supported

for testing, but features are automatically

removed from the running configuration after

the expiration date is reached.

The Cisco NX-OS has the ability to enable

and disable features such as OSPF, BGP,

etc… using the feature configuration

command. Configuration and verification

commands are not available until you enable

the specific feature.

Interfaces are labeled in the configuration as

Ethernet. There aren’t any speed

designations.

The Cisco NX-OS supports Virtual Device

Contexts (VDCs), which allow a physical

device to be partitioned into logical devices.

When you log in for the first time You are in

the default VDC (VDC 1).

The Cisco NX-OS has two preconfigured

VRF instances by default (management,

default). The management VRF is applied to

the supervisor module out-of-band Ethernet

port (mgmt0), and the default VRF instance is

applied to all other I/O module Ethernet ports.

SSHv2 server/client functionality is enabled

by default. TELNET server functionality is

disabled by default. (The TELNET client is

enabled by default and cannot be disabled.)

VTY and Auxiliary port configurations do not

show up in the default configuration unless a

parameter is modified (The Console port is

included in the default configuration). The

VTY port supports 32 simultaneous sessions

and the timeout is disabled by default for all

three port types.

Things You Should Know

The following list provides some additional Cisco NX-OS information that should be helpful when configuring and maintaining the Cisco NX-OS.

The default administer user is predefined as

admin. An admin user password has to be

specified when the system is powered up for

the first time, or if the running configuration is

erased with the write erase command and

system is repowered.

If you remove a feature with the global no

feature configuration command, all relevant

commands related to that feature are

removed from the running configuration.

The NX-OS uses a kickstart image and a

system image. Both images are identified in

the configuration file as the kickstart and

system boot variables. The boot variables

determine what version of NX-OS is loaded

when the system is powered on. (The

kickstart and system boot variables have to

be configured for the same NX-OS version.)

The show running-config command

accepts several options, such as OSPF, BGP,

etc… that will display the runtime

configuration for a specific feature.

The show tech command accepts several

options that will display information for a

specific feature.

Configuration Comparison

The following sample code show similarities and differences between the Cisco NX-OS software and the Cisco IOS Software CLI.

Cisco IOS CLI Cisco NX-OS CLI Default User Prompt

c6500> n7000#

Entering Configuration Mode

c6500# configure terminal n7000# configure terminal

Saving the Running Config to the Startup Config (nvram)

c6500# write memory n7000# copy running-config startup-config

or

c6500# copy running-config startup-config

Erasing the startup config (nvram)

c6500# write erase n7000# write erase

Installing a License

Cisco IOS Software does not require a

license file installation.

n7000# install license bootflash:license_file.lic Interface Naming Convention

interface Ethernet 1/1

interface FastEthernet 1/1

interface GigabitEthernet 1/1

interface TenGigabitEthernet 1/1

interface Ethernet 1/1

Default VRF Configuration (management)

Cisco IOS Software doesn’t enable VRFs

by default.

vrf context management

Configuring the Software Image Boot Variables

boot system flash

sup-bootdisk:s72033-ipservicesk9_wan-mz.122-33.S XH1.bin boot kickstart

bootflash:/n7000-s1-kickstart.4.0.

4.bin sup-1

boot system

bootflash:/n7000-s1-dk9.4.0.4.bin sup-1

boot kickstart

bootflash:/n7000-s1-kickstart.4.0.

4.bin sup-2

boot system

bootflash:/n7000-s1-dk9.4.0.4.bin sup-2

Enabling Features

cisco3750三层交换机配置说明

三层交换机可以通过Telnet方式或超级终端方式连上,第一次使用的三层交换机需要进行配置,具体步骤如下: 1)、用Cisco 3750三层交换机自带的一条串行电缆将其Console口与1台维护笔记本的串口(需要知道是Com1还是Com2)相连。 2)在维护笔记本上执行以下操作:“开始→程序→附件→通讯→超级终端”,在“连接描述”对话框的名称一栏中输入“cisco3750”(此名字没有实际意义,可以随便输入),创建一个叫做"cisco3750"的新连接,点击"确定",缺省的使用COM1(根据维护计算机连接的端口选择),在"串口设置"中将波特率改为9600波特,其他参数不变,点击"确定"就可以得到三层交换机的控制台。 3)、设置结束,打开三层交换机电源,就会出现三层交换机的启动信息。这时就可以像在终端一样对三层交换机进行操作了。此时不要进行任何操作,以免破坏三层交换机的启动进程,直到三层交换机出现了: “Copyright (c) 1986-2006 by Cisco Systems, Inc. Compiled Fri 28-Jul-06 08:46 by yenanh” 回车,提示“Would you like to terminate autoinstall? [yes]:”是否要终止自动安装,输入N,进入配置页面: “--- System Configuration Dialog --- Would you like to enter the initial configuration dialog? [yes/no]:” 输入N,选择不需要,提示“Switch>00:14:58: %LINK-5-CHANGED: Interface Vlan1, changed state to administratively down”,出现“switch>”就可以输入命令进行配置。 switch >en(进入特权模式) switch #configure(进入组态模式) switch ( config ) #hostname 3750 (交换机重命名) 3750( config )#Interface vlan 1 (进入vlan1设置) 3750( config-if ) #ip add 171.100.12.1 255.255.255.0(设置vlan1的IP,连接其端口的设备必须以其IP作为网关) 3750( config-if ) #no shutdown (激活vlan1的端口)

cisco交换机配置实例(自己制作)

二层交换机配置案例(配置2层交换机可远程管理): Switch> Switch>en 进入特权模式 Switch#config 进入全局配置模式 Switch(config)#hostname 2ceng 更改主机名为2ceng 2ceng(config)#interface vlan 1 进入VLAN 1

2ceng(config-if)#no shut 激活VLAN1 2ceng(config-if)#exit 退出到全局配置模式 2ceng(config)#interface vlan 2 创建VLAN 2 2ceng(config-if)#no shut 激活VLAN2 2ceng(config-if)#exit 退出到全局配置模式 2ceng(config)#interface vlan 3 创建VLAN 3 2ceng(config-if)#no shut 激活VLAN3 2ceng(config-if)# ip address 192.168.3.254 255.255.255.0 配置192.168.3.254为2ceng管理IP 2ceng(config-if)#exit 退出到全局配置模式 2ceng(config)#interface range fa0/1-12 进入到端口1-12 2ceng(config-if-range)#switchport mode access 将1-12口设置为交换口 2ceng(config-if-range)#switch access vlan 1 将1-12口划分到VLAN 1 2ceng(config-if-range)#exit 退出到全局配置模式 2ceng(config)#interface range fa0/13-23 进入到端口13-23 2ceng(config-if-range)#switch access vlan 2 将13-23口划分到VLAN2 2ceng(config-if-range)#exit 退出到全局配置模式 2ceng(config)#interface fastEthernet 0/24 进入到24口 2ceng(config-if)#switch mode trunk 将24口设置为干线 2ceng(config-if)#exit 退出到全局配置模式 2ceng(config)#enable secret cisco 设置加密的特权密码cisco 2ceng(config)#line vty 0 4 2ceng(config-line)#password telnet 设置远程登陆密码为telnet

思科三层交换机配置总结

思科交换机的基本配置命令学习 CISCO交换机基本配置:Console端口连接 用户模式hostname# ; 特权模式hostname(config)# ; 全局配置模式hostname(config-if)# ; 交换机口令设置: switch>enable ;进入特权模式 switch#config terminal ;进入全局配置模式 switch(config)#hostname csico ;设置交换机的主机名 switch(config)#enable secret csico1 ;设置特权加密口令 switch(config)#enable password csico8 ;设置特权非密口令 switch(config)#line console 0 ;进入控制台口 switch(config-line)#line vty 0 4 ;进入虚拟终端 switch(config-line)#login ;虚拟终端允许登录 switch(config-line)#password csico6 ;设置虚拟终端登录口令csico6 switch#exit ;返回命令 交换机VLAN创建,删除,端口属性的设置,配置trunk端口,将某端口加入vlan中,配置VTP:switch#vlan database ;进入VLAN设置 switch(vlan)#vlan 2 ;建VLAN 2 switch(vlan)#vlan 3 name vlan3 ;建VLAN 3并命名为vlan3 switch(vlan)#no vlan 2 ;删vlan 2 switch(config)#int f0/1 ;进入端口1 switch(config)#speed ? 查看speed命令的子命令 switch(config)#speed 100 设置该端口速率为100mb/s (10/auto) switch(config)#duplex ? 查看duplex的子命令 switch(config)#duplex full 设置该端口为全双工(auto/half) switch(config)#description TO_PC1 这是该端口描述为TO_PC1 switch(config-if)#switchport access vlan 2 ;当前端口加入vlan 2 switch(config-if)#switchport mode trunk ;设置为trunk模式(access模式) switch(config-if)#switchport trunk allowed vlan 1,2 ;设置允许的vlan switch(config-if)#switchport trunk encap dot1q ;设置vlan 中继 switch(config)#vtp domain vtpserver ;设置vtp域名相同 switch(config)#vtp password ;设置发vtp密码 switch(config)#vtp server ;设置vtp服务器模式 switch(config)#vtp client ;设置vtp客户机模式 交换机设置IP地址,默认网关,域名,域名服务器,配置和查看MAC地址表: switch(config)#interface vlan 1 ;进入vlan 1 switch(config-if)#ip address 192.168.1.1 255.255.255.0 ;设置IP地址 switch(config)#ip default-gateway 192.168.1.6 ;设置默认网关 switch(config)#ip domain-name https://www.wendangku.net/doc/5711613397.html, 设置域名 switch(config)#ip name-server 192.168.1.18 设置域名服务器 switch(config)#mac-address-table? 查看mac-address-table的子命令 switch(config)#mac-address-table aging-time 100 设置超时时间为100ms switch(config)#mac-address-table permanent 0000.0c01.bbcc f0/3 加入永久地址在f0/3端口 switch(config)#mac-address-table restricted static 0000.0c02.bbcc f0/6 f0/7 加入静态地址目标端口f0/6源端口f0/7 switch(config)#end

思科交换机配置维护手册

思科交换机配置维护手册

目录

一、端口配置 1.1 配置一组端口 当使用interface range命令时有如下的规则: ?有效的组范围: o vlan从1 到4094 o fastethernet槽位/{first port} - {last port}, 槽位为0 o gigabitethernet槽位/{first port} - {last port},槽位为0 o port-channel port-channel-number - port-channel-number, port-channel号从1到64 ?端口号之间需要加入空格,如:interface range fastethernet 0/1 – 5是有效的,而interface range fastethernet 0/1-5是无效的. ?interface range命令只能配置已经存在的interface vlan ?所有在同一组的端口必须是相同类别的。

见以下例子: Switch# configure terminal Switch(config)# interface range fastethernet0/1 - 5 Switch(config-if-range)# no shutdown 以下的例子显示使用句号来配置不同类型端口的组: Switch# configure terminal Switch(config)# interface range fastethernet0/1 - 3, gigabitethernet0/1 - 2 Switch(config-if-range)# no shutdown 1.2 配置二层端口 1.2.1 配置端口速率及双工模式

三层交换机cisco3560 ios 丢失解决笔记

周日公司电脑不能上网,经检查是三层交换机cisco3560 出问题,报错如下: ============================================= Base ethernet MAC Address: 00:19:56:d0:dd:80 Xmodem file system is available. The password-recovery mechanism is enabled. Initializing Flash... flashfs[0]: 0 files, 1 directories flashfs[0]: 0 orphaned files, 0 orphaned directories flashfs[0]: Total bytes: 32514048 flashfs[0]: Bytes used: 1024 flashfs[0]: Bytes available: 32513024 flashfs[0]: flashfs fsck took 12 seconds. ...done Initializing Flash. Boot Sector Filesystem (bs) installed, fsid: 3 done. Loading "flash:c3560-advipservicesk9-mz.122-25.SEE2.bin"...flash:c3560-advipservicesk9-mz.122-25.SEE2.bin: no such file or directory Error loading "flash:c3560-advipservicesk9-mz.122-25.SEE2.bin" Interrupt within 5 seconds to abort boot process. Boot process failed... The system is unable to boot automatically. The BOOT environment variable needs to be set to a bootable image. switch:

Cisco+3750交换机配置

3750交换机(EMI) 简明配置维护手册 目录 说明 (2) 产品特性 (2) 配置端口 (3) 配置一组端口 (3) 配置二层端口 (5) 配置端口速率及双工模式 (5) 端口描述 (6) 配置三层口 (7) 监控及维护端口 (9) 监控端口和控制器的状态 (9) 刷新、重置端口及计数器 (11) 关闭和打开端口 (12) 配置VLAN (13) 理解VLAN (13) 可支持的VLAN (14) 配置正常范围的VLAN (14) 生成、修改以太网VLAN (14) 删除VLAN (16) 将端口分配给一个VLAN (17) 配置VLAN Trunks (18) 使用STP实现负载均衡 (21)

说明 本手册只包括日常使用的有关命令及特性,其它未涉及的命令及特性请参考英文的详细配置手册。 产品特性 3750EMI是支持二层、三层功能(EMI)的交换机 支持VLAN ?到1005 个VLAN ?支持VLAN ID从1到4094(IEEE 802.1Q 标准) ?支持ISL及IEEE 802.1Q封装 安全 ?支持IOS标准的密码保护 ?静态MAC地址映射 ?标准及扩展的访问列表支持,对于路由端口支持入出双向的访问列表,对于二层端口支持入的访问列表 ?支持基于VLAN的访问列表 3层支持(需要多层交换的IOS) ?HSRP ?IP路由协议 o RIP versions 1 and 2 o OSPF o IGRP及EIGRP o BGP Version 4 监视

?交换机LED指示端口状态 ?SPAN及远端SPAN (RSPAN) 可以监视任何端口或VLAN的流量 ?内置支持四组的RMON监控功能(历史、统计、告警及事件) ?Syslog功能 其它功能: 支持以下的GBIC模块: ?1000BASE-T GBIC: 铜线最长100 m ?1000BASE-SX GBIC: 光纤最长1804 feet (550 m) ?1000BASE-LX/LH GBIC: 光纤最长32,808 feet (6 miles or 10 km) ?1000BASE-ZX GBIC: 光纤最长328,084 feet (62 miles or 100 km) 配置端口 配置一组端口

Cisco3550三层交换机配置与管理

Cisco3550三层交换机配置与管理(实例) 一、3550日常管理命令 (1) 二、密码恢复 (1) 三、VLAN配置 (4) 四、SPAN监听配置 (12) 五、DHCP服务配置 (13) 1. 在3550上配置DHCP服务.. 13 2. C3550配置作为DHCP中继代理.. 15 六、流量控制 (17) 七、策略路由 (19) 一、3550日常管理命令 clear arp-cache清除ARP缓存 arp 192.168.100.22 000a.eb22.c1b5 arpa 绑定MAC和IP sh ip accounting output-packets显示统计信息(当然需要配置统计功能如:ip accounting-transits 3200) 通过IP追查交换机端口:CiscoWorks 2000 LMS网管软件的User tracking可以追查一个IP地址对应的端口。sh mac-address-table address 00e0.9102.afd0 显示这个MAC地址在哪个接口出来的;sh mac-address-table interface Fa0/20显示20端口上的MAC地址,如果只有一个,则可能连接一个电脑,如果有很多个条目,则可以连接一个交换机。sh cdp entry *显示邻居信息; 二、密码恢复 下面步骤也适用于 Cisco 层 2 系列的交换机比如 Catalyst 2900/3500XL,2940,2950/2955和层 3 系列的比如 Catalyst 3550 的密码恢复. 通过终端或带有仿真终端程序(比如 Hyper Terminal)的 PC,连接到交换机的 console 对于Catalyst 2900/3500XL 拔下交换机的电源线,然后按住交换机的 Mode 按钮,再重新插上交换机的电源线.直到端口 Port 1x 的 LED 熄灭之后释放 Mode 按钮.Catalyst

三层交换机划分个vlan实现其互相通迅

综合实验 一台思科三层交换机划分3个vlanvlan2:ip网段vlan3:ipvlan4ip各vlan之间能互相通迅.现在增加1台cisco路由想实现共享 我们的PC0、PC1处在VLAN2中,PC2、PC3处在VLAN3中,Server0处在VLAN4中。现在要使我们内网能够正常访问我们的Server0服务器,然后同时还要能够访问我们的ISP外网的WWW服务器。 三层交换机的配置 Switch#configt Switch(config)#vlan2创建VLAN2 Switch(config-vlan)#exi Switch(config)#vlan3创建VLAN3 Switch(config-vlan)#exi Switch(config)#vlan4创建VLAN4 Switch(config-vlan)#exit Switch(config)#intfa0/2将我们的fa0/2添加到VLAN2中 Switch(config-if)#swmoac

Switch(config-if)#swacvlan2 Switch(config-if)#exit Switch(config)#intfa0/3将我们的FA0/3添加到VLAN3中 Switch(config-if)#swmoac Switch(config-if)#swacvlan3 Switch(config-if)#exit Switch(config)#intfa0/4将我们的FA0/4添加到VLAN4中 Switch(config-if)#swmoac Switch(config-if)#swacvlan4 Switch(config-if)#exit Switch(config)#intvlan2给我们的VLAN2添加一个IP地址,用于不同网段之间互相访问 Switch(config-if)#ipadd Switch(config-if)#exit Switch(config)#intvlan3给我们的VLAN3添加一个IP地址 Switch(config-if)#ipadd

思科2960交换机配置命令

思科2960交换机配置命令 交换机的端口工作模式一般可以分为三种:Access(普通模式),Multi(多vlan模式),Trunk(中继模式)。1、允许多个vlan的是multi模式,而不是trunk 模式。2、两个都设为trunk模式:一:如果在同一交换机上,则决不会在同一vlan;二:如果是两个交换机上,且两端口物理连接的话,共享vlan信息。但是这两个端口已经被使用,所以只能说,使用与这两个端口相同vlan的端口的计算机是同一虚拟局域网。3、access和multi模式下,端口用于计算机;trunk 模式下,端口用于交换机间连接。所以access和trunk没有可比性。 交换机基本状态: switch ;ROM状态,路由器是rommon hostname ;用户模式 hostname# ;特权模式 hostname(config)# ;全局配置模式 hostname(config-if)# ;接口状态 交换机口令设置: switchenable ;进入特权模式 switch#config terminal ;进入全局配置模式 switch(config)#hostname ;设置交换机的主机名 switch(config)#enable secret xxx ;设置特权加密口令 switch(config)#enable password xxa ;设置特权非密口令 switch(config)#line console 0 ;进入控制台口 switch(config-line)#line vty 0 4 ;进入虚拟终端 switch(config-line)#login ;允许登录 switch(config-line)#password xx ;设置登录口令xx switch#exit ;返回命令

Cisco交换机配置新手篇-端口配置(一)

C i s c o交换机配置新手篇-端口配置(一) 上回跟大家介绍了如何正确连接交换机,今天用一些配置片段给大家介绍一下端口的配置。鉴于网上大多数配置事例都是show-run出来的结果。不利于新手对命令配置过程的了解,所以笔者将配置片段和注意的地方都注明了一下,希望能帮助新手尽快了解如何正确配置交换机。 在IOS输入命令时只要缩写的程度不会引起混淆,使用配置命令的时候都可以使用缩写的形式。比如:Switch>enable,在用户模式下以en开头的命令就只有enable,所以可以缩写成Switch>en。也可以用TAB键把命令自动补全,如Switch>en,按键盘TAB后自动补全为Switch>enable。 快捷键: 1.Ctrl+A:把光标快速移动到整行的最开始 2.Ctrl+E:把光标快速移动到整行的最末尾 3.Esc+B:后退1个单词 4.Ctrl+B:后退1个字符 5.Esc+F:前进1个单词 6.Ctrl+F:前进1个字符 7.Ctrl+D:删除单独1个字符 8.Backspace:删除单独1个字符 9.Ctrl+R:重新显示1行 10.Ctrl+U:擦除1整行 11.Ctrl+W:删除1个单词 12. Ctrl+Z从全局模式退出到特权模式 13.Up arrow或者Ctrl+P:显示之前最后输入过的命令 14.Down arrow或者Ctrl+N:显示之前刚刚输入过的命令 配置enable口令以及主机名字,交换机中可以配置两种口令 (一)使能口令(enable password),口令以明文显示 (二)使能密码(enbale secret),口令以密文显示 两者一般只需要配置其中一个,如果两者同时配置时,只有使能密码生效. Switch.> /*用户直行模式提示符 Switch.>enable /*进入特权模式 Switch.# /*特权模式提示符 Switch.# config terminal /*进入配置模式 Switch.(config)# /*配置模式提示符 Switch.(config)# hostname Pconline /*设置主机名Pconline Pconline(config)# enable password pconline /*设置使能口令为pconline Pconline(config)# enable secret network /*设置使能密码为network Pconline(config)# line vty 0 15 /*设置虚拟终端线 Pconline(config-line)# login /*设置登陆验证 Pconline(config-line)# password skill /*设置虚拟终端登陆密码 注意:默认情况下如果没有设置虚拟终端密码是无法从远端进行telnet的,远端进行telnet 时候会提示设置login密码。许多新手会认为no login是无法从远端登陆,其实no login是代表不需要验证密码就可以从远端telnet到交换机,任何人都能telnet到交换机这样是很危险的,千万要注意。 Cisco交换机配置新手篇-端口配置(二)

思科设备三层交换机的vlan间通信配置

本次主要讲解三层交换实现vlan间的相互通信: 本例配置模型图 命令行: swA配置命令: Switch>enable Switch#vlandatabase//进入vlan配置模式 % Warning: It is recommended to configure VLAN from config mode, as VLAN database mode is being deprecated. Please consult user documentation for configuring VTP/VLAN in config mode. Switch(vlan)#vlan 2 name TztA//在swA上创建vlan 2 名为TztA VLAN 2 added: Name: TztA Switch(vlan)#vlan 3 name TztB//在swA上创建vlan 3 名为TztB VLAN 3 added: Name: TztB Switch(vlan)#exit APPLY completed. Exiting.... Switch#conf t Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#int f0/2 Switch(config-if)#switchport mode access

Switch(config-if)#switchport access vlan 2 //将f0/2划分给vlan 2 Switch(config-if)#exit Switch(config)#int f0/3 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 3 //将f0/3划分给vlan 3 Switch(config-if)#exit Switch(config)#int f0/1 Switch(config-if)#switchport mode trunk//配置与三层设备连接的f0/1为trunk模式 %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up Switch(config-if)#switchport trunk allowed vlan all //允许所有vlan通过f0/1端口Switch(config-if)#exit Switch(config)#exit Switch# %SYS-5-CONFIG_I: Configured from console by console Switch#wr Building configuration... [OK] Switch# (三层交换机)M sw命令配置: Switch> Switch>enable Switch#vlandatabase//进入vlan配置模式 % Warning: It is recommended to configure VLAN from config mode, as VLAN database mode is being deprecated. Please consult user documentation for configuring VTP/VLAN in config mode. Switch(vlan)#vlan 2 name TztA//在Msw上创建vlan 2 名为TztA VLAN 2 added: Name: TztA

思科交换机实用配置步骤详解

1.交换机支持的命令: 交换机基本状态: switch: ;ROM状态,路由器是rommon> hostname> ;用户模式 hostname# ;特权模式 hostname(config)# ;全局配置模式 hostname(config-if)# ;接口状态交换机口令设置: switch>enable ;进入特权模式 switch#config terminal ;进入全局配置模式 switch(config)#hostname ;设置交换机的主机名 switch(config)#enable secret xxx ;设置特权加密口令 switch(config)#enable password xxa ;设置特权非密口令switch(config)#line console 0 ;进入控制台口 switch(config-line)#line vty 0 4 ;进入虚拟终端 switch(config-line)#login ;允许登录 switch(config-line)#password xx ;设置登录口令xx switch#exit ;返回命令

交换机VLAN设置: switch#vlan database ;进入VLAN设置 switch(vlan)#vlan 2 ;建VLAN 2 switch(vlan)#no vlan 2 ;删vlan 2 switch(config)#int f0/1 ;进入端口1 switch(config-if)#switchportaccess vlan 2 ;当前端口加入vlan 2 switch(config-if)#switchport mode trunk ;设置为干线 switch(config-if)#switchport trunk allowed vlan 1,2 ;设置允许的vlan switch(config-if)#switchport trunk encap dot1q ;设置vlan 中继switch(config)#vtp domain ;设置发vtp域名 switch(config)#vtp password ;设置发vtp密码 switch(config)#vtp mode server ;设置发vtp模式 switch(config)#vtp mode client ;设置发vtp模式 交换机设置IP地址: switch(config)#interface vlan 1 ;进入vlan 1 switch(config-if)#ipaddress ;设置IP地址 switch(config)#ip default-gateway ;设置默认网关

cisco三层交换机vlan间路由配置实例

cisco三层交换机vlan间路由配置实例 下面以cisco3560实例说明如何在一个典型的快速以太局域网中实现VLAN。所谓典型局域网就是指由一台具备三层交换功能的核心交换机接几台分支交换机(不一定具备三层交换能力)。我们假设核心交换机名称为:COM;分支交换机分别为:PAR1、PAR2、PAR3,分别通过Port 1的光线模块与核心交换机相连;并且假设VLAN名称分别为COUNTER、MARKET、MANAGING…… 需要做的工作: 1、设置VTP DOMAIN(核心、分支交换机上都设置) 2、配置中继(核心、分支交换机上都设置) 3、创建VLAN(在server上设置) 4、将交换机端口划入VLAN 5、配置三层交换 1、设置VTP DOMAIN。 VTP DOMAIN 称为管理域。 交换VTP更新信息的所有交换机必须配置为相同的管理域。如果所有的交换机都以中继线相连,那么只要在核心交换机上设置一个管理域,网络上所有的交换机都加入该域,这样管理域里所有的交换机就能够了解彼此的VLAN列表。 COM#vlan database 进入VLAN配置模式 COM(vlan)#vtp domain COM 设置VTP管理域名称 COM COM(vlan)#vtp server 设置交换机为服务器模式 PAR1#vlan database 进入VLAN配置模式 PAR1(vlan)#vtp domain COM 设置VTP管理域名称COM PAR1(vlan)#vtp Client 设置交换机为客户端模式 PAR2#vlan database 进入VLAN配置模式 PAR2(vlan)#vtp domain COM 设置VTP管理域名称COM PAR2(vlan)#vtp Client 设置交换机为客户端模式 PAR3#vlan database 进入VLAN配置模式 PAR3(vlan)#vtp domain COM 设置VTP管理域名称COM PAR3(vlan)#vtp Client 设置交换机为客户端模式 注意:这里设置核心交换机为Server模式是指允许在该交换机上创建、修改、删除VLAN 及其他一些对整个VTP域的配置参数,同步本VTP域中其他交换机传递来的最新的VLAN 信息;Client模式是指本交换机不能创建、删除、修改VLAN配置,也不能在NVRAM中存储VLAN配置,但可同步由本 VTP域中其他交换机传递来的VLAN信息。 2、配置中继为了保证管理域能够覆盖所有的分支交换机,必须配置中继。Cisco交换机能够支持任何介质作为中继线,为了实现中继可使用其特有的ISL标签。ISL (Inter-Switch Link)是一个在交换机之间、交换机与路由器之间及交换机与服务器之间传递多个VLAN信息及VLAN数据流的协议,通过在交换机直接相连的端口配置 ISL封装,即可跨越交换机进行整个网络的VLAN分配和进行配置。 在核心交换机端配置如下: COM(config)#interface gigabitEthernet 2/1 COM(config-if)#switchport COM(config-if)#switchport trunk encapsulation isl 配置中继协议 COM(config-if)#switchport mode trunk COM(config)#interface gigabitEthernet 2/2 COM(config-if)#switchport COM(config-if)#switchport trunk encapsulation isl 配置中继协议 COM(config-if)#switchport mode trunk COM(config)#interface gigabitEthernet 2/3 COM(config-if)#switchport COM(config-if)#switchport trunk encapsulation isl 配置中继协议 COM(config-if)#switchport mode trunk 在分支交换机端配置如下: PAR1(config)#interface gigabitEthernet 0/1

思科三层交换机基于环形网络的配置方案(初学者的宝典)

Cisco三层交换机网络配置方案 二vlan设置 此处的实验划分了3个vlan,一个服务器组,一个子站的主环形通道,一个子站的备环形通道。如果有多个环形通道,按照文章中的主备环形通道的配置方法增加配置即可。本片文章是以Cisco 3560编写的,配置3750与3560不一样的地方会在每一部分的开头标出,如果没有标出就是两种交换机的配置方法是一样的。如果配置的是3750(或者其他型号的可堆叠Cisco交换机),请先参阅4.6。 2.1 进入配置模式 2.1.1 进入特权模式 Switch>en 如图6所示。 图 6 2.1.2 进入配置模式 Switch#configure terminal 如图7所示。 hou 图7 进入配置模式后就可以开始划分vlan了(关于“模式”的解释请查阅4.2)。

2.2 划分vlan 2.2.1 配置交换机的名称 Switch(config)#hostname switch1 如图8所示。 图8 2.2.2 划分3个vlan switch1(config)#vlan 10 !全局配置模式下进入vlan模式并创建vlan10 switch1(config-vlan)#name commmaster !把vlan10命名为commmaster switch1(config-vlan)#vlan 20 !vlan模式下创建vlan20 switch1(config-vlan)#name commbak !把vlan20命名为commbak switch1(config-vlan)#vlan 30 !vlan模式下创建vlan30 switch1(config-vlan)# name server !把vlan30命名为server switch1na switch1(config)# 如图9所示。 图9 2.2.3 分配端口 3560端口1的名称是g0/1,3750堆叠后交换机1的端口1名称是Gi1/0/1。交换机端口的名字是什么可在特权模式(即switch1#)下用sh vlan brief查看。 2.2.3中的命令是在3560下做的测试。gi1/0/21-22 switch1(config)#interface range g0/1-2 !进入一组端口g0/1-2 switch1(config-if-range)#switchport mode access !配置这组端口的模式为接入模式(可省略) switch1(config-if-range)#switchport access vlan 10 !把该组端口接入到vlan10 switch1(config-if-range)#interface range g0/23-24 !同上 switch1(config-if-range)#switchport mode access switch1(config-if-range)#switchport access vlan 20

Cisco交换机简单配置实例

命令句法约定: 垂直竖线 ( | )分隔可选的,互斥的元素 方括号 ([ ])表示可选的元素 花括号 ({ })表示必选项. 在方括号内的花括号 ( [{ }] )表示可选元素中的必选项. 粗体表示要按字母所示原封不动输入的命令和关键词.即粗休表示由用户手工输入的命令. 斜体表示要为之提供实际值的参数. Show 指令: # Show run (显示内存配置文件,当你下了一条指令即在内存中,但若没有用write mem 则不会写入Flash,) # Show conf (显示Flash配置文件,每条指令一定是写入到Flash中的,这样突然停机配置文件才不会丢失) # Show session (列出到本地交换机的连接上所有打开的会话以及连接号) # show int vlan n (n 是编号,用来查看vlan n的信息) # show hardware 或 show version (L2 IOS上显示交换机的硬件或模块信息) # show clock (显示日期和时间) # sh mac-address-table {dynamic | static | secure} mac-address {Vlan vlan-id} {interface int1 [int2…int4] {protocol {ip | ipx | assigned}} (显示mac 交换表信息) # sh mac-address-table address 0000.1111.2222 (显示特定的pc在交换机的哪一端口) # sh int status (显示所有端口的状态信息) # sh int f 0/1 switchport (显示指定交换端口的信息) Switch# boot system filesname (从Flash文件系统内指定一个引导系统的os映像) Switch# vlan database 进入VLAN数据库模式

思科交换机配置常用命令(精编文档).doc

【最新整理,下载后即可编辑】 Cisco三层交换机配置命令及解释 (2011-07-11 08:54:50) 分类:IT资讯 标签: cisco 杂谈 基本配置 S> enable 进入特权模式 S# configure terminal 进入全局配置模式 S(config)# hostname name 改变交换机名称 S(config)# enable password level level_# password 设置用户口令(level_#=1)或特权口令(level_#=15) S(config)# line console 0 进入控制台接口 S(config-line)# password console_password 接上一条命令,设置控制台口令 S(config)# line vty 0 15 进入虚拟终端 S(config-line)# password telnet_password 接上一条命令,设置Telnet口令 S(config-line)# login 允许Telnet登录 S(config)# enable password|secret privilege_password 配置特权口令(加密或不加密) S(config)# interface ethernet|fastethernet|gigabitethernet slot_#/port_# 进入接口子配置模式 S(config-if)# [no] shutdown 关闭或启用该接口(默认启用) S(config)# ip address IP_address sunbet_mask 指定IP地址 S(config)# ip default-gateway router's_IP_address 指定哪台路由器地址为默认网关 S# show running-config 查看当前的配置 S# copy running-config startup-config 将RAM中的当前配置保存到NVRAM中

相关文档
相关文档 最新文档