meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
network:switches:cisco:cli [2024/07/11 14:38] niziaknetwork:switches:cisco:cli [2024/08/19 12:43] (current) niziak
Line 1: Line 1:
 ====== CLI ====== ====== CLI ======
  
 +===== info =====
 +
 +<code bash>
 +sh ver
 +</code>
 ===== passwords ===== ===== passwords =====
  
 <code> <code>
 conf term conf term
 +username admin privilege 15 secret password123
 enable secret 0 <pass> enable secret 0 <pass>
 ! for telnet: ! for telnet:
Line 84: Line 90:
 exit exit
 copy run start copy run start
-</code> 
- 
-===== VLAN ===== 
- 
-<code> 
-enable 
-show vlan 
-configure terminal 
- 
-! delete vlan 7 
-no vlan 7 
- 
-! add tagged vlan 28 
-vlan 28 
-name admin 
-end 
- 
-show vlan 
- 
-configure terminal 
-interface range Gi0/1-28 
-switchport trunk encapsulation dot1q 
-switchport trunk native vlan 1 
-switchport trunk allowed vlan add 28,255 
-no shut 
-end 
-</code> 
- 
-<code> 
-configure terminal 
-interface range Gi0/1-28 
-! to remove all ports from VLAN: 
-no switchport access vlan 
-end 
-</code> 
- 
-==== VLAN IP address ==== 
- 
-<code> 
-enable 
-configure terminal 
-interface vlan 1 
-no ip address DHCP 
-no ip address 
-end 
- 
-int vlan 28 
-ip address 192.168.28.31 255.255.252.0 
-no shutdown 
-exit 
- 
-ip default-gateway 192.168.28.1 
-ip name-server 192.168.28.1 
-ntp server 192.168.28.1 
-end 
- 
-show ip redirects 
-show spanning-tree vlan 28 
-sh int vlan 28 
- 
-copy running-config startup-config 
-</code> 
- 
-<code> 
-wr 
-copy running-config startup-config 
-</code> 
- 
-==== put one port in VLAN ==== 
- 
-<code> 
-conf term 
-interface Gi1/48 
-switchport access vlan 28 
-end 
-wr 
 </code> </code>
  
Line 165: Line 95:
 ===== reload ===== ===== reload =====
  
 +Reboots switch:
 <code>reload</code> <code>reload</code>
- 
-===== RSTP ===== 
- 
-<code> 
-show spanning-tree summary 
-enable 
-config 
-spanning-tree mode ? 
-spanning-tree mode rapid-pvst 
- 
-spanning-tree vlan 1 priority 57344 
-spanning-tree vlan 2 priority 57344 
-spanning-tree vlan 28 priority 57344 
-spanning-tree vlan 255 priority 57344 
-exit 
- 
-show spanning-tree bridge 
- 
-wr 
-copy run star 
- 
-</code> 
- 
-Disable STP: 
- 
-<code> 
-enable 
-config terminal 
-Switch(config)#no spanning-tree vlan 1 
-wr 
-copy run star 
-</code> 
  
  
Line 204: Line 103:
 <code> <code>
 sh mac address-table vlan 1 sh mac address-table vlan 1
 +sh mac address-table vlan 1 | include 50eb\.f62e
 </code> </code>
  
Line 251: Line 151:
 </code> </code>
  
 +Set VTP domain
 +<code>
 +conf term
 +vtp domain home
 +vtp mode transparent
 +vtp password home
 +end
 +wr
 +copy run star
 +</code>
  
 +
 +===== SNMP =====
 +
 +<code>
 +enable
 +switch# configure terminal
 +switch(config)# snmp-server community public RO
 +switch(config)# exit
 +switch# copy running-config startup-config
 +</code>