Comandos Cisco Switch

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

Command switch>?

switch>enable switch# switch#disable switch>exit switch#show version switch#show flash: switch#show mac-address-table

descriptions The ? works here the same as in a router Used to get the list of all available commands User mode, same as a router Privileged mode Leaves privileged mode Leaves user mode Displays information about software and hardware. Displays information about flash memory (will work only for the 2900/2950 series). Displays the current MAC address forwarding table .

switch#show running-config switch#show startup-config switch#show vlan switch#show interfaces switch#show interface vlan1

Displays the current configuration in DRAM. Displays the current configuration in NVRAM. Displays the current VLAN configuration. Displays the interface configuration and status of line: up/up, up/down, admin down. Displays setting of virtual interface VLAN 1, the default VLAN on the switch. To Reset Switch Configuration

Switch#delete flash:vlan.dat Delete filename [vlan.dat]? Delete flash:vlan.dat? [confirm] Switch#erase startup-config Switch#reload

Removes the VLAN database from flash memory. Press Enter Press Enter Erases the file from NVRAM. Restarts the switch. To Set Host Names

Switch#configure terminal Switch(config)#hostname Switch1 Switch1(config)#

Moves to global configuration mode Creates a locally significant host name of the switch. This is the same command as the router.

To Set Passwords Switch(config)#enable password vinita Sets the enable password to vinita

Switch(config)#enable secret nikki Switch(config)#line console 0 Switch(config-line)#login Switch(config-line)#password vinita Switch(config-line)#exit Switch(config-line)#line vty 0 4 Switch(config-line)#login Switch(config-line)#password vinita Switch(config-line)#exit Switch(config)#

Sets the encrypted secret password to nikki Enters line console mode Enables password checking Sets the password to vinita Exits line console mode Enters line vty mode for all five virtual ports Enables password checking Sets the password to vinita Exits line vty mode

To Set IP Addresses and Default Gateways Switch(config)#interface vlan1 Switch(config-if)#ip address 192.168.0.10 255.255.255.0 Switch(config-if)#exit Switch(config)#ip default-gateway 192.168.0.5 Allows IP information an exit past the local network To Set Interface Descriptions Switch(config)#interface fastethernet 0/1 Switch(config-if)#description Finance VLAN Enters interface configuration mode Adds a description of the interface To Set Duplex Operation Switch(config)#interface fastethernet 0/1 Switch(config-if)#duplex full Switch(config-if)#duplex auto Switch(config-if)#duplex half Moves to interface configuration mode Forces full-duplex operation Enables auto-duplex config Forces half-duplex operation To Set Operation Speed Switch(config)#interface fastethernet 0/1 Switch(config-if)#speed 10 Switch(config-if)#speed 100 Forces 10-Mbps operation Forces 100-Mbps operation Enters the virtual interface for VLAN 1, the default VLAN on the switch Sets the IP address and netmask to allow for remote access to the switch

Switch(config-if)#speed auto

Enables autospeed configuration MAC Address Table

switch#show mac address-table switch#clear mac address-table switch#clear mac address-table dynamic

Displays current MAC address forwarding table Deletes all entries from current MAC address forwarding table Deletes only dynamic entries from table

CONFIGURACIN ROUTER
Router>enable Router#config terminal Router(config)#exit Router#

Router(config)#enable password test Router(config)#enable secret vinita Router(config)#line console 0 Router(config-line)#password console Router(config-line)#login Router(config)#line vty 0 4 Router(config-line)#password telnet Router(config-line)#login Router(config)#line aux 0 Router(config-line)#password aux Router(config-line)#login

Sets enable password to test Sets enable secret password to vinita Enters console line mode Sets console line mode password to console Enables password checking at login Enters vty line mode for all five vty lines Sets vty password to telnet Enables password checking at login Enters auxiliary line mode Sets auxiliary line mode password to aux Enables password checking at login

Configuring a Fast Ethernet Interface


Router(config)#interface fastethernet 0/0 Router(config-if)#description Student Lab LAN Router(config-if)#ip address 192.168.20.1 255.255.255.0 Router(config-if)#no shutdown Moves to Fast Ethernet 0/0 interface configuration mode Optional descriptor of the link is locally significant Assigns address and subnet mask to interface Turns interface on

Creating a Message of the Day Banner


Router(config)#banner motd # Next Schedule metting with manager is Postponed Router(config)# #

The no ip domain-lookup Command


Router(config)#no ip domain-lookup Router(config)#

Router(config)#exit Router#copy running-config startup-config Router#copy running-config tftp Router#erase startup-config

Bring you back in Privilege exec mode Saves the running configuration to local NVRAM Saves the running configuration remotely to a TFTP server Deletes the startup configuration file from NVRAM

You might also like