Showing posts with label Route Maps. Show all posts
Showing posts with label Route Maps. Show all posts

Friday, March 1, 2013

Designing Enterprise WAN Architectures with BGP and Path Control

March 2013 | Reading time: 8 minutes

Understanding the Role of BGP in Enterprise WANs

Border Gateway Protocol (BGP) has long been the cornerstone of internet routing, but in recent years it has gained popularity within enterprise WAN environments as organizations aim to enhance resilience, control, and performance. For large enterprises with multiple sites, leveraging BGP allows granular control of traffic paths, prioritization policies, and redundancy models that exceed the capabilities of simpler protocols like OSPF or static routing.

In a traditional enterprise, multiple MPLS circuits or hybrid MPLS-Internet designs require precise outbound and inbound route engineering. BGP's policy-based model is uniquely suited for this, enabling enterprises to influence route selection through attributes such as Local Preference, MED, and AS Path prepending.

Route Maps and Policy-Based Routing

When designing a WAN using BGP, control is paramount. Route maps become one of the most powerful tools available for matching prefixes, applying actions, and filtering routes based on custom logic. For example, an enterprise might define a route map that sets a higher Local Preference for traffic destined to critical SaaS providers, ensuring those flows prefer the MPLS path while general internet access uses broadband backup links.

Policy-Based Routing (PBR) adds another layer of decision-making by enabling forwarding decisions based on source/destination, application type, or even time-of-day. While BGP controls path advertisement and selection, PBR defines how specific traffic types are forwarded regardless of the routing table—ideal for exception-based scenarios like VoIP or backup replication traffic.

Key Design Considerations

  • Redundancy: Ensure dual-homing to multiple ISPs or MPLS providers, with health-checked failover mechanisms using BFD or IP SLA.
  • Prefix Aggregation: Use summarization to reduce the routing table size and improve convergence times.
  • Loop Prevention: In iBGP scenarios, implement full mesh or route reflectors to maintain consistency.
  • AS Path Manipulation: Use AS Path prepending to influence upstream route preferences during failover.
  • Routing Security: Filter inbound routes using prefix-lists and implement MD5 authentication for BGP peers.

Sample BGP Configuration Snippet

router bgp 65000
 bgp log-neighbor-changes
 neighbor 192.0.2.1 remote-as 65010
 neighbor 192.0.2.1 description MPLS-ISP
 neighbor 192.0.2.1 password secureBGP

 address-family ipv4
  network 10.10.0.0 mask 255.255.0.0
  neighbor 192.0.2.1 activate
  neighbor 192.0.2.1 route-map PREFER_MPLS out
 exit-address-family

route-map PREFER_MPLS permit 10
 match ip address prefix-list CRITICAL_ROUTES
 set local-preference 200

Conclusion

Designing enterprise WANs with BGP opens the door to powerful traffic control and failover capabilities. However, success lies in a balanced application of policy, redundancy, and best practices. BGP is not a plug-and-play protocol—without proper route filtering and visibility, route leaks or instability may arise. A carefully structured BGP design that includes route maps, prefix lists, and path manipulation techniques ensures predictable behavior and operational clarity.



Eduardo Wnorowski is a network infrastructure consultant and technologist.
With over 18 years of experience in IT and consulting, he brings deep expertise in networking, security, infrastructure, and transformation.
Connect on Linkedin

Friday, June 1, 2012

Understanding Route Maps in Cisco IOS: Policy Control in Action

June 2012   |   9 min read

In Cisco IOS, route maps serve as a highly flexible tool for defining conditional routing and policy enforcement. They are widely used in policy-based routing (PBR), redistribution, filtering, and advanced BGP/OSPF manipulations. This post dives into their syntax, structure, and best practices.

What is a Route Map?

A route map is essentially a conditional if-then construct for modifying or filtering routes. Each route map comprises multiple numbered entries called clauses. These are evaluated sequentially until a match occurs, making the order of entries critical.

Route Map Use Cases

  • Policy-Based Routing (PBR): Forwarding decisions based on source IP or packet attributes, not just destination.
  • Redistribution Control: Manipulating which routes are injected between protocols (e.g., OSPF to BGP).
  • Prefix Filtering: Allow or deny based on prefix-lists or access-lists.
  • Attribute Manipulation: Changing BGP metrics (MED, weight, local preference).

Route Map Syntax Overview

route-map <name> permit|deny <sequence>
  match ...
  set ...
  

Each clause contains match statements (criteria) and set statements (actions). If no match is made, the next clause is evaluated. If no clauses match, the route is denied by default.

Policy-Based Routing Example

access-list 101 permit ip 192.168.10.0 0.0.0.255 any

route-map PBR permit 10
  match ip address 101
  set ip next-hop 10.1.1.1

interface FastEthernet0/0
  ip policy route-map PBR
  

This configuration routes traffic from 192.168.10.0/24 to next-hop 10.1.1.1 regardless of the routing table.

Controlling Redistribution

Let’s look at filtering route redistribution into OSPF:

route-map REDIST deny 10
  match ip address 10

route-map REDIST permit 20

router ospf 1
  redistribute eigrp 100 route-map REDIST
  

This example denies redistribution of certain prefixes while allowing all others.

Match and Set Commands

Some of the most common match commands:

  • match ip address
  • match interface
  • match metric
  • match route-type

Useful set commands include:

  • set ip next-hop
  • set metric
  • set local-preference
  • set weight

Best Practices

  • Use sequence numbers in increments (e.g., 10, 20, 30) for flexibility.
  • Test route-map logic with show route-map and debug ip policy.
  • Document the logic inside config with comments.
  • Combine with prefix-lists for efficient and readable filtering.

Verifying Route Maps

Verification tools:

  • show route-map
  • show ip policy
  • show ip bgp or ospf database
  • debug ip policy (use with care)

Conclusion

Route maps are foundational tools in Cisco IOS. Whether directing traffic with PBR or shaping protocol behavior, mastering route-map logic will elevate your capabilities in enterprise network design and troubleshooting.



Eduardo Wnorowski is a network infrastructure consultant and technologist.
With over 17 years of experience in IT and consulting, he brings deep expertise in networking, security, infrastructure, and transformation.
Connect on Linkedin

Network Reliability Engineering: Turning Modern Network Operations into a Discipline Network Reliability Engineering: Turning ...