wiki:bgp_ip_transit_info
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| wiki:bgp_ip_transit_info [2026/02/05 09:31] – [gobgp software example] add multihop info antisa | wiki:bgp_ip_transit_info [2026/05/29 12:56] (current) – [gobgp software example] add info about multiple peer ips and examples antisa | ||
|---|---|---|---|
| Line 76: | Line 76: | ||
| //as// is your assigned ASN number. | //as// is your assigned ASN number. | ||
| - | // | + | // |
| //peer-as// is peer ASN, also given by provider. | //peer-as// is peer ASN, also given by provider. | ||
| Line 97: | Line 97: | ||
| 2607: | 2607: | ||
| </ | </ | ||
| + | // | ||
| - | Check the routing table | + | Check the routing table. You might see something like this |
| < | < | ||
| Line 118: | Line 119: | ||
| * 2a03: | * 2a03: | ||
| + | </ | ||
| + | |||
| + | or this | ||
| + | |||
| + | <code | download> | ||
| + | # gobgp global rib -a ipv4 | ||
| + | | ||
| + | * 89.124.253.0/ | ||
| + | # gobgp global rib -a ipv6 | ||
| + | | ||
| + | * 2a03: | ||
| + | </ | ||
| + | |||
| + | This should be ok. What you need to check is that you are advertising your IPs you should see something like: | ||
| + | |||
| + | <code | download> | ||
| + | # gobgp neighbor 198.44.157.1 adj-out | ||
| + | | ||
| + | | ||
| </ | </ | ||
| Line 167: | Line 187: | ||
| ===== Checking propagation ===== | ===== Checking propagation ===== | ||
| + | RIPE has BG play tool to check the history of route propagation here https:// | ||
| + | |||
| + | {{: | ||
| + | |||
| Here's an example of Tzulo server provider which advertises to multiple upstreams | Here's an example of Tzulo server provider which advertises to multiple upstreams | ||
| https:// | https:// | ||
| Line 173: | Line 197: | ||
| which has multiple arrows pointing to upstreams. | which has multiple arrows pointing to upstreams. | ||
| + | |||
| + | ===== Updating AS path length ===== | ||
| + | When advertising IP from multiple providers, one can have a shorter AS path and take all the traffic for itself. You can adjust the length of the AS path on your side by prepending your AS number 1 or more times to extend the path. | ||
| + | |||
| + | Example using gobgp: | ||
| + | < | ||
| + | [global.config] | ||
| + | ... | ||
| + | [global.apply-policy.config] | ||
| + | export-policy-list = [" | ||
| + | default-import-policy = " | ||
| + | default-export-policy = " | ||
| + | |||
| + | [[neighbors]] | ||
| + | ... | ||
| + | ... | ||
| + | |||
| + | [[policy-definitions]] | ||
| + | name = " | ||
| + | [[policy-definitions.statements]] | ||
| + | name = " | ||
| + | |||
| + | [policy-definitions.statements.actions] | ||
| + | route-disposition = " | ||
| + | |||
| + | # number of times to prepend our asn. This allows for controlling | ||
| + | # the length of th AS path that packet takes so it affects routing | ||
| + | # https:// | ||
| + | [policy-definitions.statements.actions.bgp-actions.set-as-path-prepend] | ||
| + | as = " | ||
| + | repeat-n = 1 | ||
| + | |||
| + | </ | ||
| + | Here we're prepending the path 1 additional time. After restarting the service notice a repeating ASN in //AS_PATH// column | ||
| + | |||
| + | # gobgp neighbor 213.155.129.101 adj-out | ||
| + | | ||
| + | | ||
| + | |||
| + | On RIPE Looking glass this will be shown as | ||
| + | {{: | ||
| + | |||
| + | ===== Withdrawing BGP announcements ===== | ||
| + | In case you need to take the server offline for maintenance and you have a dynamic setup i.e. you yourself is advertising the routes via the BGP daemon on your server, it is sufficient to simply stop the BGP session on your side before the maintenance begins. Once the session is down, the advertisements for will be withdrawn automatically. | ||
| + | |||
| + | After the maintenance is completed, you can start the session again and the prefixes will be re-advertised as before. | ||
| + | |||
| ====== Tested on ====== | ====== Tested on ====== | ||
| Line 185: | Line 256: | ||
| * https:// | * https:// | ||
| * https:// | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
wiki/bgp_ip_transit_info.1770283861.txt.gz · Last modified: by antisa
