Internet Exchange (IX) and Peering vs Transit: How They Differ
An Internet Exchange (IX) is a shared Layer 2 switching fabric where networks connect to exchange traffic directly with each other, and peering is the BGP relationship that makes that exchange happen. Transit is different: you pay an upstream network to carry your traffic to the entire internet, while peering usually only covers traffic between you and the peer's own customers.
Both matter if you run your own ASN. Peering shortens paths and can lower your per-megabit cost. Transit gives you full reachability and a safety net. Most well-run networks use both.
What an Internet Exchange actually is
An IX is a switch (or a set of switches across several facilities) with a common peering LAN. Each member connects a router port to it, gets an IP address on the LAN, and then sets up BGP sessions with other members.
Key points:
- The IX moves Ethernet frames. It does not run BGP for you and does not carry your traffic to third parties.
- The peering LAN prefix is usually a /23 to /24 for IPv4 and a /64 for IPv6. Don't announce it to the internet.
- Members typically pay a port fee plus the cost of reaching the exchange (a cross-connect in the same facility, or transport/remote peering if you are elsewhere).
- Many exchanges operate route servers, so one BGP session gets you routes from many members.
Peering vs transit: the core differences
| Peering | IP transit | |
|---|---|---|
| What you get | Routes for the peer's own network and its customers | Routes for the whole internet |
| Typical pricing model | Port and connectivity cost, traffic itself usually settlement-free | Billed on traffic volume or committed rate |
| Path length | Usually shorter, often one AS hop | Depends on the upstream's connectivity |
| Reachability | Partial | Full |
| Redundancy role | Supplement | Primary or fallback |
The important rule: a peer will not carry your traffic to someone else. If you peer with AS64500, you reach AS64500 and its customers. You do not reach AS64501 through it, and AS64500 will not accept traffic from you destined elsewhere. This is why peering never replaces transit; it offloads the portion of your traffic that has a direct path.
Types of peering
- Public peering over an IX: one port, many sessions. Cheapest way to reach many networks.
- Bilateral sessions on the IX: you configure a session directly with a specific member. This gives you control over what you announce and accept per peer.
- Route server sessions: one or two sessions to the exchange's route servers deliver many members' routes at once. Convenient, but you rely on the exchange's filtering plus your own.
- Private network interconnect (PNI): a dedicated cross-connect between two networks. Used when traffic volume between two parties justifies a dedicated link.
- Remote peering: you reach the IX through a transport provider instead of being physically present. It lowers entry cost but adds the transport path to your latency and a dependency on that provider.
Why peering reduces latency
With transit, your packets go to your upstream, which may hand them to another carrier, which hands them to the destination network. Each hop between organizations is a chance for a detour. With peering, if the destination is a member of the same IX, the path is often just you → IX → them.
Latency gains show up most when:
- The destination network and you are in the same city or region, but your transit provider hauls traffic to a distant hub to interconnect.
- You serve eyeball networks (ISPs) directly, for example for game servers or streaming.
- Paths have several AS hops that peering would collapse into one or two.
Peering does not make light travel faster. If your two networks are on different continents, peering won't change the physical distance. It removes unnecessary detours, not geography.
Why peering can lower cost
Transit is usually billed on traffic. Every megabit you can move over peering is a megabit you don't send to your transit provider. Whether this pays off depends on:
- How much of your traffic goes to networks present at the IX. Measure it before you commit.
- Cost of reaching the exchange. Port, cross-connect, and transport costs are mostly fixed.
- Your traffic volume. Fixed costs are easier to justify with higher volume.
If only a small share of your traffic goes to IX members, the fixed costs may exceed the transit savings. Latency may still justify it, though.
Measure first: where does your traffic go?
Before you join an exchange, find out which ASNs you exchange most traffic with. Flow data (NetFlow, IPFIX, sFlow) grouped by source and destination ASN gives a ranked list. A tool such as NixMon can ingest flow data for this kind of visibility, and it also helps with DDoS detection on the same data.
Then check which of those ASNs are at which exchanges using PeeringDB:
# Look up an ASN's presence at exchanges (example ASN from the documentation range)
curl -s "https://www.peeringdb.com/api/netixlan?asn=64500" | jq '.data[] | {name, ipaddr4, ipaddr6, speed}'
# Check the network's peering policy
curl -s "https://www.peeringdb.com/api/net?asn=64500" | jq '.data[0] | {name, policy_general, info_prefixes4}'
Match your top-talker list against that data. If the top 10 to 20 ASNs share an exchange, that exchange is a candidate.
Example BIRD 2 configuration for an IX session
This is a minimal sketch for a route server session. The IX LAN uses 192.0.2.0/24 and your ASN is AS64496 (both documentation values). Adapt it to your own policy.
roa4 table r4;
protocol static {
roa4 { table r4; };
# load ROAs here, or use an RPKI-to-Router (rpki) protocol
}
filter ix_import {
if net.len > 24 then reject;
if net.len < 8 then reject;
if roa_check(r4, net, bgp_path.last) = ROA_INVALID then reject;
if bgp_path.len > 50 then reject;
bgp_local_pref = 200; # above transit, below customers
accept;
}
filter ix_export {
if net ~ [ 203.0.113.0/24 ] then accept; # only your own prefixes
reject;
}
protocol bgp ix_rs1 {
local 192.0.2.10 as 64496;
neighbor 192.0.2.254 as 64511;
ipv4 {
import filter ix_import;
export filter ix_export;
import limit 200000 action restart;
};
}
Notes:
- Local preference: the usual order is customer routes > peer routes > transit routes. Setting peer routes above transit is what actually moves traffic onto the IX.
- Route servers don't add their own ASN to the path. Don't enforce a first-AS check on route server sessions, or you will reject valid routes.
- Export only your own and your customers' prefixes. Never re-announce peer or transit routes to a peer. That turns you into free transit for others.
- Generate prefix filters from IRR data for bilateral sessions. See
bgpq4and AS-SET-based filters.
Common mistakes and fixes
Leaking transit routes to peers. Symptom: unexpected inbound traffic and angry emails from your upstream. Fix: export filters that permit only your prefixes and customer-cone prefixes, with a default reject at the end.
Next-hop problems. Symptom: BGP session is up but traffic blackholes. Fix: don't redistribute the IX LAN prefix into your IGP carelessly, and use next hop self on iBGP as needed so internal routers can reach the next hop.
No max-prefix limit. Symptom: one misconfigured peer floods your table. Fix: set import limits on every session.
Skipping RPKI validation. Symptom: you accept hijacked or mis-originated prefixes. Fix: drop RPKI-invalid routes at import. See the RPKI and ROA article in this series.
Assuming peering equals lower latency. Symptom: you joined an exchange and nothing changed. Fix: compare traceroutes before and after, and confirm that the preferred route actually uses the IX path (check local-pref and AS-path).
Remote peering without a backup plan. Symptom: when the transport provider fails, you lose your peering and traffic falls to transit with a latency jump. Fix: make sure transit is always available as a fallback, and monitor both.
Verify the result
After the session is established:
birdc show protocols ix_rs1
birdc show route protocol ix_rs1 count
birdc show route for 198.51.100.10 all
mtr -rwzc 50 198.51.100.10
Check that the best path for a given destination goes via the IX and that the AS path is short. You can also see how your prefixes look from the outside with a public looking glass such as the Nixcon looking glass, which supports BGP route, ping, and traceroute queries from İzmir, Frankfurt, and the US.
When peering makes sense, and when it doesn't
Peering is worth it if:
- You have your own ASN and a meaningful share of traffic goes to networks present at an exchange.
- Latency to specific eyeball networks matters (gaming, voice, real-time apps).
- You already have at least one solid transit provider.
It is probably not worth it yet if:
- You are still on a single upstream and don't have your own ASN or prefixes.
- Your traffic is small and spread across thousands of destinations.
- You don't have the operational capacity to maintain filters, monitor sessions, and respond to route leaks.
Starting without your own hardware
You don't need a rack to learn BGP policy. If you have your own ASN and IP block, a BGP-enabled VDS lets you announce them from a VM. Nixcon Group LLC operates AS40368 with locations in İzmir, Frankfurt, and Fremont. On the BGP VDS service, ASN and prefix ownership are validated automatically against RPKI ROAs and RIR/IRR records, and your ASN is added to the AS-NIXCON AS-SET. You can choose whether you receive a full routing table or only Nixcon routes, and whether the announcement is DDoS-protected. It's a practical way to build and test your import/export filters before you invest in exchange ports.
Summary
- An IX is a shared switch fabric. Peering is the BGP relationship on top of it.
- Peering gives partial reachability; transit gives full reachability. You need both.
- Latency gains come from shorter, more direct paths, not from faster links.
- Cost savings depend on how much of your traffic goes to IX members versus the fixed costs of connecting.
- Always filter: RPKI validation, prefix limits, and strict exports.
- Measure with flow data first, join an exchange second, and verify with traceroute afterward.
Frequently asked questions
What is the difference between peering and transit?
Transit gives you routes to the whole internet, and you pay your upstream to carry your traffic. Peering is a direct exchange between two networks, usually limited to each other's own and customer routes. Peering reduces path length and can offload traffic from transit, but it cannot replace it.
Does joining an Internet Exchange always reduce latency?
No. It helps when the destination networks are members of the same exchange and your transit path currently takes a detour. If the destination is far away or not present at the IX, you won't see a difference. Compare traceroutes before and after.
Do I need my own ASN to peer at an IX?
Yes. Peering is done over BGP, which requires a public ASN and usually your own IP prefixes to announce. Without an ASN, your upstream provider handles routing for you.
Is peering free?
The traffic exchanged between peers is usually settlement-free, but connecting is not free. You typically pay for an exchange port, a cross-connect or transport to reach the facility, and your own router or equipment.