diff --git a/core/store/serializers/src/main/java/org/onosproject/store/serializers/KryoNamespaces.java b/core/store/serializers/src/main/java/org/onosproject/store/serializers/KryoNamespaces.java
index b276af2..a7dccc6 100644
--- a/core/store/serializers/src/main/java/org/onosproject/store/serializers/KryoNamespaces.java
+++ b/core/store/serializers/src/main/java/org/onosproject/store/serializers/KryoNamespaces.java
@@ -223,6 +223,7 @@
             .register(new MacAddressSerializer(), MacAddress.class)
             .register(VlanId.class)
             .register(Frequency.class)
+            .register(org.onlab.util.Bandwidth.class)
             .build();
 
     /**
diff --git a/core/store/serializers/src/test/java/org/onosproject/store/serializers/KryoSerializerTest.java b/core/store/serializers/src/test/java/org/onosproject/store/serializers/KryoSerializerTest.java
index c93da2c..98ee193 100644
--- a/core/store/serializers/src/test/java/org/onosproject/store/serializers/KryoSerializerTest.java
+++ b/core/store/serializers/src/test/java/org/onosproject/store/serializers/KryoSerializerTest.java
@@ -366,6 +366,11 @@
     }
 
     @Test
+    public void testBandwidth() {
+        testSerializedEquals(org.onlab.util.Bandwidth.mbps(1000.0));
+    }
+
+    @Test
     public void testLambdaConstraint() {
         testSerializable(new LambdaConstraint(LambdaResource.valueOf(1)));
     }
diff --git a/utils/misc/src/main/java/org/onlab/util/Bandwidth.java b/utils/misc/src/main/java/org/onlab/util/Bandwidth.java
new file mode 100644
index 0000000..6a6d6c1
--- /dev/null
+++ b/utils/misc/src/main/java/org/onlab/util/Bandwidth.java
@@ -0,0 +1,109 @@
+/*
+ * Copyright 2015 Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onlab.util;
+
+import java.util.Objects;
+
+/**
+ * Representation of bandwidth.
+ * Use the static factory method corresponding to the unit (like Kbps) you desire on instantiation.
+ */
+public final class Bandwidth {
+
+    private final double bps;
+
+    /**
+     * Creates a new instance with given bandwidth.
+     *
+     * @param bps bandwidth value to be assigned
+     */
+    private Bandwidth(double bps) {
+        this.bps = bps;
+    }
+
+    // Constructor for serialization
+    private Bandwidth() {
+        this.bps = 0;
+    }
+
+    /**
+     * Creates a new instance with given bandwidth in bps.
+     *
+     * @param bps bandwidth value to be assigned
+     * @return {@link Bandwidth} instance with given bandwidth
+     */
+    public static Bandwidth bps(double bps) {
+        return new Bandwidth(bps);
+    }
+
+    /**
+     * Creates a new instance with given bandwidth in Kbps.
+     *
+     * @param kbps bandwidth value to be assigned
+     * @return {@link Bandwidth} instance with given bandwidth
+     */
+    public static Bandwidth kbps(double kbps) {
+        return bps(kbps * 1_000L);
+    }
+
+    /**
+     * Creates a new instance with given bandwidth in Mbps.
+     *
+     * @param mbps bandwidth value to be assigned
+     * @return {@link Bandwidth} instance with given bandwidth
+     */
+    public static Bandwidth mbps(double mbps) {
+        return bps(mbps * 1_000_000L);
+    }
+
+    /**
+     * Creates a new instance with given bandwidth in Gbps.
+     *
+     * @param gbps bandwidth value to be assigned
+     * @return {@link Bandwidth} instance with given bandwidth
+     */
+    public static Bandwidth gbps(double gbps) {
+        return bps(gbps * 1_000_000_000L);
+    }
+
+    /**
+     * Returns bandwidth in bps.
+     *
+     * @return bandwidth in bps.
+     */
+    public double bps() {
+        return bps;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (obj instanceof Bandwidth) {
+            Bandwidth that = (Bandwidth) obj;
+            return Objects.equals(this.bps, that.bps);
+        }
+        return false;
+    }
+
+    @Override
+    public int hashCode() {
+        return Long.hashCode(Double.doubleToLongBits(bps));
+    }
+
+    @Override
+    public String toString() {
+        return String.valueOf(this.bps);
+    }
+}
diff --git a/utils/misc/src/test/java/org/onlab/util/BandwidthTest.java b/utils/misc/src/test/java/org/onlab/util/BandwidthTest.java
new file mode 100644
index 0000000..f8c17fc
--- /dev/null
+++ b/utils/misc/src/test/java/org/onlab/util/BandwidthTest.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2015 Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onlab.util;
+
+import com.google.common.testing.EqualsTester;
+import org.junit.Test;
+
+/**
+ * Unit tests for Bandwidth.
+ */
+public class BandwidthTest {
+    /**
+     * Tests equality of Bandwidth instances.
+     */
+    @Test
+    public void testEquality() {
+        new EqualsTester()
+                .addEqualityGroup(Bandwidth.kbps(1000.0), Bandwidth.kbps(1000.0), Bandwidth.mbps(1.0))
+                .addEqualityGroup(Bandwidth.gbps(1.0))
+                .testEquals();
+    }
+
+}
