]> git.puffer.fish Git - matthieu/frr.git/commitdiff
tests: Add tests to bgp_multi_vrf_topo2
authorKuldeep Kashyap <kashyapk@vmware.com>
Mon, 23 Nov 2020 04:37:55 +0000 (04:37 +0000)
committerKuldeep Kashyap <kashyapk@vmware.com>
Wed, 25 Nov 2020 08:57:08 +0000 (08:57 +0000)
1. Added 4 test cases for frr/daemon restart(chaos testing)

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
tests/topotests/bgp_multi_vrf_topo2/bgp_multi_vrf_topo2.json
tests/topotests/bgp_multi_vrf_topo2/test_bgp_multi_vrf_topo2.py

index ab570fcc164d4a92747218cd99361eec282fd251..bcee7e1a123dc2aa88be9017ff075d2d8946fd64 100644 (file)
                                 "neighbor": {
                                     "r1": {
                                         "dest_link": {
-                                            "red1-link1": {}
+                                            "red1-link1": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     }
                                 }
                                 "neighbor": {
                                     "r1": {
                                         "dest_link": {
-                                            "red1-link1": {}
+                                            "red1-link1": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     }
                                 }
                                 "neighbor": {
                                     "r1": {
                                         "dest_link": {
-                                            "red1-link2": {}
+                                            "red1-link2": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     }
                                 }
                                 "neighbor": {
                                     "r1": {
                                         "dest_link": {
-                                            "red1-link2": {}
+                                            "red1-link2": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     }
                                 }
                                 "neighbor": {
                                     "r1": {
                                         "dest_link": {
-                                            "blue1-link1": {}
+                                            "blue1-link1": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     }
                                 }
                                 "neighbor": {
                                     "r1": {
                                         "dest_link": {
-                                            "blue1-link1": {}
+                                            "blue1-link1": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     }
                                 }
                                 "neighbor": {
                                     "r1": {
                                         "dest_link": {
-                                            "blue1-link2": {}
+                                            "blue1-link2": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     }
                                 }
                                 "neighbor": {
                                     "r1": {
                                         "dest_link": {
-                                            "blue1-link2": {}
+                                            "blue1-link2": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     }
                                 }
                                 "neighbor": {
                                     "red1": {
                                         "dest_link": {
-                                            "r1-link1": {}
+                                            "r1-link1": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     },
                                     "r2": {
                                         "dest_link": {
                                             "r1-link1":
-                                            { "next_hop_self": true }
+                                            {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3,
+                                                "next_hop_self": true
+                                            }
                                         }
                                     },
                                     "r4": {
                                         "dest_link": {
-                                            "r1-link1": {}
+                                            "r1-link1": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     }
                                 }
                                 "neighbor": {
                                     "red1": {
                                         "dest_link": {
-                                            "r1-link1": {}
+                                            "r1-link1": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     },
                                     "r2": {
                                         "dest_link": {
                                             "r1-link1":
-                                            { "next_hop_self": true }
+                                            {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3,
+                                                "next_hop_self": true
+                                            }
                                         }
                                     },
                                     "r4": {
                                         "dest_link": {
-                                            "r1-link1": {}
+                                            "r1-link1": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     }
                                 }
                                 "neighbor": {
                                     "red1": {
                                         "dest_link": {
-                                            "r1-link2": {}
+                                            "r1-link2": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     },
                                     "r2": {
                                         "dest_link": {
                                             "r1-link2":
-                                            { "next_hop_self": true }
+                                            {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3,
+                                                "next_hop_self": true
+                                            }
                                         }
                                     },
                                     "r4": {
                                         "dest_link": {
-                                            "r1-link2": {}
+                                            "r1-link2": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     }
                                 }
                                 "neighbor": {
                                     "red1": {
                                         "dest_link": {
-                                            "r1-link2": {}
+                                            "r1-link2": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     },
                                     "r2": {
                                         "dest_link": {
                                             "r1-link2":
-                                            { "next_hop_self": true }
+                                            {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3,
+                                                "next_hop_self": true
+                                            }
                                         }
                                     },
                                     "r4": {
                                         "dest_link": {
-                                            "r1-link2": {}
+                                            "r1-link2": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     }
                                 }
                                 "neighbor": {
                                     "blue1": {
                                         "dest_link": {
-                                            "r1-link1": {}
+                                            "r1-link1": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     },
                                     "r2": {
                                         "dest_link": {
                                             "r1-link3":
-                                            { "next_hop_self": true }
+                                            {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3,
+                                                "next_hop_self": true
+                                            }
                                         }
                                     },
                                     "r4": {
                                         "dest_link": {
-                                            "r1-link3": {}
+                                            "r1-link3": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     }
                                 }
                                 "neighbor": {
                                     "blue1": {
                                         "dest_link": {
-                                            "r1-link1": {}
+                                            "r1-link1": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     },
                                     "r2": {
                                         "dest_link": {
                                             "r1-link3":
-                                            { "next_hop_self": true }
+                                            {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3,
+                                                "next_hop_self": true
+                                            }
                                         }
                                     },
                                     "r4": {
                                         "dest_link": {
-                                            "r1-link3": {}
+                                            "r1-link3": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     }
                                 }
                                 "neighbor": {
                                     "blue1": {
                                         "dest_link": {
-                                            "r1-link2": {}
+                                            "r1-link2": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     },
                                     "r2": {
                                         "dest_link": {
                                             "r1-link4":
-                                            { "next_hop_self": true }
+                                            {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3,
+                                                "next_hop_self": true
+                                            }
                                         }
                                     },
                                     "r4": {
                                         "dest_link": {
-                                            "r1-link4": {}
+                                            "r1-link4": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     }
                                 }
                                 "neighbor": {
                                     "blue1": {
                                         "dest_link": {
-                                            "r1-link2": {}
+                                            "r1-link2": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     },
                                     "r2": {
                                         "dest_link": {
                                             "r1-link4":
-                                            { "next_hop_self": true }
+                                            {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3,
+                                                "next_hop_self": true
+                                            }
                                         }
                                     },
                                     "r4": {
                                         "dest_link": {
-                                            "r1-link4": {}
+                                            "r1-link4": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     }
                                 }
                                 "neighbor": {
                                     "r1": {
                                         "dest_link": {
-                                            "r2-link1": {}
+                                            "r2-link1": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     },
                                     "r3": {
                                         "dest_link": {
-                                            "r2-link1": {}
+                                            "r2-link1": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     }
                                 }
                                 "neighbor": {
                                     "r1": {
                                         "dest_link": {
-                                            "r2-link1": {}
+                                            "r2-link1": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     },
                                     "r3": {
                                         "dest_link": {
-                                            "r2-link1": {}
+                                            "r2-link1": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     }
                                 }
                                 "neighbor": {
                                     "r1": {
                                         "dest_link": {
-                                            "r2-link2": {}
+                                            "r2-link2": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     },
                                     "r3": {
                                         "dest_link": {
-                                            "r2-link2": {}
+                                            "r2-link2": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     }
                                 }
                                 "neighbor": {
                                     "r1": {
                                         "dest_link": {
-                                            "r2-link2": {}
+                                            "r2-link2": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     },
                                     "r3": {
                                         "dest_link": {
-                                            "r2-link2": {}
+                                            "r2-link2": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     }
                                 }
                                 "neighbor": {
                                     "r1": {
                                         "dest_link": {
-                                            "r2-link3": {}
+                                            "r2-link3": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     },
                                     "r3": {
                                         "dest_link": {
-                                            "r2-link3": {}
+                                            "r2-link3": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     }
                                 }
                                 "neighbor": {
                                     "r1": {
                                         "dest_link": {
-                                            "r2-link3": {}
+                                            "r2-link3": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     },
                                     "r3": {
                                         "dest_link": {
-                                            "r2-link3": {}
+                                            "r2-link3": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     }
                                 }
                                 "neighbor": {
                                     "r1": {
                                         "dest_link": {
-                                            "r2-link4": {}
+                                            "r2-link4": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     },
                                     "r3": {
                                         "dest_link": {
-                                            "r2-link4": {}
+                                            "r2-link4": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     }
                                 }
                                 "neighbor": {
                                     "r1": {
                                         "dest_link": {
-                                            "r2-link4": {}
+                                            "r2-link4": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     },
                                     "r3": {
                                         "dest_link": {
-                                            "r2-link4": {}
+                                            "r2-link4": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     }
                                 }
                                 "neighbor": {
                                     "r2": {
                                         "dest_link": {
-                                            "r3-link1": {}
+                                            "r3-link1": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     },
                                     "r4": {
                                         "dest_link": {
-                                            "r3-link1": {}
+                                            "r3-link1": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     },
                                     "red2": {
                                         "dest_link": {
-                                            "r3-link1": {}
+                                            "r3-link1": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     }
                                 }
                                                 "route_maps": [{
                                                     "name": "rmap_global",
                                                     "direction": "in"
-                                                }]
+                                                }],
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
                                             }
                                         }
                                     },
                                                 "route_maps": [{
                                                     "name": "rmap_global",
                                                     "direction": "in"
-                                                }]
+                                                }],
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
                                             }
                                         }
                                     },
                                                 "route_maps": [{
                                                     "name": "rmap_global",
                                                     "direction": "in"
-                                                }]
+                                                }],
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
                                             }
                                         }
                                     }
                                 "neighbor": {
                                     "r2": {
                                         "dest_link": {
-                                            "r3-link2": {}
+                                            "r3-link2": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     },
                                     "r4": {
                                         "dest_link": {
-                                            "r3-link2": {}
+                                            "r3-link2": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     },
                                     "red2": {
                                         "dest_link": {
-                                            "r3-link2": {}
+                                            "r3-link2": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     }
                                 }
                                                 "route_maps": [{
                                                     "name": "rmap_global",
                                                     "direction": "in"
-                                                }]
+                                                }],
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
                                             }
                                         }
                                     },
                                                 "route_maps": [{
                                                     "name": "rmap_global",
                                                     "direction": "in"
-                                                }]
+                                                }],
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
                                             }
                                         }
                                     },
                                                 "route_maps": [{
                                                     "name": "rmap_global",
                                                     "direction": "in"
-                                                }]
+                                                }],
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
                                             }
                                         }
                                     }
                                 "neighbor": {
                                     "r2": {
                                         "dest_link": {
-                                            "r3-link3": {}
+                                            "r3-link3": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     },
                                     "r4": {
                                         "dest_link": {
-                                            "r3-link3": {}
+                                            "r3-link3": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     },
                                     "blue2": {
                                         "dest_link": {
-                                            "r3-link1": {}
+                                            "r3-link1": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     }
                                 }
                                                 "route_maps": [{
                                                     "name": "rmap_global",
                                                     "direction": "in"
-                                                }]
+                                                }],
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
                                             }
                                         }
                                     },
                                                 "route_maps": [{
                                                     "name": "rmap_global",
                                                     "direction": "in"
-                                                }]
+                                                }],
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
                                             }
                                         }
                                     },
                                                 "route_maps": [{
                                                     "name": "rmap_global",
                                                     "direction": "in"
-                                                }]
+                                                }],
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
                                             }
                                         }
                                     }
                                 "neighbor": {
                                     "r2": {
                                         "dest_link": {
-                                            "r3-link4": {}
+                                            "r3-link4": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     },
                                     "r4": {
                                         "dest_link": {
-                                            "r3-link4": {}
+                                            "r3-link4": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     },
                                     "blue2": {
                                         "dest_link": {
-                                            "r3-link2": {}
+                                            "r3-link2": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     }
                                 }
                                                 "route_maps": [{
                                                     "name": "rmap_global",
                                                     "direction": "in"
-                                                }]
+                                                }],
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
                                             }
                                         }
                                     },
                                                 "route_maps": [{
                                                     "name": "rmap_global",
                                                     "direction": "in"
-                                                }]
+                                                }],
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
                                             }
                                         }
                                     },
                                                 "route_maps": [{
                                                     "name": "rmap_global",
                                                     "direction": "in"
-                                                }]
+                                                }],
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
                                             }
                                         }
                                     }
                                 "neighbor": {
                                     "r1": {
                                         "dest_link": {
-                                            "r4-link1": {}
+                                            "r4-link1": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     },
                                     "r3": {
                                         "dest_link": {
-                                            "r4-link1": {}
+                                            "r4-link1": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     }
                                 }
                                     "r1": {
                                         "dest_link": {
                                             "r4-link1": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3,
                                                 "route_maps": [{
                                                     "name": "rmap_global",
                                                     "direction": "in"
                                     "r3": {
                                         "dest_link": {
                                             "r4-link1": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3,
                                                 "route_maps": [{
                                                     "name": "rmap_global",
                                                     "direction": "in"
                                 "neighbor": {
                                     "r1": {
                                         "dest_link": {
-                                            "r4-link2": {}
+                                            "r4-link2": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     },
                                     "r3": {
                                         "dest_link": {
-                                            "r4-link2": {}
+                                            "r4-link2": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     }
                                 }
                                     "r1": {
                                         "dest_link": {
                                             "r4-link2": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3,
                                                 "route_maps": [{
                                                     "name": "rmap_global",
                                                     "direction": "in"
                                     "r3": {
                                         "dest_link": {
                                             "r4-link2": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3,
                                                 "route_maps": [{
                                                     "name": "rmap_global",
                                                     "direction": "in"
                                 "neighbor": {
                                     "r1": {
                                         "dest_link": {
-                                            "r4-link3": {}
+                                            "r4-link3": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     },
                                     "r3": {
                                         "dest_link": {
-                                            "r4-link3": {}
+                                            "r4-link3": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     }
                                 }
                                     "r1": {
                                         "dest_link": {
                                             "r4-link3": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3,
                                                 "route_maps": [{
                                                     "name": "rmap_global",
                                                     "direction": "in"
                                     "r3": {
                                         "dest_link": {
                                             "r4-link3": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3,
                                                 "route_maps": [{
                                                     "name": "rmap_global",
                                                     "direction": "in"
                                 "neighbor": {
                                     "r1": {
                                         "dest_link": {
-                                            "r4-link4": {}
+                                            "r4-link4": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     },
                                     "r3": {
                                         "dest_link": {
-                                            "r4-link4": {}
+                                            "r4-link4": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     }
                                 }
                                     "r1": {
                                         "dest_link": {
                                             "r4-link4": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3,
                                                 "route_maps": [{
                                                     "name": "rmap_global",
                                                     "direction": "in"
                                     "r3": {
                                         "dest_link": {
                                             "r4-link4": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3,
                                                 "route_maps": [{
                                                     "name": "rmap_global",
                                                     "direction": "in"
                                 "neighbor": {
                                     "r3": {
                                         "dest_link": {
-                                            "red2-link1": {}
+                                            "red2-link1": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     }
                                 }
                                 "neighbor": {
                                     "r3": {
                                         "dest_link": {
-                                            "red2-link1": {}
+                                            "red2-link1": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     }
                                 }
                                 "neighbor": {
                                     "r3": {
                                         "dest_link": {
-                                            "red2-link2": {}
+                                            "red2-link2": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     }
                                 }
                                 "neighbor": {
                                     "r3": {
                                         "dest_link": {
-                                            "red2-link2": {}
+                                            "red2-link2": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     }
                                 }
                                 "neighbor": {
                                     "r3": {
                                         "dest_link": {
-                                            "blue2-link1": {}
+                                            "blue2-link1": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     }
                                 }
                                 "neighbor": {
                                     "r3": {
                                         "dest_link": {
-                                            "blue2-link1": {}
+                                            "blue2-link1": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     }
                                 }
                                 "neighbor": {
                                     "r3": {
                                         "dest_link": {
-                                            "blue2-link2": {}
+                                            "blue2-link2": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     }
                                 }
                                 "neighbor": {
                                     "r3": {
                                         "dest_link": {
-                                            "blue2-link2": {}
+                                            "blue2-link2": {
+                                                "keepalivetimer": 1,
+                                                "holddowntimer": 3
+                                            }
                                         }
                                     }
                                 }
index cafe758209d7735a422e0878a77f4f14136f6b5d..31900702232d67dc83efd7836b90b6303f0cec0b 100644 (file)
@@ -35,7 +35,20 @@ CHAOS_5:
 CHAOS_9:
     Verify that all vrf instances fall back
     to backup path, if primary link goes down.
-
+CHAOS_6:
+    Restart BGPd daemon on DUT to check if all the
+    routes in respective vrfs are reinstalled..
+CHAOS_2:
+    Delete a VRF instance from DUT and check if the routes get
+    deleted from subsequent neighbour routers and appears again once VRF
+    is re-added.
+CHAOS_4:
+    Verify that VRF names are locally significant
+    to a router, and end to end connectivity depends on unique
+    virtual circuits (using VLANs or separate physical interfaces).
+CHAOS_8:
+    Restart all FRR services (reboot DUT) to check if all
+    the routes in respective vrfs are reinstalled.
 """
 
 import os
@@ -79,6 +92,10 @@ from lib.common_config import (
     check_router_status,
     apply_raw_config,
     required_linux_kernel_version,
+    kill_router_daemons,
+    start_router_daemons,
+    stop_router,
+    start_router
 )
 
 from lib.topolog import logger
@@ -112,7 +129,7 @@ LOOPBACK_2 = {
     "ipv4": "20.20.20.20/32",
     "ipv6": "20::20:20/128",
     "ipv4_mask": "255.255.255.255",
-    "ipv6_mask": None,
+    "ipv6_mask": None
 }
 
 MAX_PATHS = 2
@@ -143,7 +160,7 @@ def setup_module(mod):
     * `mod`: module name
     """
     # Required linux kernel version for this suite to run.
-    result = required_linux_kernel_version("4.15")
+    result = required_linux_kernel_version("4.14")
     if result is not True:
         pytest.skip("Kernel requirements are not met")
 
@@ -1194,7 +1211,7 @@ def test_shut_noshut_p1(request):
     result = create_router_bgp(tgen, topo, input_dict_3)
     assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
 
-    step("Api call to modfiy BGP timerse")
+    step("Api call to modfiy BGP timers")
 
     input_dict_4 = {
         "r1": {
@@ -1508,7 +1525,7 @@ def test_shut_noshut_p1(request):
             " when the interface is shut"
         )
 
-        step("Sleeping for holddowntimer+1 sec..")
+        step("Sleeping for {}+1 sec..".format(HOLDDOWNTIMER))
         sleep(HOLDDOWNTIMER + 1)
 
         result = verify_bgp_convergence(tgen, topo, expected=False)
@@ -1718,7 +1735,7 @@ def test_vrf_vlan_routing_table_p1(request):
             tc_name, result
         )
 
-    step("Api call to modfiy BGP timerse")
+    step("Api call to modfiy BGP timers")
 
     input_dict_4 = {
         "r3": {
@@ -1780,7 +1797,7 @@ def test_vrf_vlan_routing_table_p1(request):
             tc_name, result
         )
 
-        step("Sleeping for holdowntimer+1 sec..")
+        step("Sleeping for {}+1 sec..".format(HOLDDOWNTIMER))
         sleep(HOLDDOWNTIMER + 1)
 
         for addr_type in ADDR_TYPES:
@@ -1811,7 +1828,7 @@ def test_vrf_vlan_routing_table_p1(request):
         )
 
         step(
-            "After deleting VRFs ipv6 addresses wil be deleted from kernel "
+            "After deleting VRFs ipv6 addresses will be deleted from kernel "
             " Adding back ipv6 addresses"
         )
 
@@ -1829,7 +1846,7 @@ def test_vrf_vlan_routing_table_p1(request):
                 tgen, dut, intf_name, intf_ipv6, vrf, create=False
             )
 
-        step("Sleeping for holdowntimer+1 sec..")
+        step("Sleeping for {}+1 sec..".format(HOLDDOWNTIMER))
         sleep(HOLDDOWNTIMER + 1)
 
         for addr_type in ADDR_TYPES:
@@ -2011,6 +2028,1782 @@ def test_vrf_route_leaking_next_hop_interface_flapping_p1(request):
     write_test_footer(tc_name)
 
 
+def test_restart_bgpd_daemon_p1(request):
+    """
+    CHAOS_6:
+    Restart BGPd daemon on DUT to check if all the
+    routes in respective vrfs are reinstalled..
+    """
+
+    tgen = get_topogen()
+    tc_name = request.node.name
+    write_test_header(tc_name)
+
+    if tgen.routers_have_failure():
+        check_router_status(tgen)
+
+    reset_config_on_routers(tgen)
+
+    step(
+        "Advertise unique BGP prefixes(IPv4+IPv6) from RED_1"
+        " in vrf instances(RED_A and RED_B)."
+    )
+
+    for addr_type in ADDR_TYPES:
+        input_dict_1 = {
+            "red1": {
+                "static_routes": [
+                    {
+                        "network": [NETWORK1_1[addr_type]] + [NETWORK1_2[addr_type]],
+                        "next_hop": NEXT_HOP_IP[addr_type],
+                        "vrf": "RED_A",
+                    },
+                    {
+                        "network": [NETWORK2_1[addr_type]] + [NETWORK2_2[addr_type]],
+                        "next_hop": NEXT_HOP_IP[addr_type],
+                        "vrf": "RED_B",
+                    },
+                ]
+            }
+        }
+        result = create_static_routes(tgen, input_dict_1)
+        assert result is True, "Testcase {} : Failed \n Error: {}".format(
+            tc_name, result
+        )
+
+    step(
+        "Advertise unique BGP prefixes(IPv4+IPv6) from BLUE_1 in"
+        " vrf instances(BLUE_A and BLUE_B)."
+    )
+
+    for addr_type in ADDR_TYPES:
+        input_dict_2 = {
+            "blue1": {
+                "static_routes": [
+                    {
+                        "network": [NETWORK1_1[addr_type]] + [NETWORK1_2[addr_type]],
+                        "next_hop": NEXT_HOP_IP[addr_type],
+                        "vrf": "BLUE_A",
+                    },
+                    {
+                        "network": [NETWORK2_1[addr_type]] + [NETWORK2_2[addr_type]],
+                        "next_hop": NEXT_HOP_IP[addr_type],
+                        "vrf": "BLUE_B",
+                    },
+                ]
+            }
+        }
+        result = create_static_routes(tgen, input_dict_2)
+        assert result is True, "Testcase {} : Failed \n Error: {}".format(
+            tc_name, result
+        )
+
+    step("Redistribute static..")
+
+    input_dict_3 = {}
+    for dut in ["red1", "blue1"]:
+        temp = {dut: {"bgp": []}}
+        input_dict_3.update(temp)
+
+        if "red" in dut:
+            VRFS = ["RED_A", "RED_B"]
+            AS_NUM = [500, 500]
+        elif "blue" in dut:
+            VRFS = ["BLUE_A", "BLUE_B"]
+            AS_NUM = [800, 800]
+
+        for vrf, as_num in zip(VRFS, AS_NUM):
+            temp[dut]["bgp"].append(
+                {
+                    "local_as": as_num,
+                    "vrf": vrf,
+                    "address_family": {
+                        "ipv4": {
+                            "unicast": {"redistribute": [{"redist_type": "static"}]}
+                        },
+                        "ipv6": {
+                            "unicast": {"redistribute": [{"redist_type": "static"}]}
+                        },
+                    },
+                }
+            )
+
+    result = create_router_bgp(tgen, topo, input_dict_3)
+    assert result is True, "Testcase {} :Failed \n Error: {}".format(tc_name, result)
+
+    step("Kill BGPd daemon on R1.")
+    kill_router_daemons(tgen, "r1", ["bgpd"])
+
+    for addr_type in ADDR_TYPES:
+        dut = "r2"
+        input_dict_1 = {
+            "red1": {
+                "static_routes": [
+                    {
+                        "network": [NETWORK1_1[addr_type]] + [NETWORK1_2[addr_type]],
+                        "next_hop": NEXT_HOP_IP[addr_type],
+                        "vrf": "RED_A",
+                    },
+                    {
+                        "network": [NETWORK2_1[addr_type]] + [NETWORK2_2[addr_type]],
+                        "next_hop": NEXT_HOP_IP[addr_type],
+                        "vrf": "RED_B",
+                    },
+                ]
+            }
+        }
+
+        input_dict_2 = {
+            "blue1": {
+                "static_routes": [
+                    {
+                        "network": [NETWORK1_1[addr_type]] + [NETWORK1_2[addr_type]],
+                        "next_hop": NEXT_HOP_IP[addr_type],
+                        "vrf": "BLUE_A",
+                    },
+                    {
+                        "network": [NETWORK2_1[addr_type]] + [NETWORK2_2[addr_type]],
+                        "next_hop": NEXT_HOP_IP[addr_type],
+                        "vrf": "BLUE_B",
+                    },
+                ]
+            }
+        }
+
+        result = verify_rib(tgen, addr_type, dut, input_dict_1, expected=False)
+        assert result is not True, "Testcase {} :Failed \n Error {}".format(
+            tc_name, result
+        )
+
+        result = verify_rib(tgen, addr_type, dut, input_dict_2, expected=False)
+        assert result is not True, "Testcase {} :Failed \n Error {}".format(
+            tc_name, result
+        )
+
+    step("Bring up BGPd daemon on R1.")
+    start_router_daemons(tgen, "r1", ["bgpd"])
+
+    result = verify_bgp_convergence(tgen, topo)
+    assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
+
+    for addr_type in ADDR_TYPES:
+        dut = "r2"
+        input_dict_1 = {
+            "red1": {
+                "static_routes": [
+                    {
+                        "network": [NETWORK1_1[addr_type]] + [NETWORK1_2[addr_type]],
+                        "next_hop": NEXT_HOP_IP[addr_type],
+                        "vrf": "RED_A",
+                    },
+                    {
+                        "network": [NETWORK2_1[addr_type]] + [NETWORK2_2[addr_type]],
+                        "next_hop": NEXT_HOP_IP[addr_type],
+                        "vrf": "RED_B",
+                    },
+                ]
+            }
+        }
+
+        input_dict_2 = {
+            "blue1": {
+                "static_routes": [
+                    {
+                        "network": [NETWORK1_1[addr_type]] + [NETWORK1_2[addr_type]],
+                        "next_hop": NEXT_HOP_IP[addr_type],
+                        "vrf": "BLUE_A",
+                    },
+                    {
+                        "network": [NETWORK2_1[addr_type]] + [NETWORK2_2[addr_type]],
+                        "next_hop": NEXT_HOP_IP[addr_type],
+                        "vrf": "BLUE_B",
+                    },
+                ]
+            }
+        }
+
+        result = verify_rib(tgen, addr_type, dut, input_dict_1)
+        assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
+
+        result = verify_rib(tgen, addr_type, dut, input_dict_2)
+        assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
+
+    write_test_footer(tc_name)
+
+
+def test_delete_and_re_add_vrf_p1(request):
+    """
+    CHAOS_2:
+    Delete a VRF instance from DUT and check if the routes get
+    deleted from subsequent neighbour routers and appears again once VRF
+    is re-added.
+    """
+
+    tgen = get_topogen()
+    tc_name = request.node.name
+    write_test_header(tc_name)
+    reset_config_on_routers(tgen)
+
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    step(
+        "Advertise unique prefixes in BGP using static redistribution"
+        "for both vrfs (RED_A and RED_B) on router RED_1"
+    )
+
+    for addr_type in ADDR_TYPES:
+        input_dict_1 = {
+            "red1": {
+                "static_routes": [
+                    {
+                        "network": [NETWORK1_1[addr_type]] + [NETWORK1_2[addr_type]],
+                        "next_hop": NEXT_HOP_IP[addr_type],
+                        "vrf": "RED_A",
+                    },
+                    {
+                        "network": [NETWORK2_1[addr_type]] + [NETWORK2_2[addr_type]],
+                        "next_hop": NEXT_HOP_IP[addr_type],
+                        "vrf": "RED_B",
+                    },
+                ]
+            }
+        }
+        result = create_static_routes(tgen, input_dict_1)
+        assert result is True, "Testcase {} : Failed \n Error: {}".format(
+            tc_name, result
+        )
+
+    step(
+        "Advertise unique prefixes in BGP using static redistribution"
+        " for both vrfs (BLUE_A and BLUE_B) on router BLUE_1."
+    )
+
+    for addr_type in ADDR_TYPES:
+        input_dict_2 = {
+            "blue1": {
+                "static_routes": [
+                    {
+                        "network": [NETWORK3_1[addr_type]] + [NETWORK3_2[addr_type]],
+                        "next_hop": NEXT_HOP_IP[addr_type],
+                        "vrf": "BLUE_A",
+                    },
+                    {
+                        "network": [NETWORK4_1[addr_type]] + [NETWORK4_2[addr_type]],
+                        "next_hop": NEXT_HOP_IP[addr_type],
+                        "vrf": "BLUE_B",
+                    },
+                ]
+            }
+        }
+        result = create_static_routes(tgen, input_dict_2)
+        assert result is True, "Testcase {} : Failed \n Error: {}".format(
+            tc_name, result
+        )
+
+    step("Redistribute static for vrfs RED_A and RED_B and BLUE_A and BLUE_B")
+
+    input_dict_3 = {}
+    for dut in ["red1", "blue1"]:
+        temp = {dut: {"bgp": []}}
+        input_dict_3.update(temp)
+
+        if "red" in dut:
+            VRFS = ["RED_A", "RED_B"]
+            AS_NUM = [500, 500]
+        elif "blue" in dut:
+            VRFS = ["BLUE_A", "BLUE_B"]
+            AS_NUM = [800, 800]
+
+        for vrf, as_num in zip(VRFS, AS_NUM):
+            temp[dut]["bgp"].append(
+                {
+                    "local_as": as_num,
+                    "vrf": vrf,
+                    "address_family": {
+                        "ipv4": {
+                            "unicast": {"redistribute": [{"redist_type": "static"}]}
+                        },
+                        "ipv6": {
+                            "unicast": {"redistribute": [{"redist_type": "static"}]}
+                        },
+                    },
+                }
+            )
+
+    result = create_router_bgp(tgen, topo, input_dict_3)
+    assert result is True, "Testcase {} :Failed \n Error: {}".format(tc_name, result)
+
+    step("Verifying RIB and FIB before deleting VRFs")
+
+    for addr_type in ADDR_TYPES:
+        dut = "r2"
+        input_dict_1 = {
+            "red1": {
+                "static_routes": [
+                    {
+                        "network": [NETWORK1_1[addr_type]] + [NETWORK1_2[addr_type]],
+                        "next_hop": NEXT_HOP_IP[addr_type],
+                        "vrf": "RED_A",
+                    },
+                    {
+                        "network": [NETWORK2_1[addr_type]] + [NETWORK2_2[addr_type]],
+                        "next_hop": NEXT_HOP_IP[addr_type],
+                        "vrf": "RED_B",
+                    },
+                ]
+            }
+        }
+
+        result = verify_bgp_rib(tgen, addr_type, dut, input_dict_1)
+        assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
+
+        result = verify_rib(tgen, addr_type, dut, input_dict_1)
+        assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
+
+    for addr_type in ADDR_TYPES:
+        dut = "r2"
+        input_dict_2 = {
+            "blue1": {
+                "static_routes": [
+                    {
+                        "network": [NETWORK3_1[addr_type]] + [NETWORK3_2[addr_type]],
+                        "next_hop": NEXT_HOP_IP[addr_type],
+                        "vrf": "BLUE_A",
+                    },
+                    {
+                        "network": [NETWORK4_1[addr_type]] + [NETWORK4_2[addr_type]],
+                        "next_hop": NEXT_HOP_IP[addr_type],
+                        "vrf": "BLUE_B",
+                    },
+                ]
+            }
+        }
+
+        result = verify_bgp_rib(tgen, addr_type, dut, input_dict_2)
+        assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
+
+        result = verify_rib(tgen, addr_type, dut, input_dict_2)
+        assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
+
+    step("Api call to modfiy BGP timers")
+
+    input_dict_4 = {
+        "r1": {
+            "bgp": [
+                {
+                    "local_as": "100",
+                    "vrf": "RED_A",
+                    "address_family": {
+                        "ipv4": {
+                            "unicast": {
+                                "neighbor": {
+                                    "r2": {
+                                        "dest_link": {
+                                            "r1-link1": {
+                                                "keepalivetimer": KEEPALIVETIMER,
+                                                "holddowntimer": HOLDDOWNTIMER,
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        },
+                        "ipv6": {
+                            "unicast": {
+                                "neighbor": {
+                                    "r2": {
+                                        "dest_link": {
+                                            "r1-link1": {
+                                                "keepalivetimer": KEEPALIVETIMER,
+                                                "holddowntimer": HOLDDOWNTIMER,
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        },
+                    },
+                },
+                {
+                    "local_as": "100",
+                    "vrf": "RED_B",
+                    "address_family": {
+                        "ipv4": {
+                            "unicast": {
+                                "neighbor": {
+                                    "r2": {
+                                        "dest_link": {
+                                            "r1-link2": {
+                                                "keepalivetimer": KEEPALIVETIMER,
+                                                "holddowntimer": HOLDDOWNTIMER,
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        },
+                        "ipv6": {
+                            "unicast": {
+                                "neighbor": {
+                                    "r2": {
+                                        "dest_link": {
+                                            "r1-link2": {
+                                                "keepalivetimer": KEEPALIVETIMER,
+                                                "holddowntimer": HOLDDOWNTIMER,
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        },
+                    },
+                },
+                {
+                    "local_as": "100",
+                    "vrf": "BLUE_A",
+                    "address_family": {
+                        "ipv4": {
+                            "unicast": {
+                                "neighbor": {
+                                    "r2": {
+                                        "dest_link": {
+                                            "r1-link3": {
+                                                "keepalivetimer": KEEPALIVETIMER,
+                                                "holddowntimer": HOLDDOWNTIMER,
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        },
+                        "ipv6": {
+                            "unicast": {
+                                "neighbor": {
+                                    "r2": {
+                                        "dest_link": {
+                                            "r1-link3": {
+                                                "keepalivetimer": KEEPALIVETIMER,
+                                                "holddowntimer": HOLDDOWNTIMER,
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        },
+                    },
+                },
+                {
+                    "local_as": "100",
+                    "vrf": "BLUE_B",
+                    "address_family": {
+                        "ipv4": {
+                            "unicast": {
+                                "neighbor": {
+                                    "r2": {
+                                        "dest_link": {
+                                            "r1-link4": {
+                                                "keepalivetimer": KEEPALIVETIMER,
+                                                "holddowntimer": HOLDDOWNTIMER,
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        },
+                        "ipv6": {
+                            "unicast": {
+                                "neighbor": {
+                                    "r2": {
+                                        "dest_link": {
+                                            "r1-link4": {
+                                                "keepalivetimer": KEEPALIVETIMER,
+                                                "holddowntimer": HOLDDOWNTIMER,
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        },
+                    },
+                },
+            ]
+        }
+    }
+
+    result = create_router_bgp(tgen, topo, input_dict_4)
+    assert result is True, "Testcase {} :Failed \n Error: {}".format(tc_name, result)
+
+    for addr_type in ADDR_TYPES:
+        clear_bgp(tgen, addr_type, "r1", vrf=["RED_A", "RED_B", "BLUE_A", "BLUE_B"])
+
+    step("Delete vrfs RED_A and BLUE_A from R1.")
+
+    input_dict = {
+        "r1": {
+            "vrfs": [
+                {"name": "RED_A", "id": "1", "delete": True},
+                {"name": "BLUE_A", "id": "3", "delete": True},
+            ]
+        }
+    }
+
+    result = create_vrf_cfg(tgen, input_dict)
+    assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
+
+    step(
+        "R2 must not receive the prefixes(in respective vrfs)"
+        "originated from RED_1 and BLUE_1."
+    )
+
+    step("Wait for {}+1 sec..".format(HOLDDOWNTIMER))
+    sleep(HOLDDOWNTIMER + 1)
+
+    for addr_type in ADDR_TYPES:
+        dut = "r2"
+        input_dict_2 = {
+            "red1": {
+                "static_routes": [
+                    {
+                        "network": [NETWORK1_1[addr_type]] + [NETWORK1_2[addr_type]],
+                        "next_hop": NEXT_HOP_IP[addr_type],
+                        "vrf": "RED_A",
+                    }
+                ]
+            },
+            "blue1": {
+                "static_routes": [
+                    {
+                        "network": [NETWORK3_1[addr_type]] + [NETWORK3_2[addr_type]],
+                        "next_hop": NEXT_HOP_IP[addr_type],
+                        "vrf": "BLUE_A",
+                    }
+                ]
+            },
+        }
+
+        result = verify_bgp_rib(tgen, addr_type, dut, input_dict_2, expected=False)
+        assert result is not True, (
+            "Testcase {} :Failed \n Expected Behaviour:"
+            " Routes are not present \n Error {}".format(tc_name, result)
+        )
+
+        result = verify_rib(tgen, addr_type, dut, input_dict_2, expected=False)
+        assert result is not True, (
+            "Testcase {} :Failed \n Expected Behaviour:"
+            " Routes are not present \n Error {}".format(tc_name, result)
+        )
+
+    step("Add vrfs again RED_A and BLUE_A on R1.")
+
+    result = create_vrf_cfg(tgen, {"r1": topo["routers"]["r1"]})
+    assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
+
+    create_interfaces_cfg(tgen, {"r1": topo["routers"]["r1"]})
+    assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
+
+    step(
+        "After deleting VRFs ipv6 addresses will be deleted from kernel "
+        " Adding back ipv6 addresses"
+    )
+
+    dut = "r1"
+    vrfs = ["RED_A", "BLUE_A"]
+
+    for vrf in vrfs:
+        for c_link, c_data in topo["routers"][dut]["links"].items():
+            if c_data["vrf"] != vrf:
+                continue
+
+            intf_name = c_data["interface"]
+            intf_ipv6 = c_data["ipv6"]
+
+            create_interface_in_kernel(
+                tgen, dut, intf_name, intf_ipv6, vrf, create=False
+            )
+
+    step(
+        "R2 should now receive the prefixes(in respective vrfs)"
+        "again. Check the debugging logs as well. For verification"
+        " use same commands as mention in step-3."
+    )
+
+    for addr_type in ADDR_TYPES:
+        dut = "r2"
+        input_dict_2 = {
+            "red1": {
+                "static_routes": [
+                    {
+                        "network": [NETWORK1_1[addr_type]] + [NETWORK1_2[addr_type]],
+                        "next_hop": NEXT_HOP_IP[addr_type],
+                        "vrf": "RED_A",
+                    }
+                ]
+            }
+        }
+
+        result = verify_bgp_rib(tgen, addr_type, dut, input_dict_2)
+        assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
+
+        result = verify_rib(tgen, addr_type, dut, input_dict_2)
+        assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
+
+    for addr_type in ADDR_TYPES:
+        dut = "r2"
+        input_dict_2 = {
+            "blue1": {
+                "static_routes": [
+                    {
+                        "network": [NETWORK3_1[addr_type]] + [NETWORK3_2[addr_type]],
+                        "next_hop": NEXT_HOP_IP[addr_type],
+                        "vrf": "BLUE_A",
+                    }
+                ]
+            }
+        }
+
+        result = verify_bgp_rib(tgen, addr_type, dut, input_dict_2)
+        assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
+
+        result = verify_rib(tgen, addr_type, dut, input_dict_2)
+        assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
+
+    write_test_footer(tc_name)
+
+
+def test_vrf_name_significance_p1(request):
+    """
+    CHAOS_4:
+    Verify that VRF names are locally significant
+    to a router, and end to end connectivity depends on unique
+    virtual circuits (using VLANs or separate physical interfaces).
+    """
+
+    tgen = get_topogen()
+    tc_name = request.node.name
+    write_test_header(tc_name)
+    reset_config_on_routers(tgen)
+
+    if tgen.routers_have_failure():
+        check_router_status(tgen)
+
+    step(
+        "Advertise unique prefixes in BGP using static redistribution"
+        "for both vrfs (RED_A and RED_B) on router RED_1"
+    )
+
+    for addr_type in ADDR_TYPES:
+        input_dict_1 = {
+            "red1": {
+                "static_routes": [
+                    {
+                        "network": [NETWORK1_1[addr_type]] + [NETWORK1_2[addr_type]],
+                        "next_hop": NEXT_HOP_IP[addr_type],
+                        "vrf": "RED_A",
+                    },
+                    {
+                        "network": [NETWORK2_1[addr_type]] + [NETWORK2_2[addr_type]],
+                        "next_hop": NEXT_HOP_IP[addr_type],
+                        "vrf": "RED_B",
+                    },
+                ]
+            }
+        }
+        result = create_static_routes(tgen, input_dict_1)
+        assert result is True, "Testcase {} : Failed \n Error: {}".format(
+            tc_name, result
+        )
+
+    step(
+        "Advertise unique prefixes in BGP using static redistribution"
+        " for both vrfs (BLUE_A and BLUE_B) on router BLUE_1."
+    )
+
+    for addr_type in ADDR_TYPES:
+        input_dict_2 = {
+            "blue1": {
+                "static_routes": [
+                    {
+                        "network": [NETWORK3_1[addr_type]] + [NETWORK3_2[addr_type]],
+                        "next_hop": NEXT_HOP_IP[addr_type],
+                        "vrf": "BLUE_A",
+                    },
+                    {
+                        "network": [NETWORK4_1[addr_type]] + [NETWORK4_2[addr_type]],
+                        "next_hop": NEXT_HOP_IP[addr_type],
+                        "vrf": "BLUE_B",
+                    },
+                ]
+            }
+        }
+        result = create_static_routes(tgen, input_dict_2)
+        assert result is True, "Testcase {} : Failed \n Error: {}".format(
+            tc_name, result
+        )
+
+    step("Redistribute static for vrfs RED_A and RED_B and BLUE_A and BLUE_B")
+
+    input_dict_3 = {}
+    for dut in ["red1", "blue1"]:
+        temp = {dut: {"bgp": []}}
+        input_dict_3.update(temp)
+
+        if "red" in dut:
+            VRFS = ["RED_A", "RED_B"]
+            AS_NUM = [500, 500]
+        elif "blue" in dut:
+            VRFS = ["BLUE_A", "BLUE_B"]
+            AS_NUM = [800, 800]
+
+        for vrf, as_num in zip(VRFS, AS_NUM):
+            temp[dut]["bgp"].append(
+                {
+                    "local_as": as_num,
+                    "vrf": vrf,
+                    "address_family": {
+                        "ipv4": {
+                            "unicast": {"redistribute": [{"redist_type": "static"}]}
+                        },
+                        "ipv6": {
+                            "unicast": {"redistribute": [{"redist_type": "static"}]}
+                        },
+                    },
+                }
+            )
+
+    result = create_router_bgp(tgen, topo, input_dict_3)
+    assert result is True, "Testcase {} :Failed \n Error: {}".format(tc_name, result)
+
+    step("Configure allowas-in on red2 and blue2")
+
+    input_dict_4 = {
+        "red2": {
+            "bgp": [
+                {
+                    "local_as": "500",
+                    "vrf": "RED_A",
+                    "address_family": {
+                        "ipv4": {
+                            "unicast": {
+                                "neighbor": {
+                                    "r3": {
+                                        "dest_link": {
+                                            "red2-link1": {
+                                                "allowas-in": {"number_occurences": 2}
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        },
+                        "ipv6": {
+                            "unicast": {
+                                "neighbor": {
+                                    "r3": {
+                                        "dest_link": {
+                                            "red2-link1": {
+                                                "allowas-in": {"number_occurences": 2}
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        },
+                    },
+                },
+                {
+                    "local_as": "500",
+                    "vrf": "RED_B",
+                    "address_family": {
+                        "ipv4": {
+                            "unicast": {
+                                "neighbor": {
+                                    "r3": {
+                                        "dest_link": {
+                                            "red2-link2": {
+                                                "allowas-in": {"number_occurences": 2}
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        },
+                        "ipv6": {
+                            "unicast": {
+                                "neighbor": {
+                                    "r3": {
+                                        "dest_link": {
+                                            "red2-link2": {
+                                                "allowas-in": {"number_occurences": 2}
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        },
+                    },
+                },
+            ]
+        },
+        "blue2": {
+            "bgp": [
+                {
+                    "local_as": "800",
+                    "vrf": "BLUE_A",
+                    "address_family": {
+                        "ipv4": {
+                            "unicast": {
+                                "neighbor": {
+                                    "r3": {
+                                        "dest_link": {
+                                            "blue2-link1": {
+                                                "allowas-in": {"number_occurences": 2}
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        },
+                        "ipv6": {
+                            "unicast": {
+                                "neighbor": {
+                                    "r3": {
+                                        "dest_link": {
+                                            "blue2-link1": {
+                                                "allowas-in": {"number_occurences": 2}
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        },
+                    },
+                },
+                {
+                    "local_as": "800",
+                    "vrf": "BLUE_B",
+                    "address_family": {
+                        "ipv4": {
+                            "unicast": {
+                                "neighbor": {
+                                    "r3": {
+                                        "dest_link": {
+                                            "blue2-link2": {
+                                                "allowas-in": {"number_occurences": 2}
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        },
+                        "ipv6": {
+                            "unicast": {
+                                "neighbor": {
+                                    "r3": {
+                                        "dest_link": {
+                                            "blue2-link2": {
+                                                "allowas-in": {"number_occurences": 2}
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        },
+                    },
+                },
+            ]
+        },
+    }
+
+    result = create_router_bgp(tgen, topo, input_dict_4)
+    assert result is True, "Testcase {} :Failed \n Error: {}".format(tc_name, result)
+
+    step("Verifying RIB and FIB before deleting VRFs")
+
+    for addr_type in ADDR_TYPES:
+        dut = "red2"
+        input_dict_1 = {
+            "red1": {
+                "static_routes": [
+                    {
+                        "network": [NETWORK1_1[addr_type]] + [NETWORK1_2[addr_type]],
+                        "next_hop": NEXT_HOP_IP[addr_type],
+                        "vrf": "RED_A",
+                    }
+                ]
+            }
+        }
+        input_dict_2 = {
+            "red1": {
+                "static_routes": [
+                    {
+                        "network": [NETWORK2_1[addr_type]] + [NETWORK2_2[addr_type]],
+                        "next_hop": NEXT_HOP_IP[addr_type],
+                        "vrf": "RED_B",
+                    }
+                ]
+            }
+        }
+
+        result = verify_bgp_rib(tgen, addr_type, dut, input_dict_1)
+        assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
+
+        result = verify_bgp_rib(tgen, addr_type, dut, input_dict_2)
+        assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
+
+        result = verify_rib(tgen, addr_type, dut, input_dict_1)
+        assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
+
+        result = verify_rib(tgen, addr_type, dut, input_dict_2)
+        assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
+
+    for addr_type in ADDR_TYPES:
+        dut = "blue2"
+        input_dict_3 = {
+            "blue1": {
+                "static_routes": [
+                    {
+                        "network": [NETWORK3_1[addr_type]] + [NETWORK3_2[addr_type]],
+                        "next_hop": NEXT_HOP_IP[addr_type],
+                        "vrf": "BLUE_A",
+                    }
+                ]
+            }
+        }
+
+        input_dict_4 = {
+            "blue1": {
+                "static_routes": [
+                    {
+                        "network": [NETWORK4_1[addr_type]] + [NETWORK4_2[addr_type]],
+                        "next_hop": NEXT_HOP_IP[addr_type],
+                        "vrf": "BLUE_B",
+                    }
+                ]
+            }
+        }
+
+        result = verify_bgp_rib(tgen, addr_type, dut, input_dict_3)
+        assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
+
+        result = verify_bgp_rib(tgen, addr_type, dut, input_dict_4)
+        assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
+
+        result = verify_rib(tgen, addr_type, dut, input_dict_3)
+        assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
+
+        result = verify_rib(tgen, addr_type, dut, input_dict_4)
+        assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
+
+    step("Api call to modfiy BGP timers")
+
+    input_dict_4 = {
+        "r3": {
+            "bgp": [
+                {
+                    "local_as": "200",
+                    "vrf": "RED_A",
+                    "address_family": {
+                        "ipv4": {
+                            "unicast": {
+                                "neighbor": {
+                                    "red2": {
+                                        "dest_link": {
+                                            "r3-link1": {
+                                                "keepalivetimer": KEEPALIVETIMER,
+                                                "holddowntimer": HOLDDOWNTIMER,
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        },
+                        "ipv6": {
+                            "unicast": {
+                                "neighbor": {
+                                    "red2": {
+                                        "dest_link": {
+                                            "r3-link1": {
+                                                "keepalivetimer": KEEPALIVETIMER,
+                                                "holddowntimer": HOLDDOWNTIMER,
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        },
+                    },
+                },
+                {
+                    "local_as": "200",
+                    "vrf": "RED_B",
+                    "address_family": {
+                        "ipv4": {
+                            "unicast": {
+                                "neighbor": {
+                                    "red2": {
+                                        "dest_link": {
+                                            "r3-link2": {
+                                                "keepalivetimer": KEEPALIVETIMER,
+                                                "holddowntimer": HOLDDOWNTIMER,
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        },
+                        "ipv6": {
+                            "unicast": {
+                                "neighbor": {
+                                    "red2": {
+                                        "dest_link": {
+                                            "r3-link2": {
+                                                "keepalivetimer": KEEPALIVETIMER,
+                                                "holddowntimer": HOLDDOWNTIMER,
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        },
+                    },
+                },
+                {
+                    "local_as": "200",
+                    "vrf": "BLUE_A",
+                    "address_family": {
+                        "ipv4": {
+                            "unicast": {
+                                "neighbor": {
+                                    "blue2": {
+                                        "dest_link": {
+                                            "r3-link1": {
+                                                "keepalivetimer": KEEPALIVETIMER,
+                                                "holddowntimer": HOLDDOWNTIMER,
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        },
+                        "ipv6": {
+                            "unicast": {
+                                "neighbor": {
+                                    "blue2": {
+                                        "dest_link": {
+                                            "r3-link1": {
+                                                "keepalivetimer": KEEPALIVETIMER,
+                                                "holddowntimer": HOLDDOWNTIMER,
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        },
+                    },
+                },
+                {
+                    "local_as": "200",
+                    "vrf": "BLUE_B",
+                    "address_family": {
+                        "ipv4": {
+                            "unicast": {
+                                "neighbor": {
+                                    "blue2": {
+                                        "dest_link": {
+                                            "r3-link2": {
+                                                "keepalivetimer": KEEPALIVETIMER,
+                                                "holddowntimer": HOLDDOWNTIMER,
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        },
+                        "ipv6": {
+                            "unicast": {
+                                "neighbor": {
+                                    "blue2": {
+                                        "dest_link": {
+                                            "r3-link2": {
+                                                "keepalivetimer": KEEPALIVETIMER,
+                                                "holddowntimer": HOLDDOWNTIMER,
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        },
+                    },
+                },
+            ]
+        },
+        "red2": {
+            "bgp": [
+                {
+                    "local_as": "500",
+                    "vrf": "RED_A",
+                    "address_family": {
+                        "ipv4": {
+                            "unicast": {
+                                "neighbor": {
+                                    "r3": {
+                                        "dest_link": {
+                                            "red2-link1": {
+                                                "keepalivetimer": KEEPALIVETIMER,
+                                                "holddowntimer": HOLDDOWNTIMER,
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        },
+                        "ipv6": {
+                            "unicast": {
+                                "neighbor": {
+                                    "r3": {
+                                        "dest_link": {
+                                            "red2-link1": {
+                                                "keepalivetimer": KEEPALIVETIMER,
+                                                "holddowntimer": HOLDDOWNTIMER,
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        },
+                    },
+                },
+                {
+                    "local_as": "500",
+                    "vrf": "RED_B",
+                    "address_family": {
+                        "ipv4": {
+                            "unicast": {
+                                "neighbor": {
+                                    "r3": {
+                                        "dest_link": {
+                                            "red2-link2": {
+                                                "keepalivetimer": KEEPALIVETIMER,
+                                                "holddowntimer": HOLDDOWNTIMER,
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        },
+                        "ipv6": {
+                            "unicast": {
+                                "neighbor": {
+                                    "r3": {
+                                        "dest_link": {
+                                            "red2-link2": {
+                                                "keepalivetimer": KEEPALIVETIMER,
+                                                "holddowntimer": HOLDDOWNTIMER,
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        },
+                    },
+                },
+            ]
+        },
+        "blue2": {
+            "bgp": [
+                {
+                    "local_as": "800",
+                    "vrf": "BLUE_A",
+                    "address_family": {
+                        "ipv4": {
+                            "unicast": {
+                                "neighbor": {
+                                    "r3": {
+                                        "dest_link": {
+                                            "blue2-link1": {
+                                                "keepalivetimer": KEEPALIVETIMER,
+                                                "holddowntimer": HOLDDOWNTIMER,
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        },
+                        "ipv6": {
+                            "unicast": {
+                                "neighbor": {
+                                    "r3": {
+                                        "dest_link": {
+                                            "blue2-link1": {
+                                                "keepalivetimer": KEEPALIVETIMER,
+                                                "holddowntimer": HOLDDOWNTIMER,
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        },
+                    },
+                },
+                {
+                    "local_as": "800",
+                    "vrf": "BLUE_B",
+                    "address_family": {
+                        "ipv4": {
+                            "unicast": {
+                                "neighbor": {
+                                    "r3": {
+                                        "dest_link": {
+                                            "blue2-link2": {
+                                                "keepalivetimer": KEEPALIVETIMER,
+                                                "holddowntimer": HOLDDOWNTIMER,
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        },
+                        "ipv6": {
+                            "unicast": {
+                                "neighbor": {
+                                    "r3": {
+                                        "dest_link": {
+                                            "blue2-link2": {
+                                                "keepalivetimer": KEEPALIVETIMER,
+                                                "holddowntimer": HOLDDOWNTIMER,
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        },
+                    },
+                },
+            ]
+        },
+    }
+
+    result = create_router_bgp(tgen, topo, input_dict_4)
+    assert result is True, "Testcase {} :Failed \n Error: {}".format(tc_name, result)
+
+    for addr_type in ADDR_TYPES:
+        clear_bgp(tgen, addr_type, "r3", vrf=["RED_A", "RED_B", "BLUE_A", "BLUE_B"])
+
+        clear_bgp(tgen, addr_type, "red2", vrf=["RED_A", "RED_B"])
+
+        clear_bgp(tgen, addr_type, "blue2", vrf=["BLUE_A", "BLUE_B"])
+
+    step("Delete vrfs RED_A and BLUE_A from R3")
+
+    input_dict = {
+        "r3": {
+            "vrfs": [
+                {"name": "RED_A", "id": "1", "delete": True},
+                {"name": "BLUE_A", "id": "3", "delete": True},
+            ]
+        }
+    }
+
+    result = create_vrf_cfg(tgen, input_dict)
+    assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
+
+    step("Waiting for {}+1..".format(HOLDDOWNTIMER))
+    sleep(HOLDDOWNTIMER + 1)
+
+    step("Verify RIB and FIB after deleting VRFs")
+
+    for addr_type in ADDR_TYPES:
+        dut = "red2"
+        input_dict_1 = {
+            "red1": {
+                "static_routes": [
+                    {
+                        "network": [NETWORK1_1[addr_type]] + [NETWORK1_2[addr_type]],
+                        "next_hop": NEXT_HOP_IP[addr_type],
+                        "vrf": "RED_A",
+                    }
+                ]
+            }
+        }
+
+        result = verify_rib(tgen, addr_type, dut, input_dict_1, expected=False)
+        assert (
+            result is not True
+        ), "Testcase {} :Failed \n Expected Behaviour: Routes are not"
+        " present \n Error {}".format(tc_name, result)
+
+        result = verify_bgp_rib(tgen, addr_type, dut, input_dict_1, expected=False)
+        assert (
+            result is not True
+        ), "Testcase {} :Failed \n Expected Behaviour: Routes are not"
+        " present \n Error {}".format(tc_name, result)
+
+    for addr_type in ADDR_TYPES:
+        dut = "blue2"
+        input_dict_2 = {
+            "blue1": {
+                "static_routes": [
+                    {
+                        "network": [NETWORK3_1[addr_type]] + [NETWORK3_2[addr_type]],
+                        "next_hop": NEXT_HOP_IP[addr_type],
+                        "vrf": "BLUE_A",
+                    }
+                ]
+            }
+        }
+
+        result = verify_rib(tgen, addr_type, dut, input_dict_2, expected=False)
+        assert result is not True, (
+            "Testcase {} :Failed \n Expected Behaviour: Routes are not"
+            " present \n Error {}".format(tc_name, result)
+        )
+
+        result = verify_bgp_rib(tgen, addr_type, dut, input_dict_2, expected=False)
+        assert result is not True, (
+            "Testcase {} :Failed \n Expected Behaviour: Routes are not"
+            " present \n Error {}".format(tc_name, result)
+        )
+
+    step("Create 2 new VRFs PINK_A and GREY_A IN R3")
+
+    topo_modify = deepcopy(topo)
+    topo_modify["routers"]["r3"]["vrfs"][0]["name"] = "PINK_A"
+    topo_modify["routers"]["r3"]["vrfs"][0]["id"] = "1"
+    topo_modify["routers"]["r3"]["vrfs"][2]["name"] = "GREY_A"
+    topo_modify["routers"]["r3"]["vrfs"][2]["id"] = "3"
+
+    topo_modify["routers"]["r3"]["links"]["red2-link1"]["vrf"] = "PINK_A"
+    topo_modify["routers"]["r3"]["links"]["blue2-link1"]["vrf"] = "GREY_A"
+
+    topo_modify["routers"]["r3"]["links"]["r2-link1"]["vrf"] = "PINK_A"
+    topo_modify["routers"]["r3"]["links"]["r2-link3"]["vrf"] = "GREY_A"
+
+    topo_modify["routers"]["r3"]["links"]["r4-link1"]["vrf"] = "PINK_A"
+    topo_modify["routers"]["r3"]["links"]["r4-link3"]["vrf"] = "GREY_A"
+
+    topo_modify["routers"]["r3"]["bgp"][0]["vrf"] = "PINK_A"
+    topo_modify["routers"]["r3"]["bgp"][2]["vrf"] = "GREY_A"
+
+    result = create_vrf_cfg(tgen, {"r3": topo_modify["routers"]["r3"]})
+    assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
+
+    create_interfaces_cfg(tgen, {"r3": topo_modify["routers"]["r3"]})
+    assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
+
+    result = create_router_bgp(tgen, topo_modify["routers"])
+    assert result is True, "Testcase {} :Failed \n Error: {}".format(tc_name, result)
+
+    step("Api call to modfiy BGP timers")
+
+    input_dict_4 = {
+        "r3": {
+            "bgp": [
+                {
+                    "local_as": "200",
+                    "vrf": "PINK_A",
+                    "address_family": {
+                        "ipv4": {
+                            "unicast": {
+                                "neighbor": {
+                                    "red2": {
+                                        "dest_link": {
+                                            "r3-link1": {
+                                                "keepalivetimer": KEEPALIVETIMER,
+                                                "holddowntimer": HOLDDOWNTIMER,
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        },
+                        "ipv6": {
+                            "unicast": {
+                                "neighbor": {
+                                    "red2": {
+                                        "dest_link": {
+                                            "r3-link1": {
+                                                "keepalivetimer": KEEPALIVETIMER,
+                                                "holddowntimer": HOLDDOWNTIMER,
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        },
+                    },
+                },
+                {
+                    "local_as": "200",
+                    "vrf": "RED_B",
+                    "address_family": {
+                        "ipv4": {
+                            "unicast": {
+                                "neighbor": {
+                                    "red2": {
+                                        "dest_link": {
+                                            "r3-link2": {
+                                                "keepalivetimer": KEEPALIVETIMER,
+                                                "holddowntimer": HOLDDOWNTIMER,
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        },
+                        "ipv6": {
+                            "unicast": {
+                                "neighbor": {
+                                    "red2": {
+                                        "dest_link": {
+                                            "r3-link2": {
+                                                "keepalivetimer": KEEPALIVETIMER,
+                                                "holddowntimer": HOLDDOWNTIMER,
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        },
+                    },
+                },
+                {
+                    "local_as": "200",
+                    "vrf": "GREY_A",
+                    "address_family": {
+                        "ipv4": {
+                            "unicast": {
+                                "neighbor": {
+                                    "blue2": {
+                                        "dest_link": {
+                                            "r3-link1": {
+                                                "keepalivetimer": KEEPALIVETIMER,
+                                                "holddowntimer": HOLDDOWNTIMER,
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        },
+                        "ipv6": {
+                            "unicast": {
+                                "neighbor": {
+                                    "blue2": {
+                                        "dest_link": {
+                                            "r3-link1": {
+                                                "keepalivetimer": KEEPALIVETIMER,
+                                                "holddowntimer": HOLDDOWNTIMER,
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        },
+                    },
+                },
+                {
+                    "local_as": "200",
+                    "vrf": "BLUE_B",
+                    "address_family": {
+                        "ipv4": {
+                            "unicast": {
+                                "neighbor": {
+                                    "blue2": {
+                                        "dest_link": {
+                                            "r3-link2": {
+                                                "keepalivetimer": KEEPALIVETIMER,
+                                                "holddowntimer": HOLDDOWNTIMER,
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        },
+                        "ipv6": {
+                            "unicast": {
+                                "neighbor": {
+                                    "blue2": {
+                                        "dest_link": {
+                                            "r3-link2": {
+                                                "keepalivetimer": KEEPALIVETIMER,
+                                                "holddowntimer": HOLDDOWNTIMER,
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        },
+                    },
+                },
+            ]
+        }
+    }
+
+    result = create_router_bgp(tgen, topo_modify, input_dict_4)
+    assert result is True, "Testcase {} :Failed \n Error: {}".format(tc_name, result)
+
+    for addr_type in ADDR_TYPES:
+        clear_bgp(tgen, addr_type, "r3", vrf=["PINK_A", "RED_B", "GREY_A", "BLUE_B"])
+
+    step(
+        "After deleting VRFs ipv6 addresses will be deleted from kernel "
+        " Adding back ipv6 addresses"
+    )
+
+    dut = "r3"
+    vrfs = ["GREY_A", "PINK_A"]
+
+    for vrf in vrfs:
+        for c_link, c_data in topo_modify["routers"][dut]["links"].items():
+            if c_data["vrf"] != vrf:
+                continue
+
+            intf_name = c_data["interface"]
+            intf_ipv6 = c_data["ipv6"]
+
+            create_interface_in_kernel(
+                tgen, dut, intf_name, intf_ipv6, vrf, create=False
+            )
+
+    step("Waiting for {}+1 sec..".format(HOLDDOWNTIMER))
+    sleep(HOLDDOWNTIMER + 1)
+
+    step(
+        "Advertised prefixes should appear again in respective VRF"
+        " table on routers RED_2 and BLUE_2. Verify fib and rib entries"
+    )
+
+    for addr_type in ADDR_TYPES:
+        dut = "red2"
+        input_dict_1 = {
+            "red1": {
+                "static_routes": [
+                    {
+                        "network": [NETWORK1_1[addr_type]] + [NETWORK1_2[addr_type]],
+                        "next_hop": NEXT_HOP_IP[addr_type],
+                        "vrf": "RED_A",
+                    }
+                ]
+            }
+        }
+
+        input_dict_2 = {
+            "red1": {
+                "static_routes": [
+                    {
+                        "network": [NETWORK2_1[addr_type]] + [NETWORK2_2[addr_type]],
+                        "next_hop": NEXT_HOP_IP[addr_type],
+                        "vrf": "RED_B",
+                    }
+                ]
+            }
+        }
+
+        result = verify_bgp_rib(tgen, addr_type, dut, input_dict_1)
+        assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
+
+        result = verify_bgp_rib(tgen, addr_type, dut, input_dict_2)
+        assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
+
+        result = verify_rib(tgen, addr_type, dut, input_dict_1)
+        assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
+
+        result = verify_rib(tgen, addr_type, dut, input_dict_2)
+        assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
+
+    for addr_type in ADDR_TYPES:
+        dut = "blue2"
+        input_dict_3 = {
+            "blue1": {
+                "static_routes": [
+                    {
+                        "network": [NETWORK3_1[addr_type]] + [NETWORK3_2[addr_type]],
+                        "next_hop": NEXT_HOP_IP[addr_type],
+                        "vrf": "BLUE_A",
+                    }
+                ]
+            }
+        }
+
+        input_dict_4 = {
+            "blue1": {
+                "static_routes": [
+                    {
+                        "network": [NETWORK4_1[addr_type]] + [NETWORK4_2[addr_type]],
+                        "next_hop": NEXT_HOP_IP[addr_type],
+                        "vrf": "BLUE_B",
+                    }
+                ]
+            }
+        }
+
+        result = verify_bgp_rib(tgen, addr_type, dut, input_dict_3)
+        assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
+
+        result = verify_bgp_rib(tgen, addr_type, dut, input_dict_4)
+        assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
+
+        result = verify_rib(tgen, addr_type, dut, input_dict_3)
+        assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
+
+        result = verify_rib(tgen, addr_type, dut, input_dict_4)
+        assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
+
+    write_test_footer(tc_name)
+
+
+def test_restart_frr_services_p1(request):
+    """
+    CHAOS_8:
+    Restart all FRR services (reboot DUT) to check if all
+    the routes in respective vrfs are reinstalled.
+    """
+
+    tgen = get_topogen()
+    tc_name = request.node.name
+    write_test_header(tc_name)
+    reset_config_on_routers(tgen)
+
+    if tgen.routers_have_failure():
+        check_router_status(tgen)
+
+    step(
+        "Advertise unique BGP prefixes(IPv4+IPv6) from RED_1"
+        " in vrf instances(RED_A and RED_B)."
+    )
+
+    for addr_type in ADDR_TYPES:
+        input_dict_1 = {
+            "red1": {
+                "static_routes": [
+                    {
+                        "network": [NETWORK1_1[addr_type]] + [NETWORK1_2[addr_type]],
+                        "next_hop": NEXT_HOP_IP[addr_type],
+                        "vrf": "RED_A",
+                    },
+                    {
+                        "network": [NETWORK2_1[addr_type]] + [NETWORK2_2[addr_type]],
+                        "next_hop": NEXT_HOP_IP[addr_type],
+                        "vrf": "RED_B",
+                    },
+                ]
+            }
+        }
+        result = create_static_routes(tgen, input_dict_1)
+        assert result is True, "Testcase {} : Failed \n Error: {}".format(
+            tc_name, result
+        )
+
+    step(
+        "Advertise unique BGP prefixes(IPv4+IPv6) from BLUE_1 in"
+        " vrf instances(BLUE_A and BLUE_B)."
+    )
+
+    for addr_type in ADDR_TYPES:
+        input_dict_2 = {
+            "blue1": {
+                "static_routes": [
+                    {
+                        "network": [NETWORK1_1[addr_type]] + [NETWORK1_2[addr_type]],
+                        "next_hop": NEXT_HOP_IP[addr_type],
+                        "vrf": "BLUE_A",
+                    },
+                    {
+                        "network": [NETWORK2_1[addr_type]] + [NETWORK2_2[addr_type]],
+                        "next_hop": NEXT_HOP_IP[addr_type],
+                        "vrf": "BLUE_B",
+                    },
+                ]
+            }
+        }
+        result = create_static_routes(tgen, input_dict_2)
+        assert result is True, "Testcase {} : Failed \n Error: {}".format(
+            tc_name, result
+        )
+
+    step("Redistribute static..")
+
+    input_dict_3 = {}
+    for dut in ["red1", "blue1"]:
+        temp = {dut: {"bgp": []}}
+        input_dict_3.update(temp)
+
+        if "red" in dut:
+            VRFS = ["RED_A", "RED_B"]
+            AS_NUM = [500, 500]
+        elif "blue" in dut:
+            VRFS = ["BLUE_A", "BLUE_B"]
+            AS_NUM = [800, 800]
+
+        for vrf, as_num in zip(VRFS, AS_NUM):
+            temp[dut]["bgp"].append(
+                {
+                    "local_as": as_num,
+                    "vrf": vrf,
+                    "address_family": {
+                        "ipv4": {
+                            "unicast": {"redistribute": [{"redist_type": "static"}]}
+                        },
+                        "ipv6": {
+                            "unicast": {"redistribute": [{"redist_type": "static"}]}
+                        },
+                    },
+                }
+            )
+
+    result = create_router_bgp(tgen, topo, input_dict_3)
+    assert result is True, "Testcase {} :Failed \n Error: {}".format(tc_name, result)
+
+    step("Restart frr on R1")
+    stop_router(tgen, "r1")
+    start_router(tgen, "r1")
+
+    for addr_type in ADDR_TYPES:
+        dut = "r2"
+
+        input_dict_1 = {
+            "red1": {
+                "static_routes": [
+                    {
+                        "network": [NETWORK1_1[addr_type]] + [NETWORK1_2[addr_type]],
+                        "next_hop": NEXT_HOP_IP[addr_type],
+                        "vrf": "RED_A",
+                    },
+                    {
+                        "network": [NETWORK2_1[addr_type]] + [NETWORK2_2[addr_type]],
+                        "next_hop": NEXT_HOP_IP[addr_type],
+                        "vrf": "RED_B",
+                    },
+                ]
+            }
+        }
+
+        input_dict_2 = {
+            "blue1": {
+                "static_routes": [
+                    {
+                        "network": [NETWORK1_1[addr_type]] + [NETWORK1_2[addr_type]],
+                        "next_hop": NEXT_HOP_IP[addr_type],
+                        "vrf": "BLUE_A",
+                    },
+                    {
+                        "network": [NETWORK2_1[addr_type]] + [NETWORK2_2[addr_type]],
+                        "next_hop": NEXT_HOP_IP[addr_type],
+                        "vrf": "BLUE_B",
+                    },
+                ]
+            }
+        }
+
+        result = verify_rib(tgen, addr_type, dut, input_dict_1)
+        assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
+
+        result = verify_rib(tgen, addr_type, dut, input_dict_2)
+        assert result is True, "Testcase {} :Failed \n Error {}".format(tc_name, result)
+
+    write_test_footer(tc_name)
+
+
 if __name__ == "__main__":
     args = ["-s"] + sys.argv[1:]
     sys.exit(pytest.main(args))