Showing posts with label Cisco. Show all posts
Showing posts with label Cisco. Show all posts

Clear Cisco Router Configuration Back to Factory Defaults

Router#erase startup-config
Erasing the nvram filesystem will remove all files! Continue? [confirm]
[ OK]
Erase of nvram: complete
Router#reload
Proceed with reload? [confirm]

Configuration Archiving on Cisco Routers

Create directory in flash to store arhived configs

Router#cd slot0:
Router#mkdir configs
Create directory filename [ configs] ?
Created dir slot0: /configs
Router#

Configure archiving. Configuration stored in archive every time you do a write memory or copy running-config startup-config.

Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config) #archive
Router(config-archive) #path slot0: /configs/$h ($h uses hostname, $t uses date/time stamp)
Router(config-archive) #write-memory
Router(config-archive) #time-period 1440 (automatic scheduled archive every 1,440 minutes)
Router(config-archive) #end
Router#

View archives

Router#show archive
There are currently 5 archive configurations saved.
The next archive file will be named slot0: /configs/Router1-5
Archive # Name
0
1 slot0: /configs/Router1-1
2 slot0: /configs/Router1-2
3 slot0: /configs/Router1-3
4 slot0: /configs/Router1-4 <- Most Recent
5
6
7
8
9
10
11
12
13
14
Router#

Change number of archive files stored

Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config) #archive
Router(config-archive) #maximum 10
Router(config-archive) #end
Router#

Show differences between current running config and an archived config

Router#show archive config differences slot0: /configs/Router1-1
Contextual Config Diffs:
+ip cef
-no ip cef
Router#

Rollback to previous configuration archive file

Router#archive config (store current running config)
Router#configure replace slot0: /configs/Router1-1
This will apply all necessary additions and deletions
to replace the current running configuration with the
contents of the specified configuration file, which is
assumed to be a complete configuration, not a partial
configuration. Enter Y if you are sure you want to proceed. ? [ no] : y
Total number of passes: 1
Rollback Done
Router#

Auto Tuning Buffers on Cisco Router

Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#buffers tune automatic
Router(config) #end
Router#

Router# show buffers tune
Tuning happened for the pool Small
Tuning happened at 22: 43: 19
Oldvalues
permanent: 50 minfree: 20 maxfree: 150
Newvalues
permanent: 62 minfree: 15 maxfree: 78
Tuning happened for the pool Middle
Tuning happened at 22: 43: 19
Oldvalues
permanent: 25 minfree: 10 maxfree: 150
Newvalues
permanent: 36 minfree: 9 maxfree: 45
Router#

Tuning Cisco Router Buffers

Tuning buffers is usually not necessary and doing so incorrectly can cause serious performance problems.

Use the show buffers command to tell if your buffers need adjusting.

Public Buffers:

Router>show buffers

Small buffers, 104 bytes (total 50, permanent 50) :
50 in free list (20 min, 150 max allowed)
265016 hits, 0 misses, 0 trims, 0 created
0 failures (0 no memory) <-- Look for failures

If you see failures you might need to alter your buffer parameters. Failures indicate the number of times the router has attempted to allocate a buffer and failed, causing it to drop the packet. The no memory counts the number of times a failure occurred because no memory was available which usually is resolved by adding more memory to the router.

Tune public buffer pools example:

Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config) #buffers big initial 100
Router(config) #buffers big max-free 200
Router(config) #buffers big min-free 50
Router(config) #buffers big permanent 50
Router(config) #end
Router#

Interface Buffers:

Router>show buffers

Ethernet0 buffers, 1524 bytes (total 32, permanent 32) :
8 in free list (0 min, 32 max allowed)
24 hits, 0 fallbacks
8 max cache size, 8 in cache
30963 hits in cache, 0 misses in cache
As long as misses and fallbacks low, no need to adjust interface buffers.

Tune interface buffer pools example:

Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config) #buffers Ethernet0 initial 200
Router(config) #buffers Ethernet0 max-free 300
Router(config) #buffers Ethernet0 min-free 50
Router(config) #buffers Ethernet0 permanent 50
Router(config) #end
Router#

Configure Layer 3 port-channel (EtherChannel) between Cisco Router and Switch

Router:

interface Port-channel1
ip address 10.4.4.2 255.255.255.252
!
interface GigabitEthernet0/0/0
no ip address
channel-group 1
no shutdown
!
interface GigabitEthernet0/0/1
no ip address
channel-group 1
no shutdown

Switch:

interface Port-channel1
no switchport
ip address 10.4.4.1 255.255.255.252
!
interface GigabitEthernet1/0/3
no switchport
no ip address
channel-group 1 mode on
no shutdown
!
interface GigabitEthernet2/0/3
no switchport
no ip address
channel-group 1 mode on
no shutdown

IPv6 Quick Facts

- Successor of IPv4
- 128-bit long addresses
- Customer usually gets a /64 subnet
- Not need for NAT anymore
- No Broadcasts
- No ARP
- Stateless Address Configuration without DHCP
- Improved Multicast
- Easy IP Renumbering
- Minimum MTU Size is 1280
- Mobile IPv6
- Mandatory IPsec support
- Extension Headers
- Jumbograms up to 4 GiB

The "Do" Command on a Cisco Router

The "do" Command allows you to run "show" commands while in config mode so that you don't have to exit back to privileged mode to chech your work when you are configuring a router.

Example:

router(config)#do show interface f0/1

router(config-if)#do show run

Set Cisco Stack Master Placement in Switch Stack

- Multiple Catalyst 2960-S or 3750-X switches configured in stack
- One switch in stack (Master Switch) controls operation of stack
- When 3 or more switches in stack configure switch that does not have uplinks as master switch

Set Stack Master Switch:
switch [switch number] priority 15

Ensure original master MAC address remains stack MAC address after failure:
stack-mac persistent timer 0

Enable Stateful Switchover (SSO) on Cisco Switch Supervisor Modules

Stateful Switchover (SSO) synchronizes process and configuration information between supervisor modules to enable a fast transparent failover.

Router(config)# redundancy
Router(config-red)# mode sso
Router(config-red)# end
Router# show redundancy states
my state = 13 -ACTIVE
peer state = 8 -STANDBY HOT
Mode = Duplex
Unit = Primary
Unit ID = 5

Redundancy Mode (Operational) = sso
Redundancy Mode (Configured) = sso
Split Mode = Disabled
Manual Swact = Enabled
Communications = Up

client count = 29
client_notification_TMR = 30000 milliseconds
keep_alive TMR = 9000 milliseconds
keep_alive count = 1
keep_alive threshold = 18
RF debug mask = 0x0
Router#

Virtual Trunk Protocol (VTP) Cisco Switch Configuration Best Practices

Virtual Trunk Protocol (VTP) allows you to configure a VLAN on one switch and have it propogate to all the other switches in the network. Cisco Best Practice is to not use VTP because of the potential issues it can cause and to put the switch in transparent mode.

Switch(config)#vtp mode transparent

Rapid Per-VLAN Spanning-Tree (PVST+) Cisco Switch Configuration

- Instance of RSTP per VLAN
- Improves detection of indirect failures over classic spanning tree (802.1D)
- Even if network doesn't have any layer 2 loops you still should enable spanning tree for protection against unexpected layer 2 loops

Switch(config)#spanning-tree mode rapid-pvst

Unidirectional Link Detection (UDLD) Cisco Switch Configuration

- Unidirectional links can cause problems such as spanning-tree loops, black holes, and non-deterministic forwarding
- Unidirectional Link Detection (UDLD) detects a Unidirectional link and disables the interface

Switch(config)#udld enable

Configuring Cisco EtherChannel Load Balancing Method

- Use soure and destination IP address when calculating which link to send traffic across

Switch(config)#port-channel load-balance src-dst-ip

Cisco Best Practice - Turn off http, telnet and enable https, ssh

ip domain-name cisco.local
ip ssh version 2
no ip http server
ip http secure-server
line vty 0 15
transport input ssh

Display top CPU processes on the router

I've almost started writing a Tcl procedure to display top-10 CPU-intensive processes on a router ... and then discovered the sorted option of the show processes cpu command. Even more, starting in IOS release 12.2T, the show processes cpu history command gives you a nice CPU utilization graph.
Sample printouts are included below:
router#show processes cpu sorted 1min
CPU utilization for five seconds: 1%/0%; one minute: 2%; five minutes: 2%
 PID Runtime(ms)   Invoked      uSecs   5Sec   1Min   5Min TTY Process
   5      180080      9762      18447  0.00%  1.75%  1.73%   0 Check heaps
  62         648       181       3580  0.00%  0.31%  0.12%   2 Virtual Exec
  25        4116       173      23791  0.49%  0.05%  0.00%   0 Per-minute Jobs
  30         848      1172        723  0.00%  0.01%  0.00%   0 IP Input
  81          12       357         33  0.08%  0.00%  0.00%   0 CEF Scanner
   6           8         2       4000  0.00%  0.00%  0.00%   0 Pool Manager
   4           0        86          0  0.00%  0.00%  0.00%   0 DHCPD Timer
   3           4        27        148  0.00%  0.00%  0.00%   0 CRYPTO IKMP IPC
   9           0         1          0  0.00%  0.00%  0.00%   0 AAA high-capacit
  10          52       238        218  0.00%  0.00%  0.00%   0 ARP Input
... rest deleted ...
router#show processes cpu history
                22222
    22          11111          11111
100
 90
 80
 70
 60
 50
 40
 30
 20             *****
 10             *****
   0....5....1....1....2....2....3....3....4....4....5....5....
             0    5    0    5    0    5    0    5    0    5
               CPU% per second (last 60 seconds)

    2121121112121112121 11111222222122 12211121119112121 12221
    1926405121716641818 76211100148411 70088401221831611470011
100
 90                                              *
 80                                              *
 70                                              *
 60                                              *
 50                                              *
 40                                              *
 30                               *              *
 20 **** **  ***** **** **   ****** ** ***** *   ** ***  ****
 10 ******************* **********#*** **********#****** *****
   0....5....1....1....2....2....3....3....4....4....5....5....
             0    5    0    5    0    5    0    5    0    5
               CPU% per minute (last 60 minutes)
              * = maximum CPU%   # = average CPU%
     1
    80
    60
100  *
 90 **
 80 **
 70 **
 60 **
 50 **
 40 **
 30 **
 20 **
 10 **
   0....5....1....1....2....2....3....3....4....4....5....5....
             0    5    0    5    0    5    0    5    0    5
                   CPU% per hour (last 72 hours)
                  * = maximum CPU%   # = average CPU%

Quick tip: Display Interface bandwidth

To display bandwidths of all interfaces configured on the router use show interface | include protocol|BW command.
Here is a sample printout:
Rtr#show interface | include protocol|BW
FastEthernet0/0 is administratively down, line protocol is down
  MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,
Serial1/0 is up, line protocol is up
  MTU 1500 bytes, BW 2000 Kbit, DLY 20000 usec,
Serial1/1 is up, line protocol is up
  MTU 1500 bytes, BW 2000 Kbit, DLY 20000 usec,
Serial1/2 is up, line protocol is up
  MTU 1500 bytes, BW 2000 Kbit, DLY 20000 usec,
Serial1/3 is administratively down, line protocol is down
  MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,
Loopback0 is up, line protocol is up
  MTU 1514 bytes, BW 8000000 Kbit, DLY 5000 usec,
You could define an alias to create a new IOS command generating this printout (for example, alias exec bw show interface | include protocol|BW). You could also write a simple Tcl script that would accept an interface name and display the bandwidth of that interface.

Configuring controller E1

This is my life saver command while my 1st project. I am not even aware of it. May be few aware of it, but not all. My best friend Ravi Kumar Ramachandran helped me lot while I am in on site. I cannot thank you enough for extending his support.

If you not doing following configuration you will not able to see E1 interface by default.

following are the final commands
Router(config)#controller E1 0/1/0
Router(config-controller)#framing no-crc4
Router(config-controller)#channel-group 0 timeslots 1-31
Router(config-controller)#

Router(config)#framing no-crc4
Router(config-controller)#sh
Router(config-controller)#no sh
Router(config-controller)#^Z
Router#
Router(config)#int se0/1/0:0
Router(config-if)#encapsulation frame-relay ietf
Router(config-if)#exit
Router(config)#int se0/1/0:0.1
Router(config-subif)#frame-relay interface-dlci ?
  <16-1007>  Define a switched or locally terminated DLCI

I hope this will help any of you. 

Autonegotiation Valid Configuration

There is a lot of confusion about auto negotiation. Here is a chart that will help bring things into perspective.
Autonegotiation Valid Configuration



Configuration NIC (Speed/Duplex)
Configuration Switch (Speed/Duplex)
Resulting NIC Speed/Duplex
Resulting Catalyst Speed/Duplex
Comments
AUTO
AUTO
1000 Mbps, Full-duplex
1000 Mbps, Full-duplex
Assuming maximum capability of Catalyst switch, and NIC is 1000
Mbps, full-duplex.
1000 Mbps, Full-duplex
AUTO
1000 Mbps, Full-duplex
1000 Mbps, Full-duplex
Link is established, but the switch does not see any
autonegotiation information from NIC. Since Catalyst switches support only
full-duplex operation with 1000 Mbps, they default to full-duplex, and this
happens only when operating at 1000 Mbps.
AUTO
1000 Mbps, Full-duplex
1000 Mbps, Full-duplex
1000 Mbps, Full-duplex
Assuming maximum capability of NIC is 1000 Mbps,
full-duplex.
1000 Mbps, Full-duplex
1000 Mbps, Full-duplex
1000 Mbps, Full-duplex
1000 Mbps, Full-duplex
Correct Manual Configuration
100 Mbps, Full-duplex
1000 Mbps, Full-duplex
No Link
No Link
Neither side establishes link, due to speed
mismatch
100 Mbps, Full-duplex
AUTO
100 Mbps, Full-duplex
100 Mbps, Half-duplex
Duplex Mismatch
1

AUTO
100 Mbps, Full-duplex
100 Mbps, Half-duplex
100 Mbps, Full-duplex
Duplex Mismatch
1

100 Mbps, Full-duplex
100 Mbps, Full-duplex
100 Mbps, Full-duplex
100 Mbps, Full-duplex
Correct Manual
Configuration2

100 Mbps, Half-duplex
AUTO
100 Mbps, Half-duplex
100 Mbps, Half-duplex
Link is established, but switch does not see any
autonegotiation information from NIC and defaults to half-duplex when operating
at 10/100 Mbps.
10 Mbps, Half-duplex
AUTO
10 Mbps, Half-duplex
10 Mbps, Half-duplex
Link is established, but switch does not see Fast Link Pulse
(FLP) and defaults to 10 Mbps half-duplex.
10 Mbps, Half-duplex
100 Mbps, Half-duplex
No Link
No Link
Neither side establishes link, due to speed
mismatch.
AUTO
100 Mbps, Half-duplex
100 Mbps, Half-duplex
100 Mbps, Half-duplex
Link is established, but NIC does not see any autonegotiation
information and defaults to 100 Mbps, half-duplex.
AUTO
10 Mbps, Half-duplex
10 Mbps, Half-duplex
10 Mbps, Half-duplex
Link is established, but NIC does not see FLP and defaults to
10 Mbps, half-duplex.

Hardware Troubleshooting for Cisco 12000 Series Internet Router Line Card Failures

Hardware Troubleshooting for Cisco 12000 Series Internet Router Line Card

Highlights:

  • show context summary = slot crashes
  • show logging
  • show logging summary
  • show diag <slot>
  • show context slot <slot>
  • show led
  • diag 7 verbose tftp tftp://x.x.x.x ( this test will run 5 - 20 min and the card will not be usable durung the test)
  • diag <slot> previous
http://www.cisco.com/en/US/products/hw/routers/ps167/products_tech_note09186a00800cdd58.shtml

troubleshooting high CPU utilization

For troubleshooting high CPU utilization in specific processes, refer
to the appropriate link:
  • ARP Input—ARP Input section of the document Troubleshooting High CPU
    Utilization Due to Processes
  • BGP Router—High CPU due to BGP Router Process section of the document
    Troubleshooting High CPU Caused by the BGP Scanner or BGP Router
    Process
  • BGP Scanner—High CPU due to BGP Scanner section of the document
    Troubleshooting High CPU Caused by the BGP Scanner or BGP Router
    Process
  • EXEC—High CPU
    Utilization in the EXEC and Virtual EXEC Processes
  • HyBridge Input—Troubleshooting High CPU Utilization Caused by the HyBridge Input
    Process on Routers With ATM Interfaces
  • IP Input—Troubleshooting High CPU Utilization Due to the IP Input
    Process
  • IP Simple Network Management Protocol (SNMP)—IP Simple Network Management Protocol
    (SNMP) Causes High CPU Utilization
  • LC ADJ Updater—What Causes High CPU Utilization in the LC Adjacency Updater
    Process on a Cisco 12000 Series Internet Router?
  • TCP Timer—TCP Timer section of the document Troubleshooting High CPU
    Utilization due to Processes
  • TTY Background—TTY Background section of the document Troubleshooting High
    CPU Utilization due to Processes
  • Virtual EXEC—High CPU Utilization in Exec and Virtual Exec
    Processes
  • Vtemplate Backgr—Virtual Template Background section of the document
    Troubleshooting High CPU Utilization due to Processes
  • Other processes—Other Processes section of the document Troubleshooting High
    CPU Utilization due to Processes
Source: http://www.cisco.com/en/US/products/hw/routers/ps133/products_tech_note09186a00800a70f2.shtml

Search This Blog

Blog Archive

Total Pageviews