Sei sulla pagina 1di 14

Inter-domain Routing Basics

► Exterior routing protocols created to:


™ controlthe expansion of routing tables
Border Gateway Protocol ™ provide a structured view of the Internet by
segregating routing domains into separate
administrations called “Autonomous systems”
(AS)
™ each AS can have an independent routing
policy

Inter-domain Routing Basics Inter-domain Routing Basics


► Autonomous system (AS):
™ set of routers have a single routing policy running
under a single administration
™ could be a collection of IGPs working together to
provide interior routing
► Outside world AS looks like a single entity –
identified by a AS#
► Routing information between ASs exchanged by
the Border Gateway Protocol (BGP)

1
Inter-domain Routing Basics Inter-domain Routing Basics
Stub AS: Multihomed Nontransit AS
► AS is multihomed if it has more than one exit
► An AS is considered “stub” when it reaches
point to outside
networks outside it domain via a single exit point
► AS can be multihomed to a single or multiple
► Stub AS is single-homed with respect to its providers
provider ► Nontransit AS does not allow transit traffic to go

► Stub AS uses from the “private pool” 65412-


through it
► Transit traffic has source and destination outside
65535
the AS
► Stub AS need not learn any AS-level routes – ► A nontransit AS would only advertise its own
just use a default route to provider AS routes and not routes it learned from others

Inter-domain Routing Basics Inter-domain Routing Basics


► Other ASs can force traffic through a nontransit Multihomed Transit AS
multihomed AS – AS must filter traffic to prevent ► Allows transit traffic to pass through
this
► BGP can be used as a “pipe” to exchange
BGP updates within an AS – Internal BGP
(IBGP)
► BGP connections between ASs called
External BGP (EBGP)
► Routers running EBGP called border
routers and IBGP called transit routers

2
Inter-domain Routing Basics Inter-domain Routing Basics
► BGP is a path vector protocol used to carry
routing information between ASs
► Path refers to a sequence of AS#s – indicating
the path traversed
► Two BGP routers forming a transport level
connection to exchange information is called
peers

Inter-domain Routing Basics Inter-domain Routing Basics


► Initially, all candidate routes are exchanged ► Marker field (16-bytes) used to
► Incremental updates (deltas) are sent as authenticate the incoming BGP message
network information changes
► BGP message length can be in [19-4096]
► BGP message header is given below bytes
► BGP message types:
™ OPEN:
™ UPDATE
™ NOTIFICATION
™ KEEPALIVE

3
Inter-domain Routing Basics Inter-domain Routing Basics
► OPEN message: ► NOTIFICATION message:
™ opens a connection between BGP peers – ™ when an error is detected after a BGP
should be completed for successful BGP connection is established, a BGP peer sends
operation a NOTIFICATION message before closing the
™ exchanges the following information – AS# (2 peer connection
byte field), hold time (maximum amount of ™ administrators need to examine the
time in seconds that can elapse between NOTIFICATION message to determine the
successive KEEPALIVE or UPDATE cause of the error
message), BGP identifier, optional
parameters, optional parameter length

Inter-domain Routing Basics Inter-domain Routing Basics


► KEEPALIVE message: ► UPDATE message:
™ these messages are exchanged between ™ update messages use the following:
peers to determine reachability • network layer reachability information (NLRI)
™ keepalive messages are sent at a rate that • path attributes
ensures that the hold time will not expire • unreachable routes
™ NLRIis given using IP prefixes to be
compatible with CIDR

4
Inter-domain Routing Basics Inter-domain Routing Basics
► BGP path attributes are used to keep track
of route specific information:
™ degree of preference
™ next hop value of a route
™ aggregation information

NLRI – network layer reachability information

Building Peer Sessions Building Peer Sessions


► When neighbor sessions are established during ► Normally external BGP routers are restricted to
OPEN be connected by the same network segment
™ peer routers use AS#s to determine whether they are
in the same AS or not
™ IBGP or EBGP is used based on this information

5
Building Peer Sessions Building Peer Sessions
► Synchronization within an AS ► Injecting BGP routes into AS is costly:
™ BGP must be synchronized with IGP such that ™ distributing routes from BGP into IGP results
it waits until the IGP has propagated routing in major overhead on internal routers
information across AS before advertising ™ carrying all external routes into an AS is
transit routes to other ASs unnecessary
™ if advertised before, the AS may receive traffic ™ internal non-BGP routers can use default exit
that cannot be routed! BGP (border or transit) routers to leave AS –
™ when a router receives updates from an IBGP this may be suboptimal
peer it should verify the reachability using IGP
before advertising to other EBGP peers

Sources of Routing Updates Sources of Routing Updates


► Injecting information statically into BGP: ► Injecting information dynamically into
™ proves to be most effective in ensuring route stability
™ IGP routes (or aggregates) that need to be advertised
BGP:
are manually defined as static routes ™ can be divided into purely dynamic – where all
™ static routes have the disadvantage that the routes
may not accurately reflect the current state IGP routes are redistributed into BGP
™ not much of a problem for “single point” updates ™ semidynamic – where only certain IGP routes
™ for “multiple point” updates, black holes can be are injected into BGP
created – destination actually reachable but routes
are incorrect ™ semidynamic allows the administrators to
choose which routes should be advertised
™ distributing the whole of IGP routes into BGP
can cause information leakage

6
Sources of Routing Updates BGP Routing Process
► Dynamic approach can lead to unstable ► Routing process involves the following:
routes ™ pool of routes that the router receives from its
™ routedampening is used to reduce the peer
fluctuations ™ input policy engine that filter routes or
manipulate their attributes
™ decision process that decides which routes
the router itself will use
™ output policy engine the can filter routes or
manipulate their attributes
™ pool of routes that are advertised to other
peers

BGP Routing Process BGP Routing Process


► Input policy engine:
™ filteringis done on different parameters such
as IP prefixes, AS_path information, and
attribute information
™ input policy engine also manipulates the path
attributes to influence its own decision – filter
certain network numbers, give certain route a
better local preference, etc

7
BGP Routing Process
NEXT_HOP Attribute:
► For EBGP next hop is the IP address of
the neighbor announcing the route
► For IBGP sessions, for routes originated
inside the AS, the next hop is the IP
address of the neighbor that announced
the route
► Routes injected in AS via EBGP, next hop
is carried unaltered

BGP Routing Process BGP Routing Process


► AS_path attribute is a mandatory attribute
™ sequence of AS#s a route has traversed to reach a
destination
™ AS originating the route adds its own AS number
when sending the route to its external BGP peers
™ Each AS that transmits the sequence prepends its
own AS# to the sequence – originating AS will be at
the “end” of the sequence
► BGP uses AS_path as part of the routing
updates

8
BGP Routing Process BGP Routing Process
► If route is advertised to the AS that originated it (loop), ► Private ASs:
the AS_path attribute will contain the AS#, the AS will ™ to conserve AS numbers, InterNIC, generally does
reject the route not assign a legal AS# to customers whose policies
are extensions of providers

BGP Routing Process BGP Routing Process


► Route aggregation involves summarizing
ranges of routes into one or more CIDR
blocks
™ drawback is the loss of granularity that existed
in the specific routes that form the aggregate
™ if AS_path information that existed in multiple
routes are lost, routing loops can be created

9
BGP Routing Process BGP Routing Process
► AS_path can be manipulated to affect
interdomain routing behavior – BGP
prefers shorter path over larger ones
™ includedummy AS#s to increase path lengths
and influence the traffic

BGP Routing Process Path Vectors


► Route aggregation:
™ BGP-4 supports “supernetting” to fully exploit
CIDR
™ Instead of representing addresses as 32-bit
numbers 9.0.0.0, 128.96.0.0, or 192.4.18.0
™ a prefix notation is used: 9/8 (8-bit prefix),
128.96/16 (16-bit prefix), or 192.4.18/24 (24-
bit prefix)
™ to reduce the size of the routing tables -- route
aggregation is performed

10
Path Vectors Path Vectors
► AS T manages two class C networks ► With route aggregation
™ 197.8.0/24 and 197.8.1/24 -- this can be ™ Path 1: reaches 197.8.0/22
represented by a 23-bit prefix 197.8.0/23 ► What is the path?
™ if there are two more ASs X and Y that use T
™ we cannot just list T, loop detection need the
as transit AS and they are allocated complete path
197.8.3/24 and 197.8.4/24 respectively
™ listing a complete path like T, X, Y is
► Withoutroute aggregation, AS T misleading -- implies a three hop path
announces 3 routes to its neighbor Z ► AS path attribute into two components:
™ Path 1: through T, reaches 197.8.0/23
™ ordered list -- AS sequence
™ Path 2: through T, X, reaches 197.8.2/24
™ unordered set -- AS set
™ Path 3: through T, Y, reaches 197.8.3/24
™ Path: (Sequence (T), Set (X, Y))

Path Vectors Path Vectors


► IfZ wants to forward this path to one of its ► “Path vectors” is an important concept of
neighbors, it will place its own AS # in the the BGP
front
™ Path: (Sequence (Z, T), Set (X, Y)) ► It provides for loop-free routing in complex

► Sequence and set components are used topologies


for loop detection
► Rule for path aggregation:
™ sequence components should be the
intersection of all sequences
™ set of components contain all the ASs
mentioned in any of the paths to aggregate
yet are not present in the aggregated
sequence

11
Path Vectors Path Vectors
► Can we use link state ideas? ► In distance vector protocol, all information about
™ by distributing to all external routers a complete map
the route to a destination is concentrated in the
“metric” value -- insufficient for fast loop
of the Internet (aggregated of course) resolution
™ let the routers compute the shortest paths
► BGP approach:
™ Inter Domain Policy Routing (IDPR) is based on this ™ routing update carries a full list of ASs traversed
idea between source and dest -- a loop occurs if an AS is
listed twice in this list
™ a problem with this approach is updating the
™ loop prevention: external router checks whether it is
distributed maps already listed on a path -- if so refuses to use it
™ OSPF recommends 200 routers for an OSPF area ™ listing the complete path (list of AS numbers) causes
and there are definitely more than 200 ASs the size of routing messages and memory needed for
running the protocol to increase

Internal and External Peers Internal and External Peers


► An external (border) router that learned ► The AS path announced by D to C should
about a path towards a network should include X and Z
update the local AS routing table ► The information available to D through IGP is
that routes are available to X’s networks
™ this may not be enough to propagate useful BGP
update message to C
► BGP establishes an “internal” BGP connection
will all the external routers in a AS -- connecting
the external routers in a fully connected graph
independent of the IGP

12
Internal and External Peers Border Gateway Protocol
► Maintaining a fully connected graph is a ► BGP runs over the TCP -- delegating error
very heavy requirement if the number of control to TCP makes BGP design simpler
external (border) routers is large ► Drawbacks of using TCP:
► Route reflectors are used to alleviate this ™ susceptible to congestion related problems
problem – share the routes within the ™ this in turn could make the congestion even
domain – need not have a full mesh. worse when BGP is carrying routing
information needed to cure congestion
™ could use “high” priority for such datagrams to
reduce this types of problems

Border Gateway Protocol Border Gateway Protocol


► Because BGP uses TCP -- reliable ► The 16-byte marker is designed for security
protocol, it can exchange data purposes
incrementally ™ could be a cryptographic sum of the message and
can only be checked after complete reception
BGP header: ► Routers supporting BGP wait for BGP
► BGP protocol includes a “delimitation” connections on port 179
function that separates the byte stream ™ a routing wanting to establish a connection first
creates a TCP connection
into a set of independent messages
™ once connection established, OPEN message is sent

13
Border Gateway Protocol Border Gateway Protocol
™ OPEN message is used to negotiate ► Hold time -- amount of time (in seconds) used by
association’s parameters the “keep alive” procedure
► Initialization could fail:
™ if the version is not supported by the peer
™ if the authentication fails
™ connection collision occurs when both BGP peers
attempt to set up a connection simultaneously
► Hold time defines the time that may elapse
► AS is set to the AS of the sending router between two consecutive KEEPALIVE or
► BGP identifier is one of the IP interface
UPDATE messages
addresses of the BGP router

Border Gateway Protocol


► BGP Updates:
► Once connection is established, BGP
stations start exchanging “updates”
► Updates can
™ advertise“unfeasible” routes -- routes that are
withdrawn since the last update

14

Potrebbero piacerti anche