In Contrail networking, when troubleshooting routing issues on a compute node peer with gateway router indirectly via controller, you will see different "route types". For example, route type "BGP", "XMPP", "Local", "ServiceChain" and etc. Route type provides basic information about where the route is learned from.
This article will explain what is a "ServiceChain" type of route is and how it is generated.
There is an In-network-nat service chaining setup with 2 port-tuples configured. With this setup, there are 2 routing instances (RI), among others: left RI and right RI. These are the basic parameters in use.
The goal is to examine the route leak behavior and identify the type of routes after it is leaked from right RI to left RI.
Right VMI route in right RI
First,check one of the VMI routes in the right RI:
default-domain:pings:tenant-pings-net2:tenant-pings-net2.inet.0: 3 destinations, 8 routes (4 primary, 4 secondary, 0 infeasible) 20.20.20.3/32, age: 1:37:16.994209, last_modified: 2020-Jun-05 16:26:53.952806 <--- [XMPP|bcomp79] age: 1:37:16.997907, localpref: 100, nh: 172.18.79.79, encap: ['gre', 'udp'], label: 20, AS path: None [BGP|172.18.101.103] age: 1:37:16.995901, localpref: 100, nh: 172.18.79.79, encap: ['gre', 'udp'], label: 20, AS path: None
So this VMI route is learned:
Right VMI route in left RI
With service chain, route leak will happen between the left and right routing instance. With the `in-network-nat` type of service chain, routes in right RI will leak to left RI by default, but not vice versa. For the same right VMI route, it will also show up in the left RI:
default-domain:pings:tenent-pings-net:tenent-pings-net.inet.0: 6 destinations, 20 routes (4 primary, 16 secondary, 0 infeasible) 20.20.20.3/32, age: 0:40:59.492165, last_modified: 2020-Jun-05 16:31:53.792869 [ServiceChain|None] age: 0:40:59.493650, localpref: 200, nh: 172.18.79.79, encap: ['gre', 'udp'], label: 31, AS path: None <--- [ServiceChain|None] age: 0:40:59.493873, localpref: 200, nh: 172.18.102.80, encap: ['gre', 'udp'], label: 39, AS path: None <--- [BGP|172.18.101.103] age: 0:40:59.492535, localpref: 200, nh: 172.18.79.79, encap: ['gre', 'udp'], label: 31, AS path: None [BGP|172.18.101.103] age: 0:40:59.492654, localpref: 200, nh: 172.18.102.80, encap: ['gre', 'udp'], label: 39, AS path: None
Here are the highlights of this route: