cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
823
Views
15
Helpful
6
Replies

ASR Router with Few BGP neighbours

mahesh18
Level 6
Level 6

We have ASR router and it has few ISP connections.

 

Say it is learning full routing table from ISP 1

It is learning 48000 routes through ISP 2

It is learning 7000 routes through ISP 3

 

Questions

1>If traffic goes to specific website via ISP 3 will it always come back via same ISP?

 

2>If someone access say website with IP 4.2.2.2 how can i verify if traffic goes via say ISP 2 and comes back also via ISP 2?

 

3>Is there any way i can check how BGP is selecting the best route among 3 different ISP's?

 

Mahesh

 

 

 

3 Accepted Solutions

Accepted Solutions

Jon Marshall
Hall of Fame
Hall of Fame

 

1) It depends on your public IP addressing and how you are advertising that addressing. Plus NAT could come into it as well. 

 

Would need more info. 

 

2) You can use traceroute to see outbound path and as above the inbound path depends on addressing and BGP advertisements. 

 

3) Yes do a "sh ip bgp" and it will show you the best route ">"

 

Jon

View solution in original post

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello Mahesh,

in the described network scenario with BGP you can decide and influence the outgoing direction only.

This is caused by the fact that you cannot influence how Ases that are not directly connected to you choice the return path to your public IP prefixes.

so the anwers are :

1) traffic exiting via one ISP for example ISP3 can have a return path via ISP3 ( most probable for destinations that are other customers of ISP3 just to explain) or can have a different return via ISP1 or ISP2.

You can only use your own AS number prepending in your advertisements as a way to make less attractive one return path, but it is not a guarantee of effects because BGP has so many criteria for deciding the best route that come before the AS path length ( local preference and weight for Cisco routers).

2) As suggested by Jon you can discover the outgoing path using traceroute command but this does not provide info about the return path. To emulate the return path you should perform a traceroute from a looking glass owned by one ISP that is serving the final destination with a destination that is an address in your public IP address prefix

In the past a useful web page for finding looking glasses was

www.traceroute.org

In order to find to which AS a destination prefix belongs you should seach on the web sites of RIR (Regional Internet Registry) like ARIN for North America, RIPE for Europe and so on.

Or simply you can find the AS owner of the destination prefix in show ip bgp <prefix> it is the rightmost last AS number. And then look for that AS in the website of RIR (in this case you search AS<number> to get info).

 

3) Again as suggested by Jon you can use

show ip bgp <prefix>

to find out which exit ISP is used for each specific <prefix>.

 

In your scenario taking in account that the most specific route is used first in order to use effectively ISP3 and ISP2 you should give them an higher local preference in order to avoid competition with ISP1 the one sending you the full BGP table.

Something like local preference 200 for ISP3 and local preference 150 for ISP2, (with ISP1 with default 100 local preference).

 

Hope to help

Giuseppe

 

View solution in original post

Hello Mahesh,

yes your understanding is correct the best route only is installed in the routing table and the best path is chosen for the shorter AS path, even if is coming from an iBGP session (internal), because the neighbor type (eBGP preferred over iBGP) is checked later in the BGP best path selection.

Note how the rightmost AS is the same in both AS paths that is the owner of 4.0.0.0/9 prefix. This is correct and normal.

 

Hope to help

Giuseppe

 

View solution in original post

6 Replies 6

Jon Marshall
Hall of Fame
Hall of Fame

 

1) It depends on your public IP addressing and how you are advertising that addressing. Plus NAT could come into it as well. 

 

Would need more info. 

 

2) You can use traceroute to see outbound path and as above the inbound path depends on addressing and BGP advertisements. 

 

3) Yes do a "sh ip bgp" and it will show you the best route ">"

 

Jon

Thanks for reply.

Traceroute tells us outbound path but how can i make sure return traffic comes via same path?

 

any config or command i can run to narrow this down?

 

let me know what more info you need?

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello Mahesh,

in the described network scenario with BGP you can decide and influence the outgoing direction only.

This is caused by the fact that you cannot influence how Ases that are not directly connected to you choice the return path to your public IP prefixes.

so the anwers are :

1) traffic exiting via one ISP for example ISP3 can have a return path via ISP3 ( most probable for destinations that are other customers of ISP3 just to explain) or can have a different return via ISP1 or ISP2.

You can only use your own AS number prepending in your advertisements as a way to make less attractive one return path, but it is not a guarantee of effects because BGP has so many criteria for deciding the best route that come before the AS path length ( local preference and weight for Cisco routers).

2) As suggested by Jon you can discover the outgoing path using traceroute command but this does not provide info about the return path. To emulate the return path you should perform a traceroute from a looking glass owned by one ISP that is serving the final destination with a destination that is an address in your public IP address prefix

In the past a useful web page for finding looking glasses was

www.traceroute.org

In order to find to which AS a destination prefix belongs you should seach on the web sites of RIR (Regional Internet Registry) like ARIN for North America, RIPE for Europe and so on.

Or simply you can find the AS owner of the destination prefix in show ip bgp <prefix> it is the rightmost last AS number. And then look for that AS in the website of RIR (in this case you search AS<number> to get info).

 

3) Again as suggested by Jon you can use

show ip bgp <prefix>

to find out which exit ISP is used for each specific <prefix>.

 

In your scenario taking in account that the most specific route is used first in order to use effectively ISP3 and ISP2 you should give them an higher local preference in order to avoid competition with ISP1 the one sending you the full BGP table.

Something like local preference 200 for ISP3 and local preference 150 for ISP2, (with ISP1 with default 100 local preference).

 

Hope to help

Giuseppe

 

Thanks for so detailed reply back.

When i do 

#show ip bgp 4.2.2.2
BGP routing table entry for 4.0.0.0/9, version 1869374
Paths: (2 available, best #2, table default)
Not advertised to any peer
Refresh Epoch 1
25983 6327 3356, (aggregated by 3356 4.69.130.6)
72.29.230.182 from 72.29.230.182 (72.29.224.129)
Origin IGP, localpref 100, valid, external, atomic-aggregate
Community: 6327:2001 6327:20011
rx pathid: 0, tx pathid: 0
Refresh Epoch 1
6327 3356, (aggregated by 3356 4.69.130.6)
192.41.x.x from 192.41.x.x(64.141.118.154)
Origin IGP, metric 0, localpref 100, valid, internal, atomic-aggregate, best**********************
rx pathid: 0, tx pathid: 0x0

 

I see two routes to the destination prefix.

Route via 192.41.x.x is selected because of shortest AS path right?

 

 

when i run below command 

 

show ip route 4.2.2.2
Routing entry for 4.0.0.0/9
Known via "bgp 16569", distance 200, metric 0
Tag 6327, type internal
Last update from 192.41.x.x 3w1d ago
Routing Descriptor Blocks:
* 192.41..x.x, from 192.41.x.x, 3w1d ago
Route metric is 0, traffic share count is 1
AS Hops 2
Route tag 6327
MPLS label: none

 

This tells us Router only installs best route in the routing table right?

Hello Mahesh,

yes your understanding is correct the best route only is installed in the routing table and the best path is chosen for the shorter AS path, even if is coming from an iBGP session (internal), because the neighbor type (eBGP preferred over iBGP) is checked later in the BGP best path selection.

Note how the rightmost AS is the same in both AS paths that is the owner of 4.0.0.0/9 prefix. This is correct and normal.

 

Hope to help

Giuseppe

 

Many thanks again.!!!

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card