# T-Move: A Light-Weight Protocol for Improved QoS in Content-Centric Networks with Producer Mobility
## 4 T-Move
### Mobility Support in T-Move
#### 4.2.2 Behavior of Edge Routers  
When the location of the data object changes, the FIB entries of edge and upstream routers may need to change to route interests properly. Interests for a data object may be routed to the producer or a router that has a cached copy. This is achieved by viewing the path to a producer as two sub-paths--one from the consumer to the edge router and the other from the edge router to the producer. To forward interests from the edge router to the producer, the edge routers behave optimistically. If a router (e.g., R1 and R2 in Figure 2) sends a REPT, it is on the path to the producer, though temporarily. It adds the face on which the \(GETT\) was received to its FIB for this data object. This results in FIB entries to the producer's data at both the old and new edge routers. To facilitate interest forwarding on the first part of the path (from the consumer to the edge router), FIB update messages are sent from downstream to upstream routers to inform them of changes to be made in the FIB. Two types of FIB updates are possible--those requesting deletion of FIB entries and those requesting addition of FIB entries. Figure 2: FIB updates to common upstream router (Case 1). A router that receives a \(GETT\) message from a producer is connected to the producer. It calculates the longest prefix match string (\(x\)/\(y\)/ in the example) between the new data object in the \(GETT\) message and those in its cache and sends a FIB_Add update with this string to its upstream router (R3 in Figure 2). This makes it possible for future interests to be routed to both R1, which is on the path to the producer before movement and R2, which on the path after movement. The functioning of an edge router upon receiving a \(GETT\) message is described in Algorithm 2. Please note that only one of the edge routers is the new edge router connected to the producer and one of them has cached data as it is the favored edge router. ```
1:/*Run by an edge router upon receiving a \(GETT\) packet*/
2:/*\(TT\) is trendiness table, \(FIB\) is the Forwarding Information Base and \(CS\) is the content store of the router; \(D\) is the set of data objects received in the \(GETT(D)\) packet*/
3:for each data object \(d_{i}\) in \(D\)do
4:if\(d_{i}\) is not in \(CS\)then
5: /*\(d_{i}\) is not already cached at the router*/
6: Set trendiness value of \(d_{i}\) from \(TT\) in \(REPT(D)\)
7:endif
8:endfor
9: Send \(REPTD\) if there is at least one \(d_{i}\) is not cached
10:for each data object \(d_{i}\) in \(D\)do
11: /*Cache \(d_{i}\) if possible, send FIB updates to upstream routers*/
12:if data object \(d_{i}\) is received within \(\gamma\) seconds then
13: Add \(d_{i}\) to \(CS\)
14:endif
15: Determine string \(s_{i}\) from FIB with longest prefix-matching with \(d_{i}\)
16: Send \(FIB\_Add(s_{i})\) packet to upstream router \(R_{u}\)
17:endfor
18:/*Data objects are cached at favored routers, FIB entries made at edge routers and FIB updates sent upstream*/
```  
**Algorithm 2** Cache_trendy_data(\(TT\),\(FIB\),\(D\),\(CS\))  
Two cases arise depending on the location of caching and the producer:  
* the favored router is the producer's new edge router. This is on-path caching, as caching is done on the path to the location of the producer. * the favored router is not the producer's new edge router. This results in _off-path caching_. We discuss these two cases in detail below, keeping in mind that interests for a data object may be satisfied by the producer or a router that has the cached copy. * _On-path Caching_: If the favored router is the producer's new edge router, FIB_Add updates are enough to route the Interests to the new edge router. If the edge router has a copy of the data requested, it returns the copy. If this copy is no longer in its cache, it forwards the interest to the producer based on its FIB entries. Anyway, interests are routed to the data. * _Off-path Caching_: While the producer always has the data, a router that has a cached copy may evict the copy from its cache in due course of time.