What is IP transit? A technical guide to transit, peering and BGP
IP transit is internet access for a network. A transit provider connects to your router over BGP, announces your addresses to the rest of the internet, and carries your traffic to and from every other network.
Every internet service relies on transit somewhere, but you only buy it yourself when you run a network: your own routers, your own addresses, your own ASN.
This is the technical version: how transit and peering work, how the money moves between networks, blended and single-carrier transit, and how to set up your routers, with a worked example in FRR. If you're about to sign for transit, buying IP transit in Australia covers what to check first.
How transit works
The internet is tens of thousands of separate networks. Each has an autonomous system number (ASN) and announces blocks of addresses, called prefixes. Networks tell each other which prefixes they can reach with BGP, the Border Gateway Protocol, over sessions between their routers.
Transit is the BGP connection where one network, your transit provider or upstream, gives you everything it can reach. Over one session it does two things:
- It announces your prefixes. Your router tells the provider's router about your addresses, say 203.0.113.0/24, and the provider passes that route to every network it connects to: its peers, its own transit providers and its other customers. They pass it on again, and the rest of the internet learns the way to you.
- It gives you routes to the rest of the internet, and carries your traffic to them.
Each network still decides for itself which routes it accepts, so no provider can promise that a particular network will take yours. ROAs and route objects, further down, are what other networks check before they believe you.
How peering differs
Peering is the other kind of BGP connection between networks. Two networks exchange routes to their own prefixes and their customers' prefixes, and nothing else. A network, its customers, their customers and so on make up its customer cone, and the cone is all a peer gets. A peer doesn't pass on routes from its other peers or its transit, so it only carries your traffic to its own network and its customers.
Those two rules, everything to customers and only the cone to peers, give the internet its shape. A path goes up through transit providers, across at most one peering, then down through customers, and never back up. A network that breaks the rule, by passing one peer's or transit provider's routes to another, has leaked them, and traffic between two other networks can end up crossing it.
Networks peer in two ways:
- Privately, over a cross-connect (a fibre between their two racks) in a data centre where both have equipment. This is a private network interconnect, or PNI, usually between networks that send each other a lot of traffic.
- At an internet exchange: a shared switching fabric, usually across several data centres in a city. Each member connects a port and peers with other members over it, through the exchange's route servers (one or two sessions that stand in for one per network) or bilaterally, with a session of their own.
An exchange is a place to peer, not a way onto the internet. It carries traffic between its members and nothing else.
How the economics work
Transit is bought by the megabit. A typical contract has a port, a commit (a rate you pay for every month, used or not) and burst above the commit at a per-Mbps rate. Usage is usually measured at the 95th percentile: the provider samples your port every five minutes, discards the busiest 5% of the month's samples and bills the highest one left. Buying IP transit in Australia works through an example.
Peering is usually settlement-free: neither network pays the other for the traffic. It isn't free to run. You pay for the exchange port and membership, the cross-connect to it, the router port and optics, and the time it takes to run the sessions. Those costs are fixed, the same at 10 Mbps as at 10 Gbps. Transit's grow with your traffic; peering's don't.
Paid peering sits between the two: one network pays another for a direct connection to that network and its customers, and nothing beyond. It's usually a large access network charging for direct access to its users.
At the top are the transit-free networks, often called tier 1. They reach every destination through their own customers and settlement-free peering with each other, and buy transit from nobody. Every other network buys transit from someone, even if it peers widely. A transit provider is selling its reach: its customer cone, its peering and, unless it's transit-free, its own transit.
Why content and access networks peer
Content networks, such as video, software downloads and cloud platforms, send far more than they receive. Access networks, the ISPs whose customers are people and businesses (eyeball networks, in the trade), receive far more than they send. Without peering, both pay transit for the same bytes, one at each end. Peering puts that traffic on a direct path neither pays per Mbps for, and it's usually faster, because it skips at least one network. That's why large content networks peer openly at exchanges and place caches inside access networks, and why access networks join exchanges early.
Not everyone peers with everyone. Each network has a peering policy, open, selective (with conditions such as a traffic level) or restrictive, and most publish it in PeeringDB.
Why a small network should still start with transit
- Peering only reaches the networks that agree to peer with you. You need transit for everything else, so it comes first.
- Peering's costs are fixed. At low volumes, the exchange port and cross-connect cost more than the traffic they'd take off your transit, and your commit has room to spare.
- Every session is policy to get right. Get one or two transit sessions running quietly before adding more.
Then measure. Flow data from your router (sFlow, NetFlow or IPFIX) shows how much of your traffic goes to each destination network, and PeeringDB shows which of them are at the exchange you're considering. Join when that traffic, or the latency to those networks, justifies it.
Blended or single-carrier transit
Single-carrier transit is bought directly from one large network, often a transit-free one. Every route you receive is that carrier's view of the internet, and your routes appear one hop from it.
Blended transit comes from a provider that buys transit from several upstreams, peers at exchanges and privately, and sells the mix as one product on one session. Its routers pick a path for each destination across all of them, by its own policy.
What a blend gives you:
- Several upstreams behind one session. When one of the provider's upstreams fails, it moves your traffic without you touching anything.
- Local peering. Traffic to networks the provider peers with can take a shorter path than it would through a distant carrier.
- One port, one session and one policy for you to run.
What it gives up:
- Choice. The provider's policy decides which upstream carries each destination, not yours.
- A hop. Your routes sit behind the provider's ASN, one AS further from everyone than a carrier's direct customers. Where networks compare AS path length, that counts.
- Independence. Two blended providers with an upstream in common, or a blended provider plus one of its own upstreams, can fail together.
- Visibility. A blend is only as good as its capacity to each upstream, which you can't see from outside.
How to see what you're buying:
- Ask. Which upstreams, which exchanges and private peers, how much capacity to each, and what happens to your traffic when one goes.
- Read the AS paths. On a full table, the first ASN in each path is your provider and the second is the neighbour it learned the route from. The distinct second ASNs across the table, and how many routes each carries, show who the provider really depends on.
- Read the communities. Many providers tag routes with where they learned them (transit, a peer or a customer) and where (a city or site). Ours are published, and include the neighbour ASN each route came from.
- Check the public record. PeeringDB has each network's own list of exchanges, facilities and peering policy. bgp.tools and bgp.he.net show the upstreams and peers that public route collectors see. A looking glass runs read-only queries on a provider's own routers, so you can see the paths it has to a prefix and which it picks.
Public tools infer relationships from what route collectors see, so treat them as a guide; the routes on your own session are the facts. AS152590 is in the same public records, linked from our network page.
When you don't need transit
If you take nbn from a wholesaler at Layer 3, you don't. The customer's session ends on the wholesaler's network, and the wholesaler's network carries it to the internet. You have no routes to announce and no BGP session to run. Layer 2, Layer 3 or L3VPN explains where each kind of nbn service ends.
The same goes for a business on an ordinary internet service, as long as the provider's addresses suit it and one provider is enough.
Your own address space doesn't on its own mean you need transit either. On our Layer 3 nbn internet services you can bring your own range: with your letter of authority, and ROAs that authorise AS152590, we announce it from AS152590 and route it to your services. Your services use your addresses, and you don't run BGP at all.
When you do
You need transit once your own router announces your own routes. That usually comes from one of these:
- Your own ASN and address space. Announce them from your own router, and your addresses stay the same when you add or change providers.
- Your own BNG on Layer 2 nbn. Layer 2 ends each customer's session on your BNG (the router that authenticates sessions and hands out addresses), so getting that traffic to the internet is your job, as it is for any ISP.
- A rack or servers that need to be reachable on your own addresses: hosting, a platform your customers connect to, VPN gateways, a backup target.
- Two upstreams for resilience. With your own ASN and addresses you can announce the same prefixes to two transit providers. When one fails, BGP withdraws the routes through it and traffic moves to the other, on the same addresses. This is multihoming. Two ordinary internet services give you two sets of addresses instead, and failing over changes them.
Before your first session
You need an ASN from APNIC, address space you hold or are authorised to use (a /24 of IPv4 or a /48 of IPv6 is the smallest most networks accept), and a router that does BGP properly. You also need ROAs and route objects. A Route Origin Authorisation (ROA) is a signed record in RPKI, the Resource Public Key Infrastructure, saying which ASN may originate your prefix; a route object says the same in an Internet Routing Registry (IRR). For transit, both name your ASN, not your provider's. Your first ASN goes through it all in order.
Setting it up
The shape
Two transit providers, each on its own port, ideally on two routers, so a router, a port or a provider can fail without cutting you off. Run iBGP between the routers and the same policy on both. Add an internet exchange when the traffic justifies it, and private peers when one network's traffic does. The example further down uses one router to stay short.
Local preference decides how your traffic leaves
BGP compares local preference before AS path length and almost everything else, and it's yours alone: set on import, never sent to another network. The values you give each kind of neighbour are your outbound traffic policy.
A scheme that works:
| Learned from | Local preference | Why |
|---|---|---|
| Your customers | 300 | They pay you to carry their traffic, and your link to them is the most direct path, even when their prefix also reaches you another way. |
| Private peers | 250 | Settlement-free, direct, and on capacity dedicated to the two of you. |
| Exchange route servers | 200 | Settlement-free and direct, but over a shared fabric. |
| Transit | 100 | Reaches everything, and every Mbps is paid for. 100 is FRR's default too. |
Leave gaps. With 50 or 100 between tiers you can add one later (bilateral sessions at the exchange at 220, above the route servers) and nudge routes inside a tier without crossing into the next: 110 for routes a transit provider learned from its own customers, 90 for a transit you only want as a backup. A nudge should never be big enough to lift a transit route above a peer.
Set those nudges from communities where a provider tags its routes: a route your provider learned from its own customer goes straight into that customer's network, usually your most direct option. Ours are on the IP transit page, where 152590:1:2 marks a route we learned from a customer. Larger networks tag every route they learn the same way, so their export policy can match the tag instead of the session.
Export only what's yours
The export policy matters most to everyone else. Send each transit provider and peer only your own prefixes and your customers', and never a route learned from one transit provider or peer to another. That's a leak (RFC 7908).
Build the prefix lists from data: your AS-SET in an IRR, expanded with a tool such as bgpq4, and checked against your ROAs. A prefix nobody registered never gets out. FRR helps: by default it sends and accepts nothing on an eBGP session that has no policy in that direction (RFC 8212).
Filter what comes in
On every eBGP session, before local preference:
- Drop RPKI invalids. Run a validator in your network, such as Routinator, and feed your routers over the RTR protocol. A route whose origin or length doesn't match a covering ROA is invalid, and you drop it. Routes with no ROA at all ("not found") are still accepted, since not every network publishes ROAs yet.
- Drop bogons: private and reserved space (RFC 1918, 100.64.0.0/10, 127.0.0.0/8, 169.254.0.0/16, multicast and more), and private or reserved ASNs in the AS path. Use a maintained list rather than writing your own.
- Drop your own prefixes coming back from outside, and a default route from anyone you didn't ask for one.
- Drop too-specifics: anything longer than a /24 in IPv4 or a /48 in IPv6.
ASPA, a newer RPKI object, lets a network sign which networks are its providers, so others can catch leaks in the AS path. If you publish one, list each transit provider; ours asks to be listed as AS152590.
A maximum-prefix limit on every session
A session that suddenly sends far more routes than usual is what a leak or a broken filter upstream looks like from your side, and a maximum-prefix limit drops it before the routes swamp your router. Set one per family on every session: for transit, well above today's table, with a warning threshold to tell you when growth catches up; for a route server or a peer, its usual count plus room, from PeeringDB or the exchange. Some networks use warning-only on transit and hard limits everywhere else. Your providers set a limit on you too; ours is agreed for each session.
Failover: BFD and graceful shutdown
BGP notices a dead neighbour when its hold timer runs out: 180 seconds by default. If the port stays up but the far end dies, say across an exchange or through a switch, that's three minutes of traffic into nothing. BFD (Bidirectional Forwarding Detection) runs fast hellos beside the session and takes it down in under a second: FRR's defaults are 300 ms with a multiplier of 3. Ask each provider whether it runs BFD on the session. We run it on a transit session on request.
For planned work, drain first. In FRR, bgp graceful-shutdown (or neighbor ... graceful-shutdown for one session) tags what you announce with GRACEFUL_SHUTDOWN (65535:0, RFC 8326) and drops what you receive over eBGP to local preference 0, so traffic moves to your other paths before you take a session down. Providers that honour the community, us included, lower your routes' preference in their network too.
Full table, partial or default
A transit provider can send three things:
- A full table: every route, so your router can choose a provider per destination. That's over a million IPv4 routes and about a quarter of a million IPv6.
- A partial table: the provider's own routes and its customers', usually with a default for everything else. Traffic to the provider's customers goes straight to it, and the rest follows the default. Most of the benefit, for a fraction of the routes.
- A default: one route. Enough with one upstream.
The cost of a full table is in the router. Every session's routes sit in the RIB, the control plane's memory, so two full tables mean over two million IPv4 paths. The best path for each prefix goes into the FIB, the forwarding table, which on hardware routers is fixed-size memory. In 2014 the IPv4 table grew past 512K entries, and routers whose forwarding memory was set aside for that many ran into trouble. Check FIB capacity per family, with headroom, before taking full tables. If a provider sends a full table your router can't hold, build a partial one: keep the routes it tags as its customers', drop the rest, and add a default towards it. With our transit, that tag is 152590:1:2.
Inbound: prepends, more-specifics and communities
Local preference decides how your traffic leaves. How it arrives is decided by other networks' policies, so you can only influence it:
- Prepending repeats your ASN to make a path look longer. It only counts where AS path length is compared, so it won't move traffic a network steers by local preference: the provider you prepend towards still sends its own customers' traffic over your direct link. More than two or three prepends rarely changes anything.
- More-specifics. Announcing the two /24s of a /23 on one path, and the /23 on both, pulls traffic to the /24s' path, because the longest match wins. It's blunt, it adds routes to everyone's table, and your ROAs must cover the /24s or they're invalid. Create a ROA for each prefix you announce rather than a loose maximum length (RFC 9319).
- Provider communities ask the provider to prepend towards some of its neighbours, not to announce to some, or to lower your route's preference inside its own network. They act inside the provider, so they're the most precise tool you have. Ours: prepend once, twice or three times towards our transit or towards everyone outside AS152590, or don't announce to our transit, or outside AS152590 at all.
A worked example in FRR
One router, AS64500, announcing 203.0.113.0/24, with two transit sessions and a session to an exchange's route server:
- Transit A is us, AS152590, on 192.0.2.0/31, with BFD on request. We tag routes we learned from a customer with 152590:1:2, one of our published communities. Your order sets out the real addresses and session details.
- Transit B, AS64510, on 192.0.2.2/31.
- The route server, AS64511, at 198.51.100.1 on the exchange's peering LAN.
Apart from AS152590, the ASNs and addresses are from the documentation ranges. bgpd needs its RPKI module loaded (-M rpki), and bfdd must be running for BFD.
! Originate the aggregate from a discard route, so it stays announced
! whatever happens inside the network.
ip route 203.0.113.0/24 blackhole
!
! What you announce: built from your IRR objects, checked against your ROAs.
ip prefix-list OURS-V4 seq 5 permit 203.0.113.0/24
!
! What you accept: no default, no bogons (a shortened list), not your own
! space, nothing longer than a /24.
ip prefix-list IMPORT-V4 seq 5 deny 0.0.0.0/0
ip prefix-list IMPORT-V4 seq 10 deny 0.0.0.0/8 le 32
ip prefix-list IMPORT-V4 seq 15 deny 10.0.0.0/8 le 32
ip prefix-list IMPORT-V4 seq 20 deny 100.64.0.0/10 le 32
ip prefix-list IMPORT-V4 seq 25 deny 127.0.0.0/8 le 32
ip prefix-list IMPORT-V4 seq 30 deny 169.254.0.0/16 le 32
ip prefix-list IMPORT-V4 seq 35 deny 172.16.0.0/12 le 32
ip prefix-list IMPORT-V4 seq 40 deny 192.168.0.0/16 le 32
ip prefix-list IMPORT-V4 seq 45 deny 224.0.0.0/3 le 32
ip prefix-list IMPORT-V4 seq 50 deny 203.0.113.0/24 le 32
ip prefix-list IMPORT-V4 seq 100 permit 0.0.0.0/0 le 24
!
bgp large-community-list standard A-CUSTOMER permit 152590:1:2
!
route-map TRANSIT-A-IN deny 5
match rpki invalid
exit
route-map TRANSIT-A-IN permit 10
match large-community A-CUSTOMER
set local-preference 110
exit
route-map TRANSIT-A-IN permit 20
set local-preference 100
exit
!
route-map TRANSIT-B-IN deny 5
match rpki invalid
exit
route-map TRANSIT-B-IN permit 10
set local-preference 100
exit
!
route-map IX-RS-IN deny 5
match rpki invalid
exit
route-map IX-RS-IN permit 10
set local-preference 200
exit
!
route-map EXPORT permit 10
match ip address prefix-list OURS-V4
exit
!
router bgp 64500
bgp router-id 203.0.113.1
neighbor 192.0.2.0 remote-as 152590
neighbor 192.0.2.0 description transit-a
neighbor 192.0.2.0 bfd
neighbor 192.0.2.2 remote-as 64510
neighbor 192.0.2.2 description transit-b
neighbor 192.0.2.2 bfd
neighbor 198.51.100.1 remote-as 64511
neighbor 198.51.100.1 description ix-route-server
no neighbor 198.51.100.1 enforce-first-as
!
address-family ipv4 unicast
network 203.0.113.0/24
neighbor 192.0.2.0 prefix-list IMPORT-V4 in
neighbor 192.0.2.0 route-map TRANSIT-A-IN in
neighbor 192.0.2.0 route-map EXPORT out
neighbor 192.0.2.0 maximum-prefix 1300000 90 restart 30
neighbor 192.0.2.2 prefix-list IMPORT-V4 in
neighbor 192.0.2.2 route-map TRANSIT-B-IN in
neighbor 192.0.2.2 route-map EXPORT out
neighbor 192.0.2.2 maximum-prefix 1300000 90 restart 30
neighbor 198.51.100.1 prefix-list IMPORT-V4 in
neighbor 198.51.100.1 route-map IX-RS-IN in
neighbor 198.51.100.1 route-map EXPORT out
neighbor 198.51.100.1 maximum-prefix 150000 90 restart 30
exit-address-family
exit
!
! The RPKI validator, over RTR. This is FRR 10.1 and later; earlier
! releases leave out "tcp".
rpki
rpki cache tcp 203.0.113.10 3323 preference 1
exitWhat each part does:
- The blackhole route gives
networksomething to match: FRR only announces anetworkthat's in the routing table. - Each session gets the shared prefix list, which FRR applies before the route map, and its own route map for RPKI and local preference: 110 for transit A's customer routes, 100 for the rest of transit, 200 for the route server.
- One export route map on every session, matching one prefix list, so a route from transit A can never reach transit B or the exchange.
- `no neighbor ... enforce-first-as`: a route server doesn't add its own ASN to the paths it passes on, and FRR otherwise rejects routes whose first AS isn't the neighbour's.
- Maximum-prefix warns at 90% and, after a trip, retries in 30 minutes.
IPv6 is the same again in address-family ipv6 unicast: its own sessions on the IPv6 link addresses, activated in that family, an ipv6 prefix-list that accepts nothing longer than a /48, a blackhole route and network for your IPv6 prefix, and its own maximum-prefix.
To make transit B your inbound backup, give it an export of its own with a prepend, and apply it with neighbor 192.0.2.2 route-map EXPORT-B out in place of EXPORT:
route-map EXPORT-B permit 10
match ip address prefix-list OURS-V4
set as-path prepend 64500 64500
exitThen check it: show bgp summary for the sessions and their route counts, show bgp ipv4 unicast neighbors 192.0.2.0 advertised-routes for exactly one prefix, yours, and show rpki cache-connection for the validator.
How we deliver it
IP transit from Underlay is full-table IPv4 and IPv6 from AS152590, over eBGP.
- Ports: 10G LR, or 100G LR or LR4, on single-mode fibre.
- Where: Equinix SY1, SY2, SY3 and SY4 in Sydney, subject to the facility's rules and cross-connect availability.
- Across an exchange or fabric: a VLAN or virtual circuit over an internet exchange or interconnection fabric named in your order, between your port there and ours. It can be your only circuit or a backup to a port, and it's still transit, not peering. We prefer a physical port.
- What we accept: your authorised prefixes, with BGP filters and maximum-prefix limits agreed for your session. We apply RPKI route origin validation, and routes with an invalid origin may be rejected.
- Communities: published in full. We tag the routes we send you with where they came from (our transit, a customer or our own network), the state, the site and the neighbour ASN. You can send the prepend and no-announce communities above, or blackhole a single /32 or /128, and we honour NO_EXPORT, NO_ADVERTISE, BLACKHOLE and GRACEFUL_SHUTDOWN. Inside AS152590, customer routes get local preference 200 and transit routes 100.
- DDoS: scrubbing isn't included, so run us beside your own mitigation provider.
We can be your first upstream, and help you plan the second when you're ready.
Next
If transit is what you need, buying IP transit in Australia is the next read. Ours is on the IP transit page, with every community listed, or tell us what you're building.