| 1 | == Commands for managing of Cisco 2960G/S and 2924XL switches == |
| 2 | |
| 3 | === Add user === |
| 4 | |
| 5 | {{{ |
| 6 | config terminal |
| 7 | username <USERNAME> privilege 15 password <PASSWORD> |
| 8 | enable secret <PASSWORD> |
| 9 | ! |
| 10 | line vty 0 15 |
| 11 | login local |
| 12 | exit |
| 13 | exit |
| 14 | copy running-config startup-config |
| 15 | }}} |
| 16 | |
| 17 | === Ports and VLANs status === |
| 18 | |
| 19 | {{{ |
| 20 | show interface |
| 21 | show interface status |
| 22 | show interface summary |
| 23 | show vlan |
| 24 | }}} |
| 25 | |
| 26 | === Add port to VLAN === |
| 27 | |
| 28 | {{{ |
| 29 | configure terminal |
| 30 | interface FastEthernet 0/1 |
| 31 | switchport access vlan 15 |
| 32 | exit |
| 33 | copy running-config startup-config |
| 34 | }}} |
| 35 | |
| 36 | === Add IP to a VLAN interface === |
| 37 | |
| 38 | {{{ |
| 39 | configure terminal |
| 40 | interface vlan <VLAN-ID> |
| 41 | ip address 10.42.42.<XX> 255.255.255.0 |
| 42 | exit |
| 43 | copy running-config startup-config |
| 44 | }}} |
| 45 | |
| 46 | === Restore a port that has been err-disabled === |
| 47 | |
| 48 | First, check which port has been err-disabled: |
| 49 | |
| 50 | {{{ |
| 51 | show interface status |
| 52 | show interface Gi0/10 |
| 53 | }}} |
| 54 | |
| 55 | Then enable it again: |
| 56 | |
| 57 | {{{ |
| 58 | enable |
| 59 | configure terminal |
| 60 | interface Gi0/10 |
| 61 | shutdown |
| 62 | end |
| 63 | write |
| 64 | enable |
| 65 | configure terminal |
| 66 | interface Gi0/10 |
| 67 | no shutdown |
| 68 | end |
| 69 | write |
| 70 | }}} |
| 71 | |