diff --git a/apps/roadm/app/src/main/java/org/onosproject/roadm/RoadmPortViewMessageHandler.java b/apps/roadm/app/src/main/java/org/onosproject/roadm/RoadmPortViewMessageHandler.java
index 9abd2f1..647b22e 100644
--- a/apps/roadm/app/src/main/java/org/onosproject/roadm/RoadmPortViewMessageHandler.java
+++ b/apps/roadm/app/src/main/java/org/onosproject/roadm/RoadmPortViewMessageHandler.java
@@ -30,6 +30,7 @@
 import org.onosproject.net.OchSignal;
 import org.onosproject.net.Port;
 import org.onosproject.net.PortNumber;
+import org.onosproject.net.behaviour.BitErrorRateState;
 import org.onosproject.net.behaviour.PowerConfig;
 import org.onosproject.net.behaviour.protection.ProtectedTransportEndpointState;
 import org.onosproject.net.behaviour.protection.TransportEndpointState;
@@ -94,11 +95,15 @@
     private static final String TARGET_POWER = "targetPower";
     private static final String MODULATION = "modulation";
     private static final String HAS_TARGET_POWER = "hasTargetPower";
+    private static final String PRE_FEC_BER = "preFecBitErrorRate";
+    private static final String POST_FEC_BER = "postFecBitErrorRate";
     private static final String SERVICE_STATE = "serviceState";
 
+
     private static final String[] COLUMN_IDS = {
             ID, REVERSE_PORT, TYPE, NAME, ENABLED, MIN_FREQ, MAX_FREQ, GRID, CURR_FREQ, POWER_RANGE,
-            CURRENT_POWER, CURRENT_INPUT_POWER, SERVICE_STATE, TARGET_POWER, MODULATION, HAS_TARGET_POWER
+            CURRENT_POWER, CURRENT_INPUT_POWER, SERVICE_STATE, TARGET_POWER, MODULATION, HAS_TARGET_POWER,
+            PRE_FEC_BER, POST_FEC_BER
     };
 
     private RoadmService roadmService;
@@ -172,7 +177,9 @@
                     .cell(SERVICE_STATE, getPortServiceState(deviceId, portNum))
                     .cell(MODULATION, getModulation(deviceId, portNum))
                     .cell(TARGET_POWER, getTargetPower(deviceId, portNum))
-                    .cell(HAS_TARGET_POWER, roadmService.hasPortTargetPower(deviceId, portNum));
+                    .cell(HAS_TARGET_POWER, roadmService.hasPortTargetPower(deviceId, portNum))
+                    .cell(PRE_FEC_BER, getPreFecBer(deviceId, portNum))
+                    .cell(POST_FEC_BER, getPostFecBer(deviceId, portNum));
         }
 
         private String getPortServiceState(DeviceId deviceId, PortNumber portNumber) {
@@ -238,6 +245,28 @@
             return RoadmUtil.objectToString(inputPowerVal, RoadmUtil.UNKNOWN);
         }
 
+        // Returns the current input power as a string, Unknown if no value can be found.
+        private String getPreFecBer(DeviceId deviceId, PortNumber portNumber) {
+            BitErrorRateState bitErrorRateState = deviceService.getDevice(deviceId).as(BitErrorRateState.class);
+            Optional<Double> preFecBer = bitErrorRateState.getPreFecBer(deviceId, portNumber);
+            Double preFecBerVal = null;
+            if (preFecBer.isPresent()) {
+                preFecBerVal = preFecBer.orElse(Double.MIN_VALUE);
+            }
+            return RoadmUtil.objectToString(preFecBerVal, RoadmUtil.UNKNOWN);
+        }
+
+        // Returns the current input power as a string, Unknown if no value can be found.
+        private String getPostFecBer(DeviceId deviceId, PortNumber portNumber) {
+            BitErrorRateState bitErrorRateState = deviceService.getDevice(deviceId).as(BitErrorRateState.class);
+            Optional<Double> postFecBer = bitErrorRateState.getPostFecBer(deviceId, portNumber);
+            Double postFecBerVal = null;
+            if (postFecBer.isPresent()) {
+                postFecBerVal = postFecBer.orElse(Double.MIN_VALUE);
+            }
+            return RoadmUtil.objectToString(postFecBerVal, RoadmUtil.UNKNOWN);
+        }
+
         // Returns target power as a string, Unknown if target power is expected but
         // cannot be found, N/A if port does not have configurable target power
         private String getTargetPower(DeviceId deviceId, PortNumber portNumber) {
diff --git a/apps/roadm/web/roadm-gui/lib/port/port.component.html b/apps/roadm/web/roadm-gui/lib/port/port.component.html
index fc5461d..5c82dc4 100644
--- a/apps/roadm/web/roadm-gui/lib/port/port.component.html
+++ b/apps/roadm/web/roadm-gui/lib/port/port.component.html
@@ -77,6 +77,8 @@
                     <td colId="currentInputPower">CURRENT INPUT POWER (dBm)</td>
                     <td colId="targetPower">TARGET OUTPUT POWER (dBm)</td>
                     <td colId="hasTargetPower">HAS TARGET POWER</td>
+                    <td colId="PRE_FEC_BER">PRE FEC BER</td>
+                    <td colId="POST_FEC_BER">POST FEC BER</td>
                     <td colId="serviceState">SERVICE STATE</td>
                 </tr>
             </table>
@@ -122,6 +124,8 @@
                         </form>
                     </td>
                     <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.hasTargetPower}}</td>
+                    <td [ngClass]="(isDelta() ? 'delta' : '')">{{convertNumber(port.preFecBitErrorRate)}}</td>
+                    <td [ngClass]="(isDelta() ? 'delta' : '')">{{convertNumber(port.postFecBitErrorRate)}}</td>
                     <td [ngClass]="(isDelta() ? 'delta' : '')">{{port.serviceState}}</td>
                 </tr>
             </table>
