RE: Comparing two IP routing table

From: Ryan West <rwest_at_zyedge.com>
Date: Mon, 10 May 2010 14:04:50 +0000

Tyson,

>
> On Sun, May 9, 2010 at 5:27 PM, Tyson Scott <tscott_at_ipexpert.com> wrote:
>
> > Build two files
> > cat a.txt | sort > aa.txt
> > cat b.txt | sort > bb.txt
> > diff aa.txt bb.txt
> >
> > This is basic Unix.
> >
> > You could probably generate a shell script but the above should do.

Not to nitpick, but are there examples when the routing table is not already sorted? If you've already got the files on a *nix box, I might try:

diff -y --supp tableA tableB | grep \|
C 10.0.2.0/24 is directly connected, Vlan2 | C 10.0.2.0/24 is directly connected, Vlan20
C 10.0.3.0/24 is directly connected, Vlan3 | C 10.0.3.0/24 is directly connected, Vlan30

This should show only changes for the same networks and help you track down dups.

-ryan

Blogs and organic groups at http://www.ccie.net
Received on Mon May 10 2010 - 14:04:50 ART

This archive was generated by hypermail 2.2.0 : Tue Jun 01 2010 - 07:09:52 ART