I do like Cisco routers for what they do with IOS. Main stream features typically work as they are meant to. The challenge is when tough troubleshooting issues arise, especially those requiring packet capture and analysis, then things are so simple. Typically auxiliary gear is required.
Recently, I have been working with Vyatta devices. They aren't quite so reliable for for some mainstream functions. A couple of examples: a) when deleting one tunnel interface, all tunnel interfaces were deleted; b) when changing the description on a bonding group, the bonding group died and required a router reboot. Vyatta gear needs almost continual upgrades to cover issues that one doesn't see in stable Cisco gear.
However, I will give kudos to Vyatta for some flexibility. They have taken a linux distribution, and hidden all the linux routing and switching mechanics behind a Juniper-like CLI. Then whenever something funky is needed, you can drop into regular bash functions.
One of those regular functions is that Python is part of the distribution. So things like tcpdump and iperf are easy to run from inside the network.
With Python, you can then load the scapy.py library and do some funky packet crafting to test links and rules and such.
My current issues is that on a WAN link, things like VRRP are suffering packet amplification. Regular UDP and TCP are not suffering the issue. So now I have to test various protocol flavours to determine what sort of packets are affected, and test various interfaces to see where the amplification is happening.
With a Vyatta 1600, which has a number of gige ethernet interfaces, multiple test points can be connected and tested.
This is Scapy's main site. It contains version 2.1.1 of the library along with some starting documentation.
A version 2.2 library can be found at Python's Package Site.
And since I have a very specific issue with VRRP, jochen provided just the example I needed for packet construction:
Here is an example, how you can become the VRRP master router for VRRP group 1: >>> p = Ether(src="00:00:5e:00:01:01", dst="01:00:5e:00:00:12")/IP(src="172.16.1.1", dst="224.0.0.18", ttl=255)/VRRP(priority=254, addrlist=["172.16.1.254"]) >>> sendp(p, inter=2, loop=1) You have to define an Ethernet layer, because VRRP packets are sent from a specific mac address. The mac address for VRRP is 00:00:5e:00:01:XX. The XX should be replaced with the VRRP group number (fe if the VRRP group is 254 for example). The priority field is a byte field, where the highest possible value is 2^8 - 1 = 255.
One small refinement, a named interface can be used in the sendp command:
sendp(p, iface="eth2.10", loop=1)
Documentation for other VRRP plus other stuff in v2.2.0 of Scapy is found at Fossies Dox.
- Useful commands:
- lsc() -- list the commands available
- ls() -- list protocols available