Joke Collection Website - News headlines - cisco switch configuration commands

cisco switch configuration commands

switchgt; User mode 1: Enter privileged mode enableswitchgt; enableswitch#2: Enter global configuration mode configure terminalswitchgt; enableswitch#configure terminalswitch(conf)#3: Switch name hostname aptech2950 Take aptech2950 as an example switchgt; enableswitch #configure terminalswitch(conf)#hostname aptch-2950aptech2950(conf)#4: Configure the enable password enable password cisco Take cisco as an example switchgt; enableswitch#configure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# enable password cisco5: Configure enable password Enable secret ciscolab Take cicsolab as an example switchgt; enableswitch#configure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# enable secret ciscolab6: Set up virtual LAN vlan 1 interface vlan 1switchgt; enableswitch#configure terminalswitch(conf)#hostname aptch2950aptech2950(conf )# interface vlan 1aptech2950(conf-if)#ip address 192.168.1.1 255.255.255.0 Configure switch port ip and subnet mask aptech2950(conf-if)#no shut Yes, the configuration is running aptech2950(conf-if)#exitaptech2950( conf)#ip default-gateway 192.168.254 Set gateway address 7: Enter a certain port of the switch interface fastehernet 0/17 Take port 17 as an example switchgt; enableswitch#configure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# interface fastehernet 0/ 17aptech2950(conf-if)#8: View the command showswitchgt; enableswitch# show version View all version information in the system show interface vlan 1 View the configuration information about the ip protocol of the switch show running-configure View the currently active configuration information of the switch show interface fastethernet 0/1 View the specific configuration and statistical information of the switch 1 interface show mac-address-table View the mac address table show mac-address-table aging-time View the automatic aging time of the mac address table 9: Restore the switch to factory default recovery command switchgt; enableswit

ch# erase startup-configureswitch# reload10: Duplex mode setting switchgt; enableswitch#configure terminalswitch2950(conf)#hostname aptch-2950aptech2950(conf)# interface fastehernet 0/17 Take port 17 as an example aptech2950(conf-if)#duplex full /half/auto has three options: full, half and auto 11: cdp related command switchgt; enableswitch# show cdp View the cdp global configuration information of the device show cdp interface fastethernet 0/17 View the cdp configuration information of port 17 show cdp traffic view Statistics about cdp packets show cdp nerghbors List cisco devices connected to the device 12: Password recovery for csico2950 Unplug the switch power cord. Press the MODE button of the switch with your hand, plug in the power cord, and execute the flash_ini command after switch:: switch: flash_ini View the files in the flash: switch: dir flash: Rename the "config.text" file to "config.old": switch: rename flash: config.text flash: config.old execute boot: switch: boot switch enters the dialog box to enter the configuration, execute no: enter privileged mode to view the files in flash: show flash: rename the "config.old" file For "config.text": switch: rename flash: config.old flash: config.text Copy "config.text" into the system's "running-configure": copy flash: config.text system: running-configure puts the configuration mode Reset the password and save it to disk. The password recovery is successful.

13: Switch Telnet remote login settings: switchgt; enswitch#configure terminalswitch(conf)#hostname aptech-2950aptech2950(conf)#enable password cisco Use cisco as the privileged mode password aptech2950(conf)#interface fastethernet 0/1 Use port 17 as telnet Remote login port aptech2950(conf-if)#ip address 192.168.1.1 255.255.255.0aptech2950(conf-if)#no shutaptech2950(conf-if)#exitaptech2950(conf)line vty 0 4 Set 0-4 users to telnet remotely Log in to aptech2950(conf-line)#loginaptech2950(conf-line)#password edge. Use edge as the user password for remote login. Host settings: ip 192.168.1.2. The host ip must be in the same network segment as the switch port address. netmask 255.255.255.0gate -way 192.168.1.1 The gateway address is the switch port address. Run: telnet 192.168.1.1. Enter the telnet remote login interface password: edge aptech2950gt; enpassword: ciscoaptech#14: Reload and save the switch configuration. After completing the switch configuration: aptech2950( conf)#reload whether to save (y/n) y: Save the setting information n: Do not save the setting information router command routergt; User mode 1: Enter the privileged mode enablerouter gt; enablerouter #2: Enter the global configuration mode configure terminalrouter gt; enablerouter # configure terminalrouter (conf)#3: Switch name hostname routera Take routerA as an example router gt; enablerouter #configure terminalrouter(conf)#hostname routerAroutera (conf)#4: Configure the enable password enable password cisco Take cisco as an example router gt; enablerouter #configure terminalrouter(conf)#hostname routerArouterA (conf)# enable password cisco5: Configure the enable password enable secret ciscolab Take cicsolab as an example router gt; enablerouter #configure terminalrouter(conf)#hostname routerArouterA (conf)# enable secret ciscolab6: Enter A certain port of the router interface fastehernet 0/17 Take port 17 as an example router gt; enablerouter #configure terminalrouter(conf)#hostname routerArouterA (con

f)# interface fastehernet 0/17routerA (conf-if)# Enter a sub-port of the router interface fastethernet 0/17.1. Take sub-port 1 of port 17 as an example router gt; enablerouter #configure terminalrouter(conf)#hostname routerArouterA (conf )# interface fastehernet 0/17.17: Set port ip address information router gt; enablerouter #configure terminalrouter(conf)#hostname routerArouterA(conf)# interface fastehernet 0/17 Take port 17 as an example routerA (conf-if)#ip address 192.168 .1.1 255.255.255.0 Configure the switch port ip and subnet mask routerA (conf-if)#no shut Yes, the configuration is running routerA (conf-if)#exit8: View the command showrouter gt; enablerouter # show version View all in the system Version information show interface vlan 1 View the configuration information about the IP protocol of the switch show running-configure View the currently active configuration information of the switch show interface fastethernet 0/1 View the specific configuration and statistical information of the switch 1 interface show mac-address-table View the mac address Table show mac-address-table aging-time View the automatic aging time of the mac address table show controllers serial number View serial port type show ip router View the routing table of the router 9: cdp related commands router gt; enablerouter # show cdp View the cdp global configuration of the device Information show cdp interface fastethernet 0/17 View the cdp configuration information of port 17 show cdp traffic View statistics about cdp packets show cdp nerghbors List the cisco devices connected to the device 10: Password recovery of csico2600 Restart the router, during the startup process Press the win break key to enter the rom monitor of the router. Enter the command at the prompt to modify the value of the configuration register, and then restart the router: remmon1gt; confreg 0x2142remmon2gt; reset. After restarting the router, enter the setup mode. Select "no" to return to the exec mode. , at this time, the original configuration of the router is still saved in startup-config. In order to keep the configuration unchanged after the router restores the password, save the configuration in startup-config to running-config, then reset the enable password, and change the configuration register back 0x2102: routergt; enable router#copy startup-config running-configrouter#configure terminalrouter(conf)#enable password ciscorouter(conf)#config-register 0x21

02Save the current configuration to startup-config and restart the router. router #copy running-config startup-config router #reload11: Router telnet remote login settings: routergt; enrouter #configure terminalrouter (conf)#hostname routerArouterA (conf)#enable password cisco Use cisco as the privileged mode password routerA (conf)#interface fastethernet 0/1 Use port 17 as the telnet remote login port routerA (conf-if)#ip address 192.168.1.1 255.255.255.0routerA (conf-if)#no shutrouterA (conf-if)#exitrouterA (conf)line vty 0 4 Set 0-4 users to remotely log in to routerA via telnet (conf-line)#loginrouterA (conf-line)#password edge. Use edge as the user password for remote login. Host settings: ip 192.168.1.2. The ip of the host must be the same as the switch port address. In the same network segment, netmask 255.255.255.0gate-way 192.168.1.1. The gateway address is the switch port address. Run: telnet 192.168.1.1. Enter the telnet remote login interface password: edge routerragt; enpassword: ciscoroutera#12: Configure the router's identification banner $... .........$Use the "banner" command in global configuration mode to configure the router's prompt information, which will be received by all terminals connected to the router. routergt;enrouter #configure terminalrouter (conf)#hostname routerArouterA(conf)#banner motd $This is aptech company' router! Please don't change the configuration without permission!$13: Configuration interface identification description...The interface identification is used to distinguish Each interface of the router. routergt;enrouter #configure terminalrouter (conf)#hostname routerArouterA(conf)#interface fastethernet 0/1 Take interface 0/1 as an example routerA(conf-if)# description this is a fast Ethernet port used to connecting the company's intranet! 14 : Configuration timeout The timeout is suitable for setting how long the console is not configured and automatically returns to the exec session time. The default is 10 minutes.

routergt;enrouter #configure terminalrouter (conf)#hostname routerArouterA(conf)#line console 0routerA(conf-if)#exec-timeout 0 0 first "0" minutes, second "0" seconds 15: Configure serial port parameters To connect two routers through the serial port, one needs to be used as DTE and the other as DCE. The DCE device must provide clock frequency and bandwidth to the DTE device.

DCE configuration: routergt; enrouter #configure terminalrouter (conf)#hostname routerArouterA(conf)#interface serial 0/0routerA(conf_if)#clock rate 64000 provides a clock frequency of 64000routerA(conf_if)#bandwidth 64 provides a bandwidth of 64DTE configuration: router serial port Configure ip address routergt; enrouter #configure terminalrouter (conf)#hostname routerBrouterB(conf)#interface serial 0/0routerB(conf_if)#ip address 192.168.1.1 255.255.255.016: Static routing configuration Configure the host name and interface parameters of router A routergt ;enable router#configure terminalrouter(conf)#hostname routerArouterA(conf)#interface fastethernet 0/1 Port 1 of router A is the connection port of the two routers routerA(conf-if)#ip address 192.168.2.1 255.255.255.0routerA(conf -if)#no shutdownrouterA(conf-if)#exitrouterA(conf)# interface fastethernet 0/0 Port 0 of router A is the connection port to the host routerA(conf-if)#ip address 192.168.1.2 255.255.255.0routerA( conf-if)#no shutdown The IP address of host A is 192.168.1.1 255.255.255.0 192.168.1.2 Configure the host name and interface parameter routergt of router B; enable router#configure terminalrouter(conf)#hostname routerBrouterB(conf)#interface fastethernet 0 /0 Port 0 of Router B is the connection port between the two routers routerB(conf-if)#ip address 192.168.2.2 255.255.255.0routerB(conf-if)#no shutdownrouterB (conf-if)#exitrouterB(conf)# interface fastethernet 0/1 Port 1 of router B is the connection port with the host routerB(conf-if)#ip address 192.168.3.1 255.255.255.0 The ip address of host B is 192.168.3.2255.255.255.0 192.168.3.1 Configure the static configuration of router A Routing table routerA(conf)#ip router 192.168.3.0 255.255.255.0 192.168.2.2 Configure the static routing table of router B routerA(conf)#ip router 192.168.1.0 255.255.255.0 192.168.2.1 Configure the default route routerA on routerA and routerB (conf)#ip rout

e 0.0.0.0 0.0.0.0 192.168.2.2routerA(conf)#ip classlessrouterB(conf)#ip route 0.0.0.0 0.0.0.0 192.168.2.1routerB(conf)#ip classless Configure dynamic routing (RIP) on routerA and routerB routerA(conf)#router riprouterA(conf)#network 192.168.1.0routerA(conf)#network 192.168.2.0routerB(conf)# router riprouterB(conf)#network 192.168.2.0routerB(conf)#network 192.168.3.0