networking:cisco:switch_command_reference
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| networking:cisco:switch_command_reference [2012/09/27 11:52] – external edit 127.0.0.1 | networking:cisco:switch_command_reference [2016/03/03 18:45] (current) – [VLANS] rplecko | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====BASIC DEVICE COMMANDS==== | + | ==== BASIC DEVICE COMMANDS ==== |
| - | Show Running Configuration File | + | ===Show Running Configuration File=== |
| - | #show running-config | + | |
| - | Show Startup Configuration File (NVRAM) | + | |
| - | #show startup-config | + | |
| - | Copy Changes from Running Config to the Startup Config | + | |
| - | #copy running-config startup-config | + | |
| - | Show Version (Platform Type / OS Revision / Last Boot / Memory / Interfaces / Conf Register) | + | |
| - | #show version | + | |
| - | ====BASIC SETINGS==== | + | < |
| + | #show running-config | ||
| + | </ | ||
| - | Set a Warning Banner for Login Prompt | + | ===Show Startup Configuration File (NVRAM)=== |
| - | > | + | |
| - | #configure terminal | + | |
| - | #banner motd & | + | |
| - | #banner line1 | + | |
| - | #banner line2 & | + | |
| - | #exit | + | |
| - | Set hostname | + | |
| - | > | + | |
| - | #configure terminal | + | |
| - | #hostname router1 | + | |
| - | #exit | + | |
| - | ====DEVICE SECURITY==== | + | < |
| + | #show startup-config | ||
| + | </ | ||
| - | Set Password and Level for Exec & Non-Exec Access (> | + | ===Copy Changes from Running Config to the Startup Config=== |
| - | #configure terminal | + | |
| - | #enable password level 15 EnablePass1 | + | |
| - | Set Level and Secret Password Access (recommended method) | + | |
| - | > | + | |
| - | #configure terminal | + | |
| - | #enable secret level 15 EnableSecret1 | + | |
| - | #exit | + | |
| - | ====SAVING AND RESTORING CONFIGURATIONS==== | + | < |
| + | #copy running-config startup-config | ||
| + | </ | ||
| - | Save Running Config to Startup Config | + | ===Show Version (Platform Type / OS Revision / Last Boot / Memory / Interfaces / Conf Register)=== |
| - | #copy running-configuration startup-configuration | + | |
| - | Save Running Config to a Remote TFTP Server | + | |
| - | #copy running-configuration tftp | + | |
| - | <enter IP> | + | |
| - | < | + | |
| - | Save Config From Remote TFTP Server to the Running Config | + | |
| - | #copy tftp running-configuration | + | |
| - | < | + | |
| - | < | + | |
| - | Delete NVRAM | + | |
| - | #delete nvram | + | |
| - | ====INFORMATIONAL COMAMNDS==== | + | < |
| + | #show version | ||
| + | </ | ||
| - | Show Spanning Tree Information (port cost/hello interval/ | + | ==== BASIC SETINGS ==== |
| - | >show spantree | + | |
| - | ====MAC ADDRESSES==== | + | ===Set a Warning Banner for Login Prompt=== |
| - | Show Mac Address Table (Shows which Devices are Connected to which Port) | + | < |
| - | | + | #configure terminal |
| - | Permanently Assign a Device MAC Address to a Port | + | #banner motd & |
| - | | + | #banner line1 |
| - | | + | #banner line2 & |
| - | | + | #exit |
| - | Clear Mac Address Table | + | </code> |
| - | #clear mac-address-table | + | |
| - | Configure Port Security to “Sticky Learn” the MAC Address Connected and only Allow that Device to Connect | + | |
| - | ===1900=== | + | |
| - | | + | |
| - | | + | |
| - | (config-if)# | + | |
| - | (config-if)# | + | |
| - | ===2950=== | + | |
| - | #conf term | + | |
| - | (config)# | + | |
| - | (config-if)# | + | |
| - | (config-if)# | + | |
| - | (config-if)# | + | |
| - | ====VLANS==== | + | ===Change BAUD rate=== |
| + | < | ||
| + | switch# | ||
| + | switch(config)# | ||
| + | switch(config-line)# | ||
| + | switch(config-line)# | ||
| + | switch#wr | ||
| + | </ | ||
| + | |||
| + | ===Set hostname=== | ||
| + | |||
| + | < | ||
| + | #configure terminal | ||
| + | #hostname router1 | ||
| + | #exit | ||
| + | </ | ||
| + | |||
| + | ==== DEVICE SECURITY ==== | ||
| + | |||
| + | ===Set Password and Level for Exec & Non-Exec Access (> | ||
| + | |||
| + | < | ||
| + | #configure terminal | ||
| + | #enable password level 15 EnablePass1 | ||
| + | </ | ||
| + | |||
| + | ===Set Level and Secret Password Access (recommended method)=== | ||
| + | |||
| + | < | ||
| + | #configure terminal | ||
| + | #enable secret level 15 EnableSecret1 | ||
| + | #exit | ||
| + | </ | ||
| + | |||
| + | ==== SAVING RESTORING AND DELETING CONFIGURATIONS ==== | ||
| + | |||
| + | === Save Running Config to Startup Config === | ||
| + | |||
| + | < | ||
| + | #copy running-configuration startup-configuration | ||
| + | </ | ||
| + | |||
| + | === Save Running Config to a Remote TFTP Server === | ||
| + | |||
| + | < | ||
| + | #copy running-configuration tftp | ||
| + | <enter IP> | ||
| + | < | ||
| + | </ | ||
| + | | ||
| + | === Save Config From Remote TFTP Server to the Running Config === | ||
| + | |||
| + | < | ||
| + | #copy tftp running-configuration | ||
| + | < | ||
| + | < | ||
| + | Delete NVRAM | ||
| + | #delete nvram | ||
| + | </ | ||
| + | |||
| + | ===Delete Current configuration=== | ||
| + | |||
| + | < | ||
| + | #write erase | ||
| + | < | ||
| + | #reload | ||
| + | </ | ||
| + | ==== INFORMATIONAL COMAMNDS ==== | ||
| + | |||
| + | ===Show Spanning Tree Information (port cost/hello interval/ | ||
| + | |||
| + | < | ||
| + | </ | ||
| + | |||
| + | ==== MAC ADDRESSES ==== | ||
| + | |||
| + | ===Show Mac Address Table (Shows which Devices are Connected to which Port)=== | ||
| + | |||
| + | < | ||
| + | </ | ||
| + | |||
| + | ===Permanently Assign a Device MAC Address to a Port=== | ||
| + | |||
| + | < | ||
| + | #conf term | ||
| + | (config)# | ||
| + | (config)# | ||
| + | </ | ||
| + | |||
| + | ===Clear Mac Address Table=== | ||
| + | |||
| + | < | ||
| + | #clear mac-address-table | ||
| + | </ | ||
| + | |||
| + | ===Configure Port Security to “Sticky Learn” the MAC Address Connected and only Allow that Device to Connect=== | ||
| + | |||
| + | == 1900 == | ||
| + | |||
| + | < | ||
| + | #conf term | ||
| + | (config)# | ||
| + | (config-if)# | ||
| + | (config-if)# | ||
| + | </ | ||
| + | |||
| + | == 2950 == | ||
| + | |||
| + | < | ||
| + | #conf term | ||
| + | (config)# | ||
| + | (config-if)# | ||
| + | (config-if)# | ||
| + | (config-if)# | ||
| + | </ | ||
| + | |||
| + | ==== VLANS ==== | ||
| Show VLAN | Show VLAN | ||
| - | | + | |
| - | Show Port VLAN Membership Information | + | < |
| - | >show vlan-membership | + | </ |
| - | Show VLAN Interface Information | + | |
| - | >show interface vlan 1 | + | ===Show Port VLAN Membership Information=== |
| - | Create VLANs | + | |
| - | #conf term | + | < |
| - | (config)# | + | </ |
| - | (config)# | + | |
| - | (config)# | + | ===Show VLAN Interface Information=== |
| + | |||
| + | < | ||
| + | </ | ||
| + | |||
| + | ===Create VLANs=== | ||
| + | |||
| + | < | ||
| + | #conf term | ||
| + | (config)# | ||
| + | (config)# | ||
| + | (config)# | ||
| + | </ | ||
| OR | OR | ||
| - | | + | |
| - | (vlan)#vlan 10 name testing | + | < |
| - | (vlan)#vlan 12 | + | #vlan database |
| - | Removing VLANs | + | (vlan)#vlan 10 name testing |
| - | #conf term | + | (vlan)#vlan 12 |
| - | (config)#no vlan 30 | + | </ |
| - | (config)#no vlan 25 name servers | + | |
| - | (config)#no vlan 20 printers | + | ===Removing VLANs=== |
| + | |||
| + | < | ||
| + | #conf term | ||
| + | (config)#no vlan 30 | ||
| + | (config)#no vlan 25 name servers | ||
| + | (config)#no vlan 20 printers | ||
| + | </ | ||
| OR | OR | ||
| - | #vlan database | ||
| - | (vlan)#no vlan 10 | ||
| - | (vlan)#no vlan 12 | ||
| - | Assigning a VLAN to a Single Port | ||
| - | 1900 | ||
| - | #conf term | ||
| - | (config)# | ||
| - | (config-if)# | ||
| - | 2950 | ||
| - | #conf term | ||
| - | (config)# | ||
| - | (config-if)# | ||
| - | (config-if)# | ||
| - | Removing a Single Port VLAN Assignment (Defaults Back to VLAN 1) | ||
| - | 1900 | ||
| - | #conf term | ||
| - | (config)# | ||
| - | (config-if)# | ||
| - | Assign a VLAN to a Range of Ports | ||
| - | 1900 | ||
| - | #conf term | ||
| - | (config)# | ||
| - | (config-if)# | ||
| - | Assign an IP to a VLAN | ||
| - | 1900 | ||
| - | #conf term | ||
| - | (config)# | ||
| - | (config-if)# | ||
| - | ====VTP (Virtual Trunking Protocol)==== | + | < |
| + | #vlan database | ||
| + | (vlan)#no vlan 10 | ||
| + | (vlan)#no vlan 12 | ||
| + | </ | ||
| + | |||
| + | ===Delete the VLAN information from Flash or NVRAM, and reload the switch=== | ||
| + | < | ||
| + | # delete flash: | ||
| + | < | ||
| + | |||
| + | # reload | ||
| + | < | ||
| + | </ | ||
| + | |||
| + | ===Assigning a VLAN to a Single Port 1900=== | ||
| + | |||
| + | < | ||
| + | #conf term | ||
| + | (config)# | ||
| + | (config-if)# | ||
| + | </ | ||
| + | |||
| + | ==2950== | ||
| + | |||
| + | < | ||
| + | #conf term | ||
| + | (config)# | ||
| + | (config-if)# | ||
| + | (config-if)# | ||
| + | </ | ||
| + | |||
| + | ===Removing a Single Port VLAN Assignment (Defaults Back to VLAN 1) 1900=== | ||
| + | |||
| + | < | ||
| + | #conf term | ||
| + | (config)# | ||
| + | (config-if)# | ||
| + | </ | ||
| + | |||
| + | ===Assign a VLAN to a Range of Ports 1900=== | ||
| + | |||
| + | < | ||
| + | #conf term | ||
| + | (config)# | ||
| + | (config-if)# | ||
| + | </ | ||
| + | |||
| + | ===Assign an IP to a VLAN 1900=== | ||
| + | |||
| + | < | ||
| + | #conf term | ||
| + | (config)# | ||
| + | (config-if)# | ||
| + | </ | ||
| + | |||
| + | ==== VTP (Virtual Trunking Protocol) ==== | ||
| + | |||
| + | ===Show VTP Status=== | ||
| + | |||
| + | < | ||
| + | </ | ||
| + | |||
| + | ===Show Trunk Information (1900)=== | ||
| + | |||
| + | < | ||
| + | </ | ||
| + | |||
| + | ===Set the VTP Domain=== | ||
| + | |||
| + | < | ||
| + | #conf term | ||
| + | (config)# | ||
| + | #vlan database | ||
| + | (config)# | ||
| + | </ | ||
| + | |||
| + | ===Set Switch as a VTP Server=== | ||
| + | |||
| + | < | ||
| + | #vlan database | ||
| + | (vlan)#vtp server | ||
| + | (vlan)#vtp domain mydomain | ||
| + | (vlan)#vtp password mypass1 | ||
| + | </ | ||
| + | |||
| + | ===Set Switch as a VTP Client=== | ||
| + | |||
| + | < | ||
| + | #vlan database | ||
| + | (vlan)#vtp client | ||
| + | (vlan)#vtp domain mydomain | ||
| + | (vlan)#vtp password mypass1 | ||
| + | </ | ||
| + | |||
| + | ===Trunk Link Create a Trunk Link that will Carry the VLAN Configurations=== | ||
| + | |||
| + | < | ||
| + | SW1#conf term | ||
| + | SW1(config)# | ||
| + | SW1(config-if)# | ||
| + | |||
| + | SW2#conf term | ||
| + | SW2(config)# | ||
| + | SW2(config-if)# | ||
| + | </ | ||
| - | Show VTP Status | + | ===Dynamic Trunk Link Create a Dynamic Trunk Link that will Carry the VLAN Configurations=== |
| - | >show vtp status | + | |
| - | Show Trunk Information (1900) | + | |
| - | >show trunk a | + | |
| - | >show trunk b | + | |
| - | Set the VTP Domain | + | |
| - | #conf term | + | |
| - | (config)# | + | |
| - | #vlan database | + | |
| - | (config)# | + | |
| - | Set Switch as a VTP Server | + | |
| - | #vlan database | + | |
| - | (vlan)#vtp server | + | |
| - | (vlan)#vtp domain mydomain | + | |
| - | (vlan)#vtp password mypass1 | + | |
| - | Set Switch as a VTP Client | + | |
| - | #vlan database | + | |
| - | (vlan)#vtp client | + | |
| - | (vlan)#vtp domain mydomain | + | |
| - | (vlan)#vtp password mypass1 | + | |
| - | Trunk Link | + | |
| - | Create a Trunk Link that will Carry the VLAN Configurations | + | |
| - | SW1#conf term | + | |
| - | SW1(config)# | + | |
| - | SW1(config-if)# | + | |
| - | + | ||
| - | SW2#conf term | + | |
| - | SW2(config)# | + | |
| - | SW2(config-if)# | + | |
| - | Dynamic Trunk Link | + | |
| - | Create a Dynamic Trunk Link that will Carry the VLAN Configurations | + | |
| - | SW1#conf term | + | |
| - | SW1(config)# | + | |
| - | SW1(config-if)# | + | |
| - | SW2#conf term | + | |
| - | SW2(config)# | + | |
| - | SW2(config-if)# | + | |
| + | < | ||
| + | SW1#conf term | ||
| + | SW1(config)# | ||
| + | SW1(config-if)# | ||
| + | SW2#conf term | ||
| + | SW2(config)# | ||
| + | SW2(config-if)# | ||
| + | </ | ||
networking/cisco/switch_command_reference.1348746742.txt.gz · Last modified: 2016/02/18 09:14 (external edit)
