· 8 min read

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:

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

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:

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:

  1. How much of your traffic goes to networks present at the IX. Measure it before you commit.
  2. Cost of reaching the exchange. Port, cross-connect, and transport costs are mostly fixed.
  3. 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:

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:

It is probably not worth it yet if:

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

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.

Test your BGP policy on a BGP-enabled VDS with your own ASN and IP block.Learn more