War story: almost zero is not good enough
To make the long story short: every modem uses a predefined sequence that enables remote loopback. These sequences are standardized and have been chosen so that the chance of hitting them with real traffic is close to zero (but obviously not zero). The file that the users were trying to copy contained just the correct sequence to trigger the remote loopback in one of the modems and the link went down (most probably changed state to looped) as the routers started to receive their own packets. Disabling remote loopback on the modem (a jumper in those days) solved the problem.
The moral of the story: whenever you use pattern matching to identify something (be it a specific application that you're trying to identify or a virus in your workstation), there is a non-zero chance of false positives, usually in the most unusual places.
Let's conclude this post with what seems to me a ludicrous “invention”: someone patented the flashing of LEDs when performing loopback tests on a modem. If anyone can survive reading the whole patent application, understand it and recognize its true added value, please let me know … I got completely lost.
Turn your flash card into an ATA drive
mturoute: trace mode output
- Similar to Windows tracert, it tries to find the successive hops in the path by sending ICMP echo packets with increasing values of TTL field.
- For each router found in the path (= source IP address in the ICMP TTL exceeded message), mturoute tries to find path MTU to that hop using the same algorithm as in the ping mode.
- During the bisecting phase, the mturoute does not print all the messages it prints in the ping mode, but just the cryptic signs (+/-/u/.) indicating its progress. Their meaning is documented in the previous post.
- After the path MTU to the router under investigation is measured, mturoute reports the router's IP address and path MTU.
Contrary to Cisco IOS and most Unix systems that send UDP packets to high-numbered ports, tracert uses ICMP echo packets.
Display IP packet filters attached to router's interfaces
- Download it from my web site and copy it to your router's flash or NVRAM.
- Define an alias, for example alias exec filters tclsh flash:packetFilters.tcl.
The script recognizes two parameters: the all parameter displays all interfaces, including ones with no access lists and the verbose parameter displays the contents of the access list after the interface name.
IOS 12.4T features summarized on one page
mturoute: ping-mode output
mturoute works in two modes:
- Without the -t flag, it sends variable-lenght ICMP echo packets to the specified destination address, trying to figure out the largest packet that is successfully propagated to the destination.
- With the -t flag, it uses traceroute-like algorithm to find the hop-by-hop IP addresses (the source IP addresses of the ICMP TTL exceeded replies) and uses the same packet-size-calculating algorithm to measure the path MTU to each hop.
Today we'll focus on the non-trace mode. It tries to measure the path MTU with a bisection method varying the packet sizes between minimum MTU (92) and maximum MTU (specified with the -m parameter, default is 10000 bytes). The payload size of the first packet (without the -m flag) is thus 5046 bytes ((10000 + 92)/2).
On each iteration, the algorithm prints a “cryptic” sign indicating whether the ping with the current payload size succeeded. The following indications are given:
- '+': ICMP echo reply arrived
- '-': The ping failed (for various reasons, including exceeding the path MTU)
- 'u': ICMP destination unreachable response arrived, indicating blackhole or access-list.
ICMP unreachable is considered a successful response; at least we're measuring the path MTU up to the failure point
Show IP access lists attached to an interface
Log the NTP events
I almost started writing an EEM applet that would detect and log the changes in router’s system time caused by NTP synchronizations, but then I’ve decided to check the IOS documentation first and found the ntp logging command.
OSPF Router-Id Does Not Change When the Interface IP Address Changes
The venerable rules used to establish OSPF router ID on Cisco IOS are all over the Internet:
- Take the highest IP address of all loopback interfaces configured on the router when the OSPF process is started.
- If there is no loopback interface, take the highest IP address of an operating interface.
In the old days, when Cisco believed that the router ID had to match an interface address, this also implied that the router ID would have changed if the interface IP address changed (and we told the students that you have to use loopback interfaces to make your network stable, as the OSPF process would restart if the interface giving the router ID went down).
Update: mturoute
- Any C program compiled with the free Visual C++ compiler from Microsoft requires runtime library that has to be installed separately. Update: not completely true, if you use change the runtime library to the non-DLL version (Project properties/C++/Code generation tab), the exe size increases, but the external dependencies are removed.
- The Visual C++ 2008 that I've used has no publicly available runtime library that you could install.
- The new build can be downloaded from the same location.
- It includes a README file that documents the changes made to the source.
- To run it, you have to install the VC++ 2005 runtime library from Microsoft
There are also a few caveats when using this program on a Windows platform enabled for Path MTU discovery (default for the last few years):
- Whenever the Windows TCP stack receives an ICMP specifying the maximum MTU, it caches the reported MTU size (makes sense).
- The cached MTU sizes eventually expire (but I was not able to find any documentation on the expiration time).
- I was also not able to find any documented way of purging the path MTU cache. The command that works for me is the route -f which flushes the IP routing table.
- Obviously, after executing route -f, the DHCP-installed default route is gone, so you have to execute ipconfig /renew.
Note: Any hints on the internal workings of path MTU cache on Windows platforms are highly appreciated