diff --git a/test/bfd.py b/test/bfd.py
index 9d44425..bbfa594 100644
--- a/test/bfd.py
+++ b/test/bfd.py
@@ -392,6 +392,30 @@
                                    is_authenticated=is_authenticated)
         self._test.registry.register(self, self.test.logger)
 
+    def upd_vpp_config(self,
+                       detect_mult=None,
+                       desired_min_tx=None,
+                       required_min_rx=None):
+        if desired_min_tx:
+            self._desired_min_tx = desired_min_tx
+        if required_min_rx:
+            self._required_min_rx = required_min_rx
+        if detect_mult:
+            self._detect_mult = detect_mult
+        bfd_key_id = self._bfd_key_id if self._sha1_key else None
+        conf_key_id = self._sha1_key.conf_key_id if self._sha1_key else None
+        is_authenticated = True if self._sha1_key else False
+        self.test.vapi.bfd_udp_upd(sw_if_index=self._interface.sw_if_index,
+                                   desired_min_tx=self.desired_min_tx,
+                                   required_min_rx=self.required_min_rx,
+                                   detect_mult=self.detect_mult,
+                                   local_addr=self.local_addr,
+                                   peer_addr=self.peer_addr,
+                                   bfd_key_id=bfd_key_id,
+                                   conf_key_id=conf_key_id,
+                                   is_authenticated=is_authenticated)
+        self._test.registry.register(self, self.test.logger)
+
     def query_vpp_config(self):
         session = self.get_bfd_udp_session_dump_entry()
         return session is not None
diff --git a/test/test_bfd.py b/test/test_bfd.py
index e6a710d..7a444cb 100644
--- a/test/test_bfd.py
+++ b/test/test_bfd.py
@@ -142,6 +142,34 @@
                           "required min receive interval")
         self.assert_equal(session.detect_mult, s.detect_mult, "detect mult")
 
+    def test_upd_bfd(self):
+        """ Create/Modify w/ Update BFD session parameters """
+        session = VppBFDUDPSession(self, self.pg0, self.pg0.remote_ip4,
+                                   desired_min_tx=50000,
+                                   required_min_rx=10000,
+                                   detect_mult=1)
+        session.upd_vpp_config()
+        s = session.get_bfd_udp_session_dump_entry()
+        self.assert_equal(session.desired_min_tx,
+                          s.desired_min_tx,
+                          "desired min transmit interval")
+        self.assert_equal(session.required_min_rx,
+                          s.required_min_rx,
+                          "required min receive interval")
+
+        self.assert_equal(session.detect_mult, s.detect_mult, "detect mult")
+        session.upd_vpp_config(desired_min_tx=session.desired_min_tx * 2,
+                               required_min_rx=session.required_min_rx * 2,
+                               detect_mult=session.detect_mult * 2)
+        s = session.get_bfd_udp_session_dump_entry()
+        self.assert_equal(session.desired_min_tx,
+                          s.desired_min_tx,
+                          "desired min transmit interval")
+        self.assert_equal(session.required_min_rx,
+                          s.required_min_rx,
+                          "required min receive interval")
+        self.assert_equal(session.detect_mult, s.detect_mult, "detect mult")
+
     def test_add_sha1_keys(self):
         """ add SHA1 keys """
         key_count = 10
