|
Before you run BGP, you must be assigned an ASN ("Autonomous
System Number"). This number identifies your network
to the Internet.
When you announce (also known as advertising) that
you have a block of IPs in your ASN, you are sending
information about that IP block to your "Neighbor",
usually your ISP's BGP router. Your neighbor receives
the advertisement and adds it to their BGP tables. It
will then add its' ASN to your ASN in the AS Path and
copy the advertisement to it's neighbors.
This process continues until your route has been copied
(propagated) to every ASN on the Internet.
Since many Internet routers have several connections,
and thus several different paths to your network, they
have to decide on the best path to your network. This
is where it uses the ASN information. The Internet routers
select the path to your network that has the shortest
number of ASNs to cross. This is called the "ASN
hop Count", and is different from the number of
hops you see in a traceroute.
Hypothetical Example:
Bob (ASN 12345) has a connection to UUNet (ASN 701)
and Genuity (ASN 1).
UUNet has a direct connection to Bill (ASN 23456). Genuity
doesn't have a direct connection to Bill, but instead
has to cross Buddy (ASN 7654).
Diagram:
Bob(12345) - UUNet(701) - Bill(23456)
+- Genuity(1) - Buddy(7654) -+
In this scenario, Bill is going to receive two paths
to Bob.
The first path Via UUNet looks like this:
701
12345
The second path Via Genuity/Buddy looks like this:
7654
1 12345
Bill would select the UUNet path because of the shorter
number of ASNs in the AS PATH.
If Bob's UUNet connection went down, then Bill would
still have the longer Genuity path in his BGP tables
and would send data to Bob via that path. This is why
BGP is used for redundancy.
|