One of the frustrations of running a corporate network is what I call the ninety percent syndrome. It seems that once I get a project about ninety percent done I get pulled off the project to start working on something else. By the time it is ninety percent typically it is fully working it just isn’t tweaked, compared to best practices and fully documented. This is one such story and how just because it works doesn’t mean it is working the way it should be.
When I started working for my current company we were running EIGRP over our Frame Relay WAN network. A year later we moved to a MPLS network. This introduced BGP where before we had simply run EIGRP. At the time I was working several other major projects and I had never really even looked at the EIGRP deployment as I was more than busy with various projects and “it just worked”. Our service provider gave us some snippets and again “it just worked”. We were having some fairly serious fragmentation and QoS issues with the MPLS network and by the time I was able to get those resolved I was way behind schedule and I found myself pulled off the project. Our routing protocol implementation ended up on my list of follow-up items and it sat there for the next three years.
Flash forward to this week. We recently added a new engineer who has been doing really good. This with the combination of finally finishing my existing network re-design projects left me at a point I could finally sit down with our lab equipment and start playing.
The first thing I wanted to accomplish was to black hole RFC 1918 networks that were not present on our network. Over the last year we started seeing an increasingly amount of random RFC 1918 network traffic hitting our firewalls. Basically our laptop community is finally getting more network attached devices at their homes, installing the devices on the work laptops and lucky us we get see the constant attempts to talk to these devices while their laptop is on our network. I figured this was easy enough and I would be able to implement this with very little work. My plan was to simply add the following lines to each of our edge routers to kill off the traffic as close to the source as possible.
ip route 10.0.0.0 255.0.0.0 null0
ip route 172.16.0.0 255.240.0.0 null0
ip route 192.168.0.0 255.255.0.0 null0
These are very generic and as long as a more specific route is found it will use that. To make sure more specific routes were present I ran a quick show ip route on one of our edge routers and what I found made me sigh. Our EIGRP deployment used a network 10.0.0.0 statement which picked up all the locally connected networks on each router. The thing is that the BGP snippet wasn’t using any network statement, instead it was using a redistribute eigrp command. What resulted was every network from every router on our network was sharing every connected route. Long story short our network which consists of 19 locations (total of about 40 buildings) generating a BGP table with over 370 entries.
While this number isn’t outrageous and easily handled I was fairly embarrassed. I had completly redesigned the ip numbering system to base the entire system off subnets to easily be able to separate locations into subnet boundaries and I had forgotten to even look at routing and leveraging these improvements in our routing table. The ninety percent syndrome strikes again!
The first thing I wanted to do was to consolidate the BGP entires. There is no need to distribute every network on a router when all the routes are within a single subnet boundary such as 10.25.0.0/16. As you know unlike EIGRP BGP must find the exact network specified in the routing table before it will distribute it. To accomplish this I setup a static route such as:
ip route 10.25.0.0 255.255.0.0 null0
With this statement in the router I was able to use a network 10.25.0.0 mask 255.255.0.0 statement in my BGP section. This resulted in consolidating on average 20 networks in the BGP table into a single BGP entry. The beauty is that again the most specific route always wins. Even though I am null routing the entire range all of these networks have a more specific route on the router so by the time the packet receives the specified router the null0 route never gets matched for valid networks at the location.
Using this method I should be able to shrink our BGP table from over 370 entries to less than 80 entries. I am a very big proponent of the simplicity is golden principal. Our networks are getting more and more complex technologies everyday so whenever possible keep things as simple as possible.