wiki:bgp_ip_transit_info
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| wiki:bgp_ip_transit_info [2025/12/16 15:04] – created antisa | wiki:bgp_ip_transit_info [2026/01/21 12:54] (current) – add Checking propagation antisa | ||
|---|---|---|---|
| Line 10: | Line 10: | ||
| If you want it routed under our ASN of the server provider (more statically as they would have to add/remove it manually), they would create the route object for your ipv4 and ipv6 or you can, and specify Origin as ASN# of the provider, and they would simply route the ips to your server directly. | If you want it routed under our ASN of the server provider (more statically as they would have to add/remove it manually), they would create the route object for your ipv4 and ipv6 or you can, and specify Origin as ASN# of the provider, and they would simply route the ips to your server directly. | ||
| + | |||
| + | Here's an example after creating route objects in RIPE | ||
| + | |||
| + | {{: | ||
| + | {{: | ||
| + | |||
| + | You also need to add the ROA objects: | ||
| + | |||
| + | {{: | ||
| + | {{: | ||
| + | |||
| + | |||
| + | Then you can query it in the database //" | ||
| + | |||
| + | The minimum routing for ipv6 is a /48 for BGP. typically a /64 is assigned to your own customers. | ||
| + | for ipv4 it is a /24 for minimum for BGP routing. | ||
| + | |||
| + | So make sure you have your route objects created for the /24 ipv4 and at least a /48 or larger for the ipv6 block that you want to advertise with your ASN as the registered origin. | ||
| + | |||
| + | Provider will add your ASN to their AS-Set so you can advertise the prefixes under your ASN through the provider. It sometimes will take up to 48hrs for upstreams to see your prefixes and allow it, so the sooner you get those route objects created the better. Example: | ||
| + | https:// | ||
| + | |||
| + | If you only have one location, then you can advertise the whole /32 block. if you have more then 1x location then you can split it to /48s or /40 or /36 etc. so you have large block in each location. | ||
| + | if you do split it smaller then a /32, then you should create that route object as well to match. | ||
| + | |||
| + | ===== gobgp software example ===== | ||
| + | A working BGP session with [[https:// | ||
| + | |||
| + | You need to allow inbound port 179 in the firewall for both v4 and v6. | ||
| + | |||
| + | For IPv6 you need to have that set up on the network interface as well: | ||
| + | |||
| + | < | ||
| + | 2: eth0: < | ||
| + | link/ether a0: | ||
| + | inet 198.44.157.3/ | ||
| + | | ||
| + | inet6 2607: | ||
| + | | ||
| + | inet6 fe80:: | ||
| + | | ||
| + | |||
| + | </ | ||
| + | |||
| + | // | ||
| + | < | ||
| + | [global.config] | ||
| + | as = 203619 | ||
| + | router-id = " | ||
| + | |||
| + | [[neighbors]] | ||
| + | [neighbors.config] | ||
| + | neighbor-address = " | ||
| + | peer-as = 11878 | ||
| + | |||
| + | [[neighbors]] | ||
| + | [neighbors.config] | ||
| + | neighbor-address = " | ||
| + | peer-as = 11878 | ||
| + | |||
| + | </ | ||
| + | |||
| + | // | ||
| + | |||
| + | //as// is your assigned ASN number. | ||
| + | |||
| + | // | ||
| + | |||
| + | //peer-as// is peer ASN, also given by provider. | ||
| + | |||
| + | After starting gobgp you should see the session is established: | ||
| + | |||
| + | < | ||
| + | # gobgp neighbor | ||
| + | Peer | ||
| + | 198.44.157.1 | ||
| + | 2607: | ||
| + | </ | ||
| + | |||
| + | Check the routing table | ||
| + | |||
| + | < | ||
| + | # gobgp global rib -a ipv4 | ||
| + | | ||
| + | * 0.0.0.0/ | ||
| + | * 23.234.84.0/ | ||
| + | * 23.234.85.0/ | ||
| + | * 23.234.86.0/ | ||
| + | * 23.234.87.0/ | ||
| + | * 89.124.253.0/ | ||
| + | * 198.44.132.0/ | ||
| + | * 198.44.140.0/ | ||
| + | * 198.44.157.0/ | ||
| + | * 198.54.132.0/ | ||
| + | # gobgp global rib -a ipv6 | ||
| + | | ||
| + | * ::/0 | ||
| + | * 2a03: | ||
| + | |||
| + | </ | ||
| + | |||
| + | Now you can assing IPs from the subnet you own to the loopback interface. It should work even though its not on the eth0 interface. | ||
| + | |||
| + | < | ||
| + | 1: lo: < | ||
| + | link/ | ||
| + | inet 127.0.0.1/8 scope host lo | ||
| + | | ||
| + | inet 89.124.253.5/ | ||
| + | | ||
| + | inet6 2a03: | ||
| + | | ||
| + | inet6 ::1/128 scope host | ||
| + | | ||
| + | </ | ||
| + | |||
| + | <WRAP center round box 60%> | ||
| + | Sometimes you might get an IP address from the private space from the provider like 10.255.0.2 for your side of the BGP session. You need to add it (via '' | ||
| + | |||
| + | < | ||
| + | 1: lo: < | ||
| + | link/ | ||
| + | inet 127.0.0.1/8 scope host lo | ||
| + | | ||
| + | inet 89.124.253.5/ | ||
| + | | ||
| + | inet6 2a03: | ||
| + | | ||
| + | inet6 ::1/128 scope host | ||
| + | | ||
| + | 2: eth0: < | ||
| + | link/ether 5c: | ||
| + | inet 45.128.135.226/ | ||
| + | | ||
| + | inet 10.255.0.2/ | ||
| + | | ||
| + | ... | ||
| + | |||
| + | # gobgp neighbor | ||
| + | Peer AS Up/Down State | ||
| + | 10.255.0.1 | ||
| + | fd00:136::1 206804 | ||
| + | |||
| + | </ | ||
| + | |||
| + | </ | ||
| + | |||
| + | ===== Checking propagation ===== | ||
| + | Here's an example of Tzulo server provider which advertises to multiple upstreams | ||
| + | https:// | ||
| + | |||
| + | https:// | ||
| + | |||
| + | which has multiple arrows pointing to upstreams. | ||
| ====== Tested on ====== | ====== Tested on ====== | ||
| - | * | + | * gobgp_version: |
| + | * January 2026. | ||
| ====== See also ====== | ====== See also ====== | ||
| ====== References ====== | ====== References ====== | ||
| + | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
wiki/bgp_ip_transit_info.1765897479.txt.gz · Last modified: by antisa
