打印本文 关闭窗口 | |
Cisco交换机配置入门帮助与注意 | |
作者:陈鹏 文章来源:eNet 点击数 更新时间:2009/9/9 21:31:14 文章录入:陈鹏 责任编辑:陈鹏 | |
|
|
机型:Cisco 3750 想对交换机警醒配置。一般有两种方法: 1 、控制台端口(Console ):可以直接对交换机进行配置2 、远程登录(Telnet):通过TELNET程序对已经设置了IP的交换机进行远程配置,一般等控制台端口配置好交换机的IP后才可以进行。 除了以上的两种方法外,其实还有两种方法: 1 、WEB 的配置方式。此方法只能配置一般的简单设置2 、硬件自带的应用程序。专用的程序,一般很少用 建立控制台连接到交换机 一般交换机自带一根Console 线,一端连接到交换机的Comsole 口,一端连接到电脑的串行口。打开超级终端,一般就可以连接到交换机。具体的参数设置如下 这样就可以连接到交换机了 连接到交换机后,如果是第一次启动会要执行初始化操作,一般是设置交换机的名称,密码等一般的信息。 由于交换机已经初始化,如果要进行初始化操作,那就要进入特权EXEC模式,在命令提示符号下输入:setup,就会启动初始化操作。 刚才讲到了特权EXEC模式,这理就要讲一下觉换机的几种模式,不同的模式可以执行不同的操作命令,首先来说两种基本的模式。 一般为了安全考虑,CISCO将操作会话分为两个不同的访问级别:用户EXEC级别和特权EXEC级别。用户EXEC级别只能使用有限的命令,且交换机显示Switch>提示符,不能对交换机进行配置。看例子,处于用户EXEC级别下的状态: AITG_FrontekCoreSW> 特权EXEC级别下交换机显示Switch#提示符,能对交换机进行各种配置。看例子,处于特权EXEC级别下的状态: 输入en,进入特权EXEC级别,接着输入密码,进入特权EXEC级别 AITG_FrontekCoreSW>en Password: AITG_FrontekCoreSW# 看看,提示符变了,用户在用户EXEC级别输入enable(或en),然后输入密码,就可以进入特权EXEC级别 在交换机提示符下输入“?”,可以列出相应模式下交换机所支持的所有命令。 退出特权EXEC级别模式:disable 再用户EXEC级别输入?可以获得帮助信息: AITG_FrontekCoreSW>? Exec commands: <1-99> Session number to resume access-enable Create a temporary Access-List entry clear Reset functions connect Open a terminal connection disable Turn off privileged commands disconnect Disconnect an existing network connection enable Turn on privileged commands exit Exit from the EXEC help Description of the interactive help system lock Lock the terminal login Log in as a particular user logout Exit from the EXEC name-connection Name an existing network connection ping Send echo messages rcommand Run command on remote switch resume Resume an active network connection set Set system parameter (not config) show Show running system information systat Display information about terminal lines telnet Open a telnet connection terminal Set terminal line parameters traceroute Trace route to destination tunnel Open a tunnel connection where List active connections 再特权EXEC级别输入?可以获得帮助信息: AITG_FrontekCoreSW#? Exec commands: <1-99> Session number to resume access-enable Create a temporary Access-List entry access-template Create a temporary Access-List entry archive manage archive files cd Change current directory clear Reset functions clock Manage the system clock cns CNS agents configure Enter configuration mode connect Open a terminal connection copy Copy from one file to another debug Debugging functions (see also 'undebug') delete Delete a file diagnostic Diagnostic commands dir List files on a filesystem disable Turn off privileged commands disconnect Disconnect an existing network connection dot1x IEEE 802.1X Exec Commands enable Turn on privileged commands eou EAPoUDP erase Erase a filesystem exit Exit from the EXEC format Format a filesystem fsck Fsck a filesystem help Description of the interactive help system ip Global IP commands lock Lock the terminal login Log in as a particular user logout Exit from the EXEC mkdir Create new directory monitor Monitoring different system events more Display the contents of a file name-connection Name an existing network connection no Disable debugging functions no Negate a command or set its defaults ping Send echo messages pwd Display current working directory rcommand Run command on remote switch reload Halt and perform a cold restart remote Remote procedures rename Rename a file renew Renew resume Resume an active network connection rmdir Remove existing directory rsh Execute a remote command send Send a message to other tty lines session Run command on member switch set Set system parameter (not config) setup Run the SETUP command facility show Show running system information systat Display information about terminal lines telnet Open a telnet connection terminal Set terminal line parameters test Test subsystems, memory, and interfaces traceroute Trace route to destination tunnel Open a tunnel connection udld UDLD protocol commands undebug Disable debugging functions (see also 'debug') upgrade Upgrade commands verify Verify a file vlan Configure VLAN parameters vmps VMPS actions vtp Configure global VTP state where List active connections write Write running configuration to memory, network, or terminal 其实还有几种模式如下: 全局配置模式:Switch(config)# 配置交换机的全局参数 接口配置模式:Switch(config-if)# 对交换机的接口进行配置,如某个接口属于那个Vlan,启用及禁用 接口等 线路配置模式:Switch(config-line)# 对控制台访问 VLAN数据库配置模式:Switch(Vlan)# 对Vlan的参数进行配置 再稍候我们来慢慢将解这些相应的模式下的作用与用法。 Cisco 交换机配置入门 机型:Cisco 3750 现在我们来继续讲解关于输入Cisco 命令时注意的一些事项与帮助 1.关于帮助 直接使用“?”,可以获得相应模式下的所支持的命令列表,如果再问号前面加上一些命令的开头的字母,就可以获得一些以此字母开头的命令,如: AITG_FrontekCoreSW#s? *s=show send session set setup show systat 输入"S?",就可以获得以S开头的所有字母。 2、命令帮助 如果对某个命令的用法不熟悉时,也可以使用“?”来获取其详细的帮助,如想对show的命令作一个具体的了解,可以使用:“show ?” AITG_FrontekCoreSW#show ? aaa Show AAA values access-lists List access lists accounting Accounting data for active sessions adjacency Adjacent nodes aliases Display alias commands archive Archive functions arp ARP table auto Show Automation Template auto Show Automation Template boot show boot attributes buffers Buffer pool statistics cable-diagnostics Show Cable Diagnostics Results cca CCA information cdp CDP information cef CEF address family independent status class-map Show QoS Class Map clock Display the system clock cluster Cluster information cns CNS agents configuration Configuration details controllers Interface controller status dampening Display dampening information debugging State of each debugging option derived-config Derived operating configuration dhcp Dynamic Host Configuration Protocol status diagnostic Show command for diagnostic dot1q-tunnel Display dot1q tunnel ports dot1x Dot1x information dtp DTP information eap Shows EAP registration/session information env Environmental facilities eou EAPoUDP errdisable Error disable etherchannel EtherChannel information exception exception informations file Show filesystem information flash1: display information about flash1: file system flash: display information about flash: file system flowcontrol show flow control information history Display the session command history hosts IP domain-name, lookup style, nameservers, and host table html HTML helper commands idb List of Hardware Interface Descriptor Blocks identity Identity profiles and policies idprom show IDPROMs for interfaces interfaces Interface status and configuration inventory Show the physical inventory ip IP information ipc Interprocess communications commands ipv6 IPv6 information key Key information kron Kron Subsystem l2protocol-tunnel Display L2PT status and configurations lacp Port channel information line TTY line information link Show Link location Display the system location logging Show the contents of logging buffers login Display Secure Login Configurations and State mac MAC configuration mac-address-table MAC forwarding table memory Memory statistics mls mls global commands monitor Monitoring different system events mvr Show mvr global parameters ntp Network time protocol pagp Port channel information parser Show parser commands platform platform specific show commands pm Show Port Manager commands policy-manager Policy Manager policy-map Show QoS Policy Map port-security Show secure port information post Show the results of the system POST power Switch Power privilege Show current privilege level processes Active process statistics protocols Active network routing protocols queue Show queue contents queueing Show queueing configuration radius Shows radius information region Region Manager Status registry Function registry information reload Scheduled reload information resource Resource group statistics rhosts Remote-host+user equivalences rmon rmon statistics route-map route-map information rtr Service Assurance Agent (SAA) running-config Current operating configuration scp SCP commands sdm Switch database management service-module Service Module commands sessions Information about Telnet connections setup Show express setup settings snmp snmp statistics spanning-tree Spanning tree topology stacks Process stack utilization standby Hot Standby Router Protocol (HSRP) information startup-config Contents of startup configuration storm-control Show storm control configuration subsys Show subsystem information switch show information about the stack ring system Show the system configuration table-map Show Table Map tacacs Shows tacacs+ server statistics tcp Status of TCP connections tech-support Show system information for Tech-Support template Template information terminal Display terminal configuration parameters time-range Time range track Tracking information udld UDLD information users Display information about terminal lines version System hardware and software status vlan VTP VLAN status vmps VMPS version information vtp VTP information xdr Show details about XDR 3、显示完整的命令 再一个部分命令的后面直接加上“?”就可以显示其输出结果,如例子: AITG_FrontekCoreSW#show interface ? Async Async interface BVI Bridge-Group Virtual Interface CTunnel CTunnel interface Dialer Dialer interface Filter Filter interface Filtergroup Filter Group interface GigabitEthernet GigabitEthernet IEEE 802.3z Loopback Loopback interface Null Null interface Port-channel Ethernet Channel of interfaces Portgroup Portgroup interface Pos-channel POS Channel of interfaces Tunnel Tunnel interface Vif PGM Multicast Host interface Virtual-Template Virtual Template interface Virtual-TokenRing Virtual TokenRing Vlan Catalyst Vlans accounting Show interface accounting capabilities Show interface capabilities information counters Show interface counters crb Show interface routing/bridging info dampening Show interface dampening info debounce Show interface debounce time info description Show interface description etherchannel Show interface etherchannel information fair-queue Show interface Weighted Fair Queueing (WFQ) info fcpa Fiber Channel flowcontrol Show interface flowcontrol information irb Show interface routing/bridging info mac-accounting Show interface MAC accounting info mpls-exp Show interface MPLS experimental accounting info mtu Show interface mtu precedence Show interface precedence accounting info private-vlan Show interface private vlan information pruning Show interface trunk VTP pruning information random-detect Show interface Weighted Random Early Detection (WRED) info rate-limit Show interface rate-limit info stats Show interface packets & octets, in & out, by switching path status Show interface line status summary Show interface summary switchport Show interface switchport information transceiver Show interface transceiver trunk Show interface trunk information vlan Show interface vlan information Output modifiers 以上是帮助选项,我们再来看看其他的快捷方式: 1、使用TAB键 当输入命令的一部分字母时,按下TAB键,系统就可以自动输入此命令的剩余字母,如: AITG_FrontekCoreSW#sh ---TAB键 AITG_FrontekCoreSW#show AITG_FrontekCoreSW#show int ---TAB键 AITG_FrontekCoreSW#show interfaces 2、命令缩写 有些命令没有必要将所有的字母输入完全,输入一部分就可以了,如: AITG_FrontekCoreSW#sh int =show interface Vlan1 is up, line protocol is up Hardware is EtherSVI, address is 0019.aa89.dd40 (bia 0019.aa89.dd40) ......... 建议大家最好将命令记全。 |
|
打印本文 关闭窗口 |