{{distinguish|Source routing}}

'''Source-specific routing''',<ref>{{cite conference|author=Matthieu Boutier|author2=Juliusz Chroboczek|title=Source-specific routing|work=Proc. IFIP Networking 2015|date=2015|arxiv=1403.0445|bibcode=2014arXiv1403.0445B}}</ref> also called '''source-address dependent routing''' ('''SADR'''),<ref>{{cite web | last1=Trøan | first1=Ole | last2=Colitti | first2=Lorenzo | url=https://tools.ietf.org/html/draft-troan-homenet-sadr-01 | title=Draft-troan-homenet-sadr-01 | date=4 September 2013 }}</ref> is a [[routing]] technique in which a routing decision is made by looking at the source address of a [[Network packet|packet]] in addition to its destination address. The main application of source-specific routing is to allow a cheap form of [[multihoming]] without the need for provider-independent addresses or any cooperation from upstream ISPs.

== The problem ==

[[File:Multihoming-incorrect-source.svg|thumb|Incorrect source when multihoming]]

In traditional ''next-hop routing'', a packet is routed according to its destination only, towards the closest router that announces a route that matches that destination. Consider a [[Multihoming|multihomed]] end-user network connected to two ISPs, BT&T and PacketCast; such a network will typically have two ''edge routers'', each of which is connected to one ISP.

Both edge routers announce a default route, meaning that they are willing to accept packets destined for the Internet. If a packet with a source in BT&T's network is routed through PacketCast's edge router, PacketCast will assume it is a [[IP address spoofing|spoofed packet]], and drop it in accordance to BCP 38.<ref>{{IETF RFC|2827}}</ref>

== Multihoming with source-specific routing ==

With source-specific routing, each edge router announces a ''source-specific default route'': a route that applies to packets destined to the Internet but only if their source is in a given prefix. The effect is that each edge router only attracts packets that have a source address in that provider's prefix.

== Desirable host changes ==

With source-specific routing, each host interface has multiple addresses, one per provider-dependent prefix. For outgoing traffic, host software must choose the right source address. Various techniques for doing that have been suggested, at the network layer,<ref>{{IETF RFC|6724}}</ref> above the network layer (see [[Shim6]]), or by using multipath techniques at the higher layers (see [[Multipath TCP]] and Multipath [[Mosh (software)|Mosh]]<ref>{{cite arXiv|author=Matthieu Boutier|author2=Juliusz Chroboczek|title=User-space multipath UDP in Mosh|year=2015|eprint=1502.02402|class=cs.NI}}</ref>).

== Support in routing protocols ==

On a network with a single edge router, it is possible to implement source-specific routing by manual manipulation of routing tables.<ref> http://www.lartc.org/, Section 4.2</ref> With multiple routers, explicit support for source-specific routing is required in the routing protocol.

As of early 2016, there are two routing protocols that implement support for source-specific routing: * The [[Babel (protocol)|Babel routing protocol]] has support for source-specific routing for both IPv4 and IPv6;<ref>{{IETF RFC|9079}}</ref> this is implemented for IPv6 in ''babeld'' and in [[Bird_Internet_routing_daemon|BIRD]] (earlier versions of ''babeld'' supported source-specific routing for IPv4<ref>{{cite web | url=https://alioth-lists.debian.net/pipermail/babel-users/2021-April/003818.html | title=&#91;Babel-users&#93; ANNOUNCE: Babeld-1.10 | date=25 April 2021 }}</ref>); * There exists an implementation of [[IS-IS]] with support for source-specific routing for IPv6 only.<ref>{{cite web | last1=Baker | first1=Fred | last2=Lamparter | first2=David | url=https://tools.ietf.org/html/draft-baker-ipv6-isis-dst-src-routing-07 | title=Draft-baker-ipv6-isis-DST-SRC-routing-07 | date=18 July 2017 }}</ref>

The IETF Homenet protocol suite requires support for source-specific routing in its routing protocol.<ref>{{IETF RFC|7368}}, Section 3.2.4</ref>

== References ==

{{Reflist}}

[[Category:Routing]] [[Category:Multihoming]]