Title: Introduction to routing policy
1Introduction to routing policy
- ECE697A Advanced Computer Networking
- Lei Liang
- October 2002
2Outline
- Introduction to routing policy
- Implementation of routing policy
- Redundancy
- Symmetry
- Load balancing
- Multihoming
3Introduction to routing policy
- What is routing policy?
- What is routing policy source and purpose
- Why we define routing policy?
- Example
- Elements of a routing policy
4What is routing policy?
- Public description of the relationship between
external BGP peers, and how network prefixes are
exchanged between that AS and other ASes. - Can also describe internal BGP peer relationship
- Allows you to control the routing information
between the routing protocols and the routing
tables
5Routing policy source and purpose
- Source Routing information is generated by
internal networking peers. - Purpose To control the size and content of the
routing tables, which routes are advertised, and
which routes are considered the best to reach
various destinations. - Control points
- Import
- export
6Why define a routing policy?
- Documentation
- Allows automatic generation of router
configurations - Scalability easy to scale large number of peers
or transit customers - Troubleshooting identify where routes are
entering the network - What routes are preferred when multiple routes
exist
7Routing policy example
- AS1 originates prefix d
- AS1 exports d to AS2
- AS2 imports
- AS2 exports d to AS3
- AS3 imports
- AS3 exports d to AS5
- AS5 imports
8Routing policy example (Cont.)
- AS5 also imports d from AS4
- Which route does it prefer?
9Elements of routing policy
- Written documentation policy document
- Handle different types of routes, differently
- Customer Inbound
- Customer Outbound
- Transit/Peer Inbound
- Transit/Peer Outbound
10Customer Routes, Inbound
- Accept by prefix or by AS
- Maximum prefix size (/24)
- Customer Routes-Highest local preference
- MEDs are usually listened to (to compare update
metric, the lower metric will be selected to make
a decision inside the AS) - MED a hint to external neighbors about the
preferred path into an AS. - Use a route-map or policy-statement to set
appropriate communities on INGRESS.
11Customer Routes, Outbound
- Full routes, partial routes, default route only
- Full routes can be sent with or without summary
aggregates-providers do not aggregate towards
customer - Some providers allow you to choose amount of
aggregation. - Customer can do their own filtering, when ISP
providing customer with rich communities
12Peer and Transit Provider Routes Inbound
- Not usually filtered-sometimes filtered on prefix
length - For peers, some set limits on number of prefixes
- MEDs are not usually listened to
- Local Preference Hierarchy
- customer, private peering, public peering,
transit, AS-Path length - Use a route map or policy statement to set
appropriate communities on INGRESS
13Peer and Transit Provider Routes Outbound
- Usually filtered on the /24 boundary
- MEDs are usually sent but are rarely listened to
- Aggregates are normally announced for your own
blocks - For peers, usually only customer and internal
routes are announced
14Complexity of routing policy
- Problems?
- Policy can easily get very complex and result in
even more complex router configuration
15Issues to be considered in implementing router
policy
- Redundancy
- Providing multiple alternative paths for the
traffic - Usually having multiple connections to one or
more ASes - Symmetry
- Traffic that leaves the AS from an exit point
return through the same point - Load balancing
- The capability to divide traffic optimally over
multiple link - Must consider trade-offs in implementing routing
policies
16Redundancy
- Redundancy aims to warranty uninterrupted
connectivity. - Connectivity problems occur at the router, power,
cabling, physical access line. - Human errors, software errors, physical error, or
bad weather can affect connectivity. - Advantage
- Improve connectivity/reliability
- Disadvantage
- May reduce symmetry
- Make the traffic more unpredictable
17Redundancy and routing information
- Because redundancy refers to the existence of
alternative routes, additional routing
information needs to be kept in routing tables. - One way to reduce routing overhead is to
designate default routes. - Default routing provides backup routes in case
primary connection fails.
18Set default routes
- Default routes Traffic to destinations that is
unknown to the router is sent to the default
outlet. - Default route represented by network mask
combination 0.0.0.0/0.0.0.0 (0/0) - Dynamically learned defaults
- Statically set defaults
19Dynamically learned defaults
- The route can be exchanged as a dynamic
advertisement between routers. - Dynamic defaults can be learned via BGP or IGP
- Destination is down, the route disappear
- For redundancy purpose, we should receive
defaults from multiple sources. - Give a degree of local preference over which
default is primary and which is backup.
20Statically set defaults
- Filter dynamically learned defaults to avoid
undesirable situation. (traffic ends up) - Provide more control over routing behaviors
- The 0/0 static route can point to a network
number, a gateway address, or a physical
interface as the default path.
21Symmetry
- Symmetry means having traffic that leaves the AS
from a certain exit point returns through the
same point. - Easy to achieve if there is only a single exit
- Traffic tends to be asymmetric due to redundancy
and multiple connections - Lack of symmetry means lack of control over how
traffic flows into and out of ASes
22More about symmetry?
- Customers and providers like to see traffic come
back close to or at the same point it left the AS
to minimize potential delays - On the other hand, traffic may go as far as
possible on the network to avoid latency or
congestion on the peer network - Asymmetry is unavoidable
- asymmetric traffic is often acceptable, depending
on the applications - usually asymmetric traffic is not a significant
problem
23To accommodate symmetry
- One should designate a primary link and make the
utmost effort to direct the majority of traffic
to flow on this link - Redundancy and symmetry are in conflict with each
other
24Load balancing
- Load balancing is the capability to distribute
traffic optimally over multiple links - not to distribute traffic equally over
connections - Load balancing tries to achieve a traffic
distribution pattern that optimally utilizes the
multiple links that provide redundancy
25What affects load balancing?
- Two types of traffic, incoming and outgoing
- Incoming traffic is affected by how the AS
advertises its networks to the outside world - Outgoing traffic is affected by the routing
updates coming in from outside ASes.
26Incoming and Outgoing traffic
- We can affect inbound traffic by applying
attributes to outbound routing announcement
because that is how our routes are learned by
others. - We can affect outbound traffic by applying
attributes to inbound routing announcements
because how our network learns routes affects
outbound traffic.
27Designing redundancy, symmetry and load balancing
- Responsibility of the operator to choose and
configure the correct attributes and filtering to
achieve the desired outcome
28Scenarios
- Depending on how many links external to the local
network - Single homing
- Multihoming
29Example 1 dynamically learned defaults
- RTA originates a default route 0.0.0.0/0 toward
RTC only. IBGP neighbors such as RTF, will not
get the default.
30Example 1 (cont)
- Router bgp 3
- no synchronization
- network 172.16.1.0 mask 255.255.255.0
- neighbor 172.16.20.1 remote-as 1
- neighbor 172.16.20.1 default-originate
- no auto-summary
- The default-originate option of the neighbor
router subcommand will cause 0/0 to be sent
toward RTC.
31Example 2 statically set defaults
- Instead of dynamically learning the 0/0 default,
a router can set its own default statically. RTC
set default to point toward network 192.78.0.0/16
32Example 2 (cont)
- Router bgp 1
- network 192.68.11.0
- neighbor 172.16.20.2 remote-as 3
- neighbor 192.68.6.1 remote-as 2
- no auto-summary
- ip route 0.0.0.0 0.0.0.0 192.78.0.0
- Route with shorter distance are preferred over
routes with a longer distance
33Single-homing
- Customer connects to the Internet via a single
connection to an ISP - Customer usually can be served by pointing
defaults towards the provider - Provider can install static routing to reach the
customer
34Single-homing
- Advantage
- Least expensive and more effective
- Reduce memory usage and processing overhead
- Static default configuration
- Disadvantage
- Poor reliability
35Multihoming
- Multihoming Definition
- More than one link external to the local network
- Multihoming Scenarios
- Multihoming to a single provider
- Multihoming to different providers
- Customers of the same provider with a backup link
- Customers of different providers with a backup
link
36Multihoming to a single provider
- Definition Two or more links to the same ISP
- Case
- Default only, one primary, and one backup
37Example Default only, one primary, and one
backup (single provider)
- AS1 provider
- AS3 customer multihomed to AS1.
- RTA running default toward AS1
38The policies apply to this scenario
- Outbound traffic from AS3 always go on the NY
link unless it fails. - Configuring two static routes in RTA pointing the
defaults toward the two links. - Inbound traffic to AS3 always go on the NY link
unless it fails - sending difference metrics toward AS1 on both
links with a lower metric on the NY link. - Prevent any BGP updates from coming into AS3
- configuring a route map or prefix list
39RTA configuration
- router bgp 3
- network 172.16.220. 0 mask 255.255.255.0
- neighbor 172.16.20.1 remote-as 1
- neighbor 172.16.20.1 route-map BLOCK in
- neighbor 172.16.20.1 route-map SETMETRIC1
out (RTC) - neighbor 192.68.9.2 remote-as 1
- neighbor 172.68.9.2 route-map BLOCK in
- neighbor 172.68.9.2 route-map SETMETRIC2 out
(RTD) - no auto-summary
- ip route 0.0.0.0 0.0.0.0 172.16.20.1 50 (RTC SF
backup) - ip route 0.0.0.0 0.0.0.0 192.68.9.2.40 (RTD NY
primary) - route-map SETMETRIC permit 10 (RTC)
- set metric 100
- route-map SETMETRIC permit 10 (RTD)
- set metric 50
40Multihoming to different ISP providers
- Definition Two or more links to different ISP
- Case
- Default, primary, and backup, plus full and
partial routing
41Example Default, primary and backup,
full/partial (Multiple providers)
- AS3 multihomed to AS1, AS2
42The policies apply to this scenario (Multiple
providers)
- AS3 accept AS1 partial routes only via the SF
link. All other internet routes accepted via the
NY link. - AS3 accept a default route from AS1 in case NY
link failure. - AS3 cannot be a transit network from AS1 and AS2.
43RTF configuration (Multiple providers)
- router bgp 3
- no synchronization
- network 172.16.1.0 mask 255.255.255.0
- network 172.16.220.0 mask 255.255.255.0
- neighbor 172.16.1.1 remote-as 3
- neighbor 172.16.1.1 next-hop-self
- neighbor 192.68.5.2 remote-as 2
- neighbor 192.68.5.2 route-map PREPEND_PATH out
(to RTD) - no auto-summary
- ip as-path access-list 2 permit
- Access-list 1 permit 172.16.220.0 0.0.0.255
- route-map PREPEND-PATH permit 10
- match ip address 1
- set as-path prepend 3 (3 is specified AS
number) - route-map PREPEND-PATH permit 20 (advertised)
- match as-path 2
44Customers of the same provdier with a backup link
- The private link can be used as a backup link
when an Internet link fails
45Example private link used as backup (customers
of the same provider)
46The policies apply to this scenario (customers of
the same provider)
- AS3 offers services to AS1 and AS2.
- AS1 and AS2 have private link as backup
- Assume AS1 and AS2 getting full internet routes,
AS1 and AS2 advertise each others routes to AS3. - AS3 can reach AS1network via AS2 and AS2s
network via AS1. - Handled by the BGP default behavior
- Using BGP policies, by manipulating the
LOCAL_PREF
47RTC configuration (customers of the same provider)
- router bgp 1
- network 192.68.11.0
- neighbor 172.16.20.2 remote-as 3
- neighbor 172.16.20.2 route-map PREF_FROM_AS3 in
- neighbor 192.68.6.1 remote-as 2
- neighbor 172.16.20.1 route-map PREF_FROM_AS2 in
- no auto-summary
- ip as-path access-list 1 permit _2_
- route-map PREF_FROM_AS3 permit 10
- match as-path 1
- set local-preference 100 (default from AS2 and
AS3) - route-map PREF_FROM_AS3 permit 20
- set local-preference 300 (all other updates)
- route-map PREF_FROM_AS2 permit 10
- set local-preference 200 (from AS2)
48Customers of different providers with a backup
link
- The community approach
- Dealing with adding and removing customers with
dynamically set the customers policies - The AS path manipulation approach
- An alternative to the community approach
49Example The community approach (Customers of
different providers)
50The policies apply to this scenario (Customers of
different providers)
- AS1 and AS2 are getting their service from
provider AS4 and AS3 respectively, unless a link
to a provider fails - AS1 and AS2 have a private link, if it goes down,
the customer should be able to talk to one
another via the provider
51RTC configuration (Customers of different
providers)
- router bgp 1
- network 192.68.11.0 mask 255.255.255.0
- neighbor 172.16.20.2 remote-as 1
- neighbor 172.16.20.2 send-community
- neighbor 172.16.20.2 route-map setcommunity out
- neighbor 172.16.20.2 filter-list 10 out
- neighbor 192.68.6.1 remote-as 2
- no auto-summary
- ip as-path access-list 2 permit _2_
52RTC configuration (Customers of different
providers)
- ip as-path access-list 10 permit
- ip as-path access-list 10 permit 2
- (prevent AS4 learning AS1)
- route-map setcommunity permit 10
- match as-path 2
- setcommunity 440
- (via AS2 match_2_, set community 40)
- Route-map setcommunity permit 20
- (do not have community set)
53Conclusion
- Routing policy acts as a traffic scheduler
- Routing policy decides one route from a set of
routable path - It aims to optimize the network performance
54The end