Posts

Showing posts with the label cisco

Fixing high CPU use on Cisco 7600/6500

Recently some time ago (this blog post has also been lying in draft for a while) someone came to me with a problem they had with a Cisco 7600. It felt sluggish and "show proc cpu" showed that the weak CPU was very loaded. This is how I fixed it. "show proc cpu history" showed that the CPU use had been high for quite a while, and too far back to check against any config changes. The CPU use of the router was not being logged outside of what this command can show. "show proc cpu sorted" showed that almost all the CPU time was spent in interrupt mode. This is shown after the slash in the first row of the output. 15% in this example: Router# show proc cpu sorted CPU utilization for five seconds: 18%/15%; one minute: 31%; five minutes: 42% PID Runtime(ms) Invoked uSecs 5Sec 1Min 5Min TTY Process 198 124625752 909637916 137 0.87% 0.94% 0.94% 0 IP Input [...] ...

The rules of multicast

Image
The first rule of multicast is you don't talk about multicast Most networks don't do multicast routing, which means most network guys don't have much experience with it. Sure they know that it exists, and it's probably used on their layer 2, but they don't do multicast routing. These "rules" list some things that you should know when configuring or troubleshooting multicast. The second rules of multicast is you do not forward packets coming from a non-RPF interface If a multicast packet is received, and it's not the multicast RPF interface, it's dropped. The table can be viewed with "show ip mroute", and it will clearly show what interface is acceptable. Here's an example of group 239.0.0.1: R1#show ip mroute 239.0.0.1 [...] (*, 239.0.0.1), 00:00:08/stopped, RP 1.0.0.1, flags: S Incoming interface: Null, RPF nbr 0.0.0.0 Outgoing interface list: FastEthernet1/0, Forward/S...

Shaping and policing on Cisco

Image
This post is about policing and shaping on Cisco routers and switches. This is a very big topic so don't expect this post to cover everything. What I'm attempting to to is cover some things that I found aren't explained very well by books or the Internets, while still being readable for someone who hasn't read all the other stuff. With QoS stuff there are always small differences in practice between the hardware implementations but I won't go into that here. Buckets In both policers and shapers traffic that "conforms" is traffic that will be allowed through. It will be allowed to go out to the interface (or in to it, if configured for incoming traffic) if there are as many tokens in the Bc bucket as there are bytes in the packet. If there are enough tokens then those tokens are removed from the bucket and the packet is allowed through immediately. If there aren't enough tokens in the bucket then the packet is n...

Holy ip packet Batman!

Image
Never forget.

Spanning tree limits

I'm compiling a list of spanning tree and VLAN limits on different switches. This is what I've come up with so far. I don't have an authoritative source for these, but in many cases this is hard to get from specs. If you go over these limits, bad things will happen! (broadcast storms, VLANs disappearing, cats and dogs living together. That sort of thing) A "STP instance" is "a tree" in a spanning tree. So this only applies to PVST/PVST+ and similar. MST has a way lower limit (like 16), and you shouldn't need more than a couple. But you know that if you're using MST. So in most cases I would say this is the limit of the number of VLANs you can have since if you have 50+ VLANs then you're probably running some form of spanning tree. Switch Max STP instances Max number of VLANs Cisco 2900XL 64 64 Cisco 2950/2955 ...

What should have been default on Cisco devices

Some things on Cisco switches and routers never should have been on by default. Other things should have been turned on or set differently. This is not how I want them to be configured in the end (I like CDP for example), just how I think they should have been configured from the factory. (not all commands are supported on all switches/routers. Just ignore error messages from those settings) vtp mode transparent service timestamps debug datetime msec localtime show-timezone service timestamps log datetime msec localtime show-timezone service sequence-numbers service password-encryption snmp-server ifindex persist no service dhcp logging buffered 1048576 debugging spanning-tree portfast default spanning-tree extend system-id no ip domain-lookup no ip source-route no ip bootp server no ip finger no cdp run no ip http server no ip http secure-server no ip https server no https server vlan dot1q tag native int range fa0/1 - 24 switchport ...

Erlang BGP daemon

I'm writing a BGP daemon in Erlang . It can connect, parse update packets and announce routes. I started up an old Cisco 2620 router and sent route announcement to it until it cried: %SYS-2-MALLOCFAIL: Memory allocation of 65536 bytes failed from 0x8046F3C8, Pool: Processor Free: 79840 Cause: Memory fragmentation Alternate Pool: None Free: 0 Cause: No Alternate pool -Process= "BGP Router", ipl= 0, pid= 84 -Traceback= 804733A4 804754C8 8046F3CC 80851CDC 8081C7D8 80832848 80832F3C 8 %BGP-5-ADJCHANGE: neighbor 172.16.x.x Down No memory Muhahahaha! The program: git clone git://github.com/ThomasHabets/eggpd.git Update later that night I flooded the 2620 again for a few minutes and then disconnected the peer. It stopped responding. Well almost. It answers to ping (17 % packet loss), and my existing telnet session seems to be working somewhat, although there is a delay of about 10 minutes between ...