Traffic Class Routing Protocol in Home NetworksTsinghua UniversityDepartment of Computer Science, Tsinghua UniversityBeijing100084P.R. China+86-10-6278-5822xmw@csnet1.cs.tsinghua.edu.cnTsinghua UniversityDepartment of Computer Science, Tsinghua UniversityBeijing100084P.R. China+86-10-6278-5822yangshu@csnet1.cs.tsinghua.edu.cnTsinghua University
Department of Computer Science, Tsinghua University
Beijing100084P.R. China+86-10-6278-5983jianping@cernet.edu.cnCisco SystemsSanta Barbara, California93117USAfred@cisco.comHome IT staff is generally unfamiliar with network operations, making it desirable to provide a configuration-free mode of operation. Policy-based routing (in the sense of configuring one router to redirect traffic to another based on access control) and multi-topology routing both require configuration, making them undesirable.
In this document, we propose a configuration-free mechanism, in which packets will be routed towards
the corresponding upstream ISPs based on both destination and source addresses.
Home networks are growing both in device count and in complexity. Today they generally contain both wired and wireless components, and may require routing to place audio/visual entertainment traffic one one path, office services on another, and wireless LANs (both IEEE-style and 4G/LTE-style) on a third. Traditionally, we have simplified networks using a single exit router and a default route. Today, we might have multiple routers to wired upstream networks, and by separate paths LTE services, "Smart Grid" services, or health network services. Increasingly, such networks are multihomed, and multihomed using diverse access network technologies.Traditionally, routing protocols make routing decisions solely based on destination IP addresses, packets towards
the same destination will be delivered to the same next hop no matter where they come from. These protocols work well with simple
home networks that have only one egress router. However, in the multi-homing scenario, packets may be dropped if forwarded
only based on destination addresses . Although many patch-like solutions, like policy-based routing (PBR), multi-topology routing (MTR) and layer-3 VPN can solve the problem, they complex the configurations in home networks, and are not suitable for home IT staffs. We need a configuration-free solution to help operators set up their home networks in the multi-homing scenario.In this document, we propose a configuration-free mechanism - traffic class routing, based on OSPFv3, such that home networks can route packets towards the corresponding upstream ISPs, according to both destination and source addresses.Terminology used in this document:Traffic Class (TC): Identified by (destination prefix, source prefix), all packets falling in the domain belong to the traffic
class.TC-Route: Identified by (destination prefix, source prefix, value), where value is the administrative value applied to the
traffic class (destination prefix, source prefix). TC-LSA: Link state advertisement that communicates the reachability for a traffic classes.
In a home network, traditionally, egress routers obtain delegated prefixes from upstream ISPs using DHCPv6 with prefix options . The egress routers will then assign longer sub-prefixes to the other links in the home network. Each router inside the home network will act as standard OSPFv3 router, and forward packets based on their destination addresses.
With traffic class routing, after obtaining delegated prefixes and assigning sub-prefixes, egress routers will populate traffic classes (with extended LSAs), rather than destination address only, into the home network. Each router inside the home network will flood these traffic classes information. When calculating the path towards a destination address, routers will take the traffic classes into considerations. Intrinsically, in traditional routing model, the object being routed to is a destination prefix; in our routing model, the object being routed might be a destination prefix given that the packet sports a certain source prefix.
Each traffic class is associated with a cost, which is a single dimensionless metric.
For example, a site is connected to the Internet through two ISPs, ISP1 and ISP2. ISP1 delegates prefix P1 to the site, and ISP2 delegates prefix P2 to the site. After being delegated with P1, the egress router E1 of the site will advertise a traffic class - {::/0, P1}, into the site. After being delegated with P2, the egress router E2 of the site will advertise a traffic class - {::/0, P2}, into the site. Receiving these advertisements, interior router I1 will compute two paths towards ::/0, one through router E1 for traffic from P1, the other through E2 for traffic from P2.
All routers behave like traditional OSPFv3 routers, however, the following behaviors are different with traditional OSPFv3 routers.
After obtaining delegated prefixes using DHCPv6 with prefix options, an egress router should originate TC-LSAs, i.e., extended LSAs with source prefixes appended. Egress routers then will advertise these TC-LSAs into the home network.
Note that an egress router behaves like an interior router if it receives a TC-LSA from other egress routers.
Receiving TC-LSAs from egress routers, an interior router should store the TC-LSAs into its LSDB, and flood it to other routers.
After calculating a path to an egress router advertising reachability, i.e., a destination prefix, the interior router should
decide which traffic class can follow this path towards the egress router. If a traffic class can travel through two different paths,
then interior router should compare their costs, and select the path with the lowest cost.
Interior routers contains a routing table that contains all necessary information to forward an IP packet following
the path of a traffic class. After computing the path towards a traffic class, interior routers should update the entry
in the routing table if necessary, e.g., change the next hop towards the traffic class. The routing table structure
will be described in Section 6. Calculation of routing table will be illustrated in Section 7.
At last, interior routers should update the Forwarding Information Base (FIB), which will be discussed in the next version of this document.
TC-LSA adds TLV extensions, which contains source prefix information, based on original OSPFv3 LSA. We follow the TLV format
in and extended LSA format in .
Each extended LSA includes the traditional LSA part in , and one or more TLVs defined in . But we do not need all LSAs to be extended, the LSAs need
to be extended are as follows: Intra-Area-Prefix-LSA: The extended LSA has type 0xA029.
The extended LSA format for Intra-Area-Prefix-LSA in multi-homing is as follows:
All LSA header fields are the same as defined in , except the following:
LSA type: The LSA type value is 0xA029, according to ; LSA length: The length of the whole LSA header, including the TLVs; TLV type: The type of IPv6 source prefix TLV, assigned by IANA; TLV length: The value is 20 as defined in ; SPrefixLength, SPrefixOptions, Source Address Prefix: Representation of the IPv6 address prefix, which is delegated from the upstream ISP providers;
For simplicity, each extended LSA should only carry one source prefix, suppose there are n destination prefix d1, d2, ..., dn,
and the source prefix is s, then the LSA
carries n TC-route announcement, (d1, s, v1), (d1, s, v2), ..., (dn, s, vn),
where vi is the metric associated with destination prefix di.
For traditional routing, the routing table structure contains all needed information to forward IP
packets to the right destination. For example, destination prefixes are commonly structured into a prefix trie,
where each trie nodes contain the necessary information. Routers can lookup and
update the prefix trie.
With traffic classes, the routing table structure must contain all needed information to forward IP
packets following the right traffic class, i.e., towards the related destination and from the related
source. For each routing table entry, there are two additional fields other than the fields mentioned
in :
Source IP Address: The IP address of the source in traffic class. Source Address Mask: If the source is a subnet, then it is referred to as the subnet mask.The routing table must provide interface for update and lookup in it. For example, traffic classes
can be structured into a two dimensional (or two level) trie, where each trie node in the first dimension
points to a sub-trie in the second dimension. The trie nodes in the second dimension contain the necessary
information to forward IP packets following the right traffic class.
The fundamental algorithm in OSPFv3 doesn't change. The algorithm uses the SPF approach to
calculate a path to the router advertising reachability, and then uses the reachability advertisement
to decide what traffic should follow that route. What we are changing is the reachability advertisement,
in traiditional OSPFv3, the advertisements, which is one or several kinds of LSAs, represent destination prefixes;
in this document, the advertisements, which is one or several kinds of TC-LSAs, represent traffic classes.
Note that we do not have to change router-LSA and network-LSA in . Thus, the first stage of
Section 4.8.1 in remains the same in this document. However, the second stage of Section 4.8.1 in
should change by a little bit. Instead of examining the list of the intra-area-prefix-LSAs,
the list of extended intra-area-prefix-LSAs is examined. The cost of any advertised traffic class is the sum
of the class' advertised metric plus the cost of the transit vertex (either router or transit network) indentified
by extended intra-area-prefix-LSAs' referenced LS type, referenced link state ID, and referenced advertising
router field.
We also adopt the LMF (longest match first) rule when a packet matches multiple routing entries. However, traffic class has
two dimensions, there might exist ambiguity. For example, if there exists two routing entries, (d1, s1, nexthop1), (d2, s2,
nexthop2), where d1 is longer than d2 and s2 is longer than s1, then none entry is longer than the other in both dimensions.
In this situation, we must insert an additional entry into the routing table, e.g., (d1, s2, nexthop1) in the above
example. The entry directs to nexthop1 rather than nexthop2, because we must guarantee reachability according to
the destination prefix.
As the format of routing table entries changes from (destination
prefix, nexthop) to (destination prefix, source prefix, nexthop),
The Forwarding Information Base (FIB), based on which routers forward IP
packets, should be redesigned. There can be different possible FIB
structures, we use a trie-based solution in this document.
In traditional routing, the
destination prefixes are constructed using a prefix trie.
However, in traffic class routing, the forwarding decision is based on
both the destination and source prefixes. To store them, we
design a new structure, based on partricia-trie to meet
the needs.
In traffic class routing, the router forwards IP packets following the right
traffic class based on destination and
source prefixes. Routers construct a two dimensional (or two level)
partricia-trie, where each trie node in the first dimension points
to a sub-trie (the sub-trie can be empty).
When a packet arrives, the packet should match a trie node (destination prefix) in the
first dimension using the destination address. Following the
sub-trie under the node, the packet should match another trie node (source prefix)
in the second dimension, i.e., the sub-trie.
To implement the FIB structure, we modified Click, which is a
modular software router. The FIB
structure could support lookup and update.
When the routing table changes, routers can update the FIB through
pre-defined interfaces.
Routers can also announce the traditional destination-based LSAs at the same time. In this case, we have two choices.
In the first choice, we treat the destination-based LSAs as TC-LSAs where the source prefix equal the wildcard.
In the second choice, routers have to keep two
routing tables, one for destination prefix only, and the other for traffic classes. When a packet arrives, routers first
lookup in the routing table storing traffic classes; If none entry matches, then routers lookup in the routing table storing
destination prefixes.
The newly LSA types and TLVs should be assigned by IANA, please refer to and .
Zheng Liu and Gautier Bayzelon provided useful input into this document.