]> git.puffer.fish Git - matthieu/frr.git/commitdiff
isisd: Stop fulfill MPLS table when SR is disabled
authorOlivier Dugeon <olivier.dugeon@orange.com>
Fri, 8 Apr 2022 15:10:25 +0000 (17:10 +0200)
committerOlivier Dugeon <olivier.dugeon@orange.com>
Wed, 25 May 2022 15:29:21 +0000 (17:29 +0200)
When Segment Routing is disabled, if isisd received LSP with Segment Routing
information, in particular prefix SIDs, it installs corresponding MPLS entries
while it should not as SR is disabled.

This patch adds extra control to verify if SR is enabled or not before
configuring MPLS LFIB & IP FIB with prefix SIDs and adjust SR & TI-LFA
tests accordingly.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
isisd/isis_spf.c
isisd/isis_sr.c
tests/topotests/isis_sr_topo1/rt6/step5/show_ip_route.ref
tests/topotests/isis_sr_topo1/rt6/step5/show_ipv6_route.ref
tests/topotests/isis_sr_topo1/rt6/step5/show_mpls_table.ref
tests/topotests/isis_tilfa_topo1/rt4/step4/show_ip_route.ref.diff
tests/topotests/isis_tilfa_topo1/rt4/step4/show_ipv6_route.ref.diff
tests/topotests/isis_tilfa_topo1/rt4/step4/show_mpls_table.ref.diff
tests/topotests/isis_tilfa_topo1/rt4/step5/show_ip_route.ref.diff
tests/topotests/isis_tilfa_topo1/rt4/step5/show_ipv6_route.ref.diff
tests/topotests/isis_tilfa_topo1/rt4/step5/show_mpls_table.ref.diff

index 49c62d2cf55ffb5d82a5f1b280b858bf5943659d..09f92554c020bd7090d3715e0d24ba4cf46184bf 100644 (file)
@@ -273,7 +273,7 @@ isis_vertex_adj_add(struct isis_spftree *spftree, struct isis_vertex *vertex,
 
        vadj = XCALLOC(MTYPE_ISIS_VERTEX_ADJ, sizeof(*vadj));
        vadj->sadj = sadj;
-       if (psid) {
+       if (spftree->area->srdb.enabled && psid) {
                if (vertex->N.ip.sr.present
                    && vertex->N.ip.sr.sid.value != psid->value)
                        zlog_warn(
@@ -575,7 +575,7 @@ isis_spf_add2tent(struct isis_spftree *spftree, enum vertextype vtype, void *id,
        vertex = isis_vertex_new(spftree, id, vtype);
        vertex->d_N = cost;
        vertex->depth = depth;
-       if (VTYPE_IP(vtype) && psid) {
+       if (VTYPE_IP(vtype) && spftree->area->srdb.enabled && psid) {
                struct isis_area *area = spftree->area;
                struct isis_vertex *vertex_psid;
 
@@ -975,9 +975,9 @@ lspfragloop:
                        ip_info.dest.u.prefix4 = r->prefix.prefix;
                        ip_info.dest.prefixlen = r->prefix.prefixlen;
 
-                       /* Parse list of Prefix-SID subTLVs */
+                       /* Parse list of Prefix-SID subTLVs if SR is enabled */
                        has_valid_psid = false;
-                       if (r->subtlvs) {
+                       if (spftree->area->srdb.enabled && r->subtlvs) {
                                for (struct isis_item *i =
                                             r->subtlvs->prefix_sids.head;
                                     i; i = i->next) {
@@ -1026,9 +1026,9 @@ lspfragloop:
                        ip_info.dest.u.prefix6 = r->prefix.prefix;
                        ip_info.dest.prefixlen = r->prefix.prefixlen;
 
-                       if (r->subtlvs
-                           && r->subtlvs->source_prefix
-                           && r->subtlvs->source_prefix->prefixlen) {
+                       if (spftree->area->srdb.enabled && r->subtlvs &&
+                           r->subtlvs->source_prefix &&
+                           r->subtlvs->source_prefix->prefixlen) {
                                if (spftree->tree_id != SPFTREE_DSTSRC) {
                                        char buff[VID2STR_BUFFER];
                                        zlog_warn("Ignoring dest-src route %s in non dest-src topology",
@@ -1169,8 +1169,8 @@ static int isis_spf_preload_tent_ip_reach_cb(const struct prefix *prefix,
        else
                vtype = VTYPE_IP6REACH_INTERNAL;
 
-       /* Parse list of Prefix-SID subTLVs */
-       if (subtlvs) {
+       /* Parse list of Prefix-SID subTLVs if SR is enabled */
+       if (spftree->area->srdb.enabled && subtlvs) {
                for (struct isis_item *i = subtlvs->prefix_sids.head; i;
                     i = i->next) {
                        struct isis_prefix_sid *psid =
index 91886cbc3757bbfa1603d49b31bf2d47ae63cbdc..107fa71d71ebb0caf990f2fafef21188c827c784 100644 (file)
@@ -1070,7 +1070,10 @@ DEFUN(show_sr_node, show_sr_node_cmd,
                for (ALL_LIST_ELEMENTS_RO(isis->area_list, node, area)) {
                        vty_out(vty, "Area %s:\n",
                                area->area_tag ? area->area_tag : "null");
-
+                       if (!area->srdb.enabled) {
+                               vty_out(vty, " Segment Routing is disabled\n");
+                               continue;
+                       }
                        for (int level = ISIS_LEVEL1; level <= ISIS_LEVELS;
                             level++)
                                show_node(vty, area, level);
index 4b204dbc4c1025459d32f287060f9d2276aacd0b..3ccd57a6fd4843460a4ff54ca61e10ebc072feb0 100644 (file)
           "ip":"10.0.7.4",
           "afi":"ipv4",
           "interfaceName":"eth-rt4",
-          "active":true,
-          "labels":[
-            16010
-          ]
+          "active":true
         },
         {
           "fib":true,
           "ip":"10.0.8.5",
           "afi":"ipv4",
           "interfaceName":"eth-rt5",
-          "active":true,
-          "labels":[
-            16010
-          ]
+          "active":true
         }
       ]
     }
           "ip":"10.0.7.4",
           "afi":"ipv4",
           "interfaceName":"eth-rt4",
-          "active":true,
-          "labels":[
-            16020
-          ]
+          "active":true
         }
       ]
     }
           "ip":"10.0.8.5",
           "afi":"ipv4",
           "interfaceName":"eth-rt5",
-          "active":true,
-          "labels":[
-            16030
-          ]
+          "active":true
         }
       ]
     }
           "ip":"10.0.7.4",
           "afi":"ipv4",
           "interfaceName":"eth-rt4",
-          "active":true,
-          "labels":[
-            16040
-          ]
+          "active":true
         }
       ]
     }
           "ip":"10.0.8.5",
           "afi":"ipv4",
           "interfaceName":"eth-rt5",
-          "active":true,
-          "labels":[
-            16050
-          ]
+          "active":true
         }
       ]
     }
           "ip":"10.0.7.4",
           "afi":"ipv4",
           "interfaceName":"eth-rt4",
-          "active":true,
-          "labels":[
-            16100
-          ]
+          "active":true
         },
         {
           "fib":true,
           "ip":"10.0.8.5",
           "afi":"ipv4",
           "interfaceName":"eth-rt5",
-          "active":true,
-          "labels":[
-            16100
-          ]
+          "active":true
         }
       ]
     }
index 834cdfe6cac5523ffb00cc8b18a9841710d13e88..22d3f2a24661aed7491ca9f066244f6a2999d1f5 100644 (file)
           "fib":true,
           "afi":"ipv6",
           "interfaceName":"eth-rt4",
-          "active":true,
-          "labels":[
-            16011
-          ]
+          "active":true
         },
         {
           "fib":true,
           "afi":"ipv6",
           "interfaceName":"eth-rt5",
-          "active":true,
-          "labels":[
-            16011
-          ]
+          "active":true
         }
       ]
     }
           "fib":true,
           "afi":"ipv6",
           "interfaceName":"eth-rt4",
-          "active":true,
-          "labels":[
-            16021
-          ]
+          "active":true
         }
       ]
     }
           "fib":true,
           "afi":"ipv6",
           "interfaceName":"eth-rt5",
-          "active":true,
-          "labels":[
-            16031
-          ]
+          "active":true
         }
       ]
     }
           "fib":true,
           "afi":"ipv6",
           "interfaceName":"eth-rt4",
-          "active":true,
-          "labels":[
-            16041
-          ]
+          "active":true
         }
       ]
     }
           "fib":true,
           "afi":"ipv6",
           "interfaceName":"eth-rt5",
-          "active":true,
-          "labels":[
-            16051
-          ]
+          "active":true
         }
       ]
     }
           "fib":true,
           "afi":"ipv6",
           "interfaceName":"eth-rt4",
-          "active":true,
-          "labels":[
-            16101
-          ]
+          "active":true
         },
         {
           "fib":true,
           "afi":"ipv6",
           "interfaceName":"eth-rt5",
-          "active":true,
-          "labels":[
-            16101
-          ]
+          "active":true
         }
       ]
     }
index be87ed90a0d2b27cd3617a44f8663bfd8f041740..2c63c0851048d8f7bff41ecf0f8cee05f52fd120 100644 (file)
@@ -1,170 +1,2 @@
 {
-  "18010":{
-    "inLabel":18010,
-    "installed":true,
-    "nexthops":[
-      {
-        "type":"SR (IS-IS)",
-        "outLabel":16010,
-        "installed":true,
-        "nexthop":"10.0.8.5"
-      },
-      {
-        "type":"SR (IS-IS)",
-        "outLabel":16010,
-        "installed":true,
-        "nexthop":"10.0.7.4"
-      }
-    ]
-  },
-  "18011":{
-    "inLabel":18011,
-    "installed":true,
-    "nexthops":[
-      {
-        "type":"SR (IS-IS)",
-        "outLabel":16011,
-        "installed":true,
-        "interface":"eth-rt5"
-      },
-      {
-        "type":"SR (IS-IS)",
-        "outLabel":16011,
-        "installed":true,
-        "interface":"eth-rt4"
-      }
-    ]
-  },
-  "18020":{
-    "inLabel":18020,
-    "installed":true,
-    "nexthops":[
-      {
-        "type":"SR (IS-IS)",
-        "outLabel":16020,
-        "installed":true,
-        "nexthop":"10.0.7.4"
-      }
-    ]
-  },
-  "18021":{
-    "inLabel":18021,
-    "installed":true,
-    "nexthops":[
-      {
-        "type":"SR (IS-IS)",
-        "outLabel":16021,
-        "installed":true,
-        "interface":"eth-rt4"
-      }
-    ]
-  },
-  "18030":{
-    "inLabel":18030,
-    "installed":true,
-    "nexthops":[
-      {
-        "type":"SR (IS-IS)",
-        "outLabel":16030,
-        "installed":true,
-        "nexthop":"10.0.8.5"
-      }
-    ]
-  },
-  "18031":{
-    "inLabel":18031,
-    "installed":true,
-    "nexthops":[
-      {
-        "type":"SR (IS-IS)",
-        "outLabel":16031,
-        "installed":true,
-        "interface":"eth-rt5"
-      }
-    ]
-  },
-  "18040":{
-    "inLabel":18040,
-    "installed":true,
-    "nexthops":[
-      {
-        "type":"SR (IS-IS)",
-        "outLabel":16040,
-        "installed":true,
-        "nexthop":"10.0.7.4"
-      }
-    ]
-  },
-  "18041":{
-    "inLabel":18041,
-    "installed":true,
-    "nexthops":[
-      {
-        "type":"SR (IS-IS)",
-        "outLabel":16041,
-        "installed":true,
-        "interface":"eth-rt4"
-      }
-    ]
-  },
-  "18050":{
-    "inLabel":18050,
-    "installed":true,
-    "nexthops":[
-      {
-        "type":"SR (IS-IS)",
-        "outLabel":16050,
-        "installed":true,
-        "nexthop":"10.0.8.5"
-      }
-    ]
-  },
-  "18051":{
-    "inLabel":18051,
-    "installed":true,
-    "nexthops":[
-      {
-        "type":"SR (IS-IS)",
-        "outLabel":16051,
-        "installed":true,
-        "interface":"eth-rt5"
-      }
-    ]
-  },
-  "18100":{
-    "inLabel":18100,
-    "installed":true,
-    "nexthops":[
-      {
-        "type":"SR (IS-IS)",
-        "outLabel":16100,
-        "installed":true,
-        "nexthop":"10.0.8.5"
-      },
-      {
-        "type":"SR (IS-IS)",
-        "outLabel":16100,
-        "installed":true,
-        "nexthop":"10.0.7.4"
-      }
-    ]
-  },
-  "18101":{
-    "inLabel":18101,
-    "installed":true,
-    "nexthops":[
-      {
-        "type":"SR (IS-IS)",
-        "outLabel":16101,
-        "installed":true,
-        "interface":"eth-rt5"
-      },
-      {
-        "type":"SR (IS-IS)",
-        "outLabel":16101,
-        "installed":true,
-        "interface":"eth-rt4"
-      }
-    ]
-  }
 }
index 8b115c2058044b948d2afd868a9a6dacdeb62083..a9418473c75c7e9fd07e7eb6fe41302a09855bc3 100644 (file)
@@ -1,19 +1,24 @@
 --- a/rt4/step3/show_ip_route.ref
 +++ b/rt4/step4/show_ip_route.ref
-@@ -15,9 +15,6 @@
+@@ -14,37 +14,14 @@
+           "ip":"10.0.2.2",
            "afi":"ipv4",
            "interfaceName":"eth-rt2-1",
-           "active":true,
+-          "active":true,
 -          "backupIndex":[
 -            0
 -          ],
-           "labels":[
-             16010
-           ]
-@@ -28,20 +25,6 @@
+-          "labels":[
+-            16010
+-          ]
++          "active":true
+         },
+         {
+           "fib":true,
+           "ip":"10.0.3.2",
            "afi":"ipv4",
            "interfaceName":"eth-rt2-2",
-           "active":true,
+-          "active":true,
 -          "backupIndex":[
 -            0
 -          ],
 -          "afi":"ipv4",
 -          "interfaceName":"eth-rt5",
 -          "active":true,
-           "labels":[
-             16010
-           ]
-@@ -65,9 +48,6 @@
+-          "labels":[
+-            16010
+-          ]
++          "active":true
+         }
+       ]
+     }
+@@ -64,38 +41,14 @@
+           "ip":"10.0.2.2",
            "afi":"ipv4",
            "interfaceName":"eth-rt2-1",
-           "active":true,
+-          "active":true,
 -          "backupIndex":[
 -            0
 -          ],
-           "labels":[
-             3
-           ]
-@@ -78,25 +58,10 @@
+-          "labels":[
+-            3
+-          ]
++          "active":true
+         },
+         {
+           "fib":true,
+           "ip":"10.0.3.2",
            "afi":"ipv4",
            "interfaceName":"eth-rt2-2",
-           "active":true,
+-          "active":true,
 -          "backupIndex":[
 -            0
 -          ],
-           "labels":[
-             3
-           ]
-         }
+-          "labels":[
+-            3
+-          ]
+-        }
 -      ],
 -      "backupNexthops":[
 -        {
 -            16030,
 -            16020
 -          ]
--        }
++          "active":true
+         }
+       ]
+     }
+@@ -115,30 +68,21 @@
+           "ip":"10.0.2.2",
+           "afi":"ipv4",
+           "interfaceName":"eth-rt2-1",
+-          "active":true,
+-          "labels":[
+-            16030
+-          ]
++          "active":true
+         },
+         {
+           "fib":true,
+           "ip":"10.0.3.2",
+           "afi":"ipv4",
+           "interfaceName":"eth-rt2-2",
+-          "active":true,
+-          "labels":[
+-            16030
+-          ]
++          "active":true
+         },
+         {
+           "fib":true,
+           "ip":"10.0.6.5",
+           "afi":"ipv4",
+           "interfaceName":"eth-rt5",
+-          "active":true,
+-          "labels":[
+-            16030
+-          ]
++          "active":true
+         }
        ]
      }
-   ],
-@@ -159,24 +124,10 @@
+@@ -158,24 +102,7 @@
+           "ip":"10.0.6.5",
            "afi":"ipv4",
            "interfaceName":"eth-rt5",
-           "active":true,
+-          "active":true,
 -          "backupIndex":[
 -            0
 -          ],
-           "labels":[
-             3
-           ]
-         }
+-          "labels":[
+-            3
+-          ]
+-        }
 -      ],
 -      "backupNexthops":[
 -        {
 -          "labels":[
 -            16050
 -          ]
--        }
++          "active":true
+         }
        ]
      }
-   ],
-@@ -196,24 +147,10 @@
+@@ -195,24 +122,7 @@
+           "ip":"10.0.7.6",
            "afi":"ipv4",
            "interfaceName":"eth-rt6",
-           "active":true,
+-          "active":true,
 -          "backupIndex":[
 -            0
 -          ],
-           "labels":[
-             3
-           ]
-         }
+-          "labels":[
+-            3
+-          ]
+-        }
 -      ],
 -      "backupNexthops":[
 -        {
 -          "labels":[
 -            16060
 -          ]
--        }
++          "active":true
+         }
        ]
      }
-   ],
-@@ -232,27 +169,13 @@
+@@ -232,27 +142,13 @@
            "ip":"10.0.2.2",
            "afi":"ipv4",
            "interfaceName":"eth-rt2-1",
            "active":true
          }
        ]
-@@ -268,30 +191,13 @@
+@@ -268,30 +164,13 @@
          {
            "ip":"10.0.2.2",
            "afi":"ipv4",
          }
        ]
      }
-@@ -307,29 +213,12 @@
+@@ -307,29 +186,12 @@
            "ip":"10.0.2.2",
            "afi":"ipv4",
            "interfaceName":"eth-rt2-1",
          }
        ]
      }
-@@ -349,31 +238,6 @@
+@@ -349,31 +211,6 @@
            "ip":"10.0.6.5",
            "afi":"ipv4",
            "interfaceName":"eth-rt5",
            "active":true
          }
        ]
-@@ -394,31 +258,6 @@
+@@ -394,31 +231,6 @@
            "ip":"10.0.6.5",
            "afi":"ipv4",
            "interfaceName":"eth-rt5",
            "active":true
          }
        ]
-@@ -434,18 +273,7 @@
+@@ -434,18 +246,7 @@
          {
            "ip":"10.0.6.5",
            "afi":"ipv4",
          }
        ]
      }
-@@ -460,18 +288,7 @@
+@@ -460,18 +261,7 @@
          {
            "ip":"10.0.7.6",
            "afi":"ipv4",
index 7f39285089687a0c7c919e726bf48fae8c735e1b..991562ab993513ee665977a5dce0141c4a16c9e7 100644 (file)
@@ -1,19 +1,23 @@
 --- a/rt4/step3/show_ipv6_route.ref
 +++ b/rt4/step4/show_ipv6_route.ref
-@@ -14,9 +14,6 @@
+@@ -13,35 +13,13 @@
+           "fib":true,
            "afi":"ipv6",
            "interfaceName":"eth-rt2-2",
-           "active":true,
+-          "active":true,
 -          "backupIndex":[
 -            0
 -          ],
-           "labels":[
-             16011
-           ]
-@@ -26,19 +23,6 @@
+-          "labels":[
+-            16011
+-          ]
++          "active":true
+         },
+         {
+           "fib":true,
            "afi":"ipv6",
            "interfaceName":"eth-rt2-1",
-           "active":true,
+-          "active":true,
 -          "backupIndex":[
 -            0
 -          ],
 -          "afi":"ipv6",
 -          "interfaceName":"eth-rt5",
 -          "active":true,
-           "labels":[
-             16011
-           ]
-@@ -61,9 +45,6 @@
+-          "labels":[
+-            16011
+-          ]
++          "active":true
+         }
+       ]
+     }
+@@ -60,36 +38,13 @@
+           "fib":true,
            "afi":"ipv6",
            "interfaceName":"eth-rt2-2",
-           "active":true,
+-          "active":true,
 -          "backupIndex":[
 -            0
 -          ],
-           "labels":[
-             3
-           ]
-@@ -73,24 +54,10 @@
+-          "labels":[
+-            3
+-          ]
++          "active":true
+         },
+         {
+           "fib":true,
            "afi":"ipv6",
            "interfaceName":"eth-rt2-1",
-           "active":true,
+-          "active":true,
 -          "backupIndex":[
 -            0
 -          ],
-           "labels":[
-             3
-           ]
-         }
+-          "labels":[
+-            3
+-          ]
+-        }
 -      ],
 -      "backupNexthops":[
 -        {
 -            16031,
 -            16021
 -          ]
--        }
++          "active":true
+         }
        ]
      }
-   ],
-@@ -149,23 +116,10 @@
+@@ -108,28 +63,19 @@
+           "fib":true,
+           "afi":"ipv6",
+           "interfaceName":"eth-rt2-2",
+-          "active":true,
+-          "labels":[
+-            16031
+-          ]
++          "active":true
+         },
+         {
+           "fib":true,
+           "afi":"ipv6",
+           "interfaceName":"eth-rt2-1",
+-          "active":true,
+-          "labels":[
+-            16031
+-          ]
++          "active":true
+         },
+         {
+           "fib":true,
            "afi":"ipv6",
            "interfaceName":"eth-rt5",
-           "active":true,
+-          "active":true,
+-          "labels":[
+-            16031
+-          ]
++          "active":true
+         }
+       ]
+     }
+@@ -148,23 +94,7 @@
+           "fib":true,
+           "afi":"ipv6",
+           "interfaceName":"eth-rt5",
+-          "active":true,
 -          "backupIndex":[
 -            0
 -          ],
-           "labels":[
-             3
-           ]
-         }
+-          "labels":[
+-            3
+-          ]
+-        }
 -      ],
 -      "backupNexthops":[
 -        {
 -          "labels":[
 -            16051
 -          ]
--        }
++          "active":true
+         }
        ]
      }
-   ],
-@@ -184,23 +138,10 @@
+@@ -183,23 +113,7 @@
+           "fib":true,
            "afi":"ipv6",
            "interfaceName":"eth-rt6",
-           "active":true,
+-          "active":true,
 -          "backupIndex":[
 -            0
 -          ],
-           "labels":[
-             3
-           ]
-         }
+-          "labels":[
+-            3
+-          ]
+-        }
 -      ],
 -      "backupNexthops":[
 -        {
 -          "labels":[
 -            16061
 -          ]
--        }
++          "active":true
+         }
        ]
      }
-   ]
index 3dcd36c1768f7fc73c4f25e2a87348c30348a9a7..660d2fbde23f76241550f19a20437be10c215811 100644 (file)
@@ -1,19 +1,24 @@
 --- a/rt4/step3/show_mpls_table.ref
 +++ b/rt4/step4/show_mpls_table.ref
-@@ -7,26 +7,13 @@
-         "type":"SR (IS-IS)",
-         "outLabel":16010,
-         "installed":true,
+@@ -1,262 +1,2 @@
+ {
+-  "16010":{
+-    "inLabel":16010,
+-    "installed":true,
+-    "nexthops":[
+-      {
+-        "type":"SR (IS-IS)",
+-        "outLabel":16010,
+-        "installed":true,
 -        "nexthop":"10.0.3.2",
 -        "backupIndex":[
 -          0
 -        ]
-+        "nexthop":"10.0.3.2"
-       },
-       {
-         "type":"SR (IS-IS)",
-         "outLabel":16010,
-         "installed":true,
+-      },
+-      {
+-        "type":"SR (IS-IS)",
+-        "outLabel":16010,
+-        "installed":true,
 -        "nexthop":"10.0.2.2",
 -        "backupIndex":[
 -          0
 -        "type":"SR (IS-IS)",
 -        "outLabel":16010,
 -        "nexthop":"10.0.6.5"
-+        "nexthop":"10.0.2.2"
-       }
-     ]
-   },
-@@ -38,26 +25,13 @@
-         "type":"SR (IS-IS)",
-         "outLabel":16011,
-         "installed":true,
+-      }
+-    ]
+-  },
+-  "16011":{
+-    "inLabel":16011,
+-    "installed":true,
+-    "nexthops":[
+-      {
+-        "type":"SR (IS-IS)",
+-        "outLabel":16011,
+-        "installed":true,
 -        "interface":"eth-rt2-2",
 -        "backupIndex":[
 -          0
 -        ]
-+        "interface":"eth-rt2-2"
-       },
-       {
-         "type":"SR (IS-IS)",
-         "outLabel":16011,
-         "installed":true,
+-      },
+-      {
+-        "type":"SR (IS-IS)",
+-        "outLabel":16011,
+-        "installed":true,
 -        "interface":"eth-rt2-1",
 -        "backupIndex":[
 -          0
 -        "type":"SR (IS-IS)",
 -        "outLabel":16011,
 -        "interface":"eth-rt5"
-+        "interface":"eth-rt2-1"
-       }
-     ]
-   },
-@@ -69,26 +43,13 @@
-         "type":"SR (IS-IS)",
-         "outLabel":3,
-         "installed":true,
+-      }
+-    ]
+-  },
+-  "16020":{
+-    "inLabel":16020,
+-    "installed":true,
+-    "nexthops":[
+-      {
+-        "type":"SR (IS-IS)",
+-        "outLabel":3,
+-        "installed":true,
 -        "nexthop":"10.0.3.2",
 -        "backupIndex":[
 -          0
 -        ]
-+        "nexthop":"10.0.3.2"
-       },
-       {
-         "type":"SR (IS-IS)",
-         "outLabel":3,
-         "installed":true,
+-      },
+-      {
+-        "type":"SR (IS-IS)",
+-        "outLabel":3,
+-        "installed":true,
 -        "nexthop":"10.0.2.2",
 -        "backupIndex":[
 -          0
 -        "type":"SR (IS-IS)",
 -        "outLabel":16030,
 -        "nexthop":"10.0.6.5"
-+        "nexthop":"10.0.2.2"
-       }
-     ]
-   },
-@@ -100,26 +61,13 @@
-         "type":"SR (IS-IS)",
-         "outLabel":3,
-         "installed":true,
+-      }
+-    ]
+-  },
+-  "16021":{
+-    "inLabel":16021,
+-    "installed":true,
+-    "nexthops":[
+-      {
+-        "type":"SR (IS-IS)",
+-        "outLabel":3,
+-        "installed":true,
 -        "interface":"eth-rt2-2",
 -        "backupIndex":[
 -          0
 -        ]
-+        "interface":"eth-rt2-2"
-       },
-       {
-         "type":"SR (IS-IS)",
-         "outLabel":3,
-         "installed":true,
+-      },
+-      {
+-        "type":"SR (IS-IS)",
+-        "outLabel":3,
+-        "installed":true,
 -        "interface":"eth-rt2-1",
 -        "backupIndex":[
 -          0
 -        "type":"SR (IS-IS)",
 -        "outLabel":16031,
 -        "interface":"eth-rt5"
-+        "interface":"eth-rt2-1"
-       }
-     ]
-   },
-@@ -179,17 +127,7 @@
-         "type":"SR (IS-IS)",
-         "outLabel":3,
-         "installed":true,
+-      }
+-    ]
+-  },
+-  "16030":{
+-    "inLabel":16030,
+-    "installed":true,
+-    "nexthops":[
+-      {
+-        "type":"SR (IS-IS)",
+-        "outLabel":16030,
+-        "installed":true,
+-        "nexthop":"10.0.3.2"
+-      },
+-      {
+-        "type":"SR (IS-IS)",
+-        "outLabel":16030,
+-        "installed":true,
+-        "nexthop":"10.0.2.2"
+-      },
+-      {
+-        "type":"SR (IS-IS)",
+-        "outLabel":16030,
+-        "installed":true,
+-        "nexthop":"10.0.6.5"
+-      }
+-    ]
+-  },
+-  "16031":{
+-    "inLabel":16031,
+-    "installed":true,
+-    "nexthops":[
+-      {
+-        "type":"SR (IS-IS)",
+-        "outLabel":16031,
+-        "installed":true,
+-        "interface":"eth-rt2-2"
+-      },
+-      {
+-        "type":"SR (IS-IS)",
+-        "outLabel":16031,
+-        "installed":true,
+-        "interface":"eth-rt2-1"
+-      },
+-      {
+-        "type":"SR (IS-IS)",
+-        "outLabel":16031,
+-        "installed":true,
+-        "interface":"eth-rt5"
+-      }
+-    ]
+-  },
+-  "16050":{
+-    "inLabel":16050,
+-    "installed":true,
+-    "nexthops":[
+-      {
+-        "type":"SR (IS-IS)",
+-        "outLabel":3,
+-        "installed":true,
 -        "nexthop":"10.0.6.5",
 -        "backupIndex":[
 -          0
 -        "type":"SR (IS-IS)",
 -        "outLabel":16050,
 -        "nexthop":"10.0.7.6"
-+        "nexthop":"10.0.6.5"
-       }
-     ]
-   },
-@@ -201,17 +139,7 @@
-         "type":"SR (IS-IS)",
-         "outLabel":3,
-         "installed":true,
+-      }
+-    ]
+-  },
+-  "16051":{
+-    "inLabel":16051,
+-    "installed":true,
+-    "nexthops":[
+-      {
+-        "type":"SR (IS-IS)",
+-        "outLabel":3,
+-        "installed":true,
 -        "interface":"eth-rt5",
 -        "backupIndex":[
 -          0
 -        "type":"SR (IS-IS)",
 -        "outLabel":16051,
 -        "interface":"eth-rt6"
-+        "interface":"eth-rt5"
-       }
-     ]
-   },
-@@ -223,17 +151,7 @@
-         "type":"SR (IS-IS)",
-         "outLabel":3,
-         "installed":true,
+-      }
+-    ]
+-  },
+-  "16060":{
+-    "inLabel":16060,
+-    "installed":true,
+-    "nexthops":[
+-      {
+-        "type":"SR (IS-IS)",
+-        "outLabel":3,
+-        "installed":true,
 -        "nexthop":"10.0.7.6",
 -        "backupIndex":[
 -          0
 -        "type":"SR (IS-IS)",
 -        "outLabel":16060,
 -        "nexthop":"10.0.6.5"
-+        "nexthop":"10.0.7.6"
-       }
-     ]
-   },
-@@ -245,17 +163,7 @@
-         "type":"SR (IS-IS)",
-         "outLabel":3,
-         "installed":true,
+-      }
+-    ]
+-  },
+-  "16061":{
+-    "inLabel":16061,
+-    "installed":true,
+-    "nexthops":[
+-      {
+-        "type":"SR (IS-IS)",
+-        "outLabel":3,
+-        "installed":true,
 -        "interface":"eth-rt6",
 -        "backupIndex":[
 -          0
 -        "type":"SR (IS-IS)",
 -        "outLabel":16061,
 -        "interface":"eth-rt5"
-+        "interface":"eth-rt6"
-       }
-     ]
  }
+-      }
+-    ]
+-  }
+ }
index 484a3147dcd18670aa53f655a60a8aa8c714105f..4385df2c3666a787d69564b62e1d94ce7971c8c0 100644 (file)
@@ -1,19 +1,25 @@
 --- a/rt4/step4/show_ip_route.ref
 +++ b/rt4/step5/show_ip_route.ref
-@@ -15,6 +15,9 @@
+@@ -14,14 +14,37 @@
+           "ip":"10.0.2.2",
            "afi":"ipv4",
            "interfaceName":"eth-rt2-1",
-           "active":true,
+-          "active":true
++          "active":true,
 +          "backupIndex":[
 +            0
 +          ],
-           "labels":[
-             16010
-           ]
-@@ -25,6 +28,20 @@
++          "labels":[
++            16010
++          ]
+         },
+         {
+           "fib":true,
+           "ip":"10.0.3.2",
            "afi":"ipv4",
            "interfaceName":"eth-rt2-2",
-           "active":true,
+-          "active":true
++          "active":true,
 +          "backupIndex":[
 +            0
 +          ],
 +          "afi":"ipv4",
 +          "interfaceName":"eth-rt5",
 +          "active":true,
-           "labels":[
-             16010
-           ]
-@@ -48,6 +65,9 @@
++          "labels":[
++            16010
++          ]
+         }
+       ]
+     }
+@@ -41,14 +64,38 @@
+           "ip":"10.0.2.2",
            "afi":"ipv4",
            "interfaceName":"eth-rt2-1",
-           "active":true,
+-          "active":true
++          "active":true,
 +          "backupIndex":[
 +            0
 +          ],
-           "labels":[
-             3
-           ]
-@@ -58,10 +78,25 @@
++          "labels":[
++            3
++          ]
+         },
+         {
+           "fib":true,
+           "ip":"10.0.3.2",
            "afi":"ipv4",
            "interfaceName":"eth-rt2-2",
-           "active":true,
+-          "active":true
++          "active":true,
 +          "backupIndex":[
 +            0
 +          ],
-           "labels":[
-             3
-           ]
-         }
++          "labels":[
++            3
++          ]
++        }
 +      ],
 +      "backupNexthops":[
 +        {
 +            16030,
 +            16020
 +          ]
-+        }
+         }
+       ]
+     }
+@@ -68,21 +115,30 @@
+           "ip":"10.0.2.2",
+           "afi":"ipv4",
+           "interfaceName":"eth-rt2-1",
+-          "active":true
++          "active":true,
++          "labels":[
++            16030
++          ]
+         },
+         {
+           "fib":true,
+           "ip":"10.0.3.2",
+           "afi":"ipv4",
+           "interfaceName":"eth-rt2-2",
+-          "active":true
++          "active":true,
++          "labels":[
++            16030
++          ]
+         },
+         {
+           "fib":true,
+           "ip":"10.0.6.5",
+           "afi":"ipv4",
+           "interfaceName":"eth-rt5",
+-          "active":true
++          "active":true,
++          "labels":[
++            16030
++          ]
+         }
        ]
      }
-   ],
-@@ -124,10 +159,24 @@
+@@ -102,7 +158,24 @@
+           "ip":"10.0.6.5",
            "afi":"ipv4",
            "interfaceName":"eth-rt5",
-           "active":true,
+-          "active":true
++          "active":true,
 +          "backupIndex":[
 +            0
 +          ],
-           "labels":[
-             3
-           ]
-         }
++          "labels":[
++            3
++          ]
++        }
 +      ],
 +      "backupNexthops":[
 +        {
 +          "labels":[
 +            16050
 +          ]
-+        }
+         }
        ]
      }
-   ],
-@@ -147,10 +196,24 @@
+@@ -122,7 +195,24 @@
+           "ip":"10.0.7.6",
            "afi":"ipv4",
            "interfaceName":"eth-rt6",
-           "active":true,
+-          "active":true
++          "active":true,
 +          "backupIndex":[
 +            0
 +          ],
-           "labels":[
-             3
-           ]
-         }
++          "labels":[
++            3
++          ]
++        }
 +      ],
 +      "backupNexthops":[
 +        {
 +          "labels":[
 +            16060
 +          ]
-+        }
+         }
        ]
      }
-   ],
-@@ -169,13 +232,27 @@
+@@ -142,13 +232,27 @@
            "ip":"10.0.2.2",
            "afi":"ipv4",
            "interfaceName":"eth-rt2-1",
            "active":true
          }
        ]
-@@ -191,13 +268,30 @@
+@@ -164,13 +268,30 @@
          {
            "ip":"10.0.2.2",
            "afi":"ipv4",
          }
        ]
      }
-@@ -213,12 +307,29 @@
+@@ -186,12 +307,29 @@
            "ip":"10.0.2.2",
            "afi":"ipv4",
            "interfaceName":"eth-rt2-1",
          }
        ]
      }
-@@ -238,6 +349,31 @@
+@@ -211,6 +349,31 @@
            "ip":"10.0.6.5",
            "afi":"ipv4",
            "interfaceName":"eth-rt5",
            "active":true
          }
        ]
-@@ -258,6 +394,31 @@
+@@ -231,6 +394,31 @@
            "ip":"10.0.6.5",
            "afi":"ipv4",
            "interfaceName":"eth-rt5",
            "active":true
          }
        ]
-@@ -273,7 +434,18 @@
+@@ -246,7 +434,18 @@
          {
            "ip":"10.0.6.5",
            "afi":"ipv4",
          }
        ]
      }
-@@ -288,7 +460,18 @@
+@@ -261,7 +460,18 @@
          {
            "ip":"10.0.7.6",
            "afi":"ipv4",
index 3ad008512041e7b73aef25991c34fae17ba40cba..54a1dc23c510f10c019f0bd076bbe680ed104b87 100644 (file)
@@ -1,19 +1,24 @@
 --- a/rt4/step4/show_ipv6_route.ref
 +++ b/rt4/step5/show_ipv6_route.ref
-@@ -14,6 +14,9 @@
+@@ -13,13 +13,35 @@
+           "fib":true,
            "afi":"ipv6",
            "interfaceName":"eth-rt2-2",
-           "active":true,
+-          "active":true
++          "active":true,
 +          "backupIndex":[
 +            0
 +          ],
-           "labels":[
-             16011
-           ]
-@@ -23,6 +26,19 @@
++          "labels":[
++            16011
++          ]
+         },
+         {
+           "fib":true,
            "afi":"ipv6",
            "interfaceName":"eth-rt2-1",
-           "active":true,
+-          "active":true
++          "active":true,
 +          "backupIndex":[
 +            0
 +          ],
 +          "afi":"ipv6",
 +          "interfaceName":"eth-rt5",
 +          "active":true,
-           "labels":[
-             16011
-           ]
-@@ -45,6 +61,9 @@
++          "labels":[
++            16011
++          ]
+         }
+       ]
+     }
+@@ -38,13 +60,36 @@
+           "fib":true,
            "afi":"ipv6",
            "interfaceName":"eth-rt2-2",
-           "active":true,
+-          "active":true
++          "active":true,
 +          "backupIndex":[
 +            0
 +          ],
-           "labels":[
-             3
-           ]
-@@ -54,10 +73,24 @@
++          "labels":[
++            3
++          ]
+         },
+         {
+           "fib":true,
            "afi":"ipv6",
            "interfaceName":"eth-rt2-1",
-           "active":true,
+-          "active":true
++          "active":true,
 +          "backupIndex":[
 +            0
 +          ],
-           "labels":[
-             3
-           ]
-         }
++          "labels":[
++            3
++          ]
++        }
 +      ],
 +      "backupNexthops":[
 +        {
 +            16031,
 +            16021
 +          ]
-+        }
+         }
        ]
      }
-   ],
-@@ -116,10 +149,23 @@
+@@ -63,19 +108,28 @@
+           "fib":true,
+           "afi":"ipv6",
+           "interfaceName":"eth-rt2-2",
+-          "active":true
++          "active":true,
++          "labels":[
++            16031
++          ]
+         },
+         {
+           "fib":true,
+           "afi":"ipv6",
+           "interfaceName":"eth-rt2-1",
+-          "active":true
++          "active":true,
++          "labels":[
++            16031
++          ]
+         },
+         {
+           "fib":true,
            "afi":"ipv6",
            "interfaceName":"eth-rt5",
-           "active":true,
+-          "active":true
++          "active":true,
++          "labels":[
++            16031
++          ]
+         }
+       ]
+     }
+@@ -94,7 +148,23 @@
+           "fib":true,
+           "afi":"ipv6",
+           "interfaceName":"eth-rt5",
+-          "active":true
++          "active":true,
 +          "backupIndex":[
 +            0
 +          ],
-           "labels":[
-             3
-           ]
-         }
++          "labels":[
++            3
++          ]
++        }
 +      ],
 +      "backupNexthops":[
 +        {
 +          "labels":[
 +            16051
 +          ]
-+        }
+         }
        ]
      }
-   ],
-@@ -138,10 +184,23 @@
+@@ -113,7 +183,23 @@
+           "fib":true,
            "afi":"ipv6",
            "interfaceName":"eth-rt6",
-           "active":true,
+-          "active":true
++          "active":true,
 +          "backupIndex":[
 +            0
 +          ],
-           "labels":[
-             3
-           ]
-         }
++          "labels":[
++            3
++          ]
++        }
 +      ],
 +      "backupNexthops":[
 +        {
 +          "labels":[
 +            16061
 +          ]
-+        }
+         }
        ]
      }
-   ]
index 20e363375bc87f4680cd469bbd6530b89730c767..fb6a1192813b68a808eb8f52b56343f90bae9504 100644 (file)
@@ -1,20 +1,24 @@
 --- a/rt4/step4/show_mpls_table.ref
 +++ b/rt4/step5/show_mpls_table.ref
-@@ -7,13 +7,26 @@
-         "type":"SR (IS-IS)",
-         "outLabel":16010,
-         "installed":true,
--        "nexthop":"10.0.3.2"
+@@ -1,2 +1,262 @@
+ {
++  "16010":{
++    "inLabel":16010,
++    "installed":true,
++    "nexthops":[
++      {
++        "type":"SR (IS-IS)",
++        "outLabel":16010,
++        "installed":true,
 +        "nexthop":"10.0.3.2",
 +        "backupIndex":[
 +          0
 +        ]
-       },
-       {
-         "type":"SR (IS-IS)",
-         "outLabel":16010,
-         "installed":true,
--        "nexthop":"10.0.2.2"
++      },
++      {
++        "type":"SR (IS-IS)",
++        "outLabel":16010,
++        "installed":true,
 +        "nexthop":"10.0.2.2",
 +        "backupIndex":[
 +          0
 +        "type":"SR (IS-IS)",
 +        "outLabel":16010,
 +        "nexthop":"10.0.6.5"
-       }
-     ]
-   },
-@@ -25,13 +38,26 @@
-         "type":"SR (IS-IS)",
-         "outLabel":16011,
-         "installed":true,
--        "interface":"eth-rt2-2"
++      }
++    ]
++  },
++  "16011":{
++    "inLabel":16011,
++    "installed":true,
++    "nexthops":[
++      {
++        "type":"SR (IS-IS)",
++        "outLabel":16011,
++        "installed":true,
 +        "interface":"eth-rt2-2",
 +        "backupIndex":[
 +          0
 +        ]
-       },
-       {
-         "type":"SR (IS-IS)",
-         "outLabel":16011,
-         "installed":true,
--        "interface":"eth-rt2-1"
++      },
++      {
++        "type":"SR (IS-IS)",
++        "outLabel":16011,
++        "installed":true,
 +        "interface":"eth-rt2-1",
 +        "backupIndex":[
 +          0
 +        "type":"SR (IS-IS)",
 +        "outLabel":16011,
 +        "interface":"eth-rt5"
-       }
-     ]
-   },
-@@ -43,13 +69,26 @@
-         "type":"SR (IS-IS)",
-         "outLabel":3,
-         "installed":true,
--        "nexthop":"10.0.3.2"
++      }
++    ]
++  },
++  "16020":{
++    "inLabel":16020,
++    "installed":true,
++    "nexthops":[
++      {
++        "type":"SR (IS-IS)",
++        "outLabel":3,
++        "installed":true,
 +        "nexthop":"10.0.3.2",
 +        "backupIndex":[
 +          0
 +        ]
-       },
-       {
-         "type":"SR (IS-IS)",
-         "outLabel":3,
-         "installed":true,
--        "nexthop":"10.0.2.2"
++      },
++      {
++        "type":"SR (IS-IS)",
++        "outLabel":3,
++        "installed":true,
 +        "nexthop":"10.0.2.2",
 +        "backupIndex":[
 +          0
 +        "type":"SR (IS-IS)",
 +        "outLabel":16030,
 +        "nexthop":"10.0.6.5"
-       }
-     ]
-   },
-@@ -61,13 +100,26 @@
-         "type":"SR (IS-IS)",
-         "outLabel":3,
-         "installed":true,
--        "interface":"eth-rt2-2"
++      }
++    ]
++  },
++  "16021":{
++    "inLabel":16021,
++    "installed":true,
++    "nexthops":[
++      {
++        "type":"SR (IS-IS)",
++        "outLabel":3,
++        "installed":true,
 +        "interface":"eth-rt2-2",
 +        "backupIndex":[
 +          0
 +        ]
-       },
-       {
-         "type":"SR (IS-IS)",
-         "outLabel":3,
-         "installed":true,
--        "interface":"eth-rt2-1"
++      },
++      {
++        "type":"SR (IS-IS)",
++        "outLabel":3,
++        "installed":true,
 +        "interface":"eth-rt2-1",
 +        "backupIndex":[
 +          0
 +        "type":"SR (IS-IS)",
 +        "outLabel":16031,
 +        "interface":"eth-rt5"
-       }
-     ]
-   },
-@@ -127,7 +179,17 @@
-         "type":"SR (IS-IS)",
-         "outLabel":3,
-         "installed":true,
--        "nexthop":"10.0.6.5"
++      }
++    ]
++  },
++  "16030":{
++    "inLabel":16030,
++    "installed":true,
++    "nexthops":[
++      {
++        "type":"SR (IS-IS)",
++        "outLabel":16030,
++        "installed":true,
++        "nexthop":"10.0.3.2"
++      },
++      {
++        "type":"SR (IS-IS)",
++        "outLabel":16030,
++        "installed":true,
++        "nexthop":"10.0.2.2"
++      },
++      {
++        "type":"SR (IS-IS)",
++        "outLabel":16030,
++        "installed":true,
++        "nexthop":"10.0.6.5"
++      }
++    ]
++  },
++  "16031":{
++    "inLabel":16031,
++    "installed":true,
++    "nexthops":[
++      {
++        "type":"SR (IS-IS)",
++        "outLabel":16031,
++        "installed":true,
++        "interface":"eth-rt2-2"
++      },
++      {
++        "type":"SR (IS-IS)",
++        "outLabel":16031,
++        "installed":true,
++        "interface":"eth-rt2-1"
++      },
++      {
++        "type":"SR (IS-IS)",
++        "outLabel":16031,
++        "installed":true,
++        "interface":"eth-rt5"
++      }
++    ]
++  },
++  "16050":{
++    "inLabel":16050,
++    "installed":true,
++    "nexthops":[
++      {
++        "type":"SR (IS-IS)",
++        "outLabel":3,
++        "installed":true,
 +        "nexthop":"10.0.6.5",
 +        "backupIndex":[
 +          0
 +        "type":"SR (IS-IS)",
 +        "outLabel":16050,
 +        "nexthop":"10.0.7.6"
-       }
-     ]
-   },
-@@ -139,7 +201,17 @@
-         "type":"SR (IS-IS)",
-         "outLabel":3,
-         "installed":true,
--        "interface":"eth-rt5"
++      }
++    ]
++  },
++  "16051":{
++    "inLabel":16051,
++    "installed":true,
++    "nexthops":[
++      {
++        "type":"SR (IS-IS)",
++        "outLabel":3,
++        "installed":true,
 +        "interface":"eth-rt5",
 +        "backupIndex":[
 +          0
 +        "type":"SR (IS-IS)",
 +        "outLabel":16051,
 +        "interface":"eth-rt6"
-       }
-     ]
-   },
-@@ -151,7 +223,17 @@
-         "type":"SR (IS-IS)",
-         "outLabel":3,
-         "installed":true,
--        "nexthop":"10.0.7.6"
++      }
++    ]
++  },
++  "16060":{
++    "inLabel":16060,
++    "installed":true,
++    "nexthops":[
++      {
++        "type":"SR (IS-IS)",
++        "outLabel":3,
++        "installed":true,
 +        "nexthop":"10.0.7.6",
 +        "backupIndex":[
 +          0
 +        "type":"SR (IS-IS)",
 +        "outLabel":16060,
 +        "nexthop":"10.0.6.5"
-       }
-     ]
-   },
-@@ -163,7 +245,17 @@
-         "type":"SR (IS-IS)",
-         "outLabel":3,
-         "installed":true,
--        "interface":"eth-rt6"
++      }
++    ]
++  },
++  "16061":{
++    "inLabel":16061,
++    "installed":true,
++    "nexthops":[
++      {
++        "type":"SR (IS-IS)",
++        "outLabel":3,
++        "installed":true,
 +        "interface":"eth-rt6",
 +        "backupIndex":[
 +          0
 +        "type":"SR (IS-IS)",
 +        "outLabel":16061,
 +        "interface":"eth-rt5"
-       }
-     ]
-   }
++      }
++    ]
++  }
+ }