0% found this document useful (0 votes)
239 views

Cisco Commands

The document provides configuration commands for Cisco routers and switches. It covers topics such as passwords, interfaces, routing protocols, NAT/PAT, DHCP, PPP, ISDN, Frame Relay, SNMP, syslog, switches, VLANs, STP, and VTP.

Uploaded by

anil_shenoy
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
239 views

Cisco Commands

The document provides configuration commands for Cisco routers and switches. It covers topics such as passwords, interfaces, routing protocols, NAT/PAT, DHCP, PPP, ISDN, Frame Relay, SNMP, syslog, switches, VLANs, STP, and VTP.

Uploaded by

anil_shenoy
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 6

general/passwords show version show running-config show hosts #hostname word #ip host hostname ip enable secret *****

service password-encryption #line -login -password ***** interfaces show interface show ip interface (brief) show controllers #interface -ip address ip netmask -clock rate -encapsulation -no shutdown debugging terminal monitor show debugging debug ip proto no debug ip proto debug all no debug all undebug all routing show protocol show ip protocol show ip protocols show ip route (config)#ip default-network netblock (config)#ip route netblock mask hop (config)#ip route 0.0.0.0 0.0.0.0 [interface | next-hop address ] confreg tftpdnld boot show bootvar show reload

rom/boot

boot bootldr file-url boot bootstrap file-url boot system file-url config-register cdp show cdp show cdp interface show cdp neighbors show cdp detail #cdp enable #interface -cdp run acces lists show access-lists interface -ip access-group name in|out line -ip access-class name in|out #access-list name deny|permit #ip acces-list extended name -deny|permit proto source destination bolean port log RIP

(config)#router rip (config-router)# version # (config-router)# network netblock debug ip rip

OSPF (config)#interface loopback # (config-if)#ip address ip-address subnetmask (config)#router ospf process-id (config-router)#network address wildcard-mask area area-id (config-router)#default-information originate (config-router)#area area-id authentication (config-router)#area area-id authentication message-digest

IGRP

(config)#router eigrp AS# (config-router)#network netblock (config-router)#eigrp log-neighborchanges (config-router)#no auto-summary (config)#interface type # (config-if)#bandwidth kbps (config-if)#ip summary-address eigrp AS# ip mask [adm-dist]

#show ip ospf interface type # (config)#interface type # (config-if)#bandwidth 56 (config-if)#ip ospf priority # show ip eigrp neighbors (config-if)#ip ospf cost # (config-if)#ip ospf hello-interval seconds debug ip igrp transactions (config-if)#ip ospf dead-interval seconds debug ip igrp events (config-if)#ip ospf authentication-key password (config-if)#ip ospf message-digest-key key-id encryption-type md5 key show ip ospf neighbor debug ip ospf packet debug ip ospf events NAT/PAT (config)#interface type # (config-if)#ip nat inside (config)#interface type # (config-if)#ip nat outside ^needed for dynamic ? [static] (config)#ip nat inside source static privateip publicip overload? [dynamic] (config)#access-list accl# permit ip DHCP

(config-if)#ip helper-address ip (config)# ip dhcp excluded-address ip ip (config)# ip dhcp pool poolname (dhcp-config)# network ip mask (dhcp-config)# default-router ip (dhcp-config)# dns-server ip (dhcp-config)# lease day hour min show ip dhcp binding show ip dhcp server statistics

wildmask (config)#ip nat pool pname start-ip endip netmask mask (config)#ip nat inside source list accl# pool pname overload [dynamic] (config)#access-list accl# permit ip wildmask (config)#ip nat inside source list accl# interface type # overload show ip nat statistics verbose show ip nat translations clear ip nat translation {* | [inside g-ip lip] [outside l-ip g-ip]} debug ip nat detailed PPP ISDN show dhcp server show dhcp lease debug ip dhcp server events

(config)/(config-if)#isdn switch-type (config)# username word password word type (config-if)# encapsulation ppp (config-if)# ppp chap hostname str (config-if)#ppp authentication chap/pap (config-if)#compress stac/predictor (config-if)#ppp quality int (config-if)#ppp multilink (config-if)# ppp pap sent-username word password pass debug ppp debug ppp authentication debug ppp negociation debug ppp error [BRI] (config-if)#isdn spid1 # [ldn] (config-if)#isdn spid2 # [ldn] [PRI] (config)#controller {t1 | e1} {slot/port} (config-controller)#framing {sf | esf} [USA] (config-controller)#framing {crc4 | nocrc4} [EU] (config-controller)#linecode {ami | b8zs| hdb3} (config-controller)#pri-group [timeslotsrange] (config)#interface serial{slot/port: | unit:}{23 | 15} show isdn [status / active] show dialer show interface bri0/0:1 debug isdn debug dialer [events/packets] isdn call interface int phone#

clear interface bri

DDR

Frame Relay

[SW] (config)#frame-relay switching (config)#ip route net-prefix mask (config-if)#no ip address {address | interface } (config-if)#encapsulation frame-relay (config-if)#frame-relay intf-type dce (config)#interface dialer (config-if)#clock rate 56000 (config-if)#dialer idle-timeout sec (config-if)#frame-relay route indlc (config-if)#dialer-map ip nexthop name interface int outdlc hopword phone# (config-if)#dialer string phone# [CLI] (config-if)#dialer remote-name word (config-if)#ip address ip netmask (config-if)#dialer pool pool# (config-if)#bandwidth 64 (config-if)#dialer-group dial# (config-if)#encapsulation frame-relay [cisco|ietf] (config-if)#int phys (config-if)#frame-relay lmi-type [ansi| (config-if)#dialer pool-member pool# cisco|q933a] priority # (config-if)#frame-relay map protol proto-addr dlci# [broadcast] (config)#dialer-list dial# protocol proto permit/deny (config-if)#interface serial 0/0.dlci# (config)#dialer-list dial# protocol proto point-to-point list acl# (config-subif)#frame-relay interface-dlci dlci# (config)#access-list acl# deny proto any any eq ftp (config)#access-list acl# deny proto any show frame-relay pvc any eq telnet show frame-relay lmi (config)#access-list acl# permit proto any show frame-relay map any clear frame-relay-inarp debug frame-relay lmi SNMP Syslog

(config)#logging on (config)#logging hostname | ip address (config)#snmp-server community string (config)#logging trap/history ro informational (config)#snmp-server community string (config)#logging facility string rw (config)#logging source-interface (config)#snmp-server location text loopback0 (config)#snmp-server contact text (config)#logging timestamps log (config)#snmp-server user username datetime groupname v3 [auth] [md5] (config)#service timestamps log datetime ??

SWITCH #hostname word #show mac-address-table #clear mac-address-table [dynamic] #show port security #show interface status (config)#ip default-gateway ip (config)#interface VLAN 1 (config-if)#ip address ip mask (config)#mac-address-table static macaddress of host interface FastEthernet # vlan vlan name port security

(config)#enable secret class (config)#line con 0 (config-line)#password cisco (config-line)#login (config-line)#line vty 0 15 (config-line)#password cisco (config-line)#login

VLAN #show vlan [brief] #show vlan id # #show vlan-membership #vlan database (vlan)#vlan vlan# name name (config)#interface type #[.subport] (config-if)#switchport mode access (config-if)#switchport access vlan vlan# #debug sw-vlan packets

(config)#interface fastethernet # (config-if)#switchport mode access (config-if)#switchport port-security (config-if)#switchport port-security macaddress sticky (config-if)#switchport port-security maximum 1 (config-if)#port secure (config-if)#port secure max-mac-count 1

STP

VTP

#show spanning-tree [brief] (config)#spanning-tree priority 1 (config)#spanning-tree vlan 1 priority 4096

#show interfaces type 0/port_num #show interfaces trunk #show vtp status #show vtp counters

#vlan database (vlan)#vtp v2-mode (config)# spanning-tree vlan vlan# hello(vlan)#vtp domain cisco time hello_time (vlan)#vtp {client | server | transparent} (config)# spanning-tree vlan vlan# maxage 40 (config)#interface type # (config-if)#switchport mode trunk (config)#interface type # (config-if)#switchport trunk (config-if)#spanning-tree cost port_cost encapsulation dot1q (config-if)#spanning-tree vlan vlan# cost (config-if)#ip address ip-address subnetport_cost mask

You might also like