Multihoming and traffic engineering
Compare IPv6 multihoming options: provider-independent space with BGP, and provider-assigned prefixes without NAT (RFC 8678). Control outbound traffic with local preference and inbound traffic with more-specifics, AS-path prepending and provider communities. Use standard (RFC 1997) and large (RFC 8092) communities, including well-known values. Engineer and measure an inbound traffic split for a dual-homed enterprise.
Take the quiz · pass mark 70% · 9 questions
Explanation
IPv4 networks often multihome with NAT: two providers, two addresses, and a box that rewrites everything. IPv6 removes the need for NAT, which leaves two clean designs.
Option 1: Provider-independent space and BGP
The organisation gets its own prefix (typically a /48 from an RIR, or larger) and an ASN, and announces the prefix to both providers. Addresses stay the same whichever provider is used, and failover is handled by BGP in seconds to minutes. This is the standard for any organisation that can justify it, and the subject of the lab.
Option 2: Provider-assigned prefixes without NAT (RFC 8678)
Smaller sites can multihome without their own space: each provider delegates a prefix, and every host gets an address from each prefix. The hard part is that a packet must leave through the provider whose prefix is in its source address, or that provider's ingress filter (BCP 38) drops it. RFC 8678 discusses the tools:
- Source-address-dependent routing (choose the exit by source address) in the site's routers
- Router Advertisements that deprecate the prefix of a failed provider (preferred lifetime 0), so hosts stop using it for new connections (L3.02, L3.04)
- Rule 5.5 of default address selection (prefer a source address from a prefix advertised by the chosen next hop, L3.04) and RFC 8028 (send through the router that advertised the source prefix) on hosts
It works, but existing connections break on failover and host behaviour varies, so it suits small sites better than businesses that need stable addresses.
Outbound traffic: local preference
You control which exit your traffic uses. Local preference is the first real step of BGP best-path selection (RFC 4271) and is shared across your AS through iBGP. A common policy is: customers 200, peers 150, transit 100. In the enterprise lab, set local preference 120 on routes from ISP-A to make it the primary exit, while ISP-B is still used if ISP-A fails.
Inbound traffic: harder, because other people decide
How the rest of the Internet reaches you is decided by other networks' policies. Your tools, from strongest to weakest:
- More-specific prefixes. Longest-prefix match beats every BGP attribute. Announce the /44 to both providers and the two /45 halves one to each: each half arrives through "its" provider, and the /44 keeps everything reachable if one fails. Stay at /48 or shorter (L4.05), create ROAs for the more-specifics, and do not de-aggregate without a reason: every extra prefix costs memory on every router on the Internet.
- AS-path prepending. Add your own ASN several times towards the provider you want less used. Networks that compare AS-path length then prefer the shorter path. Prepending once or twice has an effect; more than about three rarely adds anything and makes your paths look odd.
- Provider communities. Many providers let customers set communities that change the provider's local preference or prepend towards specific peers. This acts inside the provider, where your announcements otherwise have no control.
- MED only compares routes from the same neighbouring AS, so it helps balance two links to one provider, not between providers.
Communities
A standard community (RFC 1997) is 32 bits, written ASN:value with 16 bits each: 64496:100 is 64496 × 65536 + 100. Well-known values include:
| Community | Meaning |
|---|---|
| NO_EXPORT (0xFFFFFF01) | Do not advertise outside this AS (or confederation) |
| NO_ADVERTISE (0xFFFFFF02) | Do not advertise to any peer |
| 65535:0 GRACEFUL_SHUTDOWN (RFC 8326) | Lower the preference of this path before maintenance |
| 65535:666 BLACKHOLE (RFC 7999) | Discard traffic to this prefix (DDoS mitigation, only where the provider supports it, usually for /128 or /64 inside your own space) |
A 4-byte ASN does not fit in 16 bits, so ictNetworks (AS65550) cannot define 65550:x standard communities. Large communities (RFC 8092) are three 32-bit numbers, GlobalAdmin:Function:Parameter, for example 65550:1:64496 meaning "ictNetworks, function 1 (prepend once), towards AS64496". Every network can use its own ASN as the first field.
Configuration (FRR, enterprise AS64498)
ipv6 route 2001:db8:3000::/44 blackhole
ipv6 route 2001:db8:3000::/45 blackhole
ipv6 route 2001:db8:3008::/45 blackhole
!
ipv6 prefix-list ENT-A seq 10 permit 2001:db8:3000::/44
ipv6 prefix-list ENT-A seq 20 permit 2001:db8:3000::/45
ipv6 prefix-list ENT-B seq 10 permit 2001:db8:3000::/44
ipv6 prefix-list ENT-B seq 20 permit 2001:db8:3008::/45
ipv6 prefix-list ENT-AGG seq 10 permit 2001:db8:3000::/44
!
route-map TO-ISPA permit 10
match ipv6 address prefix-list ENT-A
route-map TO-ISPB permit 10
match ipv6 address prefix-list ENT-B
!
! Prepend-only variant (lab step 4): announce just the /44, longer path via ISP-B
route-map TO-ISPB-PREPEND permit 10
match ipv6 address prefix-list ENT-AGG
set as-path prepend 64498 64498
!
route-map FROM-ISPA permit 10
set local-preference 120
Communities are set with set community 64496:80 additive or set large-community 65550:1:64496 additive, and matched with bgp community-list standard NAME permit 64496:80 and match community NAME. On MikroTik RouterOS v7, routing filters use the same ideas (set bgp-path-prepend, set bgp-communities, set bgp-large-communities); check the manual for the exact syntax on your version.
ictNetworks scenario
ictNetworks offers business customers BGP multihoming. Its customer communities (published on its website) are large communities: 65550:0:80 sets local preference 80 inside ictNetworks (backup link), 65550:1:<asn> prepends once towards that peer, and 65550:666:0 triggers blackholing for /128s inside the customer's own space. Standard communities 64496:x and 64497:x are documented by the two transit providers for ictNetworks' own use.
Drawing diagram…
Worked examples
Example 1: The two halves
2001:db8:3000::/44 splits into 2001:db8:3000::/45 (third group 3000 to 3007) and 2001:db8:3008::/45 (3008 to 300f). Site 1 to 3's /48s (3001 to 3003) are in the first half.
Example 2: Encoding a community
64496:80 is 64496 × 65536 + 80 = 4,226,809,936 as a 32-bit number. NO_EXPORT, 0xFFFFFF01, is 4,294,967,041, which some tools display as 65535:65281.
Example 3: Prepending as seen from outside
The enterprise announces 2001:db8:3000::/45 to ISP-B with two extra copies of its ASN. A router behind both ISPs sees the AS path 64497 64498 64498 64498 (length 4) through ISP-B and 64496 64498 (length 2) through ISP-A, so it prefers ISP-A if its local preferences are equal.
ISP-B itself, however, learns the route directly from its customer and gives customer routes a higher local preference than anything learned from peers or transit. Local preference is compared before AS-path length, so ISP-B (and ISP-B's other customers) still send that traffic over the enterprise's ISP-B link. Prepending only influences networks that have a choice at equal preference. More-specifics, or a provider community that lowers ISP-B's local preference, give a firmer split.
Lab
Goal: Dual-home an enterprise, engineer the inbound split and measure it.
You need: the L4.04 ISP-A (AS64496) and ISP-B (AS64497) border routers, an enterprise edge router e-br1 (AS64498) connected to both (2001:db8:f000:2::/127 to ISP-A and 2001:db8:f000:3::/127 to ISP-B), and an "Internet" router inet (AS64511) connected to both ISPs with two test hosts behind it. ISP-A documents community 64496:80 as "set local preference 80 in AS64496".
- Announce only the /44 to both providers with correct outbound filters. From
inetshow both paths and which one is best, and trace from a test host to2001:db8:3001::1and2001:db8:3009::1. - Make ISP-A the primary exit with local preference 120 and show it in
show bgp ipv6 unicaston e-br1. - Split inbound traffic: announce
2001:db8:3000::/45via ISP-A and2001:db8:3008::/45via ISP-B (keep the /44 to both). Show the result frominetand with traceroutes. Note the ROAs you would need (minimal ROAs, L4.05). - Replace the more-specifics with prepending only (prepend
2001:db8:3000::/44twice towards ISP-B) and show what changes atinetand on ISP-B's own router. Explain the difference. - Tag the announcement to ISP-A with 64496:80 and show the lower local preference inside ISP-A. Then shut the ISP-A link and measure failover time with a continuous ping (
ping -i 0.2).
What to submit: configurations, BGP tables from inet, ISP-A and ISP-B, traceroutes for each step, the community evidence and the failover measurement with your explanation.
Summary
- Multihome with PI space and BGP; PA multihoming without NAT (RFC 8678) needs source-dependent routing and RA-driven host behaviour.
- Outbound: local preference. Inbound: more-specifics (strongest), prepending, provider communities; MED only within one neighbour AS.
- Standard communities are 16:16 bits; large communities (RFC 8092) are 32:32:32 and fit 4-byte ASNs.
- Know NO_EXPORT, NO_ADVERTISE, GRACEFUL_SHUTDOWN (65535:0) and BLACKHOLE (65535:666).
- Every more-specific needs a ROA and adds to the global table: de-aggregate only on purpose.
- Next lesson (L4.07): first-hop redundancy.
Quiz imported · 9 questions · pass mark 70%. Lab questions are not auto-marked.